/* ============================================================
   PANEL ADMINISTRATIVO — SISTEMA DE RESERVAS
   Versión 1.0.0 | Bootstrap 5 + FontAwesome 6
   ============================================================ */

/* === VARIABLES CSS === */
:root {
    --sidebar-width: 270px;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-text-hover: #ffffff;
    --sidebar-accent: #6366f1;
    --sidebar-accent-bg: rgba(99, 102, 241, 0.15);
    --navbar-h: 65px;
    --content-bg: #f1f5f9;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.09);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.14);
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --violet: #8b5cf6;
    --radius: 14px;
    --radius-sm: 9px;
    --transition: all 0.25s ease;
}

/* === GLOBAL === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Nunito', sans-serif;
    background: var(--content-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    font-size: 15px;
}

a { text-decoration: none; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
    top: -200px; left: -200px;
}

.login-body::after {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%);
    bottom: -150px; right: -150px;
}

.login-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    position: relative;
    z-index: 1;
}

.login-logo {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 12px 30px rgba(99,102,241,0.45);
}

.login-logo i { font-size: 2rem; color: white; }

.login-title {
    color: #fff;
    font-weight: 800;
    font-size: 1.65rem;
    text-align: center;
    letter-spacing: -0.03em;
}

.login-subtitle {
    color: #94a3b8;
    text-align: center;
    font-size: 0.875rem;
    margin-top: 0.35rem;
    margin-bottom: 2rem;
}

.login-card .form-label {
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.5rem;
}

.login-card .form-control {
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.1);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0.78rem 1rem 0.78rem 2.9rem;
    font-size: 0.925rem;
    transition: var(--transition);
    font-family: 'Nunito', sans-serif;
}

.login-card .form-control:focus {
    background: rgba(255,255,255,0.11);
    border-color: var(--sidebar-accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.3);
    color: #fff;
    outline: none;
}

.login-card .form-control::placeholder { color: #475569; }

.input-icon-wrap { position: relative; }

.input-icon-wrap .inp-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6366f1;
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 2;
}

.btn-login {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0.8rem 1.5rem;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: var(--transition);
    width: 100%;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99,102,241,0.5);
}

.login-card label.error {
    color: #f87171;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 0.3rem;
    display: block;
}

.login-card .form-control.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.2);
}

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */
.wrapper { display: flex; min-height: 100vh; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 25px rgba(0,0,0,0.35);
}

/* Brand / Logo */
.sidebar-brand {
    padding: 1.4rem 1.5rem 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sidebar-brand-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 5px 18px rgba(99,102,241,0.45);
}

