*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --logo-height: 40px; /* Adjust this value to change the logo size globally */
}

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

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    font-size: 18px;
    min-width: 0;
}

.brand-name { font-weight: 700; text-transform: lowercase; }

.brand-tagline {
    font-size: 9px;
    font-weight: 400;
    text-transform: lowercase;
    white-space: normal;
    line-height: 1;
    margin-top: 1px;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #f4f6f9;
    color: #333;
    /* overflow-x:clip instead of hidden — clips without creating a new containing block
       so position:fixed children still anchor to the viewport correctly */
    overflow-x: clip;
    -webkit-tap-highlight-color: transparent;
}

body.modal-open {
    overflow: hidden;
}

/* Backdrop for modals on all devices */
body.modal-open::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1100;
    animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.hidden { display: none !important; }

/* Visibility Helpers */
.mobile-only { display: none !important; }
@media (max-width: 768px) { 
    .mobile-only { display: block !important; }
    .navbar.mobile-only,
    .sub-navbar.mobile-only {
        display: flex !important;
    }
    th.mobile-only, td.mobile-only { display: table-cell !important; }
    .desktop-only { display: none !important; } 
}
@media (min-width: 769px) { 
    .mobile-only { display: none !important; } 
    .desktop-only { display: block !important; } 
    th.desktop-only, td.desktop-only { display: table-cell !important; }
}

/* Layout */
#sidebar {
    width: 220px;
    background: #0A2E5C;
    color: white;
    height: 100vh;
    position: fixed;
    padding: 20px;
    overflow-y: auto;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: left 0.3s ease;
}

/* Custom Scrollbar for Sidebar */
#sidebar::-webkit-scrollbar { width: 5px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
#sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
#sidebar { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }

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

#sidebar h2 {
    margin-bottom: 25px;
}

#sidebar .sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #D4AF37;
    text-transform: uppercase;
    letter-spacing: 1px;
}
#sidebar .sidebar-logo img {
    height: var(--logo-height); /* Use the global variable for consistent sizing */
    width: var(--logo-height);
    border-radius: 50%;
    object-fit: cover;
}
#sidebar ul { list-style: none; padding: 0; }
#sidebar li { 
    padding: 18px 15px; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    cursor: pointer; 
    transition: background 0.2s; 
    font-size: 15px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
#sidebar li:hover { background: rgba(255,255,255,0.05); }

.mt-15 { margin-top: 15px !important; }
.mt-20 { margin-top: 20px !important; }
.mt-30 { margin-top: 30px !important; }
.mb-20 { margin-bottom: 20px !important; }
.text-center { text-align: center !important; }
.border-red-left { border-left: 5px solid #e74c3c; }
.border-yellow-left { border-left: 5px solid #f1c40f; }

@media (max-width: 768px) {
    #sidebar li {
        padding: 16px 15px;
        font-size: 14px;
        border-bottom-color: rgba(255,255,255,0.05);
    }
}

#nav-links {
    flex-grow: 1;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: center;
}

.logout-btn-sidebar {
    width: auto !important;
    padding: 10px 30px !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
}

.logout-btn-sidebar:hover {
    background: #e74c3c !important;
    border-color: #c0392b !important;
    color: white !important;
}

/* Sidebar Close Button */
.sidebar-close {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    color: white;
    display: none;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .sidebar-close {
        display: flex;
    }
}

#main-content {
    transition: margin-left 0.3s ease;
    margin-left: 220px;
    padding: 30px 30px 0px 30px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - 220px);
    min-width: 0;
}

@media (max-width: 768px) {
    #main-content {
        margin-left: 0;
        padding: 20px 15px 0 15px;
    }
}

header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
    gap: 15px;
}

header h2 { 
    flex-grow: 1; 
    margin: 0; 
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    min-width: 200px;
}

/* Hamburger Button */
.hamburger-btn {
    background: #fff;
    border: 1px solid #d7dee8;
    color: #0A2E5C;
    cursor: pointer;
    padding: 10px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #0A2E5C;
    border-radius: 999px;
}

/* Sub Navbar for Mobile */
.sub-navbar {
    background: white;
    padding: 5px 5%;
    border-bottom: 1px solid #ddd;
    display: none;
    justify-content: flex-start;
    align-items: center;
}

