/* myHood — component/utility layer, built on tokens.css. No external framework —
   self-contained so production never depends on a CDN. */

/* ── Layout shell ─────────────────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px;
  flex: 0 0 264px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: transform .2s ease;
  z-index: 40;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 22px 20px 18px; }
.sidebar-brand .mark {
  width: 38px; height: 38px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); padding: 6px;
}
.sidebar-brand .mark svg { width: 100%; height: 100%; }
.sidebar-brand .name { font-family: "Segoe UI Semibold", sans-serif; font-weight: 700; font-size: 19px; }
.sidebar-nav { flex: 1; padding: 6px 14px; display: flex; flex-direction: column; gap: 3px; }
.sidebar-section { font-size: 11px; text-transform: uppercase; font-weight: 700; letter-spacing: .06em; color: var(--ink-faint); padding: 16px 12px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-pill);
  color: var(--ink-soft); text-decoration: none; font-size: 14.5px; font-weight: 600;
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.active { background: var(--accent); color: var(--accent-ink); }
.nav-link .icon { width: 20px; text-align: center; flex: 0 0 auto; display: inline-flex; }
.sidebar-footer { padding: 16px 20px; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; background: var(--bg);
  display: flex; align-items: center; justify-content: space-between; padding: 20px 28px 8px; gap: 16px;
}
.topbar-title { font-family: "Segoe UI Semibold", sans-serif; font-weight: 700; font-size: 30px; letter-spacing: -0.01em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; }

.content { padding: 8px 28px 32px; flex: 1; max-width: 1400px; width: 100%; margin: 0 auto; }
.content-narrow { max-width: 720px; }

.user-chip { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.avatar { width: 32px; height: 32px; border-radius: var(--radius-pill); background: var(--accent-tint); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Typography helpers ──────────────────────────────────────────────────── */
.page-title { font-family: "Segoe UI Semibold", sans-serif; font-weight: 700; font-size: 30px; letter-spacing: -0.01em; margin: 0 0 4px; }
.page-subtitle { color: var(--ink-soft); margin: 0 0 22px; font-size: 14.5px; }
.section-title { font-family: "Segoe UI Semibold", sans-serif; font-weight: 700; font-size: 16px; margin: 0 0 12px; }
.eyebrow { font-size: 11.5px; text-transform: uppercase; font-weight: 700; letter-spacing: .06em; color: var(--ink-faint); }
.text-soft { color: var(--ink-soft); }
.text-faint { color: var(--ink-faint); }
.text-sm { font-size: 13px; }

/* ── Cards / panels ──────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid transparent; border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.card-pad { padding: 22px; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-body { padding: 18px 22px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.stat-tile { background: var(--surface); border: 1px solid transparent; border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-card); }
.stat-tile .label { color: var(--ink-soft); font-size: 13px; margin-bottom: 2px; }
.stat-tile .value { font-family: "Segoe UI Semibold", sans-serif; font-weight: 700; font-size: 27px; letter-spacing: -0.01em; }
.stat-tile .delta { font-size: 12.5px; margin-top: 6px; }
.stat-tile .delta.up { color: var(--success); }
.stat-tile .delta.down { color: var(--critical); }
.stat-tile .icon-tile { margin-bottom: 14px; }

/* Icon tile — the small rounded-square colored icon badge used throughout the mobile app */
.icon-tile {
  width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.icon-tile-sm { width: 36px; height: 36px; border-radius: 11px; }
.icon-tile-accent { background: var(--accent-tint); color: var(--accent-strong); }
.icon-tile-orange { background: var(--orange-soft); color: var(--orange-strong); }
.icon-tile-warning { background: var(--warning-soft); color: var(--warning); }
.icon-tile-critical { background: var(--critical-soft); color: var(--critical); }
.icon-tile-neutral { background: var(--surface-2); color: var(--ink-soft); }

.empty-state { text-align: center; padding: 48px 20px; color: var(--ink-soft); }
.empty-state .icon { font-size: 34px; margin-bottom: 10px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-pill); border: 1px solid transparent;
  font-size: 14.5px; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: background-color .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-orange { background: var(--orange); color: var(--orange-ink); }
.btn-orange:hover { background: var(--orange-strong); }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { background: var(--surface-2); }
.btn-danger { background: var(--critical); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-soft); border-radius: var(--radius-sm); }
.btn-ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Button-styled links (<a class="btn ...">) are orange — real form-submit <button> actions
   (Pay Now, Sign In, Save changes, ...) keep their green/etc. styling. */
