:root {
    /* Brand Colors */
    --color-blue: #004F98;
    --color-purple: #632D7F;

    /* Light Frosted Glass Theme */
    --bg-main: #f0f4f8;
    /* Soft light blue/gray */
    --bg-glass: rgba(255, 255, 255, 0.65);
    --bg-glass-solid: rgba(255, 255, 255, 0.9);
    --glass-border: 1px solid rgba(255, 255, 255, 0.8);

    /* Text Colors */
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-light: #ffffff;

    /* Variables */
    --border-radius: 20px;
    --box-shadow: 0 10px 40px -10px rgba(0, 79, 152, 0.1);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    /* Soft ambient background */
    background-image:
        radial-gradient(at 0% 0%, rgba(0, 79, 152, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 45, 127, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

.hidden {
    display: none !important;
}

.view-section {
    min-height: 100vh;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.view-section.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

/* Logo images */
.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

.logo-img-white {
    filter: brightness(0) invert(1);
    height: 50px;
}

/* Logo grande en la barra lateral del dashboard */
.logo-sidebar {
    height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* Logo de la autoescuela en el topbar */
.school-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    padding: 6px 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    border: 1px solid #e8edf2;
}

.school-logo-img {
    height: 38px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
}

/* =========================================
   LOGIN VIEW - SPLIT SCREEN
========================================= */
#login-view {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* LEFT PANEL */
.login-left {
    flex: 0 0 50%;
    position: relative;
    background: url('../css/login-bg.png') center center / cover no-repeat;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.login-left-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg,
            rgba(0, 55, 120, 0.75) 0%,
            rgba(99, 45, 127, 0.6) 100%);
    backdrop-filter: blur(2px);
}

.login-left-content {
    position: relative;
    z-index: 1;
    padding: 3rem;
    color: #fff;
}

.logo-large {
    font-size: 3.5rem;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    display: block;
}

.login-left-content h2 {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.login-left-content>p {
    font-size: 1.05rem;
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 380px;
}

.login-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* RIGHT PANEL */
.login-right {
    flex: 0 0 50%;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 5rem;
    position: relative;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.login-header {
    margin-bottom: 2.5rem;
}

.login-header .logo {
    font-size: 2rem;
    margin-bottom: 1.2rem;
    display: block;
}

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Forgot Password Link */
.login-forgot-link {
    text-align: right;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.login-forgot-link a {
    color: var(--color-blue);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-forgot-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(135deg, var(--color-blue), var(--color-purple));
    transition: width 0.3s ease;
}

.login-forgot-link a:hover::after {
    width: 100%;
}

.login-forgot-link a:hover {
    color: var(--color-purple);
}

/* Forgot Password Panel */
.forgot-panel {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.forgot-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--color-blue), var(--color-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 8px 25px -5px rgba(0, 79, 152, 0.35);
    animation: pulseGlow 2.5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 8px 25px -5px rgba(0, 79, 152, 0.35); }
    50% { box-shadow: 0 8px 35px -5px rgba(99, 45, 127, 0.45); }
}

/* Forgot Password Status Message */
.forgot-status {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

.forgot-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.forgot-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Panel slide transition */
.login-form-wrapper {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.login-form-wrapper.slide-out {
    opacity: 0;
    transform: translateX(-30px);
    pointer-events: none;
    position: absolute;
}

.login-form-wrapper.slide-in {
    animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.login-footer-note {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}



.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition);
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 4px rgba(0, 79, 152, 0.08);
}

.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label {
    top: -9px;
    left: 12px;
    font-size: 0.72rem;
    padding: 0 6px;
    background: #fff;
    border-radius: 4px;
    color: var(--color-blue);
    font-weight: 600;
}

.input-group input:focus~i {
    color: var(--color-blue);
}

.input-group label {
    position: absolute;
    left: 3rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
    font-size: 0.92rem;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--color-blue), var(--color-purple));
    color: var(--text-light);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 79, 152, 0.25);
    margin-top: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 79, 152, 0.3);
}

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


/* =========================================
   WIDGETS ROW
========================================= */
.widgets-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.widget {
    background: var(--bg-glass-solid);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.widget:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px -8px rgba(0, 79, 152, 0.15);
}

.widget-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.widget-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.widget-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.widget-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =========================================
   DASHBOARD VIEW
========================================= */
#dashboard-view {
    display: flex;
}

.sidebar {
    width: 280px;
    background: var(--bg-glass-solid);
    backdrop-filter: blur(20px);
    height: 100vh;
    border-right: var(--glass-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-header {
    padding: 2.5rem 1.5rem;
}

.sidebar-nav {
    padding: 1rem 1.5rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.3rem;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.nav-item:hover {
    background: rgba(0, 79, 152, 0.05);
    color: var(--color-blue);
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(0, 79, 152, 0.1), rgba(99, 45, 127, 0.05));
    color: var(--color-blue);
    font-weight: 600;
}

.sidebar-footer {
    padding: 1.5rem;
}

.btn-logout {
    width: 100%;
    padding: 1rem;
    background: rgba(231, 76, 60, 0.1);
    border: none;
    color: #e74c3c;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.btn-logout:hover {
    background: #e74c3c;
    color: #fff;
}

.main-content {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.welcome-msg h2 {
    color: var(--text-dark);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.welcome-msg p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

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

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--color-blue), var(--color-purple));
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    box-shadow: 0 8px 15px rgba(99, 45, 127, 0.3);
}

/* =========================================
   LANGUAGE SWITCHER
========================================= */
.lang-switcher {
    position: relative;
    z-index: 200;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-glass-solid);
    border: var(--glass-border);
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dark);
    box-shadow: 0 2px 10px rgba(0, 79, 152, 0.08);
    transition: var(--transition);
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 16px rgba(0, 79, 152, 0.14);
    transform: translateY(-1px);
}