button {
    width: 100%;
    background: #0A2E5C;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* Dashboard Components */
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
    margin-bottom: 30px; 
}
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }

.stat-card { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.stat-card.gold { border-left: 5px solid #D4AF37; }
.stat-card h3 { margin: 0; font-size: 14px; color: #777; }
.stat-card p { margin: 10px 0 0; font-size: 20px; font-weight: bold; }

.plans-container { 
    display: grid; 
    gap: 20px; 
    padding: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

@media (min-width: 769px) {
    .plans-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .plans-container {
        grid-auto-flow: column;
        grid-auto-columns: min(78vw, 300px);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 20px 16px 40px;
        scroll-padding-left: 16px;
        scrollbar-width: none;
    }
    .plan-card { /* Enforce a minimum height for uniformity */
        min-height: 320px;
        justify-content: space-between; /* Distribute space vertically */
    }
    .plan-card .yield { /* Slightly smaller font for mobile */
        font-size: 18px;
    }
    .plan-card .plan-info { /* Slightly smaller font for mobile */
        font-size: 13px;
    }
    .plans-container::-webkit-scrollbar { display: none; }
    .swipe-hint { display: flex; }

    .landing-page .plans-container {
        grid-auto-columns: min(68vw, 260px);
    }
}

/* Swipe Hint for Mobile/Tablet */
.swipe-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: #0A2E5C;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
    opacity: 0.6;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}
.sidebar-overlay.active { display: block; }

.plan-card { 
    background: white; 
    padding: 25px; 
    border-radius: 16px; 
    cursor: pointer; 
    border: 1px solid #eee; 
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    scroll-snap-align: start;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-top: 4px solid #D4AF37;
}
.plan-card:hover { transform: translateY(-5px); }
.plan-card h4 { margin: 0; color: #0A2E5C; }
.yield { font-size: 20px; font-weight: bold; margin: 15px 0; color: #333; }

.plan-info { flex-grow: 1; font-size: 14px; color: #555; }
.features { list-style: none; padding: 0; margin: 15px 0; }
.features li { margin-bottom: 8px; }

.plan-btn {
    margin-top: 20px;
    padding: 12px;
    background: #0A2E5C;
    border-radius: 10px;
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    color: white !important;
    font-weight: bold;
    transition: 0.3s;
}

 .data-table { width: 100%; border-collapse: collapse; background: white; min-width: 700px; }
.data-table th, .data-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid #eee; white-space: nowrap; }
.data-table th { background: #f8f9fa; }
/* Allow wrapping in specific cells if needed */
.data-table td.wrap { white-space: normal; }
.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: inset 0 -1px 0 #eee; /* Maintain visual border while sticky */
}

.compact-users-table td {
    vertical-align: middle;
}

/* Table Responsiveness */
.table-responsive {
    width: 100%;
    max-height: 450px;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    /* Show scroll shadow on right edge when table overflows */
    background-image: linear-gradient(to right, white 30%, rgba(255,255,255,0)),
                      linear-gradient(to left,  white 30%, rgba(255,255,255,0)),
                      linear-gradient(to right, rgba(0,0,0,0.06), transparent),
                      linear-gradient(to left,  rgba(0,0,0,0.06), transparent);
    background-position: left center, right center, left center, right center;
    background-repeat: no-repeat;
    background-size: 40px 100%, 40px 100%, 10px 100%, 10px 100%;
    background-attachment: local, local, scroll, scroll;
}

@media (hover: none), (pointer: coarse) {
    .stat-card,
    .admin-panel,
    .dispute-card,
    .plan-card,
    .feature-card,
    .alert-item,
    .data-table,
    .permission-pill,
    .status-badge {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .plan-card:hover,
    .feature-card:hover {
        transform: none;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

    /* Adjust table body max-height for mobile */
    .data-table tbody {
        max-height: 250px;
    }


    .icon-btn::after,
    .staff-actions .icon-btn::after,
    .icon-actions .icon-btn::after {
        display: none;
    }

    .icon-btn,
    .staff-actions .icon-btn,
    .icon-actions .icon-btn {
        transition: none;
    }
}

.admin-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
}
@media (max-width: 1024px) { .admin-grid { grid-template-columns: 1fr; } }

.admin-grid > * { min-width: 0; }
.users-grid { grid-template-columns: 1fr; }
.all-users-grid { grid-template-columns: 1fr; }

/* Super Admin Console */
.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    min-width: 0;
}

@media (max-width: 768px) {
    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .admin-toolbar h1 { font-size: 22px; }
    .toolbar-actions { justify-content: flex-start; }
}

.admin-toolbar h1 {
    margin: 4px 0 0;
    color: #0A2E5C;
    font-size: 28px;
}

.section-kicker {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.admin-panel,
.dispute-card {
    background: white;
    border: 1px solid #e9edf3;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-head h3,
.admin-panel h3,
.dispute-card h3 {
    margin: 0;
    color: #0A2E5C;
}

.admin-architecture {
    margin: 0 0 20px;
}

.architecture-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    border-radius: 6px;
    background: #eef7f1;
    color: #17643a;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    white-space: nowrap;
}

.architecture-map {
    display: grid;
    gap: 12px;
    justify-items: center;
    margin-top: 6px;
}

.architecture-node {
    width: min(100%, 320px);
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    background: #f8fafc;
    padding: 14px;
    text-align: center;
}

.architecture-node.primary {
    background: #0A2E5C;
    border-color: #0A2E5C;
    color: white;
}

.architecture-node strong,
.architecture-node span {
    display: block;
}

.architecture-node span {
    margin-top: 5px;
    color: #64748b;
    font-size: 13px;
}

.architecture-node.primary span {
    color: #dbeafe;
}

.architecture-branches {
    width: min(60%, 360px);
    height: 24px;
    border-left: 2px solid #cbd5e1;
    border-right: 2px solid #cbd5e1;
    border-top: 2px solid #cbd5e1;
    position: relative;
}

.architecture-branches::before {
    content: "";
    position: absolute;
    top: -24px;
    left: 50%;
    width: 2px;
    height: 24px;
    background: #cbd5e1;
}

.architecture-roles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.architecture-note {
    margin: 16px 0 0;
    color: #4b5563;
    line-height: 1.6;
}

.protocol-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 20px;
}

@media (max-width: 768px) {
    .protocol-grid { grid-template-columns: 1fr; }
    .architecture-roles { grid-template-columns: 1fr; }
}

.control-flow {
    display: grid;
    gap: 10px;
}

.control-flow span,
.rule-list li,
.role-control-card p,
.customer-flow-panel li,
.staff-control-banner p {
    color: #4b5563;
    line-height: 1.6;
}

.control-flow span {
    border-left: 4px solid #0A2E5C;
    background: #f8fafc;
    border-radius: 6px;
    padding: 10px 12px;
    font-weight: 700;
}

.rule-list {
    margin: 0;
    padding-left: 18px;
}

.role-control-card h3,
.staff-control-banner h3,
.customer-flow-panel h3 {
    margin-bottom: 8px;
}

.staff-control-banner,
.customer-flow-panel {
    margin-bottom: 20px;
}

.staff-boundary-grid {
    margin-top: 10px;
}

.limit-stack {
    display: grid;
    gap: 2px;
    color: #4b5563;
    font-size: 11px;
    line-height: 1.1;
}

.compact-btn,
.text-btn,
.mini-btn {
    width: auto;
    border-radius: 6px;
    padding: 10px 14px;
    white-space: nowrap;
}

.compact-btn.secondary,
.mini-btn.secondary {
    background: #eef2f7;
    color: #0A2E5C;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.toolbar-icon-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    overflow: visible;
}

.toolbar-icon-btn .btn-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.mini-btn {
    padding: 8px 10px;
    font-size: 12px;
}

.icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.icon-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    flex: 0 0 auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.table-icon-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: #eef2f7;
    color: #0A2E5C;
}

.table-icon-label svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.staff-actions .icon-btn,
.icon-actions .icon-btn {
    width: 38px;
    height: 38px;
    padding: 0;
}

.staff-actions .icon-btn .btn-label,
.icon-actions .icon-btn .btn-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

#audit-logs .action-cell .mini-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    color: transparent;
    position: relative;
}

#audit-logs .action-cell .mini-btn::after {
    content: '';
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%230A2E5C" d="M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>') no-repeat center;
    background-size: contain;
}

.staff-actions .icon-btn::after,
.icon-actions .icon-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 20;
    width: max-content;
    max-width: 160px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #111827;
    color: white;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.staff-actions .icon-btn:hover::after,
.staff-actions .icon-btn:focus-visible::after,
.icon-actions .icon-btn:hover::after,
.icon-actions .icon-btn:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.mini-btn.danger {
    background: #fee2e2;
    color: #991b1b;
}

.text-btn {
    background: transparent;
    color: #0A2E5C;
    padding: 0;
}

#nav-links li.active {
    color: #D4AF37;
    font-weight: 700;
}

.alert-list {
    display: grid;
    gap: 10px;
}

.alert-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.flow-list {
    margin: 0;
    padding-left: 20px;
    color: #4b5563;
    line-height: 1.8;
}

.filter-row,
.action-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.icon-actions,
.staff-actions {
    display: grid !important;
    grid-template-columns: repeat(2, min-content);
    gap: 6px;
}

.text-center {
    text-align: center !important;
}

.staff-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    line-height: 1.2;
}

.staff-meta {
    display: grid;
    gap: 2px;
    line-height: 1.2;
}

.staff-meta strong {
    color: #111827;
}

.staff-name-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.muted-text {
    color: #64748b;
    font-size: 12px;
    line-height: 1.2;
}

.staff-status-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    flex: 0 0 auto;
}

