/* ============================================================================
   Luqa StoreUnit - one stylesheet for the landing page, the three sign-in
   portals and the app. Phone-first; wider screens get a side menu.
   ========================================================================== */
:root {
  --ink: #1f1416;
  --ink-2: #4b3a3d;
  --muted: #806c70;
  --line: #eadfe0;
  --bg: #f7f2f2;
  --card: #ffffff;
  --brand: #8b1a2b;          /* dark red */
  --brand-ink: #ffffff;
  --brand-soft: #f6e4e6;
  --brand-dark: #5a0f1b;
  --brand-deep: #3a0811;
  --gold: #d9a441;
  --amber: #b7791f; --amber-bg: #fdf3e1;
  --green: #1f7a4d; --green-bg: #e3f4ea;
  --blue: #2557a7;  --blue-bg: #e5edfb;
  --red: #c62828;   --red-bg: #fde8e7;
  --navy: #26324a;  --navy-bg: #e6e9f0;
  --gray: #5f6368;  --gray-bg: #eeece9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(58, 8, 17, .06), 0 8px 24px rgba(58, 8, 17, .08);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.ic { flex: none; vertical-align: -3px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.mt { margin-top: 14px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--gray-bg); color: var(--ink);
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-danger { background: var(--red); color: #fff; }
.btn-ok { background: var(--green); color: #fff; }
.btn-urgent { background: var(--red); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 11px; font-size: .88rem; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 0; background: transparent; color: inherit; cursor: pointer;
}
.icon-btn:hover { background: rgba(0, 0, 0, .06); }

/* ------------------------------------------------------------------ forms */
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 5px; }
.field { margin-bottom: 14px; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
input[type="checkbox"] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--brand); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.form-error, .alert-bad { background: var(--red-bg); color: var(--red); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-weight: 600; }

/* ----------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge.gray { background: var(--gray-bg); color: var(--gray); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.navy { background: var(--navy-bg); color: var(--navy); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.urgent { background: var(--red); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.notice { border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.notice.info { background: var(--blue-bg); color: var(--blue); }
.notice.warn { background: var(--amber-bg); color: #7a4f0e; }
.notice.bad { background: var(--red-bg); color: var(--red); }
.notice.ok { background: var(--green-bg); color: var(--green); }

/* ------------------------------------------------------------------ cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; font-size: 1rem; }
.card-body { padding: 16px; }
.page-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.loading { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 40px; color: var(--muted); }
.spin { width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 36px 16px; color: var(--muted); }
.empty-ico { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-soft); color: var(--brand); }
.empty strong { color: var(--ink); }

/* ------------------------------------------------------------------ stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; text-decoration: none; color: inherit; display: block; }
.stat-ico { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.stat .label { font-size: .8rem; color: var(--muted); font-weight: 600; padding-right: 40px; }
.stat .value { font-size: 1.7rem; font-weight: 800; }
.stat .hint { font-size: .78rem; color: var(--muted); }
.stat-link { text-decoration: none; color: inherit; display: block; }
.stat-link .stat { height: 100%; }
.hide-label { visibility: hidden; }
@media (max-width: 639px) { .hide-label { display: none; } }
.stat.red .stat-ico { background: var(--red-bg); color: var(--red); }
.stat.red .value { color: var(--red); }
.welcome {
  display: flex; gap: 14px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap;
  background: linear-gradient(110deg, rgba(58,8,17,.96) 0%, rgba(90,15,27,.88) 55%, rgba(139,26,43,.45) 100%), url('/assets/slides/drawers-sm.jpg') center / cover;
  color: #fff; border-radius: 18px; padding: 22px 20px; margin-bottom: 16px; position: relative; overflow: hidden;
}
.welcome::after { content: none; }
.welcome h1 { margin: 4px 0; font-size: 1.35rem; }
.welcome p { margin: 0; opacity: .85; }
.welcome-date { font-size: .8rem; opacity: .8; }
.welcome .btn-primary { background: #fff; color: var(--brand-dark); }
.welcome-date { color: var(--gold); opacity: 1 !important; font-weight: 600; }
.welcome-actions { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ shell */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + var(--safe-t)) 12px 8px; background: linear-gradient(90deg, var(--brand-deep), var(--brand-dark)); color: #fff;
  box-shadow: 0 2px 10px rgba(58, 8, 17, .25);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand img { width: 36px; height: 36px; border-radius: 8px; background: #fff; }
.brand b { display: block; font-size: 1rem; line-height: 1.1; }
.brand small { display: block; font-size: .72rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.topbar .icon-btn { color: #fff; position: relative; }
.topbar .icon-btn:hover { background: rgba(255,255,255,.12); }
.dot { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: var(--brand-deep); font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
.layout { display: flex; min-height: calc(100vh - 56px); }
#sidebar { display: none; }
#view { flex: 1; min-width: 0; padding: 16px 14px calc(90px + var(--safe-b)); max-width: 1100px; margin: 0 auto; width: 100%; }
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: #fff;
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
.bottom-nav a { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 8px 2px; font-size: .7rem; font-weight: 600; color: var(--muted); text-decoration: none; position: relative; }
.bottom-nav a.active { color: var(--brand); }
.bottom-nav .dot { top: 2px; right: calc(50% - 22px); }
@media (min-width: 900px) {
  #sidebar { display: block; width: 240px; flex: none; background: #fff; border-right: 1px solid var(--line); padding: 16px 10px; }
  .bottom-nav { display: none; }
  #view { padding: 24px 28px 40px; }
}
.user-card { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--brand-soft); margin-bottom: 14px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; flex: none; }
.user-card b { display: block; font-size: .9rem; } .user-card small { color: var(--muted); font-size: .76rem; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; position: relative; }
.nav a:hover { background: var(--bg); }
.nav a.active { background: var(--brand); color: #fff; }
.nav .dot { position: static; margin-left: auto; }

/* ---------------------------------------------------------- request list */
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { text-decoration: none; flex: none; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 14px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search input { min-width: 0; flex: 1; }
.search select { width: auto; max-width: 140px; }
.req-list { display: grid; gap: 10px; }
.req {
  display: block; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 13px 14px;
  text-decoration: none; color: inherit; border-left: 5px solid var(--line);
}
.req:hover { box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 10px 26px rgba(0,0,0,.08); }
.req.st-pending_ops { border-left-color: var(--amber); }
.req.st-pending_store { border-left-color: var(--blue); }
.req.st-approved { border-left-color: var(--green); }
.req.st-completed { border-left-color: var(--navy); }
.req.st-rejected { border-left-color: var(--red); }
.req.is-urgent.open { border-left-color: var(--red); background: linear-gradient(90deg, #fff4f3, #fff 40%); }
.req-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.req-ref { font-weight: 800; }
.req-meta { font-size: .82rem; color: var(--muted); display: flex; gap: 4px 14px; flex-wrap: wrap; }
.req-sum { font-size: .9rem; margin: 4px 0; color: var(--ink-2); }
.progress { height: 5px; border-radius: 3px; background: var(--gray-bg); overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; background: var(--green); }

/* -------------------------------------------------------- request detail */
.kv { display: grid; grid-template-columns: 1fr; gap: 10px 18px; }
@media (min-width: 640px) { .kv { grid-template-columns: repeat(3, 1fr); } }
.kv div small { display: block; color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.kv div b { font-weight: 600; }
.approvals { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 639px) { .approvals .appr { padding: 9px; font-size: .85rem; } .approvals .small { font-size: .74rem; } }
.appr { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.appr small { display: block; color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; }
.appr.yes { border-color: #b7e0c8; background: var(--green-bg); }
.appr.no { border-color: #f4c2bf; background: var(--red-bg); }
.lines { width: 100%; border-collapse: collapse; }
.lines th, .lines td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines th { font-size: .76rem; color: var(--muted); text-transform: uppercase; }
.line-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 10px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on.done { background: var(--green); color: #fff; }
.seg button.on.not_yet { background: var(--amber); color: #fff; }
.seg button.on.out_of_stock { background: var(--red); color: #fff; }
@media (max-width: 639px) {
  .lines thead { display: none; }
  .lines tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .lines td { display: block; border: 0; padding: 2px 0; }
  .lines td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: .8rem; }
}
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
.timeline li:last-child { border-color: transparent; }
.sig-img { max-width: 280px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.sigpad { width: 100%; height: 180px; border: 2px dashed var(--line); border-radius: 12px; background: #fff; touch-action: none; display: block; }
.actionbar { position: sticky; bottom: calc(64px + var(--safe-b)); z-index: 20; display: flex; gap: 8px; flex-wrap: wrap; background: rgba(247,242,242,.92); backdrop-filter: blur(6px); padding: 10px 0; }
.actionbar .btn { flex: 1; }
@media (min-width: 900px) { .actionbar { bottom: 0; } }

/* ------------------------------------------------------------ new request */
.item-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; }
.item-row .grid3 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 640px) { .item-row .grid3 { grid-template-columns: 1.1fr 2fr .8fr .8fr auto; align-items: end; } }
.item-row .field { margin-bottom: 8px; }
.urgent-toggle { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; border: 2px solid var(--line); cursor: pointer; background: #fff; }
.urgent-toggle.on { border-color: var(--red); background: var(--red-bg); color: var(--red); }
.urgent-toggle input { width: 22px; height: 22px; accent-color: var(--red); }

/* ---------------------------------------------------------- urgent alarm */
.alarm {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(150, 10, 10, .92); color: #fff; animation: flash 1s infinite;
}
@keyframes flash { 50% { background: rgba(90, 0, 0, .95); } }
.alarm-box { max-width: 460px; width: 100%; text-align: center; }
.alarm-ico { width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--red); animation: ring .5s infinite alternate; }
@keyframes ring { from { transform: rotate(-12deg) scale(1); } to { transform: rotate(12deg) scale(1.08); } }
.alarm h2 { font-size: 1.6rem; letter-spacing: .04em; }
.alarm ul { list-style: none; padding: 0; margin: 14px 0; text-align: left; }
.alarm li a { display: block; background: rgba(255,255,255,.14); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; color: #fff; text-decoration: none; }
.alarm .btn { background: #fff; color: var(--red); min-height: 52px; font-size: 1.05rem; }
.sound-banner { background: var(--amber-bg); color: #7a4f0e; padding: 10px 14px; display: flex; gap: 10px; align-items: center; font-size: .88rem; font-weight: 600; }

/* ---------------------------------------------------------- toast & modal */
.toasts { position: fixed; z-index: 120; left: 50%; transform: translateX(-50%); bottom: calc(80px + var(--safe-b)); display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; }
.toast.bad { background: var(--red); } .toast.ok { background: var(--green); }
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(20, 14, 8, .5); display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; padding-bottom: var(--safe-b); }
@media (min-width: 640px) { .modal-backdrop { align-items: center; } .modal { width: min(94vw, 520px); border-radius: 18px; } .modal.wide { width: min(94vw, 820px); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.modal-head h2 { margin: 0; font-size: 1.05rem; }
.modal-body { padding: 16px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.secret { font: 700 1.3rem/1.3 ui-monospace, Consolas, monospace; background: var(--brand-soft); border-radius: 10px; padding: 12px; text-align: center; letter-spacing: .06em; user-select: all; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.data th { font-size: .76rem; color: var(--muted); text-transform: uppercase; background: #faf8f5; }

/* ------------------------------------------------------ landing & sign-in */
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-light:hover { background: #f6e4e6; }
.btn-glass { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255,255,255,.22); }
.eyebrow { display: inline-block; color: var(--gold); font-weight: 700; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.landing { background: var(--bg); }

/* hero slide show */
.showcase { position: relative; min-height: min(92vh, 860px); min-height: min(92svh, 860px); color: #fff; overflow: hidden; background: var(--brand-deep); display: flex; flex-direction: column; }
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.2s ease; }
.slide.on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 7s ease-out; }
.slide.on img { transform: scale(1); }
@media (prefers-reduced-motion: reduce) { .slide, .slide img { transition: none; } }
.shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(58,8,17,.70) 0%, rgba(58,8,17,.25) 30%, rgba(58,8,17,.55) 62%, rgba(40,4,10,.95) 100%),
  linear-gradient(90deg, rgba(58,8,17,.75) 0%, rgba(58,8,17,0) 70%); }
.topnav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(18px + var(--safe-t)) 20px 0; max-width: 1160px; width: 100%; margin: 0 auto; }
.topnav-brand img { height: 42px; width: auto; display: block; }
.hero-copy { position: relative; z-index: 2; max-width: 1160px; width: 100%; margin: auto auto 0; padding: 40px 20px 26px; }
.hero-copy h1 { font-size: clamp(1.75rem, 5.2vw, 3.2rem); line-height: 1.12; max-width: 19ch; margin: 10px 0 14px; font-weight: 800; letter-spacing: -.01em; }
.hero-copy p { max-width: 54ch; font-size: clamp(.98rem, 2.2vw, 1.12rem); opacity: .9; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-actions .btn { min-height: 48px; padding: 0 22px; border-radius: 12px; }
.slide-bar { position: relative; z-index: 2; max-width: 1160px; width: 100%; margin: 0 auto; padding: 14px 20px calc(22px + var(--safe-b));
  display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(255,255,255,.18); }
.slide-caption { font-weight: 700; letter-spacing: .02em; }
.slide-caption::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--gold); vertical-align: middle; margin-right: 10px; }
.slide-ctrl { display: flex; align-items: center; gap: 10px; }
.round { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; cursor: pointer; }
.round:hover { background: rgba(255,255,255,.25); }
.dots { display: flex; gap: 6px; }
.dots .dot { position: static; min-width: 0; width: 8px; height: 8px; padding: 0; border-radius: 4px; border: 0; background: rgba(255,255,255,.45); cursor: pointer; transition: width .3s; }
.dots .dot.on { width: 26px; background: var(--gold); }
@media (max-width: 520px) { .dots { display: none; } }

/* sections */
.section { padding: 56px 0; }
.section.tight { padding: 8px 0 48px; }
.section.dark { background: linear-gradient(160deg, var(--brand-deep), var(--brand-dark)); color: #fff; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.kicker { display: block; color: var(--brand); font-weight: 800; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.section.dark .kicker { color: var(--gold); }
.section-title { font-size: clamp(1.4rem, 3.6vw, 2.1rem); margin-bottom: 24px; letter-spacing: -.01em; }
.portals { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .portals { grid-template-columns: repeat(3, 1fr); } }
.portal-card { position: relative; display: block; text-decoration: none; color: inherit; background: #fff; border-radius: 18px; box-shadow: var(--shadow);
  padding: 24px 22px; border: 1px solid var(--line); transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden; }
.portal-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--brand), var(--brand-deep)); }
.portal-card:hover { transform: translateY(-3px); border-color: #e2c3c7; box-shadow: 0 14px 34px rgba(58,8,17,.14); }
.portal-card .pi { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; margin-bottom: 14px; }
.portal-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.portal-card p { color: var(--muted); font-size: .92rem; margin: 0 0 14px; }
.portal-card .go { font-weight: 800; color: var(--brand); }
.flow { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: s; }
@media (min-width: 760px) { .flow { grid-template-columns: repeat(4, 1fr); } }
.flow li { counter-increment: s; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 18px; display: grid; gap: 6px; }
.flow li::before { content: "0" counter(s); font-weight: 800; color: var(--gold); font-size: 1.4rem; }
.flow li span { opacity: .78; font-size: .92rem; }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure { position: relative; margin: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--brand-soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; color: #fff; font-weight: 700; font-size: .9rem;
  background: linear-gradient(180deg, transparent, rgba(40,4,10,.85)); }
.install-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow); }
.install-card img { border-radius: 14px; box-shadow: var(--shadow); }
.install-card p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.site-foot { background: var(--brand-deep); color: rgba(255,255,255,.75); padding: 32px 20px calc(28px + var(--safe-b)); display: grid; justify-items: center; gap: 12px; text-align: center; font-size: .85rem; }
.site-foot img { height: 38px; width: auto; }
.site-foot nav { display: flex; gap: 6px 18px; flex-wrap: wrap; justify-content: center; }
.site-foot a { color: #fff; text-decoration: none; opacity: .85; }

/* sign-in pages: photo panel + form */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.auth-page.split { flex-direction: row; }
.auth-visual { position: relative; flex: 1.1; min-height: 100vh; background-size: cover; background-position: center; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 34px; }
.auth-visual::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(58,8,17,.55), rgba(58,8,17,.35) 40%, rgba(40,4,10,.92)); }
.auth-visual > * { position: relative; }
.auth-visual-brand img { height: 46px; width: auto; }
.auth-visual-text p { font-size: 1.5rem; font-weight: 700; line-height: 1.3; max-width: 22ch; margin: 8px 0 0; }
.auth-side { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.auth-head { display: flex; align-items: center; gap: 12px; padding: calc(18px + var(--safe-t)) 24px 0; }
.auth-head img { width: 46px; height: 46px; border-radius: 12px; box-shadow: var(--shadow); }
.auth-head b { font-size: 1.1rem; display: block; } .auth-head small { color: var(--muted); }
.split .auth-head { display: none; }
.auth-main { flex: 1; display: grid; place-items: center; padding: 24px 20px; }
.auth-card { width: min(100%, 420px); background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 26px; border: 1px solid var(--line); }
.auth-card .portal-tag { display: inline-flex; gap: 6px; align-items: center; background: var(--brand-soft); color: var(--brand-dark); border-radius: 99px; padding: 4px 12px; font-weight: 800; font-size: .78rem; margin-bottom: 10px; letter-spacing: .02em; }
.auth-card h1 { font-size: 1.5rem; }
.auth-card .btn-primary { min-height: 48px; }
.auth-foot { text-align: center; padding: 16px 20px calc(16px + var(--safe-b)); color: var(--muted); font-size: .82rem; }
.auth-foot a { color: var(--muted); }
.tabs { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--brand-dark); box-shadow: var(--shadow); }
@media (max-width: 899px) {
  .auth-page.split { flex-direction: column; }
  .auth-visual { flex: none; min-height: 0; height: 230px; padding: calc(18px + var(--safe-t)) 20px 46px; }
  .auth-visual-text p { font-size: 1.05rem; }
  .auth-side { min-height: 0; flex: 1; }
  .split .auth-main { margin-top: -34px; align-items: start; padding-top: 0; }
}

/* ------------------------------------------------------------------ print */
.print-only { display: none; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff; font-size: 12px; }
  .topbar, #sidebar, .bottom-nav, .actionbar, .no-print, .toasts, .line-actions, .alarm, .sound-banner { display: none !important; }
  .print-only { display: block; }
  #view { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .badge.urgent { animation: none; }
  .lines thead { display: table-header-group; }
  .lines tr { display: table-row; } .lines td { display: table-cell; border-bottom: 1px solid #ccc; }
  .lines td[data-l]::before { content: none; }
}
