/* RK777 compact auth popup — dashboard visible behind it */
:root{
  --bg:#062e24;--panel:#17694f;--line:#70ad96;
  --yellow:#ffd522;--white:#f7fff9;--muted:#b4d4c5;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;-webkit-text-size-adjust:100%}
body{font:14px/1.3 Arial,Helvetica,sans-serif;color:var(--white);background:var(--bg);overflow-x:hidden}
button,input{font:inherit}
a{color:var(--yellow);text-decoration:none}

/* Keep the existing dashboard/page visible in the background */
.site-underlay{position:fixed;inset:0;z-index:0;overflow:hidden;background:linear-gradient(145deg,#062b21,#0c513b 60%,#082b22)}
.fake-header{min-height:54px;padding:8px 12px;display:flex;align-items:center;justify-content:space-between;background:#06372b}
.wordmark{display:inline-flex;align-items:center;color:#fff;font-size:32px;font-weight:900;letter-spacing:-2px;line-height:1;text-decoration:none;text-shadow:0 2px 2px #172c22}
.wordmark b{color:#ffdf00}.wordmark span{color:#fff}
.search{color:#e6d34a;text-align:center}.search small{display:block;color:#b5c7bd;font-size:11px}
.banner{height:82px;margin:9px 10px;border:1px solid #397b5d;border-radius:10px;background:linear-gradient(120deg,#1d7857,#0b382a 70%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}
.banner span{color:#ffe000;font-size:24px;font-weight:900}.banner strong{font-size:11px;letter-spacing:1px}.banner i{font-size:20px;font-style:normal}
.fake-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:10px}
.fake-grid div{height:70px;display:grid;place-items:center;border:1px solid #397b5d;border-radius:9px;background:linear-gradient(145deg,#1a7553,#092f25);font-size:28px}

/* Darken the background lightly; do not hide it */
.scrim{position:fixed;z-index:10;inset:0;background:rgba(0,18,13,.48)}

/* Popup is intentionally under half the screen height.
   Its contents scroll INSIDE the small card. */
.auth-card{
  position:fixed;z-index:11;left:50%;top:50%;transform:translate(-50%,-50%);
  width:min( calc(100vw - 34px), 370px );
  max-height:48dvh;min-height:0;margin:0;
  overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
  border:1px solid rgba(130,202,169,.6);border-radius:14px;
  background:var(--panel);box-shadow:0 12px 35px rgba(0,0,0,.38);
  scrollbar-width:thin;scrollbar-color:#4b9a79 transparent;
}
.logo-band{height:42px;display:flex;align-items:center;justify-content:center;border-bottom:1px solid rgba(255,255,255,.12);background:linear-gradient(115deg,#267b5d,#17644b)}
.wordmark.large{font-size:27px}
.tabs{display:flex;margin:0 12px;border-bottom:1px solid rgba(255,255,255,.12)}
.tabs button{position:relative;flex:1;min-width:0;padding:6px 4px 5px;border:0;border-bottom:2px solid transparent;background:transparent;color:#f2fff8;font-size:14px}
.tabs button.active{color:var(--yellow);border-bottom-color:var(--yellow)}
.auth-form{padding:6px 12px 5px}
.hidden{display:none!important}
.auth-form label:not(.agreement):not(.remember){display:block;margin:4px 0 3px;color:#f2fff8;font-size:11px;font-weight:400}
.field{display:flex;align-items:center;gap:6px;width:100%;min-width:0;height:31px;padding:0 8px;border:1px solid var(--line);border-radius:8px;background:rgba(4,53,38,.16)}
.field:focus-within{border-color:var(--yellow);box-shadow:0 0 0 1px rgba(255,213,34,.12)}
.field input{flex:1;width:0;min-width:0;padding:0;border:0;outline:0;background:transparent;color:#fff;font-size:11px}
.field input::placeholder{color:#a4c8b7;opacity:1}
.person,.lock{flex:0 0 auto;color:#a9d0be;font-size:14px;line-height:1}
.country-code{flex:0 0 auto;padding-right:5px;border-right:1px solid rgba(255,255,255,.25);color:var(--yellow);font-size:11px;font-weight:700;white-space:nowrap}
.field button{flex:0 0 auto;padding:1px;border:0;background:transparent;color:#a8d0bd;font-size:14px;line-height:1}
.hint{margin:3px 0 4px;color:var(--muted);font-size:9px;line-height:1.25}
.mode-row{display:flex;align-items:center;justify-content:space-between;gap:5px;margin:4px 0 4px;font-size:10px;white-space:normal}
.mode-active{color:var(--yellow)}.mode-muted{color:#d4e9df}
.strength{display:flex;gap:4px;margin:4px 0 5px}
.strength span{flex:1;height:3px;border-radius:8px;background:#39896a}
.agreement,.remember{display:flex;align-items:flex-start;gap:5px;margin:5px 0 6px;color:#d5e9df;font-size:9px;line-height:1.3}
.agreement input,.remember input{flex:0 0 13px;width:13px;height:13px;margin:1px 0 0;accent-color:#20c944}
.submit{display:block;width:100%;min-height:32px;padding:5px 8px;border:0;border-radius:8px;background:var(--yellow);color:#3b3513;font-size:13px;font-weight:700}
.submit:active{transform:translateY(1px)}
.quick-links{display:flex;align-items:center;justify-content:space-between;gap:7px;padding:5px 2px 2px;font-size:10px}
.quick-links a{color:var(--yellow)}
.quick-login{display:flex;align-items:center;justify-content:center;gap:6px;padding:5px 5px 3px;color:var(--muted);font-size:9px;text-align:center}
.quick-login span{flex:0 1 30px;height:1px;background:#39896a}
.google-mark{display:grid;width:23px;height:23px;margin:3px auto 5px;place-items:center;border:1px solid #e5e5e5;border-radius:50%;background:#fff;color:#4285f4;font-size:16px;font-weight:800}
.errors{margin:5px 0 0;padding:5px 7px;border:1px solid #e77870;border-radius:7px;background:rgba(95,10,10,.22);color:#ffd0cb;font-size:10px}
.errors p{margin:2px 0}
.close-modal{position:fixed;z-index:12;right:12px;bottom:12px;display:grid;width:30px;height:30px;place-items:center;border:2px solid #fff;border-radius:50%;background:rgba(0,0,0,.58);color:#fff;font-size:20px;line-height:1;text-decoration:none}

@media(max-height:620px){
 .auth-card{max-height:44dvh;width:min(calc(100vw - 28px),350px)}
 .logo-band{height:36px}.wordmark.large{font-size:24px}
 .tabs button{padding:4px}.auth-form{padding:4px 10px}
 .field{height:28px}.auth-form label:not(.agreement):not(.remember){margin:3px 0 2px}
 .hint{margin:2px 0 3px}.mode-row{margin:3px 0}.agreement,.remember{margin:4px 0}
 .submit{min-height:29px}.quick-login{padding:3px}.google-mark{width:20px;height:20px;margin:2px auto 3px}
}