.staff-status-icon svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.staff-status-icon.active {
    background: #dcfce7;
    color: #166534;
}

.staff-status-icon.suspended {
    background: #fee2e2;
    color: #991b1b;
}

.row-index {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #eef2f7;
    color: #0A2E5C;
    font-size: 13px;
    font-weight: 800;
}

.permission-pill svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.permission-cell {
    min-width: 120px;
}

.permission-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 32px;
    height: 32px;
    margin: 2px;
    padding: 0;
    vertical-align: middle;
}

.permission-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.archive-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.archive-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px;
}

.archive-details {
    display: grid;
    gap: 3px;
}

.archive-details span,
.empty-state {
    color: #64748b;
    font-size: 13px;
}

.filter-row input,
.admin-toolbar input,
.admin-toolbar select {
    max-width: 280px;
    margin-top: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.status-badge.active,
.status-badge.approved,
.status-badge.received,
.status-badge.disbursed,
.status-badge.resolved {
    background: #dcfce7;
    color: #166534;
}

.status-badge.pending,
.status-badge.requested,
.status-badge.investigating {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.inactive,
.status-badge.suspended,
.status-badge.rejected,
.status-badge.outstanding {
    background: #fee2e2;
    color: #991b1b;
}

.pill {
    display: inline-flex;
    margin: 0 6px 6px 0;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 600;
}

.summary-bars,
.chart-bars {
    display: grid;
    gap: 14px;
}

.summary-row,
.chart-row {
    display: grid;
    grid-template-columns: 150px 1fr 48px;
    gap: 12px;
    align-items: center;
    color: #4b5563;
}

.summary-track,
.chart-track {
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.summary-track span,
.chart-track span {
    display: block;
    height: 100%;
    background: #D4AF37;
    border-radius: inherit;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    background: white;
    border: 1px solid #e9edf3;
    border-radius: 8px;
    padding: 20px;
}
@media (max-width: 768px) { .settings-grid { grid-template-columns: 1fr; } }

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

.settings-grid label {
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
}

.dispute-list {
    display: grid;
    gap: 14px;
}

.dispute-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
@media (max-width: 480px) {
    .dispute-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
}

.dispute-card p {
    margin: 8px 0;
    color: #4b5563;
}

.admin-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1200;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0;
}

.admin-modal.active {
    display: block;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.admin-modal .btn-label,
.admin-modal .permission-text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
}

.permission-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin: 18px 0;
}

@media (max-width: 480px) {
    .permission-list {
        grid-template-columns: 1fr;
    }
    .staff-boundary-grid { grid-template-columns: 1fr; }
}

.permission-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-width: 0;
}

