/**
 * Atha Motor — Login page (harmony dengan admin panel marun)
 */
:root {
    --auth-accent: #8B1538;
    --auth-accent-bright: #D42B4A;
    --auth-accent-dark: #5E0E24;
    --auth-accent-soft: rgba(139, 21, 56, 0.22);
    --auth-bg: #111111;
    --auth-surface: #1E1E1E;
    --auth-surface-2: #262626;
    --auth-border: #333333;
    --auth-text: #C8CDD5;
    --auth-text-heading: #E8EBF0;
    --auth-text-muted: #8B95A5;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--auth-bg);
    color: var(--auth-text);
}

/* ── Page background ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139, 21, 56, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(139, 21, 56, 0.2) 0%, transparent 50%),
        var(--auth-bg);
}

/* ── Card ── */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--auth-surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--auth-border);
}

/* ── Brand header ── */
.auth-brand {
    position: relative;
    text-align: center;
    padding: 2rem 1.5rem 1.75rem;
    background: linear-gradient(160deg, var(--auth-accent-dark) 0%, var(--auth-accent) 55%, #3D0A18 100%);
    overflow: hidden;
}

.auth-brand-glow {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 43, 74, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.auth-logo {
    position: relative;
    max-width: 140px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.auth-brand-name {
    position: relative;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.2rem;
    letter-spacing: -0.02em;
}

.auth-brand-tagline {
    position: relative;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

/* ── Form body ── */
.auth-body {
    padding: 1.75rem 1.75rem 2rem;
}

.auth-intro {
    margin-bottom: 1.5rem;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--auth-text-heading);
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 0.82rem;
    color: var(--auth-text-muted);
    margin: 0;
}

.auth-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--auth-text-muted);
    margin-bottom: 0.4rem;
}

/* ── Inputs ── */
.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    height: 44px;
    padding: 0 2.75rem 0 2.5rem;
    background: var(--auth-surface-2);
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--auth-text-heading);
    font-size: 0.875rem;
    transition: border-color 0.15s, background 0.15s;
}

.auth-input::placeholder {
    color: var(--auth-text-muted);
    opacity: 0.7;
}

.auth-input:focus {
    outline: none;
    background: var(--auth-surface);
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-accent-soft);
}

.auth-toggle-pass {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-muted);
    padding: 0.35rem 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
    border-radius: 6px;
    transition: color 0.15s;
}

.auth-toggle-pass:hover {
    color: var(--auth-accent-bright);
}

/* ── Options row ── */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.auth-check-label {
    font-size: 0.82rem;
    color: var(--auth-text-muted) !important;
}

.form-check-input {
    background-color: var(--auth-surface-2);
    border-color: var(--auth-border);
}

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

.form-check-input:focus {
    box-shadow: 0 0 0 2px var(--auth-accent-soft);
    border-color: var(--auth-accent);
}

.auth-link {
    font-size: 0.82rem;
    color: var(--auth-accent-bright);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.auth-link:hover {
    color: #fff;
}

/* ── Submit button ── */
.auth-btn-submit {
    width: 100%;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--auth-accent-bright), var(--auth-accent));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
}

.auth-btn-submit:hover {
    filter: brightness(1.08);
    color: #fff;
}

.auth-btn-submit:active {
    transform: scale(0.99);
}

/* ── Alerts ── */
.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    margin-bottom: 1rem;
}

.auth-alert-danger {
    background: var(--auth-accent-soft);
    color: var(--auth-accent-bright);
    border: 1px solid rgba(139, 21, 56, 0.35);
}

.auth-alert-success {
    background: rgba(25, 135, 84, 0.12);
    color: #4ade80;
    border: 1px solid rgba(25, 135, 84, 0.25);
}

/* ── Footer ── */
.auth-footer {
    margin-top: 1.5rem;
    font-size: 0.72rem;
    color: var(--auth-text-muted);
    opacity: 0.6;
}

/* Invalid state */
.auth-input.is-invalid {
    border-color: var(--auth-accent-bright);
}

@media (max-width: 575.98px) {
    .auth-body {
        padding: 1.5rem 1.25rem 1.75rem;
    }

    .auth-brand {
        padding: 1.5rem 1.25rem 1.35rem;
    }
}
