/* Customer + Admin login / register — modern neutral look with soft brand-red accents (Outfit / Inter) */
:root {
    --red: #d02a2a;
    --red-dark: #a51d1d;
    --red-soft: rgba(208, 42, 42, .08);
    --ink: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --line: #e5e7eb;
    --field: #f8fafc;
    --panel: #15161b;
    --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
    font-family: "Inter", system-ui, sans-serif;
    color: var(--text);
    background: #f5f6f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ---------- layout ---------- */
.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }

/* brand side — dark, calm, centred content */
.auth-brand {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 40px clamp(32px, 5vw, 72px);
    display: flex;
    flex-direction: column;
    gap: 32px;
    background:
        radial-gradient(circle at 85% 12%, rgba(208, 42, 42, .28), transparent 42%),
        radial-gradient(circle at 10% 95%, rgba(249, 115, 22, .14), transparent 45%),
        var(--panel);
}
.auth-brand::before {
    content: "";
    position: absolute;
    width: 380px; height: 380px; right: -120px; bottom: -140px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 0 0 60px rgba(255, 255, 255, .02), 0 0 0 120px rgba(255, 255, 255, .015);
    pointer-events: none;
}
.brand-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at 30% 45%, #000, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at 30% 45%, #000, transparent 70%);
    pointer-events: none;
}
.brand-top, .brand-mid, .brand-foot { position: relative; z-index: 1; }
.brand-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-mid { margin: auto 0; max-width: 480px; }
.brand-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-family: "Outfit", sans-serif; font-weight: 800; font-size: 21px; letter-spacing: -.01em; }
.brand-logo span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--red); box-shadow: 0 10px 24px -10px rgba(208, 42, 42, .9); font-size: 17px; }
.brand-mid h2 { font-family: "Outfit", sans-serif; font-weight: 800; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.12; letter-spacing: -.025em; margin-bottom: 14px; }
.brand-mid h2 em { font-style: normal; background: linear-gradient(90deg, #fca5a5, #fdba74); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-mid p { font-size: 16px; line-height: 1.65; color: rgba(255, 255, 255, .68); max-width: 430px; }
.brand-feats { list-style: none; margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.brand-feats li {
    display: flex; align-items: center; gap: 11px; padding: 12px 14px;
    border-radius: 14px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .07);
    font-weight: 600; font-size: 13.5px; line-height: 1.35; color: rgba(255, 255, 255, .9);
    opacity: 0; animation: up .6s var(--ease) forwards;
}
.brand-feats li:nth-child(1) { animation-delay: .2s; } .brand-feats li:nth-child(2) { animation-delay: .28s; } .brand-feats li:nth-child(3) { animation-delay: .36s; } .brand-feats li:nth-child(4) { animation-delay: .44s; }
.brand-feats i { flex: 0 0 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(208, 42, 42, .18); color: #fca5a5; font-size: 14px; }
.brand-foot { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, .5); }
.brand-foot i { color: #4ade80; }
.brand-home { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #fff; font-weight: 600; font-size: 13px; text-decoration: none; transition: background .2s; }
.brand-home:hover { background: rgba(255, 255, 255, .16); }

/* form side */
.auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; background: #f5f6f8; }
.auth-home { display: none; }

.auth-card {
    width: 100%; max-width: 440px; padding: 36px 34px 26px;
    background: #fff; border-radius: 24px; border: 1px solid #eceef2;
    box-shadow: 0 30px 60px -36px rgba(15, 23, 42, .35);
    opacity: 0; animation: up .7s var(--ease) .05s forwards;
}
@keyframes up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

.auth-logo { display: block; margin-bottom: 22px; }
.auth-logo img { max-height: 44px; max-width: 200px; }
.auth-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: #f1f5f9; color: #475569; font-weight: 700; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; }
.auth-badge i { color: var(--red); }
.auth-badge.is-admin { background: var(--ink); color: #fff; }
.auth-badge.is-admin i { color: #fca5a5; }
.auth-card h1 { font-family: "Outfit", sans-serif; font-weight: 800; font-size: 30px; color: var(--ink); letter-spacing: -.02em; margin: 12px 0 6px; }
.auth-sub { color: var(--muted); font-size: 15px; margin-bottom: 24px; }

/* alerts coming from the app ($notify) */
.auth-card .alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 18px; border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; }
.auth-card .alert-success { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.auth-card .alert .close { float: right; background: none; border: 0; font-size: 18px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }

/* fields */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 7px; }
.field-box { position: relative; }
.field-box > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 15px; pointer-events: none; transition: color .2s; }
.field-box input, .field-box select {
    width: 100%;
    height: 50px;
    padding: 0 46px 0 43px;
    border: 1.5px solid var(--line);
    border-radius: 13px;
    background: var(--field);
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.field-box input::placeholder { color: #a0aec0; }
.field-box input:focus, .field-box select:focus { border-color: #94a3b8; background: #fff; box-shadow: 0 0 0 4px rgba(148, 163, 184, .18); }
.field-box:focus-within > i { color: var(--ink); }
.eye { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: #94a3b8; cursor: pointer; font-size: 16px; }
.eye:hover { color: var(--ink); background: #f1f5f9; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 22px; font-size: 14px; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500; color: var(--text); user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--ink); cursor: pointer; }
.link { color: var(--red); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

.btn-auth {
    position: relative;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    font-size: 16.5px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--ink);
    box-shadow: 0 14px 26px -16px rgba(15, 23, 42, .8);
    transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-auth:hover { transform: translateY(-1px); background: var(--red); box-shadow: 0 16px 28px -16px rgba(208, 42, 42, .8); }
.btn-auth:active { transform: translateY(0); }
.btn-auth.is-loading { pointer-events: none; opacity: .85; }
.btn-auth.is-loading i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.or-line { display: flex; align-items: center; gap: 12px; color: #94a3b8; font-size: 12.5px; font-weight: 600; margin: 18px 0 14px; text-transform: uppercase; letter-spacing: .06em; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social-row { display: grid; gap: 10px; }
.btn-google, .btn-signup, .btn-wa { display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px; border-radius: 13px; font-weight: 600; font-size: 15px; text-decoration: none; transition: .2s; cursor: pointer; font-family: inherit; }
.btn-google { background: #fff; color: #1f2937; border: 1.5px solid var(--line); }
.btn-google:hover { border-color: #cbd5e1; box-shadow: 0 8px 18px -12px rgba(15, 23, 42, .4); transform: translateY(-1px); }
.btn-signup { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-signup i { color: var(--red); }
.btn-signup:hover { border-color: #cbd5e1; background: #f8fafc; transform: translateY(-1px); }
.btn-wa { width: 100%; border: 0; background: #16a34a; color: #fff; box-shadow: 0 14px 26px -14px rgba(22, 163, 74, .9); font-size: 16px; height: 52px; }
.btn-wa:hover { background: #15803d; transform: translateY(-1px); }
.field-box input[type=date] { padding-right: 14px; }
.field-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.note-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-size: 13.5px; line-height: 1.5; margin-bottom: 16px; }
.note-box i { font-size: 18px; margin-top: 1px; }
.alt-box { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 14px; }
.alt-box summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); list-style: none; text-align: center; }
.alt-box summary::-webkit-details-marker { display: none; }
.alt-box[open] summary { margin-bottom: 12px; }

.auth-alt { text-align: center; margin-top: 22px; font-size: 14.5px; color: var(--muted); }
.auth-switch { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid #f1f5f9; justify-content: center; }
.auth-switch a { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 7px 14px; border-radius: 999px; background: #f8fafc; border: 1px solid var(--line); transition: .2s; }
.auth-switch a:hover { color: var(--ink); border-color: #cbd5e1; }
.auth-copy { text-align: center; font-size: 12px; color: #94a3b8; margin-top: 16px; }

/* ---------- tablet ---------- */
@media (max-width: 960px) {
    .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
    .auth-brand { padding: 18px 20px 70px; gap: 18px; }
    .brand-mid { margin: 0; }
    .brand-mid h2 { font-size: 26px; margin: 4px 0 6px; }
    .brand-mid p { font-size: 14px; }
    .brand-feats, .brand-foot { display: none; }
    .auth-main { padding: 0 16px 28px; justify-content: flex-start; }
    .auth-card { margin-top: -50px; }
    .auth-logo { display: none; }
}
/* ---------- phones: compact so the whole form fits on one screen ---------- */
@media (max-width: 600px) {
    .auth-brand { padding: 14px 16px 58px; gap: 12px; }
    .brand-logo { font-size: 17px; }
    .brand-logo span { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
    .brand-home { padding: 6px 12px; font-size: 12.5px; }
    .brand-mid h2 { font-size: 20px; margin: 2px 0 0; }
    .brand-mid p { display: none; }
    .auth-main { padding: 0 12px 18px; }
    .auth-card { margin-top: -44px; padding: 22px 18px 16px; border-radius: 20px; }
    .auth-badge { padding: 4px 10px; font-size: 10.5px; }
    .auth-card h1 { font-size: 23px; margin: 8px 0 2px; }
    .auth-sub { margin-bottom: 16px; font-size: 13.5px; }
    .field { margin-bottom: 12px; }
    .field label { font-size: 12.5px; margin-bottom: 5px; }
    .field-box input, .field-box select, .field-box input[type=date] { height: 46px; border-radius: 12px; }
    .row-between { margin: 2px 0 14px; font-size: 13.5px; }
    .btn-auth { height: 48px; font-size: 16px; border-radius: 12px; }
    .or-line { margin: 12px 0 10px; }
    .btn-google, .btn-signup { height: 44px; font-size: 14px; border-radius: 12px; }
    .btn-wa { height: 48px; }
    .social-row { gap: 8px; }
    .auth-switch { margin-top: 14px; padding-top: 12px; }
    .auth-switch a { padding: 6px 12px; font-size: 12.5px; }
    .auth-copy { margin-top: 10px; font-size: 11px; }
    .auth-card .alert { padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
    .grid-2 { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 360px) {
    .row-between { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .auth-card, .brand-feats li { opacity: 1; }
}
