/* UniDiPay Admin System - Complete Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-deep: #16348f;
    --secondary: #64748B;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --white: #FFFFFF;
    --surface: #FFFFFF;
    --surface-soft: #F8FAFF;
    --text-strong: #0F172A;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-strong);
    background: linear-gradient(180deg, #f5f8ff 0%, #edf3ff 100%);
}

/* Login Page */
.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 85% 15%, rgba(59, 130, 246, 0.28), transparent 35%),
        radial-gradient(circle at 15% 85%, rgba(29, 78, 216, 0.24), transparent 35%),
        linear-gradient(135deg, #1f4bc6 0%, #102a76 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 470px;
}

.login-card {
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 28px 60px -36px rgba(2, 6, 23, 0.7);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(125deg, #1f4bc6, #1d4ed8 55%, #1559b8);
    color: white;
    padding: 36px 32px 30px;
    text-align: center;
}

.logo {
    margin-bottom: 16px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.logo-img {
    width: 124px;
    height: 124px;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: 0 16px 24px -16px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 16px;
    opacity: 0.9;
}

.login-form {
    padding: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    user-select: none;
}

.toggle-password:hover {
    color: var(--primary-dark);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-footer {
    padding: 0 32px 32px;
    text-align: center;
}

.link-button {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.link-button:hover {
    color: var(--primary-dark);
}

.login-info {
    padding: 16px 32px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.login-info p {
    font-size: 12px;
    color: var(--gray-600);
}

.error-message {
    margin: 0 32px 24px;
    padding: 12px 16px;
    background: #FEE2E2;
    border: 1px solid #EF4444;
    border-radius: 8px;
    color: #991B1B;
    font-size: 14px;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 256px;
    background: linear-gradient(180deg, #17389f 0%, #0f2469 62%, #0a1a4c 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 40px -28px rgba(2, 6, 23, 0.65);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-deep);
    font-weight: 700;
    font-size: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px -14px rgba(0, 0, 0, 0.7);
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-title h2 {
    font-size: 20px;
    font-weight: 600;
}

.sidebar-title p {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-nav {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
    min-height: 44px;
    white-space: nowrap;
}

.nav-item i {
    width: 16px;
    text-align: center;
    opacity: 0.95;
    flex-shrink: 0;
}

.nav-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-50%);
    transition: height 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateX(2px);
}

.nav-item.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.nav-item.active::before {
    height: 20px;
    background: var(--primary);
}

.nav-item.nav-item-locked {
    position: relative;
    opacity: 0.68;
    border: 1px dashed rgba(255, 255, 255, 0.28);
    cursor: not-allowed;
    overflow: hidden;
}

.nav-item.nav-item-locked:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-item.nav-item-locked::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.18);
    pointer-events: none;
}

.nav-item.nav-item-coming-soon {
    position: relative;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    overflow: hidden;
    padding-right: 46px;
    background: rgba(14, 37, 112, 0.26);
}

.nav-item.nav-item-coming-soon span {
    max-width: none;
}

.nav-item.nav-item-coming-soon::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.38);
    pointer-events: none;
}

.nav-item.nav-item-coming-soon::before {
    display: none;
}

.nav-item.nav-item-coming-soon i {
    color: rgba(255, 255, 255, 0.95);
}

.nav-item.hidden,
.nav-item[style*="display: none"] {
    display: none !important;
}

.sidebar-footer {
    position: static;
    margin-top: auto;
    flex-shrink: 0;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 12px;
    opacity: 0.7;
}

/* Main Content */
.main-content {
    margin-left: 256px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 20px -18px rgba(2, 6, 23, 0.5);
    position: sticky;
    top: 0;
    z-index: 80;
}

.header-title h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-800);
}

