/* Company brand colors (from H&M Tenant Agency logo) - same for all tenants */
:root {
    --primary-color: #1F4F6E;
    --accent-color: #26B1BA;
    --secondary-color: #5E7386;
}

/* Theme toggle in navbar */
.theme-toggle-li {
    margin-top: 8px;
    margin-bottom: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
html[data-theme="light"] .theme-toggle-li {
    border-top-color: rgba(0, 0, 0, 0.1);
}
.theme-toggle-btn {
    width: 100%;
    padding: 10px 12px;
    background-color: rgba(38, 177, 186, 0.2);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    color: var(--accent-color);
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.2s, color 0.2s;
}
.theme-toggle-btn:hover {
    background-color: rgba(38, 177, 186, 0.35);
    color: #0d8a92;
}
html[data-theme="light"] .theme-toggle-btn {
    background-color: rgba(31, 79, 110, 0.12);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
html[data-theme="light"] .theme-toggle-btn:hover {
    background-color: rgba(31, 79, 110, 0.22);
}

/* ========== Light mode overrides ========== */
/* Light mode: default text dark across the app */
html[data-theme="light"] body,
html[data-theme="light"] .container,
html[data-theme="light"] .main-content,
html[data-theme="light"] .main-content p,
html[data-theme="light"] .main-content span,
html[data-theme="light"] .main-content div,
html[data-theme="light"] .main-content td,
html[data-theme="light"] .main-content th,
html[data-theme="light"] .main-content li,
html[data-theme="light"] .main-content label,
html[data-theme="light"] .main-content input,
html[data-theme="light"] .main-content textarea {
    color: #1a1a1a;
}
html[data-theme="light"] .container,
html[data-theme="light"] .main-content {
    background-color: #f0f4f8;
}
html[data-theme="light"] .sidebar {
    background-color: #e8eef4;
    border-right: 1px solid #d0d8e0;
}
html[data-theme="light"] .nav-links button {
    background-color: #fff;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
}
html[data-theme="light"] .nav-links button:hover {
    background-color: #e8eef4;
    border-color: var(--accent-color);
}
html[data-theme="light"] .nav-links button.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
html[data-theme="light"] .nav-links button.active .nav-icon {
    filter: brightness(0) invert(1);
}
html[data-theme="light"] .nav-icon {
    filter: brightness(0);
}
html[data-theme="light"] .brand-name,
html[data-theme="light"] .main-content h1 {
    color: #1a1a1a;
}
html[data-theme="light"] .kpi-card {
    background-color: #09B4BB;;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .kpi-title,
html[data-theme="light"] .kpi-value {
    color: #000;
}
html[data-theme="light"] .chart-card,
html[data-theme="light"] .panel {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    color: #1a1a1a;
}
html[data-theme="light"] .chart-card h3,
html[data-theme="light"] .charts-container h3 {
    color: #000 !important;
}
html[data-theme="light"] .user-card {
    background-color: #fff;
    color: #1a1a1a;
    border-color: #e0e0e0;
}
html[data-theme="light"] .user-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(31, 79, 110, 0.15);
}
html[data-theme="light"] .user-card.disabled {
    background-color: #f5f5f5;
    border-color: #e0e0e0;
}
html[data-theme="light"] .user-card h3,
html[data-theme="light"] .user-card-header h3 {
    color: #1a1a1a;
}
html[data-theme="light"] .user-card.disabled h3 {
    color: #888;
}
html[data-theme="light"] .user-card-role,
html[data-theme="light"] .user-card-modules {
    color: #444;
}
html[data-theme="light"] .orders-table-container {
    border-color: #d0d8e0;
    background-color: #fff;
}
html[data-theme="light"] .orders-table thead {
    background-color: #e8eef4;
}
html[data-theme="light"] .orders-table th {
    color: var(--secondary-color);
    border-bottom-color: #d0d8e0;
}
html[data-theme="light"] .orders-table tbody tr {
    border-bottom-color: #eee;
}
html[data-theme="light"] .orders-table tbody tr:hover {
    background-color: rgba(38, 177, 186, 0.08);
}
html[data-theme="light"] .orders-table td {
    color: #1a1a1a;
}
html[data-theme="light"] .table-box {
    background-color: #fff;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
}
html[data-theme="light"] .table-box.has-order {
    border-color: #4caf50;
}
html[data-theme="light"] .menu-item {
    background-color: #fff;
    color: #1a1a1a;
    border: 1px solid #e8eef4;
}
html[data-theme="light"] .menu-item:hover {
    background-color: rgba(38, 177, 186, 0.1);
}
html[data-theme="light"] .user-search-input {
    background-color: #fff;
    border-color: #d0d8e0;
    color: #1a1a1a;
}
html[data-theme="light"] .user-search-input:focus {
    border-color: var(--accent-color);
}
html[data-theme="light"] .finance-filters {
    background-color: #fff;
    border: 1px solid #e0e0e0;
}
html[data-theme="light"] .finance-filters .filter-group label,
html[data-theme="light"] .finance-filters .finance-time-label {
    color: #1a1a1a;
}
html[data-theme="light"] .modal-content {
    background-color: #fff;
    border-color: #d0d8e0;
}
html[data-theme="light"] .modal-header {
    border-bottom-color: #e0e0e0;
}
html[data-theme="light"] .form-group label,
html[data-theme="light"] .form-group .checkbox-label {
    color: #1a1a1a;
}
html[data-theme="light"] .form-group input {
    background-color: #fff;
    border-color: #d0d8e0;
    color: #1a1a1a;
}
html[data-theme="light"] .waiter-toolbar .user-search-input {
    background-color: #fff;
    color: #1a1a1a;
}
html[data-theme="light"] .orders-table-container::-webkit-scrollbar-track {
    background: #e8eef4;
}
html[data-theme="light"] .orders-table-container::-webkit-scrollbar-thumb {
    background: #b0b8c0;
}
html[data-theme="light"] .orders-table-container::-webkit-scrollbar-thumb:hover {
    background: #5E7386;
}

/* Takeaway orders table section: visible in both modes */
.takeaway-orders-table-section h2 {
    color: #eee;
}
.takeaway-orders-table-section > .finance-collapsible-summary .finance-collapsible-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #eee;
}
.takeaway-orders-table-section .orders-table-container {
    background-color: #1a1a1a;
    border: 1px solid #2A2A2A;
}
.takeaway-orders-table-section .orders-table thead {
    background-color: #2A2A2A;
}
.takeaway-orders-table-section .orders-table th {
    color: #aaa;
    border-bottom-color: #444;
}
.takeaway-orders-table-section .orders-table td {
    color: #eee;
}
.takeaway-orders-table-section .orders-table tbody tr {
    border-bottom-color: rgba(255,255,255,0.1);
}
.takeaway-orders-table-section .orders-table tbody tr:hover {
    background-color: rgba(31, 79, 110, 0.25);
}
html[data-theme="light"] .takeaway-orders-table-section h2,
html[data-theme="light"] .takeaway-orders-table-section > .finance-collapsible-summary .finance-collapsible-title {
    color: #1a1a1a !important;
}
html[data-theme="light"] .takeaway-orders-table-section .orders-table-container {
    background-color: #fff;
    border-color: #d0d8e0;
}
html[data-theme="light"] .takeaway-orders-table-section .orders-table thead {
    background-color: #e8eef4;
}
html[data-theme="light"] .takeaway-orders-table-section .orders-table th {
    color: var(--secondary-color);
    border-bottom-color: #d0d8e0;
}
html[data-theme="light"] .takeaway-orders-table-section .orders-table td {
    color: #1a1a1a;
}
html[data-theme="light"] .takeaway-orders-table-section .orders-table tbody tr {
    border-bottom-color: #eee;
}
html[data-theme="light"] .takeaway-orders-table-section .orders-table tbody tr:hover {
    background-color: rgba(38, 177, 186, 0.08);
}

/* Override inline white/gray text in main content for light mode */
html[data-theme="light"] .main-content h1,
html[data-theme="light"] .main-content h2,
html[data-theme="light"] .main-content h3,
html[data-theme="light"] .main-content h4 {
    color: #1a1a1a !important;
}
html[data-theme="light"] .main-content label {
    color: #333 !important;
}
html[data-theme="light"] .main-content input[type="text"],
html[data-theme="light"] .main-content input[type="number"],
html[data-theme="light"] .main-content textarea {
    background-color: #fff !important;
    border-color: #d0d8e0 !important;
    color: #1a1a1a !important;
}
html[data-theme="light"] .main-content [style*="color: white"],
html[data-theme="light"] .main-content [style*="color:white"] {
    color: #1a1a1a !important;
}
html[data-theme="light"] .main-content [style*="background-color: #121212"] {
    background-color: #fff !important;
}
html[data-theme="light"] .main-content [style*="background-color:#121212"] {
    background-color: #fff !important;
}
html[data-theme="light"] .main-content [style*="background: #2a2a2a"],
html[data-theme="light"] .main-content [style*="background-color: #2A2A2A"] {
    background-color: #f0f4f8 !important;
    border-color: #d0d8e0 !important;
}

/* Make the whole page stretch full viewport height */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Dark mode: default text white/light across the app */
body,
.container,
.main-content,
.main-content p,
.main-content span,
.main-content div,
.main-content td,
.main-content th,
.main-content li,
.main-content label,
.main-content input,
.main-content textarea {
    color: #eee;
}

/* Keep native date picker icon visible in dark mode across modules (not Finance: those use .date-input + custom 📅) */
input[type="date"]:not(.date-input)::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.25);
    opacity: 0.95;
    cursor: pointer;
}
html[data-theme="light"] input[type="date"]:not(.date-input)::-webkit-calendar-picker-indicator {
    filter: none;
    opacity: 0.75;
}

