/* =========================================================
   PointSale Authentication
   Responsive untuk desktop, laptop, tablet, dan mobile
   ========================================================= */

:root {
    --auth-primary: #2563eb;
    --auth-primary-dark: #1d4ed8;
    --auth-primary-deep: #0f3ea8;
    --auth-accent: #38bdf8;

    --auth-bg: #eef4fb;
    --auth-surface: #ffffff;
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-border: #dbe4f0;

    --auth-success: #16a34a;
    --auth-danger: #dc2626;

    --auth-radius-sm: 12px;
    --auth-radius-md: 18px;
    --auth-radius-lg: 28px;

    --auth-shadow:
        0 24px 70px rgba(15, 23, 42, .16);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body.auth-body {
    min-height: 100vh;
    overflow-x: hidden;

    font-family: "Inter", sans-serif;
    color: var(--auth-text);

    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 34%),
        radial-gradient(circle at bottom right, rgba(56, 189, 248, .12), transparent 30%),
        var(--auth-bg);
}

button,
input {
    font: inherit;
}

.auth-shell {
    width: 100%;
    min-height: 100vh;

    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr);
}

/* =========================
   Brand panel
   ========================= */

.auth-brand-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-height: 100vh;
    padding: 42px clamp(38px, 6vw, 88px) 50px;

    color: #ffffff;

    background:
        linear-gradient(
            145deg,
            rgba(15, 62, 168, .96) 0%,
            rgba(37, 99, 235, .96) 48%,
            rgba(14, 165, 233, .92) 100%
        );
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    content: "";
    position: absolute;
    z-index: -1;

    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    filter: blur(1px);
}

.auth-brand-panel::before {
    width: 430px;
    height: 430px;
    top: -160px;
    right: -130px;
}

.auth-brand-panel::after {
    width: 330px;
    height: 330px;
    left: -120px;
    bottom: -120px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-brand-icon {
    display: grid;
    place-items: center;

    width: 54px;
    height: 54px;

    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 16px;

    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(12px);

    font-size: 23px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .12);
}

.auth-brand strong,
.auth-brand span {
    display: block;
}

.auth-brand strong {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.auth-brand span {
    margin-top: 3px;
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
    font-weight: 500;
}

.auth-copy {
    max-width: 720px;
    margin: auto 0;
    padding: 70px 0;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 9px 13px;

    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;

    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(10px);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

.auth-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a7f3d0;
    box-shadow: 0 0 0 5px rgba(167, 243, 208, .12);
}

.auth-copy h1 {
    max-width: 760px;
    margin: 24px 0 18px;

    font-size: clamp(40px, 5vw, 72px);
    line-height: 1.03;
    letter-spacing: -.05em;
}

.auth-copy p {
    max-width: 650px;
    margin: 0;

    color: rgba(255, 255, 255, .82);
    font-size: clamp(15px, 1.35vw, 19px);
    line-height: 1.8;
}

/* =========================
   Form panel
   ========================= */

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    padding: 34px clamp(24px, 4vw, 58px);
}

.auth-card {
    width: min(100%, 470px);

    padding: clamp(28px, 4vw, 42px);

    border: 1px solid rgba(219, 228, 240, .9);
    border-radius: var(--auth-radius-lg);

    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(18px);

    box-shadow: var(--auth-shadow);
}

.auth-card-header {
    margin-bottom: 28px;
}

.auth-card-header h2 {
    margin: 0;

    color: var(--auth-text);
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -.03em;
}

.auth-card-header p {
    margin: 9px 0 0;

    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.7;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;

    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.input-icon {
    position: relative;
}

.input-icon > i {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);

    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.input-icon input {
    width: 100%;
    height: 52px;

    padding: 0 48px 0 43px;

    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);

    outline: none;
    background: #f8fafc;
    color: var(--auth-text);

    font-size: 14px;

    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.input-icon input::placeholder {
    color: #94a3b8;
}

.input-icon input:focus {
    border-color: var(--auth-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .11);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);

    display: grid;
    place-items: center;

    width: 38px;
    height: 38px;

    border: 0;
    border-radius: 10px;

    background: transparent;
    color: #64748b;

    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.password-toggle:hover {
    background: #eef2f7;
    color: var(--auth-primary);
}

.remember-row {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin: 2px 0 20px;

    color: #475569;
    font-size: 13px;
    cursor: pointer;
}

.remember-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-primary);
}

.primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: 100%;
    min-height: 52px;

    border: 0;
    border-radius: var(--auth-radius-sm);

    background:
        linear-gradient(
            135deg,
            var(--auth-primary) 0%,
            var(--auth-primary-dark) 100%
        );

    color: #ffffff;
    font-weight: 800;
    cursor: pointer;

    box-shadow: 0 14px 28px rgba(37, 99, 235, .24);

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(37, 99, 235, .28);
    filter: brightness(1.03);
}

.primary-button:active {
    transform: translateY(0);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-bottom: 18px;
    padding: 12px 14px;

    border: 1px solid transparent;
    border-radius: 12px;

    font-size: 13px;
    line-height: 1.5;
}

.alert-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.alert-danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.auth-footer {
    margin-top: 26px;
    padding-top: 20px;

    border-top: 1px solid #edf2f7;

    color: #94a3b8;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}

/* =========================
   Laptop kecil
   ========================= */

@media (max-width: 1180px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr) minmax(380px, .86fr);
    }

    .auth-brand-panel {
        padding-left: 46px;
        padding-right: 46px;
    }

    .auth-copy h1 {
        font-size: clamp(38px, 4.6vw, 58px);
    }
}

/* =========================
   Tablet landscape dan portrait
   ========================= */

@media (max-width: 920px) {
    .auth-shell {
        display: block;
        min-height: 100vh;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 26px 28px 34px;
    }

    .auth-copy {
        max-width: 760px;
        padding: 46px 0 8px;
    }

    .auth-copy h1 {
        max-width: 700px;
        margin-top: 20px;
        font-size: clamp(34px, 7vw, 52px);
    }

    .auth-copy p {
        max-width: 680px;
        font-size: 15px;
    }

    .auth-form-panel {
        min-height: auto;
        padding: 28px 22px 42px;
    }

    .auth-card {
        width: min(100%, 560px);
        margin-top: -18px;
    }
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 560px) {
    body.auth-body {
        background: #f5f8fc;
    }

    .auth-brand-panel {
        padding: 20px 18px 30px;
    }

    .auth-brand-icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        font-size: 19px;
    }

    .auth-brand strong {
        font-size: 18px;
    }

    .auth-brand span {
        font-size: 11px;
    }

    .auth-copy {
        padding: 36px 0 2px;
    }

    .auth-badge {
        padding: 7px 10px;
        font-size: 10px;
    }

    .auth-copy h1 {
        margin: 17px 0 13px;
        font-size: clamp(30px, 10vw, 42px);
        line-height: 1.08;
    }

    .auth-copy p {
        font-size: 13px;
        line-height: 1.65;
    }

    .auth-form-panel {
        padding: 18px 12px 28px;
    }

    .auth-card {
        margin-top: -12px;
        padding: 24px 18px;

        border-radius: 22px;
        box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
    }

    .auth-card-header {
        margin-bottom: 22px;
    }

    .auth-card-header h2 {
        font-size: 25px;
    }

    .auth-card-header p {
        font-size: 13px;
    }

    .input-icon input,
    .primary-button {
        min-height: 50px;
    }

    .auth-footer {
        font-size: 10px;
    }
}

/* =========================
   Mobile sangat kecil
   ========================= */

@media (max-width: 360px) {
    .auth-brand-panel {
        padding-left: 14px;
        padding-right: 14px;
    }

    .auth-form-panel {
        padding-left: 8px;
        padding-right: 8px;
    }

    .auth-card {
        padding-left: 14px;
        padding-right: 14px;
    }

    .auth-copy h1 {
        font-size: 29px;
    }
}

/* =========================
   Tinggi layar pendek
   ========================= */

@media (max-height: 700px) and (min-width: 921px) {
    .auth-brand-panel,
    .auth-form-panel {
        min-height: 700px;
    }

    .auth-copy {
        padding: 36px 0;
    }

    .auth-card {
        padding-top: 30px;
        padding-bottom: 30px;
    }
}

/* =========================
   Preferensi aksesibilitas
   ========================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