.header-title p {
    font-size: 14px;
    color: var(--gray-600);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.content {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.content-section {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
.btn,
.btn-primary,
.btn-secondary,
.ghost-btn,
.filter-btn,
.pill-filter {
    min-height: 40px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.table-container {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: #fff;
}

.table-container table {
    min-width: 700px;
}

.modal-content {
    width: min(560px, calc(100vw - 24px));
}

.search-toolbar {
    align-items: stretch;
}

.search-container {
    min-width: 280px;
    flex: 1;
}

.pill-group {
    align-items: center;
}

.menu-item-combobox {
    position: relative;
}

.menu-item-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: 0 18px 28px -20px rgba(15, 23, 42, 0.6), 0 8px 18px -14px rgba(15, 23, 42, 0.45);
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
    z-index: 40;
    display: none;
}

.menu-item-dropdown.show {
    display: block;
}

.menu-item-option {
    width: 100%;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    text-align: left;
    color: var(--gray-800);
    min-height: auto;
}

.menu-item-option:hover {
    background: #eef4ff;
}

.menu-item-option.selected {
    background: #e0ecff;
    color: #123c97;
}

.menu-item-option-name {
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-item-option-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
    flex-shrink: 0;
}

.menu-item-empty {
    padding: 12px;
    color: var(--gray-600);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 1100px) {
    .header {
        padding: 14px 20px;
    }

    .content,
    .content-section {
        padding: 22px;
        gap: 22px;
    }

    .stats-grid {
        padding: 0 22px 14px;
        margin: 0 -22px;
        gap: 14px;
    }

    .stat-card {
        width: 206px;
        min-width: 206px;
        padding: 18px;
    }

    .card-details-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 220px;
    }

    .sidebar-nav {
        padding: 14px 10px;
        gap: 6px;
    }

    .nav-item {
        padding: 10px 12px;
        border-radius: 10px;
    }

    .header {
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .main-content {
        margin-left: 220px;
    }

    .content,
    .content-section {
        padding: 16px;
        gap: 16px;
    }

    .card-header,
    .card-body {
        padding: 14px;
    }

    .search-toolbar {
        gap: 10px;
    }

    .search-container {
        min-width: 0;
        width: 100%;
    }

    .pill-group {
        width: 100%;
        gap: 6px;
    }

    .filter-btn,
    .pill-filter {
        padding: 8px 12px;
    }

    .card-actions {
        flex-direction: column;
    }

    .card-actions .btn {
        width: 100%;
    }

    .menu-item-dropdown {
        max-height: 200px;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        box-shadow: none;
        border-right: 0;
    }

    .sidebar-header,
    .sidebar-footer {
        display: none;
    }

    .sidebar-nav {
        padding: 10px 12px;
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
    }

    .sidebar-nav::-webkit-scrollbar {
        height: 6px;
    }

    .sidebar-nav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.4);
        border-radius: 999px;
    }

    .nav-item {
        flex: 0 0 auto;
        min-width: max-content;
        margin: 0;
        padding: 9px 12px;
        border-radius: 999px;
        font-size: 13px;
    }

    .nav-item::before {
        display: none;
    }

    .nav-item.nav-item-coming-soon {
        padding-right: 36px;
    }

    .nav-item.nav-item-coming-soon span {
        max-width: none;
    }

    .nav-item.nav-item-coming-soon::before {
        display: none;
    }

    .nav-item:hover {
        transform: none;
    }

    .main-content {
        margin-left: 0;
    }

    .header {
        position: static;
    }

    .header-title h1 {
        font-size: 18px;
    }

    .header-actions {
        gap: 8px;
    }

    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        padding: 0 16px 12px;
        margin: 0 -16px;
    }

    .stat-card {
        width: 184px;
        min-width: 184px;
        padding: 14px;
    }

    .stat-value {
        font-size: 22px;
    }

    .modal {
        padding: 12px;
    }

    .modal-body,
    .modal-footer {
        padding: 16px;
    }
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 20px 40px -32px rgba(15, 23, 42, 0.35);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 20px;
}

