/* ==========================================================================
   1. COLOUR TOKENS
   Change a colour here and it updates everywhere on the auth pages.
   The primary colour matches the logo and the app-wide primary (#5145E5).
   ========================================================================== */
:root {
    --zl-primary: #5145E5;        /* main brand indigo: buttons, links, focus */
    --zl-primary-dark: #3B31C7;   /* darker end of the button gradient */
    --zl-primary-light: #8F86FF;  /* light indigo: icons, headline gradient */
    --zl-accent: #22D3EE;         /* cyan (the dot in the logo): highlights */
    --zl-deep: #0D0A2B;           /* darkest background colour */
    --zl-deep-2: #17124A;         /* second background colour (gradient) */
    --zl-text: #1B1A33;           /* dark text inside the white card */
    --zl-muted: #6B6A85;          /* grey secondary text inside the card */
    --zl-border: #E3E2F0;         /* input / divider borders */
    --zl-field: #F6F5FD;          /* input background (very light lilac) */
}


/* ==========================================================================
   2. PAGE BACKGROUND
   ========================================================================== */
body {
    background: var(--zl-deep);   /* shows if the page is shorter than the screen */
    font-family: 'Inter', sans-serif;
    margin: 0;
}

/* Full-screen wrapper. Lays out the left hero and right card side by side. */
.zl-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    position: relative;
    overflow: hidden;             /* clips the big globe at the screen edges */

    /* Three background layers, top to bottom:
       1) soft indigo glow behind the globe
       2) faint cyan glow in the bottom-right corner
       3) the dark diagonal base gradient */
    background:
        radial-gradient(1200px 700px at 30% 55%, rgba(81, 69, 229, .35), transparent 60%),
        radial-gradient(700px 500px at 90% 100%, rgba(34, 211, 238, .12), transparent 60%),
        linear-gradient(135deg, var(--zl-deep) 0%, var(--zl-deep-2) 55%, #0B0926 100%);
}

/* Decorative waves along the bottom of the page (the <svg> in the layout).
   pointer-events: none means it can never block clicks. */
.zl-waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 260px;
    pointer-events: none;
    z-index: 0;                   /* behind everything else */
}


/* ==========================================================================
   3. LEFT HERO: BRAND, TEXT, FEATURES
   ========================================================================== */

/* Left side container: takes ~58% of the width.
   Stacked top to bottom: brand, body (text + globe), copyright. */
.zl-hero {
    flex: 1 1 58%;
    position: relative;
    padding: 40px 56px;
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* Logo + company name in the top-left corner (links to the home page) */
.zl-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    position: relative;
    z-index: 2;
}
.zl-brand:hover { color: #fff; }
.zl-brand img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(81, 69, 229, .45);   /* indigo glow */
}
.zl-brand span {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.3px;
}

/* Middle of the hero: a 2-column grid.
   Column 1 = text (300–400px wide), column 2 = globe (takes the rest).
   Because they are separate columns, the text and globe icons never overlap.
   (Only the big globe canvas reaches behind the text, on purpose.) */
.zl-hero-body {
    flex: 1;                      /* fill the space between brand and copyright */
    display: grid;
    grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
    align-items: center;          /* vertically centre both columns */
    gap: 32px;
    padding: 24px 0;
}

/* Text column. z-index 2 keeps the text ABOVE the globe canvas. */
.zl-intro {
    position: relative;
    z-index: 2;
}

/* "Global Commerce" pill above the headline */
.zl-pill {
    position: relative;
    z-index: 2;
    display: inline-block;
    width: fit-content;
    padding: 6px 16px;
    border: 1px solid rgba(143, 134, 255, .45);
    border-radius: 999px;         /* fully rounded ends */
    background: rgba(81, 69, 229, .15);
    color: #D9D6FF;
    font-size: 13px;
}

/* "Sell Everywhere." headline */
.zl-headline {
    position: relative;
    z-index: 2;
    margin-top: 22px;
    font-size: 46px;
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -1px;
    color: #fff;
}

/* "Grow Faster." line: the <em> inside the headline.
   Shows an indigo-to-cyan gradient through the text: the gradient is the
   background, clipped to the letter shapes, and the text colour is transparent. */
