@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Premium Dark Mode Colors */
    --bg-main: #0f172a; /* Slate 900 */
    --bg-card: #1e293b; /* Slate 800 */
    --bg-card-hover: #334155; /* Slate 700 */
    --text-primary: #f8fafc; /* Slate 50 */
    --text-secondary: #94a3b8; /* Slate 400 */
    
    /* Accents */
    --accent-primary: #3b82f6; /* Blue 500 */
    --accent-primary-hover: #2563eb; /* Blue 600 */
    --accent-success: #10b981; /* Emerald 500 */
    --accent-warning: #f59e0b; /* Amber 500 */
    --accent-danger: #ef4444; /* Red 500 */
    
    /* Layout */
    --sidebar-width: 280px;
    --header-height: 70px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.sidebar-header span {
    color: var(--accent-primary);
}

.sidebar-nav {
    padding: 20px 0;
    overflow-y: auto;
    flex-grow: 1;
}

.nav-title {
    padding: 10px 24px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
    border-left-color: var(--accent-primary);
}

.nav-item i {
    margin-right: 15px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-search input {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 8px 16px 8px 40px;
    color: var(--text-primary);
    outline: none;
    width: 300px;
    transition: all 0.2s ease;
}

.header-search input:focus {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-success));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

/* Content Area */
.content-area {
    padding: 30px;
    flex-grow: 1;
}

.page-title {
    margin-bottom: 24px;
}

.page-title h1 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Cards & Dashboards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.icon-blue { background: rgba(59, 130, 246, 0.2); color: var(--accent-primary); }
.icon-green { background: rgba(16, 185, 129, 0.2); color: var(--accent-success); }
.icon-orange { background: rgba(245, 158, 11, 0.2); color: var(--accent-warning); }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.btn i { margin-right: 8px; }

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    background-color: var(--accent-primary-hover);
    transform: translateY(-2px);
}

/* Forms (Login) */
.login-wrapper {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.35s ease forwards;
}

/* Enhanced Sidebar & Nav Groups */
.sidebar-nav {
    padding: 15px 0;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.nav-section-label {
    padding: 14px 20px 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.nav-group {
    margin-bottom: 2px;
}

.nav-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-group-header:hover, .nav-group-header.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border-left-color: var(--accent-primary);
}

.nav-group-header .group-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-group-header i.chevron {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.nav-group.open .nav-group-header i.chevron {
    transform: rotate(90deg);
}

.nav-sub-items {
    display: none;
    background: rgba(15, 23, 42, 0.4);
    padding: 4px 0 6px;
}

.nav-group.open .nav-sub-items {
    display: block;
}

.nav-sub-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 8px 46px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.82rem;
    transition: all 0.15s ease;
}

.nav-sub-item:hover, .nav-sub-item.active {
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.08);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: capitalize;
}

.badge-primary { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-success { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger  { background: rgba(239, 68, 68, 0.18); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-secondary { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.25); }

/* Data Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.data-table th {
    background: rgba(15, 23, 42, 0.8);
    padding: 14px 18px;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Verification Banner */
.verification-card {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.25), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.verification-icon {
    font-size: 1.3rem;
    color: #60a5fa;
    margin-top: 2px;
}

.verification-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: #93c5fd;
    margin-bottom: 4px;
}

.verification-desc {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.5;
}

/* Hub Grid Cards */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.hub-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
}

.hub-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.hub-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.hub-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.hub-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.hub-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 26px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-success {
    background: var(--accent-success);
    color: white;
}
.btn-danger {
    background: var(--accent-danger);
    color: white;
}

/* Dropdown Option Text Color Styling */
select option,
select optgroup {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-weight: 500;
}

/* ════════════════════════════════════════════════
   UNIVERSAL TABLE RESPONSIVE & HORIZONTAL SCROLLBAR
   (100% Screen Resolution & Multi-device Support)
════════════════════════════════════════════════ */
.main-content,
.app-container,
.glass-panel {
    min-width: 0 !important;
    max-width: 100% !important;
}

.table-responsive,
.table-responsive-wrapper,
.table-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box !important;
    position: relative;
    scrollbar-width: auto !important;
    scrollbar-color: #ff6b00 #e2e8f0 !important;
}

.table-responsive::-webkit-scrollbar,
.table-responsive-wrapper::-webkit-scrollbar,
.table-container::-webkit-scrollbar {
    height: 16px !important;
    width: 12px !important;
    display: block !important;
    background: #e2e8f0 !important;
}

.table-responsive::-webkit-scrollbar-track,
.table-responsive-wrapper::-webkit-scrollbar-track,
.table-container::-webkit-scrollbar-track {
    background: #e2e8f0 !important;
    border-radius: 8px !important;
}

.table-responsive::-webkit-scrollbar-thumb,
.table-responsive-wrapper::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb {
    background: #ff6b00 !important;
    border-radius: 8px !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    cursor: grab !important;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
.table-responsive-wrapper::-webkit-scrollbar-thumb:hover,
.table-container::-webkit-scrollbar-thumb:hover {
    background: #e04a00 !important;
}

.table-responsive::-webkit-scrollbar-thumb:active,
.table-responsive-wrapper::-webkit-scrollbar-thumb:active,
.table-container::-webkit-scrollbar-thumb:active {
    background: #c23b00 !important;
    cursor: grabbing !important;
}

.table-responsive::-webkit-scrollbar-button:single-button,
.table-responsive-wrapper::-webkit-scrollbar-button:single-button,
.table-container::-webkit-scrollbar-button:single-button {
    background-color: #e2e8f0 !important;
    display: block !important;
    background-size: 10px !important;
    background-repeat: no-repeat !important;
}

.table-responsive::-webkit-scrollbar-button:single-button:horizontal:decrement,
.table-responsive-wrapper::-webkit-scrollbar-button:single-button:horizontal:decrement,
.table-container::-webkit-scrollbar-button:single-button:horizontal:decrement {
    height: 16px !important;
    width: 16px !important;
    background-position: center !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23ff6b00'><polygon points='70,20 20,50 70,80'/></svg>") !important;
}

.table-responsive::-webkit-scrollbar-button:single-button:horizontal:increment,
.table-responsive-wrapper::-webkit-scrollbar-button:single-button:horizontal:increment,
.table-container::-webkit-scrollbar-button:single-button:horizontal:increment {
    height: 16px !important;
    width: 16px !important;
    background-position: center !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23ff6b00'><polygon points='30,20 80,50 30,80'/></svg>") !important;
}

.table-responsive > table,
.table-container > table {
    min-width: 900px;
    margin-bottom: 0;
}

.table-responsive th,
.table-responsive td {
    white-space: nowrap !important;
    vertical-align: middle;
}