/* Stats Grid */
.stats-grid {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 0 32px 16px 32px;
    margin: 0 -32px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.stats-grid::-webkit-scrollbar {
    height: 6px;
}

.stats-grid::-webkit-scrollbar-track {
    background: transparent;
}

.stats-grid::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.stats-grid::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.stat-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f4f7ff 100%);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 18px 40px -22px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(37, 99, 235, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;
    width: 220px;
    min-width: 220px;
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.12), transparent 32%),
                radial-gradient(circle at 10% 90%, rgba(16, 185, 129, 0.1), transparent 35%);
    pointer-events: none;
}

.stat-card-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.stat-card-clickable:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 46px -24px rgba(37, 99, 235, 0.45);
    border-color: rgba(37, 99, 235, 0.3);
}

.stat-card-clickable.active-filter {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(16, 185, 129, 0.08));
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 10px 20px -10px rgba(0,0,0,0.35);
}

.stat-icon svg {
    width: 26px;
    height: 26px;
}

.stat-icon i {
    font-size: 22px;
    line-height: 1;
}

.stat-icon.blue { background: var(--primary); }
.stat-icon.green { background: var(--success); }
.stat-icon.yellow { background: var(--warning); }
.stat-icon.purple { background: #8B5CF6; }
.stat-icon.emerald { background: #10B981; }

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

th {
    padding: 12px 24px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
}

tr:hover {
    background: var(--gray-50);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-purple {
    background: #EDE9FE;
    color: #6B21A8;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit {
    background: #DBEAFE;
    color: #1D4ED8;
}

.btn-edit:hover {
    background: #BFDBFE;
}

.btn-delete {
    background: #FEE2E2;
    color: #DC2626;
}

.btn-delete:hover {
    background: #FECACA;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.close-btn:hover {
    background: var(--gray-200);
}

.modal-body {
    padding: 24px;
}

/* Search Bar */
.search-bar {
    position: relative;
    margin-bottom: 24px;
}

.search-bar input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

/* Grid Layout */
.grid {
    display: grid;
    gap: 24px;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.hidden { display: none; }

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.3;
    font-size: 64px;
}

.empty-state p {
    color: var(--gray-600);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
    }
    
    .stats-grid {
        padding: 0 24px 12px 24px;
        margin: 0 -24px;
    }
    
    .content {
        padding: 24px;
    }

    .page-intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-toolbar {
        flex-direction: column;
    }

    .order-actions {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content {
        padding: 16px;
    }
    
    .stats-grid {
        padding: 0 16px 12px 16px;
        margin: 0 -16px;
    }
}

/* MENU GRID */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

/* MENU CARD */
.menu-card {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f6f9ff 100%);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(37, 99, 235, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px -28px rgba(37, 99, 235, 0.45);
}

.menu-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.menu-card .title {
    font-weight: 700;
    margin: 4px 0;
    font-size: 16px;
    color: #0f172a;
}

.menu-card .description {
    font-size: 13px;
    color: var(--gray-600);
    margin: 4px 0 10px;
    min-height: 34px;
}

.menu-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.menu-card .price {
    color: var(--primary);
    font-weight: 800;
    font-size: 17px;
}

.menu-card .category-badge {
    padding: 6px 10px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.menu-card .availability-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border: 1px dashed rgba(37, 99, 235, 0.12);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.02);
}

.menu-card .actions {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.actions button {
    border: none;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.actions .icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
}

.actions .icon-wrapper i {
    font-size: 14px;
}

.availability-row .status-text {
    font-size: 13px;
}

.btn-primary{
    background-color: #1D4ED8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover:not(:disabled) {
    background-color: #1E40AF;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.btn-edit {
    background: #DBEAFE;
    color: #1D4ED8;
}

.btn-delete {
    background: #FEE2E2;
    color: #DC2626;
}

/* --------------------------------------------- */
/* MENU FORM STYLING (Add/Edit menu item modal) */
/* --------------------------------------------- */

#menuForm {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#menuForm label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

#menuForm input,
#menuForm select,
#menuForm textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    background: var(--gray-50);
    transition: all 0.2s ease-in-out;
}

#menuForm input:focus,
#menuForm select:focus,
#menuForm textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#menuForm textarea {
    resize: none;
    min-height: 90px;
}

#menuForm button[type="submit"] {
    width: auto;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 8px;
}