.sidebar-brand-icon i { color: #fff; font-size: 1.15rem; }

.sidebar-brand-title {
    color: #fff;
    font-weight: 800;
    font-size: 0.975rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.sidebar-brand-subtitle {
    color: #475569;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

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

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 10px; }

.nav-section-label {
    color: #334155;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 1rem 1.5rem 0.4rem;
}

.nav-item-wrap { padding: 0.1rem 0.75rem; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.62rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: 'Nunito', sans-serif;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--sidebar-accent-bg);
    color: var(--sidebar-text-hover);
}

.sidebar-link.active { color: #a5b4fc; }

.sidebar-link .s-icon {
    width: 34px; height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar-link:hover .s-icon,
.sidebar-link.active .s-icon {
    background: rgba(99,102,241,0.22);
    color: #818cf8;
}

.sidebar-link .s-badge {
    margin-left: auto;
    background: var(--primary);
    color: #fff;
    font-size: 0.62rem;
    padding: 0.1rem 0.52rem;
    border-radius: 20px;
    font-weight: 700;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

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

.s-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.s-user-name {
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
}

.s-user-role {
    color: #475569;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Overlay mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ============================================================
   MAIN WRAPPER
   ============================================================ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ============================================================
   TOP NAVBAR
   ============================================================ */
.top-navbar {
    height: var(--navbar-h);
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow-sm);
    gap: 1rem;
}

.toggle-btn {
    width: 38px; height: 38px;
    border-radius: 9px;
    border: 1.5px solid var(--border-color);
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: var(--transition);
    flex-shrink: 0;
}
.toggle-btn:hover { background: var(--content-bg); color: var(--primary); border-color: var(--primary); }

.breadcrumb {
    margin: 0;
    font-size: 0.82rem;
    flex: 1;
}
.breadcrumb-item + .breadcrumb-item::before { content: '›'; color: var(--text-secondary); }
.breadcrumb-item a { color: var(--primary); font-weight: 600; }
.breadcrumb-item.active { color: var(--text-secondary); font-weight: 600; }

.navbar-actions { display: flex; align-items: center; gap: 0.6rem; }

.nav-icon-btn {
    width: 38px; height: 38px;
    border-radius: 9px;
    border: 1.5px solid var(--border-color);
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}
.nav-icon-btn:hover { background: var(--content-bg); color: var(--primary); border-color: var(--primary); }

.nav-badge {
    position: absolute;
    top: -4px; right: -4px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 0.52rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border: 2px solid #fff;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.3rem 0.85rem 0.3rem 0.4rem;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: none;
    transition: var(--transition);
    font-family: 'Nunito', sans-serif;
}
.nav-user-btn:hover { background: var(--content-bg); border-color: #c7d2fe; }

.nav-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.78rem;
    flex-shrink: 0;
}
.nav-user-name { color: var(--text-primary); font-size: 0.83rem; font-weight: 700; line-height: 1.2; }
.nav-user-role { color: var(--text-secondary); font-size: 0.7rem; font-weight: 600; }

/* ============================================================
   CONTENT AREA
   ============================================================ */
.content-area {
    flex: 1;
    padding: 1.75rem;
}

/* PAGE HEADER */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin: 0;
}
.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    margin: 0.2rem 0 0;
}

/* ============================================================
   STAT CARDS (DASHBOARD)
   ============================================================ */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.stat-icon {
    width: 58px; height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
}
.si-indigo { background: rgba(99,102,241,0.1); color: #6366f1; }
.si-emerald { background: rgba(16,185,129,0.1); color: #10b981; }
.si-amber { background: rgba(245,158,11,0.1); color: #f59e0b; }
.si-rose { background: rgba(239,68,68,0.1); color: #ef4444; }
.si-sky { background: rgba(59,130,246,0.1); color: #3b82f6; }
.si-violet { background: rgba(139,92,246,0.1); color: #8b5cf6; }

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.03em;
}
.stat-label {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 0.2rem;
}
.stat-trend {
    font-size: 0.76rem;
    font-weight: 700;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.trend-up { color: #10b981; }
.trend-down { color: #ef4444; }

/* ============================================================
   MODULE ACCESS CARDS (DASHBOARD)
   ============================================================ */
.module-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.85rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-align: center;
    cursor: pointer;
    display: block;
    color: inherit;
}
.module-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
    color: inherit;
}

.mc-icon {
    width: 66px; height: 66px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    margin: 0 auto 1rem;
    transition: var(--transition);
}
.module-card:hover .mc-icon { transform: scale(1.1) rotate(-4deg); }

.mc-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}
.mc-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1.5;
}

/* ============================================================
   PANEL CARD (GENERIC)
   ============================================================ */
.panel-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.panel-card-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.panel-card-title {
    font-size: 0.975rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}
.panel-card-title i { color: var(--primary); }
.panel-card-body { padding: 1.5rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary-custom {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.25rem;
    font-weight: 700;
    font-size: 0.875rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    letter-spacing: 0.01em;
}
.btn-primary-custom:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(99,102,241,0.42);
}

.btn-outline-custom {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.25rem;
    font-weight: 700;
    font-size: 0.875rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
}
.btn-outline-custom:hover {
    background: var(--content-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger-custom {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.825rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
}
.btn-danger-custom:hover { opacity: 0.88; transform: translateY(-1px); color: #fff; }

/* ============================================================
   ACTION BUTTONS (TABLE)
   ============================================================ */
.btn-action {
    width: 32px; height: 32px;
    border-radius: 7px;
    border: 1.5px solid var(--border-color);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.78rem;
    transition: var(--transition);
    margin: 0 2px;
}
.btn-action:hover { transform: translateY(-1px); }
.btn-action.edit { color: #3b82f6; }
.btn-action.edit:hover { background: rgba(59,130,246,0.08); border-color: #3b82f6; }
.btn-action.delete { color: #ef4444; }
.btn-action.delete:hover { background: rgba(239,68,68,0.08); border-color: #ef4444; }
.btn-action.view { color: #10b981; }
.btn-action.view:hover { background: rgba(16,185,129,0.08); border-color: #10b981; }

/* ============================================================
   TABLE STYLES
   ============================================================ */
.table-modern { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-modern thead tr { background: #f8fafc; }
.table-modern thead th {
    padding: 0.85rem 1rem;
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.table-modern tbody td {
    padding: 0.9rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
    font-weight: 600;
}
.table-modern tbody tr:last-child td { border-bottom: none; }
.table-modern tbody tr:hover td { background: rgba(99,102,241,0.03); }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.s-badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.75rem;
    border-radius: 20px;
    font-size: 0.73rem;
    font-weight: 700;
}
.s-badge-status::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.badge-active { background: rgba(16,185,129,0.1); color: #059669; }
.badge-inactive { background: rgba(239,68,68,0.1); color: #dc2626; }
.badge-pending { background: rgba(245,158,11,0.1); color: #d97706; }
.badge-rented { background: rgba(99,102,241,0.1); color: #4f46e5; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group-custom { margin-bottom: 1.2rem; }

.form-label-custom {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.form-label-custom i { color: var(--primary); font-size: 0.85rem; }

.form-control-custom,
.form-select-custom {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.72rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: #fff;
    transition: var(--transition);
    width: 100%;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
}
.form-control-custom:focus,
.form-select-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.13);
    outline: none;
}
.form-control-custom.error,
.form-select-custom.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

label.error {
    color: var(--danger);
    font-size: 0.77rem;
    font-weight: 700;
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

textarea.form-control-custom { resize: vertical; min-height: 100px; }

.form-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.form-section-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    flex-shrink: 0;
    font-family: 'Nunito', sans-serif;
}
.avatar-xs { width: 28px; height: 28px; font-size: 0.68rem; }
.avatar-sm { width: 36px; height: 36px; font-size: 0.78rem; }
.avatar-md { width: 46px; height: 46px; font-size: 0.95rem; }
.avatar-lg { width: 62px; height: 62px; font-size: 1.2rem; }
.avatar-xl { width: 95px; height: 95px; font-size: 1.9rem; }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-cover {
    height: 165px;
    background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 50%, #8b5cf6 100%);
    border-radius: var(--radius) var(--radius) 0 0;
    position: relative;
}
.profile-avatar-wrap {
    position: absolute;
    bottom: -48px;
    left: 50%;
    transform: translateX(-50%);
}
.profile-avatar-wrap .avatar-xl {
    border: 4px solid #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.22);
}

/* ============================================================
   PERMISSIONS TABLE (ROLES)
   ============================================================ */
.perms-table th, .perms-table td {
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    vertical-align: middle;
}
.perms-table th:first-child,
.perms-table td:first-child { text-align: left; font-weight: 700; }
.perms-table thead th {
    background: #f8fafc;
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.07em;
    border-bottom: 1px solid var(--border-color);
}
.perms-table tbody tr:hover td { background: rgba(99,102,241,0.03); }

.form-check-input { cursor: pointer; }
.form-check-input:checked { background-color: #6366f1; border-color: #6366f1; }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(99,102,241,0.22); }

/* ============================================================
   LOADING / SPINNER
   ============================================================ */
.module-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.pulse-spinner {
    width: 44px; height: 44px;
    border: 4px solid rgba(99,102,241,0.15);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-in { animation: fadeIn 0.35s ease both; }
.fade-up { animation: fadeUp 0.4s ease both; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.main-footer {
    padding: 0.9rem 1.75rem;
    border-top: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.79rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ============================================================
   DATATABLES OVERRIDES
   ============================================================ */
div.dataTables_wrapper div.dataTables_filter input {
    border: 1.5px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.45rem 0.85rem !important;
    font-size: 0.85rem !important;
    font-family: 'Nunito', sans-serif !important;
    margin-left: 0.5em !important;
}
div.dataTables_wrapper div.dataTables_length select {
    border: 1.5px solid var(--border-color) !important;
    border-radius: 7px !important;
    padding: 0.3rem 0.5rem !important;
    font-family: 'Nunito', sans-serif !important;
}
div.dataTables_wrapper div.dataTables_info {
    font-size: 0.82rem !important;
    color: var(--text-secondary) !important;
    font-family: 'Nunito', sans-serif !important;
    font-weight: 600 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 7px !important;
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    border-color: #6366f1 !important;
    color: #fff !important;
    border-radius: 7px !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:not(.current):hover {
    background: var(--content-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--primary) !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .content-area { padding: 1.25rem; }
}

@media (max-width: 575.98px) {
    .page-header { flex-direction: column; align-items: flex-start; }
    .stat-value { font-size: 1.5rem; }
    .login-card { padding: 2rem 1.5rem; }
}
