@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #20342f;
  --muted: #708078;
  --line: #e5ebe6;
  --surface: #fff;
  --canvas: #f5f7f3;
  --navy: #173c34;
  --blue: #286b54;
  --blue-dark: #1e5743;
  --teal: #328b72;
  --green: #2b805f;
  --amber: #c28a3d;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font-size: 16px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.app-shell { min-height: 100vh; }
.app-shell[hidden], .login-screen[hidden] { display: none; }
.login-screen { align-items: center; background: radial-gradient(ellipse at top, #e5efe7 0, #f5f7f3 58%); display: flex; justify-content: center; min-height: 100vh; padding: 24px; }
.login-card { background: white; border: 1px solid #edf0f4; border-radius: 14px; box-shadow: 0 18px 55px #18365e12; display: grid; gap: 13px; max-width: 390px; padding: 30px; width: 100%; }
.login-logo { height: 100px; margin: 0 auto 8px; object-fit: contain; width: 88px; }
.login-card .eyebrow { margin: 0; text-align: center; }
.login-card h1 { font-size: 26px; margin: 0; text-align: center; }
.login-description { color: var(--muted); font-size: 13px; margin: -5px 0 5px; text-align: center; }
.login-card > small { color: #98a2b1; font-size: 12px; text-align: center; }
.login-submit { width: 100%; }
.login-error { background: #fff0ef; border-radius: 6px; color: #b34e47; font-size: 12.5px; margin: 0; padding: 9px; }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  bottom: 0;
  display: flex;
  flex-direction: column;
  left: 0;
  overflow-y: auto;
  padding: 23px 15px 15px;
  position: fixed;
  top: 0;
  width: 252px;
  z-index: 10;
}
.brand { align-items: center; display: flex; gap: 10px; margin: 0 7px 35px; }
.brand-mark { background: #fff; border-radius: 7px; display: block; flex: 0 0 39px; height: 39px; overflow: hidden; width: 39px; }
.brand-mark img { display: block; height: 51px; object-fit: cover; object-position: center top; width: 39px; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-copy strong { color: var(--navy); font: 800 23px/1 "Manrope", sans-serif; letter-spacing: -.8px; }
.brand-copy small { color: #8791a0; font-size: 11px; font-weight: 700; letter-spacing: 1.05px; }
.workspace-label, .sidebar-section-heading, .eyebrow { color: #9aa3b1; font-size: 12px; font-weight: 700; letter-spacing: 1.05px; }
.workspace-label { margin: 0 9px 11px; }
.main-nav { display: grid; gap: 4px; }
.nav-link { align-items: center; border-radius: 8px; color: #687489; display: flex; gap: 11px; min-height: 39px; padding: 0 10px; transition: background .15s, color .15s; }
.nav-link:hover { background: #f4f7fb; color: var(--navy); }
.nav-link.active { background: #eaf2ed; color: #225d48; font-weight: 600; }
.nav-icon { align-items: center; display: inline-flex; font-size: 21px; justify-content: center; width: 20px; }
.nav-count { background: #edf0f5; border-radius: 20px; color: #7d8798; font-size: 12.5px; margin-left: auto; min-width: 22px; padding: 3px 6px; text-align: center; }
.nav-dot, .priority-dot { border-radius: 50%; display: inline-block; height: 7px; width: 7px; }
.nav-dot { background: #c28a3d; margin-left: auto; margin-right: 4px; }
.sidebar-section-heading { align-items: center; display: flex; justify-content: space-between; margin: 32px 8px 10px; }
.icon-button { align-items: center; background: transparent; border: 0; border-radius: 8px; color: #8290a3; cursor: pointer; display: inline-flex; font-size: 22px; height: 36px; justify-content: center; width: 36px; }
.icon-button:hover { background: #f1f5fa; color: var(--blue); }
.icon-button.small { font-size: 20px; height: 25px; width: 25px; }
.recent-clients { display: grid; gap: 2px; }
.recent-client { align-items: center; background: transparent; border: 0; border-radius: 8px; cursor: pointer; display: flex; gap: 9px; min-width: 0; padding: 8px; text-align: left; width: 100%; }
.recent-client:hover { background: #f6f8fb; }
.recent-client-name { color: #536075; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { align-items: center; border-radius: 50%; display: inline-flex; flex: 0 0 auto; font-size: 12.5px; font-weight: 700; height: 32px; justify-content: center; width: 32px; }
.avatar-blue { background: #e7efff; color: #376bc0; }
.avatar-green { background: #e3f4ef; color: #218468; }
.avatar-orange { background: #fff0df; color: #c0782f; }
.avatar-violet { background: #f0eaff; color: #7957b7; }
.avatar-rose { background: #fceaf0; color: #b65778; }
.avatar-user { background: #193f36; color: white; }
.sidebar-bottom { margin-top: auto; }
.help-card { background: #f3f6f2; border: 1px solid #e7ece7; border-radius: 10px; display: grid; gap: 7px; margin: 25px 1px 14px; padding: 14px; }
.help-icon { align-items: center; background: #e6efff; border-radius: 8px; color: #3475d2; display: inline-flex; font-size: 15px; font-weight: 700; height: 25px; justify-content: center; width: 25px; }
.help-card strong { font-size: 13px; }
.help-card > span:not(.help-icon) { color: var(--muted); font-size: 12.5px; }
.help-card a { color: #286dc8; font-size: 12.5px; font-weight: 600; margin-top: 3px; }
.profile-button { align-items: center; background: transparent; border: 0; border-top: 1px solid var(--line); cursor: pointer; display: flex; gap: 9px; padding: 14px 3px 2px; text-align: left; width: 100%; }
.profile-copy { display: grid; gap: 3px; }
.profile-copy strong { font-size: 13px; }
.profile-copy small { color: var(--muted); font-size: 12.5px; }
.profile-menu { color: #8791a0; font-size: 22px; margin-left: auto; }

.main-content { margin-left: 252px; min-height: 100vh; }
.topbar { align-items: center; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); display: flex; height: 62px; justify-content: space-between; padding: 0 34px; position: sticky; top: 0; z-index: 5; }
.breadcrumbs { align-items: center; color: #9aa3b1; display: flex; gap: 10px; }
.breadcrumbs strong { color: #46546a; font-weight: 600; }
.topbar-actions { align-items: center; display: flex; gap: 17px; }
.demo-badge { align-items: center; background: #edf5ef; border-radius: 20px; color: #346b51; display: flex; font-size: 13px; gap: 7px; padding: 7px 10px; }
.demo-badge > span { background: #4b9b70; border-radius: 50%; height: 7px; width: 7px; }
.notification-button { font-size: 20px; position: relative; }
.notification-button i { background: #ea786f; border: 2px solid white; border-radius: 50%; height: 8px; position: absolute; right: 8px; top: 7px; width: 8px; }
.topbar-divider { background: var(--line); height: 25px; width: 1px; }
.top-avatar { height: 31px; width: 31px; }
.menu-toggle { display: none; }
.page-content { margin: 0 auto; max-width: 1530px; padding: 30px 35px 22px; }
.welcome-row { align-items: center; display: flex; justify-content: space-between; margin-bottom: 25px; }
.welcome-row .eyebrow { margin: 0 0 8px; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: "Manrope", sans-serif; }
h1 { color: #1b352e; font-size: clamp(24px, 2.1vw, 31px); letter-spacing: -.8px; margin-bottom: 6px; }
h1 span { color: #e8b055; font-size: 19px; vertical-align: 4px; }
.page-subtitle { color: var(--muted); font-size: 15px; margin-bottom: 0; }
.button { align-items: center; border: 1px solid transparent; border-radius: 7px; cursor: pointer; display: inline-flex; font-size: 13px; font-weight: 600; gap: 8px; justify-content: center; min-height: 37px; padding: 0 14px; transition: transform .15s, background .15s; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--blue); box-shadow: 0 4px 10px #2674dd24; color: white; }
.button-primary:hover { background: var(--blue-dark); }
.button-primary > span { font-size: 19px; font-weight: 400; }
.button-quiet { background: white; border-color: var(--line); color: #526075; }

.metric-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 17px; }
.metric-card, .panel { background: var(--surface); border: 1px solid #edf0f4; border-radius: 10px; box-shadow: 0 2px 8px #1b2b4507; }
.metric-card { min-height: 147px; overflow: hidden; padding: 16px 17px 13px; position: relative; }
.metric-top { align-items: center; display: flex; justify-content: space-between; }
.metric-icon { align-items: center; border-radius: 8px; display: flex; font-size: 19px; height: 31px; justify-content: center; width: 31px; }
.metric-icon.blue { background: #e9f2ec; color: #286b54; }
.metric-icon.amber { background: #fbf3e6; color: #a87631; }
.metric-icon.violet { background: #eff0e8; color: #6f7950; }
.metric-icon.green { background: #e9f4ed; color: #2b805f; }
.metric-change { border-radius: 20px; font-size: 12px; font-weight: 600; padding: 5px 7px; }
.metric-change.positive { background: #edf8f3; color: #298567; }
.metric-change.neutral { background: #f1f4f8; color: #7f8a9a; }
.metric-label { color: #718078; font-size: 13px; margin: 11px 0 3px; }
.metric-value { color: #1c2b45; font: 700 26px/1.15 "Manrope", sans-serif; letter-spacing: -.7px; }
.metric-total { color: #a0a8b3; font: 500 15px "DM Sans", sans-serif; letter-spacing: 0; }
.metric-foot { color: #8a968f; font-size: 12.5px; margin: 6px 0 0; }
.metric-foot b { color: #606d80; font-weight: 600; }
.metric-spark { bottom: 14px; height: 24px; opacity: .55; position: absolute; right: 15px; width: 70px; }
.spark-blue { background: linear-gradient(140deg, transparent 47%, #a8c9fc 48% 52%, transparent 53%), linear-gradient(165deg, transparent 38%, #a8c9fc 39% 43%, transparent 44%); }
.spark-amber { background: linear-gradient(140deg, transparent 47%, #f3d19b 48% 52%, transparent 53%), linear-gradient(165deg, transparent 38%, #f3d19b 39% 43%, transparent 44%); }
.spark-violet { background: linear-gradient(140deg, transparent 47%, #c9b9f0 48% 52%, transparent 53%), linear-gradient(165deg, transparent 38%, #c9b9f0 39% 43%, transparent 44%); }
.progress-track { background: #edf1f5; border-radius: 5px; height: 4px; margin-top: 9px; overflow: hidden; }
.progress-track span { background: #39a880; border-radius: inherit; display: block; height: 100%; }

.dashboard-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .9fr); margin-bottom: 16px; }
.panel { min-width: 0; padding: 19px; }
.panel-heading { align-items: flex-start; display: flex; justify-content: space-between; gap: 12px; }
.panel-heading h2, .campaign-card h2 { color: #20382f; font-size: 17px; letter-spacing: -.25px; margin: 0 0 5px; }
.panel-heading p { color: #849188; font-size: 13px; margin: 0; }
.text-link { color: #286b54; font-size: 13px; font-weight: 600; padding-top: 3px; white-space: nowrap; }
.export-button { background: transparent; border: 0; cursor: pointer; font-family: inherit; }
.text-link span, .panel-bottom-link span { font-size: 16px; margin-left: 3px; vertical-align: -1px; }
.table-toolbar { align-items: center; display: flex; gap: 8px; margin: 18px 0 10px; }
.search-box { align-items: center; background: #fafbfd; border: 1px solid #edf0f4; border-radius: 6px; color: #98a2b1; display: flex; flex: 1; gap: 8px; height: 34px; min-width: 120px; padding: 0 9px; }
.search-box > span { font-size: 20px; line-height: 1; }
.search-box input { background: transparent; border: 0; color: var(--ink); flex: 1; font-size: 12.5px; min-width: 50px; outline: none; }
.search-box input::placeholder { color: #a7afba; }
kbd { background: white; border: 1px solid #e8ecf1; border-radius: 4px; color: #a0a8b3; font: 12px "DM Sans", sans-serif; padding: 2px 4px; }
.filter-button { align-items: center; background: white; border: 1px solid var(--line); border-radius: 6px; color: #738095; cursor: pointer; display: flex; font-size: 16px; gap: 6px; height: 34px; padding: 0 10px; }
.filter-button span { font-size: 12.5px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.filter-chip { background: white; border: 1px solid var(--line); border-radius: 20px; color: #778396; cursor: pointer; font-size: 12px; padding: 5px 9px; }
.filter-chip.selected { background: #eaf2ed; border-color: #d5e5d9; color: #225d48; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; min-width: 630px; width: 100%; }
th { border-bottom: 1px solid #edf0f4; color: #a0a8b3; font-size: 11px; font-weight: 700; letter-spacing: .65px; padding: 10px 8px; text-align: left; white-space: nowrap; }
td { border-bottom: 1px solid #f0f2f5; color: #586579; font-size: 12.5px; padding: 10px 8px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.client-cell { align-items: center; display: flex; gap: 8px; min-width: 180px; }
.client-cell-copy { display: grid; gap: 3px; }
.client-cell-copy strong { color: #334158; font-size: 12.5px; font-weight: 600; }
.client-cell-copy small { color: #9ba4b1; font-size: 12px; }
.client-cell-copy small.client-address { color: #6b7686; }
.status-pill { border-radius: 20px; display: inline-block; font-size: 12px; padding: 4px 8px; }
.status-active { background: #edf8f3; color: #328365; }
.status-prospect { background: #edf4ff; color: #3b72bd; }
.status-renewal { background: #fff5e8; color: #b77a27; }
.row-menu { background: transparent; border: 0; color: #9ba4b1; cursor: pointer; font-size: 19px; }
.table-footer { align-items: center; border-top: 1px solid #f0f2f5; color: #9ba4b1; display: flex; font-size: 12px; justify-content: space-between; margin-top: 3px; padding: 10px 7px 0; }
.pagination-button, .more-button { background: transparent; border: 1px solid var(--line); border-radius: 6px; color: #8792a3; cursor: pointer; height: 27px; width: 29px; }
.pagination-button:disabled { cursor: default; opacity: .5; }
.empty-state { align-items: center; color: #8a95a5; display: flex; flex-direction: column; padding: 33px 10px; }
.empty-state[hidden] { display: none; }
.empty-state > span { font-size: 27px; }
.empty-state strong { color: #4f5d72; font-size: 13px; margin-top: 5px; }
.empty-state p { font-size: 12.5px; margin: 5px 0 0; }

.activity-panel { display: flex; flex-direction: column; }
.more-button { border-color: transparent; font-size: 21px; height: 25px; line-height: 1; width: 27px; }
.activity-list { margin-top: 13px; }
.activity-list { max-height: 360px; overflow: auto; }
.activity-item { align-items: flex-start; border-bottom: 1px solid #f0f2f5; display: flex; gap: 10px; padding: 13px 0; }
.activity-item:last-child { border-bottom: 0; }
.activity-marker { align-items: center; border-radius: 8px; display: flex; flex: 0 0 auto; font-size: 16px; height: 30px; justify-content: center; width: 30px; }
.marker-blue { background: #edf4ff; color: #3478d9; }
.marker-purple { background: #f2edff; color: #8360c7; }
.marker-orange { background: #fff4e7; color: #c98330; }
.activity-copy { display: grid; flex: 1; gap: 4px; min-width: 0; }
.activity-copy strong { color: #405069; font-size: 12.5px; font-weight: 600; }
.activity-copy > span { color: #909aaa; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy small { align-items: center; color: #8d97a6; display: flex; font-size: 12px; gap: 5px; }
.priority-dot { height: 6px; width: 6px; }
.priority-dot.high { background: #e27a72; }
.priority-dot.medium { background: #e8af54; }
.priority-dot.low { background: #58ae8a; }
.check-button { background: transparent; border: 0; color: #bcc4cf; cursor: pointer; font-size: 19px; line-height: 1; padding: 0 1px; }
.check-button:hover, .check-button.done { color: #29a278; }
.activity-item.completed .activity-copy { opacity: .55; text-decoration: line-through; }
.panel-bottom-link { border-top: 1px solid #f0f2f5; color: #3475ce; display: block; font-size: 12.5px; font-weight: 600; margin-top: auto; padding: 13px 0 0; }

.bottom-grid { display: grid; gap: 16px; grid-template-columns: 1.1fr 1.1fr .9fr; }
.renewals-panel, .opportunity-panel { min-height: 228px; }
.renewal-summary { align-items: center; display: flex; justify-content: space-between; margin-top: 21px; }
.renewal-number { display: grid; gap: 3px; }
.renewal-number strong { color: #23334d; font: 700 27px "Manrope", sans-serif; }
.renewal-number span { color: #909aaa; font-size: 12px; }
.renewal-date { align-items: center; background: #fafbfd; border: 1px solid #f0f2f5; border-radius: 7px; display: flex; gap: 8px; padding: 9px; }
.calendar-icon { align-items: center; background: #fff1e3; border-radius: 7px; color: #cf8a38; display: flex; font-size: 18px; height: 29px; justify-content: center; width: 29px; }
.renewal-date > span:last-child { display: grid; gap: 4px; }
.renewal-date strong { color: #58667a; font-size: 12px; }
.renewal-date small { color: #a0a8b3; font-size: 11px; }
.renewal-bars { align-items: end; border-bottom: 1px solid #edf0f4; display: flex; gap: 16px; height: 62px; justify-content: center; margin: 14px 0 0; }
.renewal-bars div { align-items: center; display: flex; flex: 1; flex-direction: column; height: 100%; justify-content: end; max-width: 43px; }
.renewal-bars div > span { background: #dce8f8; border-radius: 4px 4px 0 0; display: block; min-height: 8px; width: 20px; }
.renewal-bars div > span.bar-current { background: #4382da; }
.renewal-bars small { color: #a0a8b3; font-size: 11px; padding: 4px 0; }
.opportunity-total { align-items: center; display: flex; gap: 10px; margin: 22px 0 14px; }
.opportunity-total > strong { color: #23334d; font: 700 26px "Manrope", sans-serif; letter-spacing: -.6px; }
.pipeline { border-radius: 10px; display: flex; gap: 4px; height: 9px; overflow: hidden; }
.pipeline > span { border-radius: 5px; }
.pipeline-new { background: #5e91e4; flex: 8; }
.pipeline-contact { background: #43b7aa; flex: 6; }
.pipeline-proposal { background: #a18bdd; flex: 7; }
.pipeline-review { background: #edb35d; flex: 3; }
.pipeline-legend { display: grid; gap: 9px 6px; grid-template-columns: 1fr 1fr; margin: 13px 0 14px; }
.pipeline-legend span { align-items: center; color: #8490a1; display: flex; font-size: 11px; gap: 5px; }
.pipeline-legend b { color: #5f6d81; font-size: 12px; margin-left: auto; }
.legend-dot { border-radius: 3px; height: 7px; width: 7px; }
.campaign-card { background: linear-gradient(145deg, #173c34, #285b48); border-radius: 10px; box-shadow: 0 6px 16px #183e311a; color: white; min-height: 228px; overflow: hidden; padding: 20px; position: relative; }
.campaign-decoration { color: #ffffff1a; font-size: 95px; line-height: 1; position: absolute; right: 7px; top: 2px; transform: rotate(-12deg); }
.campaign-kicker { color: #c1d7c5; font-size: 12px; font-weight: 700; letter-spacing: .9px; position: relative; }
.campaign-card h2 { color: white; font-size: 17px; line-height: 1.4; margin: 13px 0 7px; max-width: 230px; position: relative; }
.campaign-card p { color: #d9e6dc; font-size: 12.5px; line-height: 1.55; margin-bottom: 14px; max-width: 240px; position: relative; }
.campaign-highlights { display: grid; gap: 8px; margin-top: 16px; position: relative; }
.campaign-highlights span { align-items: center; color: #d9e6dc; display: flex; font-size: 12.5px; gap: 7px; }
.campaign-highlights i { align-items: center; background: #ffffff20; border-radius: 50%; color: #b3e5d5; display: inline-flex; font-size: 11px; font-style: normal; height: 15px; justify-content: center; width: 15px; }
.page-footer { align-items: center; color: #a0a8b3; display: flex; font-size: 12px; justify-content: space-between; padding: 21px 2px 0; }

.client-dialog { border: 0; border-radius: 13px; box-shadow: 0 22px 70px #182a4540; color: var(--ink); max-width: calc(100vw - 28px); padding: 0; width: 510px; }
.client-dialog::backdrop { background: #10213b75; backdrop-filter: blur(2px); }
.client-dialog form { padding: 25px; }
.dialog-heading { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 20px; }
.dialog-heading .eyebrow { margin: 0 0 6px; }
.dialog-heading h2 { font: 700 22px "Manrope", sans-serif; margin: 0 0 4px; }
.dialog-heading p { color: var(--muted); font-size: 13px; margin: 0; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.field { color: #56647a; display: grid; font-size: 12.5px; font-weight: 600; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field input, .field select { background: #fbfcfe; border: 1px solid #e5eaf0; border-radius: 6px; color: #324159; height: 37px; outline: none; padding: 0 10px; width: 100%; }
.field input:focus, .field select:focus { border-color: #7ba9e7; box-shadow: 0 0 0 3px #2674dd16; }
.field input::placeholder { color: #aab2bd; }
.field select { appearance: auto; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 23px; }
.toast { background: #18385f; border-radius: 7px; bottom: 22px; box-shadow: 0 8px 22px #142a4b30; color: white; font-size: 13px; left: 50%; opacity: 0; padding: 11px 16px; pointer-events: none; position: fixed; transform: translate(-50%, 10px); transition: opacity .2s, transform .2s; z-index: 20; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.panel-add-button { background: transparent; border: 0; cursor: pointer; text-align: left; width: 100%; }
.panel-add-button:hover { color: var(--blue-dark); }
.module-add-button { font-size: 12px; min-height: 29px; margin: 13px 0 5px; padding: 0 9px; }
.record-list { display: grid; gap: 7px; margin: 8px 0 12px; max-height: 135px; overflow: auto; }
.record-row { align-items: center; border-bottom: 1px solid #f0f2f5; display: flex; gap: 8px; min-width: 0; padding: 7px 0; }
.record-row-copy { display: grid; flex: 1; gap: 3px; min-width: 0; }
.record-row-copy strong { color: #506078; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-row-copy small { color: #9aa3b1; font-size: 11px; }
.record-row-actions { display: flex; gap: 2px; }
.record-row-actions button { background: transparent; border: 0; color: #8692a3; cursor: pointer; font-size: 12.5px; padding: 4px; }
.record-row-actions button:hover { color: var(--blue); }
.record-empty { color: #a0a8b3; font-size: 12px; padding: 8px 0; }
.activity-item .activity-copy { cursor: default; }
.activity-item[data-id] { position: relative; }
.activity-actions { align-items: center; display: flex; gap: 4px; }
.activity-actions button { background: transparent; border: 0; color: #98a2b1; cursor: pointer; font-size: 14px; padding: 2px; }

.welcome-row { background: linear-gradient(105deg, #eaf2ed 0%, #f4f3e9 100%); border: 1px solid #e3ebe3; border-left: 3px solid #c28a3d; border-radius: 11px; padding: 21px 23px; }
.metric-card { border-color: #e8ede8; border-radius: 11px; }
.panel { border-color: #e7ece7; border-radius: 11px; }
.button { font-size: 14px; min-height: 40px; }
.panel-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.panel-actions .button { white-space: nowrap; }
.panel-actions .export-button { padding: 7px 0; }
.nav-link { font-size: 15px; min-height: 42px; }
.sidebar-section-heading, .workspace-label, .eyebrow { font-size: 12.5px; }
.client-cell-copy strong, td { font-size: 13px; }
th { font-size: 12px; }
.text-link:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #c28a3d80;
  outline-offset: 2px;
}
.import-dialog { max-height: min(90vh, 760px); overflow-y: auto; width: 760px; }
.import-content { padding: 25px; }
.import-guidance { background: #f3f6f2; border: 1px solid #e5ebe5; border-radius: 8px; display: grid; gap: 7px; padding: 13px 15px; }
.import-guidance strong { color: #30493e; font-size: 14px; }
.import-guidance > span { color: #718078; font-size: 13px; line-height: 1.5; }
.import-guidance .text-link { background: transparent; border: 0; cursor: pointer; justify-self: start; padding: 3px 0 0; }
.import-status { color: #52675b; font-size: 14px; margin: 16px 0 9px; }
.import-error { background: #fff0ef; border-radius: 6px; color: #a3423c; font-size: 13px; margin: 0 0 10px; padding: 10px 12px; }
.import-preview-scroll { border: 1px solid #e8ece8; border-radius: 7px; max-height: 300px; overflow: auto; }
.import-preview-table { min-width: 580px; }
.import-preview-table th { background: #f8faf8; position: sticky; top: 0; z-index: 1; }
.import-preview-table td { white-space: normal; }
.import-preview-table td:first-child { color: #859188; width: 60px; }
.import-result { display: inline-block; font-size: 12.5px; line-height: 1.45; }
.import-result.ready, .import-result.imported { color: #287052; }
.import-result.rejected { color: #a3423c; max-width: 260px; }
.import-footnote { color: #7c887f; font-size: 12.5px; margin: 8px 0 0; }
.import-dialog .dialog-actions { position: sticky; background: white; bottom: -1px; padding-top: 12px; }
.import-dialog .button:disabled { cursor: not-allowed; opacity: .55; }

@media (min-width: 1500px) { .page-content { padding-top: 38px; } .metric-card { min-height: 160px; } }
@media (max-width: 1180px) {
  .sidebar { width: 220px; }
  .main-content { margin-left: 220px; }
  .page-content { padding-left: 23px; padding-right: 23px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.45fr) minmax(275px, .9fr); }
  .bottom-grid { grid-template-columns: 1fr 1fr; }
  .campaign-card { grid-column: 1 / -1; min-height: 190px; }
}
@media (max-width: 850px) {
  .sidebar { box-shadow: 8px 0 25px #142a4b14; transform: translateX(-105%); transition: transform .2s ease; width: 252px; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: inline-flex; margin-left: -9px; }
  .topbar { gap: 12px; padding: 0 20px; }
  .breadcrumbs { margin-right: auto; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .clients-panel { order: 0; }
  .activity-panel { min-height: 0; }
  .activity-item { padding: 10px 0; }
  .bottom-grid { grid-template-columns: 1fr 1fr; }
  .campaign-card { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .topbar { height: 56px; padding: 0 13px; }
  .topbar-actions { gap: 9px; }
  .demo-badge { font-size: 0; height: 28px; padding: 0; width: 28px; }
  .demo-badge > span { height: 8px; width: 8px; }
  .topbar-divider { display: none; }
  .top-avatar { height: 28px; width: 28px; }
  .page-content { padding: 23px 13px 17px; }
  .welcome-row { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 18px; padding: 17px 15px; }
  .welcome-row .button { align-self: stretch; }
  h1 { font-size: 24px; }
  .metric-grid { gap: 9px; grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 136px; padding: 13px; }
  .metric-spark { opacity: .35; right: 7px; width: 48px; }
  .panel { padding: 15px 13px; }
  .bottom-grid { grid-template-columns: 1fr; }
  .campaign-card { grid-column: auto; min-height: 218px; }
  .page-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
  .table-toolbar { gap: 5px; }
  .panel-actions { align-items: flex-start; flex-direction: column; gap: 5px; }
  .panel-actions .button { min-height: 34px; }
  .search-box { padding: 0 7px; }
  .search-box input { font-size: 12px; }
  kbd { display: none; }
  .renewal-summary { align-items: flex-start; flex-direction: column; gap: 12px; }
  .renewal-date { width: 100%; }
  .import-content { padding: 19px 15px; }
  .import-dialog .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
}
/* Prioridades de hoy, botones de contacto e historial (agency.js) */
.today-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.today-panel { display: flex; flex-direction: column; }
.today-panel .panel-heading p { font-size: 13px; }
.today-count { background: #e8f2ec; border-radius: 20px; color: var(--blue-dark); font-size: 14px; font-weight: 700; min-width: 28px; padding: 3px 9px; text-align: center; }
.today-list { display: grid; gap: 2px; margin-top: 12px; }
.today-item { border-bottom: 1px solid #f0f2f5; display: grid; gap: 6px 8px; grid-template-columns: minmax(0, 1fr) auto; padding: 9px 0; }
.today-copy { display: grid; gap: 3px; min-width: 0; }
.today-copy strong { color: #2c3d36; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-copy small { color: #75847b; font-size: 13px; line-height: 1.35; }
.today-badge { align-self: start; background: #eef3ff; border-radius: 20px; color: #3a5bbf; font-size: 12.5px; font-weight: 700; padding: 3px 8px; white-space: nowrap; }
.today-badge.late, .today-item.late .today-badge { background: #fdecec; color: #b42318; }
.today-badge.soon { background: #fff4e5; color: #9a5b00; }
.today-actions { display: flex; flex-wrap: wrap; gap: 5px; grid-column: 1 / -1; }
.today-empty { color: #8a95a5; font-size: 13px; padding: 14px 0; }
.contact-buttons { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.contact-button { align-items: center; background: white; border: 1px solid #dfe6e1; border-radius: 6px; color: #3d5a4f; cursor: pointer; display: inline-flex; font-size: 13px; font-weight: 600; min-height: 28px; padding: 0 9px; white-space: nowrap; }
.contact-button:hover { border-color: var(--blue); color: var(--blue-dark); }
.contact-button.call { background: var(--blue); border-color: var(--blue); color: white; }
.contact-button.call:hover { background: var(--blue-dark); color: white; }
.contact-button.convert { border-color: #c28a3d; color: #8a5a17; }
.contact-button:disabled { opacity: .6; cursor: progress; }
.record-row-actions .contact-buttons .contact-button { min-height: 24px; padding: 0 7px; font-size: 12.5px; }
.contact-missing { color: #a0a9b6; font-size: 12.5px; }
.history-content { padding: 25px; }
.history-list { display: grid; gap: 4px; max-height: 55vh; overflow: auto; }
.history-item { border-bottom: 1px solid #f0f2f5; display: grid; gap: 10px; grid-template-columns: 26px 1fr; padding: 9px 0; }
.history-item strong { display: block; font-size: 14px; }
.history-item small { color: #8a95a5; font-size: 13px; }
.history-item p { background: #f4f7f5; border-radius: 8px; font-size: 14px; margin: 6px 0 0; padding: 8px 10px; }
.history-icon { color: var(--blue); font-size: 19px; }
.sms-hint { color: #8a95a5; font-size: 12.5px; grid-column: 1 / -1; margin: 0; }
#sms-text { border: 1px solid #dfe6e1; border-radius: 7px; font: inherit; font-size: 15px; font-weight: 400; line-height: 1.45; padding: 10px; resize: vertical; }
#sms-template { border: 1px solid #dfe6e1; border-radius: 7px; font-size: 14px; min-height: 36px; padding: 0 8px; }
@media (max-width: 1280px) { .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .today-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }

/* Lectura cómoda: en teléfonos, los campos usan 16 px para que el iPhone no haga zoom al tocarlos */
@media (max-width: 600px) { input, select, textarea { font-size: 16px !important; } }
.client-cell-copy .contact-buttons { margin-top: 5px; }
.client-cell-copy .contact-button { font-size: 12px; min-height: 26px; padding: 0 8px; }
/* Tabla de clientes con texto más grande: la dirección se ajusta y las acciones van en columna */
#clientes-tabla td:first-child { white-space: normal; }
#clientes-tabla .client-cell-copy small { overflow-wrap: anywhere; }
#clientes-tabla td:last-child .record-row-actions { flex-direction: column; align-items: flex-end; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Tabletas y teléfonos: cada cliente como tarjeta, sin desplazamiento lateral */
@media (max-width: 1180px) {
  #clientes-tabla { min-width: 0; }
  #clientes-tabla thead { display: none; }
  #clientes-tabla tbody tr { border-bottom: 1px solid #f0f2f5; display: grid; gap: 6px 12px; grid-template-columns: minmax(0, 1fr) auto; padding: 12px 0; }
  #clientes-tabla td { border: 0; display: block; padding: 0; white-space: normal; }
  #clientes-tabla td:first-child, #clientes-tabla td:last-child { grid-column: 1 / -1; }
  #clientes-tabla td:nth-child(2)::before { color: #8a95a5; content: "Ramo: "; }
  #clientes-tabla td:nth-child(3) { justify-self: end; }
  #clientes-tabla td:nth-child(4)::before { color: #8a95a5; content: "Renovación: "; }
  #clientes-tabla td:last-child .record-row-actions { flex-direction: row; justify-content: flex-start; padding-left: 44px; }
  #clientes-tabla .client-cell { min-width: 0; }
}
.contact-button.whatsapp { border-color: #b7e4c7; color: #1f7a45; }

/* ---- Voice assistant (🎤) and app install ---- */
.login-screen:not([hidden]) ~ .voice-fab, .login-screen:not([hidden]) ~ .voice-panel { display: none; }
.voice-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 62px; height: 62px; border-radius: 50%; border: 0;
  background: var(--navy); color: #fff; font-size: 28px; box-shadow: 0 10px 28px rgba(23, 60, 52, .35); cursor: pointer; }
.voice-fab.listening, .voice-mic.listening { background: #c0392b; animation: voice-pulse 1.2s ease-in-out infinite; }
@keyframes voice-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, .45); } 50% { box-shadow: 0 0 0 14px rgba(192, 57, 43, 0); } }
.voice-panel { position: fixed; right: 20px; bottom: 94px; z-index: 60; width: min(400px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 120px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 48px rgba(0, 0, 0, .18); }
.voice-panel[hidden] { display: none; }
.voice-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.voice-head strong { flex: 1; color: var(--navy); }
.voice-lang button { border: 1px solid var(--line); background: #fff; padding: 4px 9px; font-weight: 700; cursor: pointer; color: var(--muted); }
.voice-lang button:first-child { border-radius: 8px 0 0 8px; }
.voice-lang button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.voice-lang button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.voice-close { border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted); }
.voice-log { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.voice-msg { padding: 9px 12px; border-radius: 12px; max-width: 88%; white-space: pre-wrap; line-height: 1.4; }
.voice-msg.user { align-self: flex-end; background: var(--navy); color: #fff; }
.voice-msg.user.live { opacity: .7; font-style: italic; }
.voice-msg.assistant { align-self: flex-start; background: var(--canvas); color: var(--ink); }
.voice-msg.thinking { color: var(--muted); font-style: italic; }
.voice-msg.error { background: #fdecea; color: #8a2d22; }
.voice-msg.hint { align-self: stretch; max-width: none; background: none; color: var(--muted); font-size: 14px; text-align: center; }
.voice-confirm { padding: 10px 14px; border-top: 1px solid var(--line); background: #fbfaf5; }
.voice-confirm p { margin: 0 0 8px; }
.voice-confirm textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 8px; font: inherit; resize: vertical; }
.voice-confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.voice-input { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.voice-input input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; }
.voice-mic { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; font-size: 20px; cursor: pointer; flex: none; }
.voice-send { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 0 12px; font-weight: 600; cursor: pointer; }
.voice-speak { display: flex; align-items: center; gap: 6px; padding: 0 14px 12px; font-size: 13px; color: var(--muted); }
.install-button { white-space: nowrap; }
@media (max-width: 600px) {
  .voice-panel { right: 12px; left: 12px; width: auto; bottom: 88px; }
  .voice-fab { right: 16px; bottom: 16px; }
}
.login-copyright { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }

/* ---- Product: sign-up, demo, team, settings, owner console ---- */
.login-card { display: grid; gap: 10px; }
.auth-form { display: grid; gap: 12px; }
.auth-form[hidden] { display: none; }
.auth-switch { display: flex; justify-content: center; }
.auth-switch .text-link { background: none; border: 0; cursor: pointer; }
.demo-button { width: 100%; background: #fbf4e8; border-color: #ecd7b5; color: #8a5a17; }
.demo-button:hover { background: #f6ead4; }
.admin-section { margin-top: 18px; }
.admin-section .form-grid { margin-top: 14px; }
.admin-section h3 { margin: 18px 0 0; font-size: 15px; color: #20382f; }
#me-form { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 4px; }
.account-banner { margin: 18px 0 0; padding: 12px 16px; border-radius: 10px; background: #fbf4e8; border: 1px solid #ecd7b5; color: #7a4f12; font-size: 14px; }
.account-banner.blocked { background: #fdecea; border-color: #f2c4bd; color: #8a2d22; }
.status-inactive, .status-suspended, .status-canceled, .status-past_due { background: #fdecea; color: #a03a2c; }
.status-trial, .status-demo { background: #fbf4e8; color: #8a5a17; }
.data-table td .text-link { background: none; border: 0; cursor: pointer; padding: 0; }
.data-table td small { color: #9ba4b1; }
[hidden] { display: none !important; }
.form-grid .full { grid-column: 1 / -1; }
.brand-copy strong#brand-agency { font-size: 17px; line-height: 1.15; letter-spacing: -.3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.account-banner { margin: 0 0 16px; }
#console-stats .metric-card { min-height: 0; }

/* ---- Lines of business ---- */
.line-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 230px; white-space: normal; }
.line-chip { display: inline-block; border-radius: 12px; padding: 3px 8px; font-size: 11.5px; font-weight: 600; background: #eef2f6; color: #3d4b5f; white-space: nowrap; }
.line-personal { background: #e8f1fb; color: #24548c; }
.line-commercial { background: #f3ecfb; color: #5b3590; }
.line-life { background: #fbf4e8; color: #8a5a17; }
.line-health { background: #e9f6ef; color: #23704b; }
.line-other { background: #f1f1f1; color: #555; }
.client-kind { display: block; margin-top: 4px; color: #9ba4b1; font-size: 11.5px; }
.line-filter { border: 1px solid var(--line); border-radius: 6px; height: 34px; padding: 0 8px; color: #56647a; background: white; font: inherit; font-size: 12.5px; max-width: 220px; }
.lines-picker { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.lines-picker legend { font-size: 12.5px; font-weight: 600; color: #56647a; padding: 0 6px; }
.lines-picker legend small { font-weight: 400; color: #9ba4b1; }
.lines-group { display: grid; gap: 5px; align-content: start; font-size: 13px; color: #4b586c; }
.lines-group strong { color: #20382f; font-size: 13px; }
.lines-group label { display: flex; gap: 6px; align-items: center; }
.lines-all { color: #8791a0; font-style: italic; }
