/* AXSIS: Client Access Gateway Codevator (auth.codevator.co.id).
   Sekeluarga dengan login SYNAPZ (tata letak sama), warna dari gradasi ikon Codevator.
   Disisipkan nginx (gate-portal.conf); panel merek, logo atas, kartu info & footer dibuat portal.js. */
:root {
    color-scheme: light;
    --ax-blue: #0F4C81;
    --ax-teal: #13A89E;
    --ax-green: #2BB673;
    --ax-ring: rgba(15, 76, 129, .22);
    --ax-ink: #0F172A;
    --ax-muted: #64748B;
    --ax-line: #DBE3EE;
    --ax-font: "Segoe UI", Inter, system-ui, -apple-system, Roboto, Arial, sans-serif;
}

html, body { min-height: 100%; }
html { overflow-x: hidden; }
body {
    background-color: #F7FAFC !important;
    background-image: url("/__portal/bg.png") !important;
    background-position: right center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    color: var(--ax-ink) !important;
    font-family: var(--ax-font) !important;
    -webkit-font-smoothing: antialiased;
}
.MuiTypography-root, .MuiInputBase-root, .MuiFormLabel-root, .MuiButton-root, .MuiFormControlLabel-label { font-family: var(--ax-font) !important; }

.MuiAppBar-root { background: transparent !important; border: 0 !important; box-shadow: none !important; }
body.ax-portal .MuiAppBar-root { position: absolute !important; top: 0; left: 0; right: 0; z-index: 4; }
.MuiAppBar-root, .MuiAppBar-root .MuiToolbar-root, .MuiAppBar-root .MuiTypography-root, .MuiAppBar-root .MuiIconButton-root { color: var(--ax-ink) !important; }

/* Jejak Authelia */
a[href*="authelia.com"], *:has(> a[href*="authelia.com"]) { display: none !important; }

/* ---------- Logo atas, panel merek, footer ---------- */
#ax-top { position: absolute; top: 24px; left: 48px; z-index: 5; pointer-events: none; }
.ax-top-logo { height: 42px; width: auto; object-fit: contain; }
body.ax-settings #ax-top, body.ax-settings #ax-hero, body.ax-settings #ax-foot { display: none; }

#ax-hero {
    position: fixed; z-index: 1;
    left: clamp(32px, 6vw, 112px); top: 50%; transform: translateY(-50%);
    max-width: 560px; pointer-events: none;
}
.ax-brand { display: inline-flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.ax-emblem {
    width: 52px; height: 52px; border-radius: 14px; padding: 9px; flex-shrink: 0;
    background: rgba(255, 255, 255, .95); border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 4px 14px -2px rgba(15, 23, 42, .08), 0 1px 3px rgba(15, 23, 42, .04);
    display: flex; align-items: center; justify-content: center;
}
.ax-emblem img { width: 100%; height: 100%; object-fit: contain; }
.ax-brand-text { display: flex; flex-direction: column; }
.ax-title {
    font-size: 52px; font-weight: 900; letter-spacing: -.02em; line-height: 1;
    background: linear-gradient(90deg, var(--ax-blue) 0%, var(--ax-teal) 60%, var(--ax-green) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ax-label {
    margin-top: 5px; display: flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 800; letter-spacing: .18em; color: var(--ax-blue);
}
.ax-label::before { content: ""; width: 14px; height: 2.5px; border-radius: 2px; background: var(--ax-teal); }
.ax-accent { width: 72px; height: 4px; border-radius: 999px; margin: 16px 0 20px; background: linear-gradient(90deg, var(--ax-blue), var(--ax-green)); }
.ax-headline { margin: 0; font-size: 46px; font-weight: 900; letter-spacing: -.035em; line-height: 1.12; }
.ax-h-dark { display: block; color: var(--ax-ink); }
.ax-h-blue {
    display: block; padding-bottom: .08em;
    background: linear-gradient(90deg, var(--ax-blue), var(--ax-teal) 70%, var(--ax-green));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

#ax-foot {
    position: fixed; left: 48px; right: 48px; bottom: 18px; z-index: 2;
    font-size: 12.5px; color: var(--ax-muted); pointer-events: none;
}

/* ---------- Kartu masuk di kanan ---------- */
body.ax-portal [id$="-stage"] {
    min-height: 100vh !important;
    display: flex !important; align-items: center !important; justify-content: flex-end !important;
    padding: 96px clamp(24px, 17vw, 320px) 72px 24px !important;
    position: relative; z-index: 3; box-sizing: border-box !important;
}
body.ax-portal [id$="-stage"] > .MuiContainer-root { margin: 0 !important; max-width: 440px !important; width: 100%; padding: 0 !important; }
.MuiContainer-root { max-width: 440px !important; }
.MuiContainer-root > .MuiGrid2-container {
    position: relative; overflow: hidden;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 20px;
    padding: 40px 36px 32px;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, .02), 0 20px 40px -10px rgba(15, 23, 42, .08);
    margin: 0 !important; width: 100% !important;
}
/* Garis gradasi AXSIS di atas kartu */
.MuiContainer-root > .MuiGrid2-container::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
    background: linear-gradient(90deg, var(--ax-blue), var(--ax-teal), var(--ax-green));
}
body.ax-portal .MuiContainer-root img[src*="logo.png"] { display: none !important; }
img[src*="logo.png"] { width: auto !important; height: 52px !important; max-width: 150px !important; object-fit: contain; }

body.ax-portal .MuiContainer-root > .MuiGrid2-container > .MuiGrid2-root:has(.MuiTypography-h5) { text-align: left !important; justify-content: flex-start !important; }
.MuiTypography-h5 { font-weight: 800 !important; font-size: 23px !important; letter-spacing: -.025em !important; color: var(--ax-ink) !important; }
#first-factor-stage .MuiTypography-h5::after {
    content: "Gunakan akun yang diberikan tim Codevator";
    display: block; margin-top: 6px;
    font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--ax-muted);
}