#menuForm .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

#menuForm .form-actions .btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border-radius: 10px;
}

/* Modal enhancements */
.modal-content {
    padding: 0;
    animation: scaleIn 0.25s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-body {
    padding: 20px;
    background: var(--gray-50);
    border-radius: 0 0 12px 12px;
}

/* Better modal header */
.modal-header {
    background: var(--primary);
    color: white;
    padding: 18px 22px;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    transition: 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Improved menu controls alignment */
.menu-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#searchInput {
    flex: 1;
    min-width: 240px;
}

/* Put filters on the right nicely */
.menu-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 20px;
    border: none;
    background: var(--gray-200);
    color: var(--gray-700);
    cursor: pointer;
    transition: 0.2s;
}

.filter-btn:hover {
    background: var(--gray-300);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
}

/* Responsive menu modal */
@media (max-width: 480px) {
    #menuForm {
        gap: 10px;
    }

    #menuForm input,
    #menuForm select,
    #menuForm textarea {
        font-size: 13px;
        padding: 10px;
    }

    #menuForm .form-actions {
        grid-template-columns: 1fr;
    }
}

/* Availability Switch */
.availability {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.status-text {
    font-size: 14px;
    font-weight: 600;
}

.status-text.available {
    color: var(--success);
}

.status-text.unavailable {
    color: var(--danger);
}

/* Switch button */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}
/* Category label inside menu card */
/* --------------------------------------------- */
/* RFID Management STYLING */
/* --------------------------------------------- */

.page-header {
    margin-bottom: 32px;
    padding: 0;
}

.page-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.page-header p {
    font-size: 16px;
    color: var(--gray-600);
}

.nfc-search-card {
    margin-bottom: 24px;
}

.nfc-search-card .search-form {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 12px;
    width: 100%;
}

.nfc-search-card .search-input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: var(--gray-900);
    transition: all 0.2s ease;
}

.nfc-search-card .search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.nfc-search-card .search-input::placeholder {
    color: var(--gray-500);
}

.nfc-search-card .search-form .btn {
    width: 100%;
    height: 44px;
    padding: 0 24px;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .nfc-search-card .search-form {
        grid-template-columns: 1fr;
    }

    .nfc-search-card .search-input,
    .nfc-search-card .search-form .btn {
        width: 100%;
    }
}

.nfc-details-card {
    margin-bottom: 24px;
}

.card-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.detail-item span {
    font-size: 16px;
    color: var(--gray-900);
    font-weight: 500;
}

.balance-item span {
    font-size: 20px;
    font-weight: 700;
}

.balance-value {
    color: var(--primary);
}

.card-actions {
    display: flex;
    gap: 12px;
}

.card-actions .btn {
    flex: 1;
    padding: 12px 16px;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #D97706;
}

.nfc-history-card {
    margin-bottom: 24px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--gray-300);
    background: var(--gray-50);
}

.history-reload {
    border-left-color: var(--success);
    background: #F0FDF4;
}

.history-debit {
    border-left-color: var(--danger);
    background: #FEF2F2;
}

.history-transaction {
    border-left-color: var(--primary);
    background: #F0F9FF;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.history-type {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.history-date {
    font-size: 12px;
    color: var(--gray-600);
}

.history-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--gray-700);
}

.history-row .amount {
    font-weight: 600;
    color: var(--primary);
}

.empty-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state-card p {
    font-size: 16px;
    color: var(--gray-600);
}

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

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-600);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--gray-900);
}

.modal-body {
    padding: 24px;
}

.category-label {
    display: inline-block;
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin: 6px 0 4px 0;
    font-weight: 600;
    text-transform: capitalize;
}

/* Description text */
.description {
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 8px;
    min-height: 40px; /* keep cards evenly sized */
}

/* --------------------------------------------- */
/* ORDER MONITORING STYLING */
/* --------------------------------------------- */

.order-item {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    transition: all 0.25s ease;
    box-shadow: 0 18px 42px -28px rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
}

