/*
 * Halaman autentikasi CMS (login SSO & akses ditolak) — disalin dari ICMS (icms-auth.css) agar seragam
 * dengan ICMS & SaintekMu AI (panel merek gelap + aksen emas, panel krem dengan kartu bergaris emas).
 */
.auth-page {
    --auth-gold: #c9a227;
    --auth-gold-light: #e4c65b;
    --auth-gold-ink: #7c6208;
    --auth-ink: #1f1b14;
    --auth-muted: #6b6253;
    --auth-soft: #8a7f6c;
    --auth-line: #efe7d6;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100dvh;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--auth-ink);
}

@media (min-width: 1024px) {
    .auth-page {
        grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
        grid-template-rows: 1fr;
    }
}

/* Panel merek */
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 20px 24px;
    color: #fff;
    background: linear-gradient(160deg, #24201a 0%, #17140f 55%, #110f0b 100%);
}

@media (min-width: 640px) {
    .auth-brand { padding: 20px 48px; }
}

@media (min-width: 1024px) {
    .auth-brand {
        padding: 56px;
        border-right: 4px solid var(--auth-gold);
    }
}

.auth-glow {
    position: absolute;
    inset: auto -20% -35% 10%;
    height: 70%;
    background: radial-gradient(closest-side, rgba(201, 162, 39, .22), transparent 70%);
    pointer-events: none;
}

.auth-brand-mobile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand-mobile img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    padding: 2px;
    box-shadow: 0 0 0 2px rgba(201, 162, 39, .7);
}

.auth-brand-mobile .name {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.auth-brand-mobile .sub {
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
    margin: 0;
}

.auth-brand-content {
    position: relative;
    display: none;
    flex-direction: column;
    gap: 24px;
    max-width: 512px;
}

@media (min-width: 1024px) {
    .auth-brand-mobile { display: none; }
    .auth-brand-content { display: flex; margin: auto 0; }
}

.auth-brand-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    padding: 4px;
    box-shadow: 0 0 0 4px rgba(201, 162, 39, .6), 0 0 40px rgba(201, 162, 39, .25);
}

.auth-eyebrow {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
}

.auth-title {
    margin: 0;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.05;
    color: #fff;
}

@media (min-width: 1280px) {
    .auth-title { font-size: 60px; }
}

.auth-title span,
.auth-tagline {
    color: var(--auth-gold-light);
}

.auth-tagline {
    margin: 12px 0 0;
    font-size: 18px;
    font-weight: 500;
}

.auth-lead {
    margin: 0;
    max-width: 448px;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .7);
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.auth-feature-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(201, 162, 39, .15);
    box-shadow: inset 0 0 0 1px rgba(201, 162, 39, .3);
    color: var(--auth-gold-light);
    font-size: 15.2px;
}

.auth-features .title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.auth-features .text {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, .6);
}

.auth-motto {
    position: relative;
    display: none;
    margin: 0;
    font-size: 12px;
    letter-spacing: .025em;
    color: rgba(255, 255, 255, .45);
}

@media (min-width: 1024px) {
    .auth-motto { display: block; }
}

/* Panel masuk */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: radial-gradient(ellipse at 80% 0%, rgba(228, 198, 91, .16), transparent 55%), #f5f0e6;
}

@media (min-width: 640px) {
    .auth-main { padding: 40px; }
}

.auth-wrap {
    width: 100%;
    max-width: 464px;
}

.auth-card {
    border-radius: 16px;
    background: #fff;
    padding: 28px;
    border-top: 4px solid var(--auth-gold);
    box-shadow: 0 1px 2px rgba(31, 27, 20, .04), 0 24px 48px -24px rgba(31, 27, 20, .22);
}

@media (min-width: 640px) {
    .auth-card { padding: 36px; }
}

.auth-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--auth-gold-ink);
}

.auth-kicker::before {
    content: "";
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: var(--auth-gold);
}

.auth-heading {
    margin: 16px 0 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--auth-ink);
}

.auth-desc {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--auth-muted);
}

.auth-alert {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #fecdca;
    background: #fef3f2;
    font-size: 14px;
    color: #b42318;
}

.auth-alert.is-warning {
    border-color: #f6d88a;
    background: #fffaeb;
    color: #8a5a00;
}

.auth-alert i {
    margin-top: 2.4px;
    flex-shrink: 0;
}

