:root {
  --bg: #f5f4f0;
  --card: #ffffff;
  --line: #e7e3da;
  --line-soft: #f0ede6;
  --text: #1c2420;
  --muted: #6c7570;
  --primary: #1f6f5c;
  --primary-600: #185a4a;
  --primary-50: #e8f2ef;
  --accent: #c49a52;
  --danger: #c0392b;
  --side: #10251f;
  --side-text: #b9c7c1;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .05), 0 1px 3px rgba(20, 30, 25, .04);
  font-size: 15px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.55rem; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 1rem; font-weight: 600; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 8px 0 12px; }
code { background: var(--line-soft); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
.ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.right { text-align: right; margin-left: auto; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.break { word-break: break-all; }
.text-danger { color: var(--danger) !important; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp1 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-between { display: flex; justify-content: space-between; gap: 8px; }
.plain { color: inherit; }
.indent { margin-left: 34px; }

/* ---------- Shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex: none; background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.08rem; padding: 4px 10px 22px; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--side); }
.brand-mark .ico { width: 20px; height: 20px; }
.brand-mark.lg { width: 52px; height: 52px; border-radius: 14px; }
.brand-mark.lg .ico { width: 30px; height: 30px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; color: var(--side-text); font-weight: 500; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: rgba(196,154,82,.16); color: #fff; }
.sidebar nav a.active .ico { color: var(--accent); }
.sidebar .count { margin-left: auto; font-style: normal; background: var(--accent); color: var(--side); font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.sidebar-foot { margin-top: auto; padding: 10px; }
.demo-pill { font-size: .75rem; border: 1px dashed rgba(255,255,255,.25); border-radius: 8px; padding: 6px 10px; text-align: center; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 12px 28px; background: rgba(245,244,240,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.search { flex: 1; max-width: 520px; position: relative; }
.search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; padding: 9px 12px 9px 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.user-chip { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta small { color: var(--muted); font-size: .75rem; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--line-soft); color: var(--text); }
.menu-btn { display: none; }
.scrim { display: none; }
.content { padding: 26px 28px 60px; max-width: 1400px; width: 100%; }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lead-title { display: flex; align-items: center; gap: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--line-soft); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-sm { padding: 5px 10px; font-size: .84rem; border-radius: 8px; }
.btn-sm .ico { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn-danger-ghost { color: var(--danger); border-color: transparent; background: transparent; }
.btn-danger-ghost:hover { background: #fbecea; }
.link { font-size: .85rem; font-weight: 500; }

/* ---------- Cards / grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head.pad { padding: 18px 18px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.empty { text-align: center; padding: 40px; color: var(--muted); }
.empty-sm { color: var(--muted); font-size: .88rem; padding: 10px 0; list-style: none; }

/* KPIs */
.kpis { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.kpis > * { flex: 1 1 170px; min-width: 0; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; color: var(--text); box-shadow: var(--shadow); }
a.kpi:hover { border-color: var(--primary); text-decoration: none; }
.kpi span { font-size: .8rem; color: var(--muted); font-weight: 500; }
.kpi strong { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.kpi small { color: var(--muted); font-size: .78rem; }

/* Bars */
.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel.compact { gap: 12px; }
.funnel.compact .funnel-row { grid-template-columns: 1fr auto; row-gap: 5px; }
.funnel.compact .bar-track { grid-column: 1 / -1; grid-row: 2; height: 8px; }
.funnel-row { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 12px; color: var(--text); }
.funnel-row:hover { text-decoration: none; }
.funnel-row:hover .funnel-label { color: var(--primary); }
.funnel-label { font-size: .88rem; font-weight: 500; }
.funnel-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-track { display: block; height: 12px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.bar-track.thin { height: 6px; margin: 5px 0 3px; }
.bar { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.b-fill-new { background: #8aa7c9; } .b-fill-contacted { background: #6f93c0; } .b-fill-qualified { background: #5a86a8; }
.b-fill-viewing { background: #c49a52; } .b-fill-negotiation { background: #d4843b; } .b-fill-won { background: #1f6f5c; } .b-fill-lost { background: #c9c3b8; }

/* Lists */
.list, .task-list, .timeline { list-style: none; margin: 0; padding: 0; }
.list li, .task-list li, .timeline li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.list li:first-child, .task-list li:first-child, .timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline li { align-items: flex-start; }
.date-tile { width: 46px; flex: none; text-align: center; border-radius: 9px; background: var(--primary-50); color: var(--primary); padding: 5px 0; line-height: 1.1; }
.date-tile b { display: block; font-size: 1.1rem; }
.date-tile small { font-size: .7rem; text-transform: uppercase; font-weight: 600; }
.rank { width: 18px; color: var(--muted); font-weight: 600; font-size: .85rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.task-list form { display: contents; }
.check { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 2px solid #c8c2b6; background: #fff; cursor: pointer; padding: 0; position: relative; }
.check:hover { border-color: var(--primary); }
.check.on { background: var(--primary); border-color: var(--primary); }
.check.on::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.task-list li.done .grow > div:first-child, .task-list li.done .grow > a { text-decoration: line-through; color: var(--muted); }

.tl-type { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; flex: none; background: var(--line-soft); color: var(--muted); }
.t-call { background: #e3edf8; color: #3e6a9e; } .t-whatsapp { background: #e1f5e8; color: #25884a; }
.t-email { background: #f2e9f8; color: #7a4a9e; } .t-meeting { background: #fbf0dd; color: #a4731f; }

/* Avatars & badges */
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: .78rem; font-weight: 600; flex: none; vertical-align: middle; }
.avatar.sm { width: 28px; height: 28px; font-size: .7rem; }
.avatar.xs { width: 22px; height: 22px; font-size: .6rem; }
.avatar.lg { width: 54px; height: 54px; font-size: 1.1rem; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .74rem; font-weight: 600; background: var(--line-soft); color: var(--muted); white-space: nowrap; vertical-align: middle; letter-spacing: .01em; }
h1 .badge { font-size: .8rem; }
.b-st-new { background: #e7eef8; color: #3f6493; }
.b-st-contacted { background: #e4ecf6; color: #365c8a; }
.b-st-qualified { background: #e2eef1; color: #2d6272; }
.b-st-viewing { background: #faf0dc; color: #94691c; }
.b-st-negotiation { background: #fbe8d6; color: #a45a17; }
.b-st-won, .b-ps-available, .b-vs-completed, .b-pj-delivered, .b-pj-ready-to-move { background: #dff0ea; color: #17634f; }
.b-st-lost, .b-vs-cancelled, .b-inactive { background: #efece7; color: #7d776d; }
.b-ps-reserved, .b-vs-scheduled, .b-pj-under-construction { background: #faf0dc; color: #94691c; }
.b-ps-sold { background: #f8e3e0; color: #a13a2d; }
.b-ps-rented { background: #e7e9f8; color: #4a4f9e; }
.b-vs-no-show { background: #f8e3e0; color: #a13a2d; }
.b-pj-launching { background: #efe6f8; color: #6c3f99; }
.b-prio-high { background: #f8e3e0; color: #a13a2d; }
.b-prio-medium { background: #faf0dc; color: #94691c; }
.b-prio-low { background: #eef0ee; color: #6c7570; }
.b-role-admin { background: #10251f; color: #e9d3a8; }

/* Target ring */
.target { display: flex; align-items: center; gap: 20px; padding: 10px 0; }
.ring { --p: 0; width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--line-soft) 0); }
.ring span { width: 84px; height: 84px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; }

/* Lead detail */
.stepper { display: flex; gap: 4px; margin-bottom: 18px; overflow-x: auto; }
.step { flex: 1; min-width: 90px; text-align: center; padding: 8px 10px; font-size: .8rem; font-weight: 600; background: #ebe8e1; color: var(--muted); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); }
.step:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.step.done { background: #cfe3dc; color: var(--primary-600); }
.step.current { background: var(--primary); color: #fff; }
.step.lost { background: #e6d9d6; color: #8a3a2f; }
.dl { display: grid; grid-template-columns: minmax(70px, max-content) 1fr; gap: 8px 12px; margin: 0; font-size: .9rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.note { margin-top: 14px; padding: 12px; background: #fbf7ee; border-radius: 9px; font-size: .88rem; border-left: 3px solid var(--accent); }
.stage-form { display: flex; flex-direction: column; gap: 10px; }
[data-show-for] { display: none; }
.mini-prop { display: flex; gap: 12px; color: var(--text); }
.mini-prop:hover { text-decoration: none; }
.mini-prop img { width: 88px; height: 70px; object-fit: cover; border-radius: 8px; background: var(--line-soft); }
.composer { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.composer textarea { border: 0; padding: 4px; resize: vertical; }
.composer textarea:focus { outline: none; box-shadow: none; }
.seg { display: flex; gap: 4px; flex-wrap: wrap; }
.seg input { display: none; }
.seg span { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: .8rem; cursor: pointer; background: var(--line-soft); color: var(--muted); font-weight: 500; }
.seg input:checked + span { background: var(--primary); color: #fff; }

/* Properties */
.prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.prop-grid.small-cards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.prop-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.prop-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,30,25,.08); }
.prop-img { position: relative; aspect-ratio: 16 / 10; background: var(--line-soft); }
.prop-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop-status { position: absolute; left: 10px; top: 10px; }
.prop-status .badge { box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ribbon { position: absolute; right: 10px; top: 10px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.prop-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.small-cards .prop-body { padding: 10px; }
.price { font-weight: 700; color: var(--primary); font-size: 1.05rem; }
.price small { font-weight: 500; color: var(--muted); font-size: .75rem; }
.prop-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.prop-meta .ico { width: 14px; height: 14px; }
.prop-meta span:last-child { margin-left: auto; }
.hero-img { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 8; background: var(--line-soft); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.specs > div { background: var(--bg); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.specs .ico { color: var(--accent); }
.specs span { font-size: .78rem; color: var(--muted); }
.specs strong { font-size: 1.05rem; }
.specs small { color: var(--muted); font-weight: 500; }
.desc { margin: 16px 0 0; color: #3b4541; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { background: var(--primary-50); color: var(--primary-600); padding: 4px 10px; border-radius: 99px; font-size: .8rem; font-weight: 500; }
.agent-row { display: flex; align-items: center; gap: 12px; }

/* Developers */
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.dev-card { display: flex; flex-direction: column; gap: 10px; }
.dev-card p { margin: 0; color: #3b4541; }
.dev-head { display: flex; align-items: center; gap: 12px; }
.dev-logo { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.dev-stats { display: flex; gap: 16px; font-size: .85rem; color: var(--muted); }
.dev-stats b { color: var(--text); }
.dev-projects { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.dev-contact { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); }

/* Filters, chips, tables */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: .84rem; font-weight: 500; }
.chip em { font-style: normal; color: var(--muted); margin-left: 3px; }
.chip:hover { text-decoration: none; border-color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.active em { color: rgba(255,255,255,.75); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; margin-bottom: 16px; }
.filters input[type=search] { flex: 1 1 200px; }
.filters input[type=number] { width: 120px; }
.filters select, .filters input { width: auto; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.inline-filters { display: flex; gap: 8px; }
.seg-links { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.seg-links a { padding: 5px 12px; border-radius: 7px; color: var(--muted); font-weight: 500; font-size: .88rem; }
.seg-links a:hover { text-decoration: none; color: var(--text); }
.seg-links a.active { background: var(--primary-50); color: var(--primary-600); }
.table-card { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fbfaf7; white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr[data-href] { cursor: pointer; }
.table tbody tr:hover { background: #fbfaf7; }
.table tr.inactive { opacity: .55; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: .88rem; }
.pager div { display: flex; align-items: center; gap: 10px; }
.task-group { margin-bottom: 14px; }

/* Forms */
input, select, textarea {
  font: inherit; color: var(--text); width: 100%; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,111,92,.14); }
input[type=color] { padding: 3px; height: 39px; }
input[type=checkbox] { width: auto; }
.form { max-width: 980px; }
.form.narrow { max-width: 640px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: .84rem; font-weight: 500; color: #3b4541; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-4 { grid-column: 1 / -1; }
.form .check-label { flex-direction: row; align-items: center; gap: 8px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line-soft); padding-top: 16px; }

.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; font-size: .9rem; }
.flash-success { background: #dff0ea; color: #17634f; }
.flash-error { background: #f8e3e0; color: #a13a2d; }

/* Calendar */
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h2 { font-size: 1.15rem; min-width: 150px; text-align: center; }
.cal-filters { display: flex; gap: 8px; }
.calendar { padding: 0; overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { padding: 10px; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fbfaf7; border-bottom: 1px solid var(--line); }
.cal-day { min-height: 118px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: #faf9f6; }
.cal-day.out .cal-date span { color: #b5b0a6; }
.cal-date { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; font-weight: 600; margin-bottom: 2px; }
.cal-day.today .cal-date span { background: var(--primary); color: #fff; border-radius: 99px; padding: 1px 7px; }
.cal-add { opacity: 0; color: var(--muted); font-size: 1.05rem; line-height: 1; padding: 0 4px; border-radius: 5px; }
.cal-day:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--line-soft); text-decoration: none; }
.ev { display: block; font-size: .74rem; padding: 3px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.ev:hover { text-decoration: none; filter: brightness(.96); }
.ev-viewing { background: color-mix(in srgb, var(--c) 14%, white); border-left: 3px solid var(--c); }
.ev-viewing.st-cancelled, .ev-viewing.st-no-show { opacity: .5; text-decoration: line-through; }
.ev-task { background: #f4f1ea; color: #5f5a50; }
.ev-task.done { opacity: .5; text-decoration: line-through; }
.agenda { display: none; }
.agenda h3 { margin-top: 18px; }
.agenda h3:first-child { margin-top: 0; }

/* Auth */
.auth-body { background: var(--side); }
.auth-wrap { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-art {
  background: linear-gradient(160deg, rgba(16,37,31,.55), rgba(16,37,31,.92)), url("https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=1400&q=70") center / cover;
  display: flex; align-items: flex-end; padding: 56px; color: #fff;
}
.auth-art-inner { max-width: 460px; }
.auth-art h2 { font-size: 2rem; margin: 22px 0 12px; line-height: 1.15; letter-spacing: -.02em; }
.auth-art p { color: #cfdad5; margin: 0; }
.auth-panel { background: var(--bg); display: grid; place-items: center; padding: 32px 20px; }
.auth-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.auth-form h1 { font-size: 1.5rem; }
.auth-form p { margin: 0; }
.auth-form label { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; font-weight: 500; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 6px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-buttons .btn { flex-direction: column; gap: 2px; padding: 12px; white-space: normal; }
.demo-buttons small { color: var(--muted); font-weight: 400; font-size: .75rem; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 10px 16px; gap: 8px; }
  .user-meta { display: none; }
  .content { padding: 18px 16px 48px; }
  .calendar { display: none; }
  .agenda { display: block; }
}
@media (max-width: 600px) {
  .kpis > * { flex-basis: 140px; }
  .kpi strong { font-size: 1.35rem; }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .form-grid.two { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .filters > * { flex: 1 1 140px; }
  .filters input[type=number] { width: auto; }
  .funnel-row { grid-template-columns: 90px 1fr 30px; }
  .demo-buttons { grid-template-columns: 1fr; }
  .page-actions { width: 100%; }
  h1 { font-size: 1.3rem; }
}
