:root {
  --navy: #071b3b;
  --navy-2: #0d2b55;
  --blue: #1d5b9f;
  --cream: #f4f1eb;
  --paper: #fffdf9;
  --gold: #c5a15a;
  --ink: #172033;
  --muted: #6c7585;
  --line: #e5e1da;
  --green: #2f7d64;
  --red: #b94a54;
  --shadow: 0 12px 32px rgba(19, 32, 51, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", Arial, sans-serif;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 248px;
  display: flex;
  flex-direction: column;
  padding: 30px 22px;
  color: #fff;
  background: var(--navy);
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 34px; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.45); border-radius: 50%;
  color: var(--gold); font-family: "Playfair Display", serif; font-size: 22px;
}
.brand strong { display: block; letter-spacing: .18em; font-size: 14px; }
.brand small { display: block; margin-top: 4px; color: #a9b7ca; font-size: 11px; }

.nav-list { display: grid; gap: 7px; }
.nav-item {
  display: flex; gap: 13px; align-items: center; width: 100%;
  padding: 13px 14px; border: 0; border-radius: 9px;
  color: #aebbcf; background: transparent; text-align: left;
}
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.09); }
.nav-item.active { box-shadow: inset 3px 0 var(--gold); }
.nav-icon { width: 20px; color: var(--gold); text-align: center; }