/* Tombol SSO */
.auth-sso {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 28px;
    padding: 16px 20px;
    border: 0;
    border-radius: 12px;
    text-align: left;
    text-decoration: none;
    background: linear-gradient(180deg, #2b261d 0%, #17140f 100%);
    box-shadow: 0 10px 24px -12px rgba(23, 20, 15, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
    transition: background .15s ease;
}

.auth-sso:hover {
    background: linear-gradient(180deg, #332d22 0%, #1c1812 100%);
}

.auth-sso:focus-visible {
    outline: 3px solid rgba(201, 162, 39, .6);
    outline-offset: 3px;
}

.auth-sso.is-disabled {
    pointer-events: none;
    opacity: .6;
}

.auth-sso-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(201, 162, 39, .15);
    box-shadow: inset 0 0 0 1px rgba(201, 162, 39, .35);
    color: var(--auth-gold-light);
    font-size: 17.6px;
}

.auth-sso-copy {
    min-width: 0;
    flex: 1;
}

.auth-sso-copy .label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--auth-gold-light);
}

.auth-sso-copy .host {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, .55);
}

.auth-sso-arrow {
    color: var(--auth-gold-light);
    transition: transform .15s ease;
}

.auth-sso:hover .auth-sso-arrow {
    transform: translateX(2px);
}

.auth-notes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-line);
    font-size: 13px;
    color: var(--auth-muted);
}

.auth-notes p {
    display: flex;
    gap: 8px;
    margin: 0;
}

.auth-notes i {
    margin-top: 3.2px;
    flex-shrink: 0;
    color: #a08a4e;
}

.auth-link {
    font-weight: 500;
    color: var(--auth-gold-ink);
    text-underline-offset: 2px;
}

.auth-link:hover {
    color: var(--auth-gold-ink);
    text-decoration: underline;
}

/* Form (login lokal debug & kode 2FA) */
.auth-local {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    padding: 16px;
    border-radius: 12px;
    border: 1px dashed #e0d3b4;
}

.auth-local-title {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .025em;
    text-transform: uppercase;
    color: var(--auth-gold-ink);
}

.auth-field label {
    display: block;
    margin-bottom: 5.6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-ink);
}

.auth-input {
    position: relative;
}

.auth-input input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #e0d3b4;
    background: #fffdf8;
    font-size: 14.4px;
    color: var(--auth-ink);
}

.auth-input input:focus {
    outline: none;
    border-color: var(--auth-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, .2);
}

.auth-input .toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--auth-soft);
    padding: 4px 6.4px;
}

.auth-field-error {
    display: block;
    margin-top: 4.8px;
    font-size: 12px;
    color: #b42318;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #d8c89f;
    background: #fff;
    font-size: 14.4px;
    font-weight: 600;
    color: var(--auth-ink);
}

.auth-btn:hover {
    background: #fbf6ea;
}

.auth-btn.is-primary {
    border: 0;
    background: linear-gradient(180deg, #2b261d 0%, #17140f 100%);
    color: var(--auth-gold-light);
}

.auth-btn.is-primary:hover {
    background: linear-gradient(180deg, #332d22 0%, #1c1812 100%);
}

.auth-btn:disabled {
    opacity: .6;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--auth-muted);
}

.auth-plain-btn {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 13px;
    color: var(--auth-soft);
}

.auth-plain-btn:hover {
    color: var(--auth-gold-ink);
    text-decoration: underline;
}

.auth-footer {
    margin: 24px 0 0;
    text-align: center;
    font-size: 12px;
    line-height: 1.65;
    color: var(--auth-soft);
}

/* Metronic memaksa <i> ke 1rem & abu-abu: ikon mengikuti warna/ukuran wadahnya. */
.auth-page .auth-feature-icon i,
.auth-page .auth-sso-icon i,
.auth-page .auth-notes i,
.auth-page .auth-alert i,
.auth-page .auth-btn i,
.auth-page .auth-input .toggle i {
    color: inherit;
    font-size: inherit;
}

.auth-page .auth-sso .auth-sso-arrow { font-size: 18px; color: var(--auth-gold-light); }
.auth-page .auth-notes i { font-size: 14px; color: #a08a4e; }

/* --- Tambahan khusus CMS (tidak ada di ICMS) --- */
/* Tombol berupa tautan <a> (halaman akses ditolak): jangan ikut warna link Metronic */
.auth-actions {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

a.auth-btn,
a.auth-btn:hover {
    text-decoration: none;
    color: var(--auth-ink);
}

a.auth-btn.is-primary,
a.auth-btn.is-primary:hover {
    color: var(--auth-gold-light);
}
