/* =============================================================================
   Auth screens — login, register, phone login, OTP
   -----------------------------------------------------------------------------
   One stylesheet for everything under layouts/auth.blade.php. It replaces three
   separate inline <style> blocks: the layout's own, and near-identical copies
   of the OTP-box rules in auth/login.blade.php and auth/mobile-login.blade.php.

   Those blocks sat in the body, so they outranked any linked stylesheet and had
   to be removed rather than overridden.

   Worth knowing about what was there:
     * `.text-center { color: #fff }` — a layout utility used as a colour rule,
       so every centred element on the page was forced white whatever it was.
     * `.text-muted { color: #DCE222 !important }` — muted text rendered in the
       accent, which is the opposite of muted.
     * The accent was #DCE222, a near-miss for the brand's green.
     * The OTP boxes focused to #007bff, Bootstrap's blue.

   These pages are not inside body.app-shell, so they do not inherit the admin
   shell's tokens; the palette is declared below. It is light, on the same
   #0ac074 the admin uses in light mode — the panel used to be near-black, which
   sat oddly beside the white left half and matched nothing else in the product.
   Every colour on these screens comes from that one block, so re-theming again
   means editing it and nothing else.
   ========================================================================== */

:root {
    --auth-page: #eef1f6;
    --auth-panel: #f7f9fc;
    --auth-card: #ffffff;
    --auth-field: #f4f6fa;
    --auth-border: #e4e8f0;
    --auth-border-strong: #d3d9e6;
    --auth-text: #1d2233;
    --auth-text-soft: #4b5163;
    --auth-muted: #858c9e;
    --auth-accent: #0ac074;
    --auth-accent-2: #34d399;
    --auth-accent-ink: #06804d;
    --auth-on-accent: #ffffff;
    --auth-accent-soft: rgba(10, 192, 116, 0.12);
    /* The card's glowing edge, brightest at the ring and falling off outwards. */
    --auth-glow-ring: rgba(10, 192, 116, 0.45);
    --auth-glow-near: rgba(10, 192, 116, 0.22);
    --auth-glow-far: rgba(10, 192, 116, 0.12);
    --auth-danger: #d93a52;
    --auth-shadow: 0 18px 50px rgba(29, 34, 51, 0.1);
    --auth-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------------------------------------------------------------------------
   Layout frame
   ------------------------------------------------------------------------ */

.bottom-vector,
.top-vector {
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.top-vector {
    left: 0;
    top: 0;
}

.bottom-vector {
    bottom: 0;
    right: 0;
}

/* The theme's page.css sets `.register-section { margin-top: -105px !important }`,
   assuming this section overlaps a hero above it. This layout has no such block
   — .register-section is the only thing on the page — so that negative margin
   pulled the whole card 105px off-screen and left a matching gap at the bottom. */
.register-section {
    margin-top: 0 !important;
}

.register-section > .row {
    height: 100%;
    position: relative;
    z-index: 1;
}

.register-section > .row > .col-md-6.col-12.p-0 {
    display: flex;
}

/* Slow upward pan. The track is twice the panel's height and holds two copies
   of the image at half its height each, so one copy exactly fills the frame.
   Sliding the track up by 50% of itself — one full frame — lands the second
   copy where the first began, and the animation restarts from an identical
   picture. That is what makes the loop seamless without the artwork itself
   having to tile. */
.register-img {
    height: 100%;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.register-img__track {
    animation: auth-image-pan 40s linear infinite;
    display: flex;
    flex-direction: column;
    height: 200%;
    width: 100%;
    will-change: transform;
}

.register-img__frame {
    display: block;
    flex: 0 0 50%;
    height: 50%;
    object-fit: cover;
    width: 100%;
}

@keyframes auth-image-pan {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-50%);
    }
}

/* Pausing rather than shortening: a 40s pan collapsed to ~0s would flick
   through the whole image on every repeat, which is worse than not moving. */
@media (prefers-reduced-motion: reduce) {
    .register-img__track {
        animation: none;
    }
}

.register-section-right {
    background-color: var(--auth-panel);
    color: var(--auth-text-soft);
    position: relative;
}

/* A soft accent wash at the top of the form half. Both halves are light now, so
   this is what keeps the panel from reading as a flat sheet beside the image. */
.register-section-right::before {
    background:
        radial-gradient(55% 40% at 50% -5%, var(--auth-accent-soft), transparent 70%),
        linear-gradient(180deg, transparent 55%, var(--auth-page) 100%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.register-section-right > * {
    position: relative;
    z-index: 1;
}

/* The language picker has to outrank the card. Both are direct children, so
   they were sharing z-index 1 from the rule above, and the card — later in the
   DOM — won: the open dropdown was painted behind the form. Raising it here
   rather than dropping the card lower, because the card still has to sit above
   the panel's decorative wash. */
.register-section-right > .dropdown {
    z-index: 20;
}

/* ---------------------------------------------------------------------------
   Logo + language picker
   ------------------------------------------------------------------------ */

/* The shared `.logo-fix-size` caps at 120x60 with `object-fit: cover`, which
   crops this square (512x512) mark into a letterbox strip. Square instead. */
.auth-logo {
    border-radius: 20px;
    height: 120px;
    max-height: 120px;
    max-width: 120px;
    object-fit: contain;
    width: 120px;
}

@media (max-width: 575.98px) {
    .auth-logo {
        height: 92px;
        width: 92px;
    }
}

/* The anchor is inline by default, so the vertical margins it used to carry did
   nothing while the inline image still reserved a baseline gap beneath itself.
   A block box with no line-height leaves only the wrapper's own margin. */
.auth-logo-link {
    display: inline-block;
    line-height: 0;
}

.auth-logo-wrap {
    margin-bottom: 1.5rem;
    margin-top: 0;
}

/* Flag + name, as in the admin header's picker (app-shell.css, .lang-btn),
   but on its own white surface: this panel has a tinted glow behind it, and a
   transparent button disappeared into it. Kept clear of the panel's right
   edge, where the old `mx-10` used to put it. */
.register-section-right .auth-lang-btn {
    align-items: center;
    background-color: var(--auth-card);
    border: 1px solid var(--auth-border-strong);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(29, 34, 51, 0.06);
    color: var(--auth-text);
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 500;
    gap: 0.5rem;
    height: 40px;
    margin-right: 2rem;
    padding: 0 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 767.98px) {
    .register-section-right .auth-lang-btn {
        margin-right: 0;
    }
}

.register-section-right .auth-lang-btn:hover,
.register-section-right .auth-lang-btn[aria-expanded="true"] {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-accent-soft);
}

.register-section-right .auth-lang-btn:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 2px;
}

.register-section-right .auth-lang-btn::after {
    border-top-color: var(--auth-muted);
    margin-left: 0.1rem;
}

.register-section-right .auth-lang-btn img,
.register-section-right .auth-lang-menu img {
    border-radius: 3px;
    flex-shrink: 0;
    height: 15px;
    object-fit: cover;
    width: 20px;
}

/* Capped and scrolled: the list outgrows short screens. The cap is not a
   whole number of rows, so a half-visible item shows there is more below. */
.register-section-right .auth-lang-menu {
    background-color: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    box-shadow: var(--auth-shadow);
    max-height: 17.5rem;
    min-width: 13rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.4rem;
    scrollbar-color: var(--auth-border-strong) transparent;
    scrollbar-width: thin;
}

.register-section-right .auth-lang-menu::-webkit-scrollbar {
    width: 6px;
}

.register-section-right .auth-lang-menu::-webkit-scrollbar-thumb {
    background-color: var(--auth-border-strong);
    border-radius: 99px;
}

.register-section-right .auth-lang-menu .dropdown-item {
    border-radius: 8px;
    color: var(--auth-text-soft);
    font-size: 0.875rem;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
}

.register-section-right .auth-lang-menu .dropdown-item:hover {
    background-color: var(--auth-accent-soft);
    color: var(--auth-accent-ink);
}

/* The current language: a neutral fill, as in the header. */
.register-section-right .auth-lang-menu .dropdown-item.active {
    background-color: var(--auth-field);
    color: var(--auth-text);
}

/* ---------------------------------------------------------------------------
   Card
   ------------------------------------------------------------------------ */

/* The card carries an accent glow around its whole edge instead of the hairline
   that used to run across the top. Layered box-shadows rather than a blurred
   pseudo-element: no extra box to position, and nothing that can interfere with
   the stacking the language picker above depends on.

   Ring, near glow, far glow, then the ordinary depth shadow underneath.

   !important on the shadow because these cards carry Bootstrap shadow
   utilities, and not all of them behave the same: the theme declares
   `.shadow-lg` !important but leaves its own `.shadow-md` without it. Register
   uses shadow-lg and every other auth card uses shadow-md, so without this the
   glow appeared on five screens and silently lost on the sixth. */
.register-section-right .card-bg {
    background: var(--auth-card);
    border: 1px solid transparent;
    border-radius: 18px;
    box-shadow:
        0 0 0 1px var(--auth-glow-ring),
        0 0 22px var(--auth-glow-near),
        0 0 60px var(--auth-glow-far),
        var(--auth-shadow) !important;
    position: relative;
    transition: box-shadow 0.3s var(--auth-ease);
}

/* Brighter while someone is actually typing in it. */
.register-section-right .card-bg:focus-within {
    box-shadow:
        0 0 0 1px var(--auth-accent),
        0 0 26px var(--auth-glow-near),
        0 0 80px var(--auth-glow-far),
        var(--auth-shadow) !important;
}

.register-section-right h1 {
    color: var(--auth-text);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ---------------------------------------------------------------------------
   Form controls
   ------------------------------------------------------------------------ */

.register-section-right .form-label {
    color: var(--auth-text-soft);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.register-section-right .form-control,
.register-section-right .form-select {
    background-color: var(--auth-field);
    border: 1px solid var(--auth-border-strong);
    border-radius: 10px;
    color: var(--auth-text);
    font-size: 0.875rem;
    padding: 0.65rem 0.9rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease,
        background-color 0.18s ease;
}

.register-section-right .form-control::placeholder {
    color: var(--auth-muted);
}

.register-section-right .form-control:focus,
.register-section-right .form-select:focus {
    background-color: var(--auth-card);
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-accent-soft);
    color: var(--auth-text);
}

/* Autofill paints its own background over the field; keep it in the palette. */
.register-section-right .form-control:-webkit-autofill,
.register-section-right .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--auth-field) inset;
    -webkit-text-fill-color: var(--auth-text);
    caret-color: var(--auth-text);
}