/* Main container: sidebar + content */
.container {
    display: flex;
    min-height: 100vh;
    /* ensures it fills the viewport */
    background-color: #121212;
    /* match sidebar background to avoid white gaps */
}

.sidebar {
    width: 255px;
    /* adjust as needed */
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* key: full height */
    padding: 20px;
    box-sizing: border-box;
}

.sidebar .logo {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin-bottom: 12px;
}

.nav-links button {
    width: 100%;
    padding: 10px 12px;
    background-color: #2A2A2A;
    border: none;
    border-radius: 8px;
    color: #eee;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
}

.nav-links button:hover {
    background-color: #3E3E3E;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    background-color: #121212;
}

.dashboard-heading {
    margin-bottom: 20px;
}
.dashboard-tenant-name {
    margin: 4px 0 0 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
}
html[data-theme="light"] .dashboard-tenant-name {
    color: var(--secondary-color);
}

/* KPI Cards */
.kpi-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.kpi-card {
    background-color: #2A2A2A;
    border-radius: 12px;
    padding: 16px;
    flex: 1;
    min-width: 180px;
    display: flex;
    justify-content: space-around;
}

.kpi-title {
    font-size: 15px;
    color: #000;
}

.kpi-value {
    font-size: 18px;
    font-weight: bold;
    margin-top: 8px;
    color: #000;
}

