/* ===================================================================================================================
   Brand layer: the real logo, one icon set, a proper sign-in page, softer cards and buttons.
   Loaded after admin.css by the admin panel, the client web app and both sign-in pages.
   Colours stay in the green family of the logo and the Android app. No inline styles anywhere (the CSP forbids them).
   =================================================================================================================== */
:root { --brand-2: #1c8f4e; --lime: #8ee03a; --radius-lg: 20px; --ring: 0 0 0 3px rgba(15, 106, 56, .18); }
@media (prefers-color-scheme: dark) { :root { --brand-2: #2fae66; --ring: 0 0 0 3px rgba(57, 193, 114, .28); } }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.g { stroke: none; }

/* ---- shell: logo in the top bar, avatar chip, softer edges --------------------------------------------------- */
.top { height: 56px; box-shadow: 0 1px 0 var(--line); }
.top .brand { gap: 10px; font-size: 16px; letter-spacing: -.01em; }
.top .brand img { width: 32px; height: 32px; border-radius: 9px; display: block; }
.top .who { display: none; align-items: center; gap: 8px; color: var(--sub); font-size: 13px; }
.top .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.top .btn .lbl { display: none; }
.top .btn { min-width: 36px; padding: 0 10px; }
@media (min-width: 640px) { .top .who { display: flex; } .top .btn .lbl { display: inline; } }
@media (min-width: 900px) { .side { top: 56px; } }

.side a { transition: background .12s, color .12s; }
.side a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); border-radius: 4px 10px 10px 4px; }
.bottom a { position: relative; }
.bottom a[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.bottom a[aria-current="page"] .ico { stroke-width: 2.2; }

/* ---- page header, cards ------------------------------------------------------------------------------------- */
.page > header h1 { font-size: 24px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.page > header h1 .ico { width: 26px; height: 26px; color: var(--brand); }
@media (min-width: 900px) { .page > header h1 { font-size: 28px; } }
.card { border-radius: var(--radius-lg); padding: 16px 18px; }
.grid > .card, .grid > .kpi, .grid > section { margin-top: 0; }   /* side-by-side cards start level; only stacked ones get a gap */
.card h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; letter-spacing: -.01em; }
.card h2 .ico { color: var(--brand); }
a.kpi, a.item, .rowlink { transition: border-color .12s, box-shadow .12s, transform .12s; }
a.kpi:hover, a.item:hover { box-shadow: 0 6px 20px rgba(15, 106, 56, .12); transform: translateY(-1px); }
.ico-chip { width: 36px; height: 36px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 8px; }
.ico-chip.warn { background: var(--warn-soft); color: var(--warn); } .ico-chip.bad { background: var(--bad-soft); color: var(--bad); } .ico-chip.info { background: var(--info-soft); color: var(--info); }

/* ---- buttons and fields ------------------------------------------------------------------------------------- */
.btn { border-radius: 12px; transition: border-color .12s, box-shadow .12s, transform .06s, background .12s; }
.btn:hover { box-shadow: 0 2px 10px rgba(15, 106, 56, .12); }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 18px; height: 18px; }
.btn.primary { background: linear-gradient(180deg, var(--brand-2), var(--brand)); border-color: var(--brand); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset; }
.btn.primary:hover { box-shadow: 0 4px 14px rgba(15, 106, 56, .35); }
.btn.google { background: #fff; color: #1f1f1f; border-color: #dadce0; min-height: 52px; font-size: 16px; gap: 12px; }
.btn.google:hover { background: #f8faff; border-color: #c4d7fb; box-shadow: 0 2px 10px rgba(66, 133, 244, .22); }
.btn.google .ico { width: 22px; height: 22px; }
.btn.busy { opacity: .7; pointer-events: none; }
input[type=text]:focus, input[type=search]:focus, input[type=number]:focus, input[type=email]:focus, input[type=date]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--ring); }

/* ---- alerts and empty states carry an icon ------------------------------------------------------------------ */
.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; }
.alert .ico { margin-top: 1px; width: 18px; height: 18px; }
.empty { padding: 36px 12px; }
.empty .ico { display: block; width: 44px; height: 44px; margin: 0 auto 10px; opacity: .45; }