.zl-headline em {
    display: block;               /* puts it on its own line */
    font-style: normal;           /* <em> is italic by default; undo that */
    background: linear-gradient(90deg, var(--zl-primary-light), var(--zl-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Description paragraph under the headline */
.zl-lead {
    position: relative;
    z-index: 2;
    margin-top: 18px;
    max-width: 340px;             /* keeps lines short and readable */
    color: #C9C7E8;
    font-size: 15px;
    line-height: 1.6;
}

/* The 4 feature items (Real-time Sync, Order Tracking, ...) in a 2x2 grid */
.zl-features {
    position: relative;
    z-index: 2;
    margin-top: 44px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 190px));
    gap: 16px 20px;               /* row gap, column gap */
}

/* One feature item: icon tile + label */
.zl-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #E4E2FF;
}

/* The small rounded square holding each feature icon.
   (A <span> wrapper is used because Font Awesome swaps <i> tags for <svg>.) */
.zl-feature .zl-fi {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(81, 69, 229, .22);
    border: 1px solid rgba(143, 134, 255, .35);
    color: var(--zl-primary-light);
    font-size: 14px;
    backdrop-filter: blur(4px);   /* frosted-glass look over the globe */
}

/* "© 2026 Company. All rights reserved." at the bottom-left */
.zl-copy {
    position: relative;
    z-index: 2;
    font-size: 12px;
    color: #8F8DB5;
}


/* ==========================================================================
   4. LEFT HERO: GLOBE + ORBITING CHANNEL ICONS

   Everything here is sized relative to .zl-orbit (a square box).
   To make the whole visual bigger or smaller, change the 440px in .zl-orbit.

   Size knobs:
     - Globe size ........ .zl-globe  inset / width / height
     - Icon circle size .. .zl-ring   inset
     - Centre logo size .. .zl-center width
     - Rotation speed .... the two "40s" values (.zl-chip and .zl-ring)
   ========================================================================== */

/* Globe column: centres the orbit box inside it */
.zl-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;                 /* lets the grid column shrink without overflowing */
}

/* Square box (max 440px) that the globe, logo and icons are centred in */
.zl-orbit {
    position: relative;
    width: min(100%, 440px);
    aspect-ratio: 1 / 1;          /* always a perfect square */
    pointer-events: none;         /* purely decorative, never blocks clicks */
}

/* The rotating Earth <canvas> (drawn by public/auth/globe.js).
   It is deliberately much BIGGER than .zl-orbit so it works as a backdrop
   behind the whole left side, like the design mockup.
     inset: -60%  -> sticks out 60% of the box size on every side
     width/height: 220%  -> must equal 100% + 2 x inset (100 + 60 + 60)
   Example: inset -40% with width/height 180% makes it smaller.
   It still sits behind the text because .zl-intro has a higher z-index. */
.zl-globe {
    position: absolute;
    inset: -60%;
    width: 220%;
    height: 220%;
    opacity: .9;
}

/* Company logo in the exact centre, with a breathing glow (zl-pulse) */
.zl-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);   /* centre on its own middle point */
    width: 22%;                         /* 22% of the orbit box */
    aspect-ratio: 1 / 1;
    border-radius: 24%;
    z-index: 3;                         /* above the connector lines, which start under it */
    animation: zl-pulse 3.5s ease-in-out infinite;
}
.zl-center img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 24%;
}

/* Glow behind the centre logo: grows and fades between indigo and cyan */
@keyframes zl-pulse {
    0%, 100% { box-shadow: 0 0 0 10px rgba(81, 69, 229, .25), 0 0 60px rgba(81, 69, 229, .9); }
    50%      { box-shadow: 0 0 0 16px rgba(81, 69, 229, .12), 0 0 90px rgba(34, 211, 238, .6); }
}

/* --- Orbiting channel icons ---------------------------------------------
   How the orbit works:
     1. .zl-ring is an invisible square holding all 6 icons. It rotates
        360° clockwise, which carries the icons around in a circle.
     2. Each .zl-chip rotates -360° (anticlockwise) at the SAME speed,
        cancelling out the ring's spin so the logos stay upright.
   Both durations must match (40s), or the icons will slowly tilt.
   Lower = faster (e.g. 25s), higher = slower (e.g. 60s).

   Icon positions are set inline in guest.blade.php as left/top
   percentages, spaced every 60° around the ring.
   ------------------------------------------------------------------------ */

/* Ring the icons sit on.
   inset: -15% makes the ring 30% bigger than the orbit box, so the icons
   orbit further out from the centre logo.
   More negative (e.g. -20%) = wider circle, 0 = tighter circle. */
