/* ============================================================
   Shared modern styles for piidetectionapi.com auth pages
   (login.php, registration.php, registration_plan_*.php)
   Matches the public site design: Plus Jakarta Sans / Inter,
   blue gradient palette (#1680fb -> #185abd), card UI.
   Loaded AFTER the legacy template CSS so it wins the cascade.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Fixed-header clearance (overlap fix) ----------
   The site-wide header (../header.php) is position:fixed with
   z-index 99999 and ~80px height. These pages had no top
   offset, so the header covered the top of the forms. */
body {
    padding-top: 100px !important;
    font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edf5 50%, #f0f4ff 100%) !important;
    background-attachment: fixed !important;
    color: #1e293b;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

@media (max-width: 768px) {
    body { padding-top: 88px !important; }
}

/* Neutralise legacy hero backgrounds / oversized spacers */
#main-hero,
.hero-body {
    background: transparent !important;
    padding-top: 30px !important;
    padding-bottom: 70px !important;
}
.hero.is-theme-primary { background: transparent !important; }

h1, h2, h3, h4, h5 {
    font-family: "Plus Jakarta Sans", "Inter", sans-serif !important;
    color: #0f172a;
}

p, a { font-size: 0.95rem !important; line-height: 1.6; }

::placeholder { font-size: 0.85rem !important; color: #94a3b8 !important; }

/* ---------- Card ---------- */
.clean-login-card,
.wavy-login-card,
.wavy-signup-card,
.clean-signup-card,
.quick-signup {
    padding: 0 !important;
    border-radius: 20px !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04) !important;
    overflow: hidden;
}

.form-module {
    position: relative;
    background: #ffffff !important;
    max-width: 520px !important;
    width: 100%;
    border-top: none !important;
    box-shadow: none !important;
    margin: 0 auto !important;
    padding: 36px 40px 30px !important;
}

.form-module h2 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 24px !important;
    text-align: center;
    letter-spacing: -0.3px;
}

/* ---------- Inputs (both .form-control and legacy .material-input) ---------- */
.form-module .form-control,
.form-module .material-input,
.form-module input[type="text"],
.form-module input[type="password"],
.form-module input[type="email"] {
    width: 100% !important;
    padding: 14px 18px !important;
    font-size: 0.9rem !important;
    font-family: "Inter", sans-serif !important;
    color: #1e293b !important;
    background: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    margin-bottom: 14px !important;
    transition: all 0.25s ease;
    outline: none !important;
    box-shadow: none !important;
    height: auto !important;
}

.form-module .form-control:focus,
.form-module .material-input:focus,
.form-module input[type="text"]:focus,
.form-module input[type="password"]:focus,
.form-module input[type="email"]:focus {
    border-color: #1680fb !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(22,128,251,0.12) !important;
}

/* ---------- Buttons (site gradient) ---------- */
.form-module .btn-primary,
.form-module button[type="submit"],
.form-module button:not([type]),
.form-module .primary-btn,
.form-module .button-cta {
    width: 100% !important;
    padding: 14px 24px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #1680fb 0%, #185abd 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    margin-top: 8px;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 14px rgba(22,128,251,0.3) !important;
    height: auto !important;
    line-height: 1.4 !important;
}

.form-module .btn-primary:hover,
.form-module button[type="submit"]:hover,
.form-module button:not([type]):hover,
.form-module .primary-btn:hover,
.form-module .button-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22,128,251,0.4) !important;
    background: linear-gradient(135deg, #185abd 0%, #134a9e 100%) !important;
}

/* ---------- Validation / helper text ---------- */
.help-block {
    color: #ef4444 !important;
    font-size: 0.8rem !important;
    margin-top: -8px;
    margin-bottom: 10px;
    padding-left: 4px;
    text-align: left;
}

.g-recaptcha {
    margin: 12px 0 8px;
    display: flex;
    justify-content: center;
}

/* ---------- Register / Login toggle chip ---------- */
.form-module .toggle {
    position: relative !important;
    display: inline-block;
    margin: 0 auto 14px;
    padding: 8px 18px !important;
    width: auto !important;
    height: auto !important;
    background: linear-gradient(135deg, #1680fb 0%, #185abd 100%) !important;
    color: #ffffff !important;
    font-size: 0.85rem !important;
    font-weight: 600;
    border-radius: 999px !important;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 14px rgba(22,128,251,0.25);
    transition: all 0.25s ease;
    top: auto !important;
    right: auto !important;
    line-height: 1.4 !important;
}
.form-module .toggle:hover { transform: translateY(-1px); }
.form-module .toggle i { margin-right: 6px; font-size: 0.8rem !important; }
.form-module .toggle .tooltip { display: none !important; }

/* Center the toggle chips */
.form-module { text-align: center; }
.form-module form { text-align: left; }

/* ---------- Status / success blocks ---------- */
.form-module .login { text-align: center; padding: 10px 0; }
.form-module .login h1 {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: #0f172a !important;
    margin-bottom: 16px;
}
.form-module .login p { color: #475569 !important; line-height: 1.7; }

/* ---------- Bottom CTA bar (forgot password) ---------- */
.cta {
    padding: 14px 20px !important;
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}
.cta a {
    color: #1680fb !important;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.88rem !important;
}
.cta a:hover { color: #185abd !important; text-decoration: underline; }

/* ---------- Logged-in / profile panels ---------- */
#form-loggedin h2 { font-size: 1.3rem !important; font-weight: 600; color: #0f172a !important; }
#form-loggedin ul { text-align: left; padding-left: 20px; margin: 12px 0; }
#form-loggedin li { color: #475569; margin-bottom: 6px; line-height: 1.6; }
#form-loggedin a, #form-userprofile a, #form-edituser a {
    color: #1680fb !important;
    font-weight: 600;
    text-decoration: none;
}
#form-loggedin a:hover, #form-userprofile a:hover, #form-edituser a:hover { text-decoration: underline; }
#form-userprofile, #form-edituser { text-align: left; }
#form-userprofile p, #form-edituser p { margin-bottom: 6px; }

.im { font-family: "Plus Jakarta Sans", "Inter", sans-serif !important; }

/* ---------- Recover card ---------- */
#recover-card .clean-login-card { padding: 32px !important; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .clean-login-card,
    .wavy-login-card { margin: 0 12px !important; border-radius: 16px !important; }
    .form-module { padding: 28px 24px 24px !important; }
    .form-module h2 { font-size: 1.3rem !important; }
}
