/* GridLock for The Home Depot — demo styles */
:root {
  --hd-orange: #F96302;
  --hd-orange-dark: #D45400;
  --hd-orange-tint: #FFF1E8;
  --ink: #1A1A1A;
  --ink-2: #4A4F57;
  --muted: #6B717C;
  --line: #E2E5EA;
  --line-2: #EEF0F3;
  --ground: #F4F5F7;
  --card: #FFFFFF;
  --dark: #1F2227;
  --dark-2: #2A2E35;
  --dark-3: #3A3F48;
  --dark-text: #C9CDD4;
  --green: #1E7F4F; --green-tint: #E6F4EC;
  --red: #C0392B; --red-tint: #FBE9E7;
  --amber: #946200; --amber-tint: #FFF4D6;
  --blue: #1F5FBF; --blue-tint: #EEF3FB;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.06);
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
a { color: var(--hd-orange-dark); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; letter-spacing: 0.02em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #FAFBFC; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 2px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 0; min-width: 0; }
.right { text-align: right; }
.hide { display: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 500; white-space: nowrap; text-decoration: none; }
.btn:hover { background: #FAFBFC; }
.btn.primary { background: var(--hd-orange); border-color: var(--hd-orange); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--hd-orange-dark); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.btn.danger { color: var(--red); border-color: #E7B5AF; }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 50px; padding: 0 20px; font-size: 16px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icon-btn { width: 36px; height: 36px; padding: 0; border-radius: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 3px 8px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip.green { background: var(--green-tint); color: var(--green); }
.chip.red { background: var(--red-tint); color: var(--red); }
.chip.amber { background: var(--amber-tint); color: var(--amber); }
.chip.blue { background: var(--blue-tint); color: var(--blue); }
.chip.orange { background: var(--hd-orange-tint); color: var(--hd-orange-dark); }
.chip.gray { background: var(--line-2); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }
.pill-filter { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.pill-filter.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink-2); flex-shrink: 0; }
.avatar.lg { width: 44px; height: 44px; font-size: 14px; }
.avatar.temp { background: var(--amber-tint); color: var(--amber); }
.bar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; width: 80px; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: var(--green); }
.bar.amber > span { background: var(--amber); }
.bar.red > span { background: var(--red); }

/* Inputs */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { height: 42px; padding: 0 12px; border-radius: 8px; border: 1px solid #D5D8DE; font-weight: 400; background: #fff; }
.field textarea { height: auto; padding: 10px 12px; }
.field input:focus, .field select:focus, .search input:focus { outline: 2px solid var(--hd-orange); outline-offset: 1px; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid #D5D8DE; background: #fff; color: var(--muted); min-width: 220px; }
.search input { border: 0; outline: 0; width: 100%; background: transparent; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--ground); cursor: pointer; }
.toggle input { width: 20px; height: 20px; margin: 0; accent-color: var(--hd-orange); }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 6px; }
.seg label { display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 8px; border: 1px solid #D5D8DE; font-size: 13px; font-weight: 500; cursor: pointer; }
.seg label.on { border: 2px solid var(--ink); font-weight: 600; }
.seg input { position: absolute; opacity: 0; }
.zone-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.zone-chips label { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid #D5D8DE; font-size: 13px; font-weight: 500; cursor: pointer; }
.zone-chips label.on { border-color: var(--hd-orange); background: var(--hd-orange-tint); }
.zone-chips label.off { color: var(--muted); }
.zone-chips input { margin: 0; accent-color: var(--hd-orange); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-h h2 { font-size: 16px; font-weight: 700; }
.card-b { padding: 14px 18px 18px; }
.card .table-wrap { overflow-x: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi .label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.kpi .value { font-size: 30px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 15px; color: var(--muted); font-weight: 500; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi .sub.good { color: var(--green); } .kpi .sub.bad { color: var(--red); } .kpi .sub.warn { color: var(--amber); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: 1fr; } }
.attn { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 10px; }
.attn.red { background: var(--red-tint); } .attn.amber { background: var(--amber-tint); } .attn.blue { background: var(--blue-tint); } .attn.gray { background: var(--line-2); }
.attn .ic { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.attn.red .ic { background: var(--red); } .attn.amber .ic { background: var(--amber); } .attn.blue .ic { background: var(--blue); } .attn.gray .ic { background: var(--muted); }
.feed { display: grid; grid-template-columns: 58px 1fr auto; gap: 8px 12px; align-items: center; font-size: 13px; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 110px; }
.bars > div { flex: 1 1 0; border-radius: 4px 4px 0 0; background: var(--line-2); position: relative; min-height: 2px; }
.bars > div.now { background: var(--hd-orange); }
.bars > div.past { background: #D9DCE2; }
.bars > div span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.list { display: flex; flex-direction: column; gap: 10px; }

/* Toasts, modal, drawer */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; max-width: 360px; }
.toast { background: var(--dark); color: #fff; padding: 12px 14px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; animation: rise .2s ease-out; }
.toast.sms { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.toast.sms .sms-bubble { background: #E9F8EE; border-radius: 12px 12px 12px 4px; padding: 8px 10px; font-size: 13px; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-bg { position: fixed; inset: 0; background: rgba(20,22,26,0.45); display: flex; align-items: center; justify-content: center; z-index: 900; padding: 16px; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; box-shadow: var(--shadow); }
.modal.wide { max-width: 760px; }
.modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 0; }
.modal-h h2 { font-size: 18px; font-weight: 700; }
.modal-b { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 0 20px 20px; flex-wrap: wrap; }

/* Shell: login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login-hero { min-height: 260px; } }
.login-hero { background: var(--hd-orange); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.login-hero::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: rgba(255,255,255,0.08); }
.login-hero::before { content: ""; position: absolute; right: 60px; top: -160px; width: 320px; height: 320px; border-radius: 50%; background: rgba(0,0,0,0.06); }
.brand-tile { width: 56px; height: 56px; border-radius: 10px; background: #fff; color: var(--hd-orange); display: flex; align-items: center; justify-content: center; }
.login-hero h1 { font-size: 44px; font-weight: 800; letter-spacing: -0.01em; max-width: 520px; }
.login-hero p { font-size: 17px; opacity: 0.95; max-width: 480px; margin: 0; }
.login-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.login-stats b { display: block; font-size: 28px; font-weight: 800; }
.login-stats span { font-size: 13px; opacity: 0.9; }
.login-panel { padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 24px; max-width: 640px; width: 100%; margin: 0 auto; }
.login-panel h2 { font-size: 24px; font-weight: 700; }
.persona { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; text-align: left; transition: border-color .15s, transform .1s; }
.persona:hover { border-color: var(--hd-orange); transform: translateY(-1px); }
.persona .avatar { width: 48px; height: 48px; font-size: 15px; }
.persona .avatar.admin { background: var(--ink); color: #fff; }
.persona .avatar.manager { background: var(--hd-orange); color: #fff; }
.persona .avatar.associate { background: var(--blue-tint); color: var(--blue); }
.persona b { display: block; font-size: 15px; }
.persona span { font-size: 13px; color: var(--muted); }
.persona .arrow { margin-left: auto; color: var(--muted); }

/* Shell: app frame */
.frame { min-height: 100vh; display: flex; flex-direction: column; }
.demobar { height: 40px; background: var(--ink); color: #D7DAE0; display: flex; align-items: center; gap: 14px; padding: 0 16px; font-size: 12px; position: sticky; top: 0; z-index: 50; }
.demobar .tag { background: var(--hd-orange); color: #fff; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.06em; font-size: 11px; }
.demobar a, .demobar button { color: #fff; background: transparent; border: 1px solid var(--dark-3); border-radius: 6px; height: 26px; padding: 0 10px; font-size: 12px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.demobar a:hover, .demobar button:hover { background: var(--dark-2); }
.demobar .spacer { flex: 1; }
.demobar .live { display: inline-flex; align-items: center; gap: 6px; color: #7BD3A2; }
.demobar .live .dot { background: #4FB07F; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.workspace { flex: 1; display: flex; min-height: 0; }
.sidebar { width: 236px; flex-shrink: 0; background: var(--dark); color: var(--dark-text); padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; }
.sidebar .logo .tile { width: 32px; height: 32px; border-radius: 8px; background: var(--hd-orange); color: #fff; display: flex; align-items: center; justify-content: center; }
.sidebar .logo b { color: #fff; font-size: 14px; letter-spacing: 0.06em; display: block; line-height: 1.1; }
.sidebar .logo small { color: #8A909C; font-size: 11px; }
.sidebar a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--dark-text); text-decoration: none; font-weight: 500; }
.sidebar a:hover { background: var(--dark-2); color: #fff; }
.sidebar a.on { background: var(--dark-2); color: #FFB380; font-weight: 600; }
.sidebar a .badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.sidebar a .badge.orange { background: var(--hd-orange); }
.sidebar .spacer { flex: 1; }
.sidebar .storebox { padding: 12px; border-radius: 10px; background: var(--dark-2); display: flex; flex-direction: column; gap: 4px; }
.sidebar .storebox .lbl { font-size: 11px; letter-spacing: 0.08em; color: #8A909C; font-weight: 600; }
.sidebar .storebox b { color: #fff; }
.sidebar .storebox small { color: #8A909C; font-size: 12px; }
.sidebar .me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; }
.sidebar .me .avatar { background: var(--dark-3); color: #fff; }
.sidebar .me b { color: #fff; font-size: 13px; display: block; }
.sidebar .me small { color: #8A909C; font-size: 12px; }
.main { flex: 1; min-width: 0; padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 20px; }
.page-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.page-h h1 { font-size: 24px; font-weight: 700; }
.page-h .sub { color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tabs button { height: 36px; padding: 0 14px; border-radius: 8px; border: 0; background: transparent; color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.tabs button.on { background: var(--ink); color: #fff; font-weight: 600; }
.tabs button .cnt { color: var(--muted); font-weight: 500; } .tabs button.on .cnt { color: #ccc; }
.tabs button .badge { background: var(--red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
@media (max-width: 900px) { .workspace { flex-direction: column; } .sidebar { width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; } .sidebar .logo { padding: 4px 8px; } .sidebar .spacer, .sidebar .storebox, .sidebar .me { display: none; } .main { padding: 16px; } }

/* Drawer (right side panel) */
.split { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.split > .grow { flex: 999 1 560px; }
.drawer { flex: 1 1 340px; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 56px; }
.drawer h2 { font-size: 17px; font-weight: 700; }

/* Phone (associate view) */
.phone-stage { flex: 1; display: flex; align-items: flex-start; justify-content: center; gap: 32px; padding: 32px 16px; background: radial-gradient(circle at 30% 20%, #2C3038, #16181D 60%); min-height: calc(100vh - 40px); flex-wrap: wrap; }
.phone { width: 390px; height: clamp(620px, calc(100vh - 104px), 844px); border-radius: 44px; background: #0b0c0e; padding: 12px; box-shadow: 0 30px 80px rgba(0,0,0,0.5), inset 0 0 0 2px #3a3d44; flex-shrink: 0; }
.screen { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: var(--ground); display: flex; flex-direction: column; position: relative; }
.phone-side { width: 320px; color: #C9CDD4; display: flex; flex-direction: column; gap: 14px; font-size: 13px; }
.phone-side .card { background: var(--dark-2); border-color: var(--dark-3); color: #E6E8EC; }
.phone-side .card-h h2 { color: #fff; font-size: 14px; }
.phone-side .btn { background: var(--dark-3); border-color: var(--dark-3); color: #fff; }
.phone-side .btn.primary { background: var(--hd-orange); border-color: var(--hd-orange); }
.phone-side .lockrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--dark-3); }
.phone-side .lockrow:last-child { border-bottom: 0; }
@media (max-width: 900px) { .phone-stage { padding: 0; background: var(--ground); } .phone { width: 100%; height: auto; min-height: calc(100vh - 40px); border-radius: 0; padding: 0; box-shadow: none; } .screen { border-radius: 0; min-height: calc(100vh - 40px); } .phone-side { width: 100%; padding: 16px; color: var(--ink); } .phone-side .card { background: #fff; border-color: var(--line); color: var(--ink); } .phone-side .card-h h2 { color: var(--ink); } }
.ph-head { background: var(--ink); color: #fff; padding: 52px 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.ph-head.orange { background: var(--hd-orange); }
.ph-head .top { display: flex; align-items: center; justify-content: space-between; }
.ph-head .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: 0.08em; font-size: 13px; }
.ph-head .brand .tile { width: 26px; height: 26px; border-radius: 7px; background: var(--hd-orange); display: flex; align-items: center; justify-content: center; }
.ph-head.orange .brand .tile { background: #fff; color: var(--hd-orange); }
.ph-head .round { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.14); color: #fff; display: inline-flex; align-items: center; justify-content: center; position: relative; }
.ph-head .round .ndot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--hd-orange); border: 2px solid var(--ink); }
.ph-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 14px; }
.ph-body.dark { background: var(--ink); color: #fff; }
.ph-nav { display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 6px 22px; background: #fff; border-top: 1px solid var(--line); }
.ph-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 500; }
.ph-nav a.on { color: var(--hd-orange-dark); font-weight: 700; }
.tapcard { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 18px 20px; border-radius: 20px; background: #fff; border: 1px solid var(--line); text-align: center; width: 100%; }
.tapcard .ring { width: 124px; height: 124px; border-radius: 50%; background: var(--hd-orange-tint); display: flex; align-items: center; justify-content: center; }
.tapcard .ring .core { width: 92px; height: 92px; border-radius: 50%; background: var(--hd-orange); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 0 rgba(249,99,2,0.5); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(249,99,2,0.45); } 70% { box-shadow: 0 0 0 18px rgba(249,99,2,0); } 100% { box-shadow: 0 0 0 0 rgba(249,99,2,0); } }
.tapcard h2 { font-size: 20px; font-weight: 700; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat3 .card { padding: 14px 10px; text-align: center; display: flex; flex-direction: column; gap: 2px; border-radius: 14px; }
.stat3 b { font-size: 24px; font-weight: 700; line-height: 1.1; }
.stat3 span { font-size: 12px; color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 12px; font-weight: 600; text-align: center; }
.quick .ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.ph-section { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ph-section h3 { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; }
.ph-item { display: flex; align-items: center; gap: 12px; }
.ph-item .ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ph-item b { font-size: 14px; display: block; }
.ph-item small { color: var(--muted); font-size: 12px; }
.ic.green { background: var(--green-tint); color: var(--green); } .ic.red { background: var(--red-tint); color: var(--red); } .ic.amber { background: var(--amber-tint); color: var(--amber); } .ic.blue { background: var(--blue-tint); color: var(--blue); } .ic.orange { background: var(--hd-orange-tint); color: var(--hd-orange-dark); } .ic.gray { background: var(--line-2); color: var(--muted); }
.hero-state { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 18px 18px; border-radius: 22px; text-align: center; color: #fff; }
.hero-state.green { background: var(--green); } .hero-state.red { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.hero-state .big { width: 84px; height: 84px; border-radius: 50%; background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; }
.hero-state.red .big { background: var(--red-tint); color: var(--red); }
.hero-state h2 { font-size: 30px; font-weight: 800; }
.hero-state .lockbox { width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,0.18); }
.hero-state.red .lockbox { background: var(--ground); color: var(--muted); font-size: 13px; }
.timerbox { padding: 16px 18px; border-radius: 18px; background: var(--dark-2); display: flex; flex-direction: column; gap: 10px; }
.timerbox .t { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.timerbox .t.warn { color: #FFB380; } .timerbox .t.over { color: #FF7B6B; }
.timerbox .track { height: 8px; border-radius: 4px; background: var(--dark-3); overflow: hidden; }
.timerbox .track span { display: block; height: 100%; background: var(--hd-orange); transition: width 1s linear; }
.option { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-align: left; width: 100%; }
.option.primary { background: var(--hd-orange); border-color: var(--hd-orange); color: #fff; }
.option .ic { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.option.primary .ic { background: rgba(255,255,255,0.2); color: #fff; }
.option b { font-size: 15px; display: block; }
.option small { font-size: 13px; color: var(--muted); display: block; }
.option.primary small { color: rgba(255,255,255,0.92); }
.waiting { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--amber-tint); color: var(--amber); font-size: 13px; font-weight: 500; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.lockpick { display: flex; flex-direction: column; gap: 6px; }
.lockpick button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; text-align: left; width: 100%; }
.lockpick button.restricted { border-style: dashed; }
.lockpick b { display: block; font-size: 14px; } .lockpick small { color: var(--muted); font-size: 12px; }
.sheet-title { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; margin-top: 6px; }

/* Admin extras */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.store-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; text-align: left; color: var(--ink); cursor: pointer; }
.store-card:hover { border-color: var(--hd-orange); }
.store-card .nm { font-size: 15px; font-weight: 700; }
.store-card .mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.store-card .mini b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.store-card .mini span { font-size: 11px; color: var(--muted); }
.rank { display: flex; flex-direction: column; gap: 8px; }
.rank .r { display: grid; grid-template-columns: 24px 1fr 120px 48px; gap: 10px; align-items: center; font-size: 13px; }
.rank .r .bar { width: 100%; }
.integration { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.integration .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--line-2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: var(--ink-2); flex-shrink: 0; }
.integration b { display: block; } .integration small { color: var(--muted); }
.policy { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.policy:last-child { border-bottom: 0; }
.policy b { display: block; } .policy small { color: var(--muted); display: block; }
.policy select, .policy input[type=number] { height: 36px; border-radius: 8px; border: 1px solid #D5D8DE; padding: 0 10px; min-width: 150px; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline .ev { display: grid; grid-template-columns: 70px 20px 1fr; gap: 10px; align-items: flex-start; padding: 8px 0; }
.timeline .ev .ln { width: 20px; display: flex; flex-direction: column; align-items: center; }
.timeline .ev .ln i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; margin-top: 5px; }
.timeline .ev.unlock .ln i { background: var(--green); } .timeline .ev.denied .ln i { background: var(--red); } .timeline .ev.alert .ln i { background: var(--amber); } .timeline .ev.approval .ln i, .timeline .ev.grant .ln i { background: var(--blue); } .timeline .ev.revoke .ln i { background: var(--ink); }
.print-only { display: none; }

/* Brand lockups (logo files come from js/brand.js) */
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.lockup .hd-mark { width: 34px; height: 34px; border-radius: 6px; display: block; flex-shrink: 0; }
.lockup .lockup-text { display: flex; flex-direction: column; line-height: 1.1; }
.lockup .lockup-text b { font-size: 14px; letter-spacing: 0.06em; color: #fff; }
.lockup .lockup-text small { font-size: 11px; color: #8A909C; }
.lockup.light .lockup-text b { color: var(--ink); }
.lockup.light .lockup-text small { color: var(--muted); }
.lockup.sm .hd-mark { width: 26px; height: 26px; border-radius: 5px; }
.lockup.sm .lockup-text b { font-size: 12px; }
.lockup.sm .lockup-text small { font-size: 10px; }
.lockup.xs .hd-mark { width: 22px; height: 22px; border-radius: 4px; }
.sidebar .logo { padding: 4px 10px 18px; }
.sidebar .brand-foot { padding: 14px 10px 4px; display: flex; flex-direction: column; gap: 8px; }
.sidebar .brand-foot img { width: 160px; height: auto; display: block; opacity: 0.95; }
.sidebar .brand-foot small { color: #8A909C; font-size: 11px; }
.login-hero .hero-logo { width: 96px; height: 96px; border-radius: 10px; background: #fff; padding: 6px; display: block; }
.login-hero .hero-logo img { width: 100%; height: 100%; display: block; border-radius: 6px; }
.login-hero .powered { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(0,0,0,0.18); font-size: 13px; }
.login-hero .powered b { letter-spacing: 0.08em; }
.login-panel .panel-logo { height: 44px; width: auto; display: block; }
.demobar .lockup.xs .lockup-text b { font-size: 11px; }
.ph-head .brand img.hd-mark { width: 26px; height: 26px; border-radius: 5px; }
.ph-head.orange .brand .tile { background: #fff; color: var(--hd-orange); }

/* ---------- Coming-soon gate ---------- */
.gate { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: #0F1114; color: #fff; overflow: hidden; }
.gate-glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.75; pointer-events: none; }
.gate-glow.a { width: 70vmax; height: 70vmax; left: -25vmax; top: -30vmax; background: radial-gradient(circle, #F96302 0%, rgba(249,99,2,0.35) 35%, transparent 70%); animation: drift 14s ease-in-out infinite alternate; }
.gate-glow.b { width: 55vmax; height: 55vmax; right: -20vmax; bottom: -25vmax; background: radial-gradient(circle, #FF8A3D 0%, rgba(249,99,2,0.25) 40%, transparent 70%); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); } }
.gate-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); pointer-events: none; }
.gate-card { position: relative; width: 100%; max-width: 560px; padding: 40px 40px 28px; border-radius: 28px; background: rgba(22,24,29,0.72); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 40px 120px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); display: flex; flex-direction: column; gap: 18px; animation: rise .5s cubic-bezier(.2,.8,.2,1); transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .5s; }
.gate-card.ok { transform: scale(1.04); opacity: 0; }
.gate-card.shake { animation: shake .45s; }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
.gate-brand { display: flex; align-items: center; gap: 14px; }
.gate-brand img { width: 64px; height: 64px; border-radius: 10px; box-shadow: 0 10px 30px rgba(249,99,2,0.35); }
.gate-brand .x { font-size: 22px; color: rgba(255,255,255,0.4); }
.gate-brand .prod { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: 0.12em; font-size: 15px; color: #fff; }
.gate-brand .prod svg { color: var(--hd-orange); }
.gate-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #FFB380; }
.gate-card h1 { font-size: clamp(30px, 5.2vw, 44px); font-weight: 800; letter-spacing: -0.015em; line-height: 1.05; background: linear-gradient(90deg, #fff 0%, #FFD5B8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gate-card p { margin: 0; color: #B5B9C2; font-size: 15px; line-height: 1.5; }
.gate-form { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.code { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 320px; }
.code input { width: 100%; height: 72px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06); color: #fff; font: inherit; font-size: 32px; font-weight: 700; text-align: center; caret-color: var(--hd-orange); transition: border-color .15s, box-shadow .15s, background .15s; }
.code input:focus { outline: 0; border-color: var(--hd-orange); box-shadow: 0 0 0 4px rgba(249,99,2,0.25); background: rgba(249,99,2,0.08); }
.code input:disabled { opacity: 0.6; }
.gate-msg { min-height: 20px; font-size: 13px; color: #FF9A8A; }
.gate-btn { height: 54px; border-radius: 14px; border: 0; background: var(--hd-orange); color: #fff; font: inherit; font-size: 16px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; box-shadow: 0 12px 30px rgba(249,99,2,0.35); transition: transform .15s, box-shadow .15s, background .15s; }
.gate-btn:hover { background: #FF7A1F; transform: translateY(-1px); box-shadow: 0 16px 36px rgba(249,99,2,0.45); }
.gate-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: #6B717C; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 14px; margin-top: 4px; }
@media (max-width: 600px) { .gate { padding: 16px 12px; align-items: flex-start; padding-top: 48px; } .gate-card { padding: 28px 22px 22px; border-radius: 22px; gap: 14px; } .gate-brand img { width: 52px; height: 52px; } .code { gap: 10px; max-width: none; } .code input { height: 64px; font-size: 28px; } }

/* ---------- Responsive sweep (phones and small tablets) ---------- */
@media (max-width: 900px) {
  .sidebar .brand-foot { display: none; }
  .demobar { height: auto; min-height: 40px; flex-wrap: wrap; row-gap: 6px; padding: 6px 10px; font-size: 11px; gap: 8px; }
  .demobar .lockup { display: none; }
  .demobar .spacer { display: none; }
  .demobar .live { width: 100%; order: 10; }
  .demobar a, .demobar button { height: 28px; padding: 0 8px; }
  .main { padding: 14px 12px 32px; gap: 14px; }
  .page-h h1 { font-size: 20px; }
  .page-h .row.wrap .btn { height: 36px; padding: 0 10px; font-size: 13px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px; } .kpi .value { font-size: 24px; }
  .grid-2 { grid-template-columns: 1fr; }
  .card-h { padding: 14px 14px 0; } .card-b { padding: 12px 14px 14px; }
  .feed { grid-template-columns: 50px 1fr; } .feed > div:nth-child(3n) { grid-column: 2; margin-top: -4px; }
  .split { flex-direction: column; } .drawer { position: static; max-width: none; width: 100%; }
  .tabs button { height: 34px; padding: 0 10px; font-size: 13px; }
  .search { min-width: 0; width: 100%; }
  .store-grid { grid-template-columns: 1fr; }
  .rank .r { grid-template-columns: 20px 1fr 80px 40px; }
  .policy { grid-template-columns: 1fr; } .policy select, .policy input[type=number] { width: 100%; }
  .integration { flex-wrap: wrap; } .integration .btn { width: 100%; }
  .modal { border-radius: 16px 16px 0 0; max-height: 94vh; } .modal-bg { align-items: flex-end; padding: 0; }
  .login-hero { padding: 28px 20px; gap: 20px; } .login-hero h1 { font-size: 30px; } .login-hero p { font-size: 15px; } .login-hero::before, .login-hero::after { display: none; }
  .login-hero .hero-logo { width: 64px; height: 64px; }
  .login-stats { gap: 18px; } .login-stats b { font-size: 22px; }
  .login-panel { padding: 24px 16px 40px; gap: 18px; }
  .persona { padding: 12px; } .persona .avatar { width: 40px; height: 40px; font-size: 13px; }
  .toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .sidebar { gap: 2px; } .sidebar a { padding: 8px 10px; font-size: 13px; gap: 8px; } .sidebar .logo { width: 100%; padding: 4px 6px 8px; }
  .stat3 b { font-size: 20px; }
}