a.btn-primary { background: var(--orange); color: var(--orange-ink); }
a.btn-primary:hover { background: var(--orange-strong); }
a.btn-outline { border-color: var(--orange); color: var(--orange-strong); background: var(--surface); }
a.btn-outline:hover { background: var(--orange-soft); }
a.btn-ghost { color: var(--orange-strong); }
a.btn-ghost:hover { color: var(--orange-strong); background: var(--orange-soft); }

/* Filter/toggle chips (pill, active = solid green) reuse .btn-sm with these two states */
.chip { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 700; text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
label, .form-label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.form-hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.form-error { font-size: 12.5px; color: var(--critical); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=datetime-local], input[type=url], select, textarea {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: 14.5px; font-family: inherit;
}
select { border-radius: var(--radius-sm); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url] { border-radius: var(--radius-pill); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.input-invalid { border-color: var(--critical) !important; }
textarea { resize: vertical; min-height: 90px; border-radius: var(--radius-sm); }
.form-row { display: flex; gap: 14px; }
.form-row > .form-group { flex: 1; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
.otp-input { text-align: center; letter-spacing: 8px; font-family: Consolas, monospace; font-size: 22px; border-radius: var(--radius-sm) !important; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
thead th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 700; padding: 14px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody td { padding: 15px 20px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
.table-actions { display: flex; gap: 8px; }

/* ── Badges / alerts ─────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.badge-neutral { background: var(--surface-2); color: var(--ink-soft); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-critical { background: var(--critical-soft); color: var(--critical); }
.badge-accent { background: var(--accent-tint); color: var(--accent-strong); }
.badge-orange { background: var(--orange-soft); color: var(--orange-strong); }

/* Thin brand accent bar — the orange half of the logo, carried across the top of every page.
   Fixed + zero-height-impact so it never disturbs the sticky sidebar/topbar layout math below it. */
.brand-topbar { position: fixed; top: 0; left: 0; right: 0; height: 4px; background: var(--orange); z-index: 100; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; font-weight: 500; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error { background: var(--critical-soft); color: var(--critical); }
.alert-info { background: var(--accent-tint); color: var(--accent-strong); }

/* ── Auth pages ──────────────────────────────────────────────────────────── */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid transparent; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 36px 32px; }
.auth-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 26px; text-decoration: none; }
.auth-brand .mark { width: 44px; height: 44px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 7px; box-shadow: var(--shadow); }
.auth-brand .mark svg { width: 100%; height: 100%; }
.auth-title { font-family: "Segoe UI Semibold", sans-serif; font-weight: 700; font-size: 26px; letter-spacing: -0.01em; text-align: center; margin: 0 0 6px; }
.auth-subtitle { text-align: center; color: var(--ink-soft); font-size: 14px; margin: 0 0 26px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--ink-soft); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--ink-faint); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 13.5px; }
.pagination .current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ── Landing page ────────────────────────────────────────────────────────── */
.landing-header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.landing-nav { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.landing-nav .links { display: flex; gap: 26px; align-items: center; }
.landing-nav .links a { color: var(--ink-soft); text-decoration: none; font-size: 14.5px; }
.landing-nav .links a:hover { color: var(--ink); }
.hero { max-width: 1200px; margin: 0 auto; padding: 72px 24px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding: 40px 20px; } }
.hero h1 { font-family: "Segoe UI Semibold", sans-serif; font-weight: 700; font-size: 42px; line-height: 1.15; margin: 0 0 16px; }
.hero p { color: var(--ink-soft); font-size: 17px; margin: 0 0 26px; max-width: 520px; }
.hero-art { background: linear-gradient(160deg, var(--accent-tint), var(--surface-2)); border-radius: var(--radius-lg); min-height: 340px; display: flex; align-items: center; justify-content: center; padding: 32px; }
.hero-phone { max-width: 280px; width: 100%; height: auto; border-radius: 28px; box-shadow: 0 20px 50px rgba(28, 36, 32, 0.22), 0 2px 8px rgba(28, 36, 32, 0.1); border: 6px solid var(--surface); }
@media (max-width: 900px) { .hero-phone { max-width: 240px; } }
.section { max-width: 1200px; margin: 0 auto; padding: 60px 24px; }
.section-heading { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card { background: var(--surface); border: 1px solid transparent; border-radius: var(--radius-md); padding: 26px; box-shadow: var(--shadow-card); }
.feature-card .icon { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-tint); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 20px; }
.landing-footer { border-top: 1px solid var(--line); padding: 40px 24px; color: var(--ink-soft); font-size: 13.5px; }
.landing-footer .cols { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.qr-box { width: 220px; height: 220px; margin: 0 auto; background: var(--surface-2); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }
  .content { padding: 16px; }
}
