/* ============================================================
   Halaman Login - Layout Bersama
   Dipakai 7 panel lewat auth/partials/login-layout.blade.php
   ============================================================ */
:root {
    --auth-primary: #7366ff;
    --auth-primary-dark: #5d50e6;
    --auth-text: #242934;
    --auth-muted: #9297ad;
    --auth-border: #eef0f5;
    --auth-danger: #dc3545;
}

.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--auth-text);
    background: #f7f8fc;
}

/* ============================================================
   HALAMAN
   ============================================================ */
.auth-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 16px;
    /* Gradient lembut ungu + motif titik halus */
    background:
        radial-gradient(circle at 15% 12%, rgba(115, 102, 255, 0.14), transparent 42%),
        radial-gradient(circle at 85% 88%, rgba(115, 102, 255, 0.10), transparent 45%),
        linear-gradient(160deg, #fafbff 0%, #f2f3fb 100%);
    overflow: hidden;
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(115, 102, 255, 0.14) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}

.auth-card-wrap {
    position: relative;
    width: 100%;
    max-width: 440px;
}

/* ============================================================
   CARD
   ============================================================ */
.auth-card {
    padding: 32px 30px 28px;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(36, 41, 52, 0.09);
}

/* ============================================================
   BRAND
   ============================================================ */
.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    text-align: center;
}

.auth-brand-logo {
    max-height: 42px;
    width: auto;
    object-fit: contain;
}

/* Logo terang disembunyikan saat dark mode aktif */
.auth-brand-logo.for-dark {
    display: none;
}

body.darkmode .auth-brand-logo.for-light,
body[data-theme="dark"] .auth-brand-logo.for-light {
    display: none;
}

body.darkmode .auth-brand-logo.for-dark,
body[data-theme="dark"] .auth-brand-logo.for-dark {
    display: block;
}

.auth-brand-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--auth-text);
    letter-spacing: 0.01em;
}

/* ============================================================
   JUDUL PANEL
   ============================================================ */
.auth-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    text-align: center;
}

.auth-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 4px;
    font-size: 22px;
    color: #fff;
    background: var(--auth-primary);
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(115, 102, 255, 0.28);
}

