/* =====================================================================
   Ankit Florist CRM — UI theme
   Brand: plum (#8B1E83) from logo, blush ground, antique-gold accent
   ===================================================================== */
:root {
  --plum: #8B1E83; --plum-d: #5f1259; --plum-dd: #2a0e28; --plum-50: #f8eef6; --plum-100: #f1dcec;
  --gold: #c8963e; --gold-50: #faf2e4;
  --ink: #2b1a29; --ink-2: #4a3647; --muted: #85727f; --line: #efe3ec; --line-2: #e4d3df;
  --bg: #faf6f9; --card: #fff;
  --green: #1f8a5b; --green-50: #e7f5ee; --red: #c2334b; --red-50: #fbe9ec; --amber: #b9740b; --amber-50: #fcf1de;
  --blue: #2f6fbf; --blue-50: #e8f0fb; --violet: #6a4bc4; --violet-50: #efeafb; --grey: #6f6470; --grey-50: #f1edf0;
  --r: 14px; --r-sm: 10px;
  --sh: 0 1px 2px rgba(60, 10, 55, .04), 0 6px 24px rgba(60, 10, 55, .06);
  --sh-lg: 0 20px 60px rgba(60, 10, 55, .18);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, Segoe UI, sans-serif;
}
* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.5 var(--sans); color: var(--ink); background: var(--bg); overflow-x: clip; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Material symbols */
.ms { font-family: 'Material Symbols Rounded'; font-weight: 400; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; width: 1em; overflow: hidden; flex: none; }
.ms.xs { font-size: 15px; }

