/* login_v2.css — extends brand design system for the login page */

:root{
    /* brand tokens — constant regardless of theme */
    --base:#010799;
    --grad-start:#010799;
    --grad-end:#0ab5ff;
    --critical:#c10003;
    --whatsapp:#25D366;
    --whatsapp-dim: rgba(37,211,102,0.14);

    /* hero banner is always the colorful gradient card, so its internal
       palette does not switch with the page theme */
    --fg-on-dark:#ffffff;
    --muted-on-dark: rgba(255,255,255,0.72);
    --accent-on-dark:#0dffcb;
    --accent-dim-on-dark: rgba(13,255,203,0.22);
    --panel-on-dark: rgba(255,255,255,0.12);
    --line-on-dark: rgba(255,255,255,0.32);

    /* ---- dark theme tokens (base values, overridden below for light) ---- */
    --canvas:#05070f;
    --surface: rgba(255,255,255,0.06);
    --surface-hover: rgba(255,255,255,0.1);
    --shadow-card: none;
    --topbar-bg: rgba(5,7,15,0.75);
    --line: rgba(255,255,255,0.14);
    --line-strong: rgba(255,255,255,0.26);
    --fg:#f5f8ff;
    --muted: rgba(245,248,255,0.62);
    --accent-rgb: 13,255,203;
    --accent-text:#0dffcb;
    --accent-text-dim: rgba(13,255,203,0.16);
    --critical-text:#ff9a9b;
    --critical-dim: rgba(193,0,3,0.2);
    --row-hover: rgba(255,255,255,0.03);

    --radius:14px;
    --font-display:'Manrope', sans-serif;
    --font-body:'Inter', sans-serif;
    --font-mono:'JetBrains Mono', monospace;
  }

  :root[data-theme="light"]{
    --canvas:#f3f5fa;
    --surface:#ffffff;
    --surface-hover:#eef1f7;
    --shadow-card: 0 1px 2px rgba(5,7,15,0.05), 0 6px 16px rgba(5,7,15,0.05);
    --topbar-bg: rgba(255,255,255,0.8);
    --line: rgba(5,7,15,0.08);
    --line-strong: rgba(5,7,15,0.16);
    --fg:#05070f;
    --muted:#5b6472;
    --accent-rgb: 0,135,95;
    --accent-text:#00875f;
    --accent-text-dim: rgba(0,135,95,0.12);
    --critical-text:#c10003;
    --critical-dim: rgba(193,0,3,0.12);
    --row-hover: rgba(5,7,15,0.025);
  }

  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  body{
    background:var(--canvas);
    color:var(--fg);
    font-family:var(--font-body);
    line-height:1.5;
    -webkit-font-smoothing:antialiased;
    transition:background-color .2s ease, color .2s ease;
  }

  a{color:inherit;}
  button{font:inherit;color:inherit;}

  :focus-visible{
    outline:2px solid var(--accent-text);
    outline-offset:2px;
    border-radius:4px;
  }

  .bg-grid{
    position:fixed;
    inset:0;
    background-image:
      linear-gradient(var(--line) 1px, transparent 1px),
      linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size:48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 10%, transparent 75%);
    pointer-events:none;
    z-index:0;
  }
  .shell{position:relative; z-index:1; min-height:100vh; display:flex; flex-direction:column;}

  .section-inner{
    max-width:1180px;
    margin:0 auto;
    padding-left:24px;
    padding-right:24px;
  }

  /* ---------- Topbar ---------- */
  .topbar{
    border-bottom:1px solid var(--line);
    background:var(--topbar-bg);
    backdrop-filter:blur(10px);
    position:sticky;
    top:0;
    z-index:10;
  }
  .topbar-inner{
    max-width:1180px;
    margin:0 auto;
    padding:16px 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
  }
  .brand{
    display:flex;
    align-items:center;
    gap:10px;
  }
  .brand-logo{
    height:42px;
    width:auto;
    display:block;
  }
  .brand-logo-light{ display:none; }
  :root[data-theme="light"] .brand-logo-dark{ display:none; }
  :root[data-theme="light"] .brand-logo-light{ display:block; }
  .brand-tag{
    font-size:12px;
    color:var(--muted);
    letter-spacing:0.04em;
    text-transform:uppercase;
  }
  .topbar-actions{
    display:flex;
    align-items:center;
    gap:14px;
  }
  .theme-toggle{
    display:flex;
    align-items:center;
    justify-content:center;
    width:36px;
    height:36px;
    border:1px solid var(--line-strong);
    border-radius:50%;
    background:transparent;
    color:var(--muted);
    cursor:pointer;
    transition:border-color .15s ease, color .15s ease, background .15s ease;
  }
  .theme-toggle:hover{
    color:var(--accent-text);
    border-color:var(--accent-text);
    background:var(--surface-hover);
  }
  .theme-toggle svg{ width:17px; height:17px; }
  .theme-toggle .icon-moon{ display:none; }
  :root[data-theme="light"] .theme-toggle .icon-sun{ display:none; }
  :root[data-theme="light"] .theme-toggle .icon-moon{ display:block; }

  /* ---------- Auth card (Login — page-specific) ---------- */
  .auth{
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:40px 24px;
  }
  .auth-card{
    width:100%;
    max-width:400px;
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:var(--radius);
    box-shadow:var(--shadow-card);
    padding:40px 36px;
    text-align:center;
  }
  .auth-logo{
    width:64px;
    height:64px;
    margin:0 auto 20px;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .auth-logo-img{
    width:100%;
    height:auto;
    display:block;
  }
  .auth-card h1{
    margin:0 0 6px;
    font-family:var(--font-display);
    font-weight:800;
    font-size:22px;
    letter-spacing:-0.01em;
  }
  .auth-sub{
    margin:0 0 28px;
    color:var(--muted);
    font-size:13px;
  }
  .auth-form{
    text-align:left;
  }
  .field{
    margin-bottom:16px;
  }
  .field label{
    display:block;
    margin-bottom:6px;
    font-size:12px;
    font-weight:600;
    color:var(--muted);
  }
  .field input{
    width:100%;
    padding:12px 14px;
    border-radius:var(--radius);
    border:1px solid var(--line-strong);
    background:var(--canvas);
    color:var(--fg);
    font:inherit;
    font-size:14px;
    transition:border-color .15s ease;
  }
  .field input::placeholder{ color:var(--muted); }
  .field input:focus{
    outline:none;
    border-color:var(--accent-text);
  }
  .password-wrap{
    position:relative;
    display:flex;
    align-items:center;
  }
  .password-wrap input{ padding-right:44px; }
  .password-toggle{
    position:absolute;
    right:6px;
    display:flex;
    align-items:center;
    justify-content:center;
    width:32px;
    height:32px;
    border:none;
    border-radius:8px;
    background:transparent;
    color:var(--muted);
    cursor:pointer;
    transition:color .15s ease, background .15s ease;
  }
  .password-toggle:hover{ color:var(--fg); background:var(--surface-hover); }
  .password-toggle svg{ width:17px; height:17px; }
  .password-toggle .icon-eye-off{ display:none; }
  .password-toggle.is-visible .icon-eye{ display:none; }
  .password-toggle.is-visible .icon-eye-off{ display:block; }

  .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:13px 22px;
    border-radius:999px;
    font-weight:700;
    font-size:14px;
    border:none;
    cursor:pointer;
    text-decoration:none;
    transition:opacity .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  }
  .btn-primary{
    width:100%;
    margin-top:8px;
    background:linear-gradient(135deg, var(--grad-start), var(--grad-end));
    color:#ffffff;
    box-shadow:0 12px 28px -12px rgba(1,7,153,0.55);
  }
  .btn-primary:hover{ opacity:0.92; }

  footer{
    border-top:1px solid var(--line);
    padding:24px 0;
  }
  .footer-inner{
    max-width:1180px;
    margin:0 auto;
    padding:0 24px;
    display:flex;
    justify-content:space-between;
    color:var(--muted);
    font-size:12px;
  }

  /* ---------- Page entrance animation ---------- */
  @keyframes fadeDown{
    from{ opacity:0; transform:translateY(-14px); }
    to{ opacity:1; transform:translateY(0); }
  }
  @keyframes fadeUp{
    from{ opacity:0; transform:translateY(18px); }
    to{ opacity:1; transform:translateY(0); }
  }
  @keyframes fadeIn{
    from{ opacity:0; }
    to{ opacity:1; }
  }

  .topbar{
    opacity:0;
    animation:fadeDown .6s cubic-bezier(.22,.75,.32,1) forwards;
  }
  .auth-card{
    opacity:0;
    animation:fadeUp .6s cubic-bezier(.22,.75,.32,1) .15s forwards;
  }
  footer{
    opacity:0;
    animation:fadeIn .6s ease .4s forwards;
  }

  @media (prefers-reduced-motion: reduce){
    .topbar, .auth-card, footer{ animation:none; opacity:1; }
  }

  /* ---------- Responsive ---------- */
  @media (max-width: 640px){
    .topbar-inner{ padding:14px 16px; }
    .section-inner, .footer-inner{ padding-left:16px; padding-right:16px; }
    .auth-card{ padding:32px 24px; }
  }

/* Extra auth-specific overrides live here if needed.
   Shared brand tokens are always loaded via asset('mockups/css/brand.css') 
   but we keep this file for login-specific customizations. */

/* ---- re-use the brand design tokens (already present in brand.css via layout) ---- */

/* Ensure auth section always fills the remaining viewport */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

/* reCAPTCHA badge repositioning */
.grecaptcha-badge { visibility: hidden; }