/* Generic badges (used for subscription status) */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-status-active {
    background-color: #2e7d32;
    color: #fff;
}
.badge-status-warning {
    background-color: #f9a825;
    color: #121212;
}
.badge-status-danger {
    background-color: #c62828;
    color: #fff;
}
.badge-status-unknown {
    background-color: #616161;
    color: #fff;
}


/* Charts */
.charts-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.chart-card {
    background-color: #2A2A2A;
    border-radius: 12px;
    padding: 16px;
    flex: 1;
    min-width: 300px;
}

.chart-card-collapsible {
    width: 100%;
}

/* Dashboard yearly chart: same collapsible row as Finance (title + chevron) */
.chart-card-collapsible > .finance-collapsible-summary {
    margin: 0 0 2px 0;
}

.chart-canvas-wrap {
    position: relative;
    height: 350px;
    width: 100%;
}
html[data-theme="light"] .chart-canvas-wrap {
    background-color: #fff;
}
.chart-card h3,
.charts-container h3 {
    color: #eee;
}

/* Bottom Panels */
.bottom-panels {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.panel {
    background-color: #2A2A2A;
    border-radius: 10px;
    padding: 10px;
    flex: 1;
    min-width: 220px;
}

.panel.low-stock h3 {
    color: #ff5555;
}

.panel h3 {
    margin-top: 0;
}

.panel ul {
    padding-left: 20px;
}

/* Brand / Logo */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

/* Company logo (exact-size crop, white background) */
.brand-logo-wrap {
    width: 210px;
    height: auto;
    min-height: 60px;
    margin-bottom: 20px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    padding: 8px;
    box-sizing: border-box;
}
.brand-logo-wrap .brand-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}

.brand-name {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

/* Icons in sidebar buttons */
.nav-links .icon {
    margin-right: 8px;
}

.nav-links button.active {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: bold;
}

.nav-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    margin-right: 10px;
    filter: brightness(0) invert(1);
    /* white icons */
}

/* Align icon + text */
.nav-links button {
    display: flex;
    align-items: center;
}

.nav-links button:hover .nav-icon {
    transform: scale(1.1);
}

.nav-links button.active {
    background-color: var(--primary-color);
    color: #fff;
}

.nav-links button.active .nav-icon {
    filter: none;
    /* show original icon color */
}

/* Orders Table Container - Scrollable with Fixed Header */
.orders-table-container {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #2A2A2A;
}

.orders-table-container::-webkit-scrollbar {
    width: 8px;
}

.orders-table-container::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.orders-table-container::-webkit-scrollbar-thumb {
    background: black;
    border-radius: 4px;
}

.orders-table-container::-webkit-scrollbar-thumb:hover {
    background: #dddddd;
}

/* Orders Table */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    position: relative;
}

.orders-table thead {
    background-color: #2A2A2A;
    position: sticky;
    top: 0;
    z-index: 10;
}

.orders-table th,
.orders-table td {
    padding: 12px;
    text-align: left;
}

.orders-table th {
    color: #aaa;
    font-weight: 600;
    border-bottom: 2px solid black;
}

.orders-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.orders-table tbody tr:hover {
    background-color: rgba(31, 79, 110, 0.25);
}

.orders-table td {
    color: #eee;
}

.tables-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.table-box {
    background-color: #1e1e1e;
    color: #fff;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.table-box.has-order {
    border: 2px solid #4caf50;
}

.table-box.has-order:hover {
    border-color: #45a049;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 140px;
}

.table-box:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.5);
}

.table-box h2 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.table-box p {
    margin: 2px 0;
    font-size: 14px;
}

.table-status {
    font-weight: bold;
}

.table-status.served {
    color: #4caf50;
}

.table-status.pending {
    color: #ff9800;
}

.customer-info {
    margin-bottom: 20px;
}

/* Row-wise layout: all fields in one horizontal row */
.customer-info-rows {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
}
.customer-info-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 180px;
}
.customer-info-row label {
    color: #eee;
    font-size: 14px;
    margin: 0;
}
.customer-info-row input,
.customer-info-row textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #2A2A2A;
    background-color: #2A2A2A;
    color: #eee;
    font-size: 14px;
    box-sizing: border-box;
}
.customer-info-row textarea {
    min-height: 56px;
    resize: vertical;
    font-family: inherit;
}
html[data-theme="light"] .customer-info-row label {
    color: #1a1a1a;
}
html[data-theme="light"] .customer-info-row input,
html[data-theme="light"] .customer-info-row textarea {
    background-color: #fff;
    border-color: #d0d8e0;
    color: #1a1a1a;
}

.customer-info input {
    padding: 8px;
    width: 300px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #333;
    background-color: white;
    color: black;
}

.menu-section {
    margin-bottom: 20px;
}

.menu-search {
    padding: 8px;
    width: 300px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #333;
    background-color: white;
    color: black;
    margin-bottom: 10px;
}

.menu-item {
    background-color: ghostwhite;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.menu-item:hover {
    background-color: rgba(31, 79, 110, 0.25);
}

.order-summary {
    margin-top: 20px;
}

.selected-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.selected-items-table th,
.selected-items-table td {
    padding: 8px;
    border-bottom: 1px solid white;
    text-align: left;
    font-size: 14px;
}

.total-bill {
    font-weight: bold;
    margin-bottom: 15px;
    color: ghostwhite;
}

#placeOrderBtn {
    padding: 10px 20px;
    background-color: #ff9800;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
}

#placeOrderBtn:hover {
    background-color: #e68a00;
}

.customer-info input {
    padding: 8px;
    width: 300px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #333;
    background-color: #1e1e1e;
    color: #fff;
    display: block;
    margin-bottom: 10px;
}