/* ---------------- Shell ---------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 260px; flex: none; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 0% 0%, #4a1544 0%, transparent 60%), linear-gradient(180deg, #2f0f2c 0%, #1f0a1d 100%); color: #e9d9e5; z-index: 40; }
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand b { display: block; font: 700 22px/1 var(--serif); color: #fff; letter-spacing: .2px; }
.brand small { display: block; font-size: 11px; color: #c8a9c1; margin-top: 4px; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; scrollbar-width: thin; scrollbar-color: #5a2a54 transparent; }
.nav-group { font-size: 11px; font-weight: 700; color: #a98aa2; padding: 16px 12px 6px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #e3cfdf; font-weight: 500; font-size: 14px; margin: 1px 0; transition: background .15s, color .15s; }
.sidebar nav a .ms { color: #c69bbd; font-size: 20px; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar nav a.on { background: linear-gradient(90deg, rgba(200, 150, 62, .22), rgba(139, 30, 131, .35)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.sidebar nav a.on .ms { color: #f0c987; font-variation-settings: 'FILL' 1; }
.sidebar nav a em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: var(--gold); color: #2a0e28; border-radius: 99px; padding: 1px 7px; }
.side-foot { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-foot b { display: block; font-size: 13px; color: #fff; }
.side-foot small { color: #b597ad; font-size: 12px; }
.side-foot a { margin-left: auto; color: #c69bbd; padding: 6px; border-radius: 8px; }
.side-foot a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.scrim { display: none; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: rgba(250, 246, 249, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; height: 42px; }
.search .ms { color: var(--muted); }
.search input { border: 0; outline: 0; flex: 1; background: none; height: 100%; }
.search:focus-within { border-color: var(--plum); box-shadow: 0 0 0 4px var(--plum-50); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.content { padding: 26px 28px 40px; flex: 1; width: 100%; max-width: 1480px; }
.foot { padding: 18px 28px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid transparent; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: transform .08s, background .15s, box-shadow .15s, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn .ms { font-size: 19px; }
.btn-primary { background: linear-gradient(180deg, #9a2391, var(--plum)); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 6px 16px rgba(139, 30, 131, .25); }
.btn-primary:hover { background: linear-gradient(180deg, #8b1e83, #741a6d); }
.btn-soft { background: var(--plum-50); color: var(--plum-d); border-color: var(--plum-100); }
.btn-soft:hover { background: var(--plum-100); }
.btn-ghost { background: #fff; border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--plum); color: var(--plum); }
.btn-danger { background: var(--red); color: #fff; }
.btn-light { background: #fff; color: var(--plum-d); }
.btn-glass { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn-glass:hover { background: rgba(255, 255, 255, .22); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.lg { height: 48px; font-size: 15px; }
.btn.block { display: flex; width: 100%; }
.btn.wa .ms, .icon-btn.wa { color: #1c9d57; }
.danger { color: var(--red) !important; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { border-color: var(--plum); color: var(--plum); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.sm .ms { font-size: 18px; }
.icon-btn .dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--red); color: #fff; font: 700 10px/18px var(--sans); font-style: normal; text-align: center; padding: 0 4px; }
.user-chip { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 4px; border-radius: 99px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; }
.only-m { display: none; }

/* dropdown */
.dd { position: relative; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-lg); padding: 6px; display: none; z-index: 50; }
.dd.open .dd-menu { display: block; animation: pop .14s ease-out; }
.dd-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-weight: 500; font-size: 14px; }
.dd-menu a:hover { background: var(--plum-50); color: var(--plum-d); }
.dd-menu a .ms { color: var(--plum); font-size: 19px; }
.dd-menu a b { margin-left: auto; background: var(--plum-50); color: var(--plum); border-radius: 99px; padding: 0 8px; font-size: 12px; }
.dd-wide { min-width: 280px; }
.dd-title { font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 10px 4px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ---------------- Avatars & badges ---------------- */
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #b0479f, #6d1666); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.xs { width: 22px; height: 22px; font-size: 9px; }
.avatar.xl { width: 72px; height: 72px; font-size: 24px; font-family: var(--serif); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-green { background: var(--green-50); color: var(--green); } .b-red { background: var(--red-50); color: var(--red); }
.b-amber { background: var(--amber-50); color: var(--amber); } .b-blue { background: var(--blue-50); color: var(--blue); }
.b-violet { background: var(--violet-50); color: var(--violet); } .b-plum { background: var(--plum-50); color: var(--plum); }
.b-grey { background: var(--grey-50); color: var(--grey); }
.t-green { color: var(--green) !important; } .t-red { color: var(--red) !important; } .muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.link { color: var(--plum); font-weight: 600; } .link:hover { text-decoration: underline; }
.b { font-weight: 700; }

/* ---------------- Page head ---------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font: 700 34px/1.05 var(--serif); color: var(--plum-dd); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head h1 .badge { font-family: var(--sans); }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 680px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.head-actions form { margin: 0; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.crumb:hover { color: var(--plum); }
.crumb .ms { font-size: 17px; }

/* ---------------- Cards ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); padding: 20px; margin-bottom: 18px; }
.card h3 { font: 700 20px/1.2 var(--serif); color: var(--plum-dd); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head small { color: var(--muted); font-size: 12.5px; }
.card-head.mt { margin-top: 22px; }
.card-foot { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.two-col > .card { margin: 0; }
.two-col + .two-col { margin-top: 18px; }

/* Hero */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px; border-radius: 20px; padding: 30px 34px; margin-bottom: 20px; color: #fff;
  background: radial-gradient(90% 140% at 100% 0%, #c25bb2 0%, transparent 55%), radial-gradient(70% 120% at 0% 100%, #4a0f44 0%, transparent 60%), linear-gradient(120deg, #6d1666, #8b1e83 55%, #a1338f); box-shadow: 0 18px 40px rgba(110, 22, 102, .25); }
.hero-text { flex: 1; position: relative; z-index: 1; }
.hero small { color: #f3d6ec; font-weight: 600; }
.hero h1 { font: 700 44px/1.05 var(--serif); margin: 6px 0 8px; text-wrap: balance; }
.hero p { margin: 0 0 18px; color: #f7e3f2; max-width: 560px; }
.hero p b { color: #fff; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-art { width: 300px; height: 190px; flex: none; opacity: .95; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.kpi-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--plum-50); color: var(--plum); margin-bottom: 8px; }
.kpi-ic.g { background: var(--green-50); color: var(--green); } .kpi-ic.a { background: var(--gold-50); color: var(--gold); }
.kpi-ic.r { background: var(--red-50); color: var(--red); } .kpi-ic.v { background: var(--violet-50); color: var(--violet); }
.kpi small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.kpi b { font: 700 28px/1.1 var(--serif); color: var(--plum-dd); font-variant-numeric: tabular-nums; }
.chg { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; }
.chg.up { color: var(--green); font-weight: 700; } .chg.down { color: var(--red); font-weight: 700; }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.mini-stat { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; box-shadow: var(--sh); }
.mini-stat > .ms { width: 42px; height: 42px; border-radius: 12px; background: var(--plum-50); color: var(--plum); display: grid; place-items: center; font-size: 22px; }
.mini-stat small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.mini-stat b { font: 700 24px/1.1 var(--serif); color: var(--plum-dd); }

.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.dash-grid > .card { margin: 0; }
.span2 { grid-column: span 2; }
.chart-box { position: relative; height: 290px; }

/* funnel bars */
.funnel { display: grid; gap: 12px; }
.fn-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) 34px; align-items: center; gap: 10px; font-size: 13px; }
.fn-row.wide { grid-template-columns: 120px minmax(0, 1fr) 90px; }
.fn-row > span { color: var(--ink-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-row b { text-align: right; }
.fn-bar { height: 10px; background: var(--plum-50); border-radius: 99px; overflow: hidden; }
.fn-bar i { display: block; height: 100%; border-radius: 99px; background: var(--plum); }
.st-new { background: var(--blue) !important; } .st-contacted { background: var(--violet) !important; } .st-follow-up { background: var(--amber) !important; }
.st-quoted { background: var(--plum) !important; } .st-won { background: var(--green) !important; } .st-lost { background: #b7a9b4 !important; }
.st-age { background: linear-gradient(90deg, var(--gold), var(--red)) !important; } .st-exp { background: linear-gradient(90deg, #d9a3cf, var(--plum)) !important; }

/* agenda & timeline */
.agenda, .timeline { list-style: none; margin: 0; padding: 0; }
.agenda li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.agenda li:last-child { border: 0; }
.agenda li > div { flex: 1; min-width: 0; }
.agenda b, .agenda li > div > a { display: block; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda small { color: var(--muted); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-time { font-weight: 700; color: var(--plum); font-size: 12px; width: 70px; flex: none; }
.ag-date { width: 46px; height: 50px; flex: none; border-radius: 12px; background: var(--plum-50); color: var(--plum); display: grid; place-content: center; text-align: center; font-size: 11px; font-weight: 700; line-height: 1.1; }
.ag-date b { font: 700 22px/1 var(--serif); display: block; }
.tl-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--plum-50); color: var(--plum); display: grid; place-items: center; flex: none; }
.tl-ic .ms { font-size: 18px; }
.tl-ic.warn { background: var(--amber-50); color: var(--amber); }
.timeline li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border: 0; }
.timeline li > div { flex: 1; }
.timeline b { font-weight: 700; }
.timeline small { display: block; color: var(--muted); font-size: 12.5px; }
.timeline p { margin: 6px 0 0; color: var(--ink-2); }
.timeline time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.act-deleted { background: var(--red-50); color: var(--red); } .act-created { background: var(--green-50); color: var(--green); } .act-login, .act-logout { background: var(--blue-50); color: var(--blue); }

/* ---------------- Tables ---------------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: -4px 0 14px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs a { padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--ink-2); white-space: nowrap; flex: none; }
.tabs a i { font-style: normal; color: var(--muted); font-weight: 600; margin-left: 2px; }
.tabs a:hover { background: var(--plum-50); }
.tabs a.on { background: var(--plum); color: #fff; }
.tabs a.on i { color: #f3d6ec; }
.list-search { display: flex; align-items: center; gap: 6px; height: 38px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; min-width: 240px; background: #fff; }
.list-search .ms { color: var(--muted); font-size: 18px; }
.list-search input { border: 0; outline: 0; background: none; flex: 1; height: 100%; font-size: 14px; }
.list-search:focus-within { border-color: var(--plum); }
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fdfafc; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover td { background: #fdf8fc; }
.table tfoot th { color: var(--ink); font-size: 13.5px; border-top: 2px solid var(--line-2); border-bottom: 0; }
.r { text-align: right !important; }
.actions { white-space: nowrap; }
.actions .icon-btn { margin-left: 4px; }
.cell-main { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.cell-main small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.cell-main:hover { color: var(--plum); }
.sub { display: block; color: var(--muted); font-size: 12px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 14px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.pager div { display: flex; gap: 6px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty > .ms { font-size: 44px; color: var(--plum-100); width: auto; }
.empty h3 { color: var(--ink); margin: 8px 0 4px; font: 700 22px var(--serif); }
.empty p { margin: 0 0 16px; }
.empty.sm { padding: 20px 10px; }
.empty.sm > .ms { font-size: 30px; }
.empty.sm p { margin: 4px 0 0; }

/* ---------------- Forms ---------------- */
.form-card { padding: 24px; }
.form-card.narrow { max-width: 720px; }
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.grid-form.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field.span2 { grid-column: span 2; }
.field > span { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
.req { color: var(--red); font-style: normal; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=password], input:not([type]), select, textarea {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font-size: 15px; outline: 0; transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2385727f' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.search input, .list-search input { border: 0 !important; box-shadow: none !important; height: 100%; padding: 0 2px; background: none; }
input:focus, select:focus, textarea:focus { border-color: var(--plum); box-shadow: 0 0 0 4px var(--plum-50); }
input[readonly] { background: #faf6f9; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-actions.sticky { position: sticky; bottom: 0; background: rgba(250, 246, 249, .92); backdrop-filter: blur(8px); border: 0; margin: 0; padding: 14px 0; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--plum); }
.btn :focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--plum-100); outline-offset: 2px; }

/* items table */
.items-table td { padding: 8px 6px; }
.items-table input, .items-table select { height: 40px; font-size: 14px; }
.items-table .i-amt { font-weight: 700; padding-right: 10px; }
.items-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-top: 16px; flex-wrap: wrap; }
.totals { display: grid; grid-template-columns: auto 160px; gap: 8px 18px; align-items: center; margin: 0; min-width: 320px; }
.totals dt { text-align: right; color: var(--muted); font-weight: 600; }
.totals dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.totals input { height: 36px; text-align: right; }
.totals .grand { font: 700 24px var(--serif); color: var(--plum-dd); border-top: 1px solid var(--line); padding-top: 10px; }

/* dl */
.dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px 14px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; }
.dl.tight { grid-template-columns: 100px minmax(0, 1fr); margin-bottom: 16px; }

/* profile hero */
.profile-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px; background: linear-gradient(120deg, #fff 55%, var(--plum-50)); }
.ph-main { flex: 1; min-width: 240px; }
.ph-main h1 { font: 700 32px/1.1 var(--serif); color: var(--plum-dd); }
.ph-main p { margin: 4px 0 10px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ph-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-links a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.ph-links a .ms { font-size: 17px; color: var(--plum); }
.ph-links a.wa .ms { color: #1c9d57; }
.ph-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.ph-stats > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; min-width: 120px; }
.ph-stats small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.ph-stats b { font: 700 22px var(--serif); color: var(--plum-dd); }

/* lead stage bar */
.stage-bar { display: flex; gap: 4px; margin-bottom: 18px; overflow-x: auto; }
.stage-bar span { flex: 1; min-width: 92px; text-align: center; padding: 10px 6px; font-size: 13px; font-weight: 700; background: #fff; border: 1px solid var(--line); color: var(--muted); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); }
.stage-bar span:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 10px 0 0 10px; }
.stage-bar span.done { background: var(--plum-50); color: var(--plum); }
.stage-bar span.cur { background: var(--plum); color: #fff; }
.note-form textarea { margin-bottom: 8px; }
.note-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.note-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.note-row input, .note-row select { height: 36px; font-size: 14px; }
.note-row .btn { margin-left: auto; }

/* segmented */
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line-2); border-radius: 11px; padding: 3px; }
.seg a { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; height: 32px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.seg a .ms { font-size: 18px; }
.seg a.on { background: var(--plum-50); color: var(--plum); }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(230px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.kcol { background: #f4ecf2; border-radius: 16px; padding: 10px; min-height: 360px; scroll-snap-align: start; display: flex; flex-direction: column; }
.kcol header { display: flex; align-items: center; gap: 6px; padding: 4px 4px 10px; }
.kcol header i { font-style: normal; font-weight: 700; color: var(--muted); font-size: 12px; }
.kcol header .num { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.kdrop { display: flex; flex-direction: column; gap: 8px; flex: 1; border-radius: 12px; transition: background .15s; }
.kdrop.over { background: rgba(139, 30, 131, .08); outline: 2px dashed var(--plum-100); }
.kcard { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: 0 1px 2px rgba(60, 10, 55, .05); cursor: grab; transition: box-shadow .15s, transform .15s; }
.kcard:hover { box-shadow: var(--sh); transform: translateY(-1px); }
.kcard.dragging { opacity: .5; }
.kcard b { display: block; font-size: 14px; }
.kcard > small { display: block; color: var(--muted); font-size: 12.5px; margin: 2px 0 10px; }
.kmeta { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.kmeta span { display: inline-flex; align-items: center; gap: 3px; }
.kmeta .avatar { margin-left: auto; }

/* documents */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.doc-side .card { padding: 18px; }
.doc-side h3 { margin-bottom: 12px; font-size: 18px; }
.stack-btns { display: grid; gap: 8px; }
.stack-btns form { margin: 0; }
.status-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { border: 1px solid var(--line-2); background: #fff; border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.pill:hover { border-color: var(--plum); }
.pill.on { background: var(--plum); color: #fff; border-color: var(--plum); }
.paper-wrap { overflow-x: auto; border-radius: var(--r); }

.paper { background: #fff; width: 100%; min-width: 680px; max-width: 860px; margin: 0 auto; padding: 40px 44px 30px; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); font-size: 13px; color: #2b1a29; position: relative; overflow: hidden; }
.paper::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, var(--plum), #c25bb2, var(--gold)); }
.pp-head { display: flex; gap: 24px; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.pp-logo { width: 130px; height: 120px; object-fit: contain; }
.pp-co { text-align: right; }
.pp-co h2 { font: 700 28px/1 var(--serif); color: var(--plum); }
.pp-co em { display: block; color: var(--gold); font-style: normal; font-weight: 600; font-size: 12px; margin: 4px 0 6px; }
.pp-co p { margin: 2px 0; color: #5b4858; font-size: 12px; line-height: 1.5; }
.pp-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; flex-wrap: wrap; }
.pp-title h1 { font: 700 26px var(--serif); color: var(--plum-dd); letter-spacing: 1px; }
.pp-meta { display: flex; gap: 22px; }
.pp-meta small, .pp-parties small, .pp-words small, .pp-foot small { display: block; color: var(--muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 3px; }
.pp-meta b { font-size: 13.5px; }
.pp-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.pp-parties > div { background: #fbf6fa; border-radius: 10px; padding: 14px 16px; }
.pp-parties b { display: block; font-size: 15px; margin-bottom: 2px; }
.pp-parties span { display: block; color: #5b4858; font-size: 12.5px; }
.pp-items { width: 100%; border-collapse: collapse; }
.pp-items th { background: var(--plum); color: #fff; font-size: 11.5px; padding: 9px 10px; text-align: left; font-weight: 700; }
.pp-items th:first-child { border-radius: 8px 0 0 8px; } .pp-items th:last-child { border-radius: 0 8px 8px 0; }
.pp-items td { padding: 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pp-sum { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; margin-top: 18px; }
.pp-words b { font-size: 13px; }
.pp-tax { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 11.5px; }
.pp-tax th, .pp-tax td { border: 1px solid var(--line); padding: 5px 8px; }
.pp-tax th { background: #fbf6fa; text-align: left; }
.pp-totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; align-content: start; }
.pp-totals dt { color: #5b4858; }
.pp-totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.pp-totals .grand { background: var(--plum-50); color: var(--plum-dd); font: 700 19px var(--serif); padding: 8px 10px; margin: 4px 0; }
.pp-totals dt.grand { border-radius: 8px 0 0 8px; } .pp-totals dd.grand { border-radius: 0 8px 8px 0; }
.pp-foot { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.pp-foot p { margin: 0 0 12px; color: #5b4858; font-size: 12px; }
.pp-terms { white-space: normal; }
.pp-sign { text-align: center; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; font-size: 12px; }
.pp-sign span:first-child { font-weight: 700; }
.pp-sign i { display: block; height: 56px; }
.pp-sign img { max-height: 60px; }
.pp-sign span:last-child { border-top: 1px solid #b9a6b5; padding-top: 6px; width: 100%; color: var(--muted); }
.pp-thanks { text-align: center; margin-top: 22px; font: italic 600 16px var(--serif); color: var(--plum); }
.rc-body { text-align: center; padding: 10px 0 10px; }
.rc-amt { font: 700 48px var(--serif); color: var(--plum); margin: 6px 0; }
.rc-words { color: var(--muted); margin-top: 0; }
.receipt .dl { text-align: left; max-width: 520px; margin: 20px auto 0; }

.print-body { background: #efe6ec; padding: 24px 12px; }
.print-bar { max-width: 860px; margin: 0 auto 14px; display: flex; justify-content: space-between; gap: 10px; }

/* calendar */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.cal-filters { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.cal-filters label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; cursor: pointer; }
.cal-filters input { accent-color: var(--plum); width: 16px; height: 16px; }
.sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.sw.ev-event { background: var(--plum); } .sw.ev-order { background: #d9579a; } .sw.ev-lead { background: var(--gold); } .sw.ev-task { background: var(--blue); }
#calendar { --fc-border-color: var(--line); --fc-today-bg-color: #fbf1f8; --fc-button-bg-color: #fff; --fc-button-border-color: var(--line-2); --fc-button-text-color: var(--ink-2);
  --fc-button-hover-bg-color: var(--plum-50); --fc-button-hover-border-color: var(--plum-100); --fc-button-active-bg-color: var(--plum); --fc-button-active-border-color: var(--plum); --fc-event-border-color: transparent; font-size: 13px; }
#calendar .fc-toolbar-title { font: 700 26px var(--serif); color: var(--plum-dd); }
#calendar .fc-button { font-weight: 600; text-transform: none; border-radius: 9px !important; box-shadow: none !important; padding: 6px 12px; }
#calendar .fc-button-active { color: #fff !important; }
#calendar .fc-button-group { gap: 4px; }
#calendar .fc-col-header-cell-cushion { font-weight: 700; color: var(--muted); font-size: 12px; padding: 8px 0; }
#calendar .fc-daygrid-day-number { font-weight: 600; color: var(--ink-2); }
#calendar .fc-daygrid-day:hover { background: #fdf8fc; cursor: pointer; }
#calendar .fc-event { border-radius: 6px; padding: 1px 6px; font-weight: 600; font-size: 12px; cursor: pointer; }
#calendar .fc-daygrid-dot-event .fc-event-title { font-weight: 600; }
.fc .ev-event { background: var(--plum) !important; color: #fff !important; } .fc .ev-event .fc-event-main, .fc .ev-event .fc-event-title, .fc .ev-event .fc-event-time { color: #fff; }
.fc .ev-order { background: #fde7f1 !important; } .fc .ev-order * { color: #a3245f !important; }
.fc .ev-lead { background: var(--gold-50) !important; } .fc .ev-lead * { color: #8a5d12 !important; }
.fc .ev-task { background: var(--blue-50) !important; } .fc .ev-task * { color: var(--blue) !important; }
.fc .ev-off { opacity: .45; text-decoration: line-through; }
.fc .fc-daygrid-event-dot { display: none; }

/* reports range */
.range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.range input { height: 38px; width: 160px; font-size: 14px; }
.range span { color: var(--muted); font-weight: 600; }
.search-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.search-grid .card { margin: 0; }

/* settings / company master */
.settings { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.set-nav { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; box-shadow: var(--sh); }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 600; color: var(--ink-2); }
.set-nav a .ms { color: var(--plum); }
.set-nav a:hover { background: var(--plum-50); }
.set-nav a.on { background: var(--plum); color: #fff; }
.set-nav a.on .ms { color: #fff; }
.set-pane { margin-bottom: 0; }
.brand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.brand-box { border: 1px dashed var(--line-2); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.brand-box small { color: var(--muted); font-size: 12.5px; }
.brand-prev { width: 100%; height: 150px; border-radius: 12px; background: repeating-conic-gradient(#f6eff4 0 25%, #fff 0 50%) 0 0 / 18px 18px; display: grid; place-items: center; margin-bottom: 6px; overflow: hidden; }
.brand-prev.dark { background: linear-gradient(180deg, #2f0f2c, #1f0a1d); }
.brand-prev img { max-width: 80%; max-height: 130px; object-fit: contain; }
.brand-prev span { color: var(--muted); font-size: 13px; }
.upl { cursor: pointer; margin-top: 6px; }

/* flash */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; font-size: 14px; animation: pop .2s ease-out; }
.flash button { margin-left: auto; background: none; border: 0; font-size: 20px; cursor: pointer; color: inherit; opacity: .6; }
.flash-success { background: var(--green-50); color: var(--green); border: 1px solid #c8e9d8; }
.flash-error { background: var(--red-50); color: var(--red); border: 1px solid #f2c9d0; }
.flash-info { background: var(--plum-50); color: var(--plum-d); border: 1px solid var(--plum-100); }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(42, 14, 40, .45); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { background: #fff; border-radius: 18px; padding: 26px; width: 100%; max-width: 400px; text-align: center; box-shadow: var(--sh-lg); animation: pop .18s ease-out; }
.modal-ic { width: 54px; height: 54px; border-radius: 50%; background: var(--red-50); color: var(--red); display: grid; place-items: center; margin: 0 auto 12px; }
.modal-ic .ms { font-size: 26px; }
.modal-card h3 { font: 700 24px var(--serif); }
.modal-card p { color: var(--muted); }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--plum-dd); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: var(--sh-lg); z-index: 200; max-width: calc(100% - 32px); animation: pop .2s ease-out; }

/* login */
.login-body { background: var(--bg); min-height: 100vh; }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login.single { grid-template-columns: 1fr; place-items: center; padding: 30px 16px; }
.login-art { position: relative; overflow: hidden; color: #fff; display: grid; place-items: center; padding: 40px;
  background: radial-gradient(70% 60% at 85% 10%, #c25bb2 0%, transparent 60%), radial-gradient(60% 60% at 10% 90%, #c8963e55 0%, transparent 60%), linear-gradient(140deg, #2f0f2c, #6d1666 60%, #8b1e83); }
.login-art::after { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.06'%3E%3Cellipse cx='60' cy='40' rx='8' ry='20'/%3E%3Cellipse cx='60' cy='80' rx='8' ry='20'/%3E%3Cellipse cx='40' cy='60' rx='20' ry='8'/%3E%3Cellipse cx='80' cy='60' rx='20' ry='8'/%3E%3C/g%3E%3C/svg%3E"); }
.la-inner { position: relative; z-index: 1; max-width: 440px; }
.la-inner img { width: 110px; margin-bottom: 18px; }
.la-inner h2 { font: 700 52px/1 var(--serif); }
.la-inner p { color: #f3d6ec; font-size: 16px; margin: 10px 0 28px; }
.la-inner ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.la-inner li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.la-inner li .ms { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(255, 255, 255, .14); }
.login-form { width: 100%; max-width: 420px; margin: auto; padding: 40px 24px; display: flex; flex-direction: column; gap: 14px; }
.lf-logo { width: 150px; align-self: center; margin-bottom: 4px; }
.login-form h1 { font: 700 36px var(--serif); color: var(--plum-dd); text-align: center; }
.login-form > p { margin: -8px 0 8px; color: var(--muted); text-align: center; }
.login-form small { text-align: center; }


/* events register */
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.year-card { padding: 16px 20px; }
.year-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.year-head h3 { font-size: 26px; min-width: 64px; text-align: center; }
.year-head .muted { margin-left: 6px; font-size: 13px; }
.year-head .btn { margin-left: auto; }
.months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; }
.mcell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: 12px; border: 1px solid var(--line); background: #fff; transition: border-color .15s, background .15s; }
.mcell:hover { border-color: var(--plum); }
.mcell small { font-weight: 700; color: var(--muted); font-size: 12px; }
.mcell b { font: 700 24px/1 var(--serif); color: var(--plum-dd); }
.mcell em { font-style: normal; font-size: 11px; color: var(--green); font-weight: 600; white-space: nowrap; }
.mbar { width: 10px; height: 34px; background: var(--plum-50); border-radius: 99px; display: flex; align-items: flex-end; overflow: hidden; margin: 4px 0; }
.mbar i { display: block; width: 100%; background: linear-gradient(180deg, #c25bb2, var(--plum)); border-radius: 99px; }
.mcell.now { border-color: var(--gold); }
.mcell.on { background: var(--plum); border-color: var(--plum); }
.mcell.on small, .mcell.on b, .mcell.on em { color: #fff; }
.mcell.on .mbar { background: rgba(255, 255, 255, .25); } .mcell.on .mbar i { background: #fff; }
.type-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 14px; }
.type-chips span { background: var(--plum-50); color: var(--plum-d); border-radius: 99px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; }
.type-chips b { margin-left: 4px; }
.dchip { width: 44px; height: 46px; border-radius: 11px; background: var(--plum-50); color: var(--plum); display: inline-grid; place-content: center; text-align: center; font-size: 11px; font-weight: 700; line-height: 1.1; }
.dchip b { font: 700 20px/1 var(--serif); display: block; }
.row-off td { opacity: .55; }
.modal-card.left { text-align: left; display: flex; flex-direction: column; gap: 12px; }
.modal-card.left .modal-ic, .modal-card.left h3, .modal-card.left > p { text-align: center; margin-left: auto; margin-right: auto; }
.modal-card.left > p { margin: -6px 0 0; font-weight: 600; color: var(--plum); }
.modal-ic.ok, .tl-ic.ok { background: var(--green-50); color: var(--green); }
.ev-month { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.ev-month a { background: var(--plum-50); border-radius: 12px; padding: 10px; text-align: center; }
.ev-month b { display: block; font: 700 26px/1.1 var(--serif); color: var(--plum-dd); }
.ev-month small { color: var(--muted); font-weight: 600; font-size: 12px; }
.mstat { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mstat a { display: grid; grid-template-columns: 1fr auto; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); }
.mstat a:hover { border-color: var(--plum); }
.mstat span { font-weight: 700; } .mstat b { text-align: right; color: var(--plum); }
.mstat small { grid-column: 1 / -1; color: var(--green); font-weight: 600; font-size: 12px; }
.mstat li.now a { background: var(--plum-50); border-color: var(--plum-100); }
.sw.ev-done { background: var(--green); }
.fc .ev-done { background: var(--green-50) !important; } .fc .ev-done * { color: var(--green) !important; }

/* events month grid */
.view-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav h2 { font: 700 28px/1 var(--serif); color: var(--plum-dd); min-width: 190px; text-align: center; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; }
.lg-book { background: var(--plum); } .lg-prog { background: var(--amber); } .lg-done { background: var(--green); } .lg-off { background: #c9bcc6; }
.evcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.evc-h { padding: 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; background: #fdfafc; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.evc-d { min-height: 118px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; background: #fff; }
.evc-d.out { background: #faf6f9; }
.evc-d.past { background: #fdfbfc; }
.evc-d.today { background: #fbf1f8; box-shadow: inset 0 0 0 2px var(--plum-100); }
.evc-top { display: flex; align-items: center; justify-content: space-between; }
.evc-top b { font-size: 13px; color: var(--ink-2); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.evc-d.today .evc-top b { background: var(--plum); color: #fff; }
.evc-add { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); opacity: 0; transition: opacity .15s; }
.evc-add .ms { font-size: 18px; }
.evc-d:hover .evc-add, .evc-add:focus-visible { opacity: 1; }
.evc-add:hover { background: var(--plum-50); color: var(--plum); }
.evc-ev { display: flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.evc-ev span { overflow: hidden; text-overflow: ellipsis; }
.evc-ev.book { background: var(--plum); color: #fff; }
.evc-ev.prog { background: var(--amber-50); color: var(--amber); }
.evc-ev.done { background: var(--green-50); color: var(--green); }
.evc-ev.off { background: var(--grey-50); color: var(--grey); text-decoration: line-through; }
.evc-ev:hover { filter: brightness(.95); }
.evc-note { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; margin: 12px 0 0; }
@media (max-width: 1100px) { .months { grid-template-columns: repeat(6, minmax(0, 1fr)); } .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .months { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .evc-d { min-height: 64px; padding: 3px; }
  .evc-ev { padding: 0; height: 6px; border-radius: 99px; font-size: 0; }
  .evc-ev .ms { display: none; }
  .evc-add { opacity: 1; }
  .month-nav h2 { font-size: 22px; min-width: 0; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-layout, .cal-layout { grid-template-columns: minmax(0, 1fr); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-art { width: 220px; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--sh-lg); }
  body.side-open .sidebar { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(42, 14, 40, .4); z-index: 35; }
  .only-m { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px 30px; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .set-nav { position: static; flex-direction: row; overflow-x: auto; }
  .set-nav a { flex: none; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .search-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .kpis, .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .grid-form, .grid-form.g3 { grid-template-columns: minmax(0, 1fr); }
  .field.span2 { grid-column: auto; }
  .hero { padding: 24px 20px; }
  .hero h1 { font-size: 34px; }
  .hero-art { display: none; }
  .page-head h1 { font-size: 28px; }
  .hide-s { display: none; }
  .list-search { min-width: 0; width: 100%; }
  .brand-grid { grid-template-columns: minmax(0, 1fr); }
  .totals { min-width: 0; width: 100%; grid-template-columns: auto 130px; }
  .kanban { grid-template-columns: repeat(6, 82%); }
  .stack thead { display: none; }
  .stack tr { display: grid; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .stack td { display: flow-root; border: 0; padding: 3px 0 3px 8.5em; text-align: left !important; }
  .stack td::before { content: attr(data-l); float: left; width: 8em; margin-left: -8.5em; color: var(--muted); font-size: 12px; font-weight: 600; }
  .stack td:empty { display: none; }
  .stack td.actions { padding-left: 0; }
  .stack td.actions::before { display: none; }
  .table-wrap { margin: 0; padding: 0; }
  .ph-stats > div { flex: 1; min-width: 0; }
}
@media (max-width: 420px) { .kpis, .mini-stats { grid-template-columns: minmax(0, 1fr); } .kpi b { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------------- Print ---------------- */
@media print {
  @page { size: A4; margin: 10mm; }
  body, .print-body { background: #fff !important; padding: 0 !important; }
  .no-print, .print-bar, .sidebar, .topbar, .foot, .doc-side, .head-actions, .range .btn { display: none !important; }
  .paper { box-shadow: none; border: 0; min-width: 0; max-width: none; padding: 0; }
  .paper::before { display: none; }
  .pp-items th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pp-totals .grand, .pp-parties > div { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .content { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}
