/* =====================================================================
   ADT GPS TRACKER  |  adt-public.css
   Layout for the public zone only:
     index.php กค login.php กค signup.php
     verify_signup_otp.php กค forgot_password.php กค admin_login.php

   Requires adt-core.css to be loaded first.
   ===================================================================== */


/* =====================================================================
   1. AUTH CARD  (login, signup, verify, forgot)
   ===================================================================== */

.auth-container {
    width: 100%;
    max-width: 460px;
    margin: 2.5rem auto;
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.auth-container h1 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: .4rem;
}
.auth-container h1 i { color: var(--primary); margin-right: .35rem; }

.auth-sub {
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.auth-sub b { color: var(--text); word-break: break-all; }

.auth-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .85rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-size: .9rem;
}
.auth-links a {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-weight: 500;
    text-decoration: none;
}
.auth-links a:hover { text-decoration: underline; }

.back-link { text-align: center; margin-top: 1.25rem; font-size: .88rem; }
.back-link a { color: var(--muted); text-decoration: none; }
.back-link a:hover { color: var(--primary); }

/* countdown line under an OTP box */
.otp-timer {
    text-align: center;
    font-size: .88rem;
    color: var(--muted);
    margin: -.4rem 0 1.2rem;
}
.otp-timer b { color: var(--primary); font-variant-numeric: tabular-nums; }
.otp-timer.expired b { color: var(--danger-ink); }

.resend-row {
    text-align: center;
    margin-top: 1.3rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
    font-size: .9rem;
    color: var(--muted);
}
.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-family: inherit;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    padding: 0;
}
.btn-link:disabled { color: var(--muted); cursor: not-allowed; }

@media (min-width: 768px) {
    .auth-container { margin: 3.5rem auto; padding: 2.25rem; }
    .auth-container h1 { font-size: 1.75rem; }
}


/* =====================================================================
   2. LANDING PAGE  (index.php)
   ===================================================================== */

.hero {
    text-align: center;
    padding: 3rem 0 2.5rem;
}

.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .9rem;
    margin-bottom: 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: .8rem;
    font-weight: 600;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 1rem;
}
.hero h1 .accent { color: var(--primary); }

.hero p.lead {
    font-size: 1.02rem;
    color: var(--muted);
    max-width: 620px;
    margin: 0 auto 2rem;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
    max-width: 320px;
    margin: 0 auto;
}

.trust-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 2.25rem;
    font-size: .85rem;
    color: var(--muted);
}
.trust-row span { display: flex; align-items: center; gap: .4rem; }
.trust-row i { color: var(--primary); }

@media (min-width: 768px) {
    .hero { padding: 4.5rem 0 3rem; }
    .hero h1 { font-size: 3rem; }
    .hero p.lead { font-size: 1.15rem; }
    .cta-buttons {
        flex-direction: row;
        justify-content: center;
        max-width: none;
    }
    /* every call to action gets the same width, whatever the label says,
       so the row reads as one set rather than three odd shapes */
    .cta-buttons .btn { min-width: 210px; }
}


/* =====================================================================
   3. FEATURE CARDS
   ===================================================================== */

.section-title {
    text-align: center;
    margin-bottom: .5rem;
    font-size: 1.4rem;
}
.section-sub {
    text-align: center;
    color: var(--muted);
    font-size: .95rem;
    margin-bottom: 2rem;
}

.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
    margin-bottom: 1rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.6rem;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(67, 97, 238, .25);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    background: var(--primary-soft);
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.feature-card p  { font-size: .93rem; color: var(--muted); margin: 0; }

@media (min-width: 640px) {
    .features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .features { grid-template-columns: repeat(3, 1fr); }
    .section-title { font-size: 1.75rem; }
}


/* =====================================================================
   4. ADMIN LOGIN VARIANT
   The admin side keeps a darker header so the two portals never look
   the same at a glance.
   ===================================================================== */

.admin-header {
    background: #1a1a2e;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
}
.admin-header #branding h1,
.admin-header #branding h1 a { color: #fff; }
.admin-header .back { color: #cbd5e1; font-size: .9rem; text-decoration: none; }
.admin-header .back:hover { color: #fff; }

.auth-container.is-admin { border-top: 3px solid #1a1a2e; }
.auth-container.is-admin h1 i { color: #1a1a2e; }

html.dark-mode .auth-container.is-admin,
body.dark-mode .auth-container.is-admin { border-top-color: #7c9dff; }
html.dark-mode .auth-container.is-admin h1 i,
body.dark-mode .auth-container.is-admin h1 i { color: #7c9dff; }