.zl-ring {
    position: absolute;
    inset: -15%;
    animation: zl-ring-spin 40s linear infinite;
}
@keyframes zl-ring-spin {
    to { transform: rotate(360deg); }
}

/* One channel icon: a white rounded tile with the platform logo */
.zl-chip {
    position: absolute;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    transform: translate(-50%, -50%);   /* left/top point at the tile's centre */
    animation: zl-counter 40s linear infinite;
}
.zl-chip img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

/* Counter-rotation that keeps each icon upright (see note above).
   translate(-50%, -50%) is repeated here because animating "transform"
   replaces the whole transform value, including the centring. */
@keyframes zl-counter {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(-360deg); }
}

/* --- Connector lines (centre logo -> each icon) -------------------------
   An <svg> inside .zl-ring, so the lines rotate together with the icons
   and always stay attached to them.
   The svg uses a 0-100 coordinate box, so each line's end point is simply
   the icon's left/top percentage from guest.blade.php.
   If you move an icon, update its matching <line> x2/y2 too.
   ------------------------------------------------------------------------ */
.zl-links {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.zl-links line {
    stroke: url(#zlLinkGradient);     /* gradient defined inside the svg */
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 4 6;            /* 4px dash, 6px gap */
    vector-effect: non-scaling-stroke; /* keep the width/dashes in real pixels */
    animation: zl-link-flow 1.2s linear infinite;
}

/* Moves the dashes along each line from the icon towards the centre,
   like data flowing in. Swap to +20 to flow outwards instead. */
@keyframes zl-link-flow {
    to { stroke-dashoffset: -20; }
}


/* ==========================================================================
   5. RIGHT CARD: CONTAINER + HEADINGS
   ========================================================================== */

/* Right side container: takes ~42% of the width and centres the card */
.zl-side {
    flex: 0 0 42%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 40px;
    z-index: 1;
}

/* The white card that holds each page's form */
.zl-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 22px;
    padding: 36px 34px 26px;      /* top, left/right, bottom */
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

/* Logo + company name at the top of the card */
.zl-card-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.zl-card-brand img {
    width: 40px;
    height: 40px;
    border-radius: 11px;
}
.zl-card-brand span {
    font-size: 20px;
    font-weight: 700;
    color: var(--zl-text);
}

/* Page title, e.g. "Welcome back 👋" or "Forgot password?" */
.zl-title {
    margin: 22px 0 4px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--zl-text);
}

/* Indigo subtitle under the title */
.zl-sub {
    margin-bottom: 24px;
    color: var(--zl-primary);
    font-size: 14px;
}

/* Plain grey paragraph (used on the confirm-password page) */
.zl-text {
    margin-bottom: 20px;
    color: var(--zl-muted);
    font-size: 14px;
    line-height: 1.6;
}


/* ==========================================================================
   6. FORM FIELDS

   Markup pattern used by every page:

     <div class="zl-label"><label>Email</label> [optional link]</div>
     <div class="zl-field">
         <i class="... zl-ico"></i>             <- icon on the left
         <input class="form-control">
         <span class="toggle-password"></span>  <- optional eye on the right
     </div>
   ========================================================================== */

/* Label row: label on the left, optional link (e.g. "Forgot password?") on the right */
.zl-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--zl-text);
}
.zl-label label { margin: 0; }
.zl-label a {
    font-size: 12px;
    font-weight: 500;
    color: var(--zl-primary);
    text-decoration: none;
}
.zl-label a:hover { text-decoration: underline; }

/* Wrapper around one input, so icons can be positioned inside it */
.zl-field {
    position: relative;
    margin-bottom: 18px;
}

/* Icon inside the input on the left (envelope, lock, ...).
   Uses a class rather than "i" because Font Awesome's script replaces
   <i> tags with <svg> tags (it keeps the classes). */
.zl-field > .zl-ico {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);  /* vertically centred */
    color: #8C8AA8;
    font-size: 14px;
    pointer-events: none;         /* clicks go through to the input */
}

/* The input itself. Side padding leaves room for the left icon and the eye. */
.zl-field .form-control {
    height: 48px;
    padding-left: 44px;
    padding-right: 44px;
    background: var(--zl-field);
    border: 1px solid var(--zl-border);
    border-radius: 11px;
    font-size: 14px;
    color: var(--zl-text);
}