.register-section-right .input-icon {
    color: var(--auth-muted) !important;
}

.register-section-right .form-check-input {
    /* The theme draws this box with `border: none` and a grey fill, so setting
       only border-color here left a white box on a white card. */
    background-color: var(--auth-card);
    border: 1.5px solid var(--auth-muted);
    cursor: pointer;
}

.register-section-right .form-check-input:checked {
    background-color: var(--auth-accent);
    border-color: var(--auth-accent);
}

.register-section-right .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem var(--auth-accent-soft);
}

.register-section-right .form-check-input[type="checkbox"] {
    border-radius: 0.4em;
}

.register-section-right .form-check-label {
    color: var(--auth-text-soft);
    font-size: 0.8125rem;
}

/* ---------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------ */

.register-section-right .btn {
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.6rem 1.1rem;
    transition: filter 0.18s ease, transform 0.18s var(--auth-ease),
        background-color 0.18s ease, color 0.18s ease,
        border-color 0.18s ease;
}

.register-section-right .btn:hover {
    transform: translateY(-1px);
}

.register-section-right .btn-primary,
.register-section-right .btn-info {
    background-color: var(--auth-accent);
    border-color: var(--auth-accent);
    box-shadow: 0 6px 16px rgba(10, 192, 116, 0.25);
    color: var(--auth-on-accent);
}