.sidebar-footer { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-footer p { color: #91a0b5; font-size: 11px; line-height: 1.5; }
.sidebar-footer .text-button { display: block; margin: 9px 0; color: #d7dfeb; font-size: 12px; }
.cloud-button {
  width: 100%;
  margin: 8px 0 10px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 7px;
  color: #fff;
  background: rgba(255,255,255,.1);
  font-size: 11px;
  font-weight: 700;
}
.cloud-button:hover { background: rgba(255,255,255,.16); }
.import-label input { display: none; }

.main-content { width: calc(100% - 248px); margin-left: 248px; padding: 0 36px 40px; }
.topbar {
  min-height: 106px; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 3px 0 0; font-family: "Playfair Display", serif; font-size: 30px; }
.eyebrow { margin: 0; color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.eyebrow.light { color: #c8d6e8; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.import-pdf-button { white-space: nowrap; }
.topbar-actions button b { display: none; }

.search-box {
  width: 230px; display: flex; align-items: center; gap: 8px;
  padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
}
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; }

.primary-button, .secondary-button, .light-button, .danger-button {
  border-radius: 8px; padding: 11px 17px; font-weight: 600; border: 1px solid transparent;
}
.primary-button { color: #fff; background: var(--blue); }
.primary-button:hover { background: #164a83; }
.secondary-button { color: var(--ink); background: #fff; border-color: var(--line); }
.danger-button { color: var(--red); background: #fff; border-color: #eacdd1; }
.light-button { color: var(--navy); background: #fff; }
.text-button, .icon-button { padding: 0; border: 0; color: var(--blue); background: transparent; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 24px; }

.view { display: none; padding-top: 28px; }
.view.active { display: block; }

.welcome-card {
  min-height: 210px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 32px 36px; overflow: hidden; border-radius: 16px;
  color: #fff; background:
    radial-gradient(circle at 82% 35%, rgba(197,161,90,.35), transparent 22%),
    linear-gradient(120deg, #0d2b55, #071b3b 72%);
  box-shadow: var(--shadow);
}
.welcome-card h2 { margin: 10px 0 12px; font-family: "Playfair Display", serif; font-size: clamp(27px, 3vw, 40px); line-height: 1.12; }
.welcome-card p:not(.eyebrow) { margin: 0; color: #b8c6d9; }

.weekly-cockpit { margin-top: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
.weekly-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.weekly-header h2 { margin: 4px 0; font-family: "Playfair Display", serif; font-size: 25px; }
.weekly-header p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.week-navigation { display: flex; gap: 7px; }
.week-navigation button { padding: 8px 11px; font-size: 11px; }
.ta-goal-card { margin-top: 20px; padding: 20px; border-radius: 12px; color: #fff; background: linear-gradient(115deg, var(--navy-2), var(--navy)); }
.goal-copy { display: flex; align-items: center; gap: 13px; }
.goal-badge { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 10px; color: var(--navy); background: var(--gold); font-weight: 800; }
.goal-copy small { display: block; color: #c5d1df; font-size: 11px; }
.goal-copy strong { display: block; margin-top: 2px; font-size: 24px; }
.goal-copy strong b { color: #fff; }
.weekly-goal-input {
  width: 58px;
  padding: 2px 5px;
  border-color: rgba(255,255,255,.32);
  color: #fff;
  background: rgba(255,255,255,.1);
  font-size: 21px;
  font-weight: 700;
  text-align: center;
}
.goal-progress { height: 8px; margin-top: 15px; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.15); }
.goal-progress i { display: block; width: 0; height: 100%; border-radius: 8px; background: var(--gold); transition: width .3s; }
.ta-goal-card > p { margin: 8px 0 0; color: #c5d1df; font-size: 10px; }
.weekly-flow { display: grid; grid-template-columns: repeat(4, 1fr auto) 1fr 1fr 1fr; align-items: stretch; gap: 8px; margin-top: 16px; overflow-x: auto; }
.weekly-flow article { min-width: 105px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f6; }
.weekly-flow > span { align-self: center; color: #aab1bb; }
.weekly-flow small { display: block; min-height: 28px; color: var(--muted); font-size: 10px; }
.weekly-flow strong { font-family: "Playfair Display", serif; font-size: 23px; }
.weekly-flow em { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-style: normal; }
.weekly-flow .success-step { border-color: #bcdccd; background: #edf7f2; }
.weekly-flow .follow-step { border-color: #ead8b7; background: #fbf5e9; }
.weekly-flow .rec-step { border-color: #c7d6e7; background: #eef4fa; }
.bottleneck-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.bottleneck-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.bottleneck-card > div { display: flex; align-items: center; gap: 10px; }
.bottleneck-card small { display: block; color: var(--muted); font-size: 10px; }
.bottleneck-card strong { display: block; margin-top: 2px; font-size: 20px; }
.bottleneck-card .text-button { white-space: nowrap; font-size: 10px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.metric-card { display: flex; gap: 16px; padding: 21px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.metric-icon { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; font-size: 14px; font-weight: 700; }
.metric-icon.blue { color: var(--blue); background: #e6eef8; }
.metric-icon.gold { color: #8f6b26; background: #f5ecd9; }
.metric-icon.red { color: var(--red); background: #f8e8ea; }
.metric-icon.green { color: var(--green); background: #e5f2ed; }
.metric-card small { color: var(--muted); }
.metric-card strong { display: block; margin: 3px 0; font-family: "Playfair Display", serif; font-size: 26px; }
.metric-card p { margin: 0; color: var(--muted); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; }
.panel { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.panel h3 { margin: 4px 0 0; font-family: "Playfair Display", serif; font-size: 21px; }

.upcoming-list { display: grid; }
.upcoming-item { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 13px; padding: 14px 0; border-top: 1px solid var(--line); }
.upcoming-item:first-child { border-top: 0; }
.date-chip { display: grid; place-items: center; height: 46px; color: var(--blue); border-radius: 8px; background: #edf2f8; }
.date-chip strong { font-size: 16px; line-height: 1; }
.date-chip small { font-size: 9px; text-transform: uppercase; }
.upcoming-item h4 { margin: 0 0 3px; font-size: 14px; }
.upcoming-item p { margin: 0; color: var(--muted); font-size: 12px; }
.status-label { padding: 5px 8px; border-radius: 20px; color: var(--muted); background: #efede8; font-size: 10px; }
.status-label.overdue { color: var(--red); background: #f8e8ea; }
.status-label.today { color: var(--green); background: #e5f2ed; }

.funnel-chart { display: grid; gap: 14px; }
.funnel-row { display: grid; grid-template-columns: 115px 1fr 24px; gap: 10px; align-items: center; font-size: 12px; }
.bar-track { height: 8px; overflow: hidden; border-radius: 8px; background: #ebe8e2; }
.bar-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--blue), #4c82ba); }

.section-toolbar { min-height: 46px; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.section-toolbar p { margin: 0; color: var(--muted); }
select, input, textarea { border: 1px solid #d9d6d0; border-radius: 7px; color: var(--ink); background: #fff; }
.section-toolbar select { padding: 9px 12px; }
.filter-row { display: flex; gap: 10px; }

.base-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.base-summary div {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.base-summary strong { font-family: "Playfair Display", serif; font-size: 24px; }
.base-summary span { color: var(--muted); font-size: 11px; line-height: 1.25; }
.client-toolbar .eyebrow { margin-bottom: 4px; }

.pipeline-board { display: grid; grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 14px; }
.pipeline-column { min-height: 540px; padding: 14px; border-radius: 12px; background: #eae7e1; }
.pipeline-column.drag-over { outline: 2px dashed var(--blue); outline-offset: -5px; }
.column-header { display: flex; justify-content: space-between; margin-bottom: 14px; }
.column-header h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; }
.column-header span { color: var(--muted); font-size: 12px; }
.pipeline-cards { display: grid; gap: 10px; }
.pipeline-card { padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 3px 10px rgba(20,32,48,.05); }
.pipeline-card:hover { border-color: #b8c5d5; }
.pipeline-card.dragging { opacity: .5; }
.card-top { display: flex; justify-content: space-between; gap: 10px; }
.pipeline-card h4 { margin: 0; font-size: 14px; }
.priority-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; }
.priority-dot.Alta { background: var(--red); }
.priority-dot.Média { background: var(--gold); }
.priority-dot.Baixa { background: var(--green); }
.pipeline-card p { margin: 8px 0 12px; color: var(--muted); font-size: 11px; }
.card-bottom { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); background: #f8f6f2; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
td { font-size: 13px; }
tbody tr:hover { background: #faf9f6; }
.client-cell strong { display: block; }
.client-cell small { color: var(--muted); }
.stage-pill { display: inline-block; padding: 5px 9px; border-radius: 18px; color: var(--blue); background: #e7eff8; font-size: 10px; font-weight: 600; }
.row-actions { display: flex; justify-content: flex-end; gap: 10px; }
.row-actions button { border: 0; color: var(--blue); background: transparent; }
.central-table { min-width: 1040px; table-layout: fixed; }
.central-table th, .central-table td { padding: 13px 9px; }
.central-table th:nth-child(1) { width: 14%; }
.central-table th:nth-child(2) { width: 12%; }
.central-table th:nth-child(3) { width: 9%; }
.central-table th:nth-child(4) { width: 9%; }
.central-table th:nth-child(5) { width: 11%; }
.central-table th:nth-child(6) { width: 10%; }
.central-table th:nth-child(7) { width: 12%; }
.central-table th:nth-child(8) { width: 8%; }
.central-table th:nth-child(9) { width: 8%; }
.central-table th:nth-child(10) { width: 9%; }
.central-table th:nth-child(11) { width: 5%; }
.central-table td { vertical-align: middle; }
.central-table th:first-child, .central-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--paper);
  box-shadow: 4px 0 8px rgba(23,32,51,.05);
}
.central-table th:first-child { z-index: 3; background: #f8f6f2; }
.central-table tr:hover td:first-child { background: #faf9f6; }
.client-cell { min-width: 0; }
.contact-lines { min-width: 0; }
.contact-lines a { display: block; color: var(--blue); text-decoration: none; }
.contact-lines small { display: block; max-width: 180px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.quick-select {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border-color: transparent;
  background: #f2f5f8;
  font-size: 11px;
  font-weight: 600;
}
.quick-select:focus { border-color: var(--blue); outline: 0; }
.quick-date {
  width: 100%;
  padding: 7px 8px;
  font-size: 11px;
}
.next-action-cell { min-width: 0; }
.next-action-cell strong, .next-action-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.next-action-cell strong { font-size: 11px; }
.next-action-cell small { color: var(--muted); font-size: 10px; }
.attention-row { box-shadow: inset 3px 0 var(--red); }
.today-row { box-shadow: inset 3px 0 var(--green); }
.interaction-date { white-space: nowrap; color: var(--muted); font-size: 11px; }
.temperature-pill, .alert-pill {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}
.temperature-pill.Frio { color: #2c6693; background: #e5f1f8; }
.temperature-pill.Morno { color: #8a6826; background: #f5ecd9; }
.temperature-pill.Quente { color: #a53e48; background: #f8e5e7; }
.alert-pill.ok { color: var(--green); background: #e5f2ed; }
.alert-pill.today { color: #8a6826; background: #f5ecd9; }
.alert-pill.overdue { color: var(--red); background: #f8e5e7; }
.days-count { font-weight: 700; }

.task-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 8px; background: #e8e5df; }
.agenda-actions { display: flex; align-items: center; gap: 10px; }
.task-tab { padding: 7px 12px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 12px; }
.task-tab.active { color: var(--ink); background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.06); }
.tasks-layout { display: grid; grid-template-columns: 1fr 300px; gap: 22px; }
.date-heading { margin: 0 0 14px; font-family: "Playfair Display", serif; font-size: 22px; }
.tasks-list { display: grid; gap: 10px; }
.task-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 13px; align-items: center; padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.task-check { width: 21px; height: 21px; accent-color: var(--green); }
.task-item h4 { margin: 0 0 4px; }
.task-item p { margin: 0; color: var(--muted); font-size: 12px; }
.task-item.completed h4 { color: var(--muted); text-decoration: line-through; }
.task-date { text-align: right; color: var(--muted); font-size: 11px; }
.task-edit { padding: 7px; border: 0; color: var(--blue); background: transparent; font-size: 11px; }
.activity-kind { display: inline-block; margin-right: 6px; color: var(--blue); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.focus-card { align-self: start; padding: 28px; border-radius: 13px; color: #fff; background: var(--navy-2); }
.focus-card h3 { margin: 8px 0; font-family: "Playfair Display", serif; font-size: 24px; }
.focus-card p:not(.eyebrow) { color: #c0cddd; line-height: 1.55; font-size: 13px; }
.focus-progress { margin-top: 24px; font-size: 11px; }
.focus-progress > div { height: 6px; margin-top: 8px; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.15); }
.focus-progress i { display: block; width: 0; height: 100%; background: var(--gold); transition: width .3s; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(4,15,33,.68); }
.modal { width: min(780px, 100%); max-height: 92vh; overflow-y: auto; padding: 28px; border-radius: 14px; background: var(--paper); box-shadow: 0 25px 80px rgba(0,0,0,.28); }
.activity-modal { width: min(650px, 100%); }
.auth-modal { width: min(460px, 100%); }
.auth-intro { margin: -8px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.auth-message { min-height: 18px; margin: 14px 0 0; color: var(--muted); font-size: 11px; }
.auth-message.error { color: var(--red); }
.auth-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 22px; }
.modal-header h2 { margin: 4px 0 0; font-family: "Playfair Display", serif; }
.icon-button { color: var(--muted); font-size: 28px; }
.form-tabs { display: flex; gap: 5px; margin-bottom: 16px; padding: 4px; border-radius: 9px; background: #ebe8e2; }
.form-tab { flex: 1; padding: 9px 10px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 600; }
.form-tab.active { color: var(--navy); background: #fff; box-shadow: 0 2px 8px rgba(20,32,48,.08); }
.form-tab-panel { display: none; }
.form-tab-panel.active { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label { display: grid; gap: 7px; color: #4f5968; font-size: 12px; font-weight: 600; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: 11px; outline: 0; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,91,159,.1); }
.full-field { grid-column: 1 / -1; }
.form-actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.form-section:first-of-type { margin-top: 0; }
.form-section-title, .optional-section summary {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}
.form-section-title > span, .optional-section summary > span {
  flex: 0 0 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 11px;
  font-weight: 700;
}
.form-section-title strong, .optional-section summary strong { display: block; font-size: 13px; }
.form-section-title small, .optional-section summary small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.optional-section { padding: 0; overflow: hidden; }
.optional-section summary { margin: 0; padding: 16px 18px; cursor: pointer; list-style: none; background: #f8f6f2; }
.optional-section summary::-webkit-details-marker { display: none; }
.optional-section summary::after { content: "+"; margin-left: auto; color: var(--blue); font-size: 20px; }
.optional-section[open] summary::after { content: "−"; }
.optional-section .form-grid { padding: 18px; }
.check-field { display: flex !important; grid-template-columns: auto 1fr; align-items: center; align-self: end; min-height: 41px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #f8f9fa; }
.check-field input { width: 17px !important; height: 17px; accent-color: var(--green); }
.classification-block {
  display: grid;
  grid-template-columns: 1fr 145px 145px;
  gap: 12px;
  align-items: end;
  margin-top: 2px;
  padding: 14px;
  border-radius: 9px;
  background: #f3f6f9;
}
.classification-block > div { align-self: center; }
.classification-block > div strong { display: block; color: var(--ink); font-size: 12px; }
.classification-block > div small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.process-divider { position: relative; margin: 4px 0; border-top: 1px solid var(--line); text-align: center; }
.process-divider span { position: relative; top: -8px; padding: 0 9px; color: var(--muted); background: #fff; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.import-modal { width: min(820px, 100%); }
.pdf-drop-zone {
  min-height: 245px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 30px;
  border: 2px dashed #b9c6d5;
  border-radius: 13px;
  color: var(--muted);
  background: #f7f9fb;
  text-align: center;
  transition: .2s;
}
.pdf-drop-zone:hover, .pdf-drop-zone.dragging { border-color: var(--blue); background: #edf3fa; }
.pdf-drop-zone input { display: none; }
.pdf-drop-zone strong { color: var(--ink); font-size: 16px; }
.pdf-drop-zone small { max-width: 440px; line-height: 1.5; }
.upload-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 700;
}
.import-help { margin-top: 16px; padding: 15px 17px; border-radius: 9px; background: #f2eee4; }
.import-help strong { font-size: 12px; }
.import-help p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.pdf-loading { min-height: 280px; display: grid; place-items: center; align-content: center; gap: 8px; }
.pdf-loading i {
  width: 34px;
  height: 34px;
  border: 3px solid #dce5ef;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.pdf-loading p, .import-review-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.import-review-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.import-defaults { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; border-radius: 9px; background: #f4f2ed; }
.import-defaults label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.import-defaults select, .import-defaults input { padding: 8px; }
.import-list { max-height: 330px; overflow-y: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: 9px; }
.import-row {
  display: grid;
  grid-template-columns: auto 1.2fr 1fr 1.2fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.import-row:last-child { border-bottom: 0; }
.import-row input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--blue); }
.import-row input[type="text"], .import-row input[type="tel"], .import-row input[type="email"] { width: 100%; min-width: 0; padding: 8px; font-size: 11px; }
.import-row.duplicate { background: #fff5e5; }
.duplicate-note { grid-column: 2 / -1; color: #92671e; font-size: 10px; }
.import-actions { grid-template-columns: auto 1fr auto auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-state span { font-size: 32px; color: var(--gold); }
.empty-state h3 { margin: 12px 0 5px; color: var(--ink); }
.mini-empty { padding: 30px; color: var(--muted); text-align: center; font-size: 13px; }
.hidden { display: none !important; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; padding: 12px 17px; border-radius: 8px; color: #fff; background: var(--green); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .tasks-layout { grid-template-columns: 1fr; }
  .base-summary { grid-template-columns: repeat(2, 1fr); }
  .bottleneck-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { width: 100%; margin-left: 0; padding: 0 18px 28px; }
  .mobile-menu { display: block; }
  .topbar { align-items: center; min-height: 90px; }
  .topbar-actions { margin-left: auto; }
  .import-pdf-button { padding: 10px; }
  .topbar-actions button span { display: none; }
  .topbar-actions button b { display: inline; font-size: 11px; }
  .search-box { display: none; }
  .topbar h1 { font-size: 24px; }
  .welcome-card { align-items: flex-start; flex-direction: column; padding: 26px; }
  .weekly-cockpit { padding: 18px; }
  .weekly-header { flex-direction: column; }
  .week-navigation { width: 100%; }
  .week-navigation button:nth-child(2) { flex: 1; }
  .weekly-flow { grid-template-columns: repeat(11, minmax(105px, auto)); }
  .metrics-grid { grid-template-columns: 1fr; }
  .section-toolbar { align-items: flex-start; flex-direction: column; }
  .agenda-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .agenda-actions .primary-button { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .classification-block { grid-template-columns: 1fr; }
  .form-tab { padding: 9px 4px; font-size: 10px; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 760px; }
  .base-summary { grid-template-columns: 1fr 1fr; }
  .filter-row { width: 100%; overflow-x: auto; }
  .filter-row select { flex: 0 0 auto; }
  .import-defaults { grid-template-columns: 1fr; }
  .import-row { grid-template-columns: auto 1fr; }
  .import-row input[type="tel"], .import-row input[type="email"] { grid-column: 2; }
  .duplicate-note { grid-column: 2; }
}

@media (max-width: 480px) {
  .primary-button { padding: 10px 12px; }
  .topbar .primary-button b { font-size: 20px; }
  .form-actions { grid-template-columns: 1fr 1fr; }
  .form-actions span { display: none; }
  .danger-button { grid-column: 1 / -1; }
  .base-summary { gap: 8px; }
  .base-summary div { align-items: flex-start; flex-direction: column; gap: 2px; padding: 12px; }
  .import-actions { grid-template-columns: 1fr 1fr; }
  .import-actions span { display: none; }
  .import-actions .text-button { grid-column: 1 / -1; text-align: left; }
}