.menu-form {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.menu-form input {
    padding: 8px;
    font-size: 14px;
}

.menu-form button {
    padding: 8px 12px;
    cursor: pointer;
}

.menu-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.menu-card {
    /* background-color: #1A1A1A; */
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #2A2A2A;
    transition: all 0.3s ease;
    position: relative;
}

.menu-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(38, 177, 186, 0.25);
}

.menu-card.disabled {
    opacity: 0.5;
    background-color: #0f0f0f;
    border-color: #1a1a1a;
}

.menu-card.disabled:hover {
    border-color: #2A2A2A;
    transform: none;
    box-shadow: none;
}

.menu-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.menu-card h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    flex: 1;
}

.menu-card.disabled h3 {
    color: #888;
}

.menu-status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.menu-status-badge.available {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.menu-status-badge.unavailable {
    background-color: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.menu-card-category {
    color: #aaa;
    margin: 8px 0;
    font-size: 14px;
}

.menu-card.disabled .menu-card-category {
    color: #555;
}

.menu-card-price {
    color: #4caf50;
    font-size: 16px;
    font-weight: bold;
    margin: 8px 0;
}

.menu-card.disabled .menu-card-price {
    color: #666;
}

.card-actions {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.card-actions button {
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s;
    flex: 1;
    min-width: calc(50% - 4px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-actions .btn-toggle {
    background-color: #ff9800;
}

.card-actions .btn-toggle:hover {
    background-color: #f57c00;
}

.card-actions .btn-delete {
    background-color: #f44336;
}

.card-actions .btn-delete:hover {
    background-color: #d32f2f;
}

.menu-search-container {
    margin-bottom: 20px;
}

.menu-search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 8px;
    border: 2px solid #1A1A1A;
    background-color: #1A1A1A;
    color: #fff;
    transition: all 0.3s ease;
}

.menu-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(38, 177, 186, 0.2);
}

.menu-search-input::placeholder {
    color: #666;
}

.menu-form {
    /* background-color: #2A2A2A; */
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* User Management Styles */
.user-form {
    background-color: #2A2A2A;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.user-form input,
.user-form select {
    padding: 10px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #1A1A1A;
    background-color: #1A1A1A;
    color: #fff;
    flex: 1;
    min-width: 150px;
}

.user-form input:focus,
.user-form select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.user-form button {
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    transition: all 0.2s;
}

.user-form #add-update-btn {
    background-color: #4caf50;
    color: #fff;
}

.user-form #add-update-btn:hover {
    background-color: #45a049;
}

.user-form #add-update-btn.btn-update {
    background-color: #ff9800;
}

.user-form #add-update-btn.btn-update:hover {
    background-color: #f57c00;
}

.user-form #clear-btn {
    background-color: #666;
    color: #fff;
}

.user-form #clear-btn:hover {
    background-color: #555;
}

.user-search-container {
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    padding-right: 10px
}

.user-search-input {
    width: 96.5%;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 8px;
    border: 2px solid #1A1A1A;
    background-color: #1A1A1A;
    color: #fff;
    transition: all 0.3s ease;
}

.user-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(38, 177, 186, 0.2);
}

.user-search-input::placeholder {
    color: #666;
}

.waiter-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.waiter-toolbar .user-search-input {
    flex: 1;
    min-width: 200px;
}
.waiter-toolbar .btn-primary {
    flex-shrink: 0;
}

.waiters-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.waiters-list .user-card {
    margin: 0;
}

.users-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.user-card {
    background-color: #1A1A1A;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #2A2A2A;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.user-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(38, 177, 186, 0.25);
}

.user-card.disabled {
    opacity: 0.5;
    background-color: #0f0f0f;
    border-color: #1a1a1a;
}

.user-card.disabled:hover {
    border-color: #2A2A2A;
    transform: none;
    box-shadow: none;
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.user-card h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    flex: 1;
}

.user-card.disabled h3 {
    color: #888;
}

.user-status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.user-status-badge.active {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.user-status-badge.inactive {
    background-color: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.user-card-role {
    color: #aaa;
    margin: 8px 0;
    font-size: 14px;
}

.user-card.disabled .user-card-role {
    color: #555;
}

.user-card-modules {
    color: #4caf50;
    font-size: 14px;
    margin: 8px 0;
}

.user-card.disabled .user-card-modules {
    color: #666;
}

.card-actions .btn-modules {
    background-color: #2196F3;
}

.card-actions .btn-modules:hover {
    background-color: #1976D2;
}

.card-actions .btn-edit {
    background-color: #4caf50;
}

.card-actions .btn-edit:hover {
    background-color: #45a049;
}

/* Module Access Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #1A1A1A;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #2A2A2A;
}

.modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 20px;
}

.modal-body {
    padding: 30px;
}

.modal-body p {
    color: #aaa;
    margin-bottom: 20px;
}

.module-access-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.module-checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: #2A2A2A;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.module-checkbox-label:hover {
    background-color: #333;
}

.module-checkbox {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.module-checkbox-label span {
    color: #fff;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-actions button {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-actions .btn-secondary {
    background-color: #666;
    color: #fff;
}

.modal-actions .btn-secondary:hover {
    background-color: #555;
}

.modal-actions .btn-primary {
    background-color: #4caf50;
    color: #fff;
}

.modal-actions .btn-primary:hover {
    background-color: #45a049;
}

.menu-form input {
    padding: 10px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #1A1A1A;
    background-color: #1A1A1A;
    color: #fff;
    flex: 1;
    min-width: 150px;
}

.menu-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.menu-form button {
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    transition: all 0.2s;
}

.menu-form #add-update-btn {
    background-color: #4caf50;
    color: #fff;
}

.menu-form #add-update-btn:hover {
    background-color: #45a049;
}

.menu-form #add-update-btn.btn-update {
    background-color: #ff9800;
}

.menu-form #add-update-btn.btn-update:hover {
    background-color: #f57c00;
}

.menu-form #clear-btn {
    background-color: #666;
    color: #fff;
}

.menu-form #clear-btn:hover {
    background-color: #555;
}

.menu-form-row {
    display: flex;
    align-items: center;
    width: 100%;
}
.menu-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    cursor: pointer;
}
.menu-checkbox-label input { width: auto; min-width: auto; }

.deal-items-section {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    /* background: #1A1A1A; */
    border-radius: 6px;
    border: 1px solid #333;
}
.deal-items-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #333;
    color: #fff;
}
.deal-items-list-item:last-child { border-bottom: none; }
.deal-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}
.deal-add-row select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: #fff;
    min-width: 180px;
}
.deal-add-row input { min-width: 60px; }
.btn-deal-add {
    padding: 8px 12px;
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}
.btn-deal-add:hover { background: #45a049; }
.btn-deal-remove {
    padding: 4px 8px;
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.btn-deal-remove:hover { background: #d32f2f; }

/* Order Modal Styles */
.order-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.order-modal-content {
    background-color: #1e1e1e;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    overflow-x: hidden;
}

.order-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #2A2A2A;
    background-color: #2A2A2A;
    border-radius: 12px 12px 0 0;
}

.order-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
}

.order-modal-content h2 {
    padding: 20px 30px 10px 30px;
    margin: 0;
    color: #fff;
}

.close-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    margin: 12px 0px 0px 12px;
}

