/* General Body Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
}

/* Login Container Styling */
.login-container {
    width: 300px;
    padding: 20px;
    background: white;
    margin: 100px auto;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

/* Input, Select, and Button Styling */
input, select, button, textarea {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background: #28a745;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background: #218838;
}

.error {
    color: red;
}

/* Dashboard Styling */
.container {
    display: flex;
    width: 98%;
    margin: 10px auto;
    background: white;
    padding: 10px;
    border-radius: 5px;
}

/* Sidebar styling */
.sidebar {
    background: #004466 !important;
    color: white;
    width: 250px !important;
    min-width: 250px !important; /* Prevent shrinking */
    max-width: 250px !important; /* Prevent expansion */
    position: fixed;
    height: 100vh;
    padding: 10px;
    overflow-y: auto;
    box-sizing: border-box; /* Ensure padding doesn't affect width */
    z-index: 1000; /* Ensure sidebar is above other content */
}

.sidebar::-webkit-scrollbar {
    display: none; /* Hide scrollbar in Chrome/Safari */
}

/* Sidebar title */
.sidebar h2 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 10px;
}

/* Sidebar menu items */
.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li {
    padding: 5px 0; /* Reduced padding */
    position: relative;
}

/* Menu links */
.menu a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 6px 10px; /* Reduced padding */
    font-size: 14px; /* Smaller text */
    transition: background 0.3s;
    border-radius: 5px;
}

/* Hover effect */
.menu a:hover {
    background: #006699;
}

/* Dropdown toggle indicator */
.menu .toggle::after {
    content: " ▼";
    float: right;
    font-size: 12px;
}

/* Dropdown submenu */
.submenu {
    display: none;
    list-style: none;
    padding-left: 10px; /* Less indentation */
}

.submenu li {
    background: #003355;
    padding: 4px; /* Reduce padding inside submenu */
}

.submenu li a {
    font-size: 13px;
    padding: 5px 8px; /* Smaller padding for better fit */
}

/* Active menu */
.active {
    background: #006699;
}

/* Ensure submenu does not interfere */
.submenu a {
    font-size: 14px;
    padding-left: 20px;
    display: block;
}

/* Main content styling */
.main-content {
        margin-left: 250px; /* Exactly matches sidebar width */
        padding: 15px;
        width: calc(100% - 250px);
        background: #f4f4f4;
        min-height: 100vh;
        box-sizing: border-box;
    }

.content {
    margin-left: 250px; /* Same as sidebar width */
    padding: 20px;
    width: calc(100% - 250px); /* Adjust content width */
}

/* Form Styling */
form {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    border-radius: 5px;
}

label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

/* Category Entry Form Styling */
#categoryForm {
    padding: 3px;
    border: 1px solid #ddd;
    background: #ffffff;
    border-radius: 3px;
    display: flex;
    gap: 3px;
    flex-wrap: nowrap; /* Prevents wrapping */
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 10px;
    position: fixed; /* Keeps form position constant */
    top: 10px; /* Adjust as needed */
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    z-index: 1000;
}

#categoryForm select,
#categoryForm input {
    width: auto;
    padding: 3px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
}

#categoryForm button {
    padding: 3px 6px;
    font-size: 12px;
}

/* Category List Styling */
.category-section {
    margin-top: 8px;
}

.category-header {
    background: #ff5555;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 5px;
    text-align: left;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2px;
    font-size: 12px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 5px;
    text-align: center;
}

th {
    background-color: #f4f4f4;
}

.actions a, .actions button {
    padding: 3px 5px;
    font-size: 10px;
    margin: 2px;
    border-radius: 3px;
    cursor: pointer;
}

.actions a {
    background: #007bff;
    color: white;
    text-decoration: none;
}

.actions a:hover {
    background: #0056b3;
}

.actions button {
    background: #dc3545;
    color: white;
    border: none;
}

.actions button:hover {
    background: #c82333;
}

/* Company Setup Specific Styles */
.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.company-card {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    background: #f9f9f9;
}

.company-card img {
    max-width: 100px; /* Fixed width for logos */
    height: auto; /* Maintain aspect ratio */
    border-radius: 5px;
    display: block; /* Ensure the image is treated as a block element */
    margin: 10px 0; /* Add some margin for spacing */
}

.actions {
    margin-top: 10px;
}

.actions a {
    margin-right: 10px;
    text-decoration: none;
    color: #007bff;
}

.actions a:hover {
    text-decoration: underline;
}


