/* Ronda Warranty Portal - Back-office */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(../fonts/manrope-latin.woff2) format('woff2');
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:not(html):not(body)::-webkit-scrollbar { width: 5px; height: 5px; }
:not(html):not(body)::-webkit-scrollbar-track, :not(html):not(body)::-webkit-scrollbar-corner { background: transparent; }
:not(html):not(body)::-webkit-scrollbar-thumb { background: #adb3ba; border-radius: 999px; }
:not(html):not(body)::-webkit-scrollbar-thumb:hover { background: #8a9099; }
@supports not selector(::-webkit-scrollbar) { :not(html):not(body) { scrollbar-width: thin; scrollbar-color: #adb3ba transparent; } }

:root {
  /* Ronda brand (same tokens as the front-end) */
  --primary: #c82034;
  --primary_dark: #a8182a;
  --primary_soft: #fdf2f3;
  --primary_ring: rgba(200, 32, 52, .16);
  --title: #14161a;
  --text: #5c636d;
  --text2: #4b5563;
  --text3: #2b2f36;
  --gray: #8e959e;
  --line: #e4e6e9;
  --line2: #d5d9de;
  --light: #f5f6f7;
  --dark: #14161a;
  --ok: #17803d;
  --ok_bg: #edf8f1;
  --warn: #8a5300;
  --warn_bg: #fff6e5;
  --warn_line: #f3d59b;
  --err: #c82034;
  --err_bg: #fdf0f1;
  --blue: #1f5fbf;
  --blue_bg: #eef4fd;
  --violet: #6a3fc8;
  --violet_bg: #f3effd;
  --violet_line: #d9cdf6;
  --font_title: 'Manrope', 'Inter', system-ui, sans-serif;
  --radius: 10px;
  --radius_lg: 16px;
  --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 8px 28px -12px rgba(20, 22, 26, .12);
  --shadow_lg: 0 24px 60px -16px rgba(20, 22, 26, .35);
  --side_w: 260px;
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--title);
  background: var(--light);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
[hidden] { display: none !important; }
table { border-collapse: collapse; width: 100%; }

.ic {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.muted { color: var(--text); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }

/* ---------- Status badges & flags ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pending { background: var(--warn_bg); color: var(--warn); }
.badge.approved { background: var(--ok_bg); color: var(--ok); }
.badge.rejected { background: var(--err_bg); color: var(--primary_dark); }
.badge.info { background: var(--violet_bg); color: var(--violet); }
.badge.neutral { background: var(--light); color: var(--text2); }
.badge.free { background: var(--light); color: var(--text2); }
.badge.registered { background: var(--ok_bg); color: var(--ok); }
.badge.review { background: var(--warn_bg); color: var(--warn); }
.badge.waiting { background: var(--blue_bg); color: var(--blue); }

.flag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.flag .ic { width: 12px; height: 12px; stroke-width: 2.2; }
.flag.late { background: var(--warn_bg); color: var(--warn); }
.flag.notfound { background: var(--err_bg); color: var(--primary_dark); }
.flag.edited { background: var(--blue_bg); color: var(--blue); }
.flag.mismatch { background: var(--err_bg); color: var(--primary_dark); }
.flags { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius);
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn .ic { width: 17px; height: 17px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary_dark); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #2b2f36; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #126a32; }
.btn-ghost { background: #fff; color: var(--text3); border: 1px solid var(--line2); }
.btn-ghost:hover { border-color: var(--title); }
.btn-danger { background: #fff; color: var(--primary_dark); border: 1px solid #f1c4ca; }
.btn-danger:hover { background: var(--err_bg); border-color: var(--primary); }
.btn-violet { background: #fff; color: var(--violet); border: 1px solid var(--violet_line); }
.btn-violet:hover { background: var(--violet_bg); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 9px; color: var(--text); display: inline-grid; place-items: center; transition: background-color .15s, color .15s; }
.btn-icon:hover { background: var(--light); color: var(--title); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link { color: var(--primary); font-weight: 600; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .15s; }
.link:hover { text-decoration-color: currentColor; }

/* ---------- Form controls ---------- */
.input {
  width: 100%; height: 40px; padding: 0 12px;
  font-size: 14px; color: var(--title);
  background: #fff; border: 1px solid var(--line2); border-radius: var(--radius);
  outline: none; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
textarea.input { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input::placeholder { color: #a9aeb5; }
.input:hover { border-color: #b9bec5; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary_ring); }
.input.is-error { border-color: var(--err); }
.select-wrap { position: relative; }
.select-wrap select { padding-right: 34px; cursor: pointer; }
.select-wrap .ic { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text); width: 16px; height: 16px; }
.label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--text3); margin-bottom: 6px; }
.hint { font-size: 12.5px; color: var(--gray); margin-top: 6px; line-height: 1.45; }
.field + .field { margin-top: 16px; }
.input-affix { position: relative; }
.input-affix .input { padding-right: 56px; }
.input-affix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--gray); font-size: 13px; font-weight: 500; }
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray); }
.search .input { padding-left: 38px; }

.switch { position: relative; display: inline-flex; width: 38px; height: 22px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line2); transition: background .15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(16px); }

.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill { position: relative; cursor: pointer; }
.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pill span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line2); font-weight: 600; font-size: 13px; color: var(--text3); background: #fff; }
.radio-pill input:checked + span { border-color: var(--primary); background: var(--primary_soft); color: var(--primary_dark); box-shadow: 0 0 0 3px var(--primary_ring); }

