:root {
  --brand-primary: #6842d8;
  --brand-primary-hover: #5634bb;
  --brand-primary-dark: #40268f;
  --brand-primary-soft: #eee9ff;
  --brand-berry: #f04d8b;
  --brand-mango: #ffb629;
  --brand-lime: #82c94b;
  --brand-sky: #35b7d8;
  --surface-page: #f8f7fc;
  --surface-card: #ffffff;
  --surface-soft: #f1eff7;
  --border-default: #e5e1ed;
  --text-primary: #241c32;
  --text-secondary: #716a7c;
  --text-muted: #9c96a5;
  --success: #2f9d62;
  --warning: #d98912;
  --danger: #d9474e;
  --shadow-card: 0 8px 28px rgba(48, 32, 80, 0.08);
  color: var(--text-primary);
  font-family: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface-page); min-width: 320px; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(104, 66, 216, 0.22);
  outline-offset: 2px;
}
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 28px 20px; background: #fff;
  border-right: 1px solid var(--border-default); display: flex; flex-direction: column;
}
.brand { color: var(--text-primary); text-decoration: none; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.7px; }
.brand > span:last-child span { color: var(--brand-primary); }
.brand-mark { position: relative; width: 34px; height: 34px; display: inline-block; }
.brand-mark i { position: absolute; border-radius: 50%; display: block; }
.brand-mark i:nth-child(1) { width: 24px; height: 24px; left: 0; top: 7px; background: var(--brand-primary); }
.brand-mark i:nth-child(2) { width: 13px; height: 13px; right: 0; top: 0; background: var(--brand-berry); }
.brand-mark i:nth-child(3) { width: 9px; height: 9px; right: 1px; bottom: 0; background: var(--brand-mango); }
.main-nav { display: grid; gap: 6px; margin-top: 44px; }
.nav-item { color: var(--text-secondary); text-decoration: none; min-height: 46px; padding: 0 12px; border-radius: 13px; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 650; }
.nav-item:hover { background: var(--surface-page); color: var(--text-primary); }
.nav-item.active { color: var(--brand-primary-dark); background: var(--brand-primary-soft); }
.nav-item.muted { cursor: default; }
.nav-icon { width: 20px; font-size: 20px; text-align: center; font-weight: 500; }
.barcode-icon { height: 17px; background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 4px, currentColor 4px 5px, transparent 5px 8px); }
.soon { margin-left: auto; text-transform: uppercase; font-size: 9px; color: var(--text-muted); letter-spacing: .5px; }
.sidebar-account { margin-top: auto; padding: 12px; border-radius: 16px; background: var(--surface-page); display: grid; grid-template-columns: 34px 1fr 30px; align-items: center; gap: 9px; }
.account-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand-primary), var(--brand-berry)); font-size: 13px; font-weight: 800; }
.sidebar-account div { min-width: 0; display: grid; gap: 1px; }
.sidebar-account strong { overflow: hidden; text-overflow: ellipsis; font-size: 12px; text-transform: capitalize; }
.sidebar-account small { color: var(--text-muted); font-size: 9px; }
.sidebar-account button { width: 30px; height: 30px; border: 0; border-radius: 9px; color: var(--text-secondary); background: transparent; font-size: 17px; }
.sidebar-account button:hover { color: var(--brand-primary); background: #fff; }

main { min-width: 0; padding: 30px clamp(22px, 4vw, 58px) 24px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 5px; color: var(--brand-primary); font-size: 11px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(27px, 3vw, 36px); line-height: 1.15; letter-spacing: -1.2px; }
h2 { margin-bottom: 0; font-size: 19px; line-height: 1.3; letter-spacing: -.4px; }
.page-description { margin: 7px 0 0; color: var(--text-secondary); font-size: 12px; }
.sync-badge { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.sync-badge span { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(47, 157, 98, .12); }

.intro-grid { display: grid; grid-template-columns: 1.55fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.metric-card { position: relative; overflow: hidden; min-height: 126px; padding: 22px; border-radius: 20px; background: #fff; border: 1px solid rgba(229, 225, 237, .8); box-shadow: 0 5px 20px rgba(48,32,80,.04); display: flex; flex-direction: column; justify-content: space-between; }
.metric-card strong { display: block; font-size: 34px; line-height: 1; margin-top: 11px; font-variant-numeric: tabular-nums; }
.metric-card .metric-text { font-size: 25px; }
.metric-label { color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.metric-card small { color: var(--text-muted); font-size: 11px; }
.metric-primary { color: #fff; border: none; background: linear-gradient(135deg, var(--brand-primary-dark), var(--brand-primary)); }
.metric-primary .metric-label { color: rgba(255,255,255,.72); }
.metric-primary small { color: rgba(255,255,255,.65); }
.metric-dot { position: absolute; top: 20px; right: 20px; width: 9px; height: 9px; border-radius: 50%; }
.metric-dot.berry { background: var(--brand-berry); box-shadow: 0 0 0 5px rgba(240,77,139,.11); }
.metric-dot.mango { background: var(--brand-mango); box-shadow: 0 0 0 5px rgba(255,182,41,.14); }
.metric-dot.lime { background: var(--brand-lime); box-shadow: 0 0 0 5px rgba(130,201,75,.14); }
.metric-orbit i { position: absolute; border-radius: 50%; background: rgba(255,255,255,.13); }
.metric-orbit i:nth-child(1) { width: 118px; height: 118px; right: -20px; top: -31px; }
.metric-orbit i:nth-child(2) { width: 42px; height: 42px; right: 99px; bottom: -14px; background: rgba(240,77,139,.6); }
.metric-orbit i:nth-child(3) { width: 25px; height: 25px; right: 22px; bottom: 13px; background: rgba(255,182,41,.9); }

.workspace-grid { display: grid; grid-template-columns: minmax(440px, 1.1fr) minmax(370px, .9fr); gap: 20px; align-items: stretch; }
.panel { background: var(--surface-card); border: 1px solid rgba(229,225,237,.85); border-radius: 22px; box-shadow: var(--shadow-card); }
.form-panel, .preview-panel { padding: 24px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.panel-heading > div:first-child { display: flex; align-items: center; gap: 11px; }
.step { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-primary-soft); color: var(--brand-primary); font-size: 10px; font-weight: 800; }
.step.berry { color: #b82965; background: #fde9f1; }
.text-button { padding: 5px; background: none; border: 0; color: var(--brand-primary); font-size: 12px; font-weight: 700; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { display: grid; gap: 7px; }
.field-wide { margin-bottom: 16px; }
.field > span { color: var(--text-secondary); font-size: 11px; font-weight: 700; }
.field b { color: var(--brand-primary); font-size: 9px; margin-left: 4px; }
input, select { width: 100%; height: 45px; padding: 0 12px; color: var(--text-primary); background: #fff; border: 1px solid var(--border-default); border-radius: 12px; font-size: 13px; font-weight: 600; }
input:hover, select:hover { border-color: #c9c1da; }
input:focus, select:focus { border-color: var(--brand-primary); outline: none; box-shadow: 0 0 0 3px rgba(104,66,216,.12); }
.code-structure { display: grid; grid-template-columns: .65fr 1fr .65fr repeat(4, 1fr); gap: 5px; margin: 22px 0 18px; }
.code-structure div { min-width: 0; text-align: center; padding: 9px 3px 7px; background: var(--surface-page); border-radius: 9px; border: 1px solid transparent; }
.code-structure div:nth-child(1) { color: #fff; background: var(--brand-primary); }
.code-structure span { display: block; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.code-structure small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.code-structure div:nth-child(1) small { color: rgba(255,255,255,.7); }
.primary-button, .secondary-button, .icon-button { border-radius: 12px; border: 0; min-height: 43px; padding: 0 17px; font-size: 12px; font-weight: 750; }
.primary-button { color: #fff; background: var(--brand-primary); }
.primary-button:hover { background: var(--brand-primary-hover); }
.primary-button:disabled { cursor: not-allowed; opacity: .5; }
.form-panel form > .primary-button { width: 100%; }
.secondary-button, .icon-button { color: var(--brand-primary-dark); background: #fff; border: 1px solid #d8d0f0; }
.secondary-button:hover, .icon-button:hover { background: var(--brand-primary-soft); }

.status-badge { border-radius: 999px; padding: 7px 10px; color: var(--text-secondary); background: var(--surface-soft); font-size: 10px; font-weight: 750; }
.status-badge.valid { color: var(--success); background: #eaf7f0; }
.status-badge.warning { color: #9e6307; background: #fff4de; }
.empty-preview { min-height: 330px; border-radius: 17px; background: var(--surface-page); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 30px; }
.empty-preview strong { font-size: 14px; }
.empty-preview p { max-width: 320px; margin: 8px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.empty-balls { position: relative; width: 73px; height: 54px; margin-bottom: 17px; }
.empty-balls i { position: absolute; border-radius: 50%; }
.empty-balls i:nth-child(1) { width: 45px; height: 45px; left: 2px; top: 7px; background: var(--brand-primary-soft); }
.empty-balls i:nth-child(2) { width: 29px; height: 29px; right: 0; top: 0; background: #fde9f1; }
.empty-balls i:nth-child(3) { width: 18px; height: 18px; right: 8px; bottom: 0; background: #fff0cc; }
.preview-result { display: grid; gap: 14px; }
.barcode-preview { min-height: 196px; display: grid; place-items: center; padding: 16px; border: 1px solid var(--border-default); border-radius: 16px; background: #fff; overflow: hidden; }
.barcode-preview img { display: block; width: min(100%, 460px); height: auto; }
.barcode-number-label { font-size: 17px; font-weight: 750; letter-spacing: 3px; font-variant-numeric: tabular-nums; }
.number-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; background: var(--surface-page); border-radius: 13px; }
.number-row span { display: block; color: var(--text-secondary); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.number-row strong { display: block; margin-top: 3px; font-size: clamp(17px, 2vw, 22px); letter-spacing: 1.8px; font-variant-numeric: tabular-nums; }
.icon-button { min-height: 35px; padding: 0 11px; font-size: 10px; }
.duplicate-warning { margin: 0; padding: 10px 12px; border-radius: 11px; color: #905c0d; background: #fff4de; font-size: 11px; line-height: 1.5; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; }
.action-row .primary-button { flex: 1 1 170px; }

.registry-panel { margin-top: 20px; overflow: hidden; }
.registry-heading { padding: 23px 24px 18px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.registry-actions { display: flex; gap: 9px; }
.search-field { min-width: 230px; }
.registry-filters { padding: 0 24px 18px; display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.registry-filters label { min-width: 150px; display: grid; gap: 5px; }
.registry-filters label > span { color: var(--text-secondary); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .35px; }
.registry-filters select { height: 38px; font-size: 11px; }
.registry-filters .text-button { min-height: 38px; padding: 0 10px; }
.filter-count { margin-left: auto; min-height: 38px; display: flex; align-items: center; color: var(--text-muted); font-size: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { height: 42px; padding: 0 15px; color: var(--text-secondary); background: var(--surface-page); text-align: left; font-size: 9px; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; }
td { height: 54px; padding: 8px 15px; border-top: 1px solid #efecf3; vertical-align: middle; }
td:first-child { min-width: 230px; font-weight: 700; }
.table-code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 11px; letter-spacing: .45px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.parameter-chips { min-width: 220px; display: flex; gap: 4px; flex-wrap: wrap; }
.parameter-chips span { padding: 4px 6px; border-radius: 6px; color: var(--text-secondary); background: var(--surface-soft); font-size: 9px; white-space: nowrap; }
.source-badge { display: inline-block; border-radius: 999px; padding: 5px 8px; color: var(--brand-primary-dark); background: var(--brand-primary-soft); font-size: 9px; font-weight: 700; white-space: nowrap; }
.source-badge.local { color: #227448; background: #eaf7f0; }
.image-state { display: inline-flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 9px; white-space: nowrap; }
.image-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #c5bfcd; }
.image-state.saved { color: var(--success); }
.image-state.saved::before { background: var(--success); }
.table-actions { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.info-button, .delete-button { padding: 5px 0; background: none; border: 0; font-size: 10px; font-weight: 750; }
.info-button { color: var(--brand-primary); }
.delete-button { color: var(--danger); background: none; border: 0; font-size: 10px; font-weight: 700; }
.registry-empty { padding: 36px; text-align: center; color: var(--text-secondary); font-size: 12px; }
footer { padding: 20px 3px 0; display: flex; justify-content: space-between; gap: 18px; color: var(--text-muted); font-size: 9px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: 330px; padding: 13px 16px; border-radius: 12px; color: #fff; background: var(--text-primary); box-shadow: 0 14px 38px rgba(36,28,50,.22); font-size: 12px; font-weight: 650; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }

.dashboard-kpis { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 15px; margin-bottom: 20px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dashboard-panel { padding: 24px; }
.text-link { color: var(--brand-primary); text-decoration: none; font-size: 11px; font-weight: 750; }
.category-overview { display: grid; gap: 14px; }
.category-row > div:first-child { margin-bottom: 6px; display: flex; justify-content: space-between; gap: 15px; font-size: 11px; }
.category-row strong { font-variant-numeric: tabular-nums; }
.category-track { height: 7px; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
.category-track i { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, var(--brand-primary), var(--brand-berry)); }
.recent-records { display: grid; }
.recent-records > button { width: 100%; min-height: 58px; padding: 9px 0; display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 11px; text-align: left; border: 0; border-top: 1px solid #efecf3; background: transparent; }
.recent-records > button:first-child { border-top: 0; }
.recent-records > button:hover strong { color: var(--brand-primary); }
.recent-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-primary); }
.recent-records button > span:nth-child(2) { display: grid; gap: 3px; }
.recent-records strong { font-size: 11px; }
.recent-records small { color: var(--text-muted); font-size: 9px; letter-spacing: .6px; }
.recent-source { padding: 4px 7px; border-radius: 999px; color: var(--text-secondary); background: var(--surface-page); font-size: 8px; }
.coming-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.coming-card { min-height: 108px; padding: 18px; display: grid; align-content: space-between; border: 1px dashed #d8d0e5; border-radius: 18px; background: rgba(255,255,255,.55); }
.coming-card span, .coming-card small { color: var(--text-muted); font-size: 9px; }
.coming-card strong { font-size: 19px; color: var(--text-secondary); }

.app-dialog { width: min(620px, calc(100vw - 30px)); max-height: calc(100vh - 40px); padding: 28px; overflow-y: auto; border: 0; border-radius: 22px; color: var(--text-primary); background: #fff; box-shadow: 0 24px 80px rgba(36,28,50,.28); }
.app-dialog::backdrop { background: rgba(36,28,50,.48); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 10px; color: var(--text-secondary); background: var(--surface-page); font-size: 20px; }
.dialog-heading { padding-right: 35px; }
.dialog-barcode { margin: 20px 0; padding: 20px; display: grid; place-items: center; gap: 10px; border: 1px solid var(--border-default); border-radius: 16px; }
.dialog-barcode img { width: min(100%, 440px); }
.dialog-barcode strong { letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.record-details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.record-details div { margin: 0; padding: 11px 12px; border-radius: 11px; background: var(--surface-page); }
.record-details dt { margin-bottom: 3px; color: var(--text-muted); font-size: 8px; text-transform: uppercase; }
.record-details dd { margin: 0; font-size: 11px; font-weight: 700; }
.dialog-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 9px; }
.link-button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.confirm-dialog { width: min(420px, calc(100vw - 30px)); text-align: center; }
.confirm-dialog form { display: grid; justify-items: center; }
.confirm-dialog p { color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.danger-icon { width: 45px; height: 45px; margin-bottom: 14px; display: grid; place-items: center; border-radius: 50%; color: var(--danger); background: #fdecee; font-weight: 800; }
.danger-button { min-height: 43px; padding: 0 17px; border: 0; border-radius: 12px; color: #fff; background: var(--danger); font-size: 12px; font-weight: 750; }

.login-body { min-height: 100vh; background: #fff; }
.login-layout { width: 100%; min-height: 100vh; padding: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); }
.login-brand { position: relative; overflow: hidden; padding: clamp(34px, 6vw, 78px); display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: linear-gradient(145deg, var(--brand-primary-dark), var(--brand-primary)); }
.login-logo { color: #fff; }
.login-logo > span:last-child span { color: #ffca61; }
.login-brand > div:not(.login-orbit) { position: relative; z-index: 1; max-width: 610px; }
.login-brand .eyebrow { color: #ffca61; }
.login-brand h1 { font-size: clamp(38px, 5vw, 66px); line-height: 1.04; letter-spacing: -2.5px; }
.login-brand p:last-child { max-width: 480px; margin-top: 20px; color: rgba(255,255,255,.72); font-size: 15px; line-height: 1.7; }
.login-orbit i { position: absolute; display: block; border-radius: 50%; background: rgba(255,255,255,.1); }
.login-orbit i:nth-child(1) { width: 360px; height: 360px; right: -95px; top: -100px; }
.login-orbit i:nth-child(2) { width: 150px; height: 150px; right: 22%; bottom: -55px; background: rgba(240,77,139,.55); }
.login-orbit i:nth-child(3) { width: 76px; height: 76px; right: 11%; bottom: 17%; background: rgba(255,182,41,.8); }
.login-orbit i:nth-child(4) { width: 40px; height: 40px; left: 15%; top: 24%; background: rgba(53,183,216,.6); }
.login-card { width: min(430px, calc(100% - 40px)); margin: auto; padding: 34px; border: 1px solid var(--border-default); border-radius: 24px; box-shadow: var(--shadow-card); }
.login-card > div:first-child { margin-bottom: 26px; }
.login-card h2 { margin-top: 13px; font-size: 27px; }
.login-card > div p { margin: 8px 0 0; color: var(--text-secondary); font-size: 12px; }
.login-card form { display: grid; gap: 16px; }
.login-card .primary-button { width: 100%; margin-top: 4px; }
.login-card > small { display: block; margin-top: 18px; color: var(--text-muted); font-size: 9px; text-align: center; }
.login-error { margin: 0; padding: 10px 12px; border-radius: 10px; color: var(--danger); background: #fdecee; font-size: 11px; }

@media (max-width: 1040px) {
  .app-shell { grid-template-columns: 86px minmax(0, 1fr); }
  .sidebar { padding: 26px 13px; align-items: center; }
  .brand > span:last-child, .nav-item > span:not(.nav-icon), .sidebar-account div, .sidebar-account button { display: none; }
  .nav-item { width: 52px; justify-content: center; padding: 0; }
  .sidebar-account { padding: 9px; display: block; }
  .workspace-grid { grid-template-columns: 1fr; }
  .dashboard-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 14px 18px; flex-direction: row; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--border-default); }
  .brand > span:last-child { display: inline; }
  .main-nav { margin: 0; display: flex; }
  .nav-item { display: none; }
  .nav-item[data-page-link] { display: flex; width: 45px; }
  .sidebar-account { margin: 0; }
  main { padding: 22px 15px; }
  .topbar { align-items: flex-start; }
  .sync-badge { display: none; }
  .intro-grid { grid-template-columns: 1fr 1fr; }
  .metric-primary { grid-column: 1 / -1; }
  .workspace-grid { display: block; }
  .preview-panel { margin-top: 16px; }
  .field-grid { grid-template-columns: 1fr; }
  .code-structure { gap: 3px; }
  .code-structure span { font-size: 12px; }
  .registry-heading { align-items: stretch; flex-direction: column; }
  .registry-actions { flex-direction: column; }
  .search-field { min-width: 0; }
  .registry-filters { align-items: stretch; }
  .registry-filters label { min-width: 100%; }
  .filter-count { margin-left: 0; }
  .dashboard-kpis, .dashboard-grid, .coming-grid { grid-template-columns: 1fr; }
  .record-details { grid-template-columns: 1fr; }
  .login-layout { display: block; padding: 22px 0; background: var(--surface-page); }
  .login-brand { min-height: 190px; margin: 0 15px; padding: 24px; border-radius: 24px; }
  .login-brand h1 { font-size: 29px; letter-spacing: -1px; }
  .login-brand p:last-child { display: none; }
  .login-card { margin: 18px auto 0; padding: 25px; }
  footer { flex-direction: column; }
}
/* Client registry */
.prospects-panel { padding:24px; }
.prospects-summary { display:block; padding:24px; margin:24px 0; color:#6439a5; text-decoration:none; font-weight:700; }
.prospects-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:20px 0; align-items:end; }
.prospects-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:20px 0; flex-wrap:wrap; }
.prospects-table-wrap { overflow:auto; }
.prospects-table { width:100%; border-collapse:collapse; min-width:700px; font-size:13px; }
.prospects-table td,.prospects-table th { text-align:left; padding:16px 12px; border-bottom:1px solid #ece6f3; }
.prospects-table td { vertical-align:top; max-width:350px; overflow-wrap:anywhere; }
.prospects-table small { display:block; color:#80758d; margin-top:6px; }
.prospect-group { background:#f5effc; color:#603994; }
.prospect-status { background:#eee5fa; border-radius:20px; padding:5px 10px; display:inline-block; }
#prospects-map { height:480px; border-radius:16px; z-index:0; }
.leaflet-marker-icon.prospect-marker { background:var(--brand-primary); color:white; border:3px solid white; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; box-shadow:0 2px 8px #55336b40; }
.prospect-details a { color:var(--brand-primary); }
.prospect-map-popup { max-height:220px; overflow:auto; }
.prospect-map-popup button { display:block; border:0; background:white; color:#6439a5; padding:8px; cursor:pointer; }
#prospect-dialog { width:min(820px,calc(100% - 24px)); }
#prospect-detail h2 { padding-right:30px; }
.prospect-details { display:grid; grid-template-columns:1fr 1fr; gap:8px 24px; overflow-wrap:anywhere; }
#prospect-detail .prospects-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
#prospect-detail textarea { width:100%; border:1px solid #ded5e8; border-radius:12px; padding:12px; font:inherit; resize:vertical; }
#prospect-detail details { margin:20px 0; }
#prospect-detail pre { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; }
.prospect-muted,#prospects-message { color:#80758d; font-size:13px; }
#prospect-save-message { color:#ae315c; }
@media(max-width:900px){.prospects-filters {grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){.prospects-filters,#prospect-detail .prospects-filters,.prospect-details{grid-template-columns:1fr;}.prospects-panel{padding:16px;}#prospects-map{height:360px;}}
