/* ==========================================================================
   "Etalase": the look of the pages before the back office (chosen 14 October 2026)
   Login, forgot password, OTP, new password and the welcome screen. A COCO Mart storefront across the top
   (partials/storefront) and a white card in front of it, with Baloo 2 for headings and Nunito for text.

   Colours are the back office's own (coast.css, dashboard.css), so the step from these pages into the
   dashboard feels like one app: the top bar's orange-lime-green gradient on the countdown, the lime action
   colour, teal titles, amber links and the lime tint. Only the shop sign keeps the store's real yellow, red
   and green.

   Contrast (checked): dark text on lime #8ad128 7.9:1 and on #6aa01f 4.7:1; teal #00796b 5.0:1 or better on
   white, the lime tint and the tag tints; amber link #b45309 4.8:1 on the lime tint; muted #5b6472 5.7:1 on
   the lime tint (the dashboard's #6c757d reads 4.4:1 there). The input edge #8c939d is 3.1:1.
   ========================================================================== */

:root {
    /* The dashboard's top bar (dashboard.css .top-header). */
    --etalase-header: linear-gradient(to right, #f39c12 0%, #cddc39 30%, #8bc34a 100%);
    /* The dashboard's table-header lime (--coast-thead-bg), run corner to corner. */
    --etalase-lime: linear-gradient(135deg, #dcd813 0%, #8ad128 100%);
    --etalase-deep-green: #14532d;      /* --coast-excel-deep: the accent on the lime (4.9:1; teal reads 2.9:1) */
    --etalase-action: #8ad128;          /* --coast-green: buttons, carry dark text */
    --etalase-action-hover: #6aa01f;    /* --coast-green-strong */
    --etalase-title: #00796b;           /* --coast-title */
    --etalase-link: #b45309;            /* --coast-accent-ink */
    --etalase-focus: #15803d;           /* the global :focus-visible ring */
    --etalase-note: #f6fbe8;            /* --coast-hover, the lime tint */
    --etalase-ink: #1f2937;
    --etalase-muted: #5b6472;
    --etalase-edge: #8c939d;
    --etalase-canvas: #f8fafc;          /* --coast-canvas */
    --etalase-ok: #047857;
    --etalase-warn: #b45309;
    --etalase-bad: #b91c1c;
}

* { box-sizing: border-box; }

body.etalase {
    margin: 0;
    min-height: 100vh;
    background: var(--etalase-canvas);
    color: var(--etalase-ink);
    font: 16px/1.5 'Nunito', system-ui, sans-serif;
}

.etalase-scene { height: 48vh; min-height: 300px; max-height: 470px; }
.etalase-scene svg { display: block; width: 100%; height: 100%; }

.etalase-main { padding: 0 20px 64px; }

.etalase-card {
    position: relative;
    max-width: 860px;
    margin: -56px auto 0;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
    overflow: hidden;
}

.etalase-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; }

/* ---------- Controls shared by every page ---------- */
.etalase-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    padding: 0 30px;
    border: 0;
    border-radius: 999px;
    background: var(--etalase-action);
    color: var(--etalase-ink);
    font: 800 19px 'Baloo 2', sans-serif;
    text-decoration: none;
    cursor: pointer;
}
.etalase-btn:hover { background: var(--etalase-action-hover); }
.etalase-btn:focus-visible { outline: 3px solid var(--etalase-ink); outline-offset: 3px; }
.etalase-btn:disabled { opacity: 0.75; cursor: wait; }

.etalase-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--etalase-link);
    font: 800 16px 'Nunito', sans-serif;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.etalase-link:focus-visible { outline: 3px solid var(--etalase-focus); outline-offset: 2px; border-radius: 4px; }
.etalase-link:disabled { color: var(--etalase-muted); cursor: wait; }
/* A quiet way back (Kembali): ink, not amber. */
.etalase-link--back { color: var(--etalase-ink); }

