@import "tailwindcss";

:root {
  --navy-950: #21184f;
  --navy-900: #2b2161;
  --navy-800: #382d78;
  --ink: #24213f;
  --muted: #6f6d80;
  --line: #e0e0ec;
  --panel: #ffffff;
  --canvas: #f5f6fb;
  --coral: #4f4aa4;
  --coral-soft: #efeffb;
  --teal: #3b63ad;
  --teal-soft: #edf2fb;
  --gold: #dca743;
  --gold-soft: #fff7e6;
  --blue: #3b347f;
  --blue-soft: #f0effa;
  --brand: #33266f;
  --brand-deep: #21184f;
  --brand-accent: #5752ad;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; }
.access-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at top, #eef5f7 0, var(--canvas) 48%); }
.access-card { width: min(100%, 440px); padding: 34px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 18px 55px rgba(9, 38, 59, 0.12); text-align: center; }
.access-logo { display: block; width: 82px; height: 82px; margin: 0 auto 18px; object-fit: contain; }
.access-card h1 { margin: 8px 0 10px; color: #153247; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; }
.access-card p { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.access-card .secondary-button { text-decoration: none; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: 244px;
  flex-direction: column;
  overflow-y: auto;
  background: var(--navy-950);
  color: #f7fbfd;
  box-shadow: 14px 0 36px rgba(8, 29, 44, 0.08);
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 94px;
  padding: 16px 17px 13px;
  border-bottom: 1px solid #e5e4ef;
  background: #fbfbfe;
}
.brand-copy { min-width: 0; flex: 1; }
.brand-logo { display: block; width: 174px; height: auto; object-fit: contain; }
.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 11px;
  background: var(--coral);
  color: white;
  font-family: Georgia, serif;
  font-size: 25px;
  font-style: italic;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(245, 111, 95, 0.22);
}
.brand-mark span { margin-left: -2px; font: normal 18px sans-serif; }
.brand-name { font-size: 14px; font-weight: 760; letter-spacing: 0.11em; }
.brand-subtitle { margin: 5px 0 0 49px; color: #716b95; font-size: 10px; font-weight: 760; letter-spacing: 0.18em; }
.main-nav { flex: 1; padding: 24px 12px 18px; }
.nav-label { padding: 0 12px 8px; color: #7992a2; font-size: 9px; font-weight: 800; letter-spacing: 0.19em; }
.nav-section { margin-top: 22px; }
.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #bdcbd4;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}
.nav-item span:nth-child(2) { flex: 1; font-size: 13px; font-weight: 530; }
.nav-item:hover { background: rgba(255, 255, 255, 0.055); color: white; }
.nav-item.active { background: rgba(255, 255, 255, 0.12); color: white; box-shadow: inset 3px 0 #8f8ae0; }
.nav-item.active svg { color: #b6b2f0; }
.nav-badge { color: #819aaa; font-size: 10px !important; font-variant-numeric: tabular-nums; }
.sidebar-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 14px 18px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}
.sidebar-card-icon { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: rgba(245, 111, 95, 0.16); color: #ff9b90; }
.sidebar-card div:nth-child(2) { min-width: 0; flex: 1; }
.sidebar-card strong, .sidebar-card span { display: block; }
.sidebar-card strong { font-size: 11px; }
.sidebar-card span { margin-top: 2px; color: #8ea5b4; font-size: 9px; }
.sidebar-card button { display: grid; width: 27px; height: 27px; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #aebfc9; cursor: pointer; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 15px 18px 20px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.sidebar-user > div:nth-child(2) { min-width: 0; flex: 1; }
.sidebar-user strong, .sidebar-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: 11px; }
.sidebar-user span { margin-top: 2px; color: #8096a5; font-size: 9px; }

.main-area { min-height: 100vh; margin-left: 244px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}
.global-search {
  display: flex;
  min-width: 280px;
  max-width: 440px;
  flex: 1;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid #d6e0e5;
  border-radius: 9px;
  background: #f8fafb;
  color: #81919b;
}
.global-search:focus-within { border-color: #8caab9; background: white; box-shadow: 0 0 0 3px rgba(23, 66, 94, 0.08); }
.global-search input { min-width: 0; flex: 1; padding: 10px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.global-search kbd { padding: 2px 6px; border: 1px solid #dbe3e7; border-radius: 5px; background: white; color: #82909a; font-size: 9px; }
.primary-button, .secondary-button, .period-button, .small-button, .text-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; transition: 160ms ease; }
.primary-button, .secondary-button, .period-button, .small-button { gap: 7px; border-radius: 8px; font-size: 11px; font-weight: 670; }
.primary-button { padding: 10px 14px; background: var(--brand-accent); color: white; box-shadow: 0 5px 16px rgba(51, 38, 111, 0.2); }
.primary-button:hover { background: var(--brand); transform: translateY(-1px); }
.secondary-button, .period-button, .small-button { border: 1px solid #d7e0e5; background: white; color: #425b6a; }
.secondary-button { padding: 9px 13px; }
.secondary-button:hover, .period-button:hover, .small-button:hover { border-color: #aabcc6; background: #f9fbfc; }
.period-button { padding: 9px 12px; }
.small-button { padding: 7px 9px; }
.text-button { background: transparent; color: var(--blue); font-size: 10px; font-weight: 700; }
.text-button:hover { color: #235f95; }
.icon-button { width: 34px; height: 34px; border-radius: 8px; background: transparent; color: #71828d; }
.icon-button:hover { background: #edf2f4; }
.mobile-menu, .sidebar-close { display: none; }
.content-wrap { width: min(100%, 1480px); margin: 0 auto; padding: 31px 30px 46px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 23px; }
.eyebrow, .panel-kicker { color: #7a8a93; font-size: 9px; font-weight: 800; letter-spacing: 0.17em; }
.page-heading h1, .module-placeholder h1 { margin: 6px 0 4px; color: #153247; font-family: Georgia, "Times New Roman", serif; font-size: clamp(26px, 3vw, 35px); font-weight: 500; letter-spacing: -0.025em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 14px; }
.metric-card { display: flex; min-width: 0; align-items: flex-start; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); cursor: pointer; text-align: left; box-shadow: 0 2px 8px rgba(15, 46, 66, 0.025); transition: 170ms ease; }
.metric-card:hover { border-color: #bdcbd2; box-shadow: 0 8px 24px rgba(15, 46, 66, 0.07); transform: translateY(-2px); }
.metric-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 9px; }
.metric-navy { background: #eaf0f4; color: var(--navy-800); }
.metric-teal { background: var(--teal-soft); color: var(--teal); }
.metric-coral { background: var(--coral-soft); color: var(--coral); }
.metric-gold { background: var(--gold-soft); color: var(--gold); }
.metric-copy span, .metric-copy strong, .metric-copy small { display: block; }
.metric-copy span { color: #6f7f89; font-size: 10px; font-weight: 650; }
.metric-copy strong { margin-top: 2px; color: #173448; font-family: Georgia, serif; font-size: 24px; font-weight: 500; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric-copy small { margin-top: 4px; color: #95a1a8; font-size: 9px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(310px, 0.95fr); gap: 14px; margin-bottom: 14px; }
.panel { border: 1px solid var(--line); border-radius: 11px; background: var(--panel); box-shadow: 0 2px 8px rgba(15, 46, 66, 0.025); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 17px 18px 13px; }
.panel-head h2 { margin: 4px 0 0; color: #173448; font-size: 14px; font-weight: 720; }
.stage-chart { display: grid; gap: 11px; padding: 7px 19px 15px; }
.stage-row { display: grid; grid-template-columns: 108px 1fr 25px; align-items: center; gap: 11px; font-size: 10px; }
.stage-label { color: #596f7c; }
.stage-row strong { color: #425966; font-size: 10px; font-variant-numeric: tabular-nums; text-align: right; }
.stage-track { height: 8px; overflow: hidden; border-radius: 999px; background: #eef2f4; }
.stage-bar { height: 100%; border-radius: 999px; }
.tone-slate { background: #91a2ad; }
.tone-green { background: #45a67c; }
.tone-blue { background: #4b8dc8; }
.tone-amber { background: #e3ad4c; }
.tone-purple { background: #8e73b6; }
.tone-coral { background: var(--coral); }
.panel-footnote { display: flex; gap: 8px; padding: 11px 19px 14px; border-top: 1px solid #edf1f3; color: #8b9aa2; font-size: 9px; }
.focus-list { padding: 0 16px 8px; }
.focus-list button { display: grid; width: 100%; grid-template-columns: 52px minmax(0, 1fr) 29px; align-items: center; gap: 10px; padding: 12px 2px; border: 0; border-bottom: 1px solid #edf1f3; background: transparent; cursor: pointer; text-align: left; }
.focus-list button:hover .focus-main strong { color: var(--blue); }
.focus-date { color: #8d9aa2; font-size: 8px; font-weight: 800; letter-spacing: 0.08em; }
.focus-main { min-width: 0; }
.focus-main strong, .focus-main small { display: block; }
.focus-main strong { overflow: hidden; color: #294757; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.focus-main small { margin-top: 3px; color: #8f9ca4; font-size: 8.5px; }
.focus-count { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 7px; font-size: 10px; font-weight: 800; }
.focus-count.coral { background: var(--coral-soft); color: var(--coral); }
.focus-count.amber { background: var(--gold-soft); color: #bd8320; }
.focus-count.blue { background: var(--blue-soft); color: var(--blue); }
.focus-action { width: calc(100% - 32px); margin: 3px 16px 15px; padding: 8px; border: 1px solid #dbe4e8; border-radius: 7px; background: #f8fafb; color: #526c7b; cursor: pointer; font-size: 9px; font-weight: 700; }
.postponed-breakdown { margin: 0 0 6px; padding: 8px 10px 10px; border: 1px solid #eee5d5; border-radius: 9px; background: #fffcf6; }
.postponed-group + .postponed-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid #eee5d5; }
.postponed-group > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.postponed-group > header > strong { color: #8d6828; font-size: 11px; }
.focus-list .postponed-group > header > button { display: inline; width: auto; padding: 0; border: 0; color: #5a5483; font-size: 10px; font-weight: 700; }
.postponed-group > p { margin: 5px 0 0; color: #8e8a82; font-size: 11px; line-height: 1.45; }
.focus-list .postponed-row { grid-template-columns: minmax(0, 1fr) auto; padding: 7px 0; }
.postponed-row > span { min-width: 0; }
.postponed-row b, .postponed-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.postponed-row b { color: #49415f; font-size: 11px; }
.postponed-row small { margin-top: 2px; color: #8d8898; font-size: 10px; }
.postponed-row time { color: #8d6828; font-size: 10px; white-space: nowrap; }
.dashboard-empty { margin: 8px 0; color: #8b9aa2; font-size: 12px; }
.deals-panel { overflow: hidden; }
.table-actions { display: flex; align-items: center; gap: 13px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 18px; border-top: 1px solid #edf1f3; color: #526a77; font-size: 9.5px; text-align: left; white-space: nowrap; }
th { background: #f9fbfb; color: #8a98a0; font-size: 8px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
tbody tr:hover { background: #fbfcfd; }
.clickable-row { cursor: pointer; }
.clickable-row:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; background: var(--blue-soft); }
.deal-name { max-width: 270px; overflow: hidden; color: #24495f; font-weight: 680; text-overflow: ellipsis; }
.align-right { text-align: right; }
.amount-cell { color: #27495d; font-weight: 680; font-variant-numeric: tabular-nums; }
.muted-cell { color: #8c9aa2; }
.owner-cell { display: inline-flex; align-items: center; gap: 7px; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #dce8ed; color: #385c70; font-size: 9px; font-weight: 800; }
.avatar-coral { width: 31px; height: 31px; background: #f49184; color: white; }
.avatar-small { width: 24px; height: 24px; font-size: 7px; }
.status-pill { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 999px; background: #edf2f4; color: #60737e; font-size: 8px; font-weight: 720; }
.stage-cotizado { background: var(--blue-soft); color: #316da4; }
.stage-cerrado-ganado { background: #e9f7f0; color: #2c8962; }
.stage-anulado { background: #edf1f3; color: #70818a; }
.stage-postergado { background: var(--gold-soft); color: #af7920; }
.empty-row { padding: 36px; color: #87959d; text-align: center; }
.module-placeholder { display: flex; min-height: calc(100vh - 150px); align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.placeholder-icon { display: grid; width: 60px; height: 60px; margin-bottom: 18px; place-items: center; border-radius: 16px; background: var(--coral-soft); color: var(--coral); }
.module-placeholder p { max-width: 500px; margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.mobile-overlay { display: none; }

.module-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 21px;
}
.module-heading h1 { margin: 6px 0 3px; color: #153247; font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 3vw, 36px); font-weight: 500; letter-spacing: -0.025em; }
.module-heading p { max-width: 670px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.module-panel { overflow: hidden; min-height: 360px; }
.module-toolbar { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid #e8edef; background: #fbfcfc; }
.module-search { display: flex; min-width: 230px; flex: 1; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #d8e1e5; border-radius: 8px; background: white; color: #809099; }
.module-search input { min-width: 0; flex: 1; padding: 8px 0; border: 0; outline: 0; color: var(--ink); font-size: 10px; }
.filter-select { position: relative; display: flex; min-width: 135px; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid #d8e1e5; border-radius: 8px; background: white; }
.filter-select span { color: #8a989f; font-size: 8px; font-weight: 750; text-transform: uppercase; }
.filter-select select { min-width: 70px; flex: 1; padding: 3px 15px 3px 1px; border: 0; outline: 0; appearance: none; background: transparent; color: #425d6d; font-size: 9px; cursor: pointer; }
.filter-select svg { position: absolute; right: 7px; color: #7e8e97; pointer-events: none; }
.toolbar-count { margin-left: auto; color: #87959d; font-size: 9px; white-space: nowrap; }
.active-filter { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 9px; border: 1px solid #d7d3ed; border-radius: 8px; background: #f3f2fb; color: #4e477f; cursor: pointer; font-size: 11px; font-weight: 700; white-space: nowrap; }
.entity-table th:last-child, .entity-table td:last-child { width: 80px; }
.row-actions { text-align: right; }
.row-actions button, .field-row-actions button { display: inline-grid; width: 27px; height: 27px; margin-left: 3px; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #7b8e98; cursor: pointer; }
.row-actions button:hover, .field-row-actions button:hover { background: #edf2f4; color: #294d62; }
.row-actions button:last-child:hover, .field-row-actions button:last-child:hover { background: #fff0ed; color: var(--coral); }
.inline-state { display: flex; min-height: 315px; align-items: center; justify-content: center; flex-direction: column; padding: 38px 20px; text-align: center; }
.inline-state-icon { display: grid; width: 50px; height: 50px; margin-bottom: 14px; place-items: center; border-radius: 14px; background: #edf3f5; color: #527487; }
.inline-state > strong { color: #244559; font-size: 13px; }
.inline-state p { max-width: 440px; margin: 6px 0 16px; color: #819099; font-size: 10px; line-height: 1.65; }
.loading-rows { padding: 0 18px; }
.loading-rows > div { display: grid; grid-template-columns: 1.5fr 1fr 1fr 0.8fr; gap: 18px; padding: 15px 0; border-bottom: 1px solid #edf1f3; }
.loading-rows span { height: 9px; border-radius: 999px; background: linear-gradient(90deg, #edf1f3, #f7f9fa, #edf1f3); background-size: 220% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }

.segmented-tabs { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid #dce4e8; border-radius: 9px; background: #eef3f5; }
.segmented-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 0; border-radius: 6px; background: transparent; color: #667b87; cursor: pointer; font-size: 9px; font-weight: 700; }
.segmented-tabs button.active { background: white; color: #244b62; box-shadow: 0 1px 4px rgba(21, 50, 71, 0.1); }
.activity-tabs { margin-bottom: 14px; }
.settings-tabs { margin-bottom: 14px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; background: rgba(7, 29, 43, 0.47); backdrop-filter: blur(3px); }
.modal-card { width: min(620px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; border: 1px solid rgba(255, 255, 255, 0.65); border-radius: 14px; background: white; box-shadow: 0 24px 70px rgba(7, 29, 43, 0.24); }
.record-editor-modal { width: min(940px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px 16px; border-bottom: 1px solid #e8edef; }
.modal-head h2 { margin: 0; color: #17374c; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.modal-head p { margin: 4px 0 0; color: #829199; font-size: 9.5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 19px 22px; }
.form-field { display: grid; gap: 6px; }
.form-field.wide { grid-column: 1 / -1; }
.form-field > span, .checkbox-field > span { color: #5c707c; font-size: 9px; font-weight: 720; }
.field-type-hint { display: block; margin-top: 2px; color: #93a0a6; font-size: 7.5px; font-weight: 560; }
.form-field em, .field-row em { margin-left: 2px; color: var(--coral); font-style: normal; }
.form-field input, .form-field select, .form-field textarea { width: 100%; padding: 9px 10px; border: 1px solid #d5dfe4; border-radius: 8px; outline: 0; background: #fbfcfd; color: #284759; font-size: 10px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #7f9eae; background: white; box-shadow: 0 0 0 3px rgba(30, 78, 105, 0.07); }
.form-field input:disabled, .form-field select:disabled, .form-field textarea:disabled { border-color: #e4e9eb; background: #f1f4f5; color: #7d8b92; cursor: not-allowed; }
.checkbox-field { display: flex; align-items: center; gap: 8px; }
.checkbox-field input { accent-color: var(--coral); }
.zoho-checkbox { min-height: 50px; padding: 8px 10px; border: 1px solid #e0e6e9; border-radius: 8px; background: #fbfcfd; }
.zoho-checkbox.wide { grid-column: 1 / -1; }
.multi-field { min-width: 0; margin: 0; padding: 11px; border: 1px solid #d5dfe4; border-radius: 8px; background: #fbfcfd; }
.multi-field.wide { grid-column: 1 / -1; }
.multi-field legend { padding: 0 5px; color: #5c707c; font-size: 9px; font-weight: 720; }
.multi-field legend > span { display: inline; }
.multi-field > div { display: flex; flex-wrap: wrap; gap: 7px 14px; max-height: 150px; overflow-y: auto; }
.multi-field > div label { display: inline-flex; align-items: center; gap: 5px; color: #506875; font-size: 9px; }
.multi-field input { accent-color: var(--coral); }
.form-section-title { grid-column: 1 / -1; margin: 5px 0 -2px; padding-top: 13px; border-top: 1px solid #e8edef; color: #6e7f88; font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.editor-error { display: flex; align-items: center; gap: 7px; margin: 14px 22px 0; padding: 10px 11px; border: 1px solid #efc5bc; border-radius: 8px; background: #fff2ef; color: #a64f40; font-size: 9px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 19px; border-top: 1px solid #edf1f3; }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: 0.48; transform: none; }
.provider-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 22px 18px; padding: 10px 11px; border-radius: 8px; background: #edf5fa; color: #527284; font-size: 9px; line-height: 1.55; }

.record-drawer-backdrop { position: fixed; inset: 0; z-index: 75; display: flex; justify-content: flex-end; background: rgba(7, 29, 43, 0.42); backdrop-filter: blur(2px); }
.record-drawer { display: flex; width: min(760px, 94vw); height: 100%; flex-direction: column; background: #f7f9fa; box-shadow: -22px 0 65px rgba(7, 29, 43, 0.22); }
.record-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 23px 24px 17px; border-bottom: 1px solid var(--line); background: white; }
.record-drawer-head h2 { margin: 7px 0 7px; color: #17374c; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; line-height: 1.18; }
.record-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; color: #7b8b93; font-size: 8.5px; }
.record-drawer-tools { display: flex; align-items: center; gap: 10px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: #fbfcfc; }
.record-drawer-tools .module-search { min-width: 0; }
.record-drawer-scroll { flex: 1; overflow-y: auto; }
.account-photo-card, .account-contacts { margin: 18px 24px 0; border: 1px solid #d9e5e8; border-radius: 11px; background: white; }
.account-photo-card { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; }
.account-photo-preview { display: grid; width: 72px; height: 72px; overflow: hidden; place-items: center; border: 1px solid #e1e5ed; border-radius: 10px; background: #f5f6fb; color: #746f91; }
.account-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.account-photo-preview span { color: #88849b; font-size: 10px; }
.account-photo-copy { display: grid; gap: 4px; min-width: 0; }
.account-photo-copy strong, .account-contacts h3 { color: #30295f; font-size: 14px; }
.account-photo-copy span, .account-photo-copy small, .account-contacts > p { color: #817c98; font-size: 11px; }
.account-photo-copy small { color: #a64f40; }
.account-contacts { padding: 16px; }
.account-contacts h3 { margin: 4px 0 0; }
.account-contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.account-contact-list button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 10px 11px; border: 1px solid #e1e0ec; border-radius: 8px; background: #fafaff; color: #383262; cursor: pointer; font: inherit; font-size: 12px; text-align: left; }
.account-contact-list button:hover { border-color: #aaa6cf; background: #f3f2fb; }
.account-contact-list button svg { flex: none; color: var(--brand-accent); }
.record-notes { margin: 18px 24px 0; border: 1px solid #d9e5e8; border-radius: 11px; background: white; }
.record-notes-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 0; border-radius: 11px; background: white; color: #30295f; cursor: pointer; font: inherit; }
.record-notes-toggle > span { display: flex; align-items: center; gap: 9px; }
.record-notes-toggle > span > svg { color: var(--brand-accent); }
.record-notes-toggle strong { font-size: 14px; }
.record-notes-toggle small { min-width: 24px; padding: 3px 7px; border-radius: 999px; background: #efeff9; color: #5d5788; font-size: 10px; text-align: center; }
.record-notes-toggle > svg { color: #77728f; transition: transform 160ms ease; }
.record-notes-toggle[aria-expanded="true"] > svg { transform: rotate(180deg); }
.record-notes-content { padding: 0 16px 16px; border-top: 1px solid #ecebf3; }
.record-notes-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.record-notes-head { padding-top: 14px; }
.record-notes-head p { margin: 0; color: #778991; font-size: 12px; line-height: 1.45; }
.record-notes-head svg { color: var(--teal); }
.record-notes-content > label { display: grid; gap: 6px; }
.record-notes-content > label > span, .record-notes-history > strong { color: #526c79; font-size: 12px; font-weight: 740; }
.record-notes textarea, .note-title-input, .note-editor input { width: 100%; resize: vertical; border: 1px solid #d8e0e4; border-radius: 8px; padding: 10px 11px; background: #fbfcfc; color: #25485c; font: inherit; font-size: 14px; line-height: 1.5; }
.record-notes-content > label + label { margin-top: 10px; }
.record-notes textarea:focus, .note-title-input:focus, .note-editor input:focus { border-color: #71a2b7; outline: 3px solid rgba(113, 162, 183, 0.14); }
.record-notes .editor-error { margin: 9px 0 0; font-size: 12px; }
.record-notes-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; }
.record-notes-actions small { color: #8a999f; font-size: 11px; }
.record-notes-history { margin-top: 15px; padding-top: 14px; border-top: 1px solid #e8edef; }
.record-notes-history > div { margin-top: 8px; padding: 12px; border-radius: 8px; background: #f5f8f9; color: #365767; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.record-notes-history > p { margin: 8px 0 0; color: #8a999f; font-size: 12px; }
.record-field-grid { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 10px; padding: 18px 24px 28px; }
.record-field { min-width: 0; padding: 12px 13px; border: 1px solid #e0e6e9; border-radius: 9px; background: white; }
.record-field.wide { grid-column: 1 / -1; }
.record-field-label { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.record-field-label > span { color: #72838c; font-size: 8.5px; font-weight: 760; }
.record-field-label small { color: #a0aaaf; font-size: 7px; text-align: right; }
.record-field-value { overflow-wrap: anywhere; color: #294b5f; font-size: 10px; line-height: 1.55; white-space: pre-wrap; }
.record-drawer-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 24px; border-top: 1px solid var(--line); background: white; }
.record-drawer-foot > span { overflow: hidden; color: #8c989e; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.campaign-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr); gap: 14px; margin-bottom: 14px; }
.campaign-status { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; padding: 19px; overflow: hidden; }
.campaign-status::after { position: absolute; right: -30px; bottom: -54px; width: 150px; height: 150px; border-radius: 50%; background: rgba(245, 111, 95, 0.055); content: ""; }
.campaign-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 12px; background: var(--coral-soft); color: var(--coral); }
.campaign-status h2 { margin: 4px 0 5px; color: #17374c; font-size: 15px; }
.campaign-status p { max-width: 570px; margin: 0; color: #758690; font-size: 9px; line-height: 1.6; }
.connection-badge { z-index: 1; padding: 5px 8px; border-radius: 999px; background: var(--gold-soft); color: #ad771c; font-size: 8px; font-weight: 760; white-space: nowrap; }
.safeguards .panel-head svg { color: var(--teal); }
.safeguards ul { display: grid; gap: 10px; margin: 1px 18px 18px; padding: 0; list-style: none; }
.safeguards li { display: flex; align-items: center; gap: 7px; color: #5b717e; font-size: 9px; }
.safeguards li svg { color: var(--teal); }
.campaign-list { display: grid; }
.campaign-list article { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 12px 17px; border-top: 1px solid #edf1f3; color: #6a7d88; font-size: 9px; }
.campaign-list-icon { display: grid; width: 33px; height: 33px; place-items: center; border-radius: 9px; background: var(--blue-soft); color: var(--blue); }
.campaign-list strong, .campaign-list span { display: block; }
.campaign-list strong { color: #294b5f; font-size: 10px; }
.campaign-list article > div:nth-child(2) span { margin-top: 2px; color: #87959d; }

.report-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 9px; margin-bottom: 13px; padding: 12px 14px; }
.report-filters label { display: grid; gap: 5px; min-width: 135px; }
.report-filters label span { color: #829099; font-size: 8px; font-weight: 760; text-transform: uppercase; }
.report-filters input, .report-filters select { min-height: 32px; padding: 7px 9px; border: 1px solid #d8e1e5; border-radius: 7px; background: #fbfcfd; color: #425c6b; font-size: 9px; }
.report-filters button { margin-left: auto; }
.report-notice { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; padding: 10px 13px; border: 1px solid #d8e7ef; border-radius: 9px; background: #f1f7fa; color: #547081; font-size: 9px; }
.report-notice button { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 9px; font-weight: 750; white-space: nowrap; }
.report-warning { border-color: #efd6aa; background: #fff8ea; color: #9a6b1e; }
.report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 13px; }
.report-kpi { display: flex; align-items: center; gap: 11px; padding: 15px; }
.report-kpi span, .report-kpi strong, .report-kpi small { display: block; }
.report-kpi span { color: #70818b; font-size: 9px; font-weight: 680; }
.report-kpi strong { margin-top: 2px; color: #1d3c50; font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.report-kpi small { margin-top: 2px; color: #919da4; font-size: 8px; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-bottom: 13px; }
.report-chart { min-height: 285px; }
.horizontal-bars { display: grid; gap: 10px; padding: 7px 18px 18px; }
.horizontal-bars > div { display: grid; grid-template-columns: 115px 1fr 28px; align-items: center; gap: 9px; color: #607580; font-size: 9px; }
.horizontal-bars > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.horizontal-bars > div > div { height: 8px; overflow: hidden; border-radius: 999px; background: #edf2f4; }
.horizontal-bars i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2d6f96, #4b9bb7); }
.horizontal-bars strong { color: #49616f; font-size: 9px; text-align: right; }
.report-table { overflow: hidden; margin-bottom: 13px; }
.report-detail .panel-head p { margin: 4px 0 0; color: #87959d; font-size: 9px; }
.report-result-count { display: grid; min-width: 35px; height: 35px; place-items: center; border-radius: 9px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 800; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr); gap: 14px; }
.import-card { overflow: hidden; }
.import-card .panel-head svg { color: #587a8d; }
.partial-import { display: flex; align-items: flex-start; gap: 9px; margin: 0 18px 13px; padding: 10px 11px; border: 1px solid #efd9a8; border-radius: 8px; background: #fff9ec; color: #a47524; }
.partial-import svg { flex: 0 0 auto; margin-top: 1px; }
.partial-import strong, .partial-import span { display: block; }
.partial-import strong { font-size: 9.5px; }
.partial-import span { margin-top: 3px; color: #8c7a58; font-size: 8.5px; line-height: 1.5; }
.drop-zone { position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; margin: 0 18px 14px; padding: 27px 18px; border: 1px dashed #b9c8d0; border-radius: 10px; background: #f8fafb; text-align: center; transition: 160ms ease; }
.drop-zone:hover { border-color: #7fa0b1; background: #f4f8fa; }
.drop-zone.has-file { border-style: solid; border-color: #a9d2c9; background: #f2faf8; }
.drop-zone input { display: none; }
.drop-icon { display: grid; width: 43px; height: 43px; margin-bottom: 10px; place-items: center; border-radius: 11px; background: #e8f0f4; color: #497087; }
.has-file .drop-icon { background: #dff2ed; color: var(--teal); }
.drop-zone strong { color: #294a5e; font-size: 11px; }
.drop-zone > span { margin: 3px 0 11px; color: #8c9aa2; font-size: 8.5px; }
.import-status { display: flex; align-items: center; gap: 8px; margin: 0 18px 12px; padding: 9px 10px; border-radius: 8px; background: #edf4f7; color: #537180; font-size: 9px; }
.status-error { background: var(--coral-soft); color: #b45449; }
.status-done { background: var(--teal-soft); color: #297e70; }
.spinner { width: 15px; height: 15px; flex: 0 0 auto; border: 2px solid #bdd0d9; border-top-color: #426f86; border-radius: 50%; animation: spin 0.75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-track { position: relative; height: 8px; margin: 0 18px 14px; overflow: hidden; border-radius: 999px; background: #e7edef; }
.progress-track div { height: 100%; border-radius: inherit; background: var(--teal); transition: width 180ms ease; }
.progress-track span { position: absolute; right: 4px; top: -15px; color: #71838d; font-size: 8px; }
.import-actions { display: flex; align-items: center; gap: 12px; padding: 2px 18px 18px; }
.import-actions span { color: #809099; font-size: 8.5px; }
.sheet-list { display: grid; padding: 0 16px 8px; }
.sheet-list > div, .sheet-total { display: flex; align-items: center; justify-content: space-between; padding: 9px 2px; border-bottom: 1px solid #edf1f3; }
.sheet-list span { display: flex; align-items: center; gap: 7px; color: #5d7380; font-size: 9px; }
.sheet-list svg { color: var(--teal); }
.sheet-list strong, .sheet-total strong { color: #25495e; font-size: 9px; font-variant-numeric: tabular-nums; }
.sheet-total { margin: 0 16px 15px; border: 0; color: #839198; font-size: 9px; }
.summary-empty { display: flex; min-height: 230px; align-items: center; justify-content: center; flex-direction: column; padding: 25px; color: #90a0a8; text-align: center; }
.summary-empty p { max-width: 200px; font-size: 9px; line-height: 1.6; }
.import-notes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 17px; }
.import-notes > div { display: grid; grid-template-columns: 28px 1fr; column-gap: 8px; padding: 3px 17px; border-right: 1px solid #e8edef; }
.import-notes > div:last-child { border: 0; }
.import-notes svg { grid-row: 1 / 3; color: #587d91; }
.import-notes strong { color: #38596b; font-size: 9.5px; }
.import-notes p { margin: 3px 0 0; color: #809099; font-size: 8.5px; line-height: 1.55; }

.fields-panel { overflow: hidden; }
.fields-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 18px; border-bottom: 1px solid #e8edef; }
.fields-head h2 { margin: 4px 0 3px; color: #17374c; font-size: 15px; }
.fields-head p { margin: 0; color: #819099; font-size: 9px; }
.fields-actions { display: flex; align-items: flex-end; gap: 9px; }
.field-list-head, .field-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(100px, 0.7fr) minmax(100px, 0.7fr) 95px; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 1px solid #edf1f3; }
.field-list-head { background: #f8fafb; color: #87959c; font-size: 8px; font-weight: 780; letter-spacing: 0.06em; text-transform: uppercase; }
.field-row { color: #637784; font-size: 9px; }
.field-row strong { color: #2e4f61; font-size: 9.5px; }
.field-row strong small { color: var(--muted); display: block; font-size: 8px; font-weight: 500; margin-top: 3px; }
.core-badge, .custom-badge { width: max-content; padding: 4px 7px; border-radius: 999px; font-size: 8px; font-weight: 720; }
.core-badge { background: #edf2f4; color: #687b85; }
.custom-badge { background: var(--blue-soft); color: #3c77a8; }
.locked-field { color: #9aa5aa; font-size: 8px; }
.fields-footnote { display: flex; align-items: center; gap: 7px; padding: 12px 18px; background: #fbfcfc; color: #829198; font-size: 8.5px; }

/* Identidad Iconpunto y legibilidad de trabajo */
.panel { border-color: #e1e1ec; box-shadow: 0 5px 18px rgba(33, 24, 79, 0.045); }
.page-heading h1, .module-heading h1, .record-drawer-head h2, .modal-head h2, .access-card h1 { color: var(--brand-deep); }
.page-heading p, .module-heading p, .record-notes-head p { font-size: 13px; }
.primary-button, .secondary-button, .period-button, .small-button { min-height: 38px; font-size: 13px; }
.nav-item span:nth-child(2) { font-size: 14px; }
.nav-label, .eyebrow, .panel-kicker { font-size: 11px; }
.global-search input, .module-search input { font-size: 14px; }
th, td { padding-top: 13px; padding-bottom: 13px; font-size: 12.5px; }
th { color: #77738b; font-size: 11px; }
.toolbar-count, .filter-select select { font-size: 12px; }
.filter-select span { font-size: 10px; }
.record-summary { font-size: 12px; }
.record-field-label > span { color: #625e78; font-size: 12px; }
.record-field-label small { font-size: 10px; }
.record-field-value { color: #292447; font-size: 14px; }
.form-field > span, .checkbox-field > span, .multi-field legend, .multi-field > div label { font-size: 12px; }
.field-type-hint { font-size: 10px; }
.form-field input, .form-field select, .form-field textarea { min-height: 42px; border-color: #d9d8e5; background: #fdfdff; color: #292447; font-size: 14px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #716bb5; box-shadow: 0 0 0 3px rgba(79, 74, 164, 0.12); }
.field-editor-help { color: #817c98; font-size: 11px; font-weight: 400; line-height: 1.45; }
.record-notes textarea:focus { border-color: #716bb5; outline-color: rgba(79, 74, 164, 0.14); }
.record-notes-head svg, .import-card .panel-head svg { color: var(--brand-accent); }
.record-notes-history > .note-timeline { display: grid; gap: 10px; margin-top: 10px; padding: 0; background: transparent; }
.note-entry { overflow: hidden; border: 1px solid #e0dfec; border-radius: 10px; background: #fafaff; }
.note-entry header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid #e7e6f0; background: #f1f0fa; }
.note-initials { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--brand); color: white; font-size: 11px; font-weight: 800; letter-spacing: 0.03em; }
.note-initials.unknown { background: #d9d7e3; color: #686477; }
.note-heading { min-width: 0; }
.note-heading strong { display: block; overflow: hidden; color: #30295f; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.note-heading small { display: block; margin-top: 3px; color: #817c98; font-size: 10px; }
.note-owner { padding: 5px 8px; border-radius: 999px; background: white; color: #5b5680; font-size: 10px; font-weight: 750; white-space: nowrap; }
.note-edit-button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #d9d7e8; border-radius: 7px; background: white; color: var(--brand); cursor: pointer; }
.note-editor { display: grid; gap: 10px; padding: 12px; }
.note-editor label { display: grid; gap: 5px; color: #625e78; font-size: 11px; font-weight: 740; }
.note-editor textarea { width: 100%; }
.note-editor > div { display: flex; justify-content: flex-end; gap: 8px; }
.note-entry p { margin: 0; padding: 12px; color: #38344e; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.note-entry footer { padding: 0 12px 11px; color: #8b879d; font-size: 10px; }
.field-list-head, .field-row { grid-template-columns: minmax(210px, 1.45fr) minmax(110px, 0.65fr) minmax(155px, 0.8fr) 92px; }
.field-list-head { font-size: 10px; }
.field-row { font-size: 12px; }
.field-row strong { font-size: 13px; }
.field-row strong small { font-size: 10px; }
.core-badge, .custom-badge { font-size: 10px; }
.field-row-hidden { background: #f7f7fa; opacity: 0.78; }
.field-hidden-reason { display: block; max-width: 210px; margin-top: 5px; color: #777286; font-size: 10px; line-height: 1.35; }
.fields-head p, .fields-footnote { font-size: 12px; }
.avatar-coral { background: #756fbd; }
.stage-cotizado { background: #eeedfb; color: #433d8a; }
.horizontal-bars i { background: linear-gradient(90deg, #33266f, #7069be); }

@media (max-width: 1040px) {
  .campaign-grid, .settings-grid { grid-template-columns: 1fr; }
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-notes { grid-template-columns: 1fr; }
  .import-notes > div { border-right: 0; border-bottom: 1px solid #e8edef; padding: 11px 8px; }
}

@media (max-width: 1040px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .secondary-button { display: none; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-105%); transition: transform 190ms ease; }
  .sidebar-open { transform: translateX(0); }
  .sidebar-close { display: inline-flex; margin-left: auto; color: var(--brand); }
  .main-area { margin-left: 0; }
  .mobile-overlay { position: fixed; inset: 0; z-index: 30; display: block; border: 0; background: rgba(7, 28, 42, 0.42); }
  .mobile-menu { display: inline-flex; }
  .topbar { padding: 12px 15px; }
  .account-photo-card { grid-template-columns: 58px minmax(0, 1fr); }
  .account-photo-preview { width: 58px; height: 58px; }
  .account-photo-card > button { grid-column: 1 / -1; }
  .account-contact-list { grid-template-columns: 1fr; }
  .global-search { min-width: 0; }
  .global-search kbd { display: none; }
  .primary-button { padding: 10px; }
  .content-wrap { padding: 24px 16px 36px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .kpi-grid { grid-template-columns: 1fr; }
  .module-heading { align-items: flex-start; flex-direction: column; }
  .module-heading .primary-button { width: 100%; }
  .module-toolbar { align-items: stretch; flex-direction: column; }
  .module-search { min-width: 0; }
  .filter-select { width: 100%; }
  .toolbar-count { margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.wide { grid-column: auto; }
  .campaign-grid, .report-grid, .settings-grid { grid-template-columns: 1fr; }
  .campaign-status { grid-template-columns: auto 1fr; }
  .connection-badge { grid-column: 1 / -1; width: max-content; }
  .campaign-list article { grid-template-columns: 35px minmax(0, 1fr) auto; }
  .campaign-list article > span:nth-of-type(2), .campaign-list article > button { display: none; }
  .report-filters { align-items: stretch; flex-direction: column; }
  .report-filters label { min-width: 0; }
  .report-filters button { margin-left: 0; }
  .report-kpis { grid-template-columns: 1fr; }
  .record-drawer { width: 100%; }
  .record-drawer-head, .record-drawer-tools, .record-field-grid, .record-drawer-foot { padding-left: 16px; padding-right: 16px; }
  .record-notes { margin-left: 16px; margin-right: 16px; }
  .record-drawer-tools { align-items: stretch; flex-direction: column; }
  .record-drawer-tools .primary-button { width: 100%; }
  .record-field-grid { grid-template-columns: 1fr; }
  .record-field.wide { grid-column: auto; }
  .zoho-checkbox.wide, .multi-field.wide, .form-section-title { grid-column: auto; }
  .field-list-head, .field-row { grid-template-columns: minmax(130px, 1fr) 80px 80px; }
  .field-list-head span:last-child, .field-row > :last-child { display: none; }
  .fields-head { align-items: flex-start; flex-direction: column; }
  .fields-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .note-entry header { grid-template-columns: auto minmax(0, 1fr) auto; }
  .note-owner { grid-column: 2 / 3; width: max-content; }
}

/* Adaptación cPanel / FastAPI */
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }
.sidebar a.nav-item { display:flex; }
.user-link { text-decoration:none; color:inherit; }
.crm-table-wrap { overflow:auto; }
.crm-table { width:100%; border-collapse:collapse; }
.crm-table th { padding:10px 12px; border-bottom:1px solid var(--line); color:#6f7f89; font-size:10px; text-align:left; white-space:nowrap; background:#fbfcfd; }
.crm-table td { padding:11px 12px; border-bottom:1px solid #edf0f2; color:#3d5260; font-size:11px; vertical-align:top; }
.crm-table tr:hover td { background:#fafbfe; }
.crm-table .align-right { text-align:right; }
.record-link { color:#213e54; font-weight:700; }
.record-link:hover { color:var(--brand-accent); }
.subtle { display:block; margin-top:3px; color:#92a0a9; font-size:9px; }
.toolbar { display:flex; gap:9px; align-items:end; flex-wrap:wrap; padding:14px 16px; border-bottom:1px solid var(--line); }
.toolbar label { min-width:150px; color:#6f7f89; font-size:9px; font-weight:700; }
.toolbar input,.toolbar select { width:100%; margin-top:4px; padding:8px 9px; border:1px solid #d7e0e5; border-radius:7px; background:white; color:#243e4f; font-size:11px; }
.toolbar .search-grow { flex:1; min-width:260px; }
.module-panel { overflow:hidden; }
.stage-pill { display:inline-block; padding:4px 7px; border-radius:999px; background:#f0effa; color:#49418f; font-size:9px; font-weight:700; }
.stage-pill.green { background:#edf7f1; color:#33825e; }
.stage-pill.amber { background:#fff7e6; color:#a7771d; }
.stage-pill.gray { background:#f0f2f4; color:#6f7781; }
.page-actions { display:flex; gap:8px; flex-wrap:wrap; }
.form-card { padding:20px; }
.form-grid-cpanel { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 16px; }
.form-field-cpanel { display:flex; flex-direction:column; gap:5px; color:#647783; font-size:10px; }
.form-field-cpanel.wide { grid-column:1/-1; }
.form-field-cpanel input,.form-field-cpanel select,.form-field-cpanel textarea { width:100%; padding:9px 10px; border:1px solid #d6dfe4; border-radius:7px; background:white; color:#243e4f; font-size:11px; }
.form-field-cpanel textarea { min-height:100px; resize:vertical; }
.detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 22px; }
.detail-item { padding:10px 0; border-bottom:1px solid #edf0f2; }
.detail-item span { display:block; color:#8b979f; font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.detail-item strong { display:block; margin-top:4px; color:#243e4f; font-size:11px; font-weight:600; word-break:break-word; }
.detail-item.wide { grid-column:1/-1; }
.notes-list { display:grid; gap:9px; }
.note-card { padding:12px 14px; border:1px solid #e0e4e7; border-radius:8px; background:#fff; }
.note-card header { display:flex; justify-content:space-between; gap:10px; }
.note-card strong { font-size:11px; color:#27465a; }
.note-card time { color:#9aa5ac; font-size:9px; }
.note-card p { margin:7px 0 0; white-space:pre-wrap; color:#5f707a; font-size:10px; line-height:1.55; }
.notice { margin:0 0 16px; padding:11px 13px; border:1px solid #d8e3ea; border-radius:8px; background:#f8fbfc; color:#547080; font-size:10px; line-height:1.5; }
.error-box { margin:0 0 16px; padding:11px 13px; border:1px solid #f0c7c5; border-radius:8px; background:#fff5f4; color:#9a403a; font-size:10px; }
.success-box { margin:0 0 16px; padding:11px 13px; border:1px solid #cbe6d7; border-radius:8px; background:#f3fbf7; color:#337052; font-size:10px; }
.login-body { min-height:100vh; display:grid; place-items:center; background:radial-gradient(circle at top,#efeffb 0,var(--canvas) 48%); padding:20px; }
.login-card { width:min(430px,100%); padding:32px; border:1px solid var(--line); border-radius:15px; background:white; box-shadow:0 18px 55px rgba(33,24,79,.14); }
.login-logo { width:210px; display:block; margin:0 auto 22px; }
.login-card h1 { margin:0 0 7px; text-align:center; font-family:Georgia,serif; font-weight:500; color:#33266f; }
.login-card p { margin:0 0 20px; text-align:center; color:#7a7790; font-size:10px; }
.login-card label { display:block; margin:9px 0 5px; color:#5d6177; font-size:10px; font-weight:700; }
.login-card input { width:100%; padding:10px 11px; border:1px solid #d9d9e7; border-radius:7px; }
.login-card button { width:100%; margin-top:15px; }
.danger-button { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:8px 10px; border:1px solid #edc9c7; border-radius:7px; background:white; color:#a64f49; font-size:10px; font-weight:700; cursor:pointer; }
.report-grid-cpanel { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; margin-bottom:14px; }
.bar-list { display:grid; gap:10px; padding:12px 18px 18px; }
.bar-row { display:grid; grid-template-columns:160px 1fr 90px; gap:10px; align-items:center; font-size:10px; }
.bar-track { height:8px; background:#eff1f5; border-radius:999px; overflow:hidden; }
.bar-fill { height:100%; background:#5752ad; border-radius:999px; }
.empty-state { padding:35px 20px; text-align:center; color:#84939c; font-size:11px; }
.pagination { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px 16px; border-top:1px solid var(--line); color:#84939c; font-size:10px; }
@media(max-width:900px){ .sidebar{position:static;width:100%;height:auto}.main-area{margin-left:0}.main-nav{display:flex;overflow:auto;padding:10px}.nav-item{min-width:max-content}.brand-row{min-height:70px}.sidebar-user,.nav-label,.nav-section{display:none}.content-wrap{padding:20px 14px}.kpi-grid,.report-grid-cpanel,.dashboard-grid,.detail-grid,.form-grid-cpanel{grid-template-columns:1fr}.topbar{position:static;padding:10px 14px}.global-search{min-width:0}.form-field-cpanel.wide,.detail-item.wide{grid-column:auto}}