.register-section-right .btn-primary:hover,
.register-section-right .btn-primary:focus,
.register-section-right .btn-primary:active,
.register-section-right .btn-info:hover,
.register-section-right .btn-info:focus,
.register-section-right .btn-info:active {
    background-color: var(--auth-accent);
    border-color: var(--auth-accent);
    color: var(--auth-on-accent);
    filter: brightness(1.06);
}

.register-section-right .btn-primary:focus,
.register-section-right .btn-info:focus {
    box-shadow: 0 0 0 0.25rem var(--auth-accent-soft);
}

/* The "Login via Google" button. Kept neutral rather than red so it reads as
   the secondary option next to the accent-filled primary. */
.register-section-right .btn-danger {
    background-color: var(--auth-card);
    border-color: var(--auth-border-strong);
    box-shadow: none;
    color: var(--auth-text-soft);
}

.register-section-right .btn-danger:hover,
.register-section-right .btn-danger:focus,
.register-section-right .btn-danger:active {
    background-color: var(--auth-field);
    border-color: var(--auth-border-strong);
    color: var(--auth-text);
}

.register-section-right .btn-light,
.register-section-right .btn-light-primary {
    background-color: var(--auth-field);
    border-color: var(--auth-border);
    color: var(--auth-text-soft);
}

.register-section-right .btn-light:hover,
.register-section-right .btn-light-primary:hover {
    border-color: var(--auth-accent);
    color: var(--auth-accent-ink);
}