.permission-option input {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

.admin-modal .permission-text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    word-wrap: break-word;
    flex: 1;
    min-width: 0;
}

/* Close Button */
.close-btn-x { 
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    cursor: pointer; 
    color: #888;
    transition: color 0.2s;
}
.close-btn-x:hover { color: #333; }

/* Input */
input, select {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 16px; /* Prevents iOS auto-zoom on focus */
}

@media (max-height: 500px) {
    .admin-modal {
        top: 20px;
        transform: translate(-50%, 0) scale(0.96);
    }
    .admin-modal.active {
        transform: translate(-50%, 0) scale(1);
    }
}

/* Progress */
.progress-bar {
    background: #eee;
    border-radius: 10px;
    height: 10px;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    width: 30%;
    background: #D4AF37;
    border-radius: 10px;
}

/* Landing Page Styles */
.landing-page {
    background: #fff;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: #0A2E5C;
    color: white;
    position: relative;
    z-index: 1001;
}

.navbar .logo { 
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 18px;
    color: white;
}

.navbar .logo img {
    height: var(--logo-height);
    width: var(--logo-height);
    border-radius: 50%;
    object-fit: cover;
}
.nav-btn {
    text-decoration: none;
    color: white;
    border: 1px solid white;
    padding: 10px;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-btn:hover { background: white; color: #0A2E5C; }

.icon-signup {
    display: block;
    width: 20px;
    height: 20px;
}

.hero {
    text-align: center;
    padding: 100px 5%;
    background: linear-gradient(135deg, #0A2E5C 0%, #1a4a8e 100%);
    color: white;
}

.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 20px; line-height: 1.2; }
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero { padding: 50px 20px; }
}
.hero p { font-size: clamp(1rem, 2vw, 1.2rem); max-width: 700px; margin: 0 auto 40px; opacity: 0.9; line-height: 1.6; }

.hero-btns { display: flex; justify-content: center; gap: 20px; }
@media (max-width: 480px) {
    .hero-btns {
        flex-direction: column;
        align-items: stretch;
    }
}

.plans-section {
    padding: 40px 15px 60px;
    text-align: center;
}
.plans-section h2 { margin-top: 0; }
.cta-primary {
    background: #D4AF37;
    color: #0A2E5C;
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}
.cta-primary:hover { background: #e5c04a; }

.cta-secondary {
    border: 2px solid white;
    color: white;
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
}
.cta-secondary:hover { background: rgba(255,255,255,0.1); }

.features-section { 
    padding: 60px 0 0; 
    text-align: center;
    overflow: hidden;
    background: #fff;
}

.features-grid {
    display: flex;
    gap: 20px;
    padding: 40px 0 0;
    width: max-content;
    animation: ticker 40s linear infinite;
    -webkit-touch-callout: none; /* Prevents context menu on mobile */
    -webkit-user-select: none;
    user-select: none;
}

.features-grid:hover {
    animation-play-state: paused;
}

.feature-card {
    flex: 0 0 300px;
    background: #f8fafc;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    text-align: left;
    transition: 0.3s;
}

.feature-card h3 {
    color: #0A2E5C;
    margin-top: 0;
    font-size: 1.25rem;
}

.feature-card p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 10px)); }
}