.close-modal:hover {
    color: #fff;
}

.order-modal-body {
    padding: 30px 40px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.order-modal-body::-webkit-scrollbar {
    width: 8px;
}

.order-modal-body::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.order-modal-body::-webkit-scrollbar-thumb {
    background: #4caf50;
    border-radius: 4px;
}

.order-modal-body::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}

/* Order Modal Layout */
.order-modal-body>div {
    display: grid;
    /* grid-template-columns: 1fr 1fr; */
    gap: 30px;
    margin-bottom: 20px;
}

.menu-section {
    grid-column: 1;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.menu-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #fff;
    font-size: 18px;
}

.menu-section .menu-items-grid {
    height: 500px !important;
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 10px;
    box-sizing: border-box;
    flex: none;
    min-height: 500px;
    max-height: 500px;
}

/* Menu Search Input */
.menu-search-input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    background-color: #2A2A2A;
    border: 2px solid #4caf50;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
}

.menu-search-input::placeholder {
    color: #aaa;
}

.menu-search-input:focus {
    outline: none;
    border-color: #45a049;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

.order-summary-section {
    grid-column: 2;
    background-color: #2A2A2A;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 0;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.order-summary-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #fff;
    font-size: 18px;
}

.order-details-section {
    grid-column: 1 / -1;
    background-color: #2A2A2A;
    padding: 20px 30px;
    border-radius: 8px;
    margin-bottom: 25px;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.order-info {
    max-width: 100%;
    overflow: hidden;
    /* display: flex; */
    flex-wrap: wrap;
    gap: 10px 10px;
    color: #fff;
}

.order-info p {
    margin: 8px 0;
    min-width: 0;
    flex: 1 1 auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.order-info p strong {
    display: inline-block;
    min-width: auto;
    margin-right: 8px;
}

.order-info p input,
.order-info p textarea {
    vertical-align: top;
}

@media (max-width: 768px) {
    .order-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .order-info p {
        width: 100%;
    }
    
    .order-info p strong {
        min-width: auto;
        display: block;
        margin-bottom: 5px;
    }
}

.status-cancelled {
    background-color: #f44336;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-pending {
    color: #ff9800;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-block;
    background-color: rgba(255, 152, 0, 0.2);
}

.status-completed {
    color: #4caf50;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-block;
    background-color: rgba(76, 175, 80, 0.2);
}

/* Menu Items Grid */
.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    box-sizing: border-box;
    min-height: 0;
    height: 500px;
}

.menu-item-card {
    /* background-color: #2A2A2A; */
    border: 2px solid #2A2A2A;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.menu-item-card:hover {
    border-color: #4caf50;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.menu-item-card.selected {
    border-color: #4caf50;
    background-color: rgba(76, 175, 80, 0.1);
}

.menu-item-name {
    font-weight: bold;
    color: #fff;
    font-size: 16px;
    margin-bottom: 5px;
}

.menu-item-category {
    color: #aaa;
    font-size: 12px;
    margin-bottom: 8px;
}

.menu-item-price {
    color: #4caf50;
    font-weight: bold;
    font-size: 14px;
}

.menu-item-qty {
    margin-top: 8px;
    color: #4caf50;
    font-weight: bold;
    font-size: 14px;
}

/* Selected Items List */
.selected-items-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    min-height: 0;
}

.selected-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #1e1e1e;
    border-radius: 6px;
    margin-bottom: 8px;
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-name {
    color: #fff !important;
    font-weight: bold;
    font-size: 14px;
}

.item-price {
    color: #aaa !important;
    font-size: 12px;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-qty {
    background-color: #4caf50;
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-qty:hover {
    background-color: #45a049;
}

.item-qty {
    color: #fff !important;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.btn-remove {
    background-color: #f44336;
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background-color: #d32f2f;
}

.order-total {
    padding: 15px 0;
    border-top: 2px solid #1e1e1e;
    margin-top: 15px;
    color: #fff;
    font-size: 18px;
}

.order-total strong {
    color: #4caf50;
}

.empty-message {
    color: #aaa;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.btn-primary {
    background-color: #4caf50;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #666;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #555;
}

.btn-warning {
    background-color: #ff9800;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-warning:hover {
    background-color: #f57c00;
}

.btn-success {
    background-color: #4caf50;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-success:hover {
    background-color: #45a049;
}

/* Takeaway Orders Layout */
.takeaway-order-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.takeaway-menu-section {
    grid-column: 1;
    padding: 20px;
}

.takeaway-menu-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #fff;
    font-size: 18px;
}

.takeaway-menu-section .menu-items-grid {
    height: 500px;
}

.takeaway-order-summary {
    grid-column: 2;
    background-color: #5555554a;
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 0;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.takeaway-order-summary h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #fff;
    font-size: 18px;
}

.takeaway-order-summary .selected-items-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    min-height: 400px;
}

.takeaway-order-summary .order-total {
    padding: 15px 0;
    border-top: 2px solid #1e1e1e;
    margin-top: 15px;
    color: #fff;
    font-size: 18px;
}

.takeaway-order-summary .order-total strong {
    color: #4caf50;
}

.takeaway-order-summary .modal-actions {
    margin-top: 20px;
}

.takeaway-order-summary .menu-items-grid {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Login Page Styles */
.login-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url("/static/assets/general/background.jpg") center/cover no-repeat;
    padding: 20px;
}

.login-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
}