.lang-flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-code {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--color-blue);
}

.lang-arrow {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 79, 152, 0.15), 0 2px 8px rgba(0,0,0,0.06);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s ease, transform 0.15s ease;
    text-align: left;
}

.lang-option:hover {
    background: rgba(0, 79, 152, 0.06);
    transform: translateX(2px);
}

.lang-option.active {
    background: linear-gradient(135deg, rgba(0, 79, 152, 0.1), rgba(99, 45, 127, 0.06));
}

.lang-option .lang-flag {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.lang-option .lang-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    flex: 1;
}

.lang-option .lang-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* SVG flag images inside the switcher */
.flag-svg {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.flag-svg-btn {
    width: 20px;
    height: 14px;
    border-radius: 3px;
    vertical-align: middle;
}

/* Lang switcher inside login form */
.login-lang-switcher {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1000;
}

.login-lang-switcher .lang-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1e293b;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.login-lang-switcher .lang-btn:hover {
    background: rgba(255, 255, 255, 0.95);
}

.login-lang-switcher .lang-code {
    color: var(--color-blue);
}

.login-lang-switcher .lang-dropdown {
    z-index: 1001;
}

/* Hero Banner (Frosted Glass) */
.hero-banner {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 8rem 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s ease-out;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
    pointer-events: none;
}

.hero-banner-icon {
    font-size: 3rem;
    color: var(--color-purple);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-blue), var(--color-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-banner h3 {
    font-size: 1.8rem;
    color: var(--color-blue);
    margin-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
}

.hero-banner p {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 550px;
    line-height: 1.6;
    margin-bottom: 2rem;
    position: relative;
}

.btn-hero {
    background: linear-gradient(135deg, var(--color-blue), var(--color-purple));
    color: white;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 8px 20px -5px rgba(0, 79, 152, 0.4);
    position: relative;
    border: none;
    cursor: pointer;
}

.btn-hero:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px -5px rgba(0, 79, 152, 0.5);
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* =========================================
   DASHBOARD FOOTER (LEGAL)
========================================= */
.dashboard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 79, 152, 0.1);
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-blue);
    text-decoration: underline;
}

.footer-sep {
    color: #cbd5e1;
}

/* =========================================
   PRESENTATION MODAL (FULLSCREEN)
========================================= */
.presentation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.presentation-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100vw;
    height: 100vh;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    box-shadow: none;
    transform: scale(0.98);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.presentation-modal.active .modal-content {
    transform: scale(1);
}

.btn-close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: #e74c3c;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-close-modal:hover {
    background: #e74c3c;
    color: #fff;
    transform: rotate(90deg);
}

#presentation-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

/* =========================================
   LEGAL MODAL
========================================= */
.legal-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 88888;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1.5rem;
}

.legal-modal.active {
    opacity: 1;
    visibility: visible;
}