@media (max-width: 768px) {
}

footer {
    background: #0A2E5C;
    color: white;
    padding: 15px 30px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
    margin: auto -30px 0 -30px;
    width: calc(100% + 60px);
}

@media (max-width: 768px) {
    footer {
        margin-left: -15px;
        margin-right: -15px;
    }
}

footer p {
    margin: 0;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive hardening across dashboards, pages, sidebars, and modals */
html {
    width: 100%;
    /* Do NOT set overflow on html — it breaks position:fixed when body also has overflow */
}

img,
svg,
canvas,
video {
    max-width: 100%;
}

textarea {
    width: 100%;
    resize: vertical;
    min-height: 120px;
    padding: 12px;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font: inherit;
    line-height: 1.5;
}

button,
a,
input,
select,
textarea {
    min-width: 0;
}

.view {
    width: 100%;
    min-width: 0;
}

.admin-panel,
.dispute-card,
.stat-card,
.plan-card,
.feature-card,
.signup-card {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Password Visibility Toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.password-wrapper input {
    margin-top: 0 !important; /* Move margin to wrapper for better icon alignment */
    padding-right: 45px; /* Prevent text from going behind the icon */
}

.toggle-password {
    position: absolute;
    right: 8px;
    width: 32px !important; /* Constrain width */
    height: 32px !important; /* Constrain height */
    padding: 0 !important; /* Remove generic button padding */
    background: transparent !important; /* Remove generic blue background */
    color: #64748b !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: color 0.2s;
}

.error-text {
    color: #e74c3c;
    font-size: 11px;
    font-weight: 500;
    display: block;
    margin-top: 5px;
    line-height: 1.2;
}

.toggle-password:hover {
    color: #0A2E5C !important;
}

.admin-panel + .admin-panel,
.admin-grid + .admin-grid,
.admin-panel + .admin-grid,
.stats-grid + .admin-panel,
.view > .admin-panel + .admin-panel {
    margin-top: 20px;
}

.table-responsive {
    max-width: 100%;
    overscroll-behavior-inline: contain;
}

.table-responsive::after {
    content: "";
    position: sticky;
    right: 0;
    display: block;
    width: 24px;
    height: 1px;
    margin-top: -1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.92));
    pointer-events: none;
}

