:root {
  --blue-50: #eef4ff;
  --blue-100: #dbe8ff;
  --blue-200: #bfd5ff;
  --blue-500: #2864f0;
  --blue-600: #123fe7;
  --blue-700: #0f34c5;
  --navy: #102045;
  --ink: #17213a;
  --muted: #64708a;
  --muted-2: #8d98ad;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #dce2ec;
  --line-soft: #edf0f5;
  --success: #079455;
  --success-soft: #eaf8f1;
  --warn: #e07800;
  --warn-soft: #fff5e6;
  --danger: #e32d46;
  --danger-soft: #ffedf0;
  --brand: var(--blue-600);
  --brand2: var(--blue-500);
  --side: #fff;
  --side-ink: #53607a;
  --shadow-sm: 0 1px 2px rgba(16, 32, 69, .04);
  --shadow-md: 0 14px 36px rgba(16, 32, 69, .10);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --sidebar-width: 248px;
  --topbar-height: 66px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--brand); }
svg { display: block; }

/* Brand */
.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
}
.brand-mark svg { width: 24px; height: 24px; } .brand-mark img { width: 36px; height: 36px; }
.brand-mark--light { background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand-mark--hero { width: 88px; height: 88px; border-radius: 26px; background: #fff; color: var(--brand); box-shadow: 0 22px 50px rgba(4, 29, 134, .28); }
.brand-mark--hero svg { width: 54px; height: 54px; } .brand-mark--hero img { width: 82px; height: 82px; }
.eyebrow { display: inline-block; color: var(--brand); font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow--light { color: #bcd0ff; }

/* Login */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, 1.08fr) minmax(420px, .92fr); background: #fff; }
.login-showcase {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: 36px clamp(36px, 5vw, 76px) 54px;
  color: #fff;
  background:
    radial-gradient(circle at 76% 19%, rgba(94,150,255,.52), transparent 24%),
    radial-gradient(circle at 18% 85%, rgba(31,103,255,.28), transparent 30%),
    linear-gradient(145deg, #071c72 0%, #103bd3 54%, #155bf1 100%);
}
.login-showcase::before, .login-showcase::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.10); border-radius: 999px; }
.login-showcase::before { width: 580px; height: 580px; right: -260px; bottom: -310px; }
.login-showcase::after { width: 360px; height: 360px; left: -190px; top: 25%; }
.login-showcase__brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.ecosystem { position: relative; width: min(580px, 80%); height: 430px; margin: 28px auto 0; flex: 1; min-height: 380px; }
.ecosystem__halo { position: absolute; top: 50%; left: 50%; border-radius: 50%; transform: translate(-50%,-50%); }
.ecosystem__halo--one { width: 330px; height: 330px; border: 1px solid rgba(255,255,255,.30); background: rgba(255,255,255,.06); }
.ecosystem__halo--two { width: 220px; height: 220px; border: 1px solid rgba(255,255,255,.46); background: rgba(255,255,255,.08); box-shadow: 0 0 90px rgba(69,151,255,.42); }
.ecosystem__core { position: absolute; z-index: 3; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.ecosystem__item {
  position: absolute;
  z-index: 4;
  display: flex;
  min-width: 160px;
  flex-direction: column;
  gap: 3px;
  padding: 13px 18px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  background: rgba(255,255,255,.13);
  box-shadow: 0 12px 30px rgba(5,20,84,.14);
  backdrop-filter: blur(8px);
}
.ecosystem__item span { font-weight: 750; }
.ecosystem__item small { color: #c9d8ff; font-size: 11px; }
.ecosystem__item--pdv { top: 14%; left: 0; }
.ecosystem__item--stock { top: 12%; right: 0; }
.ecosystem__item--cash { bottom: 14%; left: 3%; }
.ecosystem__item--credit { right: 2%; bottom: 12%; }
.login-showcase__copy { position: relative; z-index: 2; max-width: 650px; }
.login-showcase__copy h1 { max-width: 620px; margin: 10px 0 12px; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.08; letter-spacing: -.045em; }
.login-showcase__copy > p { max-width: 620px; margin: 0; color: #d9e3ff; font-size: 16px; line-height: 1.65; }
.showcase-proof { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 24px; color: #e9efff; font-size: 12px; }
.showcase-proof span { display: inline-flex; align-items: center; gap: 8px; }
.showcase-proof i { width: 7px; height: 7px; border: 2px solid #8ae4b8; border-radius: 50%; }
.login-panel { display: grid; min-height: 100vh; place-items: center; padding: 44px clamp(30px, 6vw, 88px); background: #fff; }
.login-panel__inner { width: min(100%, 410px); }
.login-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 52px; color: var(--navy); font-size: 20px; font-weight: 750; }
.login-heading h2 { margin: 7px 0 8px; font-size: 30px; letter-spacing: -.035em; }
.login-heading p { margin: 0; color: var(--muted); line-height: 1.55; }
.login-form { display: grid; gap: 19px; margin-top: 32px; }
.field label { display: block; margin: 0; color: #34405a; font-size: 12.5px; font-weight: 650; }
.field__label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.field__label-row a { font-size: 12px; text-decoration: none; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; z-index: 1; top: 50%; left: 13px; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: #8b97ad; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.input-wrap input { height: 46px; margin: 0; padding: 0 42px 0 42px; }
.input-action { position: absolute; top: 50%; right: 8px; display: grid; width: 32px; height: 32px; place-items: center; padding: 0; transform: translateY(-50%); border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.input-action:hover { background: var(--blue-50); color: var(--brand); }
.input-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.btn-login { display: flex; width: 100%; height: 48px; align-items: center; justify-content: center; gap: 9px; margin-top: 2px; border-radius: 9px; }
.btn-login svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.demo-access { display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center; margin-top: 22px; padding: 12px; border: 1px solid var(--blue-100); border-radius: 11px; background: var(--blue-50); }
.demo-access__icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: #fff; color: var(--brand); font-weight: 800; box-shadow: var(--shadow-sm); }
.demo-access b, .demo-access small { display: block; }
.demo-access b { color: #2d3952; font-size: 12px; }
.demo-access small { margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.demo-access button { padding: 6px 8px; border: 0; background: transparent; color: var(--brand); font-size: 11px; font-weight: 750; }
.login-help { margin: 24px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.login-help a { font-weight: 650; text-decoration: none; }

/* App shell */
#app { display: none; min-height: 100vh; }
#app.on { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: sticky; z-index: 30; top: 0; display: flex; height: 100vh; min-width: 0; flex-direction: column; overflow: hidden; border-right: 1px solid var(--line); background: #fff; color: var(--side-ink); }
.sidebar__brand { display: flex; min-height: var(--topbar-height); align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.sidebar__brand-copy { display: block; min-width: 0; }
.sidebar__brand-copy b, .sidebar__brand-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__brand-copy b { color: var(--navy); font-size: 15px; letter-spacing: -.02em; }
.sidebar__brand-copy small { max-width: 145px; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.sidebar__close { display: none; margin-left: auto; padding: 4px 8px; border: 0; background: transparent; color: var(--muted); font-size: 25px; }
.sidebar__primary { display: flex; height: 42px; align-items: center; justify-content: center; gap: 8px; margin: 16px 14px 8px; border: 0; border-radius: 9px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 750; transition: transform .15s, background .15s; }
.sidebar__primary:hover { background: var(--blue-700); transform: translateY(-1px); }
.sidebar__primary svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sidebar__nav { flex: 1; overflow-y: auto; padding: 8px 10px 14px; scrollbar-width: thin; }
.nav-group + .nav-group { margin-top: 15px; }
.nav-group__label { display: block; padding: 0 10px 6px; color: #a1aabd; font-size: 9.5px; font-weight: 800; letter-spacing: .10em; text-transform: uppercase; }
.sidebar__nav a { display: flex; min-height: 39px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--side-ink); font-size: 12.5px; font-weight: 520; text-decoration: none; cursor: pointer; transition: color .15s, background .15s; }
.sidebar__nav a:hover { background: #f5f7fb; color: var(--navy); }
.sidebar__nav a.active { background: var(--blue-100); color: var(--brand); font-weight: 720; }
.sidebar__nav a svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar__support { display: grid; grid-template-columns: 31px 1fr; gap: 9px; align-items: center; margin: 4px 12px 10px; padding: 10px; border: 1px solid var(--blue-100); border-radius: 10px; background: var(--blue-50); }
.sidebar__support-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; }
.sidebar__support b, .sidebar__support small { display: block; }
.sidebar__support b { color: #30405e; font-size: 10.5px; }
.sidebar__support small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.sidebar__user { display: grid; grid-template-columns: 35px 1fr 30px; gap: 9px; align-items: center; min-height: 62px; padding: 10px 13px; border-top: 1px solid var(--line-soft); }
.avatar { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; background: var(--blue-100); color: var(--brand); font-size: 11px; font-weight: 800; }
.sidebar__user-copy { min-width: 0; }
.sidebar__user-copy b, .sidebar__user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__user-copy b { color: var(--ink); font-size: 11.5px; }
.sidebar__user-copy small { margin-top: 2px; color: var(--muted); font-size: 9.5px; text-transform: capitalize; }
.sidebar__user > button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.sidebar__user > button:hover { background: var(--danger-soft); color: var(--danger); }
.sidebar__user > button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-backdrop { display: none; }
.app-shell { min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; height: var(--topbar-height); align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.topbar__left, .topbar__actions { display: flex; align-items: center; }
.topbar__left { gap: 12px; }
.topbar__actions { gap: 9px; }
.menu-button { display: none !important; }
.store-context__status, .store-context b { display: block; }
.store-context__status { color: var(--success); font-size: 9.5px; font-weight: 650; }
.store-context__status i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--success); }
.store-context b { margin-top: 2px; color: var(--ink); font-size: 12.5px; }
.icon-button { position: relative; display: grid; width: 37px; height: 37px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #56627a; }
.icon-button:hover { border-color: var(--blue-200); background: var(--blue-50); color: var(--brand); }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-dot { position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; border: 1.5px solid #fff; border-radius: 50%; background: var(--danger); }
.quick-action { display: flex; height: 37px; align-items: center; gap: 7px; padding: 0 13px; border: 0; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 720; }
.quick-action:hover { background: var(--blue-700); }
.quick-action svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.topbar__user { display: flex; align-items: center; gap: 8px; margin-left: 5px; padding-left: 13px; border-left: 1px solid var(--line); }
.topbar__user > span:last-child b, .topbar__user > span:last-child small { display: block; }
.topbar__user > span:last-child b { max-width: 130px; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.topbar__user > span:last-child small { margin-top: 2px; color: var(--muted); font-size: 9px; text-transform: capitalize; }
.view { width: 100%; max-width: 1680px; min-height: calc(100vh - var(--topbar-height)); margin: 0 auto; padding: 24px clamp(18px, 2.1vw, 34px) 42px; }

/* Page composition */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.breadcrumb { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: var(--muted); font-size: 10.5px; }
.breadcrumb svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.page-head h1, .page-head h2 { margin: 0; color: #121d35; font-size: 23px; letter-spacing: -.035em; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }
.page-head__actions { display: flex; gap: 8px; align-items: center; }
.select-compact { width: auto; min-width: 122px; height: 36px; margin: 0; padding: 0 34px 0 12px; font-size: 11.5px; }
.dashboard-hero { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 250px; min-height: 144px; overflow: hidden; margin-bottom: 18px; border-radius: var(--radius-lg); background: linear-gradient(115deg, #0e319f 0%, #123fe7 57%, #2476f4 100%); color: #fff; box-shadow: 0 14px 30px rgba(18,63,231,.13); }
.dashboard-hero::before { content: ""; position: absolute; top: -100px; right: 190px; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; }
.dashboard-hero__copy { position: relative; z-index: 2; padding: 25px 28px; }
.dashboard-hero__copy span { color: #c4d4ff; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.dashboard-hero__copy h2 { margin: 7px 0; color: #fff; font-size: 21px; letter-spacing: -.025em; }
.dashboard-hero__copy p { max-width: 660px; margin: 0 0 16px; color: #d9e4ff; font-size: 12px; line-height: 1.55; }
.dashboard-hero__copy .btn { background: #fff; color: var(--brand); }
.dashboard-hero__art { position: relative; overflow: hidden; }
.dashboard-hero__art::before { content: ""; position: absolute; width: 220px; height: 220px; right: 4px; top: -38px; border-radius: 50%; background: rgba(255,255,255,.10); box-shadow: inset 0 0 0 30px rgba(255,255,255,.05); }
.hero-terminal { position: absolute; z-index: 2; top: 26px; right: 48px; width: 118px; height: 92px; padding: 10px; transform: rotate(-5deg); border: 1px solid rgba(255,255,255,.35); border-radius: 14px; background: rgba(255,255,255,.95); box-shadow: 0 18px 28px rgba(0,25,112,.25); }
.hero-terminal__screen { height: 45px; border-radius: 8px; background: #edf3ff; }
.hero-terminal__line { width: 70%; height: 5px; margin-top: 8px; border-radius: 10px; background: #c7d7ff; }
.hero-terminal__buttons { display: flex; gap: 4px; margin-top: 7px; }
.hero-terminal__buttons i { width: 10px; height: 10px; border-radius: 3px; background: var(--brand); }
.kpi-section { margin-bottom: 18px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-toolbar h3 { margin: 0; font-size: 14px; letter-spacing: -.015em; }
.section-toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; }
.toolbar-actions { display: flex; align-items: center; gap: 7px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.kpi-card { --accent: var(--brand); --soft: var(--blue-50); position: relative; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.kpi-card--success { --accent: var(--success); --soft: var(--success-soft); }
.kpi-card--warning { --accent: var(--warn); --soft: var(--warn-soft); }
.kpi-card--danger { --accent: var(--danger); --soft: var(--danger-soft); }
.kpi-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-card__head span:first-child { color: #3e4a62; font-size: 11px; font-weight: 680; }
.kpi-card__icon { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; background: var(--soft); color: var(--accent); }
.kpi-card__icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kpi-card__value { display: block; margin-top: 12px; color: var(--accent); font-size: 22px; font-weight: 730; letter-spacing: -.035em; }
.kpi-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; color: var(--muted); font-size: 9.5px; }
.kpi-card__bar { height: 5px; overflow: hidden; margin-top: 13px; border-radius: 99px; background: var(--line-soft); }
.kpi-card__bar i { display: block; width: var(--progress, 50%); height: 100%; border-radius: inherit; background: var(--accent); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .8fr); gap: 18px; }
.dashboard-stack { display: grid; gap: 18px; align-content: start; }
.surface { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.surface__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 17px 18px 13px; }
.surface__head h3 { margin: 0; font-size: 14px; }
.surface__head p { margin: 5px 0 0; color: var(--muted); font-size: 10.5px; }
.link-button { display: inline-flex; align-items: center; gap: 5px; padding: 5px; border: 0; background: transparent; color: var(--brand); font-size: 10.5px; font-weight: 680; }
.link-button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.activity-list { padding: 0 18px 10px; }
.activity-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 11px; align-items: center; min-height: 55px; border-top: 1px solid var(--line-soft); }
.activity-row__icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: var(--blue-50); color: var(--brand); }
.activity-row__icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.activity-row b, .activity-row small { display: block; }
.activity-row b { overflow: hidden; color: #34405a; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.activity-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.activity-row__value { text-align: right; }
.activity-row__value b { color: var(--success); font-size: 11px; }
.activity-row__value small { color: var(--muted); }
.empty-state { display: grid; min-height: 190px; place-items: center; padding: 30px; color: var(--muted); text-align: center; }
.empty-state__icon { display: grid; width: 48px; height: 48px; place-items: center; margin: 0 auto 11px; border-radius: 15px; background: var(--blue-50); color: var(--brand); }
.empty-state__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.empty-state b { display: block; color: #39455d; font-size: 12px; }
.empty-state p { max-width: 280px; margin: 5px auto 0; font-size: 10px; line-height: 1.5; }
.alert-list { padding: 0 17px 15px; }
.alert-item { display: grid; grid-template-columns: 31px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.alert-item__icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--warn-soft); color: var(--warn); }
.alert-item__icon--danger { background: var(--danger-soft); color: var(--danger); }
.alert-item__icon--success { background: var(--success-soft); color: var(--success); }
.alert-item__icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.alert-item b, .alert-item small { display: block; }
.alert-item b { color: #3d4961; font-size: 10.5px; }
.alert-item small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.alert-item > strong { color: var(--ink); font-size: 11px; }
.quick-links { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; padding: 0 17px 17px; }
.quick-link { display: flex; min-height: 61px; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #3e4a61; text-align: left; }
.quick-link:hover { border-color: var(--blue-200); background: var(--blue-50); color: var(--brand); }
.quick-link svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: var(--brand); stroke-width: 1.7; }
.quick-link b, .quick-link small { display: block; }
.quick-link b { font-size: 10.5px; }
.quick-link small { margin-top: 2px; color: var(--muted); font-size: 8.5px; }

/* Existing modules, restyled */
h2 { margin: 0 0 16px; color: #121d35; font-size: 21px; letter-spacing: -.03em; }
.cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.card { min-width: 170px; flex: 1; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); box-shadow: var(--shadow-sm); }
.card .lbl, .lbl { color: var(--muted); font-size: 10px; font-weight: 720; letter-spacing: .05em; text-transform: uppercase; }
.card .val { margin-top: 6px; color: var(--ink); font-size: 23px; font-weight: 730; letter-spacing: -.03em; }
.panel { margin-bottom: 16px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow-sm); }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9.5px; font-weight: 720; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
td { padding: 10px; border-bottom: 1px solid var(--line-soft); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f9fbff; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
input, select, textarea { width: 100%; margin-bottom: 10px; padding: 9px 11px; border: 1px solid #cfd6e2; border-radius: var(--radius-sm); background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #a2aabc; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(18,63,231,.10); }
input:disabled, select:disabled, button:disabled { cursor: not-allowed; opacity: .55; }
label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
button { border: 0; border-radius: var(--radius-sm); font-weight: 650; }
.btn { padding: 9px 14px; background: var(--brand); color: #fff; }
.btn:hover { background: var(--blue-700); }
.btn-sec { padding: 9px 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.btn-sec:hover { border-color: var(--blue-200); background: var(--blue-50); color: var(--brand); }
.btn-danger { padding: 9px 14px; background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 10.5px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.tag { display: inline-block; padding: 3px 8px; border-radius: 99px; font-size: 9.5px; font-weight: 700; }
.tag.g { background: var(--success-soft); color: var(--success); }
.tag.r { background: var(--danger-soft); color: var(--danger); }
.tag.y { background: var(--warn-soft); color: var(--warn); }
.tag.b { background: var(--blue-50); color: var(--brand); }
.tag.gray { background: #eef1f5; color: #536079; }
.muted { color: var(--muted); font-size: 11px; }
.pdv { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 16px; }
.pdv-total { color: var(--brand); font-size: 34px; font-weight: 780; letter-spacing: -.04em; text-align: right; }
.pdv-search { position: relative; }
.pdv-results { position: absolute; z-index: 30; top: calc(100% - 8px); right: 17px; left: 17px; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow-md); }
.pdv-results div { display: flex; justify-content: space-between; padding: 10px 14px; cursor: pointer; }
.pdv-results div:hover, .pdv-results div.sel { background: var(--blue-50); }
.overlay { position: fixed; z-index: 60; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(10,20,45,.48); backdrop-filter: blur(2px); }
.modal { width: 480px; max-width: 94vw; max-height: 90vh; overflow: auto; padding: 24px; border-radius: var(--radius-lg); background: #fff; box-shadow: 0 24px 70px rgba(10,20,45,.25); }
.modal h3 { margin: 0 0 14px; }
.toast { position: fixed; z-index: 99; right: 22px; bottom: 22px; max-width: 420px; padding: 12px 18px; border-radius: 10px; background: var(--navy); color: #fff; box-shadow: var(--shadow-md); font-size: 12px; }
.toast.err { background: var(--danger); }
.kbd { padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; background: #f3f5f8; color: #45516a; font-size: 9.5px; }
.responsive-table td::before { display: none; }

/* Loja Online — administração */
.online-store-hero { position: relative; display: flex; min-height: 128px; align-items: center; justify-content: space-between; gap: 24px; overflow: hidden; margin-bottom: 18px; padding: 24px 28px; border-radius: var(--radius-lg); background: linear-gradient(115deg, #0e319f, var(--brand)); color: #fff; box-shadow: 0 15px 34px rgba(18,63,231,.15); }
.online-store-hero::after { content: ""; position: absolute; width: 250px; height: 250px; right: -80px; top: -120px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; }
.online-store-hero > div { min-width: 0; }
.online-store-hero span, .online-store-hero strong, .online-store-hero small { display: block; }
.online-store-hero > div > span { color: #c8d7ff; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.online-store-hero strong { overflow: hidden; margin-top: 7px; font-size: clamp(17px, 2vw, 24px); text-overflow: ellipsis; white-space: nowrap; }
.online-store-hero small { margin-top: 7px; color: #dce5ff; font-size: 10.5px; }
.online-store-hero__mark { position: relative; z-index: 2; display: grid !important; width: 58px; height: 58px; flex: 0 0 58px; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 18px; background: rgba(255,255,255,.14); }
.online-store-hero__mark svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.online-admin-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(310px,.75fr); gap: 16px; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: flex; height: 35px; align-items: center; padding: 0 10px; border: 1px solid #cfd6e2; border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: #f5f7fb; color: var(--muted); font-size: 10px; }
.input-prefix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.online-choice-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.online-choice-list label { display: flex; min-height: 38px; align-items: center; gap: 7px; margin: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
.online-choice-list input { width: auto; margin: 0; accent-color: var(--brand); }
.online-product-filter { max-width: 420px; margin: 12px 0; }
.online-product-filter input { margin: 0; }
.online-order-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Responsive */
@media (max-width: 1100px) {
  .login-screen { grid-template-columns: minmax(440px, .9fr) minmax(390px, 1.1fr); }
  .ecosystem { width: 95%; }
  .ecosystem__item { min-width: 135px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-stack { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .online-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .login-screen { display: block; min-height: 100vh; }
  .login-showcase { display: none; }
  .login-panel { min-height: 100vh; padding: 32px 24px; }
  .login-mobile-brand { display: flex; }
  #app.on { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-102%); width: min(286px, 88vw); transition: transform .22s ease; box-shadow: var(--shadow-md); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar__close { display: block; }
  .sidebar-backdrop { position: fixed; z-index: 25; inset: 0; background: rgba(13,25,55,.36); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .menu-button { display: grid !important; }
  .topbar { padding: 0 16px; }
  .topbar__user > span:last-child { display: none; }
  .view { padding: 20px 16px 34px; }
  .pdv { grid-template-columns: 1fr; }
  .page-head__actions, .toolbar-actions { flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .row { flex-direction: column; gap: 0; }
  .flex-between { align-items: flex-start; flex-wrap: wrap; }
  .cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .card { min-width: 0; }
  .responsive-table, .responsive-table tbody, .responsive-table tfoot, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .responsive-table tbody, .responsive-table tfoot { display: grid; gap: 10px; }
  .responsive-table tr { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
  .responsive-table td { display: grid; min-height: 38px; grid-template-columns: minmax(105px, .42fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); text-align: left !important; overflow-wrap: anywhere; }
  .responsive-table td::before { display: block; color: var(--muted); content: attr(data-label); font-size: 8.5px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
  .responsive-table td:last-child { border-bottom: 0; }
  .responsive-table td[colspan] { display: block; padding: 18px; text-align: center !important; }
  .responsive-table td[colspan]::before { display: none; }
  .panel { overflow: visible; }
  .modal .responsive-table { margin-bottom: 12px; }
  .online-store-hero { padding: 22px; }
  .online-store-hero strong { white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 620px) {
  .topbar__actions .quick-action span, .topbar__user { display: none; }
  .quick-action { width: 37px; justify-content: center; padding: 0; }
  .page-head { display: block; }
  .page-head__actions { margin-top: 13px; }
  .dashboard-hero { display: block; }
  .dashboard-hero__copy { padding: 23px; }
  .dashboard-hero__art { display: none; }
  .kpi-grid { grid-template-columns: 1fr; }
  .dashboard-stack { grid-template-columns: 1fr; }
  .section-toolbar { align-items: flex-start; flex-direction: column; }
  .demo-access { grid-template-columns: 35px 1fr; }
  .demo-access button { grid-column: 2; justify-self: start; padding-left: 0; }
  .view { padding: 16px 12px 28px; }
  .topbar { padding: 0 12px; }
  .store-context b { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-head h1, .page-head h2, h2 { font-size: 20px; }
  .page-head__actions { align-items: stretch; }
  .page-head__actions > * { flex: 1 1 auto; }
  .cards { grid-template-columns: 1fr; gap: 9px; }
  .panel { margin-bottom: 12px; padding: 13px; border-radius: 12px; }
  .modal { width: 100%; max-width: none; max-height: 94dvh; padding: 18px; border-radius: 18px 18px 0 0; }
  .overlay { align-items: flex-end; padding: 0; }
  input, select, textarea { min-height: 44px; font-size: 16px; }
  button, .btn, .btn-sec, .btn-danger { min-height: 42px; }
  .btn-sm { min-height: 38px; padding: 8px 11px; }
  .toast { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
  .activity-row { grid-template-columns: 32px minmax(0,1fr); padding: 9px 0; }
  .activity-row__value { grid-column: 2; text-align: left; }
  .alert-item { grid-template-columns: 30px minmax(0,1fr); }
  .alert-item > strong { grid-column: 2; }
  .quick-links { grid-template-columns: 1fr; }
  .pdv-total { font-size: 29px; }
  .pdv-results { right: 10px; left: 10px; }
  .online-store-hero { min-height: 118px; padding: 18px; }
  .online-store-hero__mark { width: 46px; height: 46px; flex-basis: 46px; }
  .online-choice-list { display: grid; grid-template-columns: 1fr; }
  .online-choice-list label { min-height: 44px; }
  .input-prefix span { height: 44px; }
  .online-order-actions { display: grid; grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ============================================================
   Refinamento de UI — 2026-07-24 (claude)
   Componentes aditivos: cabeçalho de página, toolbars de dados,
   tabelas com hierarquia, PDV de operação e skeletons.
   ============================================================ */

/* Faixa de indicadores compactos (contexto da tela) */
.stat-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.stat-chip {
  display: flex; align-items: center; gap: 11px; min-width: 168px; flex: 1 1 168px;
  padding: 12px 15px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: #fff; box-shadow: var(--shadow-sm);
}
.stat-chip__icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: var(--blue-50); color: var(--brand); }
.stat-chip__icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.stat-chip__icon--success { background: var(--success-soft); color: var(--success); }
.stat-chip__icon--warn { background: var(--warn-soft); color: var(--warn); }
.stat-chip__icon--danger { background: var(--danger-soft); color: var(--danger); }
.stat-chip__body { min-width: 0; }
.stat-chip__label { display: block; color: var(--muted); font-size: 10px; font-weight: 720; letter-spacing: .05em; text-transform: uppercase; }
.stat-chip__value { display: block; margin-top: 3px; color: var(--ink); font-size: 18px; font-weight: 740; letter-spacing: -.025em; }
.stat-chip__value--danger { color: var(--danger); }
.stat-chip__value--success { color: var(--success); }

/* Barra de busca e filtros das listagens */
.data-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.data-toolbar__spacer { flex: 1 1 auto; }
.search-field { position: relative; flex: 1 1 260px; max-width: 380px; }
.search-field svg { position: absolute; top: 50%; left: 12px; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--muted-2); stroke-width: 1.8; stroke-linecap: round; }
.search-field input { height: 40px; margin: 0; padding-left: 37px; }
.filter-select { height: 40px; width: auto; min-width: 140px; margin: 0; padding: 0 12px; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #f7f9fc; }
.segmented button { padding: 6px 13px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; }
.segmented button.is-active { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }

/* Tabela de dados com hierarquia visual */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fbfcfe;
  color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap;
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover td { background: #fafbfe; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .cell-main { display: block; color: var(--ink); font-weight: 640; }
.tbl .cell-sub { display: block; margin-top: 2px; color: var(--muted-2); font-size: 11px; }
.tbl .cell-strong { font-size: 14px; font-weight: 740; letter-spacing: -.02em; }
.tbl__actions { display: flex; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.tbl tfoot td { padding: 12px 16px; border-top: 1px solid var(--line); background: #fbfcfe; font-weight: 720; }

/* Miniatura/monograma nas listagens */
.thumb { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 9px; background: var(--blue-50); color: var(--brand); font-size: 12px; font-weight: 750; }
.thumb--weight { background: var(--warn-soft); color: var(--warn); }
.thumb--muted { background: #f1f4f9; color: var(--muted); }
.cell-lead { display: flex; align-items: center; gap: 11px; min-width: 0; }

/* Ações em ícone */
.icon-action { display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); transition: all .14s; }
.icon-action:hover { border-color: var(--blue-200); background: var(--blue-50); color: var(--brand); }
.icon-action svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-action--danger:hover { border-color: #f7c3cb; background: var(--danger-soft); color: var(--danger); }

/* Skeleton de carregamento */
.skeleton { border-radius: 8px; background: linear-gradient(90deg, #eef1f6 25%, #f6f8fb 50%, #eef1f6 75%); background-size: 400% 100%; animation: skeleton-pulse 1.3s ease-in-out infinite; }
@keyframes skeleton-pulse { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skeleton-rows { padding: 18px; display: grid; gap: 12px; }
.skeleton-rows i { display: block; height: 15px; }
.skeleton-rows i:nth-child(1) { width: 42%; }
.skeleton-rows i:nth-child(2) { width: 78%; }
.skeleton-rows i:nth-child(3) { width: 62%; }
.skeleton-rows i:nth-child(4) { width: 85%; }
.skeleton-rows i:nth-child(5) { width: 54%; }

/* ---------------- PDV / Frente de caixa ---------------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 18px; align-items: start; }
.pos-scan { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.pos-scan__label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.pos-scan__field { position: relative; }
.pos-scan__field > svg { position: absolute; top: 50%; left: 15px; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pos-scan__field input { height: 56px; margin: 0; padding-left: 48px; border-radius: 11px; font-size: 16px; font-weight: 600; }
.pos-scan__field input::placeholder { font-weight: 400; }
.pos-cart { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.pos-cart__head { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--line-soft); }
.pos-cart__head b { font-size: 13px; }
.pos-cart__head span { color: var(--muted); font-size: 11.5px; }
.pos-items { max-height: min(52vh, 520px); overflow-y: auto; }
.pos-item { display: grid; grid-template-columns: 34px minmax(0,1fr) auto auto auto; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line-soft); animation: pos-item-in .18s ease-out; }
.pos-item:last-child { border-bottom: 0; }
@keyframes pos-item-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.pos-item__index { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 7px; background: #f2f5fa; color: var(--muted); font-size: 11px; font-weight: 700; }
.pos-item__name { display: block; overflow: hidden; color: var(--ink); font-size: 13.5px; font-weight: 640; text-overflow: ellipsis; white-space: nowrap; }
.pos-item__meta { display: block; margin-top: 2px; color: var(--muted-2); font-size: 11px; }
.pos-item__total { min-width: 88px; font-size: 14.5px; font-weight: 730; letter-spacing: -.02em; text-align: right; font-variant-numeric: tabular-nums; }
.qty-stepper { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.qty-stepper button { display: grid; width: 26px; height: 26px; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 700; line-height: 1; }
.qty-stepper button:hover { background: var(--blue-50); color: var(--brand); }
.qty-stepper span { min-width: 44px; font-size: 12.5px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.pos-side { position: sticky; top: calc(var(--topbar-height) + 16px); display: grid; gap: 12px; }
.pos-total {
  padding: 20px; border-radius: var(--radius-lg); color: #fff;
  background: linear-gradient(145deg, var(--blue-600), #0a2ea8); box-shadow: 0 16px 38px rgba(18, 63, 231, .26);
}
.pos-total__label { color: #b9ccff; font-size: 10.5px; font-weight: 730; letter-spacing: .08em; text-transform: uppercase; }
.pos-total__value { margin-top: 5px; font-size: clamp(34px, 3.4vw, 44px); font-weight: 780; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.pos-total__meta { display: flex; justify-content: space-between; margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.20); color: #cfdcff; font-size: 11.5px; }
.pos-total__meta b { color: #fff; font-weight: 700; }
.pos-panel { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.pos-panel label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11.5px; font-weight: 620; }
.pos-panel select, .pos-panel input { margin: 0; }
.pos-panel .pos-field + .pos-field { margin-top: 12px; }
.btn-pay { display: flex; width: 100%; height: 56px; align-items: center; justify-content: center; gap: 10px; border-radius: 12px; font-size: 16px; font-weight: 750; }
.btn-pay:disabled { background: #c8d2e4; box-shadow: none; cursor: not-allowed; }
.btn-pay kbd { padding: 2px 7px; border-radius: 5px; background: rgba(255,255,255,.22); font-family: inherit; font-size: 11px; font-weight: 700; }
.pos-hints { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 11px 15px; border: 1px dashed var(--line); border-radius: var(--radius-md); color: var(--muted); font-size: 11px; }
.pos-hints span { display: inline-flex; align-items: center; gap: 5px; }
.pos-hints kbd { padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; background: #f7f9fc; color: #45536f; font-family: inherit; font-size: 10px; font-weight: 700; }
.pos-empty { display: grid; min-height: 210px; place-items: center; padding: 26px; text-align: center; }
.pos-empty__icon { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 12px; border-radius: 17px; background: var(--blue-50); color: var(--brand); }
.pos-empty__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pos-empty b { display: block; color: #39455d; font-size: 13px; }
.pos-empty p { max-width: 300px; margin: 6px auto 0; color: var(--muted); font-size: 11.5px; line-height: 1.55; }

/* Aviso contextual (caixa fechado, atrasos, etc.) */
.notice { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; padding: 14px 17px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-sm); }
.notice--warn { border-left-color: var(--warn); background: linear-gradient(90deg, var(--warn-soft), #fff 55%); }
.notice--danger { border-left-color: var(--danger); background: linear-gradient(90deg, var(--danger-soft), #fff 55%); }
.notice__icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: var(--warn-soft); color: var(--warn); }
.notice__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notice--danger .notice__icon { background: var(--danger-soft); color: var(--danger); }
.notice__body { flex: 1; min-width: 0; }
.notice__body b { display: block; font-size: 13px; }
.notice__body span { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }

@media (max-width: 1180px) {
  .pos { grid-template-columns: minmax(0, 1fr); }
  .pos-side { position: static; }
  .pos-items { max-height: none; }
}

@media (max-width: 720px) {
  .stat-strip { gap: 8px; }
  .stat-chip { min-width: calc(50% - 4px); flex-basis: calc(50% - 4px); padding: 11px 12px; }
  .stat-chip__value { font-size: 15.5px; }
  .data-toolbar { padding: 12px; }
  .search-field { max-width: none; flex-basis: 100%; }
  .filter-select { flex: 1 1 auto; }
  .tbl th, .tbl td { padding: 10px 12px; }
  .pos-scan__field input { height: 52px; }
  .pos-item { grid-template-columns: 26px minmax(0,1fr) auto; gap: 9px; padding: 10px 12px; }
  .pos-item__total { grid-column: 2 / -1; min-width: 0; text-align: left; }
  .pos-total__value { font-size: 32px; }
  .pos-hints { display: none; }
  .notice { padding: 12px; }
}

/* ------------------------------------------------------------------
   Painel no celular/tablet (2026-08-19)
   No PDV estreito o total e o botão de pagamento caíam abaixo da dobra:
   com a lista de itens crescendo, o operador tinha que rolar a tela a
   cada venda para cobrar. Aqui o botão vira barra fixa no rodapé e
   carrega o valor, então a ação principal fica sempre à mão.
   ------------------------------------------------------------------ */
@media (max-width: 1180px) {
  .view { padding-bottom: 96px; }

  #pos-pay {
    position: fixed; z-index: 40;
    right: 14px; bottom: 14px; left: 14px;
    width: auto; height: 58px;
    box-shadow: 0 12px 32px rgba(18, 63, 231, .34);
  }
  #pos-pay:disabled { box-shadow: 0 6px 18px rgba(16, 32, 69, .16); }

  /* o card de total continua no fluxo, mas compacto */
  .pos-total { padding: 16px 18px; }
  .pos-total__value { font-size: 30px; }
}

@media (pointer: coarse), (max-width: 760px) {
  /* navegação lateral: 39px -> 44px por item */
  .sidebar__nav a { min-height: 44px; padding: 10px 12px; font-size: 13.5px; }
  .sidebar__primary { height: 46px; }

  /* botões pequenos do cabeçalho das telas */
  .page-head__actions .btn-sm,
  .page-head__actions .btn-sec,
  .data-toolbar .btn-sm { min-height: 42px; }

  /* ações em ícone das tabelas */
  .icon-action { width: 40px; height: 40px; }

  /* stepper de quantidade do PDV */
  .qty-stepper button { width: 36px; height: 36px; font-size: 18px; }
  .qty-stepper span { min-width: 52px; font-size: 14px; }
}

/* ------------------------------------------------------------------
   Ajustes finos do PDV em tela estreita (2026-08-19, 2ª passada)
   - o valor grande do card de total ficava escondido atrás da barra
     fixa e era redundante (a barra já mostra "Cobrar R$ X")
   - cada item da venda quebrava em 3 linhas, ocupando altura demais
   ------------------------------------------------------------------ */
@media (max-width: 1180px) {
  /* card de total vira resumo compacto: a barra fixa carrega o valor */
  .pos-total { padding: 13px 16px; }
  .pos-total__label { font-size: 9.5px; }
  .pos-total__value { font-size: 22px; }
  .pos-total__meta { margin-top: 9px; padding-top: 9px; font-size: 11px; }
}

@media (max-width: 760px) {
  /* item da venda em 2 linhas: nome em cima, controles embaixo */
  .pos-item {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    grid-template-areas:
      "idx nome nome"
      "qtd qtd total";
    gap: 6px 10px; padding: 12px;
  }
  .pos-item__index { grid-area: idx; }
  .pos-item > span:nth-child(2) { grid-area: nome; }
  .pos-item .qty-stepper,
  .pos-item > span.pos-item__meta { grid-area: qtd; justify-self: start; }
  .pos-item__total { grid-area: total; align-self: center; min-width: 0; text-align: right; font-size: 15px; }
  .pos-item .icon-action { position: absolute; top: 10px; right: 10px; }
  .pos-item { position: relative; padding-right: 52px; }
  .pos-item__name { padding-right: 4px; }
}

/* O valor já aparece na barra fixa ("Cobrar R$ X"), então o card grande de
   total vira redundante em tela estreita — e ficava encoberto pela barra. */
@media (max-width: 1180px) {
  .pos-total { display: none; }
  .pos-side { gap: 10px; }
}
/* Barra de filtros (período, busca) — precisa quebrar linha em tela estreita,
   senão a soma dos controles empurra a página inteira para o lado. */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-bar > * { flex: 0 1 auto; min-width: 0; }
@media (max-width: 760px) {
  .filter-bar { width: 100%; }
  .filter-bar input[type="date"] { flex: 1 1 46%; min-height: 42px; }
  .filter-bar button { flex: 1 1 46%; min-height: 42px; }
  .flex-between { flex-wrap: wrap; gap: 10px; }
  .panel { overflow-x: auto; }
}
/* Últimos alvos pequenos no toque: qualquer .btn-sm dentro do conteúdo
   (hero do início, ações das tabelas) sobe para 42px. */
@media (pointer: coarse), (max-width: 760px) {
  .view .btn-sm,
  .view .btn.btn-sm,
  .view .btn-sec.btn-sm,
  .view .btn-danger.btn-sm { min-height: 42px; padding: 9px 14px; }
}