.order-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(37, 99, 235, 0.06), rgba(16, 185, 129, 0.06));
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.order-item:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 22px 50px -26px rgba(37, 99, 235, 0.45);
}

.order-item:hover::before {
    opacity: 1;
}

.order-item.order-item-cancelled {
    border: 1px solid rgba(239, 68, 68, 0.45);
    background: linear-gradient(145deg, #fff5f5 0%, #fff0f0 100%);
    box-shadow: 0 18px 42px -28px rgba(127, 29, 29, 0.35);
}

.order-item.order-item-cancelled::before {
    opacity: 1;
    background: linear-gradient(120deg, rgba(239, 68, 68, 0.08), rgba(248, 113, 113, 0.08));
}

.order-item.order-item-completed {
    border: 1px solid rgba(16, 185, 129, 0.45);
    background: linear-gradient(145deg, #f0fdf4 0%, #ecfdf5 100%);
    box-shadow: 0 18px 42px -28px rgba(6, 95, 70, 0.32);
}

.order-item.order-item-completed::before {
    opacity: 1;
    background: linear-gradient(120deg, rgba(16, 185, 129, 0.08), rgba(52, 211, 153, 0.08));
}

.order-readonly-flag {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 999px;
    padding: 3px 10px;
}

.order-readonly-flag-completed {
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
}

.order-item.order-item-cancelled .order-status-select,
.order-item.order-item-cancelled .btn-order-add,
.order-item.order-item-cancelled .btn-order-delete,
.order-item.order-item-cancelled .btn-item-delete {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.2);
}

.order-item.order-item-completed .order-status-select,
.order-item.order-item-completed .btn-order-add,
.order-item.order-item-completed .btn-order-delete,
.order-item.order-item-completed .btn-item-delete {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.2);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.order-info p {
    margin: 0;
    line-height: 1.3;
    color: var(--gray-600);
}

.order-info h4 {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.order-student {
    font-size: 13px;
    color: var(--gray-600);
    margin: 0;
}

.order-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.03);
    padding: 8px 10px;
    border-radius: 12px;
}

.order-total {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
}

.order-items {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px dashed rgba(37, 99, 235, 0.12);
}

.order-item-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 8px 0;
    color: var(--gray-700);
}

.order-item-row span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.order-item-row span:first-child::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.5);
    display: inline-block;
}

.order-item-row:not(:last-child) {
    border-bottom: 1px solid var(--gray-200);
}

.order-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: center;
    gap: 10px;
}

.order-status-select {
    padding: 10px 12px;
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
    color: var(--gray-800);
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 24px -18px rgba(37, 99, 235, 0.45);
}

.order-status-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.order-time {
    font-size: 12px;
    color: var(--gray-600);
    white-space: nowrap;
    justify-self: end;
}