.admin-toolbar > div:first-child,
.panel-head > div,
header > div {
    min-width: 0;
}

.toolbar-actions,
.filter-row,
.action-cell,
.icon-actions,
.staff-actions {
    min-width: 0;
}

.compact-btn,
.text-btn,
.mini-btn,
.plan-btn,
.cta-primary,
.cta-secondary {
    min-height: 40px;
    line-height: 1.2;
}

.alert-item {
    min-height: 48px;
}

.alert-item span,
.alert-item strong {
    min-width: 0;
}

.summary-row,
.chart-row {
    min-width: 0;
}

.summary-row span,
.chart-row span,
.summary-row strong,
.chart-row strong {
    overflow-wrap: anywhere;
}

/* Signup page */
.signup-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    width: 100%;
    max-width: 1100px;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.auth-hero-side {
    background: linear-gradient(145deg, #0A2E5C 0%, #1a4a8e 100%);
    color: white;
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 10;
}

.auth-hero-side .logo {
    display: flex;
    align-self: flex-start;
    margin-bottom: 2.5rem;
}

.auth-hero-side .logo img {
    height: 60px;
    width: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.auth-hero-side h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.2;
    font-weight: 800;
    margin: 2rem 0;
}

.auth-hero-side .muted-text {
    font-weight: 500;
    letter-spacing: 0.05em;
}

.signup-card {
    width: 100%;
    background: white;
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    overflow-y: auto;
}

.signup-card h1 {
    margin: 0 0 12px;
    color: #0A2E5C;
    font-size: 30px;
    font-weight: 800;
}

.signup-card p {
    color: #64748b;
    margin-bottom: 30px;
}

#social-auth-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.social-btn-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
    max-width: 300px;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: auth-spin 1s linear infinite;
}

.social-auth-divider {
    display: flex; 
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #94a3b8;
    font-size: 13px;
}

.social-auth-divider::before, .social-auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.social-auth-divider:not(:empty)::before { margin-right: .75em; }
.social-auth-divider:not(:empty)::after { margin-left: .75em; }

#google-signin-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    min-height: 44px; /* Space for the button to load */
}

.social-btn-wrapper .btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.fb-btn-custom {
    background: #1877F2 !important;
    position: relative;
    width: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px; /* Matches Google standard large button height */
    min-height: 44px;
    font-size: 14px;
    border-radius: 8px;
}

.fb-btn-custom .btn-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

.form-grid label {
    display: block;
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
}