/* ---------- Login ---------- */
.login { min-height: 100vh; background: #fff; }
.login-form-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.login-form { width: 100%; max-width: 380px; }
.login-form .brand img { height: 54px; width: auto; }
.login-form h2 { font-family: var(--font_title); font-weight: 800; font-size: 28px; letter-spacing: -.015em; margin-top: 34px; }
.login-form .sub { color: var(--text); margin-top: 6px; margin-bottom: 28px; font-size: 15px; }
.login-form .input { height: 46px; }
.login-form .field + .btn { margin-top: 22px; }
.login-done { width: 48px; height: 48px; margin: 40px 0 0 6px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 6px var(--ok_bg); }
.login-done .ic { width: 24px; height: 24px; stroke-width: 2.6; }
.login-done + h2 { margin-top: 26px; }
.login-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--text); transition: color .15s; }
.login-back:hover { color: var(--title); }
.login-back .ic { width: 15px; height: 15px; }
.login-row { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 22px; font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text3); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { width: 18px; height: 18px; flex: none; border-radius: 5px; border: 1.5px solid #b9bec5; display: grid; place-items: center; color: transparent; background: #fff; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.check .box .ic { width: 12px; height: 12px; stroke-width: 3; }
.check input:checked + .box { background: var(--primary); border-color: var(--primary); color: #fff; }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px var(--primary_ring); }
.login-form .btn { width: 100%; height: 46px; font-size: 15px; }
.login-foot { margin-top: 28px; font-size: 12.5px; color: var(--gray); }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--side_w) minmax(0, 1fr); min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); }
.side-in { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; padding: 18px 14px 14px; }
.side-menu { flex: 1; min-height: 0; overflow-y: auto; }
.side-brand { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 18px; }
.side-brand img { height: 40px; width: auto; }
.side-tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gray); padding: 0 10px; margin: 18px 0 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 10px; border-radius: 10px;
  font-weight: 600; font-size: 14px; color: var(--text3);
  transition: background-color .15s, color .15s;
}
.nav a .ic { color: var(--gray); width: 19px; height: 19px; transition: color .15s; }
.nav a:hover { background: var(--light); }
.nav a.is-active, .nav a.is-active:hover { background: var(--primary); color: #fff; }
.nav a.is-active .ic { color: #fff; }
.nav .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; transition: background-color .15s, color .15s; }
.nav .count.soft { background: var(--light); color: var(--text2); }
.nav a.is-active .count { background: #fff; color: var(--primary); }
.nav a.is-active .count.soft { background: rgba(255,255,255,.3); color: #fff; }
.side-foot { padding-top: 14px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--dark); color: #fff; font-weight: 700; font-size: 13px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.red { background: var(--primary); }
.avatar.gray { background: #e9ebee; color: var(--text3); }
.me-txt { min-width: 0; flex: 1; line-height: 1.3; }
.me-txt strong { display: block; font-size: 13.5px; }
.me-txt span { font-size: 12px; color: var(--text); }
.side-scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: 64px; display: flex; align-items: center; gap: 14px;
  padding: 0 32px; background: #fff;
  border-bottom: 1px solid var(--line);
}
.topbar .menu-btn, .topbar .top-logo { display: none; }
.menu-btn .ic { width: 24px; height: 24px; }
.topbar .search { flex: 1; max-width: 460px; }
.topbar .search .input { background: #fff; height: 40px; }
.topbar .kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 600; color: var(--gray); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: var(--light); }
.content { padding: 28px 32px 64px; width: 100%; animation: fadeIn .25s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); margin-bottom: 8px; font-weight: 500; }
.crumbs a { transition: color .15s; }
.crumbs a:hover { color: var(--primary); }
.crumbs .ic { width: 14px; height: 14px; color: var(--gray); }
.page-head h1 { font-family: var(--font_title); font-weight: 800; font-size: 28px; line-height: 1.2; letter-spacing: -.015em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head .sub { color: var(--text); margin-top: 6px; font-size: 14.5px; max-width: 720px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards ---------- */
.card { background: #fff; border-radius: var(--radius_lg); box-shadow: var(--shadow); border: 1px solid rgba(20,22,26,.05); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-family: var(--font_title); font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-head h2 .ic, .card-head h3 .ic { color: var(--primary); }
.card-head .more { font-size: 13px; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.card-head .more .ic { width: 15px; height: 15px; }
.card-body { padding: 16px 20px 20px; }
.card-note { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text); display: flex; gap: 8px; align-items: flex-start; }
.card-note .ic { width: 15px; height: 15px; color: var(--gray); margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { position: relative; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--text); }
.kpi-ic { display: grid; place-items: center; color: var(--primary); }
.kpi-ic .ic { width: 44px; height: 44px; fill: currentColor; stroke: none; }
.kpi-value { font-family: var(--font_title); font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -.02em; }
.kpi-sub { font-size: 12.5px; color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi-sub b { color: var(--title); font-weight: 600; }
.trend-up { color: var(--ok); font-weight: 600; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }

/* queue */
.queue { list-style: none; }
.queue li + li { border-top: 1px solid var(--line); }
.queue a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding: 13px 20px; transition: background-color .15s; }
.queue a:hover { background: #fafbfb; }
.q-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.q-txt { min-width: 0; }
.q-txt strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-txt > span { display: block; font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-side { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.age { font-size: 12px; color: var(--gray); white-space: nowrap; }

/* mini list */
.mini { list-style: none; }
.mini li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f1f3; font-size: 13.5px; }
.mini li:last-child { border-bottom: 0; }
.mini li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.mini li a span:first-child, .mini li a span:first-child .ic { transition: color .15s; }
.mini li a:hover span:first-child, .mini li a:hover span:first-child .ic { color: var(--primary); }
.mini li span:first-child { color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.mini li span:first-child .ic { width: 16px; height: 16px; color: var(--gray); }
.mini strong { font-weight: 600; }

/* activity feed */
.feed { list-style: none; display: flex; flex-direction: column; }
.feed li { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 12px; padding: 9px 0; }
.feed .f-ic { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--line2); }
.feed .f-ic.ok { background: var(--ok); }
.feed .f-ic.err { background: var(--primary); }
.feed .f-ic.mail { background: var(--blue); }
.feed .f-ic.violet { background: var(--violet); }
.feed .f-ic.warn { background: var(--warn); }
.feed p { font-size: 13.5px; line-height: 1.45; color: var(--text3); }
.feed time { display: block; font-size: 12px; color: var(--gray); margin-top: 1px; }

/* chart (Option 2) */
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; align-items: end; height: 150px; padding: 8px 4px 0; position: relative; }
.bars::before { content: ''; position: absolute; inset: 0 0 22px; background: repeating-linear-gradient(180deg, transparent 0 31px, #f0f1f3 31px 32px); pointer-events: none; }
.bar { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #e2546a, var(--primary)); opacity: .9; }
.bar i.dim { background: #e3e6ea; }
.bar b { font-size: 11.5px; font-weight: 600; color: var(--text3); }
.bar span { font-size: 11.5px; color: var(--gray); }

/* ---------- Tables ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.toolbar .search { flex: 1; min-width: 220px; max-width: 380px; }
.toolbar .select-wrap { min-width: 150px; }
.toolbar .spacer { flex: 1; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--light); flex-wrap: wrap; }
.tabs button, .tabs a { height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; transition: background-color .15s, color .15s; }
.tabs button:hover, .tabs a:hover { color: var(--title); }
.tabs .is-active { background: #fff; color: var(--title); box-shadow: 0 1px 3px rgba(20,22,26,.1); }
.tabs .n { font-size: 11.5px; color: var(--gray); font-weight: 600; }
.tabs .is-active .n { color: var(--primary); }
.utabs { display: flex; gap: 22px; box-shadow: inset 0 -1px 0 var(--line); padding: 0 20px; overflow-x: auto; overflow-y: hidden; }
.utabs button { position: relative; height: 48px; font-size: 14px; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.utabs button.is-active { color: var(--title); }
.utabs button.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--primary); }

.table-wrap { overflow-x: auto; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text); padding: 11px 14px; background: #fafbfb; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table td { padding: 13px 14px; border-bottom: 1px solid #f0f1f3; vertical-align: middle; font-size: 13.5px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.is-link { cursor: pointer; }
.table tr.is-link td { transition: background-color .15s; }
.table tr.is-link:hover td { background: #fafbfb; }
.cell-strong { font-weight: 600; color: var(--title); }
.cell-sub { display: block; font-size: 12px; color: var(--text); margin-top: 1px; }
.reg-link { white-space: nowrap; font-weight: 700; color: var(--title); font-variant-numeric: tabular-nums; transition: color .15s; }
tr.is-link:hover .reg-link { color: var(--primary); }
.sn-list { display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 13px; }
.who { display: inline-flex; align-items: center; gap: 8px; }
.who .ic { width: 15px; height: 15px; color: var(--gray); }
.table .chev { color: var(--line2); width: 16px; height: 16px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text); flex-wrap: wrap; }
.pager { display: flex; gap: 4px; }
.pager button { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 13px; color: var(--text3); }
.pager button.is-active { border-color: var(--title); background: var(--title); color: #fff; }
.empty { padding: 48px 20px; text-align: center; color: var(--text); }
.empty .ic { width: 32px; height: 32px; color: var(--line2); margin: 0 auto 10px; display: block; }
.progress { width: 110px; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 6px; }

/* ---------- Registration detail ---------- */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-head h1 { font-family: var(--font_title); font-weight: 800; font-size: 28px; letter-spacing: -.01em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; color: var(--text); font-size: 13.5px; }
.detail-meta span { display: inline-flex; align-items: center; gap: 6px; }
.detail-meta > span > .ic { width: 15px; height: 15px; color: var(--gray); }
.decision { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.detail-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 20px; }

.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sec-head h2 { font-family: var(--font_title); font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sec-head h2 .ic { color: var(--primary); }
.sec-head .step-no { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; padding: 6px 20px 10px; }
.kv.one { grid-template-columns: 1fr; }
.kv-row { display: grid; grid-template-columns: 182px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid #f2f3f5; align-items: baseline; }
.kv-row.full { grid-column: 1 / -1; }
.kv dt { font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kv dd { font-size: 14px; font-weight: 500; color: var(--title); overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kv dd .input { height: 34px; font-size: 13.5px; }
.corrected { font-size: 11px; font-weight: 600; color: var(--blue); background: var(--blue_bg); border-radius: 999px; padding: 1px 7px; }
.tag-ok { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--ok); background: var(--ok_bg); padding: 2px 8px; border-radius: 999px; }
.tag-ok .ic { width: 12px; height: 12px; stroke-width: 2.6; }

.product-box { margin: 14px 20px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.product-box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: #fafbfb; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.product-box-head strong { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }
.product-box-head strong .ic { color: var(--primary); width: 16px; height: 16px; }
.product-box-body { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; padding: 14px; }
.product-box .kv { padding: 0; grid-template-columns: 1fr; }
.product-box .kv-row { grid-template-columns: 150px minmax(0, 1fr); padding: 7px 0; }
.product-box .kv-row:last-child { border-bottom: 0; }

.docs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 16px 20px 20px; }
.doc { display: flex; flex-direction: column; gap: 8px; min-width: 0; text-align: left; }
.doc-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: #eef0f2; }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.is-blur { filter: blur(4px); }
.doc-thumb .zoom { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20,22,26,.45); color: #fff; opacity: 0; transition: opacity .15s; }
.doc-thumb .zoom .ic { width: 26px; height: 26px; }
.doc:hover .zoom { opacity: 1; }
.doc-name { font-size: 13px; font-weight: 600; color: var(--title); line-height: 1.3; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.doc-meta { font-size: 12px; color: var(--gray); margin-top: -4px; }
.thumb-sm { width: 132px; }
.thumb-sm .doc-thumb { aspect-ratio: 1; }

.checks { list-style: none; padding: 6px 20px 14px; }
.checks li { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid #f2f3f5; }
.checks li:last-child { border-bottom: 0; }
.ck { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; }
.ck.ok { background: var(--ok); }
.ck.warn { background: var(--warn); }
.ck.err { background: var(--primary); }
.ck.info { background: var(--blue); }
.checks strong { display: block; font-size: 13.5px; font-weight: 600; }
.ck.ok + div strong { color: var(--ok); }
.ck.warn + div strong { color: var(--warn); }
.ck.err + div strong { color: var(--primary_dark); }
.ck.info + div strong { color: var(--blue); }
.checks p { font-size: 12.5px; color: var(--text); margin-top: 2px; line-height: 1.45; }
.checks .mono { color: var(--title); font-weight: 600; }

.timeline { list-style: none; padding: 14px 20px 18px; position: relative; }
.timeline li { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--primary); position: relative; z-index: 1; }
.tl-dot.ok { border-color: var(--ok); background: var(--ok); color: #fff; }
.tl-dot.err, .tl-dot.violet { background: var(--primary); color: #fff; }
.tl-dot .ic { width: 11px; height: 11px; stroke-width: 2.8; }
.timeline strong { font-size: 13.5px; font-weight: 600; display: block; line-height: 1.35; }
.timeline p { font-size: 12.5px; color: var(--text); margin-top: 2px; line-height: 1.45; }
.timeline time { font-size: 12px; color: var(--gray); display: block; margin-top: 2px; }
.timeline .quote { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--light); font-size: 12.5px; color: var(--text3); }

.note-box { padding: 14px 20px 18px; }
.note-box .notes { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.note-box .notes li { padding: 10px 12px; border-radius: 10px; background: #fffbea; border: 1px solid #f4e7b5; font-size: 13px; color: var(--text3); }
.note-box .notes li span { display: block; font-size: 11.5px; color: var(--gray); margin-top: 4px; }
.note-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 10px; }

.warranty-box { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.wdates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wdates div { padding: 12px; border-radius: 12px; background: var(--light); }
.wdates span { font-size: 11.5px; font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wdates strong { display: block; font-family: var(--font_title); font-size: 17px; margin-top: 4px; }
.cert-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.cert-row .ic-box { width: 38px; height: 38px; border-radius: 10px; background: var(--primary_soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.cert-row div { min-width: 0; flex: 1; }
.cert-row strong { display: block; font-size: 13.5px; }
.cert-row span { font-size: 12px; color: var(--text); }

.banner { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; margin-bottom: 20px; }
.banner .ic { width: 20px; height: 20px; margin-top: 1px; }
.banner strong { display: block; font-weight: 700; }
.banner.ok { background: var(--ok_bg); color: #11612e; border: 1px solid #c4e6d0; }
.banner.err { background: var(--err_bg); color: var(--primary_dark); border: 1px solid #f3c9cf; }
.banner.warn { background: var(--warn_bg); color: var(--warn); border: 1px solid var(--warn_line); }
.banner.violet { background: var(--violet_bg); color: #4f2aa3; border: 1px solid var(--violet_line); }
.banner.info { background: #fff; color: var(--text2); border: 1px solid var(--line); }
.banner .btn { margin-left: auto; }

.msg { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 10px; font-size: 13px; line-height: 1.5; font-weight: 500; }
.msg .ic { width: 17px; height: 17px; margin-top: 1px; }
.msg.ok { background: var(--ok_bg); color: var(--ok); }
.msg.err { background: var(--err_bg); color: var(--primary_dark); }
.msg.warn { background: var(--warn_bg); color: var(--warn); border: 1px solid var(--warn_line); }
.msg.info { background: var(--light); color: var(--text2); }

/* ---------- Serial numbers ---------- */
.sn-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; margin-bottom: 20px; }
.tool { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.tool h3 { font-family: var(--font_title); font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool h3 .num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--dark); color: #fff; font-size: 12px; font-weight: 700; }
.tool p { color: var(--text); font-size: 13px; }
.tool .btn { align-self: flex-start; }
.drop { border: 1.5px dashed #c3c8ce; border-radius: 14px; background: #fafbfb; padding: 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: border-color .15s, background .15s; text-align: left; width: 100%; }
.drop:hover { border-color: var(--primary); background: var(--primary_soft); }
.drop .up-ic { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--primary); display: grid; place-items: center; box-shadow: 0 4px 14px -4px rgba(20,22,26,.18); flex: none; }
.drop strong { display: block; font-size: 13.5px; }
.drop strong { color: var(--title); }
.drop > span > span { display: block; font-size: 12px; color: var(--gray); }
.check-row { display: flex; gap: 8px; }
.check-row .input { text-transform: uppercase; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.check-row .input::placeholder { text-transform: none; letter-spacing: 0; }
.sn-result { margin-top: 2px; }
.sn-result a { text-decoration: underline; text-underline-offset: 2px; }
.import-report { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 14px; }
.import-report div { padding: 14px; border-radius: 12px; background: var(--light); }
.import-report strong { display: block; font-family: var(--font_title); font-size: 26px; line-height: 1.1; }
.import-report span { font-size: 12.5px; color: var(--text); }
.import-report .ok strong { color: var(--ok); }
.import-report .warn strong { color: var(--warn); }
.import-report .err strong { color: var(--primary); }

/* ---------- Change requests ---------- */
.addr-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.addr-card { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: #fafbfb; }
.addr-card.new { border-color: #c4e6d0; background: var(--ok_bg); }
.addr-card span { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text); }
.addr-card p { margin-top: 6px; font-weight: 600; line-height: 1.45; }
.addr-arrow { color: var(--gray); }

/* ---------- Certificate ---------- */
.cert-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.cert-paper-wrap { background: #e9ebee; border-radius: var(--radius_lg); padding: 32px; display: flex; justify-content: center; overflow-x: auto; }
.cert {
  position: relative; width: 794px; min-height: 1123px; flex: none;
  background: #fff; box-shadow: 0 20px 50px -20px rgba(20,22,26,.35);
  padding: 56px 64px 48px; display: flex; flex-direction: column; overflow: hidden;
}
.cert::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 8px; background: linear-gradient(90deg, var(--primary), #e2546a 60%, var(--primary_dark)); }
.cert-draft { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%) rotate(-28deg); font-family: var(--font_title); font-weight: 800; font-size: 120px; letter-spacing: .1em; color: rgba(200, 32, 52, .07); pointer-events: none; white-space: nowrap; }
.cert-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.cert-top img { height: 62px; width: auto; }
.cert-no { text-align: right; font-size: 11px; color: var(--text); line-height: 1.6; }
.cert-no strong { display: block; font-family: var(--font_title); font-size: 18px; color: var(--primary); letter-spacing: .02em; }
.cert-title { margin-top: 40px; padding-bottom: 22px; border-bottom: 2px solid var(--title); display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.cert-title h2 { font-family: var(--font_title); font-weight: 800; font-size: 30px; line-height: 1.15; letter-spacing: -.01em; }
.cert-title p { font-size: 12.5px; color: var(--text); margin-top: 6px; }
.cert-seal { width: 92px; height: 92px; flex: none; border-radius: 50%; border: 2px solid var(--primary); display: grid; place-items: center; text-align: center; color: var(--primary); position: relative; }
.cert-seal::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; border: 1px dashed rgba(200,32,52,.5); }
.cert-seal strong { font-family: var(--font_title); font-weight: 800; font-size: 30px; line-height: .9; display: block; }
.cert-seal span { font-size: 8.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cert-replace { margin-top: 14px; font-size: 11.5px; color: var(--warn); font-style: italic; }
.cert-sec { margin-top: 24px; }
.cert-sec h3 { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.cert-sec h3::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.cert-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.cert-kv div span { display: block; font-size: 10.5px; color: var(--gray); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.cert-kv div strong { display: block; font-size: 13px; font-weight: 600; margin-top: 2px; line-height: 1.4; }
.cert-kv .full { grid-column: 1 / -1; }
.cert-table { width: 100%; font-size: 12px; margin-top: 2px; }
.cert-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--gray); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); background: #fafbfb; }
.cert-table td { padding: 7px 8px; border-bottom: 1px solid #f0f1f3; font-weight: 500; }
.cert-dates { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cert-dates div { padding: 12px 14px; }
.cert-dates div + div { border-left: 1px solid var(--line); }
.cert-dates span { display: block; font-size: 10px; color: var(--gray); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.cert-dates strong { display: block; font-family: var(--font_title); font-size: 16px; margin-top: 3px; }
.cert-terms { font-size: 11px; line-height: 1.6; color: var(--text2); }
.cert-terms p + p { margin-top: 8px; }
.cert-foot { margin-top: auto; padding-top: 26px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; font-size: 10.5px; color: var(--text); line-height: 1.6; }
.cert-foot strong { color: var(--title); }
.cert-sign { text-align: center; min-width: 170px; }
.cert-sign .sig { height: 46px; border-bottom: 1px solid var(--line2); margin-bottom: 6px; display: grid; place-items: center; color: var(--gray); font-size: 10.5px; font-style: italic; }
.cert-qr { width: 64px; height: 64px; }

/* ---------- Emails ---------- */
.mail-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 20px; align-items: start; }
.mail-list { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.mail-group { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gray); padding: 12px 12px 6px; }
.mail-item { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: 10px; text-align: left; align-items: center; transition: background-color .15s; }
.mail-item:hover { background: var(--light); }
.mail-item.is-active, .mail-item.is-active:hover { background: var(--primary); }
.mail-item .e-ref { width: 34px; height: 34px; border-radius: 9px; background: var(--light); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--text2); transition: background-color .15s, color .15s; }
.mail-item.is-active .e-ref { background: #fff; color: var(--primary); }
.mail-item strong, .mail-item div span { transition: color .15s; }
.mail-item.is-active strong { color: #fff; }
.mail-item.is-active div span { color: rgba(255,255,255,.8); }
.mail-item strong { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; }
.mail-item span { display: block; font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; padding: 4px 20px 12px; }
.mail-meta .kv-row { grid-template-columns: 110px minmax(0, 1fr); }
.mail-preview { background: #eef0f2; padding: 28px; margin: 8px 20px 20px; border: 1px solid var(--line); border-radius: 12px; }
.email { max-width: 600px; margin: 0 auto; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px -14px rgba(20,22,26,.3); }
.email-head { padding: 22px 32px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.email-head img { height: 38px; width: auto; }
.email-head span { font-size: 11px; font-weight: 600; color: var(--gray); letter-spacing: .08em; text-transform: uppercase; }
.email-body { padding: 28px 32px; font-size: 14.5px; line-height: 1.65; color: var(--text3); }
.email-body h2 { font-family: var(--font_title); font-weight: 800; font-size: 22px; line-height: 1.25; color: var(--title); margin-bottom: 14px; }
.email-body p + p { margin-top: 12px; }
.email-body .box { margin: 18px 0; padding: 14px 16px; border-radius: 10px; background: var(--light); font-size: 13.5px; }
.email-body .box div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.email-body .box span { color: var(--text); }
.email-body .box b { color: var(--title); font-weight: 600; text-align: right; }
.email-body .cta { display: inline-flex; margin-top: 16px; height: 44px; padding: 0 22px; align-items: center; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 600; }
.email-body .attach { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 600; }
.email-body .attach .ic { color: var(--primary); }
.email-foot { padding: 18px 32px 24px; background: #fafbfb; border-top: 1px solid var(--line); font-size: 12px; color: var(--text); line-height: 1.6; }
.var { color: var(--blue); background: var(--blue_bg); border-radius: 4px; padding: 0 4px; font-weight: 600; font-size: .95em; }

/* ---------- Settings ---------- */
.settings-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.set-nav { padding: 8px; position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.set-nav button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--text3); text-align: left; transition: background-color .15s, color .15s; }
.set-nav button .ic { color: var(--gray); transition: color .15s; }
.set-nav button:hover { background: var(--light); }
.set-nav button.is-active, .set-nav button.is-active:hover { background: var(--primary); color: #fff; }
.set-nav button.is-active .ic { color: #fff; }
.set-section { padding: 22px 24px; }
.set-section + .set-section { border-top: 1px solid var(--line); }
.set-section h3 { font-family: var(--font_title); font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.set-section > p { color: var(--text); font-size: 13px; margin-top: 4px; max-width: 640px; }
.set-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; margin-top: 18px; align-items: start; }
.set-row .label { margin-bottom: 2px; }
.set-row .desc { font-size: 12.5px; color: var(--text); line-height: 1.45; }
.set-ctrl { max-width: 420px; }
.set-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); background: #fafbfb; border-radius: 0 0 var(--radius_lg) var(--radius_lg); }
.type-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.type-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.type-card.is-off { opacity: .6; }
.type-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fafbfb; flex-wrap: wrap; }
.type-head .grip { color: var(--line2); cursor: grab; font-weight: 700; letter-spacing: -2px; }
.type-head strong { font-size: 14px; flex: 1; min-width: 140px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.type-head .muted { font-size: 12px; }
.model-list { list-style: none; padding: 6px 14px 10px; }
.model-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f2f3f5; font-size: 13.5px; flex-wrap: wrap; }
.model-list li:last-child { border-bottom: 0; }
.model-list .m-name { flex: 1; font-weight: 500; min-width: 160px; }
.model-list .none { color: var(--gray); font-style: italic; }
.add-inline { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.add-inline .input { max-width: 300px; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(20, 22, 26, .5); display: flex; justify-content: center; padding: 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; animation: fadeIn2 .15s ease both; }
.modal-back::-webkit-scrollbar { display: none; }
@keyframes fadeIn2 { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 100%; max-width: 520px; margin: auto; flex: none; background: #fff; border-radius: 18px; box-shadow: var(--shadow_lg); animation: pop .2s cubic-bezier(.2,1.2,.4,1) both; }
.modal.wide { max-width: 760px; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 0; }
.modal-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.modal-ic.ok { background: var(--ok_bg); color: var(--ok); }
.modal-ic.err { background: var(--err_bg); color: var(--primary); }
.modal-ic.violet { background: var(--violet_bg); color: var(--violet); }
.modal-ic.neutral { background: var(--light); color: var(--text2); }
.modal-ic .ic { width: 21px; height: 21px; }
.modal-head h3 { font-family: var(--font_title); font-weight: 800; font-size: 19px; line-height: 1.3; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.modal-head p { color: var(--text); font-size: 13.5px; margin-top: 4px; }
.modal-head .btn-icon { margin-left: auto; margin-top: -4px; }
.modal-body { padding: 18px 24px 4px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 24px 22px; flex-wrap: wrap; }
.effects { list-style: none; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: var(--light); font-size: 13px; color: var(--text3); }
.effects li { display: flex; gap: 10px; align-items: flex-start; }
.effects .ic { width: 16px; height: 16px; color: var(--ok); margin-top: 2px; }
.reason-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.reason-chips button { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); font-size: 12.5px; font-weight: 500; color: var(--text3); background: #fff; transition: background-color .15s, border-color .15s, color .15s; }
.reason-chips button:hover { border-color: var(--primary); color: var(--primary_dark); background: var(--primary_soft); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(12, 14, 18, .97); display: flex; flex-direction: column; animation: fadeIn2 .2s ease both; }
.lightbox.is-closing { animation: fadeOut2 .2s ease both; pointer-events: none; }
@keyframes fadeOut2 { from { opacity: 1; } to { opacity: 0; } }
.lb-bar { display: flex; align-items: center; gap: 10px; padding: 14px 20px; color: #fff; }
.lb-bar strong { font-size: 14px; }
.lb-bar span { font-size: 12.5px; color: rgba(255,255,255,.6); white-space: nowrap; }
.lb-bar .grow { flex: 1; min-width: 0; }
.lb-bar .btn-icon { color: #fff; }
.lb-bar .btn-icon:hover { background: rgba(255,255,255,.12); color: #fff; }
.lb-bar .btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
.lb-stage { flex: 1; min-height: 0; overflow: auto; display: flex; padding: 20px; }
.lb-stage .lb-img { margin: auto; flex: none; width: calc(min(820px, 90vw) * var(--z, 1)); border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-stage .lb-img img { display: block; width: 100%; height: auto; }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 420px; padding: 12px 16px; border-radius: 12px; background: var(--dark); color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: 0 12px 30px -10px rgba(0,0,0,.45); animation: toastIn .25s ease both; }
.toast .ic { width: 18px; height: 18px; color: #5fd08b; }
.toast.out { animation: toastOut .25s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .sn-tools { grid-template-columns: 1fr 1fr; }
  .sn-tools .tool:last-child { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .kv { grid-template-columns: 1fr; }
  .mail-layout { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .set-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; }
  .set-nav button { width: auto; white-space: nowrap; flex-wrap: nowrap; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 75; transform: translateX(-100%); transition: transform .2s ease, box-shadow .2s ease; }
  body.nav-open .side { transform: none; box-shadow: var(--shadow_lg); }
  body.nav-open .side-scrim { display: block; }
  .side-scrim { display: none; position: fixed; inset: 0; z-index: 74; background: rgba(20,22,26,.4); }
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar .top-logo { display: block; height: 30px; width: auto; }
  .topbar .search { display: none; }
  .content { padding: 20px 16px 56px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .page-head h1, .detail-head h1 { font-size: 23px; }
  .page-head .sub { font-size: 13.5px; }
  .kpis { gap: 12px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 28px; }
  .kpi-label { font-size: 12.5px; }
  .kpi-ic .ic { width: 32px; height: 32px; }
  .sn-tools { grid-template-columns: 1fr; }
  .toolbar { padding: 14px 16px; }
  .toolbar .search { max-width: none; min-width: 100%; }
  .toolbar .select-wrap { flex: 1; min-width: 130px; }
  .tabs { width: 100%; }

  /* tables become cards */
  .rtable thead { display: none; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { padding: 12px 16px; border-bottom: 1px solid var(--line); position: relative; }
  .rtable tbody tr:last-child { border-bottom: 0; }
  .rtable td { padding: 3px 0 !important; border: 0; display: flex; justify-content: space-between; gap: 16px; text-align: right; font-size: 13px; }
  .rtable td::before { content: attr(data-label); color: var(--text); font-size: 12px; font-weight: 500; text-align: left; flex: none; }
  .rtable td.td-main { display: block; text-align: left; padding-bottom: 6px !important; padding-right: 24px !important; }
  .rtable td.td-main::before { display: none; }
  .rtable td.td-chev { position: absolute; right: 12px; top: 14px; width: auto; padding: 0 !important; }
  .rtable td.td-chev::before { display: none; }
  .rtable td:empty { display: none; }
  .rtable .sn-list, .rtable .flags { align-items: flex-end; justify-content: flex-end; }
  .table-foot { padding: 12px 16px; }

  .detail-head { gap: 14px; }
  .decision { width: 100%; }
  .decision .btn { flex: 1; }
  .kv { padding: 4px 16px 8px; }
  .kv-row { grid-template-columns: 1fr; gap: 2px; padding: 9px 0; }
  .sec-head { padding: 14px 16px; }
  .product-box { margin: 12px 16px; }
  .product-box-body { grid-template-columns: 1fr; }
  .product-box .kv-row { grid-template-columns: 1fr; }
  .thumb-sm { width: 100%; }
  .thumb-sm .doc-thumb { aspect-ratio: 16 / 9; }
  .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 16px 16px; gap: 12px; }
  .checks, .timeline, .note-box, .warranty-box { padding-left: 16px; padding-right: 16px; }
  .card-head { padding: 16px 16px 0; }
  .card-body { padding: 14px 16px 16px; }
  .queue a { padding: 12px 16px; grid-template-columns: 1fr; }
  .q-side { justify-content: flex-start; flex-wrap: wrap; }

  .cert-paper-wrap { padding: 12px; display: block; }
  .cert { width: 100%; min-height: 0; padding: 30px 20px 24px; }
  .cert-top img { height: 42px; }
  .cert-title { flex-direction: column; align-items: flex-start; margin-top: 26px; }
  .cert-title h2 { font-size: 22px; }
  .cert-seal { display: none; }
  .cert-kv { grid-template-columns: 1fr; }
  .cert-dates { grid-template-columns: 1fr; }
  .cert-dates div + div { border-left: 0; border-top: 1px solid var(--line); }
  .cert-foot { flex-direction: column; align-items: flex-start; }
  .cert-draft { font-size: 64px; }
  .cert-table th:nth-child(3), .cert-table td:nth-child(3) { display: none; }

  .mail-meta { grid-template-columns: 1fr; padding: 4px 16px 10px; }
  .mail-preview { padding: 14px; margin: 8px 16px 16px; }
  .email-head, .email-body, .email-foot { padding-left: 20px; padding-right: 20px; }

  .set-section { padding: 18px 16px; }
  .set-row { grid-template-columns: 1fr; gap: 8px; }
  .set-foot { padding: 14px 16px; }
  .addr-compare { grid-template-columns: 1fr; }
  .addr-arrow { transform: rotate(90deg); justify-self: center; }
  .import-report { grid-template-columns: 1fr 1fr 1fr; }
  .import-report strong { font-size: 20px; }

  .modal-back { padding: 12px; }
  .modal { border-radius: 18px; margin: auto 0 0; }
  .modal-head, .modal-body, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .modal-foot .btn { flex: 1; }
  .lb-bar { flex-wrap: wrap; padding: 12px; gap: 6px; }
  .lb-bar .grow { flex-basis: 100%; }
  .lb-bar .grow span { white-space: normal; overflow-wrap: anywhere; }
  .toasts { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
}