.legal-modal-box {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 760px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

.legal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem 1.8rem;
    border-bottom: 1px solid #e8edf2;
    flex-shrink: 0;
}

.legal-modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.btn-close-legal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-close-legal:hover {
    background: #e74c3c;
    color: #fff;
    transform: rotate(90deg);
}

.legal-modal-body {
    padding: 1.5rem 1.8rem;
    overflow-y: auto;
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text-dark);
    flex: 1;
}

.legal-modal-body h1,
.legal-modal-body h2,
.legal-modal-body h3 {
    color: var(--color-blue);
    margin: 1.2rem 0 0.4rem;
}

.legal-modal-body p {
    margin-bottom: 0.8rem;
}

.legal-modal-body ul {
    padding-left: 1.2rem;
    margin-bottom: 0.8rem;
}

/* =========================================
   TOAST NOTIFICATIONS
========================================= */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-glass-solid);
    backdrop-filter: blur(10px);
    color: var(--text-dark);
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: var(--glass-border);
}

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

.toast.error i {
    color: #e74c3c;
}

.toast.success i {
    color: #2ecc71;
}

.toast.info i {
    color: var(--color-blue);
}

.subbar {
    display: none !important;
}

/* Mobile: hide left panel */
@media (max-width: 900px) {
    .login-left {
        display: none;
    }

    .login-right {
        width: 100%;
        flex: 1;
        background: #ffffff;
        padding: 2rem 1.5rem;
    }
}

/* =========================================
   TICKET MODAL
   ========================================= */
.ticket-modal-box {
    max-width: 700px;
    width: 95%;
}

.ticket-intro {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.ticket-modal-body {
    padding: 1.5rem 2rem 2rem;
}

.ticket-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ticket-field {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.4rem;
}

.ticket-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ticket-field input,
.ticket-field select,
.ticket-field textarea {
    padding: 0.65rem 0.9rem;
    border: 1.5px solid rgba(0, 79, 152, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: var(--text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    resize: vertical;
}

.ticket-field input:focus,
.ticket-field select:focus,
.ticket-field textarea:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(0, 79, 152, 0.1);
    background: #fff;
}

.ticket-field input.error,
.ticket-field textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.ticket-field textarea {
    min-height: 120px;
    line-height: 1.5;
}

.ticket-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.ticket-status {
    flex: 1;
    font-size: 0.87rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ticket-status.success {
    background: rgba(22, 160, 133, 0.1);
    color: #16a085;
}

.ticket-status.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.btn-ticket-cancel {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1.5px solid rgba(0, 79, 152, 0.2);
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.btn-ticket-cancel:hover {
    background: rgba(0, 79, 152, 0.06);
    color: var(--color-blue);
    border-color: var(--color-blue);
}

.btn-ticket-submit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, var(--color-blue), #0077CC);
    border: none;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 79, 152, 0.25);
}

.btn-ticket-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 79, 152, 0.35);
}

.btn-ticket-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 600px) {
    .ticket-row {
        flex-direction: column;
    }
    .ticket-modal-body {
        padding: 1rem;
    }
}

/* =========================================
   PROFILE SECTION
   ========================================= */
.profile-section {
    animation: fadeIn 0.4s ease-out;
    padding-bottom: 1rem;
}

.profile-card {
    background: var(--bg-glass-solid);
    border: var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 79, 152, 0.04), rgba(99, 45, 127, 0.03));
    border-bottom: 1px solid rgba(0, 79, 152, 0.08);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-blue), var(--color-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 79, 152, 0.25);
    overflow: hidden;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.25rem;
}

.profile-email {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, rgba(0, 79, 152, 0.1), rgba(99, 45, 127, 0.08));
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-blue);
}

.profile-card-body {
    padding: 1.5rem 2rem;
}

.profile-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.profile-detail:last-child {
    border-bottom: none;
}

.profile-detail-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.profile-card-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.2rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-card-section-header i {
    color: var(--color-blue);
    font-size: 1rem;
}

.profile-card-section-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.profile-form {
    padding: 1.5rem 2rem 2rem;
}

.profile-form-field {
    margin-bottom: 1.25rem;
}

.profile-form-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding: 0.7rem 2.8rem 0.7rem 0.9rem;
    border: 1.5px solid rgba(0, 79, 152, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: var(--text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.password-input-wrapper input:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(0, 79, 152, 0.1);
    background: #fff;
}

.password-input-wrapper input.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.toggle-password {
    position: absolute;
    right: 0.6rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--color-blue);
}