.login-container .login-box {
    position: relative;
    z-index: 1;
}

/* Company logo on login (exact-size crop, white background) */
.login-logo-wrap {
    width: 160px;
    margin: 0 auto 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    padding: 12px;
    box-sizing: border-box;
}
.login-logo-wrap .login-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}

.login-box {
    background-color: chocolate;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 2px solid #2A2A2A;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 32px;
    margin: 0 0 10px 0;
    font-weight: bold;
}

.login-header p {
    color: whitesmoke;
    font-size: 16px;
    margin: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.form-group input {
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #2A2A2A;
    background-color: #121212;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(38, 177, 186, 0.2);
}

.form-group input::placeholder {
    color: #666;
}

.form-group .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #fff;
}
.form-group .checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.btn-login {
    padding: 14px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(38, 177, 186, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.error-message {
    margin-top: 15px;
    padding: 12px;
    background-color: white;
    border: 1px solid white;
    border-radius: 6px;
    color: red;
    text-align: center;
    font-size: 14px;
}

/* Finance Dashboard Styles */
.finance-filters {
    background-color: #2A2A2A;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.date-input-wrapper {
    position: relative;
    display: inline-block;
}

.date-input {
    padding: 10px 36px 10px 10px;
    border-radius: 6px;
    border: 1px solid #1A1A1A;
    /* background-color: #1A1A1A; */
    color: black !important;
    font-size: 14px;
    min-width: 150px;
}

/* Hide the native date input calendar icon - we use our own .date-calendar-icon */
.date-input-wrapper .date-input::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
    left: 0;
}
.date-input-wrapper .date-input::-webkit-date-and-time-value {
    text-align: left;
}
html[data-theme="light"] .finance-filters .date-input {
    color-scheme: light;
}

.date-calendar-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    opacity: 0.8;
    pointer-events: auto;
    user-select: none;
}

.date-calendar-icon:hover {
    opacity: 1;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.finance-time-label {
    margin-top: 6px;
    font-size: 13px !important;
    font-weight: 600;
}

.finance-time-hint {
    font-weight: 400;
    opacity: 0.75;
    font-size: 12px;
}

.finance-time-input {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #1A1A1A;
    color: black !important;
    font-size: 14px;
    min-width: 140px;
    box-sizing: border-box;
}

.finance-time-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

html[data-theme="light"] .finance-time-input {
    border-color: #ccc;
    background: #fff;
}

.btn-filter {
    padding: 10px 20px;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    height: fit-content;
    margin-top: 20px;
}

.btn-filter:hover {
    background-color: #45a049;
}

.btn-reset {
    padding: 10px 20px;
    background-color: #666;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    height: fit-content;
    margin-top: 20px;
}

.btn-reset:hover {
    background-color: #555;
}

/* Finance: collapsible items-sold & orders panels */
/* .finance-collapsible-panel {
    width: 100%;
} */

.finance-collapsible-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    margin: 0;
    padding: 4px 2px 10px 2px;
    user-select: none;
}

.finance-collapsible-summary::-webkit-details-marker {
    display: none;
}

.finance-collapsible-title {
    font-size: 1.17em;
    font-weight: bold;
    color: #eee;
    margin: 0;
    flex: 1;
    min-width: 0;
    text-align: left;
}

html[data-theme="light"] .finance-collapsible-title {
    color: #1a1a1a;
}

.finance-collapsible-chevron {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1;
    color: #ccc;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, background 0.15s ease;
}

.finance-collapsible-panel:not([open]) .finance-collapsible-chevron,
.chart-card-collapsible:not([open]) .finance-collapsible-chevron {
    transform: rotate(-90deg);
}

.finance-collapsible-panel[open] .finance-collapsible-chevron,
.chart-card-collapsible[open] .finance-collapsible-chevron {
    transform: rotate(0deg);
}

.finance-collapsible-summary:hover .finance-collapsible-chevron {
    background: rgba(255, 255, 255, 0.14);
}

html[data-theme="light"] .finance-collapsible-chevron {
    color: #444;
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .finance-collapsible-summary:hover .finance-collapsible-chevron {
    background: rgba(0, 0, 0, 0.1);
}

.finance-collapsible-inner {
    padding-top: 2px;
}

.finance-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    /* background-color: #1A1A1A; */
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #2A2A2A;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(38, 177, 186, 0.25);
}