.etalase-field { position: relative; margin-bottom: 16px; }
.etalase-field label { display: block; font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.etalase-field input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 2px solid var(--etalase-edge);
    border-radius: 14px;
    background: #fff;
    color: var(--etalase-ink);
    font: 600 16px 'Nunito', sans-serif;
}
/* Room for the eye button, kept while the password is shown as text (the type changes, the class does not). */
.etalase-field .has-eye { padding-right: 52px; }
.etalase-field input:focus-visible { outline: 3px solid var(--etalase-focus); outline-offset: 2px; border-color: var(--etalase-action); }
.etalase-eye {
    position: absolute; right: 7px; bottom: 7px; width: 36px; height: 36px;
    display: grid; place-items: center; border: 0; border-radius: 10px; background: none;
    color: var(--etalase-muted); cursor: pointer;
}
.etalase-eye:focus-visible { outline: 3px solid var(--etalase-focus); }

.etalase-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; flex-wrap: wrap; }
#btn-loader { display: none; align-items: center; gap: 8px; }
.etalase-version { margin: 18px 0 0; text-align: center; color: var(--etalase-muted); font-size: 13px; }

.etalase-spin { animation: etalase-spin 0.9s linear infinite; }
@keyframes etalase-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .etalase-spin { animation-duration: 2.4s; } }