/* Focused input: turns white with an indigo border and soft ring */
.zl-field .form-control:focus {
    background: #fff;
    border-color: var(--zl-primary);
    box-shadow: 0 0 0 4px rgba(81, 69, 229, .14);
}

/* Read-only input (the email on the reset-password page) looks greyed out */
.zl-field .form-control[readonly] { color: var(--zl-muted); }

/* Show/hide password eye on the right.
   The click behaviour comes from public/backend/assets/js/script.js
   (it toggles any ".pass-input" between password and text). */
.zl-field .toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #8C8AA8;
    cursor: pointer;
}

/* "Keep me signed in" checkbox row */
.zl-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--zl-muted);
    cursor: pointer;
}
.zl-remember input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--zl-primary);   /* indigo tick box */
}


/* ==========================================================================
   7. MESSAGES
   ========================================================================== */

/* Red validation error shown under a field (from Laravel's @error).
   Negative top margin pulls it up close to the field above. */
.zl-error {
    margin: -12px 0 14px;
    color: #D93848;
    font-size: 12px;
}

/* Green success box, e.g. "We have emailed your password reset link." */
.zl-status {
    margin-bottom: 18px;
    padding: 10px 14px;
    background: rgba(34, 197, 94, .1);
    border: 1px solid rgba(34, 197, 94, .3);
    border-radius: 10px;
    color: #15803D;
    font-size: 13px;
}


/* ==========================================================================
   8. BUTTONS + LINKS
   ========================================================================== */

/* Main submit button (Sign In / Send Reset Link / Reset Password).
   !important is needed to beat the theme's .btn styles in style.css. */
.zl-submit {
    height: 50px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--zl-primary) 0%, var(--zl-primary-dark) 100%) !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(81, 69, 229, .35) !important;
    transition: transform .15s ease, box-shadow .15s ease;
}
.zl-submit:hover {
    transform: translateY(-1px);  /* lifts slightly on hover */
    box-shadow: 0 14px 30px rgba(81, 69, 229, .45) !important;
}
.zl-submit:disabled {             /* while the form is submitting */
    opacity: .75;
    transform: none;
}

/* "──── OR ────" divider. The lines are the ::before / ::after pseudo-elements. */
.zl-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #A3A1BC;
    font-size: 12px;
}
.zl-or::before,
.zl-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--zl-border);
}

/* "Continue with Google" button.
   Only shown once a route named "auth.google" exists (see login.blade.php). */
.zl-google {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--zl-border);
    border-radius: 11px;
    background: #fff;
    color: var(--zl-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.zl-google:hover {
    background: var(--zl-field);
    color: var(--zl-text);
}

/* Small centred link line under a form, e.g. "Remembered it? Back to sign in" */
.zl-alt {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--zl-muted);
}
.zl-alt a {
    color: var(--zl-primary);
    font-weight: 600;
    text-decoration: none;
}
.zl-alt a:hover { text-decoration: underline; }

/* "🛡 Your connection is secure and encrypted." at the bottom of the card */
.zl-secure {
    margin-top: 22px;
    text-align: center;
    font-size: 12px;
    color: var(--zl-muted);
}
.zl-secure .zl-si {
    margin-right: 6px;
    color: var(--zl-primary);
}


/* ==========================================================================
   9. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Laptops (below 1400px): slightly tighter padding and a smaller headline */
@media (max-width: 1399.98px) {
    .zl-hero { padding: 36px 40px; }
    .zl-headline { font-size: 40px; }
}

/* Small laptops (below 1200px): not enough room for text AND globe,
   so keep the text and hide the globe column. */
@media (max-width: 1199.98px) {
    .zl-hero-body { grid-template-columns: 1fr; }
    .zl-visual { display: none; }
}

/* Tablets and phones (below 992px): hide the whole left side and
   let the login card take the full width. */
@media (max-width: 991.98px) {
    .zl-hero { display: none; }
    .zl-side {
        flex: 1 1 100%;
        padding: 24px 16px;
    }
}


/* ==========================================================================
   10. REDUCED MOTION (ACCESSIBILITY)
   Visitors who turned on "reduce motion" in their OS settings get a still
   page. The globe also stops spinning (handled in globe.js).
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .zl-ring,
    .zl-chip,
    .zl-center,
    .zl-links line { animation: none; }
}