.order-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-order-edit,
.btn-order-cash,
.btn-order-add,
.btn-order-delete {
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-order-edit {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
    box-shadow: 0 10px 24px -18px rgba(59, 130, 246, 0.6);
}

.btn-order-edit:hover {
    background: linear-gradient(135deg, #c7ddff, #a5c8ff);
}

.btn-order-cash {
    background: linear-gradient(135deg, #fef08a, #facc15);
    color: #78350f;
}

.btn-order-cash:hover {
    background: linear-gradient(135deg, #fde047, #fbbf24);
}

.btn-order-add {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #064e3b;
    box-shadow: 0 10px 22px -16px rgba(16, 185, 129, 0.6);
}

.btn-order-add:hover {
    background: linear-gradient(135deg, #6ee7b7, #34d399);
}

.btn-order-delete {
    background: linear-gradient(135deg, #fecdd3, #fca5a5);
    color: #7f1d1d;
}

.btn-order-delete:hover {
    background: linear-gradient(135deg, #fda4af, #fb7185);
}

.btn-item-delete {
    background: #FEE2E2;
    color: #991B1B;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    margin-left: 8px;
}

.btn-item-delete:hover {
    background: #FECACA;
}

.payment-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.payment-nfc {
    background: linear-gradient(135deg, #e0ecff, #cbdcfb);
    color: #1d4ed8;
}

.payment-cash {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.order-payment {
    font-size: 12px;
    color: var(--gray-600);
    margin: 4px 0 0 0;
}

/* --------------------------------------------- */
/* SEARCH BAR STYLING */
/* --------------------------------------------- */

.search-container {
    width: 100%;
    max-width: 620px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: var(--gray-900);
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--shadow);
}

.search-input::placeholder {
    color: var(--gray-600);
}
.btn-item-delete svg {
    width: 16px;
    height: 16px;
}

.search-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.btn-order-add .icon-wrapper,
.btn-order-delete .icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
}

.btn-order-add svg,
.btn-order-delete svg {
    width: 16px;
    height: 16px;
}

.btn-order-add .icon-wrapper i,
.btn-order-delete .icon-wrapper i {
    font-size: 14px;
}

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill-filter {
    border: 1px solid rgba(37, 99, 235, 0.2);
    background: #fff;
    color: #1f2937;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 10px 26px -22px rgba(15, 23, 42, 0.35);
}

.pill-filter:hover {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 14px 30px -22px rgba(37, 99, 235, 0.4);
}

.pill-filter.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(16, 185, 129, 0.16));
    color: #0f172a;
    border-color: rgba(37, 99, 235, 0.6);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.page-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.page-subtitle {
    color: var(--gray-600);
    margin-top: 6px;
    font-size: 14px;
}

.intro-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.live-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    color: #065f46;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.ghost-btn {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    color: #0f172a;
    padding: 9px 14px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 10px 26px -22px rgba(15, 23, 42, 0.35);
}

.ghost-btn:hover {
    border-color: rgba(37, 99, 235, 0.4);
    color: #1d4ed8;
    box-shadow: 0 14px 32px -22px rgba(37, 99, 235, 0.35);
}

/* --------------------------------------------- */
/* REPORTS PAGE STYLING */
/* --------------------------------------------- */

.date-input {
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: var(--gray-900);
}

.date-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.report-select {
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: var(--gray-900);
    cursor: pointer;
}

.report-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.report-summary {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 600;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
}

.reports-table thead {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

.reports-table th {
    padding: 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
}

.reports-table td {
    padding: 12px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
    color: var(--gray-900);
}

.reports-table tbody tr:hover {
    background: var(--gray-50);
}

.reports-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-info {
    background: #DBEAFE;
    color: #1D4ED8;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

/* Utility classes */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.mb-4 {
    margin-bottom: 16px;
}

/* --------------------------------------------- */
/* MODAL STYLING */
/* --------------------------------------------- */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray-600);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--gray-900);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 8px 0;
}

/* Employee Management Styles */
.employee-form {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.form-message.success {
    background: #ECFDF5;
    border: 1px solid #10B981;
    color: #065F46;
}

.form-message.error {
    background: #FEE2E2;
    border: 1px solid #EF4444;
    color: #991B1B;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions button {
    flex: 1;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
}

/* Employee Table */
.employee-table-container {
    overflow-x: auto;
}

.employees-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.employees-table thead {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

.employees-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

.employees-table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
}

.employees-table tbody tr:hover {
    background: var(--gray-50);
}

.actions-cell {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-icon.btn-edit {
    background: #EFF6FF;
    color: var(--primary);
}

.btn-icon.btn-edit:hover {
    background: #DBEAFE;
}

.btn-icon.btn-delete {
    background: #FEE2E2;
    color: var(--danger);
}

.btn-icon.btn-delete:hover {
    background: #FCA5A5;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-manager {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-staff {
    background: #DBEAFE;
    color: #0C4A6E;
}

.badge-cashier {
    background: #FEF3C7;
    color: #92400E;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.status-active {
    background: #ECFDF5;
    color: #065F46;
}

.status-badge.status-inactive {
    background: #F3F4F6;
    color: #374151;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray-600);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--gray-900);
}

.modal-body {
    padding: 24px;
}

/* Loading and Empty States */
.loading,
.empty-state,
.error-state {
    padding: 60px 20px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.loading p,
.empty-state p,
.error-state p {
    color: var(--gray-600);
    font-size: 16px;
}

.error-state {
    background: #FEE2E2;
    border: 1px solid var(--danger);
    border-radius: 8px;
    color: var(--danger);
}

.error-state p {
    color: inherit;
}

/* --------------------------------------------- */
/* ACTIVITY LOG STYLES */
/* --------------------------------------------- */

.activity-log-container {
    margin-top: 32px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.activity-log-container h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.activity-log-list {
    max-height: 250px;
    overflow-y: auto;
}

.activity-log-entry {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 13px;
    line-height: 1.5;
    color: var(--gray-700);
}

.activity-log-entry:last-child {
    border-bottom: none;
}

.activity-log-entry strong {
    color: var(--primary);
    font-weight: 600;
}

.activity-log-time {
    float: right;
    color: var(--gray-600);
    font-size: 11px;
    margin-left: 8px;
}

/* --------------------------------------------- */
/* PROFESSIONAL POLISH OVERRIDES */
/* --------------------------------------------- */

body {
    letter-spacing: 0.01em;
}

#adminName {
    padding: 7px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(29, 78, 216, 0.18));
    color: #0f2f78;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(37, 99, 235, 0.22);
}

.header-title h1 {
    font-size: 25px;
    letter-spacing: -0.015em;
    color: #0f1f4d;
}

.header-title p,
.page-subtitle {
    color: #4e5f87;
}

.btn,
.btn-primary,
.btn-secondary,
.ghost-btn,
.pill-filter,
.filter-btn {
    border-radius: 10px;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, #2153d9 0%, #1d4ed8 52%, #163fb7 100%);
    box-shadow: 0 14px 30px -18px rgba(29, 78, 216, 0.65);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1f4fcf 0%, #1a47c6 52%, #1339a8 100%);
    transform: translateY(-1px);
}

.btn-secondary,
.ghost-btn {
    border: 1px solid rgba(15, 23, 42, 0.09);
    background: #ffffff;
}

.btn-secondary:hover,
.ghost-btn:hover {
    border-color: rgba(37, 99, 235, 0.3);
}

.search-input,
.search-bar input,
#searchInput,
input[type='text'],
input[type='number'],
input[type='email'],
input[type='password'],
input[type='date'],
input[type='datetime-local'],
select,
textarea {
    border-radius: 10px;
    border-color: #d5ddef;
    background: #ffffff;
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.02);
}

.search-input:focus,
.search-bar input:focus,
#searchInput:focus,
input[type='text']:focus,
input[type='number']:focus,
input[type='email']:focus,
input[type='password']:focus,
input[type='date']:focus,
input[type='datetime-local']:focus,
select:focus,
textarea:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.table-container {
    border-radius: 14px;
}

thead,
.reports-table thead,
.employees-table thead {
    background: linear-gradient(180deg, #f6f9ff 0%, #edf3ff 100%);
}

th,
.reports-table th,
.employees-table th {
    color: #41516f;
    font-weight: 800;
}

tr:hover,
.reports-table tbody tr:hover,
.employees-table tbody tr:hover {
    background: #f7faff;
}

.card-header {
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.9), rgba(245, 248, 255, 0.9));
}

.modal {
    backdrop-filter: blur(3px);
}

.modal-content {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 24px 58px -30px rgba(2, 6, 23, 0.55);
}

.modal-header {
    background: linear-gradient(180deg, #f8fbff 0%, #f2f6ff 100%);
}

.sidebar-footer {
    font-size: 11px;
    letter-spacing: 0.02em;
}

.content,
.content-section {
    animation: fadeInUp 0.28s ease;
}

@keyframes fadeInUp {
    from {
        transform: translateY(6px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 14px 18px;
    }

    .header-title h1 {
        font-size: 20px;
    }

    #adminName {
        display: none;
    }
}