.stat-card h3 {
    color: #aaa;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.stat-value {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

/* ========== Attendance page (dark + light) ========== */
.att-page-title {
    color: #fff;
    margin-top: 0;
}

html[data-theme="light"] .att-page-title {
    color: #1a1a1a !important;
}

.attendance-page .att-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(38, 177, 186, 0.25);
}

.attendance-page .att-tab {
    padding: 8px 22px;
    border: none;
    background: transparent;
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: 6px 6px 0 0;
    transition: background 0.15s, border-color 0.15s;
}

.attendance-page .att-tab:hover {
    background: rgba(38, 177, 186, 0.1);
}

.attendance-page .att-tab.active {
    border-bottom-color: var(--accent-color);
    background: rgba(38, 177, 186, 0.12);
}

html[data-theme="light"] .attendance-page .att-tabs {
    border-bottom-color: #d0d8e0;
}

html[data-theme="light"] .attendance-page .att-tab {
    color: var(--primary-color);
}

html[data-theme="light"] .attendance-page .att-tab:hover {
    background: rgba(31, 79, 110, 0.08);
}

html[data-theme="light"] .attendance-page .att-tab.active {
    border-bottom-color: var(--accent-color);
    background: rgba(38, 177, 186, 0.12);
}

.attendance-page .att-panel {
    display: none;
}

.attendance-page .att-panel.active {
    display: block;
}

/* Filter toolbar (matches finance-filters) */
.attendance-page .att-filter-bar {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

html[data-theme="light"] .attendance-page .att-filter-bar {
    background-color: #fff;
    border: 1px solid #e0e0e0;
}

.attendance-page .att-filter-bar .filter-group label {
    color: #eee;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

html[data-theme="light"] .attendance-page .att-filter-bar .filter-group label {
    color: #1a1a1a;
}

/* Inputs & selects — same family as user-search-input */
.attendance-page .att-input {
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 8px;
    border: 2px solid #1a1a1a;
    background-color: #1a1a1a;
    color: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.attendance-page .att-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(38, 177, 186, 0.2);
}

.attendance-page .att-input::placeholder {
    color: #666;
}

/* Ensure native date-picker icon stays visible in dark mode */
.attendance-page input.att-input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.95;
    filter: invert(1) brightness(1.2);
    cursor: pointer;
}

html[data-theme="light"] .attendance-page input.att-input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none;
    opacity: 0.75;
}

.attendance-page .att-input--date {
    min-width: 160px;
}

.attendance-page .att-input--date-sm {
    min-width: 150px;
}

.attendance-page .att-input--hist-emp {
    min-width: 200px;
}

.attendance-page select.att-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aaa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
    cursor: pointer;
}

.attendance-page select.att-input option {
    background: #1a1a1a;
    color: #fff;
}

html[data-theme="light"] .main-content.attendance-page .att-input,
html[data-theme="light"] .main-content.attendance-page select.att-input {
    background-color: #fff !important;
    border-color: #d0d8e0 !important;
    color: #1a1a1a !important;
}

html[data-theme="light"] .main-content.attendance-page select.att-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

html[data-theme="light"] .main-content.attendance-page select.att-input option {
    background: #fff;
    color: #1a1a1a;
}

/* Employee form row */
.attendance-page .att-emp-form {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

html[data-theme="light"] .attendance-page .att-emp-form {
    background-color: #fff;
    border: 1px solid #e0e0e0;
}

.attendance-page .att-emp-form .att-input--grow {
    flex: 1;
    min-width: 140px;
}

.attendance-page .att-emp-form .att-input--grow:nth-child(2) {
    flex: 2;
    min-width: 150px;
}

.attendance-page .att-emp-form #emp-save-btn.btn-update {
    background-color: #ff9800;
}

.attendance-page .att-emp-form #emp-save-btn.btn-update:hover {
    background-color: #f57c00;
}

.attendance-page .att-checkbox-label {
    color: #eee;
    white-space: nowrap;
}

html[data-theme="light"] .attendance-page .att-checkbox-label {
    color: #1a1a1a;
}

.attendance-page .att-search-wrap {
    margin-bottom: 16px;
}

.attendance-page .att-emp-search {
    max-width: 400px;
    width: 100%;
}

.att-text-muted {
    opacity: 0.75;
    color: inherit;
}

.att-emp-cards-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    margin: 0;
}

/* Notice banner */
.att-today-notice {
    font-size: 13px;
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(38, 177, 186, 0.12);
    border: 1px solid rgba(38, 177, 186, 0.35);
    color: var(--accent-color);
}

html[data-theme="light"] .att-today-notice {
    background: rgba(38, 177, 186, 0.08);
    color: var(--primary-color);
}

.att-today-notice.denied {
    background: rgba(231, 76, 60, 0.12);
    border-color: rgba(231, 76, 60, 0.4);
    color: #e74c3c;
}

html[data-theme="light"] .att-today-notice.denied {
    background: rgba(231, 76, 60, 0.08);
    color: #c0392b;
}

