:root{
  --bg:#f4f7fb;
  --bg-soft:#eef3f8;
  --surface:#ffffff;
  --surface-2:#f8fafc;
  --surface-3:#edf3f8;
  --sidebar:#0d2b46;
  --sidebar-2:#123654;
  --sidebar-text:#d8e7f4;
  --text:#10233b;
  --muted:#687d91;
  --line:#dce6ef;
  --line-strong:#cbd9e5;
  --primary:#1677e8;
  --primary-2:#0b5fc5;
  --primary-soft:#eaf3ff;
  --teal:#0f9f86;
  --teal-soft:#e7f7f3;
  --green:#18a965;
  --green-soft:#e9f8f0;
  --gold:#e6a817;
  --gold-soft:#fff6dc;
  --red:#e44952;
  --red-soft:#fff0f1;
  --purple:#7759d8;
  --shadow:0 10px 30px rgba(31,61,88,.08);
  --shadow-lg:0 22px 60px rgba(31,61,88,.13);
  --radius:16px;
  --radius-sm:11px;
  --input-bg:#fff;
  --chart:#2e8af6;
}
html[data-theme="dark"]{
  --bg:#071521;
  --bg-soft:#091a29;
  --surface:#0c2233;
  --surface-2:#102a3d;
  --surface-3:#143247;
  --sidebar:#071b2c;
  --sidebar-2:#0a2940;
  --sidebar-text:#d7ebfa;
  --text:#eef6fc;
  --muted:#94aab9;
  --line:#1d3c50;
  --line-strong:#28516b;
  --primary:#2b9cff;
  --primary-2:#1682df;
  --primary-soft:#0b3551;
  --teal:#23c5a3;
  --teal-soft:#0d3a36;
  --green:#2ad27c;
  --green-soft:#0d3828;
  --gold:#ffc94e;
  --gold-soft:#3c3014;
  --red:#ff6971;
  --red-soft:#3a1d23;
  --purple:#b09aff;
  --shadow:0 12px 34px rgba(0,0,0,.28);
  --shadow-lg:0 24px 70px rgba(0,0,0,.38);
  --input-bg:#0a1c2a;
  --chart:#3ea8ff;
}
*{box-sizing:border-box}
html{min-height:100%;background:var(--bg);color-scheme:light}
body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:var(--bg);color:var(--text);transition:background .18s,color .18s}
a{color:inherit}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
svg{display:block}
.muted{color:var(--muted)}
.small{font-size:12px}
.kicker{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
h1,h2,h3,p{margin-top:0}

/* shared controls */
.btn{border:1px solid transparent;border-radius:11px;padding:10px 15px;font-weight:700;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:.16s ease}
.btn:hover{transform:translateY(-1px)}
.btn-primary{background:linear-gradient(180deg,var(--primary),var(--primary-2));color:#fff;box-shadow:0 8px 18px rgba(22,119,232,.18)}
.btn-secondary{background:var(--surface-2);color:var(--text);border-color:var(--line)}
.btn-ghost{background:transparent;color:var(--muted);border-color:var(--line)}
.btn-danger{background:var(--red-soft);color:var(--red);border-color:color-mix(in srgb,var(--red) 35%,transparent)}
.btn:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.25);transform:none}
.badge{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:750;background:var(--surface-3);color:var(--muted)}
.badge.active{background:var(--green-soft);color:var(--green)}
.badge.draft{background:var(--gold-soft);color:#9d7113}
html[data-theme="dark"] .badge.draft{color:var(--gold)}
.notice{padding:12px 14px;border-radius:12px;margin-bottom:15px;background:var(--primary-soft);border:1px solid color-mix(in srgb,var(--primary) 22%,var(--line));color:var(--text)}
.notice.ok{background:var(--green-soft);border-color:color-mix(in srgb,var(--green) 35%,var(--line))}
.notice.err{background:var(--red-soft);border-color:color-mix(in srgb,var(--red) 35%,var(--line))}
.icon-tile{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary);font-size:22px;flex:0 0 auto}
.icon-tile.green{background:var(--green-soft);color:var(--green)}
.icon-tile.gold{background:var(--gold-soft);color:var(--gold)}
.icon-tile.red{background:var(--red-soft);color:var(--red)}
.icon-tile.purple{background:color-mix(in srgb,var(--purple) 12%,var(--surface));color:var(--purple)}
.progress{height:8px;border-radius:999px;background:var(--surface-3);overflow:hidden}
.progress>span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--teal),var(--green))}
.progress.blue>span{background:linear-gradient(90deg,var(--primary),#4daaff)}
.progress.red>span{background:linear-gradient(90deg,#ff9c64,var(--red))}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}
.card h2,.card h3{margin:0 0 10px}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.theme-toggle{width:76px;height:36px;padding:4px;border:1px solid var(--line);border-radius:999px;background:var(--surface);display:flex;align-items:center;justify-content:space-between;box-shadow:var(--shadow);color:var(--muted)}
.theme-toggle span{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;transition:.18s ease}
html[data-theme="light"] .theme-toggle .sun,
html:not([data-theme]) .theme-toggle .sun{background:var(--primary-soft);color:var(--primary)}
html[data-theme="dark"] .theme-toggle .moon{background:var(--primary);color:#fff}

/* app shell */
.play-app,.suite-app{min-height:100dvh;display:grid;grid-template-columns:250px minmax(0,1fr)}
.play-sidebar,.suite-sidebar{position:sticky;top:0;height:100dvh;background:linear-gradient(180deg,var(--sidebar),#09243a);color:var(--sidebar-text);padding:22px 16px;display:flex;flex-direction:column;border-right:1px solid rgba(255,255,255,.06);z-index:30}
.play-brand,.suite-brand{text-decoration:none;display:flex;align-items:center;gap:10px;padding:3px 8px 20px}
.brand-word{font-size:25px;font-weight:900;font-style:italic;letter-spacing:-1.2px;color:#fff}
.brand-word b{color:#f4c542;font-weight:900}
.brand-crown{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:linear-gradient(135deg,#f9d65c,#e6aa14);color:#071b2c;font-size:16px;font-weight:900;transform:none;margin-right:0;box-shadow:0 7px 18px rgba(230,170,20,.18)}
.brand-sub{display:block;margin-top:5px;font-size:9px;letter-spacing:.16em;text-transform:uppercase;color:#9bb4c8;font-weight:700}
.side-nav{display:flex;flex-direction:column;gap:5px}
.side-nav a{display:flex;align-items:center;gap:12px;text-decoration:none;color:#c9dbea;padding:11px 12px;border-radius:11px;font-size:14px;font-weight:650;transition:.15s ease}
.side-nav a:hover{background:rgba(255,255,255,.06);color:#fff}
.side-nav a.active{background:linear-gradient(90deg,rgba(22,119,232,.98),rgba(22,119,232,.68));color:#fff;box-shadow:inset 3px 0 #4fd0ff,0 10px 22px rgba(0,0,0,.12)}
.nav-ico{width:24px;text-align:center;font-size:18px}
.side-motto{margin-top:auto;padding:22px 13px 0;border-top:1px solid rgba(255,255,255,.08)}
.side-motto strong{display:block;font-size:22px;line-height:1.12;font-style:italic;color:#fff}
.side-motto i{display:block;width:42px;height:3px;border-radius:3px;background:#2da4ff;margin:17px 0}
.side-motto p{font-size:10px;line-height:1.55;letter-spacing:.12em;text-transform:uppercase;color:#9ab2c5;margin:0}
.groupmaxx{margin-top:30px;padding-top:18px;border-top:1px solid rgba(255,255,255,.07);font-weight:800;color:#fff}
.groupmaxx span{color:#ff3c4e;margin-right:7px}
.play-main,.suite-main{min-width:0;padding:18px 20px 28px}
.play-header,.suite-header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:14px}
.header-greeting{display:flex;align-items:center;gap:12px}
.avatar-sm{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#f4a66d,#d97944);color:white;font-weight:900;border:3px solid var(--surface);box-shadow:var(--shadow)}
.header-greeting h1{font-size:22px;margin:0 0 2px;letter-spacing:-.02em}
.header-greeting p{margin:0;color:var(--muted);font-size:13px}
.header-actions{display:flex;align-items:center;gap:10px}
.store-chip,.profile-chip,.header-chip{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:8px 11px;box-shadow:var(--shadow);font-size:13px}
.store-chip strong,.profile-chip strong{display:block}
.store-chip small,.profile-chip small{display:block;color:var(--muted);font-size:10px;margin-top:2px}
.bell{position:relative;width:38px;height:38px;border-radius:11px;border:1px solid var(--line);background:var(--surface);color:var(--text)}
.bell b{position:absolute;right:-4px;top:-5px;min-width:18px;height:18px;border-radius:999px;background:var(--red);color:white;font-size:10px;display:grid;place-items:center;border:2px solid var(--bg)}

/* employee dashboard */
.kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:12px}
.kpi{padding:14px 15px;display:flex;gap:12px;min-height:118px}
.kpi-content{min-width:0;flex:1}
.kpi-label{font-size:12px;color:var(--muted);font-weight:700}
.kpi-value{font-size:28px;font-weight:850;letter-spacing:-.035em;margin:4px 0 7px;white-space:nowrap}
.kpi-help{font-size:11px;color:var(--muted);margin-top:7px}
.kpi-help.good{color:var(--green);font-weight:700}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(310px,.85fr);gap:12px}
.map-card{overflow:hidden;padding:0}
.map-card-header{padding:14px 16px 12px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.map-title{display:flex;align-items:center;gap:11px}
.map-title h2{font-size:20px;margin:0 0 3px}
.map-title p{margin:0;color:var(--muted);font-size:12px}
.map-figure{position:relative;margin:0 10px 10px;border-radius:13px;overflow:hidden;border:1px solid var(--line);min-height:410px;background:var(--surface-2)}
.map-figure img{display:block;width:100%;height:100%;min-height:410px;object-fit:cover}
.map-fade{position:absolute;inset:0;box-shadow:inset 0 0 0 1px rgba(255,255,255,.05),inset 0 -70px 70px rgba(0,0,0,.12);pointer-events:none}
.map-cta{position:absolute;left:18px;bottom:16px;background:rgba(5,30,45,.86);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.25);color:#fff;border-radius:11px;padding:9px 12px;font-size:12px;font-weight:800}
.right-stack{display:flex;flex-direction:column;gap:12px}
.mission-card .mission-head,.recovery-card .mission-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.mission-title{display:flex;align-items:center;gap:10px}
.mission-title h3{margin:0;font-size:17px}
.timer{font-size:11px;color:var(--muted);background:var(--surface-2);border:1px solid var(--line);padding:7px 9px;border-radius:9px}
.mission-body{display:grid;grid-template-columns:94px 1fr;gap:13px;align-items:center}
.product-box{height:105px;border-radius:13px;background:linear-gradient(145deg,#161d24,#03070a);color:white;display:grid;place-items:center;border:1px solid var(--line);box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)}
.product-box strong{font-size:14px;letter-spacing:.05em}
.product-box small{display:block;text-align:center;font-size:8px;color:#b9c8d4;margin-top:2px}
.mission-copy strong{display:block;font-size:15px;line-height:1.25;margin-bottom:10px}
.progress-line{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;font-weight:750;margin-top:6px}
.reward-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:13px}
.reward{background:var(--surface-2);border:1px solid var(--line);border-radius:11px;padding:10px 11px}
.reward small{display:block;color:var(--muted);font-size:10px;margin-bottom:4px}
.reward strong{font-size:16px}
.reward.money strong{color:var(--green)}
.reward.xp strong{color:var(--purple)}
.full-btn{width:100%;margin-top:12px}
.recovery-card{border-color:color-mix(in srgb,var(--red) 22%,var(--line))}
.recovery-box{display:grid;grid-template-columns:54px 1fr;gap:12px;align-items:center;background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:12px}
.recovery-big{font-size:25px}
.recovery-box strong{display:block;font-size:14px}
.recovery-box small{color:var(--muted)}
.bottom-grid{display:grid;grid-template-columns:1.25fr 1fr 1fr;gap:12px;margin-top:12px}
.alert-list{display:flex;flex-direction:column;gap:9px}
.alert-item{display:grid;grid-template-columns:38px 1fr auto;gap:10px;align-items:center;padding:10px;background:var(--surface-2);border:1px solid var(--line);border-radius:11px}
.alert-item strong{font-size:12px;display:block;margin-bottom:3px}
.alert-item p{font-size:10px;color:var(--muted);margin:0}
.alert-item time{font-size:10px;color:var(--muted)}
.villain-wrap{display:grid;grid-template-columns:108px 1fr;gap:12px;align-items:end}
.villain-art{height:108px;border-radius:14px;background:linear-gradient(160deg,#111b23,#341c19);position:relative;overflow:hidden;border:1px solid var(--line)}
.villain-face{position:absolute;left:17px;bottom:12px;font-size:60px;filter:saturate(.8)}
.villain-coins{position:absolute;right:10px;bottom:8px;font-size:32px}
.villain-copy p{font-size:11px;color:var(--muted);margin:0 0 4px}
.villain-copy strong{font-size:24px;display:block;letter-spacing:-.03em}
.rank-list{display:flex;flex-direction:column;gap:7px}
.rank-row{display:grid;grid-template-columns:26px 30px 1fr auto;gap:8px;align-items:center;font-size:11px;padding:5px 7px;border-radius:9px}
.rank-row.me{background:var(--primary-soft);color:var(--text)}
.rank-no{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--surface-3);font-weight:800}
.rank-row:nth-child(1) .rank-no{background:var(--gold);color:#fff}
.rank-row:nth-child(2) .rank-no{background:#6aa6e8;color:#fff}
.rank-row:nth-child(3) .rank-no{background:#bc7943;color:#fff}
.rank-avatar{width:26px;height:26px;border-radius:50%;background:linear-gradient(145deg,#f1b07b,#d67a4a);display:grid;place-items:center;font-size:12px}
.rank-row strong{font-size:11px}
.rank-value{font-weight:800}

/* suite admin / manager */
.suite-sidebar{padding-bottom:18px}
.suite-brand{padding-bottom:18px}
.suite-main{padding:22px 24px}
.suite-header{border-bottom:1px solid var(--line);padding-bottom:16px;margin-bottom:18px}
.suite-title h1{font-size:24px;margin:0 0 4px}
.suite-title p{margin:0;color:var(--muted);font-size:13px}
.suite-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px}
.stat{grid-column:span 3}
.stat .n{font-size:30px;font-weight:850;margin-top:6px}
.main{grid-column:span 8}.side{grid-column:span 4}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.field{display:flex;flex-direction:column;gap:6px}
.field.full{grid-column:1/-1}
label{font-size:12px;color:var(--muted);font-weight:700}
input,select,textarea{width:100%;background:var(--input-bg);color:var(--text);border:1px solid var(--line-strong);border-radius:10px;padding:10px 11px;outline:none}
input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 14%,transparent)}
textarea{min-height:88px;resize:vertical}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
table{width:100%;border-collapse:collapse;min-width:720px}
th,td{text-align:left;padding:11px 12px;border-bottom:1px solid var(--line);font-size:12px}
th{color:var(--muted);background:var(--surface-2);font-weight:750}
tbody tr:hover{background:color-mix(in srgb,var(--primary) 4%,var(--surface))}
.navtabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}
.navtabs a{padding:9px 12px;border-radius:10px;text-decoration:none;background:var(--surface);border:1px solid var(--line);color:var(--muted)}
.navtabs a.active{background:var(--primary-soft);color:var(--primary);border-color:color-mix(in srgb,var(--primary) 28%,var(--line))}
.update-drop{border:1px dashed var(--line-strong);border-radius:14px;padding:24px;text-align:center;background:var(--surface-2)}
.update-drop input{margin:12px auto;max-width:520px}
.status-row{display:flex;gap:8px;flex-wrap:wrap}
.status-pill{padding:7px 10px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line);font-size:11px;color:var(--muted)}
.status-pill.ok{color:var(--green);border-color:color-mix(in srgb,var(--green) 35%,var(--line))}
.status-pill.bad{color:var(--red);border-color:color-mix(in srgb,var(--red) 40%,var(--line))}
.update-notes{margin:8px 0 0;padding-left:20px;color:var(--muted)}
.suite-side-info{background:linear-gradient(180deg,var(--primary-soft),var(--surface));border:1px solid var(--line);border-radius:var(--radius);padding:18px}
.suite-side-info h3{margin:0 0 8px}

/* login */
.auth-page{min-height:100dvh;background:var(--bg);display:grid;place-items:center;padding:28px}
.auth-shell{width:min(1120px,100%);min-height:650px;display:grid;grid-template-columns:1.08fr .92fr;background:var(--surface);border:1px solid var(--line);border-radius:24px;overflow:hidden;box-shadow:var(--shadow-lg)}
.auth-visual{position:relative;overflow:hidden;background:linear-gradient(180deg,#0d2b46,#0a2033);color:white;padding:34px;display:flex;flex-direction:column}
.auth-visual:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 25% 18%,rgba(48,164,255,.22),transparent 32%),linear-gradient(180deg,transparent 48%,rgba(5,18,29,.65));pointer-events:none}
.auth-logo{position:relative;z-index:2}
.auth-logo .brand-word{font-size:30px}
.auth-logo p{font-size:11px;letter-spacing:.13em;color:#a9bfd1;margin:7px 0 0;text-transform:uppercase}
.auth-map-preview{position:absolute;left:28px;right:28px;top:130px;bottom:28px;border-radius:19px;overflow:hidden;border:1px solid rgba(255,255,255,.14);box-shadow:0 25px 70px rgba(0,0,0,.28)}
.auth-map-preview img{width:100%;height:100%;object-fit:cover}
.auth-map-preview:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(4,22,35,.04),rgba(4,22,35,.72))}
.auth-message{position:absolute;z-index:3;left:52px;bottom:58px;max-width:390px}
.auth-message .eyebrow{font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:#8ed0ff;font-weight:800}
.auth-message h2{font-size:34px;line-height:1.07;margin:8px 0 10px;letter-spacing:-.03em}
.auth-message p{color:#c9d9e6;font-size:14px;line-height:1.5;margin:0}
.auth-panel{position:relative;padding:34px 42px;display:flex;flex-direction:column;justify-content:center}
.auth-theme{position:absolute;right:26px;top:24px}
.auth-panel h1{font-size:28px;margin:0 0 7px;letter-spacing:-.03em}
.auth-panel>.muted{font-size:14px;margin-bottom:26px}
.auth-form{display:flex;flex-direction:column;gap:14px}
.auth-field{display:flex;flex-direction:column;gap:7px}
.auth-field input{height:46px}
.auth-submit{height:48px;font-size:14px}
.auth-foot{margin-top:22px;padding-top:18px;border-top:1px solid var(--line);font-size:11px;color:var(--muted);display:flex;justify-content:space-between;gap:10px}
.auth-error{background:var(--red-soft);border:1px solid color-mix(in srgb,var(--red) 32%,var(--line));color:var(--red);border-radius:10px;padding:10px 12px;font-size:12px;margin-bottom:14px}

/* legacy compatibility */
body.admin-body{background:var(--bg)}
.shell{max-width:1180px;margin:auto;padding:22px}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
.brand{display:flex;align-items:center;gap:12px;font-weight:900;letter-spacing:.3px}
.brand-badge{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary);font-size:20px}
.brand small{display:block;color:var(--muted);font-weight:600;letter-spacing:0}
.userbox{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:13px}
.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:14px}
.game-page{min-height:100dvh;background:var(--bg)}
.game-phone,.game-overlay,.game-chip,.game-logout,.login-page,.login-phone,.login-form,.login-error{}

/* responsive */
@media(max-width:1180px){
  .kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dashboard-grid{grid-template-columns:1fr}
  .right-stack{display:grid;grid-template-columns:1fr 1fr}
  .bottom-grid{grid-template-columns:1fr 1fr}
  .bottom-grid>.card:last-child{grid-column:1/-1}
}
@media(max-width:920px){
  .play-app,.suite-app{grid-template-columns:80px minmax(0,1fr)}
  .play-sidebar,.suite-sidebar{padding:18px 10px}
  .brand-sub,.side-nav a span:not(.nav-ico),.side-motto,.groupmaxx{display:none}
  .play-brand,.suite-brand{justify-content:center;padding-left:0;padding-right:0}
  .brand-word{font-size:0}
  .brand-word:after{content:"FQ";font-size:21px;font-weight:900;color:white;letter-spacing:-1px}
  .brand-crown{display:none}
  .side-nav a{justify-content:center;padding:12px}
  .nav-ico{width:auto}
  .profile-chip{display:none}
  .auth-shell{grid-template-columns:1fr}
  .auth-visual{min-height:320px}
  .auth-map-preview{top:90px}
}
@media(max-width:720px){
  .play-app,.suite-app{display:block}
  .play-sidebar,.suite-sidebar{position:static;height:auto;padding:10px 12px;flex-direction:row;align-items:center;gap:8px;overflow:auto}
  .play-brand,.suite-brand{padding:0 10px 0 0}
  .side-nav{flex-direction:row;gap:6px}
  .side-nav a{white-space:nowrap}
  .play-main,.suite-main{padding:14px}
  .play-header,.suite-header{align-items:flex-start}
  .header-actions{flex-wrap:wrap;justify-content:flex-end}
  .store-chip{display:none}
  .kpi-grid{grid-template-columns:1fr 1fr}
  .kpi{min-height:105px}
  .map-figure,.map-figure img{min-height:300px}
  .right-stack{grid-template-columns:1fr}
  .bottom-grid{grid-template-columns:1fr}
  .bottom-grid>.card:last-child{grid-column:auto}
  .suite-grid{grid-template-columns:1fr}
  .stat,.main,.side{grid-column:1/-1}
  .form-grid{grid-template-columns:1fr}
  .auth-page{padding:0}
  .auth-shell{border-radius:0;min-height:100dvh;border:0}
  .auth-visual{min-height:280px;padding:24px}
  .auth-map-preview{left:18px;right:18px;top:85px;bottom:18px}
  .auth-message{left:34px;bottom:34px;max-width:70%}
  .auth-message h2{font-size:26px}
  .auth-panel{padding:34px 26px}
}
@media(max-width:500px){
  .kpi-grid{grid-template-columns:1fr}
  .header-greeting p{display:none}
  .theme-toggle{width:70px}
  .mission-body{grid-template-columns:78px 1fr}
  .map-card-header{align-items:flex-start;flex-direction:column}
  .map-card-header .btn{width:100%}
  .reward-row{grid-template-columns:1fr}
}

/* FarmaQuest 0.3.97 — administração fiel ao layout aprovado */
html[data-theme="dark"]{
  --bg:#031522;
  --bg-soft:#061c2b;
  --surface:#072236;
  --surface-2:#0a2a40;
  --surface-3:#0d3148;
  --sidebar:#021421;
  --sidebar-2:#031a29;
  --text:#f6fbff;
  --muted:#a7c7d9;
  --line:#114a66;
  --line-strong:#176786;
  --primary:#14a9f4;
  --primary-2:#0789d6;
  --gold:#ffd33f;
  --green:#23d793;
}
.suite-app{
  grid-template-columns:330px minmax(0,1fr);
  background:
    radial-gradient(circle at 88% 8%,rgba(23,190,255,.06),transparent 28%),
    linear-gradient(180deg,#031522,#041726 72%,#03131f);
}
.suite-sidebar{
  background:linear-gradient(180deg,#021522,#031d2d 72%,#021522);
  border-right:1px solid #0d5a78;
  padding:28px 20px 24px;
  box-shadow:18px 0 55px rgba(0,0,0,.18);
}
.suite-brand{padding:4px 10px 28px;gap:12px}
.suite-brand .brand-crown{
  width:40px;height:40px;border-radius:12px;
  background:linear-gradient(145deg,#ffe85c,#eeb20e);
  font-size:22px;
  box-shadow:0 0 20px rgba(255,207,45,.22);
}
.suite-brand .brand-word{font-size:29px;letter-spacing:-.055em}
.suite-brand .brand-word b{color:#ffd33f}
.suite-brand .brand-sub{margin-top:3px;color:#d7ecf7;font-size:9px;letter-spacing:.20em}
.side-nav{gap:7px}
.side-nav a{
  min-height:56px;
  padding:13px 16px;
  border:1px solid transparent;
  border-radius:13px;
  color:#d5e8f5;
  font-size:15px;
  font-weight:760;
}
.side-nav a:hover{background:#082a3e;border-color:#114f69}
.side-nav a.active{
  background:linear-gradient(90deg,#0a81c8,#075fa4);
  border-color:#27d9ff;
  color:#fff;
  box-shadow:inset 3px 0 #37e2ff,0 8px 24px rgba(0,132,210,.20),0 0 0 1px rgba(39,217,255,.16);
}
.nav-ico{font-size:19px;color:#dff6ff}
.side-motto{
  margin-top:auto;
  padding:34px 18px 0;
  border-top:0;
}
.side-motto strong{
  font-family:"Segoe Script","Bradley Hand",cursive;
  font-size:25px;
  line-height:1.35;
  font-weight:500;
  color:#d9f1ff;
  transform:rotate(-4deg);
}
.side-motto i{width:95px;height:5px;background:#ffd33f;margin:18px 0 14px 78px;transform:rotate(-8deg)}
.side-motto p{font-size:9px;color:#8fb4c8}
.suite-main{padding:28px 34px 44px;min-height:100dvh}
.suite-header{
  min-height:96px;
  padding:2px 0 20px;
  margin-bottom:24px;
  border-bottom:1px solid #0d5674;
}
.suite-title .kicker{color:#a8d8ed;letter-spacing:.18em;font-size:12px}
.suite-title h1{font-size:45px;letter-spacing:-.045em;margin-top:8px;color:#fff}
.suite-title p{font-size:16px;color:#c2ddec}
.header-actions{gap:14px}
.profile-chip,.suite-header .theme-toggle,.suite-header .btn-ghost{
  background:#061f31;
  border-color:#165b78;
  box-shadow:none;
}
.profile-chip{padding:9px 13px;min-width:190px}
.profile-chip .avatar-sm{border:0;background:linear-gradient(145deg,#ffb82d,#df8b13)}
.suite-header .btn-ghost{min-height:46px;padding:0 20px;color:#fff}
.suite-header .theme-toggle{height:43px;width:88px}
.admin-dashboard-grid{gap:18px}
.admin-dashboard-grid .stat{
  min-height:170px;
  padding:24px 24px;
  display:flex;
  align-items:center;
  gap:20px;
  background:linear-gradient(145deg,#08283b,#061c2b);
  border:1px solid #14688a;
  border-radius:18px;
  box-shadow:0 16px 38px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.035);
}
.admin-dashboard-grid .stat:nth-child(2),.admin-dashboard-grid .stat:nth-child(4){border-color:#c8a31a;box-shadow:0 16px 38px rgba(0,0,0,.16),0 0 22px rgba(255,202,34,.05)}
.admin-stat-icon{
  width:64px;height:64px;flex:0 0 64px;border-radius:16px;
  display:grid;place-items:center;
  background:linear-gradient(145deg,#0e5ca0,#073558);
  border:1px solid #20d5ff;
  color:#21dcff;
  font-size:28px;font-weight:900;
  box-shadow:0 0 22px rgba(28,214,255,.10);
}
.stat-active .admin-stat-icon,.stat-alerts .admin-stat-icon{
  color:#ffd33f;border-color:#b89414;background:linear-gradient(145deg,#4a3b0d,#1d1d10);
  box-shadow:0 0 22px rgba(255,211,63,.10);
}
.stat-users .admin-stat-icon{color:#27e6ff}
.admin-dashboard-grid .stat .kpi-label{font-size:15px;color:#d8e9f3}
.admin-dashboard-grid .stat .n{font-size:50px;line-height:1;margin:8px 0;color:#fff}
.admin-dashboard-grid .stat .small{font-size:12px;color:#9fc2d5;max-width:190px;line-height:1.35}
.admin-recent-card{
  margin-top:8px;
  padding:26px 30px 28px;
  border:1px solid #105a79;
  border-radius:20px;
  background:linear-gradient(145deg,#072339,#051a2a);
  box-shadow:0 20px 48px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.03);
}
.admin-recent-card .section-title{margin-bottom:22px}
.admin-recent-card h2{font-size:34px;letter-spacing:-.035em;color:#fff;margin-bottom:5px}
.admin-recent-card .small{font-size:14px;color:#afd0df}
.admin-new-mission{
  min-height:56px;
  padding:0 24px;
  border:1px solid #28e1ff;
  border-radius:13px;
  background:linear-gradient(180deg,#10b7ef,#078bce);
  box-shadow:0 10px 28px rgba(7,164,224,.20),inset 0 1px 0 rgba(255,255,255,.28);
  font-size:16px;
}
.admin-recent-card .table-wrap{border:1px solid #145977;border-radius:13px;background:#051c2b}
.admin-recent-card table{min-width:900px}
.admin-recent-card th{padding:14px 16px;background:#082d44;color:#b9d7e7;font-size:13px;border-bottom:1px solid #14617f}
.admin-recent-card td{padding:15px 16px;font-size:13px;border-bottom:1px solid #104761;color:#eaf6fc}
.admin-recent-card tbody tr:hover{background:#08293c}
.admin-recent-card .badge{display:inline-flex;min-width:72px;justify-content:center;padding:6px 11px;border-radius:999px;font-weight:800;text-transform:lowercase}
.admin-recent-card .badge.active{background:#074f38;color:#2cf09d;border:1px solid #0b845d}
.admin-recent-card .badge.draft{background:#243849;color:#c9d6df;border:1px solid #3b5a6e}
.admin-row-action{text-align:center;font-size:20px!important;letter-spacing:2px;color:#c7dce8!important}
@media(max-width:1180px){
  .suite-app{grid-template-columns:94px minmax(0,1fr)}
  .suite-sidebar{padding:20px 10px}
  .suite-main{padding:24px 22px 36px}
  .admin-dashboard-grid .stat{padding:18px 16px;gap:12px}
  .admin-stat-icon{width:52px;height:52px;flex-basis:52px}
  .admin-dashboard-grid .stat .n{font-size:40px}
}
@media(max-width:720px){
  .suite-app{display:block}
  .suite-sidebar{position:static;height:auto;display:flex;overflow:auto;padding:10px 12px}
  .suite-main{padding:18px 14px 28px}
  .suite-title h1{font-size:34px}
  .admin-dashboard-grid .stat{min-height:130px}
  .admin-recent-card{padding:18px 14px}
  .admin-recent-card h2{font-size:27px}
}
/* Ícone de almofariz/pistilo da marca, sem depender de imagem externa. */
.suite-brand .brand-crown{
  position:relative;
  color:transparent!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible;
}
.suite-brand .brand-crown:before{
  content:"";
  position:absolute;
  left:7px;bottom:6px;
  width:27px;height:13px;
  border-radius:2px 2px 15px 15px;
  background:linear-gradient(180deg,#ffe45a,#f0b514);
  box-shadow:0 0 15px rgba(255,211,63,.18);
}
.suite-brand .brand-crown:after{
  content:"";
  position:absolute;
  left:17px;top:5px;
  width:27px;height:7px;
  border-radius:999px;
  background:linear-gradient(90deg,#ffe45a,#efad0f);
  transform:rotate(-34deg);
  transform-origin:left center;
}

/* FarmaQuest 0.3.98 — escala administrativa refinada para notebooks/desktop */
@media(min-width:721px){
  .suite-app{grid-template-columns:250px minmax(0,1fr)}
  .suite-sidebar{padding:20px 15px 18px}
  .suite-brand{padding:3px 7px 20px;gap:9px}.suite-brand .brand-crown{width:34px;height:34px}.suite-brand .brand-word{font-size:24px}.suite-brand .brand-sub{font-size:7px}
  .side-nav{gap:4px}.side-nav a{min-height:47px;padding:10px 12px;border-radius:11px;font-size:13px}.nav-ico{font-size:16px}
  .side-motto{padding:24px 13px 0}.side-motto strong{font-size:20px}.side-motto i{width:76px;height:4px;margin:13px 0 10px 55px}.side-motto p{font-size:7px}
  .suite-main{padding:20px 28px 34px}
  .suite-header{min-height:78px;padding:1px 0 14px;margin-bottom:18px}.suite-title .kicker{font-size:10px}.suite-title h1{font-size:38px;margin-top:5px}.suite-title p{font-size:13px}
  .header-actions{gap:10px}.profile-chip{min-width:165px;padding:7px 10px}.suite-header .btn-ghost{min-height:40px;padding:0 16px}.suite-header .theme-toggle{height:38px;width:76px}
  .admin-dashboard-grid{gap:14px}.admin-dashboard-grid .stat{min-height:132px;padding:17px 18px;gap:14px;border-radius:15px}.admin-stat-icon{width:52px;height:52px;flex-basis:52px;border-radius:13px;font-size:23px}
  .admin-dashboard-grid .stat .kpi-label{font-size:12px}.admin-dashboard-grid .stat .n{font-size:39px;margin:5px 0}.admin-dashboard-grid .stat .small{font-size:10px;max-width:165px}
  .admin-recent-card{margin-top:4px;padding:20px 22px 22px;border-radius:17px}.admin-recent-card .section-title{margin-bottom:16px}.admin-recent-card h2{font-size:28px}.admin-recent-card .small{font-size:11px}.admin-new-mission{min-height:46px;padding:0 18px;font-size:13px}
  .admin-recent-card th{padding:11px 13px;font-size:11px}.admin-recent-card td{padding:12px 13px;font-size:11px}.admin-recent-card .badge{min-width:62px;padding:5px 9px}
}
@media(min-width:721px) and (max-height:800px){
  .suite-main{padding-top:15px}.suite-header{min-height:68px;margin-bottom:14px}.suite-title h1{font-size:34px}.suite-title p{font-size:12px}
  .admin-dashboard-grid .stat{min-height:116px;padding:14px 16px}.admin-dashboard-grid .stat .n{font-size:34px}.admin-stat-icon{width:46px;height:46px;flex-basis:46px}
  .admin-recent-card{padding:16px 20px 18px}.admin-recent-card h2{font-size:25px}.admin-recent-card .section-title{margin-bottom:12px}
}