/* ---------- Isian & tombol ---------- */
.MuiInputBase-root { border-radius: 10px !important; background: #fff !important; }
.MuiOutlinedInput-notchedOutline { border-color: var(--ax-line) !important; }
.MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline { border-color: #A8B7CB !important; }
.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline { border-color: var(--ax-blue) !important; border-width: 1.5px !important; }
.MuiOutlinedInput-root.Mui-focused { box-shadow: 0 0 0 4px var(--ax-ring); }
.MuiInputLabel-root.Mui-focused { color: var(--ax-blue) !important; }
.MuiOutlinedInput-root.Mui-error .MuiOutlinedInput-notchedOutline { border-color: #DC2626 !important; }

.MuiButton-containedPrimary {
    background: linear-gradient(90deg, var(--ax-blue), #12708F) !important; color: #fff !important;
    min-height: 48px; border-radius: 10px !important;
    font-weight: 700 !important; font-size: 15px !important; text-transform: none !important; letter-spacing: 0 !important;
    box-shadow: 0 8px 18px -10px rgba(15, 76, 129, .7) !important;
    transition: filter .15s ease, box-shadow .15s ease, transform .15s ease;
}
.MuiButton-containedPrimary:hover { filter: brightness(.94); transform: translateY(-1px); }
.MuiButton-containedPrimary:active { transform: translateY(0); }
.MuiButton-containedPrimary:focus-visible { box-shadow: 0 0 0 4px var(--ax-ring) !important; }
.MuiButton-containedPrimary.Mui-disabled { background: #94A3B8 !important; box-shadow: none !important; }
.MuiButton-root { border-radius: 10px !important; text-transform: none !important; }
.MuiCheckbox-root.Mui-checked, .MuiCheckbox-colorPrimary.Mui-checked { color: var(--ax-blue) !important; }
.MuiFormControlLabel-label { color: #475569 !important; font-size: .9rem !important; user-select: none; }
.MuiLink-root, a.MuiTypography-root { color: var(--ax-blue) !important; font-weight: 600; text-decoration: none !important; }
.MuiLink-root:hover { text-decoration: underline !important; }
.MuiLink-root:focus-visible, a:focus-visible { outline: 2px solid var(--ax-blue); outline-offset: 2px; border-radius: 4px; }
.MuiAlert-root { border-radius: 10px !important; }
.MuiDialog-paper { border-radius: 16px !important; }

/* ---------- Kartu info klien (di bawah kartu masuk) ---------- */
#ax-info {
    box-sizing: border-box; margin-top: 16px; padding: 16px 18px;
    border-radius: 14px; background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(226, 232, 240, .9); border-left: 4px solid var(--ax-teal);
    color: #334155; font-size: 13.5px; line-height: 1.55; text-align: left;
}
#ax-info strong { display: block; margin-bottom: 6px; color: var(--ax-ink); font-size: 14.5px; }
#ax-info p { margin: 0 0 8px; }
#ax-info p:last-child { margin-bottom: 0; }
#ax-info a { color: var(--ax-blue); font-weight: 600; text-decoration: none; }
#ax-info a:hover { text-decoration: underline; }

body.ax-settings { background-image: none !important; background-color: #EEF2F6 !important; }

/* ---------- Responsif ---------- */
@media (max-width: 1440px) { body.ax-portal [id$="-stage"] { padding-right: clamp(24px, 9vw, 160px) !important; } }
@media (max-width: 1200px) {
    body { background-position: right -60px center !important; }
    .ax-title { font-size: 44px; }
    .ax-headline { font-size: 38px; }
    #ax-hero { max-width: 420px; }
}
@media (max-width: 991.98px) {
    body { background-position: center center !important; }
    #ax-top { left: 50%; transform: translateX(-50%); top: 18px; }
    #ax-hero { display: none; }
    #ax-foot { left: 16px; right: 16px; text-align: center; }
    body.ax-portal [id$="-stage"] { justify-content: center !important; padding: 84px 16px 64px !important; }
    .MuiContainer-root > .MuiGrid2-container { padding: 32px 20px 24px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