/* Tables — align with .orders-table */
.attendance-page .att-table-wrap {
    overflow-x: auto;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

html[data-theme="light"] .attendance-page .att-table-wrap {
    border-color: #d0d8e0;
    background-color: #fff;
}

.attendance-page .att-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.attendance-page .att-table thead {
    background-color: #2a2a2a;
}

html[data-theme="light"] .attendance-page .att-table thead {
    background-color: #e8eef4;
}

.attendance-page .att-table th,
.attendance-page .att-table td {
    padding: 12px;
    text-align: left;
}

.attendance-page .att-table th {
    color: #aaa;
    font-weight: 600;
    border-bottom: 2px solid #000;
    white-space: nowrap;
}

html[data-theme="light"] .attendance-page .att-table th {
    color: var(--secondary-color);
    border-bottom-color: #d0d8e0;
}

.attendance-page .att-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .attendance-page .att-table tbody tr {
    border-bottom-color: #eee;
}

.attendance-page .att-table tbody tr:hover {
    background-color: rgba(31, 79, 110, 0.25);
}

html[data-theme="light"] .attendance-page .att-table tbody tr:hover {
    background-color: rgba(38, 177, 186, 0.08);
}

.attendance-page .att-table td {
    color: #eee;
    vertical-align: middle;
}

html[data-theme="light"] .attendance-page .att-table td {
    color: #1a1a1a;
}

.attendance-page .att-table-msg {
    text-align: center;
    padding: 24px;
}

.attendance-page .att-table-msg.att-table-msg--muted {
    opacity: 0.65;
}

.attendance-page .att-table-msg.att-table-msg--error {
    color: #e74c3c;
}

html[data-theme="light"] .attendance-page .att-table-msg.att-table-msg--error {
    color: #c0392b;
}

.attendance-page .att-col-muted {
    opacity: 0.75;
}

.attendance-page .att-nowrap {
    white-space: nowrap;
}

.attendance-page .att-notes-cell {
    font-size: 12px;
    opacity: 0.85;
}

.attendance-page .att-editing-hint {
    font-size: 11px;
    color: var(--accent-color);
    font-weight: 400;
}

html[data-theme="light"] .attendance-page .att-editing-hint {
    color: var(--primary-color);
}

.attendance-page .att-btn-cell {
    text-align: center;
    white-space: nowrap;
}

.attendance-page .att-btn-cell .btn-primary,
.attendance-page .att-btn-cell .btn-secondary {
    min-width: 88px;
    padding: 6px 12px;
    font-size: 12px;
}

.attendance-page .att-btn-cell button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Status badges */
.attendance-page .badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.attendance-page .badge-in {
    background: #27ae60;
    color: #fff;
}

.attendance-page .badge-out {
    background: #02969D;
    color: #fff;
}

.attendance-page .badge-absent {
    background: #444;
    color: #ccc;
}

html[data-theme="light"] .attendance-page .badge-absent {
    background: #e8eef4;
    color: #555;
    border: 1px solid #d0d8e0;
}

.attendance-page .badge-leave {
    background: #8e44ad;
    color: #fff;
}

html[data-theme="light"] .attendance-page .badge-leave {
    background: #e8daef;
    color: #5b2c6f;
    border: 1px solid #d2b4de;
}

.attendance-page .badge-day-absent {
    background: #c0392b;
    color: #fff;
}

html[data-theme="light"] .attendance-page .badge-day-absent {
    background: #fadbd8;
    color: #922b21;
    border: 1px solid #f5b7b1;
}

.attendance-page .att-summary-intro {
    font-size: 14px;
    opacity: 0.9;
    margin: 0 0 16px;
    line-height: 1.45;
}

html[data-theme="light"] .attendance-page .att-summary-intro {
    color: #333;
}

.attendance-page .att-mark-day-card {
    background-color: #2a2a2a;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

html[data-theme="light"] .attendance-page .att-mark-day-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
}

.attendance-page .att-mark-day-title {
    margin: 0 0 12px;
    font-size: 16px;
    color: #eee;
}

html[data-theme="light"] .attendance-page .att-mark-day-title {
    color: #1a1a1a;
}

.attendance-page .att-mark-day-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.attendance-page .att-mark-notes-wrap {
    flex: 1;
    min-width: 180px;
}

.attendance-page .att-mark-notes-wrap .att-input {
    width: 100%;
    max-width: 320px;
}

.attendance-page .att-summary-dates {
    font-size: 13px;
    line-height: 1.4;
    max-width: 220px;
}

/* Employee cards — match user-card */
.attendance-page .emp-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.attendance-page .emp-card {
    background-color: #1a1a1a;
    color: #fff;
    padding: 16px;
    border-radius: 10px;
    border: 2px solid #2a2a2a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.attendance-page .emp-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(38, 177, 186, 0.25);
}

.attendance-page .emp-card.emp-card--editing {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(38, 177, 186, 0.25);
}

html[data-theme="light"] .attendance-page .emp-card {
    background-color: #fff;
    color: #1a1a1a;
    border-color: #e0e0e0;
}

html[data-theme="light"] .attendance-page .emp-card:hover {
    border-color: var(--primary-color);
}

.attendance-page .emp-card h3 {
    margin: 0 0 6px;
    font-size: 15px;
    color: #fff;
}

html[data-theme="light"] .attendance-page .emp-card h3 {
    color: #1a1a1a;
}

.attendance-page .emp-card p {
    margin: 3px 0;
    font-size: 13px;
    color: #aaa;
}

html[data-theme="light"] .attendance-page .emp-card p {
    color: #444;
}

.attendance-page .emp-card .card-actions {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.attendance-page .emp-badge-active {
    background: #27ae60;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.attendance-page .emp-badge-inactive {
    background: #555;
    color: #ccc;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

html[data-theme="light"] .attendance-page .emp-badge-inactive {
    background: #e0e0e0;
    color: #666;
}

.attendance-page .hrs-good {
    color: #2ecc71;
    font-weight: 700;
}

.attendance-page .hrs-part {
    color: #f39c12;
    font-weight: 700;
}

html[data-theme="light"] .attendance-page .hrs-part {
    color: #d68910;
}

.attendance-page .pager {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 14px;
    font-size: 13px;
}

.attendance-page .pager .btn-primary,
.attendance-page .pager .btn-secondary {
    padding: 8px 14px;
    font-size: 13px;
}