/* =========================================================
   TiCi Procurement v2 — responsive, mobile-first UI
   Brand colours come from Admin > Settings (CSS variables)
   ========================================================= */
:root {
  --brand: #0f5c4d; --brand-rgb: 15,92,77; --brand-dark: #08332a; --brand-darker: #062720;
  --brand-light: #e3efec; --brand-mid: #4b8579; --accent: #a3e635; --accent-rgb: 163,230,53;
  --bg: #f2f6f5; --surface: #ffffff; --surface-2: #f8faf9; --ink: #0f1f1b; --ink-2: #334155;
  --muted: #64748b; --line: #e3e9e7; --line-2: #eef2f1;
  --blue: #2563eb; --violet: #7c3aed; --amber: #d97706; --red: #dc2626; --green: #16a34a; --cyan: #0891b2; --rose: #e11d48;
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 24px;
  --sh-1: 0 1px 2px rgba(15,31,27,.05), 0 1px 3px rgba(15,31,27,.06);
  --sh-2: 0 4px 16px rgba(15,31,27,.07), 0 1px 3px rgba(15,31,27,.05);
  --sh-3: 0 20px 50px rgba(15,31,27,.18);
  --sidebar-w: 264px; --topbar-h: 66px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
.ic { flex-shrink: 0; vertical-align: middle; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }
.only-mobile { display: none !important; }
@media (max-width: 960px) { .only-mobile { display: inline-flex !important; } .only-desktop { display: none !important; } }

/* ---------------- Sidebar ---------------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 60;
  background: linear-gradient(180deg, var(--brand-darker) 0%, var(--brand-dark) 55%, var(--brand) 140%);
  color: #e6f1ee; display: flex; flex-direction: column;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.sb-brand { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 14px 18px; }
.sb-logo { display: flex; align-items: center; gap: 12px; color: #fff; min-width: 0; }
.sb-logo:hover { text-decoration: none; }
.sb-logo img { max-height: 40px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }
.sb-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--brand-darker); box-shadow: 0 6px 18px rgba(var(--accent-rgb), .35); }
.sb-name { display: flex; flex-direction: column; min-width: 0; }
.sb-name b { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-name small { font-size: 11.5px; color: rgba(255,255,255,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .sb-close { display: none; color: #fff; }
.sb-nav { flex: 1; overflow-y: auto; padding: 6px 12px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sb-section { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.42); padding: 18px 10px 6px; }
.sb-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 2px 0; border-radius: 10px; color: rgba(255,255,255,.78); font-weight: 500; position: relative; transition: background .15s, color .15s; }
.sb-link:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sb-link.active { background: rgba(var(--accent-rgb), .14); color: #fff; font-weight: 600; }
.sb-link.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.sb-link.active .ic { color: var(--accent); }
.sb-link.sub { padding-left: 22px; font-size: 13.5px; }
.sb-link.sub .ic { width: 16px; height: 16px; }
.sb-count { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: var(--accent); color: var(--brand-darker); border-radius: 999px; padding: 1px 8px; }
.sb-user { display: flex; align-items: center; gap: 10px; margin: 0 12px 14px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.07); }
.sb-user .icon-btn { color: rgba(255,255,255,.75); margin-left: auto; }
.sb-user-info { min-width: 0; display: flex; flex-direction: column; }
.sb-user-info b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-info small { font-size: 11.5px; color: rgba(255,255,255,.55); }
.avatar { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; font-size: 13px; background: linear-gradient(135deg, var(--accent), #34d399); color: var(--brand-darker); }
.avatar.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
.avatar.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }
.scrim { position: fixed; inset: 0; background: rgba(6,20,17,.5); backdrop-filter: blur(2px); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }

/* ---------------- Main / Topbar ---------------- */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar-h); display: flex; align-items: center; gap: 16px; padding: 0 28px; background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.tb-title { min-width: 0; }
.tb-title h1 { font-size: 19px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title p { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-search { margin-left: auto; position: relative; display: flex; align-items: center; width: min(360px, 34vw); }
.tb-search .ic { position: absolute; left: 12px; color: var(--muted); }
.tb-search input { width: 100%; height: 40px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 0 14px 0 38px; font: inherit; color: var(--ink); outline: none; transition: border .15s, box-shadow .15s, background .15s; }
.tb-search input:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }
.tb-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border: 0; background: transparent; border-radius: 11px; display: inline-grid; place-items: center; color: var(--ink-2); cursor: pointer; position: relative; transition: background .15s; }
.icon-btn:hover { background: rgba(var(--brand-rgb), .08); text-decoration: none; }
.bell .dot { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rose); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.avatar-btn { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 4px 8px 4px 4px; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 600; color: var(--ink); }
.avatar-btn:hover { background: rgba(var(--brand-rgb), .07); }

