:root {
    --vanta-blue: #1e40af;
    --vanta-blue-bright: #1e3a8a;
    --vanta-blue-dim: rgba(30, 58, 138, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(30, 58, 138, 0.2);
    --ice-white: #f8fafc;
    --dark-gray: #1e293b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--ice-white);
    color: var(--dark-gray);
    overflow-x: hidden;
}

/* Background Animation */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(30, 58, 138, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 58, 138, 0.06) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
    animation: float 20s infinite ease-in-out;
}

.bg-glow:nth-child(2) {
    top: 20%;
    right: 10%;
    animation-delay: -5s;
    background: radial-gradient(circle, rgba(30, 64, 175, 0.08) 0%, transparent 70%);
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.05),
        0 8px 10px -6px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.7s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 20px 40px rgba(30, 58, 138, 0.1),
        inset 0 0 0 1px rgba(30, 58, 138, 0.05);
    border-color: rgba(30, 58, 138, 0.4);
}

/* Accent Effects */
.accent-text {
    color: var(--vanta-blue-bright);
    font-weight: 600;
}

.accent-border {
    border: 1px solid rgba(30, 58, 138, 0.4);
}

.accent-icon {
    color: var(--vanta-blue-bright);
}

/* Typography */
.font-orbitron {
    font-family: 'Orbitron', sans-serif;
}

.font-rajdhani {
    font-family: 'Rajdhani', sans-serif;
}

/* Navigation Trigger */
.nav-trigger {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-trigger:hover {
    transform: translateY(-2px);
    border-color: var(--vanta-blue);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 58, 138, 0.1);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1100;
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.sidebar-menu.active {
    left: 0;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-header img {
    width: 55px;
    height: 55px;
    object-fit: contain;
}

.header-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .header-logo {
        width: 55px;
        height: 55px;
    }
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--vanta-blue);
}

.sidebar-link:hover {
    background: rgba(30, 58, 138, 0.05);
    transform: translateX(5px);
}

.sidebar-link.active {
    background: rgba(30, 58, 138, 0.1);
    border-color: var(--vanta-blue);
    color: var(--vanta-blue);
    font-weight: 600;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(30, 58, 138, 0.25);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(30, 58, 138, 0.7);
}

/* Input Styling */
.glass-input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    color: var(--dark-gray);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.glass-input:focus {
    outline: none;
    border-color: var(--vanta-blue);
    box-shadow: 0 0 20px rgba(30, 58, 138, 0.2);
}

/* Button Effects */
.accent-button {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1), rgba(30, 58, 138, 0.05));
    border: 1px solid rgba(30, 58, 138, 0.5);
    color: var(--vanta-blue-bright);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.accent-button:hover {
    background: rgba(30, 58, 138, 0.2);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.2);
    transform: scale(1.02);
}

.accent-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.accent-button:hover::after {
    opacity: 1;
    left: 100%;
}

/* Table Styling */
.glass-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.glass-table tr {
    background: rgba(0, 0, 0, 0.01);
    transition: all 0.3s;
}

.glass-table tr:hover {
    background: rgba(30, 58, 138, 0.05);
    transform: scale(1.01);
}

.glass-table td {
    padding: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.glass-table td:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px 0 0 12px;
}

.glass-table td:last-child {
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0 12px 12px 0;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-success {
    background: rgba(30, 58, 138, 0.05);
    color: var(--vanta-blue-bright);
    border: 1px solid rgba(30, 58, 138, 0.3);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.6s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Floating Particles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--vanta-blue);
    border-radius: 50%;
    opacity: 0.2;
    animation: particle-float 10s infinite;
    pointer-events: none;
}

@keyframes particle-float {

    0%,
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* Floating Action Button (FAB) */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--vanta-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: none;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 15px 35px rgba(30, 58, 138, 0.4);
    background: var(--vanta-blue-bright);
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.modal-body {
    padding: 2rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--slate-500);
    border: 1px solid var(--glass-border);
    background: white;
}

.modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
    transform: rotate(90deg);
}

/* Custom Scrollbar for Modal */
.modal-container::-webkit-scrollbar {
    width: 6px;
}

.modal-container::-webkit-scrollbar-track {
    background: transparent;
}

.modal-container::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.modal-container::-webkit-scrollbar-thumb:hover {
    background: var(--vanta-blue-dim);
}

/* Mobile Table Optimization */
@media (max-width: 768px) {
    .glass-table thead {
        display: none;
    }

    .glass-table,
    .glass-table tbody,
    .glass-table tr,
    .glass-table td {
        display: block;
        width: 100%;
    }

    .glass-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--glass-border);
        border-radius: 16px;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.5);
    }

    .glass-table td {
        padding: 0.5rem 1rem;
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
    }

    .glass-table td::before {
        content: attr(data-label);
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.65rem;
        color: var(--slate-500);
        margin-right: 1rem;
    }

    .sidebar-menu {
        width: 85%;
        max-width: 300px;
    }

    header {
        padding: 1rem !important;
    }

    .header-logo {
        width: 40px;
        height: 40px;
    }

    h1 {
        font-size: 0.9rem !important;
    }

    .fab {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
    }
}

/* PWA Display Fixes */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .sidebar-menu {
        height: 100vh;
        padding-top: calc(2rem + env(safe-area-inset-top));
    }
}
/* Autocomplete System */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(30, 58, 138, 0.2);
    border-radius: 12px;
    margin-top: 5px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 3000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: none;
}

.autocomplete-results.active {
    display: block;
    animation: fadeInAutoc 0.2s ease-out;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: rgba(30, 58, 138, 0.05);
    padding-left: 20px;
}

.autocomplete-item .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(30, 58, 138, 0.15);
    color: #1e40af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.autocomplete-item .info {
    display: flex;
    flex-direction: column;
}

.autocomplete-item .name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}

.autocomplete-item .sub {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
}

/* Member Preview Panel */
.member-preview-panel {
    background: rgba(30, 58, 138, 0.03);
    border: 1px dashed rgba(30, 58, 138, 0.2);
    border-radius: 16px;
    padding: 1rem;
    margin-top: 1rem;
    display: none;
}

.member-preview-panel.active {
    display: block;
    animation: slideInPre 0.3s ease-out;
}

@keyframes fadeInAutoc {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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