.register-section-right .btn:disabled,
.register-section-right .btn.disabled {
    box-shadow: none;
    opacity: 0.55;
    transform: none;
}

/* ---------------------------------------------------------------------------
   Links and text
   ------------------------------------------------------------------------ */

/* Was `.text-center { color: #fff }` — a positioning utility repurposed as a
   colour, which whitened anything centred anywhere on the page. Scoped to the
   panel's own headings and copy instead. */
.register-section-right,
.register-section-right p,
.register-section-right h1,
.register-section-right h2,
.register-section-right h3,
.register-section-right label {
    color: var(--auth-text-soft);
}

.register-section-right .text-gray-700,
.register-section-right .text-gray-600 {
    color: var(--auth-text-soft) !important;
}

/* Was the accent (#DCE222) — muted copy rendered louder than the text beside
   it. Muted now reads as muted; links inside it keep the accent. */
.register-section-right .text-muted {
    color: var(--auth-muted) !important;
}

.register-section-right .link-info,
.register-section-right .text-muted a,
.register-section-right a.font-weight-bold {
    color: var(--auth-accent-ink) !important;
    text-decoration: none;
    transition: opacity 0.18s ease;
}

.register-section-right .link-info:hover,
.register-section-right .text-muted a:hover,
.register-section-right a.font-weight-bold:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* mobile-login shows the number being verified in a .text-white span, which
   was invisible the moment this panel stopped being near-black. Alerts keep
   their white text — those still sit on a filled coloured background. */
.register-section-right .text-white:not(.alert):not(.badge) {
    color: var(--auth-text) !important;
    font-weight: 600;
}

.register-section-right .alert .text-white,
.register-section-right .alert.text-white {
    color: #fff !important;
}

.register-section-right .required::after {
    color: var(--auth-danger);
    content: " *";
}

.register-section-right .invalid-feedback,
.register-section-right .text-danger {
    color: var(--auth-danger) !important;
    font-size: 0.75rem;
}

.register-section-right .text-success {
    color: var(--auth-accent-ink) !important;
    font-size: 0.75rem;
}

/* ---------------------------------------------------------------------------
   OTP boxes
   -----------------------------------------------------------------------------
   Shared by all three screens. login.blade.php and mobile-login.blade.php each
   carried their own near-identical copy of these rules, with three overlapping
   breakpoints (600 / 400 / 848px, in that order) that fought each other; one
   clamp() replaces the lot.
   ------------------------------------------------------------------------ */

.otp-container {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(6px, 2vw, 12px);
    justify-content: center;
    margin: 1.25rem 0;
}

.otp-input {
    background-color: var(--auth-field);
    border: 1px solid var(--auth-border-strong);
    border-radius: 12px;
    caret-color: var(--auth-accent);
    color: var(--auth-text);
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    font-weight: 700;
    height: clamp(44px, 12vw, 54px);
    text-align: center;
    transition: border-color 0.18s ease, box-shadow 0.18s ease,
        background-color 0.18s ease, transform 0.18s var(--auth-ease);
    width: clamp(40px, 11vw, 50px);
}

.otp-input::placeholder {
    color: transparent;
}

.otp-input:hover {
    border-color: var(--auth-muted);
}

/* Was #007bff — Bootstrap's blue. */
.otp-input:focus {
    background-color: var(--auth-card);
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-accent-soft);
    outline: none;
    transform: translateY(-2px);
}

/* A filled box reads as done even once focus has moved on to the next one. */
.otp-input.is-filled {
    background-color: var(--auth-card);
    border-color: var(--auth-accent);
    color: var(--auth-accent-ink);
}

.otp-input:disabled {
    opacity: 0.5;
}

/* ---------------------------------------------------------------------------
   Alerts and overlay
   ------------------------------------------------------------------------ */

.register-section-right .alert {
    border-radius: 12px;
    font-size: 0.8125rem;
}

#flash-message-container {
    top: 20px;
}

#overlay {
    align-items: center;
    background: rgba(29, 34, 51, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    display: none;
    height: 100%;
    justify-content: center;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
}

#loader {
    height: 400px;
    width: 400px;
}

.custom-toast-popup {
    color: #140707;
    font-family: "Arial", sans-serif;
    font-size: 14px;
}

@media (max-width: 390px) {
    .loginViaGoogle button {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .register-section-right *,
    .otp-input {
        transition-duration: 0.001ms !important;
    }
}
