:root {
  color-scheme: dark;
  --bg: #120d18;
  --panel: #1b1421;
  --panel-soft: #21182a;
  --panel-hover: #282031;
  --line: rgba(255,255,255,.075);
  --line-gold: rgba(220,181,108,.28);
  --ink: #f3eff6;
  --muted: #9e94a6;
  --soft: #706779;
  --gold: #dfbb77;
  --gold-light: #f0d49e;
  --green: #9cc68f;
  --red: #e69393;
  --sans: "DM Sans", sans-serif;
  --display: "Manrope", sans-serif;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); }
button,input,select,textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.vault-screen { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background: radial-gradient(ellipse at 50% 22%, rgba(105,73,104,.24), transparent 39%), radial-gradient(ellipse at 100% 100%, rgba(118,80,44,.08), transparent 38%), var(--bg); }
.vault-card { width: min(100%, 452px); border: 1px solid var(--line); background: rgba(27,20,33,.95); padding: 33px 35px 23px; box-shadow: 0 30px 100px rgba(0,0,0,.3); }
.vault-brand,.sidebar-brand { display: flex; align-items: center; gap: 12px; }
.vault-brand span,.sidebar-brand span { display: flex; flex-direction: column; gap: 4px; letter-spacing: .17em; }
.vault-brand strong,.sidebar-brand strong { font: 700 11px var(--display); }
.vault-brand small,.sidebar-brand small { font: 500 8px var(--sans); color: var(--gold); letter-spacing: .38em; }
.vault-brand img,.sidebar-brand img { filter: drop-shadow(0 4px 11px rgba(220,181,108,.17)); }
.vault-rule { height: 1px; background: var(--line); margin: 25px 0 29px; }
.vault-kicker,.page-kicker,.panel-kicker { color: var(--gold); font: 600 9px var(--display); letter-spacing: .18em; }
.vault-panel h1 { font: 500 clamp(37px, 8vw, 45px)/1.02 var(--display); letter-spacing: -.055em; margin: 17px 0 13px; }
.vault-panel h1 em { color: var(--gold-light); font-family: Georgia, serif; font-weight: 400; }
.vault-panel > p { color: #a79cac; font-size: 12px; line-height: 1.75; margin: 0 0 22px; }
.vault-form { display: flex; flex-direction: column; gap: 9px; }
.vault-form label,.modal-form label { color: #cfc7d2; font: 600 10px var(--display); letter-spacing: .025em; }
.vault-form label span { float: right; color: var(--soft); font: 400 9px var(--sans); }
.vault-form input,.modal-form input,.modal-form select,.modal-form textarea { width: 100%; border: 1px solid rgba(255,255,255,.11); background: #16111b; color: var(--ink); outline: none; padding: 12px 13px; border-radius: 0; margin: 0 0 9px; font: 400 12px var(--sans); transition: border .15s; }
.vault-form input:focus,.modal-form input:focus,.modal-form select:focus,.modal-form textarea:focus { border-color: rgba(220,181,108,.65); }
.vault-form input::placeholder,.modal-form input::placeholder,.modal-form textarea::placeholder { color: #665c6f; }
.crm-button { min-height: 41px; padding: 0 15px; display: inline-flex; justify-content: center; align-items: center; gap: 12px; border: 1px solid transparent; font: 600 10px var(--display); letter-spacing: .025em; transition: .18s ease; white-space: nowrap; }
.crm-button span { font-size: 14px; font-weight: 400; }
.crm-button:hover { transform: translateY(-1px); }
.crm-button-gold { background: linear-gradient(110deg,#f0d49e,#d8b16a); color: #241a2a; }
.crm-button-gold:hover { background: #f4ddb0; }
.crm-button-outline { border-color: rgba(220,181,108,.4); color: var(--gold-light); background: transparent; }
.crm-button-outline:hover { background: rgba(220,181,108,.09); }
.vault-form .crm-button { margin-top: 4px; min-height: 47px; }
.vault-note { font-size: 9px !important; color: #817689 !important; line-height: 1.7 !important; margin: 8px 0 0 !important; }
.vault-text-button { margin-top: 16px; background: none; border: 0; padding: 5px 0; color: var(--gold-light); font-size: 10px; text-decoration: underline; text-decoration-color: rgba(220,181,108,.35); text-underline-offset: 4px; }
.vault-error { min-height: 20px; color: var(--red); font-size: 10px; padding-top: 10px; }
.vault-foot { border-top: 1px solid var(--line); margin-top: 17px; padding-top: 16px; display: flex; align-items: center; gap: 7px; color: #7e7488; font-size: 9px; }
.vault-foot a { color: #bbb0c1; }
.lock-mark { color: var(--gold); font-size: 15px; }
.vault-separator { color: #51495a; }

.crm-app { min-height: 100vh; display: flex; }
.sidebar { width: 236px; flex: 0 0 236px; display: flex; flex-direction: column; padding: 24px 15px 16px; background: #17111e; border-right: 1px solid var(--line); min-height: 100vh; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { padding: 0 9px 29px; border-bottom: 1px solid var(--line); }
.sidebar-label { color: #6d6377; font: 600 8px var(--display); letter-spacing: .17em; padding: 26px 11px 10px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid transparent; background: transparent; color: #a49aaa; text-align: left; font-size: 11px; transition: .15s ease; }
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,.035); }
.nav-item.is-active { color: var(--gold-light); border-color: rgba(220,181,108,.12); background: rgba(220,181,108,.075); }
.nav-icon { width: 16px; text-align: center; color: var(--gold); font-size: 15px; }
.nav-count { margin-left: auto; font-size: 9px; color: #8e8498; background: rgba(255,255,255,.06); padding: 3px 7px; border-radius: 10px; }
.sidebar-bottom { margin-top: auto; }
.device-note { padding: 12px 10px; background: rgba(255,255,255,.025); border: 1px solid var(--line); display: flex; gap: 9px; align-items: flex-start; }
.device-dot { width: 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px rgba(156,198,143,.5); }
.device-note span:last-child { display: flex; flex-direction: column; gap: 4px; }
.device-note strong { color: #cdc4d1; font: 500 9px var(--display); }
.device-note small { color: #716879; font-size: 8px; }
.sidebar-site-link,.sidebar-lock { width: 100%; display: flex; align-items: center; gap: 9px; padding: 14px 10px; border: 0; background: none; color: #a99fb0; font: 500 10px var(--sans); text-align: left; }
.sidebar-site-link { margin-top: 10px; border-bottom: 1px solid var(--line); }
.sidebar-lock:hover,.sidebar-site-link:hover { color: var(--gold-light); }
.sidebar-lock span { color: var(--gold); font-size: 15px; }
.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 69px; flex: 0 0 69px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px,4vw,52px); background: rgba(18,13,24,.78); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #73697c; font: 500 9px var(--display); letter-spacing: .06em; }
.breadcrumb b { color: #514959; font-weight: 400; }
.breadcrumb strong { color: #c9c0ce; font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.icon-button { width: 33px; height: 33px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--gold-light); font-size: 16px; }
.icon-button:hover { background: rgba(220,181,108,.08); }
.admin-chip { display: flex; align-items: center; gap: 9px; }
.admin-avatar { width: 30px; height: 30px; border-radius: 50%; background: #35273c; color: var(--gold-light); display: grid; place-items: center; font: 600 11px var(--display); border: 1px solid var(--line-gold); }
.admin-chip span:last-child { display: flex; flex-direction: column; gap: 2px; }
.admin-chip strong { color: #d8d0de; font: 500 9px var(--display); }
.admin-chip small { color: #786e81; font-size: 8px; }
.mobile-menu { display: none; }
.crm-main { width: min(1280px,100%); margin: 0 auto; padding: 37px clamp(22px,4vw,52px) 44px; flex: 1; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { font: 500 clamp(32px,4vw,43px)/1.1 var(--display); letter-spacing: -.055em; margin: 8px 0 5px; }
.heading-period { color: var(--gold); }
.page-subtitle { color: #958b9c; font-size: 11px; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.stat-card { position: relative; min-height: 133px; overflow: hidden; padding: 18px 20px; background: linear-gradient(135deg,#211827,#1a1420); border: 1px solid var(--line); }
.stat-card:first-child { border-top-color: rgba(220,181,108,.43); }
.stat-label { color: #8a7f91; font: 600 8px var(--display); letter-spacing: .13em; }
.stat-value { font: 500 34px/1 var(--display); letter-spacing: -.05em; margin: 16px 0 9px; }
.stat-foot { display: flex; align-items: center; gap: 6px; color: #817789; font-size: 9px; }
.stat-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.stat-ornament { position: absolute; right: 16px; top: 12px; color: rgba(220,181,108,.1); font-size: 52px; line-height: 1; }
.content-grid { display: grid; grid-template-columns: 1.14fr .86fr; gap: 14px; }
.panel { border: 1px solid var(--line); background: var(--panel); }
.recent-panel,.quick-panel { min-height: 258px; padding: 20px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.panel-heading h2 { color: #f0ebf3; font: 500 17px var(--display); letter-spacing: -.035em; margin: 6px 0 0; }
.subtle-link { border: 0; background: none; padding: 5px 0; color: #a79cae; font-size: 9px; }
.subtle-link span { color: var(--gold); padding-left: 7px; }
.recent-list { margin-top: 18px; }
.recent-row { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 46px; border: 0; border-top: 1px solid rgba(255,255,255,.045); background: transparent; text-align: left; }
.recent-row:hover { background: rgba(255,255,255,.025); }
.empty-mini { min-height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; color: #8a8092; }
.empty-mini > span { color: var(--gold); font-size: 19px; }
.empty-mini strong { color: #cfc5d5; font: 500 10px var(--display); }
.empty-mini small { max-width: 280px; color: #817789; font-size: 8px; line-height: 1.65; }
.visit-empty { min-height: 180px; }
.no-results { height: 125px !important; text-align: center; color: #94899d !important; }
.quiet-dash { color: #736a7b; }
.detail-phone { color: #ded2e3; font: 500 10px var(--sans); }
.detail-phone:hover { color: var(--gold-light); }
.client-avatar { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 29px; border-radius: 50%; background: #34283c; border: 1px solid rgba(220,181,108,.19); color: var(--gold-light); font: 500 10px var(--display); text-transform: uppercase; }
.recent-details { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.recent-details strong { color: #e8e1eb; font: 500 10px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-details small { color: #817689; font-size: 8px; }
.recent-date { color: #807587; font-size: 8px; }
.quick-panel { padding-bottom: 13px; }
.quick-action { width: 100%; min-height: 47px; padding: 8px 0; display: flex; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid rgba(255,255,255,.05); background: transparent; text-align: left; }
.quick-action:hover .quick-icon { background: rgba(220,181,108,.17); }
.quick-icon { width: 29px; height: 29px; flex: 0 0 29px; display: grid; place-items: center; border: 1px solid rgba(220,181,108,.2); color: var(--gold); font-size: 15px; transition: .18s; }
.quick-action > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.quick-action strong { color: #d9d1de; font: 500 9px var(--display); }
.quick-action small { color: #7d7386; font-size: 8px; }
.quick-action b { color: #786f80; font-weight: 400; }
.privacy-tip { display: flex; gap: 9px; padding: 13px 10px 3px; }
.tip-icon { color: var(--gold); }
.privacy-tip span:last-child { display: flex; flex-direction: column; gap: 4px; }
.privacy-tip strong { color: #bfb5c7; font: 500 8px var(--display); }
.privacy-tip small { color: #776e7e; font-size: 8px; line-height: 1.6; }
.import-strip { display: flex; align-items: center; gap: 14px; padding: 17px 20px; margin-top: 14px; border: 1px solid rgba(220,181,108,.18); background: linear-gradient(100deg,rgba(220,181,108,.065),rgba(220,181,108,.015)); }
.import-mark { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border: 1px solid rgba(220,181,108,.27); color: var(--gold); font-size: 16px; }
.import-strip > div:nth-child(2) { flex: 1; }
.import-strip strong { color: #ddd4e2; font: 500 10px var(--display); }
.import-strip p { margin: 5px 0 0; color: #8b8193; font-size: 8px; }
.import-strip p a { color: var(--gold-light); text-decoration: underline; text-decoration-color: rgba(220,181,108,.35); text-underline-offset: 3px; }
.import-strip p a:hover { color: #fff0c7; }
.table-total { color: #847a8c; font-size: 9px; padding-top: 4px; }
.client-table-panel { overflow: hidden; }
.table-toolbar { padding: 17px 19px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.toolbar-filters { display: flex; align-items: center; justify-content: flex-end; gap: 9px; min-width: min(100%, 470px); }
.filter-select { min-height: 34px; max-width: 180px; padding: 0 10px; border: 1px solid var(--line); background: #17111d; color: #cfc5d7; font-size: 9px; outline: none; }
.filter-select:focus { border-color: rgba(220,181,108,.65); }
.toolbar-filters .search-box { width: min(270px,52%); }
.table-title { display: flex; flex-direction: column; gap: 5px; }
.table-title strong { color: #e2dbe7; font: 500 11px var(--display); }
.table-title span { color: #827889; font-size: 8px; }
.search-box { height: 34px; width: min(290px,45%); display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #17111d; padding: 0 9px; color: #8e8496; }
.search-box > span { font-size: 18px; line-height: 1; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 9px; }
.search-box input::placeholder { color: #746a7d; }
.search-box kbd { border: 1px solid rgba(255,255,255,.1); padding: 2px 5px; font: 8px var(--sans); color: #736a7c; }
.table-scroll { overflow-x: auto; }
.client-table { width: 100%; border-collapse: collapse; min-width: 730px; }
.client-table th { height: 39px; padding: 0 13px; text-align: left; border-bottom: 1px solid var(--line); color: #7c7285; font: 600 8px var(--display); letter-spacing: .1em; white-space: nowrap; }
.client-table th:first-child,.client-table td:first-child { padding-left: 19px; }
.client-table td { height: 53px; border-bottom: 1px solid rgba(255,255,255,.04); padding: 0 13px; color: #b7aebe; font-size: 9px; white-space: nowrap; }
.client-table tbody tr:hover { background: rgba(255,255,255,.02); }
.client-table tbody tr:last-child td { border-bottom: 0; }
.client-name-cell { display: flex; align-items: center; gap: 9px; }
.table-person { display: flex; flex-direction: column; gap: 3px; }
.table-person strong { color: #e6dfe9; font: 500 9px var(--display); }
.table-person small { color: #817788; font-size: 8px; }
.number-cell { color: var(--gold-light) !important; font-variant-numeric: tabular-nums; }
.visit-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 23px; padding: 4px 7px; background: rgba(220,181,108,.09); color: #d9bb85; font-size: 8px; }
.row-open { border: 0; background: transparent; color: #8c8294; font-size: 16px; }
.row-open:hover { color: var(--gold-light); }
.empty-state { text-align: center; padding: 42px 18px 47px; }
.empty-art { width: 75px; height: 75px; border: 1px solid rgba(220,181,108,.2); background: radial-gradient(circle,rgba(220,181,108,.1),transparent 68%); border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; position: relative; }
.empty-art span { color: var(--gold-light); font-size: 25px; }
.empty-art i { position: absolute; right: -3px; top: 12px; width: 8px; height: 8px; border: 1px solid var(--gold); background: var(--panel); border-radius: 50%; }
.empty-state h3 { margin: 0 0 7px; color: #e9e1ed; font: 500 17px var(--display); letter-spacing: -.03em; }
.empty-state p { max-width: 375px; margin: 0 auto 19px; color: #92889a; font-size: 10px; line-height: 1.7; }
.empty-state > div:last-child { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.visits-panel { min-height: 220px; padding: 19px; }
.visit-list { margin-top: 15px; }
.visit-row { display: grid; grid-template-columns: 44px minmax(120px,1fr) minmax(90px,.6fr) auto; align-items: center; gap: 12px; min-height: 58px; border-top: 1px solid rgba(255,255,255,.05); }
.visit-date-box { width: 36px; height: 38px; display: flex; align-items: center; justify-content: center; flex-direction: column; background: rgba(220,181,108,.08); border: 1px solid rgba(220,181,108,.16); }
.visit-date-box strong { color: var(--gold-light); font: 600 14px var(--display); line-height: 1; }
.visit-date-box small { color: #988c9d; font-size: 7px; margin-top: 3px; text-transform: uppercase; }
.visit-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.visit-main strong { color: #e4dce8; font: 500 10px var(--display); }
.visit-main small,.visit-client-phone { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #817788; font-size: 8px; }
.visit-client-phone { text-align: right; }
.visit-row .row-open { font-size: 13px; }
.data-panel { overflow: hidden; }
.followup-list { padding: 0 19px 8px; }
.followup-row { min-height: 70px; display: grid; grid-template-columns: 42px minmax(140px,1fr) auto; align-items: center; gap: 13px; border-bottom: 1px solid rgba(255,255,255,.05); }
.followup-row:last-child { border-bottom: 0; }
.followup-date-box { width: 38px; height: 41px; display: flex; align-items: center; justify-content: center; flex-direction: column; border: 1px solid rgba(220,181,108,.2); background: rgba(220,181,108,.08); }
.followup-date-box strong { color: var(--gold-light); font: 600 14px var(--display); line-height: 1; }
.followup-date-box small { margin-top: 3px; color: #988c9d; font-size: 7px; text-transform: uppercase; }
.followup-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.followup-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.followup-title button { max-width: 100%; padding: 0; border: 0; background: transparent; color: #e8e0eb; font: 500 10px var(--display); text-align: left; }
.followup-title button:hover { color: var(--gold-light); }
.followup-main p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #817788; font-size: 8px; }
.status-pill { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.08); border-radius: 99px; padding: 4px 7px; color: #b9afc0; background: rgba(255,255,255,.035); font: 600 7px var(--display); white-space: nowrap; }
.status-pill.is-open { color: #e3c486; border-color: rgba(220,181,108,.22); background: rgba(220,181,108,.07); }
.status-pill.is-due { color: #eea5a5; border-color: rgba(230,147,147,.24); background: rgba(230,147,147,.07); }
.status-pill.is-done { color: #a8cc9a; border-color: rgba(156,198,143,.2); background: rgba(156,198,143,.06); }
.followup-actions,.sale-actions { display: flex; align-items: center; gap: 6px; }
.small-action { min-height: 29px; padding: 0 9px; border: 1px solid rgba(220,181,108,.24); background: transparent; color: #cfbd91; font: 500 8px var(--display); white-space: nowrap; }
.small-action:hover { background: rgba(220,181,108,.08); color: var(--gold-light); }
.small-action.is-done { border-color: rgba(156,198,143,.22); color: #a8cc9a; }
.sales-table { min-width: 860px; }
.loyalty-table { min-width: 680px; }
.sale-status { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 99px; font: 600 7px var(--display); white-space: nowrap; }
.sale-status.is-paid { color: #a8cc9a; background: rgba(156,198,143,.08); }
.sale-status.is-pending { color: #e3c486; background: rgba(220,181,108,.08); }
.sale-status.is-cancelled { color: #e59b9b; background: rgba(230,147,147,.08); }
.client-status { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 99px; color: #d2c6d9; background: rgba(255,255,255,.045); font: 600 7px var(--display); white-space: nowrap; }
.client-status.is-interested { color: #e3c486; background: rgba(220,181,108,.08); }
.client-status.is-active { color: #a8cc9a; background: rgba(156,198,143,.08); }
.client-status.is-inactive { color: #aea3b4; background: rgba(255,255,255,.04); }
.renewal-card { display: flex; flex-direction: column; gap: 4px; }
.renewal-card strong { color: #e0d8e4; font: 500 9px var(--display); }
.renewal-card small { color: #807687; font-size: 7px; }
.form-two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.notice { width: min(1280px,calc(100% - 44px)); margin: 12px auto 0; padding: 9px 12px; border: 1px solid rgba(220,181,108,.22); color: #dfc798; background: rgba(220,181,108,.06); font-size: 9px; }
.crm-footer { width: min(1280px,100%); margin: auto; min-height: 47px; padding: 0 clamp(22px,4vw,52px); display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #635a6c; font: 600 7px var(--display); letter-spacing: .1em; }
.crm-footer b { color: var(--gold); margin-inline: 4px; }
.crm-footer span:last-child { display: flex; gap: 6px; align-items: center; font: 400 8px var(--sans); letter-spacing: 0; }
.crm-footer i { width: 5px; height: 5px; background: var(--green); border-radius: 50%; }
.modal-backdrop { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(8,5,11,.75); backdrop-filter: blur(7px); }
.modal-card { width: min(100%, 470px); max-height: min(92vh,800px); overflow-y: auto; background: #211828; border: 1px solid rgba(220,181,108,.22); box-shadow: 0 25px 90px rgba(0,0,0,.48); padding: 23px; }
.modal-heading { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 17px; }
.modal-heading h2 { color: #f1ebf4; font: 500 19px var(--display); letter-spacing: -.035em; margin: 6px 0 0; }
.modal-close { width: 28px; height: 28px; border: 1px solid var(--line); background: transparent; color: #b6abba; font-size: 20px; line-height: 1; }
.modal-close:hover { color: var(--gold-light); border-color: var(--line-gold); }
.modal-form { display: flex; flex-direction: column; gap: 3px; }
.modal-form label { display: block; }
.modal-form input,.modal-form select,.modal-form textarea { display: block; margin-top: 7px; margin-bottom: 9px; }
.modal-form select { appearance: none; }
.modal-form textarea { resize: vertical; line-height: 1.5; }
.required { color: var(--gold); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }
.detail-modal { padding: 0; }
.detail-cover { min-height: 128px; padding: 20px; display: flex; justify-content: flex-end; background: radial-gradient(ellipse at 23% 0%,rgba(220,181,108,.2),transparent 59%),#281d30; border-bottom: 1px solid var(--line); }
.detail-cover .modal-close { align-self: flex-start; }
.detail-content { padding: 0 22px 22px; }
.detail-profile { display: flex; align-items: flex-end; gap: 13px; margin-top: -35px; position: relative; }
.detail-avatar { width: 64px; height: 64px; border: 3px solid #211828; background: #3a2a40; color: var(--gold-light); border-radius: 50%; display: grid; place-items: center; font: 500 20px var(--display); }
.detail-profile h2 { margin: 0 0 4px; color: #f1ebf3; font: 500 20px var(--display); letter-spacing: -.04em; }
.detail-profile p { margin: 0; color: #978d9f; font-size: 9px; }
.detail-actions { display: flex; gap: 8px; margin: 19px 0 18px; flex-wrap: wrap; }
.detail-actions .crm-button { min-height: 34px; }
.detail-meta { border-block: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; }
.detail-meta div { padding: 12px 7px; }
.detail-meta div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.detail-meta small { display: block; color: #83798d; font: 600 8px var(--display); letter-spacing: .1em; margin-bottom: 5px; }
.detail-meta strong { color: #d8cfdf; font: 500 10px var(--sans); }
.detail-notes { padding: 15px 0; color: #a79cab; font-size: 10px; line-height: 1.7; white-space: pre-wrap; }
.detail-visits-title { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; }
.detail-visits-title strong { color: #e6dfe8; font: 500 11px var(--display); }
.detail-visits { margin-top: 8px; }
.detail-visit { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.045); color: #a99faf; font-size: 9px; }
.detail-visit small { color: #807687; }
.danger-link { border: 0; background: transparent; color: #d68a8a; padding: 5px 0; font-size: 9px; text-decoration: underline; text-underline-offset: 3px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 22px; transform: translate(-50%,20px); opacity: 0; pointer-events: none; padding: 11px 16px; background: #2d2334; border: 1px solid rgba(220,181,108,.27); color: #eee5f0; box-shadow: 0 9px 30px rgba(0,0,0,.35); font-size: 10px; transition: .22s ease; max-width: calc(100% - 32px); text-align: center; }
.toast.is-visible { opacity: 1; transform: translate(-50%,0); }
@media (max-width: 1060px) {
  .sidebar { width: 207px; flex-basis: 207px; }
  .content-grid { grid-template-columns: 1fr; }
  .quick-panel { min-height: 0; }
  .quick-action { min-height: 43px; }
}
@media (max-width: 720px) {
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; height: 100dvh; width: min(280px,85vw); transform: translateX(-101%); transition: transform .22s ease; box-shadow: 18px 0 55px rgba(0,0,0,.35); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 59; inset: 0; background: rgba(7,5,9,.58); }
  .workspace { min-height: 100vh; }
  .topbar { height: 61px; flex-basis: 61px; padding-inline: 14px; gap: 10px; }
  .mobile-menu { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 31px; border: 1px solid var(--line); background: transparent; color: var(--gold-light); font-size: 13px; }
  .breadcrumb { gap: 6px; font-size: 7px; letter-spacing: .02em; white-space: nowrap; }
  .breadcrumb span { display: none; }
  .topbar-actions { gap: 9px; }
  .admin-chip { display: none; }
  .crm-main { padding: 26px 14px 30px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 18px; }
  .page-heading h1 { font-size: 35px; margin-top: 6px; }
  .page-subtitle { font-size: 9px; }
  .page-heading .crm-button { align-self: flex-start; min-height: 37px; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-bottom: 10px; }
  .stat-card { min-height: 103px; padding: 13px 10px; }
  .stat-label { font-size: 6px; letter-spacing: .07em; line-height: 1.4; }
  .stat-value { font-size: 26px; margin: 13px 0 7px; }
  .stat-foot { font-size: 7px; }
  .stat-ornament { right: 8px; top: 14px; font-size: 35px; }
  .recent-panel,.quick-panel { padding: 15px; }
  .panel-heading h2 { font-size: 15px; }
  .import-strip { padding: 13px; gap: 10px; flex-wrap: wrap; }
  .import-strip > div:nth-child(2) { min-width: calc(100% - 54px); }
  .import-strip .crm-button { margin-left: 43px; }
  .table-toolbar { padding: 13px; align-items: flex-start; flex-direction: column; gap: 12px; }
  .toolbar-filters { width: 100%; min-width: 0; flex-direction: column; align-items: stretch; }
  .filter-select,.toolbar-filters .search-box { width: 100%; max-width: none; }
  .search-box { width: 100%; }
  .empty-state { padding: 34px 13px; }
  .empty-state > div:last-child { flex-direction: column; align-items: stretch; }
  .empty-state .crm-button { width: 100%; }
  .visits-panel { padding: 14px; }
  .visit-row { grid-template-columns: 38px minmax(90px,1fr) auto; gap: 7px; }
  .visit-client-phone { display: none; }
  .followup-list { padding-inline: 12px; }
  .followup-row { grid-template-columns: 38px minmax(0,1fr); gap: 9px; padding-block: 11px; }
  .followup-actions { grid-column: 2; justify-content: flex-start; }
  .followup-main p { white-space: normal; }
  .form-two-columns { grid-template-columns: 1fr; gap: 0; }
  .crm-footer { padding: 12px 15px; flex-direction: column; align-items: flex-start; justify-content: center; }
}
@media (max-width: 390px) {
  .vault-card { padding: 27px 21px 20px; }
  .stat-card { padding-inline: 8px; }
  .stat-label { font-size: 5.7px; }
  .stat-foot { font-size: 6px; }
  .modal-card { padding: 18px; }
  .detail-modal { padding: 0; }
  .modal-actions { gap: 6px; }
  .modal-actions .crm-button { padding-inline: 10px; }
}

/* CRM modules: follow-up, sales and renewal records */
.followup-row { grid-template-columns: 32px minmax(140px,1fr) auto auto; gap: 12px; }
.followup-check { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid rgba(220,181,108,.34); border-radius: 50%; background: transparent; color: var(--green); font-size: 12px; }
.followup-check:hover,.followup-check.is-checked { border-color: rgba(156,198,143,.45); background: rgba(156,198,143,.08); }
.followup-title strong { color: #e8e0eb; font: 500 10px var(--display); }
.followup-main > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #817788; font-size: 8px; }
.followup-date { color: #b6aaba; font-size: 8px; white-space: nowrap; }
.followup-row.is-complete .followup-main > small { color: #766e7e; }
.row-actions { display: flex; align-items: center; gap: 3px; }
.row-actions .row-open { width: 27px; height: 29px; }
.row-delete:hover { color: #e69393; }
.status-badge { display: inline-flex; align-items: center; padding: 4px 7px; border: 1px solid rgba(255,255,255,.08); border-radius: 99px; background: rgba(255,255,255,.035); color: #b9afc0; font: 600 7px var(--display); white-space: nowrap; }
.status-badge.is-open,.status-badge.sale-pending { color: #e3c486; border-color: rgba(220,181,108,.22); background: rgba(220,181,108,.07); }
.status-badge.is-due,.status-badge.sale-cancelled,.status-badge.renewal-expired { color: #eea5a5; border-color: rgba(230,147,147,.24); background: rgba(230,147,147,.07); }
.status-badge.is-done,.status-badge.sale-paid,.status-badge.renewal-active { color: #a8cc9a; border-color: rgba(156,198,143,.2); background: rgba(156,198,143,.06); }
.status-badge.renewal-due { color: #e3c486; border-color: rgba(220,181,108,.22); background: rgba(220,181,108,.07); }
.client-table td strong { color: #e6dfe9; font: 500 9px var(--display); }
.table-subnote { display: block; margin-top: 4px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; color: #817788; font-size: 8px; }
.detail-meta-secondary { border-top: 0; }
.detail-meta-secondary .client-status { font: 600 8px var(--display); }
.detail-activity-note { padding: 9px 0 13px; color: #93899b; font-size: 9px; }
@media (max-width: 720px) {
  .followup-row { grid-template-columns: 28px minmax(0,1fr) auto; gap: 8px; }
  .followup-date { grid-column: 2; grid-row: 2; }
  .followup-row .row-actions { grid-column: 3; grid-row: 1 / span 2; }
  .followup-title { gap: 5px; }
  .followup-main > small { white-space: normal; }
  .detail-meta { grid-template-columns: 1fr; }
  .detail-meta div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 7px; }
}
