﻿:root{
    --ink:#16223A; --muted:#6B7787; --line:#E2E6EC;
    --green:#1FA97E; --green-hover:#178A66; --amber:#F2B441;
    --field-bg:#FFFFFF; --blue:#2F86D6; --blue-hover:#2670BD;
    --brand:#00a0df; --glass-bg:rgba(255,255,255,.35); --glass-bd:rgba(255,255,255,.55); --panel-sh:0 18px 40px rgba(0,0,0,.25);
    --font:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  }
  *{box-sizing:border-box}
  html,body{height:100%}
  body{
    margin:0; font-family:var(--font); color:var(--ink);
    background:#DCEBFF; overflow:hidden;
    -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  }
 
  /* ---------- Backdrop ---------- */
  .backdrop{position:fixed; inset:0; width:100%; height:100%; z-index:0}
 
  /* ---------- time of day: set the class on <body> (tod-daytime | tod-sunrise | tod-dusk | tod-night) ---------- */
  .tod-daytime .backdrop{ filter:none; }
  .tod-sunrise .backdrop{ filter:brightness(1.04) saturate(1.15) sepia(.18) hue-rotate(-14deg); }
  .tod-dusk    .backdrop{ filter:brightness(.92) saturate(1.2) sepia(.32) hue-rotate(-26deg); }
  /* night gets a real dark sky + stars instead of a wash-out filter */
  .night-sky{opacity:0; transition:opacity .8s ease; pointer-events:none}
  #stars{opacity:0; transition:opacity .8s ease}
  .tod-night .night-sky, .tod-night #stars{opacity:1}
  .tod-night .cloud{opacity:.3}
  /* keep the glass card readable over the dark night sky */
  .tod-night .card{background:rgba(13,21,42,.62); border-color:rgba(255,255,255,.20)}
  .tod-night .card .title,
  .tod-night .card label,
  .tod-night .login-instruction,
  .tod-night .actions label{color:#E8EEFB}
  .plane{offset-rotate:auto}
 
  /* floating documents: clearly visible drift */
  @keyframes bob{ from{transform:translateY(9px)} to{transform:translateY(-19px)} }
  .bob{animation:bob 5s ease-in-out infinite alternate}
  .bob-2{animation-duration:6.3s; animation-delay:-2s}
  .bob-3{animation-duration:4.3s; animation-delay:-3.2s}
  .bob-4{animation-duration:5.6s; animation-delay:-1.2s}
  .bob-5{animation-duration:4.8s; animation-delay:-2.6s}
 
  /* slow drifting clouds */
  @keyframes drift{ from{transform:translateX(-300px)} to{transform:translateX(1580px)} }
  .cloud{animation:drift linear infinite}
  .cloud-1{animation-duration:85s;  animation-delay:-20s; transform:translateX(720px)}
  .cloud-2{animation-duration:110s; animation-delay:-70s; transform:translateX(300px)}
  .cloud-3{animation-duration:95s;  animation-delay:-45s; transform:translateX(1050px)}
 
  @media (prefers-reduced-motion:reduce){ .bob,.cloud{animation:none} }
 
  /* ---------- Layout ---------- */
  .wrap{
    position:relative; z-index:1; min-height:100vh;
    display:flex; align-items:center; justify-content:center;
    padding:32px clamp(24px,7vw,120px);
  }
 
  /* ---------- Login card ---------- */
  .card{
    width:100%; max-width:320px;
    background:rgba(255,255,255,.10);
    backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
    border:1px solid rgba(255,255,255,.7);
    border-radius:16px;
    box-shadow:0 1px 2px rgba(16,34,58,.05), 0 24px 60px -20px rgba(16,34,58,.30);
    padding:36px 36px 34px;
  }
  .brand{display:flex; justify-content:center; margin-bottom:12px}
  .brand img{height:24px}
 
  .card .title{font-size:20px; font-weight:600; line-height:1.2; text-align:center; margin:0 0 4px; color:var(--ink)}
  .card .subtitle{font-size:14px; font-weight:400; text-align:center; color:var(--muted); margin:0 0 22px}
  .login-instruction{font-size:15px; line-height:1.5; text-align:center; color:var(--muted); margin:2px 0 22px}
  .tod-night .card .subtitle{color:#AEBCD6}
 
  .card label{display:block; font-size:13px; font-weight:500; margin:0 0 7px; color:var(--ink)}
  .card input[type=text], .card input[type=password]{
    width:100%; height:44px; padding:0 13px; font:inherit; font-size:14.5px; color:var(--ink);
    background:#fff; border:1px solid var(--line); border-radius:10px; outline:none; margin-bottom:16px;
    transition:border-color .15s, box-shadow .15s;
  }
  .card input::placeholder{color:#9AA4B2}
  .card input[type=text]:focus, .card input[type=password]:focus{
    border-color:var(--blue); box-shadow:0 0 0 3px rgba(47,134,214,.18)
  }
 
  .actions{display:flex; align-items:center; margin:2px 0 18px}
  .actions label{display:flex; align-items:center; gap:8px; font-size:13px; font-weight:400; color:var(--muted); margin:0}
  .actions input[type=checkbox]{width:15px; height:15px; accent-color:var(--blue)}
 
  .login-error{background:#FDECEC; border:1px solid #F4C4C4; color:#B23B3B; font-size:13px;
    border-radius:8px; padding:9px 12px; margin:0 0 16px; text-align:center}
 
  .btn.login-button{
    width:100%; height:46px; display:flex; align-items:center; justify-content:center; gap:9px;
    font:inherit; font-size:15px; font-weight:600; color:#fff; background:var(--green);
    border:0; border-radius:10px; cursor:pointer; transition:background .15s, transform .04s;
  }
  .btn.login-button:hover{background:var(--green-hover)}
  .btn.login-button:active{transform:translateY(1px)}
  .btn.login-button:focus-visible{outline:none; box-shadow:0 0 0 3px rgba(31,169,126,.38)}
  .spinner{width:16px; height:16px; border-radius:50%; border:2px solid rgba(255,255,255,.45);
    border-top-color:#fff; animation:spin .7s linear infinite}
  @keyframes spin{to{transform:rotate(360deg)}}
 
  /* ---------- Environment panel (matches production .sys-info) ---------- */
  .sys-info{
    position:fixed; right:20px; bottom:20px; z-index:50;
    min-width:260px; max-width:360px; padding:14px 16px; border-radius:14px;
    background:var(--glass-bg); border:1px solid var(--glass-bd);
    box-shadow:var(--panel-sh); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
    font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
    font-size:.9rem; line-height:1.25; color:#0b2239;
  }
  .sys-info__title{font-weight:700; letter-spacing:.25px; margin-bottom:8px; color:var(--brand); text-transform:uppercase; font-size:.78rem}
  .sys-info__list{margin:0; padding:0}
  .sys-info__row{display:grid; grid-template-columns:120px 1fr; column-gap:10px; align-items:baseline; padding:6px 0; border-top:1px solid rgba(0,0,0,.06)}
  .sys-info__row:first-child{border-top:0}
  .sys-info dt{margin:0; opacity:.75}
  .sys-info dd{margin:0; font-weight:700; letter-spacing:.2px; color:#053459; word-break:break-word}
  .sys-info:hover, .sys-info:focus-within{box-shadow:0 18px 44px rgba(0,0,0,.28)}
 
  @media (max-width:760px){
    .wrap{padding:24px}
    .card{background:rgba(255,255,255,.10)}
  }
  @media (max-width:640px), (max-aspect-ratio:3/4){
    .sys-info{display:none}
  }