/* ---------- Login ---------- */
.login-card { display: grid; grid-template-columns: 1fr 1.1fr; }
/* The greeting sits on the dashboard's lime gradient; its text stays dark (7.9:1 or better). */
.login-hello { padding: 40px 32px 32px; background: var(--etalase-lime); }
.login-hello h1 { margin: 0; font-size: 40px; line-height: 1.05; }
.login-hello h1 b { color: var(--etalase-deep-green); }
.login-hello p { margin: 12px 0 0; font-size: 17px; font-weight: 600; }
.login-hello .login-gps { display: flex; gap: 10px; margin-top: 22px; padding: 12px 14px; border-radius: 14px; background: #fff; font-size: 14px; }
.login-gps svg { flex: none; color: var(--etalase-link); margin-top: 2px; }
.login-form { padding: 40px 32px 28px; }
.login-form h2 { margin: 0 0 18px; font-size: 30px; line-height: 1.1; }

/* ---------- Forgot password, OTP, new password (one step each) ---------- */
.auth-card { max-width: 520px; padding: 36px 32px 28px; }
.auth-steps { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-weight: 700; font-size: 14px; color: var(--etalase-muted); }
.auth-steps ol { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.auth-steps li { width: 26px; height: 6px; border-radius: 999px; background: #d1d5db; }
.auth-steps li.is-done { background: var(--etalase-action-hover); }
.auth-steps li.is-now { background: var(--etalase-action); }
.auth-card h1 { margin: 0; font-size: 34px; line-height: 1.1; }
.auth-lead { margin: 8px 0 24px; color: var(--etalase-muted); font-size: 16px; }

/* Six boxes share the row and shrink on a narrow phone rather than spill into the card's padding. */
.otp-boxes { display: flex; gap: 8px; margin-bottom: 22px; }
.otp-boxes input {
    flex: 0 1 52px; min-width: 0; height: 60px; padding: 0;
    border: 2px solid var(--etalase-edge); border-radius: 12px; background: #fff;
    text-align: center; color: var(--etalase-ink); font: 800 26px 'Baloo 2', sans-serif;
}
.otp-boxes input:focus-visible { outline: 3px solid var(--etalase-focus); outline-offset: 2px; border-color: var(--etalase-action); }
.otp-resend { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid #e2e8f0; font-size: 15px; color: var(--etalase-muted); }

/* The new-password meter: three segments that fill with the level; the rules turn green as they are met.
   Bar colours are the dashboard's status lines (bad, warn) and its lime. */
.pw-meter { margin: 0 0 18px; padding: 14px 16px; border-radius: 16px; background: var(--etalase-note); }
.pw-meter__head { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.pw-meter__bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.pw-meter__bars i { height: 6px; border-radius: 999px; background: #e2e8f0; }
.pw-meter[data-level="1"] .pw-meter__bars i:nth-child(1) { background: #f87171; }
.pw-meter[data-level="2"] .pw-meter__bars i:nth-child(-n+2) { background: #fbbf24; }
.pw-meter[data-level="3"] .pw-meter__bars i { background: var(--etalase-action); }
#strength-text { color: var(--etalase-muted); }
.pw-meter[data-level="1"] #strength-text { color: var(--etalase-bad); }
.pw-meter[data-level="2"] #strength-text { color: var(--etalase-warn); }
.pw-meter[data-level="3"] #strength-text { color: var(--etalase-ok); }
.pw-rules { margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; font-weight: 600; }
.pw-rules li { display: flex; gap: 8px; align-items: baseline; margin-top: 4px; }
.pw-rules li::before { content: '\2715'; flex: none; width: 1em; font-weight: 800; color: var(--etalase-bad); }
.pw-rules li.is-met { color: var(--etalase-ok); }
.pw-rules li.is-met::before { content: '\2713'; color: var(--etalase-ok); }

/* ---------- Welcome ---------- */
.welcome-card { max-width: 900px; padding: 36px 36px 30px; }
.welcome-pre { margin: 0; font-weight: 800; font-size: 19px; color: var(--etalase-title); }
.welcome-card h1 { margin: 0; font-size: clamp(36px, 5vw, 54px); line-height: 1.05; }
.welcome-sub { margin: 8px 0 26px; font-size: 18px; font-weight: 600; color: var(--etalase-muted); }
.welcome-5s-title { margin: 0 0 12px; font-size: 20px; }
/* The 5S as price tags: a punched hole on the left, each tag tilted a little its own way. */
.welcome-5s { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 30px; padding: 0; list-style: none; }
.welcome-5s li {
    position: relative;
    padding: 10px 20px 10px 34px;
    border: 2px solid var(--etalase-ink);
    border-radius: 8px 18px 18px 8px;
    font: 800 22px 'Baloo 2', sans-serif;
    transform: rotate(var(--tilt, 0deg));
}
.welcome-5s li::before {
    content: '';
    position: absolute; left: 12px; top: 50%;
    width: 10px; height: 10px; margin-top: -5px;
    border: 2px solid var(--etalase-ink); border-radius: 50%; background: #fff;
}
.welcome-5s b { color: var(--etalase-title); }
.welcome-next { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.welcome-count { flex: 1 1 260px; }
.welcome-count p { margin: 0 0 8px; font-weight: 700; font-size: 15px; color: var(--etalase-muted); }
.welcome-track { height: 12px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
/* Only when the browser refused to play the greeting on its own: a quiet second button beside the lime one. */
.welcome-sound {
    display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px;
    border: 2px solid var(--etalase-edge); border-radius: 999px; background: #fff; color: var(--etalase-ink);
    font: 800 16px 'Nunito', sans-serif; cursor: pointer;
}
.welcome-sound[hidden] { display: none; }
.welcome-sound:hover { border-color: var(--etalase-action-hover); background: var(--etalase-note); }
.welcome-sound:focus-visible { outline: 3px solid var(--etalase-focus); outline-offset: 2px; }
#welcomeFill { height: 100%; width: 0; background: var(--etalase-header); }

/* Phones (people also sign in from the stores): a shorter shop and a short greeting, so the form is on the first
   screen. The location note stays, before the form. */
@media (max-width: 760px) {
    .etalase-scene { height: 28vh; min-height: 180px; }
    .etalase-card { margin-top: -32px; }
    .login-card { grid-template-columns: 1fr; }
    .login-hello { padding: 26px 22px 18px; }
    .login-hello h1 { font-size: 28px; }
    .login-hello > p:not(.login-gps) { display: none; }
    .login-hello .login-gps { margin-top: 14px; }
    .login-form { padding: 22px 22px 24px; }
    .auth-card { padding: 30px 22px 24px; }
    .auth-card h1 { font-size: 28px; }
    .otp-boxes { gap: 6px; }
    .otp-boxes input { height: 54px; font-size: 22px; }
    .welcome-card { padding: 30px 20px 24px; }
}
