:root {
    /* Brand Palette - NITT (Cyan/Turquoise) */
    --primary-color: #06b6d4;
    /* Cyan 500 */
    --primary-hover: #0891b2;
    /* Cyan 600 */
    --primary-light: #cffafe;
    /* Cyan 100 */

    --secondary-color: #64748b;
    /* Slate 500 */
    --accent-color: #22d3ee;
    /* Cyan 400 */

    /* Neutral / Surface */
    --background-color: #f0f9ff;
    /* Sky 50 */
    --surface-color: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.9);

    /* Text */
    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #475569;
    /* Slate 600 */
    --text-light: #94a3b8;
    /* Slate 400 */

    /* Status */
    --success-color: #10b981;
    /* Emerald 500 */
    --success-bg: #d1fae5;
    --warning-color: #f59e0b;
    /* Amber 500 */
    --warning-bg: #fef3c7;
    --danger-color: #ef4444;
    /* Red 500 */
    --danger-bg: #fee2e2;

    --border-color: #e2e8f0;
    /* Slate 200 */

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 10px 10px -5px rgb(0 0 0 / 0.02);

    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;

    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(34, 211, 238, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    /* Pill shape */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.35);
}

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

.btn-secondary {
    background-color: var(--surface-color);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
    border-color: var(--primary-light);
}

/* Cards & Surface */
.card {
    background-color: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-xl);
}

/* Auth Specific Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 450px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-wrapper {
    display: inline-block;
    padding: 0.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.auth-logo {
    height: 80px;
    display: block;
    border-radius: 0.5rem;
}

.auth-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    background: none;
    justify-content: center;
    padding-bottom: 0.75rem;
}

.auth-tab:hover {
    color: var(--primary-color);
    background: none;
}

.auth-tab.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

/* Forms */
.input-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
}

.input-field {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    background-color: #f1f5f9;
    /* Slate 100 */
    transition: all 0.2s;
    font-size: 1rem;
    color: var(--text-primary);
}

.input-field:focus {
    outline: none;
    background-color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.input-field::placeholder {
    color: var(--text-light);
}

/* Layout */
#app {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.navbar {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo img {
    height: 48px;
    /* Slightly larger */
    border-radius: 8px;
}

.logo span {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    padding: 2.5rem 0;
    min-height: calc(100vh - 80px);
}

.sidebar {
    background-color: var(--surface-glass);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0;
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

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

.sidebar-arrow {
    transition: transform 0.3s ease;
    font-size: 0.7rem;
}

.sidebar-group.open .sidebar-arrow {
    transform: rotate(180deg);
}

.sidebar-group-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.sidebar-group.open .sidebar-group-content {
    max-height: 500px;
    /* Arbitrary large height */
    transition: max-height 0.5s ease-in;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem 0.75rem 2rem;
    /* Indented */
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-link:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.sidebar-link.active {
    background: linear-gradient(to right, var(--primary-light), white);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    text-align: left;
    padding: 1.25rem 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(248, 250, 252, 0.5);
}

/* Badges */
.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.status-success {
    background-color: var(--success-bg);
    color: var(--success-color);
}

.status-warning {
    background-color: var(--warning-bg);
    color: var(--warning-color);
}

.status-danger {
    background-color: var(--danger-bg);
    color: var(--danger-color);
}

.status-info {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-xl);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    background-color: white;
}

.modal-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem 2rem;
    background-color: #f8fafc;
}

/* Calendar */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.calendar-header {
    background-color: white;
    padding: 1rem 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.calendar-day {
    background-color: white;
    min-height: 120px;
    padding: 0.75rem;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: #f8fafc;
}

.calendar-day.empty {
    background-color: #f1f5f9;
}

.day-number {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.calendar-event {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-bottom: 4px;
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.2);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideRight {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem 0;
    }

    .sidebar {
        position: sticky;
        top: 60px;
        z-index: 40;
        margin-bottom: 1rem;
        padding: 0.5rem;
        border-radius: var(--radius-md);
        background-color: white;
        box-shadow: var(--shadow-md);
    }

    .sidebar-nav {
        flex-direction: column;
        overflow-y: auto;
        padding-bottom: 0;
        gap: 0.5rem;
        /* Remove horizontal scroll props */
    }

    .sidebar-nav::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .sidebar-item {
        flex-shrink: 0;
    }

    .sidebar-link {
        white-space: normal;
        /* Allow wrapping if needed */
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        /* width: 100%; Ensure full width */
        justify-content: flex-start;
    }

    .sidebar-link.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

    /* Responsive Tables */
    .card {
        padding: 1rem;
        overflow-x: auto;
    }

    table {
        min-width: 600px;
        /* Force scroll on small screens */
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Notifications */
.notification-badge {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.notification-badge:hover {
    background-color: var(--background-color);
}

.badge-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    border: 2px solid white;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background-color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    z-index: 1000;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: background-color 0.2s;
}

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

.notification-item:hover {
    background-color: #f8fafc;
}

.notification-item.unread {
    background-color: #f0f9ff;
    color: var(--text-primary);
    font-weight: 500;
}