@media (min-width: 1200px) {
    #sidebar {
        width: 250px;
    }

    #main-content {
        margin-left: 250px;
        padding: 36px 40px 0;
        width: calc(100% - 250px);
    }

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

    .admin-grid:not(.users-grid):not(.all-users-grid):not(.protocol-grid):not(.report-grid) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (min-width: 769px) and (max-width: 1199px) {
    #sidebar {
        width: 220px;
    }

    #main-content {
        margin-left: 220px;
        padding: 28px 24px 0;
        width: calc(100% - 220px);
    }

    .stats-grid,
    .admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .admin-toolbar {
        align-items: flex-start;
    }

    .admin-toolbar .toolbar-actions,
    .filter-row {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 900px) {
    .admin-toolbar {
        align-items: stretch;
    }

    .toolbar-actions,
    .filter-row {
        flex-wrap: wrap;
    }

    .toolbar-actions .compact-btn,
    .filter-row .compact-btn,
    .toolbar-actions .toolbar-icon-btn,
    .filter-row input,
    .admin-toolbar input,
    .admin-toolbar select {
        flex: 1 1 180px;
        max-width: none;
    }

    .panel-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .panel-head > * {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .signup-page {
        padding: 12px;
    }
    .auth-grid {
        grid-template-columns: 1fr;
    }
    .auth-hero-side {
        padding: 40px 24px;
        min-height: 200px;
    }
    body:not(.landing-page):not(.signup-page) {
        padding-top: 0;
    }

    #sidebar {
        width: min(74vw, 280px);
        left: max(-74vw, -280px);
        padding: 20px 16px;
        box-shadow: 18px 0 40px rgba(0,0,0,0.18);
        height: 100dvh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    #sidebar.active {
        left: 0;
    }

    #sidebar h2 {
        padding-right: 42px;
        margin: 0 0 20px;
        font-size: 20px;
    }

    #sidebar ul {
        margin: 0;
    }

    #sidebar li {
        min-height: 48px;
        display: flex;
        align-items: center;
        border-radius: 8px;
        border-bottom: 0;
        margin-bottom: 4px;
    }

    #nav-links {
        padding-bottom: 12px;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1 1 auto;
        max-height: calc(100dvh - 280px);
    }

    .sidebar-footer {
        position: sticky;
        bottom: 0;
        background: #0A2E5C;
        padding: 14px 0 0;
    }

    .logout-btn-sidebar {
        width: 100% !important;
    }

    .navbar.mobile-only {
        position: sticky;
        top: 0;
        z-index: 900;
    }

    .sub-navbar {
        position: sticky;
        top: 74px;
        z-index: 890;
        min-height: 54px;
    }

    #main-content {
        padding: 18px 14px 0;
        width: 100%;
    }

    header {
        margin-bottom: 18px;
        align-items: flex-start;
    }

    header h2 {
        min-width: 0;
        width: 100%;
    }

    #user-display-name {
        width: 100%;
        color: #64748b;
        font-size: 13px;
    }

    .stats-grid,
    .admin-stats,
    .admin-grid,
    .protocol-grid,
    .architecture-roles,
    .settings-grid,
    .staff-boundary-grid {
        grid-template-columns: 1fr;
    }

    .stat-card,
    .admin-panel,
    .dispute-card {
        padding: 16px;
    }

    .admin-toolbar h1 {
        font-size: 22px;
        line-height: 1.2;
    }

    .toolbar-actions,
    .filter-row,
    .action-cell {
        width: 100%;
    }

    .toolbar-actions .compact-btn,
    .filter-row .compact-btn,
    .action-cell .mini-btn {
        flex: 1 1 auto;
    }

    .staff-management-toolbar {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    .staff-management-toolbar .toolbar-actions {
        width: auto;
        flex: 0 0 auto;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
    }

    .staff-management-toolbar .toolbar-actions .compact-btn {
        flex: 0 0 auto;
    }

    .filter-row input,
    .admin-toolbar input,
    .admin-toolbar select {
        width: min(100%, 220px);
        max-width: 100%;
        flex: 0 0 auto;
        align-self: flex-start;
        font-size: 14px;
        padding: 10px 12px;
    }

    .admin-toolbar select {
        font-size: 14px;
        line-height: 1.25;
        padding: 10px 34px 10px 10px;
        max-width: 100%;
    }

    .panel-head {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .panel-head > * {
        width: 100%;
    }

    .table-responsive {
        max-height: min(56vh, 430px);
        border-radius: 8px;
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: auto;
        font-size: 13px;
        table-layout: auto;
    }

    .data-table th,
    .data-table td {
        padding: 10px;
        vertical-align: top;
        white-space: nowrap;
    }

    .summary-row,
    .chart-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .summary-row strong,
    .chart-row strong {
        justify-self: start;
    }

    .alert-item {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .archive-item {
        grid-template-columns: auto 1fr;
    }

    .archive-item .action-cell {
        grid-column: 1 / -1;
    }

    .permission-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .admin-modal .settings-grid {
        padding: 14px;
    }

    .plans-container {
        padding-left: 14px;
        padding-right: 14px;
        grid-auto-columns: min(78vw, 300px);
    }

    .landing-page .plans-container {
        grid-auto-columns: min(68vw, 260px);
    }

    .feature-card {
        flex-basis: min(82vw, 300px);
    }

    footer {
        width: calc(100% + 28px);
        margin-left: -14px;
        margin-right: -14px;
        padding: 15px 14px;
    }
}

@media (max-width: 560px) {
    .navbar {
        padding: 12px 16px;
    }

    .navbar .logo .brand-text {
        display: flex;
    }

    .sub-navbar {
        top: 68px;
        padding: 6px 14px;
    }

    .stats-grid,
    .admin-stats {
        gap: 12px;
    }

    .stat-card p {
        font-size: 18px;
    }

    .admin-toolbar,
    .panel-head {
        gap: 10px;
    }
    #social-auth-section {
        flex-direction: column; 
        width: 100%;
    }

    .toolbar-actions,
    .filter-row,
    .action-cell {
        flex-direction: column;
        align-items: stretch;
    }

    .compact-btn,
    .mini-btn,
    .text-btn,
    .toolbar-actions .compact-btn,
    .filter-row .compact-btn,
    .action-cell .mini-btn {
        width: 100%;
    }

    .admin-toolbar .filter-row {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .admin-toolbar .filter-row .compact-btn {
        width: auto;
        flex: 0 0 auto;
        padding: 10px 12px;
    }

    .admin-toolbar .filter-row input,
    .admin-toolbar .filter-row select {
        width: auto;
        flex: 1 1 auto;
        min-width: 160px;
    }

    .staff-management-toolbar .toolbar-actions .compact-btn {
        width: auto;
    }

    .staff-management-toolbar .toolbar-icon-btn {
        width: 42px;
    }

    .icon-btn {
        min-height: 40px;
    }

    .staff-actions,
    .icon-actions {
        grid-template-columns: repeat(2, minmax(40px, 1fr));
        width: 100%;
    }

    .staff-actions .icon-btn,
    .icon-actions .icon-btn {
        width: 100%;
    }

    .permission-list {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        padding: 14px;
        gap: 14px;
        grid-template-columns: 1fr;
    }

    .dispute-card {
        flex-direction: column;
        align-items: stretch;
    }

    .close-btn-x {
        top: 14px;
        right: 14px;
        width: 32px;
        height: 32px;
    }

    .signup-page {
        display: block;
        padding: 12px;
    }

    .signup-card {
        padding: 2rem 1.5rem;
        max-height: none;
        overflow-y: visible;
    }

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

    .form-grid .full-width {
        grid-column: auto;
    }

    .hero {
        padding: 44px 16px;
    }
    .hero h1 {
        margin-top: 0;
    }
    .hero-btns a {
        width: 100%;
        text-align: center;
    }
    .features-section { padding-top: 40px; }

    .plans-section {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 380px) {
    #main-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .admin-panel,
    .stat-card,
    .dispute-card,
    .plan-card,
    .feature-card {
        padding: 14px;
    }

    .data-table {
        min-width: auto;
        font-size: 12px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
        padding: 11px;
    }

    footer {
        width: calc(100% + 20px);
        margin-left: -10px;
        margin-right: -10px;
    }
}

@media (max-height: 640px) and (max-width: 768px) {
    #sidebar {
        padding-top: 14px;
    }

    #sidebar li {
        min-height: 42px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .admin-modal {
        max-height: calc(100dvh - 12px);
    }
}