/* Password strength indicator */
.password-strength {
    margin-top: 0.4rem;
    height: 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s;
}

.password-strength::after {
    content: '';
    display: block;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s, background 0.3s;
    width: 0;
}

.password-strength.weak::after {
    width: 33%;
    background: #e74c3c;
}

.password-strength.medium::after {
    width: 66%;
    background: #f39c12;
}

.password-strength.strong::after {
    width: 100%;
    background: #27ae60;
}

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

@media (max-width: 600px) {
    .profile-card-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .profile-card-body,
    .profile-form {
        padding: 1rem;
    }
    .profile-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* ═══════════════════════════════════════════
   LIVE STATS ROW
═══════════════════════════════════════════ */
.dash-live-row {
    grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) { .dash-live-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .dash-live-row { grid-template-columns: 1fr; } }

/* Live indicator dot */
.widget-live {
    position: relative;
}
.live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16,185,129,.5);
    animation: pulse-live 2s infinite;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
}
@keyframes pulse-live {
    0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.5); }
    70%  { box-shadow: 0 0 0 7px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* Number counter animation */
.widget-value.counting {
    animation: countPop .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes countPop {
    from { transform: scale(.85); opacity: .6; }
    to   { transform: scale(1);   opacity: 1;  }
}

/* ═══════════════════════════════════════════
   TWO-COLUMN LAYOUT (activity + chart)
═══════════════════════════════════════════ */
.dash-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 900px) { .dash-two-col { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════
   DASHBOARD PANELS
═══════════════════════════════════════════ */
.dash-panel {
    background: var(--bg-glass-solid);
    border: var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.dash-panel-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .9rem 1.4rem;
    border-bottom: 1px solid rgba(0,0,0,.05);
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.dash-panel-header i { color: var(--color-blue); font-size: .95rem; }

.dash-panel-body {
    padding: 0;
    max-height: 340px;
    overflow-y: auto;
}

/* ═══════════════════════════════════════════
   ACTIVITY FEED
═══════════════════════════════════════════ */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: .9rem 1.2rem;
    border-bottom: 1px solid rgba(0,0,0,.04);
    transition: background .15s;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: rgba(0,79,152,.03); }

.activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    flex-shrink: 0;
    color: #fff;
}
.activity-icon.icon-open  { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.activity-icon.icon-login { background: linear-gradient(135deg,#7c3aed,#a855f7); }
.activity-icon.icon-default { background: linear-gradient(135deg,#64748b,#94a3b8); }

.activity-content { flex: 1; min-width: 0; }
.activity-title {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.activity-sub  { font-size: .73rem; color: var(--text-muted); margin-top: 2px; }
.activity-time { font-size: .7rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

.activity-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: .85rem;
}
.activity-empty i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .35; }

/* ═══════════════════════════════════════════
   SYSTEM HEALTH GRID
═══════════════════════════════════════════ */
.system-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
    max-height: none;
    overflow: visible;
}

.health-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: rgba(0,0,0,.025);
    border-radius: 14px;
    padding: .9rem 1.1rem;
    border: 1px solid transparent;
    transition: border-color .2s, background .2s;
}
.health-item:hover { background: rgba(0,79,152,.04); }
.health-item.ok    { border-color: rgba(16,185,129,.2); }
.health-item.warn  { border-color: rgba(245,158,11,.25); }
.health-item.error { border-color: rgba(239,68,68,.25); }

.health-indicator {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem; flex-shrink: 0; color: #fff;
}
.health-item.ok    .health-indicator { background: linear-gradient(135deg,#10b981,#34d399); }
.health-item.warn  .health-indicator { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.health-item.error .health-indicator { background: linear-gradient(135deg,#ef4444,#f87171); }

.health-label { font-size: .8rem; font-weight: 700; color: var(--text-dark); }
.health-desc  { font-size: .72rem; color: var(--text-muted); margin-top: 1px; }

/* ═══════════════════════════════════════════
   SKELETON LOADING
═══════════════════════════════════════════ */
.skel-line {
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    margin: .5rem 1.2rem;
}
.skel-line.short { width: 55%; }
.activity-skeleton .skel-line { margin: .6rem 1.2rem; }

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}