/* Dropdowns */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-3); padding: 6px; display: none; z-index: 70; }
.dropdown.open .dropdown-menu { display: block; animation: pop .16s ease-out; }
.dropdown-menu > a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--ink-2); font-weight: 500; }
.dropdown-menu > a:hover { background: var(--surface-2); text-decoration: none; }
.dropdown-menu > a.danger { color: var(--red); }
.dm-user { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; display: flex; flex-direction: column; }
.dm-user small { color: var(--muted); }
.notif-menu { width: 360px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.dm-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.dm-empty { padding: 30px 16px; text-align: center; color: var(--muted); }
.dm-foot { display: block !important; text-align: center; padding: 12px !important; border-top: 1px solid var(--line-2); font-weight: 600 !important; color: var(--brand) !important; border-radius: 0 !important; }
.notif { display: flex !important; flex-direction: column; align-items: flex-start !important; gap: 2px !important; padding: 12px 16px !important; border-radius: 0 !important; border-bottom: 1px solid var(--line-2); }
.notif b { font-size: 13.5px; color: var(--ink); }
.notif span { font-size: 12.5px; color: var(--muted); }
.notif small { font-size: 11px; color: var(--muted); }
.notif.unread { background: rgba(var(--brand-rgb), .045); }
.notif.unread b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-right: 7px; vertical-align: middle; }
.link-btn { border: 0; background: none; color: var(--brand); font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; padding: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------------- Content ---------------- */
.content { flex: 1; padding: 26px 28px 30px; width: 100%; max-width: 1480px; margin: 0 auto; }
.app-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 26px 2px 4px; color: var(--muted); font-size: 12px; }
.app-foot span { display: inline-flex; align-items: center; gap: 6px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-head h3 { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card-head h3 .ic { color: var(--brand); }
.card-head .sub { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.card-body { padding: 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--line-2); }
.card + .card { margin-top: 18px; }
.grid > .card + .card, .stack > .card + .card, .grid > * > .card:first-child { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid.wide-main { align-items: start; }
@media (max-width: 1360px) { .grid-main-side.wide-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1180px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main-side { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.grid > *, .kpis > * { min-width: 0; }

/* ---------------- KPI tiles ---------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 18px 18px 16px; color: #fff; box-shadow: var(--sh-2); min-height: 122px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .18s, box-shadow .18s; }
a.kpi:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,31,27,.16); text-decoration: none; }
.kpi::after { content: ''; position: absolute; width: 140px; height: 140px; border-radius: 50%; right: -40px; top: -50px; background: rgba(255,255,255,.12); }
.kpi::before { content: ''; position: absolute; width: 90px; height: 90px; border-radius: 50%; right: 30px; bottom: -55px; background: rgba(255,255,255,.08); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.kpi-label { font-size: 12.5px; font-weight: 600; opacity: .92; }
.kpi-ic { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.2); display: grid; place-items: center; }
.kpi-val { font-size: 28px; font-weight: 800; letter-spacing: -.02em; position: relative; z-index: 1; margin-top: 10px; line-height: 1.1; }
.kpi-foot { font-size: 12px; opacity: .85; position: relative; z-index: 1; margin-top: 4px; }
.t-brand { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); }
.t-teal { background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%); }
.t-violet { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }
.t-amber { background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%); }
.t-rose { background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%); }
.t-sky { background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%); }
.t-green { background: linear-gradient(135deg, #22c55e 0%, #15803d 100%); }
.t-lime { background: linear-gradient(135deg, var(--accent) 0%, #65a30d 100%); color: #14280f; }
.t-lime .kpi-ic { background: rgba(255,255,255,.4); }
.t-slate { background: linear-gradient(135deg, #475569 0%, #1e293b 100%); }

.mini-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mini { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; }
.mini b { display: block; font-size: 20px; font-weight: 800; }
.mini span { font-size: 12px; color: var(--muted); font-weight: 500; }
.mini.c-green b { color: var(--green); } .mini.c-blue b { color: var(--blue); } .mini.c-red b { color: var(--red); } .mini.c-amber b { color: var(--amber); } .mini.c-violet b { color: var(--violet); }

/* ---------------- Buttons ---------------- */
.btn { --b: var(--brand); display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; user-select: none; transition: background .15s, box-shadow .15s, transform .05s, border-color .15s; text-decoration: none !important; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .2); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(var(--brand-rgb), .25); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-dark { background: var(--brand-darker); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-accent { background: var(--accent); color: var(--brand-darker); box-shadow: 0 2px 8px rgba(var(--accent-rgb), .35); }
.btn-accent:hover { filter: brightness(.95); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: #cfd8d5; }
.btn-soft { background: rgba(var(--brand-rgb), .09); color: var(--brand); }
.btn-soft:hover { background: rgba(var(--brand-rgb), .15); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger-soft { background: #fef2f2; color: var(--red); }
.btn-danger-soft:hover { background: #fee2e2; }
.btn-warning { background: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn-icon { width: 34px; padding: 0; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.page-actions form, .btn-row form { display: contents; }

/* ---------------- Forms ---------------- */
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }
@media (max-width: 900px) { .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .form-grid, .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field > label .req { color: var(--red); }
.hint { font-size: 12px; color: var(--muted); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]), .field select, .field textarea, .toolbar input, .toolbar select {
  width: 100%; height: 42px; border: 1px solid #d5dedb; border-radius: 11px; background: #fff; padding: 0 13px; font: inherit; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.field select, .toolbar select, select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.field textarea, textarea.input { height: auto; min-height: 92px; padding: 10px 13px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .toolbar input:focus, .toolbar select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }
.field input[readonly] { background: var(--surface-2); color: var(--muted); }
.field input[type=file] { font: inherit; font-size: 13px; padding: 8px; border: 1px dashed #c9d4d0; border-radius: 11px; background: var(--surface-2); width: 100%; }
.field input[type=color] { width: 56px; height: 42px; padding: 3px; border: 1px solid #d5dedb; border-radius: 11px; background: #fff; cursor: pointer; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid #d5dedb; border-right: 0; border-radius: 11px 0 0 11px; color: var(--muted); font-weight: 600; }
.input-group input { border-radius: 0 11px 11px 0 !important; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 2px; flex-shrink: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: #cbd5d2; position: relative; transition: background .2s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .2); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 18px; margin-top: 20px; border-top: 1px solid var(--line-2); }
.section-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; color: var(--ink); }
.section-title .ic { color: var(--brand); }
fieldset { border: 0; padding: 0; margin: 0; }

/* Searchable select (combobox) */
.combo { position: relative; width: 100%; }
.combo-input { padding-right: 36px !important; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-3); max-height: 290px; overflow-y: auto; z-index: 80; display: none; padding: 4px; }
.combo.open .combo-list { display: block; }
.combo-opt { padding: 9px 11px; border-radius: 8px; cursor: pointer; font-size: 14px; display: flex; flex-direction: column; }
.combo-opt small { color: var(--muted); font-size: 12px; }
.combo-opt.hl, .combo-opt:hover { background: rgba(var(--brand-rgb), .08); }
.combo-opt.sel { font-weight: 600; color: var(--brand); }
.combo-empty { padding: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.combo-caret { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }

/* ---------------- Toolbar / filters ---------------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.toolbar .search { position: relative; flex: 1 1 240px; min-width: 200px; }
.toolbar .search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search input { padding-left: 38px; }
.toolbar select, .toolbar input[type=date] { width: auto; min-width: 150px; flex: 0 1 190px; }
.toolbar .spacer { flex: 1; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 13px; white-space: nowrap; }
.chip:hover { text-decoration: none; border-color: #c8d3cf; }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip em { font-style: normal; font-size: 11px; background: rgba(0,0,0,.07); border-radius: 999px; padding: 0 7px; }
.chip.active em { background: rgba(255,255,255,.2); }
@media (max-width: 760px) {
  .toolbar { padding: 12px; }
  .toolbar .search { flex-basis: 100%; }
  .toolbar select, .toolbar input[type=date] { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .toolbar .btn { flex: 1 1 auto; }
  .toolbar .spacer { display: none; }
}

/* ---------------- Tables → cards on mobile ---------------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #f8fbfa; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line); }
.td-title { font-weight: 600; color: var(--ink); }
.td-title a { color: var(--ink); }
.td-title a:hover { color: var(--brand); }
.td-sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.td-actions { white-space: nowrap; text-align: right; }
.td-actions .btn + .btn, .td-actions form + .btn, .td-actions .btn + form { margin-left: 4px; }
.td-actions form { display: inline; }
.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--muted); }
.barcode-img { height: 28px; max-width: 160px; display: block; margin-top: 4px; opacity: .85; }

@media (max-width: 760px) {
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tbody { padding: 10px; }
  .table.responsive tr { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--sh-1); }
  .table.responsive tr:hover { background: #fff; }
  .table.responsive td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border: 0; text-align: right; }
  .table.responsive td::before { content: attr(data-label); font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; flex-shrink: 0; }
  .table.responsive td.num { text-align: right; }
  .table.responsive td:not(.td-main):not(.td-actions) { flex-wrap: wrap; }
  .table.responsive td:not(.td-main) > .td-sub { flex-basis: 100%; text-align: right; margin-top: -4px; }
  .table.responsive td.td-main { display: block; text-align: left; font-size: 15px; padding: 0 0 8px; margin-bottom: 4px; border-bottom: 1px dashed var(--line); }
  .table.responsive td.td-main::before { display: none; }
  .table.responsive td.td-actions { justify-content: flex-end; flex-wrap: wrap; padding-top: 10px; margin-top: 6px; border-top: 1px dashed var(--line); }
  .table.responsive td.td-actions::before { display: none; }
  .table.responsive td.hide-sm, .table.responsive td:empty { display: none; }
  .table.responsive tfoot { display: block; }
  .table.responsive tfoot tr { background: var(--surface-2); }
  .table.responsive tfoot td { background: transparent; border: 0; }
}

/* ---------------- Badges ---------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-slate { background: #f1f5f9; color: #475569; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-violet { background: #ede9fe; color: #6d28d9; }
.badge-cyan { background: #cffafe; color: #0e7490; }
.badge-green { background: #dcfce7; color: #15803d; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 7px; font-size: 12px; font-weight: 700; background: rgba(var(--brand-rgb), .08); color: var(--brand); font-family: ui-monospace, Menlo, Consolas, monospace; }
.qty-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 26px; padding: 0 9px; border-radius: 8px; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.q-stock { background: #dcfce7; color: #15803d; } .q-use { background: #dbeafe; color: #1d4ed8; } .q-dmg { background: #fee2e2; color: #b91c1c; } .q-rej { background: #fef3c7; color: #b45309; } .q-zero { background: #f1f5f9; color: #94a3b8; }

/* ---------------- Pager ---------------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-top: 1px solid var(--line-2); }
.pager-info { color: var(--muted); font-size: 13px; }
.pager-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pager-per select { height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 30px 0 10px; font: inherit; font-size: 13px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center; -webkit-appearance: none; appearance: none; }
.pager-pages { display: flex; gap: 4px; }
.pg { min-width: 34px; height: 34px; padding: 0 6px; border-radius: 9px; display: inline-grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--ink-2); border: 1px solid var(--line); background: #fff; }
.pg:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); }
.pg.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pg.disabled { opacity: .4; }
.pg.dots { border: 0; background: transparent; }
@media (max-width: 600px) { .pager { justify-content: center; } .pager-info { width: 100%; text-align: center; } }

/* ---------------- Detail layouts ---------------- */
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px 20px; }
.dl div { min-width: 0; }
.dl dt { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 3px; }
.dl dd { margin: 0; font-weight: 600; word-break: break-word; }
.hero-card { background: linear-gradient(120deg, var(--brand-darker), var(--brand) 120%); color: #fff; border-radius: var(--r-lg); padding: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; position: relative; overflow: hidden; }
.hero-card::after { content: ''; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: rgba(var(--accent-rgb), .12); }
.hero-card h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.hero-card p { color: rgba(255,255,255,.75); margin-top: 4px; }
.hero-card .badge { background: #fff; }
.hero-card .hero-amt { text-align: right; position: relative; z-index: 1; }
.hero-card .hero-amt b { display: block; font-size: 28px; font-weight: 800; }
.hero-card .hero-amt small { color: rgba(255,255,255,.7); }
.totals { margin-left: auto; width: min(360px, 100%); }
.totals div { display: flex; justify-content: space-between; padding: 7px 0; color: var(--ink-2); }
.totals .grand { border-top: 2px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 18px; font-weight: 800; color: var(--ink); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }
.timeline li::after { content: ''; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline b { display: block; font-size: 13.5px; }
.timeline small { color: var(--muted); }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.callout.info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.callout.danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.callout.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }

/* Line items (requisition / PO forms) */
.lines { display: flex; flex-direction: column; gap: 12px; }
.line { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface-2); display: grid; gap: 12px; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) 90px minmax(0, 2fr) 40px; align-items: end; }
.line.po { grid-template-columns: minmax(0, 3fr) 110px 130px 100px 120px 40px; }
.line .line-no { position: absolute; top: -10px; left: 12px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 9px; }
.line .line-total { font-weight: 800; height: 42px; display: flex; align-items: center; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.line .remove { height: 42px; width: 40px; }
@media (max-width: 900px) {
  .line, .line.po { grid-template-columns: 1fr 1fr; }
  .line > .field:first-of-type, .line > .field.wide { grid-column: 1 / -1; }
  .line .remove { position: absolute; top: 8px; right: 8px; height: 32px; width: 32px; }
  .line .line-total { grid-column: 1 / -1; justify-content: space-between; border-top: 1px dashed var(--line); padding-top: 8px; height: auto; }
  .line .line-total::before { content: 'Line total'; font-weight: 600; color: var(--muted); font-size: 13px; }
}

/* ---------------- Modal ---------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(6,20,17,.55); backdrop-filter: blur(3px); }
.modal.show { display: flex; animation: fade .18s ease-out; }
.modal-card { background: #fff; border-radius: 20px; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto; box-shadow: var(--sh-3); animation: rise .22s cubic-bezier(.2,.8,.2,1); }
.modal-card.lg { max-width: 780px; }
.modal-card.sm { max-width: 400px; padding: 26px; text-align: center; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-head h3 { font-size: 17px; font-weight: 800; }
.modal-body { padding: 22px; }
.modal-foot, .modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line-2); position: sticky; bottom: 0; background: #fff; }
.modal-card.sm .modal-actions { justify-content: center; border: 0; padding: 20px 0 0; position: static; }
.modal-card.sm h3 { font-size: 18px; margin: 12px 0 6px; }
.modal-card.sm p { color: var(--muted); }
.confirm-icon { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto; display: grid; place-items: center; background: #fef2f2; color: var(--red); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .modal { align-items: flex-end; padding: 0; }
  .modal-card { border-radius: 22px 22px 0 0; max-height: 92vh; animation: sheet .26s cubic-bezier(.2,.8,.2,1); }
  .modal-card.sm { border-radius: 22px 22px 0 0; padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
  .modal-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .modal-foot .btn, .modal-actions .btn { flex: 1; }
}
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }

/* ---------------- Toasts ---------------- */
.toasts { position: fixed; top: calc(var(--topbar-h) + 12px); right: 20px; z-index: 120; display: flex; flex-direction: column; gap: 10px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 16px; border-radius: 14px; background: #fff; box-shadow: var(--sh-3); border-left: 5px solid var(--green); animation: slidein .3s cubic-bezier(.2,.8,.2,1); font-weight: 500; }
.toast span { flex: 1; }
.toast-success { border-color: var(--green); } .toast-success .ic { color: var(--green); }
.toast-error { border-color: var(--red); } .toast-error .ic { color: var(--red); }
.toast-info { border-color: var(--blue); } .toast-info .ic { color: var(--blue); }
.toast-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; }
.toast.out { opacity: 0; transform: translateX(30px); transition: all .3s; }
@keyframes slidein { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ---------------- Empty / misc ---------------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ic { color: #b6c4bf; }
.empty h4 { color: var(--ink-2); font-size: 15px; margin: 12px 0 4px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .grow small { color: var(--muted); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: rgba(var(--brand-rgb), .09); color: var(--brand); }
.list-ic.red { background: #fee2e2; color: var(--red); } .list-ic.amber { background: #fef3c7; color: var(--amber); } .list-ic.blue { background: #dbeafe; color: var(--blue); } .list-ic.violet { background: #ede9fe; color: var(--violet); } .list-ic.green { background: #dcfce7; color: var(--green); }
.progress { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 230px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; padding: 0 8px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 14px 14px 12px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0; font: inherit; font-weight: 600; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.preview-box { width: 120px; height: 120px; border-radius: 16px; border: 2px dashed #cbd5d2; display: grid; place-items: center; overflow: hidden; background: var(--surface-2); color: var(--muted); flex-shrink: 0; }
.preview-box img { width: 100%; height: 100%; object-fit: contain; }
.upload-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type=text] { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.divider { height: 1px; background: var(--line-2); margin: 20px 0; }
.kbd { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 12px; }

/* ---------------- Bottom nav (mobile) ---------------- */
.bottom-nav { display: none; }

/* ---------------- Responsive shell ---------------- */
@media (max-width: 960px) {
  .sidebar { transform: translateX(-102%); width: min(300px, 86vw); box-shadow: var(--sh-3); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .scrim { opacity: 1; pointer-events: auto; }
  body.sidebar-open { overflow: hidden; }
  .sidebar .sb-close { display: inline-grid; }
  .main { margin-left: 0; }
  .topbar { padding: 0 10px 0 6px; gap: 6px; height: 60px; }
  :root { --topbar-h: 60px; }
  .tb-title h1 { font-size: 17px; }
  .tb-title p { display: none; }
  .tb-search { display: none; }
  .tb-actions { margin-left: auto; }
  .content { padding: 16px 14px calc(96px + env(safe-area-inset-bottom)); }
  .page-head h2 { font-size: 20px; }
  .page-head { margin-bottom: 14px; }
  .page-actions { width: 100%; }
  .page-head > form.btn-row { width: 100%; }
  .page-head > form.btn-row select { flex: 1 1 0; min-width: 0 !important; }
  .page-actions .btn { flex: 1; }
  .form-actions .btn { flex: 1 1 auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { min-height: 108px; padding: 14px; }
  .kpi-val { font-size: 22px; }
  .kpi-ic { width: 32px; height: 32px; }
  .card-head, .card-body { padding-left: 14px; padding-right: 14px; }
  .card-body { padding-top: 14px; padding-bottom: 14px; }
  .list-row { padding-left: 14px; padding-right: 14px; }
  .hero-card { padding: 18px; }
  .hero-card .hero-amt { text-align: left; }
  .toasts { top: 68px; right: 12px; left: 12px; width: auto; }
  .app-foot { justify-content: center; text-align: center; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(15,31,27,.06);
  }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; background: none; border: 0; cursor: pointer; }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav a.active { color: var(--brand); }
  .bottom-nav .fab { width: 54px; height: 54px; margin: -26px auto 2px; border-radius: 18px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; justify-content: center; box-shadow: 0 8px 20px rgba(var(--brand-rgb), .4); border: 4px solid #fff; padding: 0; }
}
@media (max-width: 400px) { .kpi-val { font-size: 19px; } .kpi-label { font-size: 11.5px; } }

/* ---------------- Print ---------------- */
@media print {
  .sidebar, .topbar, .bottom-nav, .no-print, .toasts, .app-foot, .scrim, .page-actions, .pager, .toolbar, .chips { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; font-size: 12px; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .hero-card { background: #fff !important; color: #000; border: 1px solid #ccc; }
  .hero-card p, .hero-card .hero-amt small { color: #444; }
  .print-only { display: block !important; }
  .table.responsive thead { display: table-header-group !important; }
}
.print-only { display: none; }

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.login-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--brand-darker); }
.lp-top { background: var(--brand-darker); padding: 16px clamp(18px, 3vw, 56px); color: #fff; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.05); }
.lp-top img { max-height: 38px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
.lp-top b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.lp-top small { font-size: 13px; color: rgba(255,255,255,.78); }
.lp-hero {
  flex: 1; position: relative; overflow: hidden; display: flex; align-items: center;
  background:
    radial-gradient(1200px 600px at 100% 0%, rgba(var(--brand-rgb), .9), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(var(--accent-rgb), .10), transparent 60%),
    linear-gradient(115deg, var(--brand-dark) 0%, var(--brand) 60%, var(--brand-mid) 130%);
  padding: clamp(28px, 6vw, 80px) clamp(18px, 6vw, 120px);
}
.lp-hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg, #000 0%, transparent 70%); -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 70%); pointer-events: none; }
.lp-grid { position: relative; z-index: 1; width: 100%; max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 520px); gap: clamp(30px, 6vw, 110px); align-items: center; }
.lp-badge { display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.05); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.lp-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .2); }
.lp-headline { color: #fff; font-size: clamp(38px, 5.4vw, 72px); line-height: 1.04; font-weight: 900; letter-spacing: -.035em; margin: 34px 0 26px; }
.lp-headline span { color: var(--accent); }
.lp-text { color: rgba(255,255,255,.86); font-size: clamp(16px, 1.45vw, 21px); line-height: 1.75; max-width: 600px; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.lp-chip { display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff; font-weight: 500; font-size: 15px; backdrop-filter: blur(4px); }
.lp-chip .ic { color: var(--accent); }
.lp-card { background: #fff; border-radius: 22px; padding: clamp(26px, 3.4vw, 46px) clamp(22px, 3.4vw, 46px) 32px; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.lp-card-head { text-align: center; padding-bottom: 26px; border-bottom: 1px solid #e8ecec; margin-bottom: 30px; }
.lp-card-head .logo-img { max-height: 54px; max-width: 180px; object-fit: contain; margin-bottom: 14px; }
.lp-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .2em; color: #4b5563; text-transform: uppercase; }
.lp-card-head h2 { font-size: clamp(26px, 2.4vw, 32px); font-weight: 900; color: var(--brand-darker); letter-spacing: -.02em; margin: 10px 0 12px; }
.lp-card-head p { color: #4b5563; font-size: 15.5px; line-height: 1.7; }
.lp-field { margin-bottom: 22px; }
.lp-field label { display: block; font-size: 15px; font-weight: 600; color: #111827; margin-bottom: 8px; }
.lp-input { position: relative; }
.lp-input input { width: 100%; height: 58px; border-radius: 10px; border: 1px solid #d7dee3; background: #e8f0fe; padding: 0 52px 0 18px; font: inherit; font-size: 17px; color: #111; outline: none; transition: box-shadow .15s, border-color .15s; }
.lp-input input:focus { border-color: var(--brand-dark); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .22); }
.lp-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; background: none; color: #475569; cursor: pointer; border-radius: 10px; display: grid; place-items: center; }
.lp-eye:hover { background: rgba(0,0,0,.05); }
.lp-btn { width: 100%; height: 58px; border: 0; border-radius: 10px; background: var(--brand-darker); color: #fff; font: inherit; font-size: 17px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; margin-top: 6px; transition: background .15s, transform .05s; }
.lp-btn:hover { background: #000; }
.lp-btn:active { transform: translateY(1px); }
.lp-note { text-align: center; color: #4b5563; font-size: 13.5px; margin-top: 20px; }
.lp-error { display: flex; gap: 10px; align-items: flex-start; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 10px; padding: 12px 14px; margin-bottom: 20px; font-weight: 500; }
.lp-ok { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.lp-foot { background: var(--brand-darker); color: rgba(255,255,255,.72); text-align: center; padding: 22px 16px calc(22px + env(safe-area-inset-bottom)); font-size: 15px; }
.lp-foot b { color: #fff; }
@media (max-width: 980px) {
  .lp-grid { grid-template-columns: 1fr; gap: 28px; }
  .lp-intro { text-align: center; }
  .lp-text { margin: 0 auto; }
  .lp-chips { justify-content: center; margin-top: 24px; }
  .lp-headline { margin: 22px 0 16px; }
  .lp-card { max-width: 520px; width: 100%; margin: 0 auto; }
}
@media (max-width: 560px) {
  .lp-hero { padding: 26px 14px 30px; }
  .lp-badge { font-size: 11px; padding: 8px 14px; }
  .lp-text, .lp-chips { display: none; }
  .lp-headline { font-size: 34px; margin: 16px 0 4px; }
  .lp-card { border-radius: 18px; }
  .lp-input input, .lp-btn { height: 54px; }
  .lp-foot { font-size: 13px; }
}