/* Warna per panel supaya tiap halaman instantly berbeda */
.auth-panel-icon.is-primary { background: #7366ff; box-shadow: 0 8px 18px rgba(115, 102, 255, 0.28); }
.auth-panel-icon.is-admin { background: #e8590c; box-shadow: 0 8px 18px rgba(232, 89, 12, 0.26); }
.auth-panel-icon.is-manager { background: #1971c2; box-shadow: 0 8px 18px rgba(25, 113, 194, 0.26); }
.auth-panel-icon.is-operator { background: #7366ff; box-shadow: 0 8px 18px rgba(115, 102, 255, 0.28); }
.auth-panel-icon.is-chef { background: #f08c00; box-shadow: 0 8px 18px rgba(240, 140, 0, 0.26); }
.auth-panel-icon.is-waiter { background: #0ca678; box-shadow: 0 8px 18px rgba(12, 166, 120, 0.26); }
.auth-panel-icon.is-delivery { background: #6741d9; box-shadow: 0 8px 18px rgba(103, 65, 217, 0.26); }
.auth-panel-icon.is-customer { background: #28a745; box-shadow: 0 8px 18px rgba(40, 167, 69, 0.26); }

.auth-title {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    color: var(--auth-text);
}

.auth-subtitle {
    margin: 0;
    font-size: 13.5px;
    color: var(--auth-muted);
}

/* ============================================================
   FORM
   ============================================================ */
.auth-form .form-label {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #3f475a;
}

.auth-form .form-control {
    height: 48px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--auth-text);
    background: #fbfbfd;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-form .form-control:focus {
    color: var(--auth-text);
    background: #fff;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(115, 102, 255, 0.13);
}

.auth-form .form-control.is-invalid {
    border-color: var(--auth-danger);
}

.auth-form .invalid-feedback {
    font-size: 12.5px;
}

.auth-form .form-check-label {
    font-size: 13.5px;
    color: var(--auth-muted);
}

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

.auth-submit {
    height: 48px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--auth-primary);
    border: none;
    border-radius: 10px;
    transition: background 0.18s ease;
}

.auth-submit:hover,
.auth-submit:focus {
    color: #fff;
    background: var(--auth-primary-dark);
}

.auth-alert {
    font-size: 13.5px;
    border-radius: 10px;
}

/* ============================================================
   AKSI TAMBAHAN (kartu Pilih Panel)
   ============================================================ */
.auth-actions {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-border);
}

.auth-footer {
    margin: 18px 0 0;
    font-size: 12.5px;
    color: var(--auth-muted);
    text-align: center;
}

/* ============================================================
   TOGGLE PASSWORD
   ============================================================ */
.password-field-wrapper {
    position: relative;
    display: block;
}

.password-field-wrapper .form-control {
    padding-right: 44px;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--auth-muted);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    z-index: 4;
    transition: color 0.18s ease, background 0.18s ease;
}

.password-toggle-btn:hover {
    color: var(--auth-primary);
    background: rgba(115, 102, 255, 0.08);
}

.password-toggle-btn:focus-visible {
    outline: 2px solid var(--auth-primary);
    outline-offset: 1px;
}

/* Varian Bootstrap input-group */
.input-group .password-toggle-btn {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    border-radius: 0 var(--bs-border-radius, 10px) var(--bs-border-radius, 10px) 0;
}

/* ============================================================
   KARTU PILIH PANEL
   ============================================================ */
.quick-login-card {
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.quick-login-title {
    margin: 0 0 3px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--auth-text);
    text-align: center;
}

.quick-login-hint {
    margin: 0 0 12px;
    font-size: 12.5px;
    color: var(--auth-muted);
    text-align: center;
}

.quick-login-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.quick-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: var(--auth-primary);
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition: filter 0.18s ease, transform 0.1s ease;
}

.quick-login-btn:hover {
    color: #fff;
    filter: brightness(0.94);
}

.quick-login-btn:active {
    transform: translateY(1px);
}

.quick-login-btn:focus-visible {
    outline: 2px solid var(--auth-primary);
    outline-offset: 2px;
}

.quick-login-btn.is-admin { background: #e8590c; }
.quick-login-btn.is-manager { background: #1971c2; }
.quick-login-btn.is-operator { background: #7366ff; }
.quick-login-btn.is-chef { background: #f08c00; }
.quick-login-btn.is-waiter { background: #0ca678; }
.quick-login-btn.is-delivery { background: #6741d9; }
.quick-login-btn.is-customer { background: #28a745; }

/* Panel yang sedang dibuka */
.quick-login-btn.is-current {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}

/* ============================================================
   RESPONSIF
   ============================================================ */
@media (max-width: 576px) {
    .auth-page {
        padding: 20px 14px;
        align-items: flex-start;
    }

    .auth-card {
        padding: 24px 20px 22px;
        border-radius: 14px;
    }

    .auth-title {
        font-size: 19px;
    }

    .quick-login-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   DARK MODE
   ============================================================ */
body.darkmode .auth-page,
body[data-theme="dark"] .auth-page {
    background:
        radial-gradient(circle at 15% 12%, rgba(115, 102, 255, 0.22), transparent 42%),
        radial-gradient(circle at 85% 88%, rgba(115, 102, 255, 0.16), transparent 45%),
        linear-gradient(160deg, #14151d 0%, #1b1c26 100%);
}

body.darkmode .auth-page::before,
body[data-theme="dark"] .auth-page::before {
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
}

body.darkmode .auth-card,
body[data-theme="dark"] .auth-card {
    background: #1f1f1f;
    border-color: #333;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

body.darkmode .auth-brand-name,
body.darkmode .auth-title,
body.darkmode .quick-login-title,
body[data-theme="dark"] .auth-brand-name,
body[data-theme="dark"] .auth-title,
body[data-theme="dark"] .quick-login-title {
    color: #f1f1f1;
}

body.darkmode .auth-form .form-label,
body[data-theme="dark"] .auth-form .form-label {
    color: #cfd3dc;
}

body.darkmode .auth-form .form-control,
body[data-theme="dark"] .auth-form .form-control {
    color: #e8e8ef;
    background: #26262e;
    border-color: #3a3a44;
}

body.darkmode .auth-form .form-control:focus,
body[data-theme="dark"] .auth-form .form-control:focus {
    color: #fff;
    background: #26262e;
    border-color: var(--auth-primary);
}

body.darkmode .auth-actions,
body[data-theme="dark"] .auth-actions {
    border-top-color: #333;
}

body.darkmode .password-toggle-btn,
body[data-theme="dark"] .password-toggle-btn {
    color: #a7adbb;
}

body.darkmode .password-toggle-btn:hover,
body[data-theme="dark"] .password-toggle-btn:hover {
    color: var(--auth-primary);
    background: rgba(115, 102, 255, 0.16);
}