/* ---- sign-in ------------------------------------------------------------------------------------------------ */
.auth-page { background: var(--bg); }
.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth-art { color: #fff; padding: 26px 22px 70px; border-radius: 0 0 30px 30px;
  background: radial-gradient(700px 320px at 90% -10%, rgba(142, 224, 58, .30), transparent 62%),
              radial-gradient(500px 300px at -10% 110%, rgba(142, 224, 58, .16), transparent 60%),
              linear-gradient(150deg, #0f6a38 0%, #0a4a28 100%); }
.auth-art-inner { max-width: 520px; margin: 0 auto; }
.auth-plate { display: inline-block; background: #fff; border-radius: 16px; padding: 8px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.auth-plate img { display: block; width: 190px; height: auto; }
.auth-art h2 { font-size: 26px; line-height: 1.15; margin: 20px 0 8px; letter-spacing: -.02em; color: #fff; }
.auth-art .lede { margin: 0; color: rgba(255, 255, 255, .86); font-size: 15px; }
.auth-points { display: none; }
.auth-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0 16px 22px; margin-top: -40px; }
.auth-card { width: 100%; max-width: 430px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px 24px 24px;
  box-shadow: 0 16px 44px rgba(8, 48, 26, .22); }
.auth-card h1 { text-align: center; font-size: 22px; letter-spacing: -.02em; }
.auth-card .sub { text-align: center; margin: 6px 0 20px; font-size: 14px; }
.auth-new { margin-top: 20px; padding: 12px 14px; border-radius: 12px; background: var(--soft); font-size: 13px; color: var(--sub); display: flex; flex-direction: column; gap: 2px; }
.auth-new strong { color: var(--ink); }
.auth-foot { margin: auto 0 0; padding-top: 22px; font-size: 12px; color: var(--sub); }
@media (min-width: 900px) {
  .auth { flex-direction: row; }
  .auth-art { flex: 1 1 54%; border-radius: 0; display: flex; align-items: center; justify-content: center; padding: 56px; }
  .auth-plate img { width: 240px; }
  .auth-art h2 { font-size: 38px; margin-top: 34px; }
  .auth-art .lede { font-size: 17px; max-width: 440px; }
  .auth-points { display: grid; gap: 18px; list-style: none; margin: 40px 0 0; padding: 0; }
  .auth-points li { display: flex; gap: 14px; align-items: flex-start; }
  .auth-points .ico { width: 40px; height: 40px; padding: 10px; border-radius: 13px; background: rgba(255, 255, 255, .14); }
  .auth-points span { display: flex; flex-direction: column; font-size: 14px; color: rgba(255, 255, 255, .8); }
  .auth-points strong { color: #fff; font-size: 15px; }
  .auth-main { flex: 1 1 46%; justify-content: center; margin-top: 0; padding: 32px; }
  .auth-card { box-shadow: var(--shadow); padding: 36px 32px 30px; }
  .auth-foot { margin-top: 26px; padding-top: 0; }
}

/* ---- client home: quick actions as tiles, a hero with the cylinder mark ------------------------------------- */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: var(--gap); }
.quick a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 8px; min-height: 84px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); font-weight: 600; font-size: 13px; transition: border-color .12s, box-shadow .12s, transform .12s; }
.quick a:hover { text-decoration: none; border-color: var(--brand); box-shadow: 0 6px 18px rgba(15, 106, 56, .14); transform: translateY(-1px); }
.quick a .ico { width: 26px; height: 26px; color: var(--brand); }
.quick a.primary { background: linear-gradient(160deg, var(--brand-2), var(--brand)); border-color: var(--brand); color: var(--brand-ink); }
.quick a.primary .ico { color: var(--brand-ink); }
@media (min-width: 700px) { .quick a { flex-direction: row; font-size: 15px; min-height: 64px; gap: 10px; } }
.hero { position: relative; overflow: hidden; padding: 18px 20px; margin-bottom: var(--gap);
  background: linear-gradient(135deg, #0f6a38, #0a4a28); color: #fff; }   /* fixed dark green in both themes: white text always reads */
.hero::after { content: ""; position: absolute; right: -14px; bottom: -22px; width: 150px; height: 150px; opacity: .16;
  background: url("/brand/mark-256.webp") no-repeat center / contain; pointer-events: none; }
/* ---- lists with an avatar, and the More menu ---------------------------------------------------------------- */
.item.with-avatar { display: flex; align-items: center; gap: 12px; }
.item .body { flex: 1; min-width: 0; display: block; }
.item .ico-chip { margin: 0; flex: none; }
.avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.menu { padding: 6px 8px; }
.menu .rowlink { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-radius: 12px; border-top: 0; }
.menu .rowlink + .rowlink { border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.menu .rowlink:hover { background: var(--soft); }
.menu .ico-chip { margin: 0; flex: none; }
.menu .grow { flex: 1; min-width: 0; }
.menu .chev { color: var(--sub); width: 18px; height: 18px; }
.hero > * { position: relative; z-index: 1; }
.hero .more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; background: rgba(255, 255, 255, .16); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.hero .more-link .ico { width: 16px; height: 16px; }
.hero:hover { text-decoration: none; }
.hero:hover .more-link { background: rgba(255, 255, 255, .26); }
.hero .value small { font-size: 14px; font-weight: 600; opacity: .85; letter-spacing: 0; }
.hero.sale-summary .value, .hero.stock-hero .value { font-size: 32px; }

/* ---- Sales, Stock and Reports --------------------------------------------------------------------------------- */
.grid.strip { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: var(--gap); }
.grid.strip .kpi .value { font-size: 22px; overflow-wrap: anywhere; }
.kind { display: inline-flex; align-items: center; gap: 6px; }
.kind .ico { width: 16px; height: 16px; color: var(--brand); }
progress.bar { grid-column: 1 / -1; width: 100%; height: 8px; margin-top: 2px; border: 0; border-radius: 99px; overflow: hidden; background: var(--line); accent-color: var(--brand); }
progress.bar::-webkit-progress-bar { background: var(--line); border-radius: 99px; }
progress.bar::-webkit-progress-value { background: var(--brand); border-radius: 99px; }
progress.bar::-moz-progress-bar { background: var(--brand); border-radius: 99px; }
progress.bar.low::-webkit-progress-value { background: var(--bad); }
progress.bar.low::-moz-progress-bar { background: var(--bad); }
.stock-type { row-gap: 8px; }
.hub-card { display: flex; align-items: center; gap: 14px; color: var(--ink); transition: border-color .12s, box-shadow .12s, transform .12s; }
.hub-card:hover { text-decoration: none; border-color: var(--brand); box-shadow: 0 6px 20px rgba(15, 106, 56, .12); transform: translateY(-1px); }
.hub-card .ico-chip { margin: 0; flex: none; width: 44px; height: 44px; }
.hub-card .ico-chip .ico { width: 22px; height: 22px; }
.hub-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hub-value { font-weight: 700; white-space: nowrap; color: var(--ink); }
.hub-value .ico { color: var(--sub); }

/* print / save as PDF: just the report */
@media print {
  .top, .side, .bottom, .actions, .filters, .tabs, .quick, .skip, .pager, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .page { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .card, .item, .hero { box-shadow: none !important; border: 1px solid #bbb !important; break-inside: avoid; }
  .hero { background: #fff !important; color: #000 !important; }
  .hero .label, .hero .sub, .hero .more-link { color: #000 !important; }
  .hero::after { display: none; }
  a { color: #000; text-decoration: none; }
}

/* ---- web onboarding ------------------------------------------------------------------------------------------ */
.onb { max-width: 560px; margin: 0 auto; padding: 18px 16px 40px; }
.onb-top { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.onb-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 16px; padding: 0; }
.onb-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--sub); text-align: center; }
.onb-steps .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--sub); font-weight: 600; }
.onb-steps .dot svg { width: 16px; height: 16px; }
.onb-steps .now { color: var(--ink); font-weight: 600; }
.onb-steps .now .dot, .onb-steps .done .dot { background: var(--brand); color: #fff; }
.onb-card { padding: 20px; }
.onb-card h1 { margin: 0 0 4px; font-size: 21px; }
.onb-card .sub { margin: 0 0 12px; }
.onb-packs { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.onb-packs legend { font-size: 13px; color: var(--sub); padding: 0 0 6px; }
.onb-pack { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; margin: 0; }
.onb-pack input { width: auto; margin: 0; }
.onb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.onb-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 18px; }
.onb-actions .btn.primary { flex: 1; }
.onb-stock { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.onb-stock th, .onb-stock td { padding: 6px 4px; text-align: left; }
.onb-stock thead th { font-size: 12px; color: var(--sub); font-weight: 600; }
.onb-stock td input { width: 100%; }
.onb-foot { text-align: center; font-size: 12px; color: var(--sub); margin-top: 14px; }

.plans { max-width: 460px; }
.plan-list { list-style: none; margin: 14px 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.plan-list li { display: flex; justify-content: space-between; padding: 11px 14px; }
.plan-list li + li { border-top: 1px solid var(--line); }
.plan-list small { color: var(--sub); font-weight: 400; }
.bank-card { border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.plans .bank-card, .plans .alert, .plans .kv { text-align: left; }

.welcome-card h2 { margin: 0 0 2px; }
.welcome-steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.welcome-steps li { display: flex; gap: 10px; align-items: flex-start; }
.welcome-steps li svg { flex: none; width: 20px; height: 20px; color: var(--brand); margin-top: 2px; }
.welcome-steps li.done { opacity: .55; }

.pre-wrap { white-space: pre-wrap; }

#send-bar { width: 100%; height: 14px; accent-color: var(--brand); }

/* ---- e-mail overview widgets ---------------------------------------------------------------------------------- */
.w-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-bottom: 14px; }
.widget h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.widget h2 svg { width: 20px; height: 20px; color: var(--brand); }
.mail-hero { margin-bottom: 14px; }
.chart { width: 100%; height: auto; display: block; }
.chart .bar-a { fill: var(--brand); }
.chart .bar-b { fill: var(--info); }
.chart text { fill: var(--sub); font-size: 10px; }
.chart .ch-num { fill: var(--ink); font-weight: 600; font-size: 10px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--sub); margin: 6px 0 0; padding: 0; list-style: none; }
.legend.col { flex-direction: column; gap: 8px; margin: 0; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend strong { margin-left: auto; padding-left: 14px; color: var(--ink); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.dot-a, .dot-seg-ok { background: var(--brand); } .dot-b { background: var(--info); }
.dot-seg-warn { background: var(--warn); } .dot-seg-bad { background: var(--bad); } .dot-seg-bad2 { background: #8b5cf6; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut { width: 150px; height: 150px; flex: none; }
.donut circle { fill: none; stroke-width: 4; }
.donut .seg-track { stroke: var(--soft); }
.donut .seg-ok { stroke: var(--brand); } .donut .seg-warn { stroke: var(--warn); } .donut .seg-bad { stroke: var(--bad); } .donut .seg-bad2 { stroke: #8b5cf6; }
.donut .donut-n { font-size: 7px; font-weight: 700; fill: var(--ink); }
.donut .donut-l { font-size: 2.6px; fill: var(--sub); }
.donut-wrap .legend { flex: 1; min-width: 150px; }
.funnel-row { display: grid; grid-template-columns: 64px 1fr 36px; align-items: center; gap: 10px; margin: 8px 0; }
.funnel-row progress, .kpi progress, #send-progress progress, #auto-run progress { width: 100%; height: 10px; accent-color: var(--brand); }
.kpi progress { margin-top: 8px; }

.mail-hero .sub, .mail-hero .label { color: #ffffff; opacity: .92; }
.mail-hero .more-link { color: #ffffff; }
@media (min-width: 900px) { .widget.wide { grid-column: span 2; } }
.widget.wide .chart text { font-size: 9px; }

.table-wrap table.table { width: 100%; border-collapse: collapse; }
.table-wrap .table th, .table-wrap .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table-wrap .table th { font-size: 12px; color: var(--sub); font-weight: 600; }
