:root {
    --primary-color: #4f46e5; /* Indigo */
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --primary-rgb: 79, 70, 229;
    --bg-color: #f8fafc;
    --surface-color: rgba(255, 255, 255, 0.85);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: radial-gradient(circle at top right, #eef2ff 0%, #f8fafc 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Surface */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    box-shadow: var(--shadow-lg);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 2rem;
    position: sticky;
    top: 1rem;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.025em;
    transition: transform 0.2s ease;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.925rem;
    transition: color 0.2s ease;
}

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

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

/* Typography */
h1, h2, h3 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    background: rgba(255,255,255,0.95);
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.925rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

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

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

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

.table th, .table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr {
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(248, 250, 252, 0.8);
}

/* Login Wrapper */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.75rem;
}

.login-card h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 0.925rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border: 1.5px solid #fecaca;
}

/* Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }
    .navbar {
        margin: 0.75rem !important;
        padding: 0.75rem 1.25rem;
    }
    .navbar-brand {
        font-size: 1.15rem;
    }
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
}

/* Password Input Toggle Eye Icon Style */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 3rem !important;
}

.toggle-password-btn {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.toggle-password-btn:hover {
    color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.1);
}

.toggle-password-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.4);
}

.toggle-password-btn:active {
    transform: translateY(-50%) scale(0.9);
}

.toggle-password-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

/* User Dropdown Style */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1.5px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    outline: none;
}

.user-dropdown-btn:hover {
    background: rgba(79, 70, 229, 0.08);
    border-color: var(--primary-light);
    color: var(--primary-color);
}

.user-dropdown-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.user-dropdown-btn .user-icon {
    width: 1.25rem;
    height: 1.25rem;
    background: var(--primary-color);
    color: white;
    padding: 3px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.user-dropdown-btn:hover .user-icon {
    transform: scale(1.08);
}

.user-dropdown-btn .chevron-icon {
    width: 1rem;
    height: 1rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.user-dropdown.show .user-dropdown-btn .chevron-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    z-index: 1000;
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: var(--shadow-lg) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-align: left;
}

.dropdown-role {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dropdown-username {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(79, 70, 229, 0.06);
    color: var(--primary-color);
}

.dropdown-item.text-danger {
    color: var(--danger);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
}

.dropdown-item svg {
    width: 1.1rem;
    height: 1.1rem;
}

@media (max-width: 768px) {
    .user-dropdown-btn .user-name {
        display: none;
    }
}

/* ============================================
   BOTTOM NAVIGATION BAR
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(79, 70, 229, 0.12);
    box-shadow: 0 -4px 24px rgba(79, 70, 229, 0.09), 0 -1px 4px rgba(0,0,0,0.04);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.7rem 0.5rem 0.6rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.2s ease, background 0.2s ease;
    position: relative;
    border-radius: 0;
}

.bottom-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2.5px;
    background: var(--primary-color);
    border-radius: 0 0 4px 4px;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-item.active::before {
    transform: translateX(-50%) scaleX(1);
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-item:hover {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.bottom-nav-icon {
    width: 1.4rem;
    height: 1.4rem;
    transition: transform 0.2s ease;
    stroke-width: 2;
}

.bottom-nav-item.active .bottom-nav-icon {
    transform: translateY(-1px) scale(1.08);
}

.bottom-nav-label {
    line-height: 1.2;
    text-align: center;
    max-width: 90px;
}

/* Add bottom padding to main container so content isn't hidden behind nav */
main.container {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
}


