/* Petrol Pump Management System */
:root {
  --navy: #0f1d3a; --navy-2: #172a52; --navy-3: #22396b; --navy-text: #c9d3e8;
  --bg: #f3f5f9; --card: #ffffff; --line: #e3e7ef; --line-2: #eef1f6;
  --text: #1b2333; --muted: #667085; --primary: #1d4ed8; --primary-d: #1e40af;
  --green: #15803d; --green-bg: #dcfce7; --green-strong: #16a34a;
  --red: #b91c1c; --red-bg: #fee2e2; --red-strong: #dc2626;
  --amber: #92400e; --amber-bg: #fef3c7; --info-bg: #e0ecff;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  font-size: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; color: var(--text); background: var(--bg); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.2; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.1rem; } h3 { font-size: 1rem; margin-top: 1.2rem; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.muted { color: var(--muted); } .small { font-size: .84rem; } .strong { font-weight: 600; }
.red { color: var(--red); } .green { color: var(--green); } .right { float: right; } .nowrap { white-space: nowrap; }
.center { text-align: center; } .mt { margin-top: .75rem; } .upper { text-transform: uppercase; }
.hint { color: var(--muted); font-size: .85rem; margin: .35rem 0 .8rem; }

/* Forms */
label { display: block; font-weight: 600; font-size: .88rem; margin: .8rem 0 .3rem; }
input, select, textarea { width: 100%; font: inherit; color: inherit; padding: .6rem .7rem; border: 1px solid #cfd6e3; border-radius: 8px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(29,78,216,.25); border-color: var(--primary); }
input[type=checkbox], input[type=radio] { width: auto; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.form-actions { display: flex; gap: .6rem; margin-top: 1.2rem; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
.grid-2.gap { gap: 1rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font: inherit; font-weight: 600; border: 1px solid transparent; border-radius: 8px; padding: .55rem 1rem; cursor: pointer; text-decoration: none !important; background: #fff; color: var(--text); white-space: nowrap; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: var(--primary); color: #fff; } .btn-primary:hover { background: var(--primary-d); }
.btn-success { background: var(--green-strong); color: #fff; } .btn-success:hover { background: var(--green); }
.btn-danger { background: var(--red-strong); color: #fff; }
.btn-ghost { border-color: #cfd6e3; background: #fff; } .btn-ghost:hover { background: var(--line-2); }
.btn-danger-ghost { border-color: #f3b4b4; color: var(--red); background: #fff; }
.btn-sm { padding: .3rem .65rem; font-size: .85rem; }
.btn-lg { padding: .8rem 1.2rem; font-size: 1.05rem; }
.btn-xl { padding: 1rem 1.4rem; font-size: 1.2rem; border-radius: 12px; }
.btn-block { width: 100%; margin-top: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.linkish { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }

/* Alerts & badges */
.alert { padding: .7rem .9rem; border-radius: 8px; margin: 0 0 1rem; border: 1px solid transparent; }
.alert-error { background: var(--red-bg); color: var(--red); border-color: #fbcaca; }
.alert-success { background: var(--green-bg); color: var(--green); border-color: #bbf0cd; }
.alert-info { background: var(--info-bg); color: #1e3a8a; border-color: #c7d9fd; }
.alert-warn { background: var(--amber-bg); color: var(--amber); border-color: #fbe2a1; }
.badge { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .02em; padding: .18rem .5rem; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.badge-green { background: var(--green-strong); color: #fff; }
.badge-red { background: var(--red-strong); color: #fff; }
.badge-soft-green { background: var(--green-bg); color: var(--green); }
.badge-grey { background: var(--line-2); color: var(--muted); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }

/* Auth pages */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-3) 100%); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 14px; padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.auth-card.wide { max-width: 560px; }
.auth-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.4rem; }
.brand-name { font-weight: 700; font-size: 1.05rem; }
.demo-note { margin-top: 1.2rem; padding: .8rem; border: 2px dashed #f0b429; border-radius: 8px; background: #fffbeb; font-size: .85rem; color: var(--amber); }
.demo-note p { margin: .3rem 0 0; }
.err-code { font-size: 3rem; color: var(--muted); margin: 0; }

/* Admin layout */
.admin .sidebar { position: fixed; inset: 0 auto 0 0; width: 240px; background: var(--navy); color: var(--navy-text); display: flex; flex-direction: column; z-index: 30; }
.sidebar-brand { display: flex; gap: .7rem; align-items: center; padding: 18px 16px; border-bottom: 1px solid var(--navy-2); color: #fff; }
.brand-sub { font-size: .76rem; color: #8fa0c3; }
.side-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.side-nav a { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 8px; color: var(--navy-text); font-weight: 500; margin-bottom: 2px; }
.side-nav a:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
.side-nav a.active { background: var(--navy-3); color: #fff; box-shadow: inset 3px 0 0 #22c55e; }
.side-sep { height: 1px; background: var(--navy-2); margin: 10px 6px; }
.ico { width: 18px; height: 18px; border-radius: 5px; background: currentColor; opacity: .55; flex: none; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.side-nav a.active .ico { opacity: 1; }
.ico-dashboard { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h8v10H3zM13 3h8v6h-8zM13 11h8v10h-8zM3 15h8v6H3z'/%3E%3C/svg%3E"); }
.ico-customers { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M1 21c0-4 4-7 8-7s8 3 8 7z'/%3E%3Ccircle cx='18' cy='9' r='3'/%3E%3Cpath d='M17 14c3 0 6 2.5 6 6h-4c0-2-1-4.5-2-6z'/%3E%3C/svg%3E"); }
.ico-transactions { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16v18l-3-2-3 2-2-2-2 2-3-2-3 2zM7 7v2h10V7zm0 4v2h10v-2zm0 4v2h6v-2z'/%3E%3C/svg%3E"); }
.ico-workers { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l8 3v6c0 5-3.5 9.5-8 11-4.5-1.5-8-6-8-11V5z'/%3E%3C/svg%3E"); }
.ico-flagged { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2h2v20H4zM7 3h13l-3 5 3 5H7z'/%3E%3C/svg%3E"); }
.ico-audit { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a8 8 0 0 1 6.3 12.9l5.4 5.4-1.4 1.4-5.4-5.4A8 8 0 1 1 10 2zm0 3a5 5 0 1 0 0 10 5 5 0 0 0 0-10z'/%3E%3C/svg%3E"); }
.ico-reports { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 21V3h2v16h16v2zM7 17V10h3v7zm5 0V6h3v11zm5 0v-5h3v5z'/%3E%3C/svg%3E"); }
.ico-settings { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2h4l.6 3 2.3 1.3 2.9-1 2 3.4-2.3 2v2.6l2.3 2-2 3.4-2.9-1-2.3 1.3-.6 3h-4l-.6-3-2.3-1.3-2.9 1-2-3.4 2.3-2v-2.6l-2.3-2 2-3.4 2.9 1L9.4 5zm2 7a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/%3E%3C/svg%3E"); }
.ico-pump { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 21V4a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v17zm2-15v4h7V6zM16 9h1.5A1.5 1.5 0 0 1 19 10.5V17a1 1 0 0 0 2 0V8l-3-3 1-1 4 4v9a3 3 0 0 1-6 0v-6h-1z'/%3E%3C/svg%3E"); }
.side-user { display: flex; gap: .6rem; align-items: center; padding: 12px 16px; border-top: 1px solid var(--navy-2); color: #fff; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy-3); display: grid; place-items: center; font-weight: 700; }
.side-user-info { min-width: 0; font-size: .9rem; }
.side-actions { display: flex; justify-content: space-between; padding: 0 16px 14px; font-size: .85rem; }
.side-actions a, .side-actions button { color: #8fa0c3; }
.admin .main { margin-left: 240px; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem; padding: 14px 28px; background: rgba(243,245,249,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 1.3rem; flex: 1; }
.topbar-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.hamburger { display: none; font-size: 1.5rem; cursor: pointer; margin: 0; }
.content { padding: 22px 28px 40px; max-width: 1400px; }
.nav-backdrop { display: none; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card.narrow { max-width: 620px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }
.stack > .card { margin-bottom: 18px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); color: inherit; display: block; }
.stat-link:hover { text-decoration: none; border-color: #b9c5dc; }
.stat-label { color: var(--muted); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.stat-value { font-size: 1.8rem; font-weight: 700; margin: .25rem 0 .1rem; }
.stat-value small { font-size: .95rem; color: var(--muted); font-weight: 600; }
.stat-sub { color: var(--muted); font-size: .82rem; }
.stat-alert { border-color: #fca5a5; background: linear-gradient(180deg, #fff 0%, #fff5f5 100%); }
.stat-alert .stat-value { color: var(--red); }
.stat-ok { border-color: #b7e4c7; }
.stat-ok .stat-value { color: var(--green); }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: .6rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .65rem .7rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tbody tr:hover { background: #fafbfd; }
.table .num { text-align: right; white-space: nowrap; }
.table .empty { text-align: center; color: var(--muted); padding: 2rem; }
.row-flag td:first-child { box-shadow: inset 3px 0 0 var(--red-strong); }
.row-muted td { color: var(--muted); }
.sort { color: inherit; } .sort.active { color: var(--primary); }
.w-40 { width: 40%; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; padding-top: .9rem; color: var(--muted); font-size: .88rem; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; }
.filters > div { min-width: 140px; }
.filters label { margin-top: 0; }
.filters .f-grow { flex: 1 1 260px; }
.filters .f-btns { display: flex; gap: .4rem; }
.filters .f-check label { display: flex; gap: .4rem; align-items: center; padding-bottom: .6rem; font-weight: 500; }

/* Dashboard bits */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar { width: 100%; max-width: 34px; background: linear-gradient(180deg, #3b82f6, var(--primary)); border-radius: 5px 5px 0 0; min-height: 2px; }
.bar-val { font-size: .72rem; color: var(--muted); }
.bar-label { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.hbar { background: var(--line-2); border-radius: 4px; height: 10px; overflow: hidden; }
.hbar span { display: block; height: 100%; background: var(--primary); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: .55rem 0; border-bottom: 1px solid var(--line-2); overflow: hidden; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: grid; grid-template-columns: 190px 1fr auto; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line-2); align-items: baseline; font-size: .9rem; }
.act { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .03em; padding: .15rem .45rem; border-radius: 5px; background: var(--line-2); color: #475467; white-space: nowrap; }
.act-fuel_credit_added { background: #e0ecff; color: #1e40af; }
.act-customer_flagged, .act-login_failed, .act-access_denied, .act-database_restored { background: var(--red-bg); color: var(--red); }
.act-transaction_adjusted, .act-duplicate_registration_blocked, .act-password_reset { background: var(--amber-bg); color: var(--amber); }
.act-customer_registered, .act-customer_unflagged, .act-operator_created { background: var(--green-bg); color: var(--green); }
.table-audit td { font-size: .87rem; }

/* Profile & details */
.profile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.profile-name { font-size: 1.35rem; font-weight: 700; margin-bottom: .4rem; }
.profile-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; color: var(--muted); font-size: .92rem; }
.profile-meta b { color: var(--text); font-weight: 600; margin-right: .3rem; }
.flag-border { border-left: 5px solid var(--red-strong); }
.dl { display: grid; grid-template-columns: 180px 1fr; gap: .5rem 1rem; margin: 0; }
.dl dt { color: var(--muted); font-size: .88rem; } .dl dd { margin: 0; }
.radio-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.radio-card { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid #cfd6e3; border-radius: 8px; padding: .7rem; margin: 0; font-weight: 500; cursor: pointer; }
.radio-card small { display: block; color: var(--muted); font-weight: 400; }
.radio-card:has(input:checked) { border-color: var(--primary); background: #f0f5ff; }
details.restore { display: inline-block; position: relative; }
details.restore summary { list-style: none; }
details.restore summary::-webkit-details-marker { display: none; }
.restore-form { position: absolute; right: 0; z-index: 5; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .8rem; box-shadow: 0 10px 30px rgba(0,0,0,.15); white-space: normal; }
.restore-form input { margin-bottom: .5rem; }
.inline-form { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.inline-form input { width: auto; flex: 1 1 200px; }

/* Worker panel */
.worker { background: #eef1f6; font-size: 16px; }
.w-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--navy); color: #fff; padding: 12px 16px; position: sticky; top: 0; z-index: 10; }
.w-brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 700; min-width: 0; }
.w-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-brand:hover { text-decoration: none; }
.w-operator { text-align: right; line-height: 1.2; }
.w-op-name { display: block; font-weight: 600; font-size: .95rem; }
.w-op-id { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-size: .8rem; background: var(--navy-3); padding: 1px 6px; border-radius: 4px; color: #a7f3d0; margin-top: 2px; }
.w-nav { display: flex; background: var(--navy-2); overflow-x: auto; }
.w-nav a, .w-nav button { flex: 1; text-align: center; color: var(--navy-text); padding: .8rem .6rem; font-weight: 600; white-space: nowrap; background: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.w-nav form { display: flex; flex: 1; }
.w-nav a.active { color: #fff; box-shadow: inset 0 -3px 0 #22c55e; }
.w-nav a:hover { text-decoration: none; color: #fff; }
.w-content { max-width: 720px; margin: 0 auto; padding: 16px; }
.w-card { background: #fff; border-radius: 14px; padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.w-search { display: flex; gap: .6rem; }
.w-search input { font-size: 1.35rem; padding: .85rem 1rem; border-radius: 12px; letter-spacing: .03em; }
.w-form input, .w-form select, .w-form textarea { font-size: 1.05rem; padding: .75rem .85rem; }
.w-qty-input { font-size: 2rem !important; font-weight: 700; text-align: center; padding: .7rem !important; }
.quick-qty { display: flex; gap: .4rem; margin-top: .5rem; flex-wrap: wrap; }
.quick-qty .btn { flex: 1; padding: .7rem .4rem; font-size: 1rem; }
.fuel-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; }
.fuel-opt { margin: 0; cursor: pointer; }
.fuel-opt input { position: absolute; opacity: 0; pointer-events: none; }
.fuel-opt span { display: block; text-align: center; padding: .9rem .5rem; border: 2px solid #cfd6e3; border-radius: 10px; font-size: 1.05rem; }
.fuel-opt input:checked + span { border-color: var(--primary); background: #eef4ff; color: var(--primary-d); }
.fuel-opt input:focus-visible + span { outline: 2px solid var(--primary); }
details.more { margin-top: 1rem; border-top: 1px solid var(--line-2); padding-top: .6rem; }
details.more summary { cursor: pointer; color: var(--primary); font-weight: 600; padding: .4rem 0; }
.w-cust { border-left: 6px solid var(--green-strong); }
.w-cust.is-flagged { border-left-color: var(--red-strong); background: linear-gradient(180deg, #fff 0%, #fff6f6 100%); }
.w-cust-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.w-cust-head h1 { margin-bottom: .2rem; }
.w-cust .badge { font-size: .95rem; padding: .35rem .8rem; }
.w-total { margin-top: 1rem; }
.w-total-num { font-size: 3rem; font-weight: 800; line-height: 1; }
.is-ok .w-total-num { color: var(--green); } .is-flagged .w-total-num { color: var(--red); }
.w-total-unit { font-size: 1.3rem; font-weight: 700; color: var(--muted); }
.meter { height: 10px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin: .6rem 0; }
.meter span { display: block; height: 100%; }
.red-bg { background: var(--red-strong); } .green-bg { background: var(--green-strong); }
.w-list { list-style: none; margin: 0; padding: 0; }
.w-list li { border-bottom: 1px solid var(--line-2); }
.w-list a { display: flex; justify-content: space-between; align-items: center; padding: .7rem 0; color: inherit; }
.w-list a:hover { text-decoration: none; background: #fafbfd; }
.w-list small { display: block; color: var(--muted); }
.w-qty { font-weight: 700; font-size: 1.1rem; }
.review { display: grid; grid-template-columns: 130px 1fr; gap: .55rem 1rem; margin: 0 0 1rem; }
.review dt { color: var(--muted); } .review dd { margin: 0; }
.review .big { font-size: 1.5rem; font-weight: 700; }
.review-total { padding: 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: 1.1rem; display: grid; gap: .4rem; }
.review-total.is-ok { background: var(--green-bg); color: var(--green); }
.review-total.is-flagged { background: var(--red-bg); color: var(--red); }
.w-done { text-align: center; border-top: 6px solid var(--green-strong); }
.w-done.is-flagged { border-top-color: var(--red-strong); }
.w-done .review { text-align: left; }
.done-icon { width: 64px; height: 64px; margin: 0 auto .6rem; border-radius: 50%; background: var(--green-strong); color: #fff; font-size: 2.2rem; display: grid; place-items: center; }
.w-foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 10px 16px 24px; }

/* Responsive */
@media (max-width: 1100px) { .grid-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .admin .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .nav-toggle:checked ~ .sidebar { transform: none; }
  .nav-toggle:checked ~ .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; }
  .admin .main { margin-left: 0; }
  .hamburger { display: block; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .content { padding: 16px; }
  .grid-2, .grid-3, .radio-row { grid-template-columns: minmax(0, 1fr); }
  .main, .content, .card { min-width: 0; max-width: 100%; }
  .activity li { grid-template-columns: 1fr; gap: .2rem; }
  .dl { grid-template-columns: 1fr; gap: .1rem; } .dl dd { margin-bottom: .5rem; }
  .profile-head { flex-direction: column; }
  .filters > div { flex: 1 1 45%; min-width: 0; }
}
@media (max-width: 520px) {
  .w-search { flex-direction: column; }
  .review { grid-template-columns: 1fr; gap: .1rem; } .review dd { margin-bottom: .5rem; }
  .w-total-num { font-size: 2.5rem; }
  .stat-value { font-size: 1.5rem; }
  .restore-form { position: static; width: auto; }
}

/* Google sign-in */
.btn-google { background: #fff; border: 1px solid #cfd6e3; color: #1f1f1f; gap: .6rem; margin-top: 0; }
.btn-google:hover { background: #f6f8fb; }
.or { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .82rem; margin: 1rem 0 .2rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pending-icon { font-size: 2.6rem; margin-bottom: .4rem; }
.nav-badge { margin-left: auto; background: #f59e0b; color: #111; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: .05rem .45rem; }
.badge-soft-blue { background: #e0ecff; color: #1e40af; }
.req { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: flex-end; padding: .9rem 0; border-bottom: 1px solid var(--line-2); }
.req-who { flex: 1 1 220px; }
.req-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; flex: 3 1 480px; }
.req-form > div { flex: 1 1 150px; min-width: 0; }
.req-form label { margin-top: 0; }
form.inline { display: inline; }
.auth-card .dl { grid-template-columns: 120px 1fr; margin-bottom: 1rem; }
.test-flag { background: #fef3c7; color: #92400e; border: 1px dashed #f0b429; border-radius: 6px; font-size: .78rem; font-weight: 800; letter-spacing: .03em; text-align: center; padding: .35rem; margin-bottom: .8rem; }
.mock-g-logo { text-align: center; font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; margin: .2rem 0 .4rem; }
.mock-g-logo span:nth-child(1), .mock-g-logo span:nth-child(4) { color: #4285F4; }
.mock-g-logo span:nth-child(2), .mock-g-logo span:nth-child(6) { color: #EA4335; }
.mock-g-logo span:nth-child(3) { color: #FBBC05; }
.mock-g-logo span:nth-child(5) { color: #34A853; }
