/* ============================================================
   Microsoft Institute Typing Competition System
   Custom Stylesheet — Premium Dark Theme
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Primary palette */
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.3);

    /* Accent colors */
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #06b6d4;

    /* Dark theme backgrounds */
    --bg-body: #0f1117;
    --bg-sidebar: #151823;
    --bg-card: #1a1d2e;
    --bg-card-hover: #1f2337;
    --bg-input: #1e2235;
    --bg-navbar: rgba(21, 24, 35, 0.85);

    /* Text */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Borders */
    --border-color: rgba(148, 163, 184, 0.1);
    --border-color-hover: rgba(148, 163, 184, 0.2);

    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 0px;

    /* Navbar */
    --navbar-height: 64px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ---------- AUTH LAYOUT ---------- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(239, 68, 68, 0.04) 0%, transparent 50%);
}

.auth-wrapper {
    width: 100%;
    max-width: 440px;
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.5s ease;
}

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

.auth-logo {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), var(--accent-info));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    animation: float 3s ease-in-out infinite;
}

.auth-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form .form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.auth-form .form-control {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: var(--transition-base);
}

.auth-form .form-control:focus {
    background: var(--bg-input);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    color: var(--text-primary);
}

.auth-form .input-group .btn {
    border-color: var(--border-color);
    color: var(--text-secondary);
    background: var(--bg-input);
}

.auth-form .input-group .btn:hover {
    color: var(--primary-hover);
    background: var(--bg-card-hover);
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
}

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

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ---------- ADMIN LAYOUT ---------- */
.admin-body {
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-slow);
    overflow: hidden;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    backdrop-filter: blur(4px);
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--navbar-height);
}

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

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--accent-info));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.brand-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition-fast);
}

.sidebar-close:hover {
    color: var(--accent-danger);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0;
}

.nav-section {
    margin-bottom: 0.5rem;
}

.nav-section-title {
    display: block;
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
    margin: 1px 0;
    position: relative;
}

.sidebar-nav .nav-link:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
    border-left-color: rgba(99, 102, 241, 0.3);
}

.sidebar-nav .nav-link.active {
    color: var(--primary-hover);
    background: rgba(99, 102, 241, 0.12);
    border-left-color: var(--primary);
    font-weight: 600;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.badge-coming {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-card-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ---------- MAIN CONTENT ---------- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-slow);
}

/* Top Navbar */
.top-navbar {
    height: var(--navbar-height);
    background: var(--bg-navbar);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    display: none;
}

.sidebar-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.timezone-badge {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* User Dropdown */
.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.875rem;
}

.user-dropdown:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-card);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--accent-info));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.dropdown-arrow {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.user-dropdown[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 200px;
    animation: fadeInDown 0.2s ease;
}

.dropdown-header {
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
}

.dropdown-item {
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
}

.dropdown-divider {
    border-color: var(--border-color);
    margin: 0.25rem 0;
}

/* Breadcrumb */
.page-breadcrumb .breadcrumb {
    background: none;
    font-size: 0.8rem;
}

.page-breadcrumb .breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

.page-breadcrumb .breadcrumb-item a:hover {
    color: var(--primary-hover);
}

.page-breadcrumb .breadcrumb-item.active {
    color: var(--text-secondary);
}

.page-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* ---------- PAGE CONTENT ---------- */
.page-content {
    flex: 1;
    padding: 1.5rem;
}

/* Page Headers */
.dashboard-header {
    margin-bottom: 1.5rem;
}

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

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ---------- STAT CARDS ---------- */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card-primary::before { background: linear-gradient(90deg, var(--primary), var(--primary-hover)); }
.stat-card-success::before { background: linear-gradient(90deg, var(--accent-success), #34d399); }
.stat-card-info::before { background: linear-gradient(90deg, var(--accent-info), #22d3ee); }
.stat-card-warning::before { background: linear-gradient(90deg, var(--accent-warning), #fbbf24); }

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color-hover);
}

.stat-card-body {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-card-primary .stat-icon {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-hover);
}
.stat-card-success .stat-icon {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-success);
}
.stat-card-info .stat-icon {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-info);
}
.stat-card-warning .stat-icon {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-warning);
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.1rem;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card-footer {
    padding: 0.6rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
}

.stat-card-footer a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.stat-card-footer a:hover {
    color: var(--primary-hover);
}

/* ---------- CONTENT CARDS ---------- */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
}

.content-card:hover {
    border-color: var(--border-color-hover);
}

.card-header-custom {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header-custom h2,
.card-header-custom h5 {
    margin-bottom: 0;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.card-header-custom p {
    font-size: 0.85rem;
}

.card-body-custom {
    padding: 1.5rem;
}

/* ---------- INFO LIST ---------- */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

/* ---------- ACTIVITY LIST ---------- */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

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

.activity-item:hover {
    background: rgba(99, 102, 241, 0.03);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-card-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.activity-action {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.activity-detail {
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ---------- PROFILE ---------- */
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent-info));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 24px var(--primary-glow);
}

/* ---------- SETTINGS ---------- */
.settings-logo-preview {
    max-height: 60px;
    max-width: 200px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 4px;
    background: var(--bg-input);
}

/* ---------- PASSWORD REQUIREMENTS ---------- */
.password-requirements {
    padding: 0.75rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.requirements-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    font-size: 0.78rem;
}

.requirements-list li {
    padding: 0.15rem 0;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.requirements-list li i {
    font-size: 0.5rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.requirements-list li.met {
    color: var(--accent-success);
}

.requirements-list li.met i::before {
    content: "\f058"; /* fa-check-circle */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75rem;
}

/* ---------- TABLES ---------- */
.table-dark {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(99, 102, 241, 0.05);
    --bs-table-border-color: var(--border-color);
}

.table-dark th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-bottom-width: 2px;
    white-space: nowrap;
}

.table-dark td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ---------- FORM OVERRIDES ---------- */
.form-control,
.form-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    transition: var(--transition-base);
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-input);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    color: var(--text-primary);
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.input-group-text {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ---------- BUTTONS ---------- */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.25rem;
    transition: var(--transition-base);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.btn-outline-warning {
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--accent-warning);
}

.btn-outline-warning:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--accent-warning);
    color: var(--accent-warning);
}

/* ---------- ALERTS ---------- */
.alert {
    border-radius: var(--radius-md);
    border: none;
    font-size: 0.875rem;
    padding: 0.85rem 1.15rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
}

.alert-info {
    background: rgba(6, 182, 212, 0.12);
    color: #67e8f9;
}

.flash-alert {
    animation: slideInRight 0.3s ease;
}

/* ---------- BADGES ---------- */
.badge {
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.3em 0.6em;
    border-radius: var(--radius-sm);
}

/* ---------- ERROR PAGES ---------- */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-content {
    text-align: center;
    max-width: 480px;
    padding: 2rem;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.error-code {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- FOOTER ---------- */
.main-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ---------- PAGINATION ---------- */
.pagination .page-link {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.pagination .page-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary-hover);
}

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

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .sidebar-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .page-content {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.75rem;
    }

    .stat-card-body {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .card-body-custom {
        padding: 1rem;
    }
}
