/* Login — BV split layout; màu từ tokens.css (cùng gam dashboard) */

.etl-auth-root {
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.etl-auth {
    --etl-login-hero-photo: url("https://axis.benhvien199.vn/assets/326e68a6-3267-4ff0-bf85-54b6fc61df57");
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    background: var(--etl-canvas);
}

/* —— Sidebar —— */
.etl-auth__sidebar {
    width: min(35vw, 420px);
    min-width: 420px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--etl-sidebar-bg);
    color: #e2e8f0;
    border-right: 1px solid var(--etl-sidebar-border);
}

.etl-auth__sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1.75rem 1.35rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.etl-auth__brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.etl-auth__brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    display: grid;
    place-items: center;
    padding: 6px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.etl-auth__brand-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.etl-auth__brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.etl-auth__brand-name {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1.2;
}

.etl-auth__brand-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(226, 232, 240, 0.55);
}

.etl-auth__badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--etl-accent);
    color: #fff;
    box-shadow: 0 4px 16px var(--etl-accent-shadow);
}

.etl-auth__badge i {
    font-size: 0.85rem;
    opacity: 0.95;
}

.etl-auth__sidebar-lead {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: rgba(226, 232, 240, 0.72);
}

.etl-auth__features {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.25rem;
}

.etl-auth__feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: var(--etl-sidebar-hover);
    border: 1px solid var(--etl-sidebar-border);
}

.etl-auth__feature-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 1.05rem;
    color: #fff;
}

.etl-auth__feature-icon--cal {
    background: linear-gradient(135deg, var(--etl-accent-mid), var(--etl-accent-hover));
}

.etl-auth__feature-icon--db {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.etl-auth__feature-icon--dq {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.etl-auth__feature-icon--user {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.etl-auth__feature-icon--cfg {
    background: linear-gradient(135deg, #64748b, #475569);
}

.etl-auth__feature-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.etl-auth__feature-desc {
    font-size: 0.6875rem;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.55);
    margin-top: 0.15rem;
}

.etl-auth__sidebar-home {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem 1.35rem 1.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.85);
    text-decoration: none;
    border-top: 1px solid var(--etl-sidebar-border);
    transition: color 0.15s ease;
}

.etl-auth__sidebar-home:hover {
    color: var(--etl-accent-mid);
}

/* —— Main (photo + card) —— */
.etl-auth__main {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.etl-auth__main-bg {
    position: absolute;
    inset: 0;
    background-image: var(--etl-login-hero-photo);
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
}

.etl-auth__main-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(255, 255, 255, 0.88) 0%,
        rgba(255, 255, 255, 0.78) 38%,
        rgba(248, 250, 252, 0.72) 100%
    );
    pointer-events: none;
}

.etl-auth__theme {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 5;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 50%;
    border: 1px solid var(--etl-card-border);
    background: var(--etl-card);
    color: var(--etl-text-secondary);
    display: grid;
    place-items: center;
    box-shadow: var(--etl-shadow-md);
    transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.etl-auth__theme:hover {
    color: var(--etl-accent);
    border-color: var(--etl-accent-border);
    box-shadow: 0 4px 24px var(--etl-accent-shadow-soft);
}

.etl-auth__main-center {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    min-height: 0;
}

/* —— Card —— */
.etl-auth__card {
    width: 100%;
    max-width: 420px;
    padding: 2rem 1.85rem 1.5rem;
    background: var(--etl-card);
    border-radius: 20px;
    box-shadow: var(--etl-shadow-lg);
    border: 1px solid var(--etl-card-border);
}

.etl-auth__card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.etl-auth__card-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 14px;
    background: var(--etl-accent);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 6px 20px var(--etl-accent-shadow);
}

.etl-auth__card-title {
    margin: 0 0 0.2rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--etl-text);
}

.etl-auth__card-sub {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--etl-text-muted);
    line-height: 1.4;
}

.etl-auth__alert {
    border-radius: 12px;
    font-size: 0.875rem;
}

.etl-auth__label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--etl-text);
    margin-bottom: 0.4rem;
}

.etl-auth__label i {
    color: var(--etl-accent);
    font-size: 0.95rem;
}

.etl-auth__input {
    display: block;
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--etl-text);
    background: var(--etl-input-soft);
    border: 1px solid transparent;
    border-radius: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.etl-auth__input::placeholder {
    color: var(--etl-text-muted);
    opacity: 0.85;
}

.etl-auth__input:focus {
    outline: none;
    border-color: var(--etl-accent-border);
    box-shadow: 0 0 0 3px var(--etl-accent-muted);
    background: var(--etl-card);
}

.etl-auth__pass-wrap {
    position: relative;
}

.etl-auth__input--pass {
    padding-right: 2.75rem;
}

.etl-auth__pass-toggle {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--etl-text-muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.etl-auth__pass-toggle:hover:not(:disabled) {
    color: var(--etl-accent);
    background: var(--etl-accent-muted);
}

.etl-auth__pass-toggle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.etl-auth__remember .form-check-label {
    font-size: 0.8125rem;
    color: var(--etl-text-secondary);
}

.etl-auth__remember .form-check-input:checked {
    background-color: var(--etl-accent);
    border-color: var(--etl-accent);
}

.etl-auth__submit {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.75rem 1.15rem;
    font-weight: 700;
    font-size: 0.9375rem;
    border: none;
    border-radius: 12px;
    background: var(--etl-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 6px 22px var(--etl-accent-shadow);
    transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.etl-auth__submit:hover:not(:disabled) {
    background: var(--etl-accent-hover);
    box-shadow: 0 8px 26px var(--etl-accent-shadow);
}

.etl-auth__submit:active:not(:disabled) {
    transform: translateY(1px);
}

.etl-auth__submit:disabled {
    opacity: 0.75;
}

.etl-auth__card-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--etl-card-border);
}

.etl-auth__card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--etl-accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

.etl-auth__card-link:hover {
    color: var(--etl-accent-hover);
    text-decoration: underline;
}

.etl-auth__card-link--end {
    margin-left: auto;
}

.etl-auth__page-foot {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    margin: 0;
    padding: 0.65rem 1rem 1.1rem;
    text-align: center;
    font-size: 0.6875rem;
    color: var(--etl-text-muted);
    line-height: 1.45;
}

/* Dark: vùnghình mờ tối, chữ chân trang đọc được */
html[data-theme="dark"] .etl-auth__main-overlay {
    background: linear-gradient(
        105deg,
        rgba(8, 12, 18, 0.9) 0%,
        rgba(8, 12, 18, 0.82) 45%,
        rgba(8, 12, 18, 0.75) 100%
    );
}

html[data-theme="dark"] .etl-auth__page-foot {
    color: rgba(226, 232, 240, 0.65);
}

html[data-theme="dark"] .etl-auth__input:focus {
    background: var(--etl-input-soft);
}

/* Loading overlay */
.etl-auth__loading {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: rgba(26, 32, 44, 0.45);
    backdrop-filter: blur(4px);
}

.etl-auth__loading-box {
    padding: 1.5rem 2rem;
    border-radius: 16px;
    background: var(--etl-card);
    border: 1px solid var(--etl-card-border);
    text-align: center;
    box-shadow: var(--etl-shadow-lg);
}

.etl-auth__loading-box strong {
    display: block;
    margin-top: 0.5rem;
    color: var(--etl-text);
}

.etl-auth__loading-box span {
    font-size: 0.875rem;
    color: var(--etl-text-muted);
}

/* Mobile */
@media (max-width: 991.98px) {
    .etl-auth {
        flex-direction: column;
    }

    .etl-auth__sidebar {
        width: 100%;
        min-width: 0;
        max-height: none;
    }

    .etl-auth__sidebar-scroll {
        padding-bottom: 0.75rem;
    }

    .etl-auth__features {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .etl-auth__feature:nth-child(n + 5) {
        grid-column: 1 / -1;
    }

    .etl-auth__main {
        min-height: min(70vh, 640px);
    }
}

@media (max-width: 575.98px) {
    .etl-auth__features {
        grid-template-columns: 1fr;
    }

    .etl-auth__card-links {
        flex-direction: column;
        align-items: stretch;
    }

    .etl-auth__card-link--end {
        margin-left: 0;
    }
}
