:root {
  color-scheme: light;
  /* Base mono (Cria identity) */
  --bg-primary: #ffffff;
  --bg-secondary: #f7f7f8;
  --bg-tertiary: #fbfbfc;
  --bg-sidebar: rgba(247,247,248,0.78);
  --bg-elevated: #ffffff;
  --separator: rgba(0,0,0,0.08);
  --separator-strong: rgba(0,0,0,0.15);
  --label-primary: #111111;
  --label-secondary: #6e6e73;
  --label-tertiary: #86868b;
  --label-quaternary: #c7c7cc;
  /* Brand — preto puro */
  --brand: #111111;
  --brand-soft: #ece9e3;
  --brand-2: #000000;
  /* Pastéis Apple Sonoma (acentos semânticos) */
  --pastel-sage: #dff3e2;   --text-sage: #2d6a3c;
  --pastel-peach: #ffe9d6;  --text-peach: #9c4f00;
  --pastel-rose: #fcdde0;   --text-rose: #a23240;
  --pastel-sky: #d9eaf7;    --text-sky: #2a6190;
  --pastel-lavender: #e5dff4; --text-lavender: #4f4090;
  --pastel-sand: #ece9e3;   --text-sand: #3d3528;
  --pastel-yellow: #fff3c4; --text-yellow: #8a6c00;
  /* System */
  --blue: #007aff;
  --green: #34c759;
  --red: #ff3b30;
  --orange: #ff9500;
  --yellow: #ffcc00;
  --indigo: #5856d6;
  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 22px;
  /* Shadows - Apple uses extremely subtle shadows */
  --shadow-1: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-2: 0 1px 3px rgba(0,0,0,0.04), 0 6px 18px rgba(0,0,0,0.04);
  --shadow-3: 0 4px 24px rgba(0,0,0,0.08);
  /* Typography scale - Apple HIG */
  --fs-large-title: 34px;
  --fs-title-1: 28px;
  --fs-title-2: 22px;
  --fs-title-3: 20px;
  --fs-headline: 17px;
  --fs-body: 17px;
  --fs-callout: 16px;
  --fs-subhead: 15px;
  --fs-footnote: 13px;
  --fs-caption-1: 12px;
  --fs-caption-2: 11px;
}
* { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg-secondary);
  color: var(--label-primary);
  font-size: var(--fs-body);
  line-height: 1.47;
  letter-spacing: -0.022em;
}
button, input, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 999px; border: 2px solid var(--bg-secondary); }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.32); }

/* ============== APP LAYOUT (sidebar + main) ============== */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}



/* ============== SIDEBAR ============== */
.sidebar {
  background: var(--bg-sidebar);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--separator);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 16px 12px;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 18px;
  border-bottom: 1px solid var(--separator);
  margin-bottom: 14px;
}
.sidebar-brand svg { height: 32px; width: auto; flex-shrink: 0; max-width: 100%; color: var(--label-primary); }
.sidebar-brand .label { font-size: var(--fs-caption-1); color: var(--label-tertiary); margin-top: 2px; }
.sidebar-brand .name { font-size: var(--fs-subhead); font-weight: 600; color: var(--label-primary); letter-spacing: -0.01em; }

.sidebar-section { margin-bottom: 18px; }
.sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--label-tertiary);
  letter-spacing: 0.06em;
  padding: 4px 10px 8px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--label-primary);
  font-size: var(--fs-subhead);
  font-weight: 400;
  transition: background 0.15s;
  margin-bottom: 1px;
  letter-spacing: -0.01em;
}
.sidebar-item:hover { background: rgba(0,0,0,0.04); }
.sidebar-item.active { background: rgba(0,0,0,0.07); font-weight: 500; }
.sidebar-item .icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.sidebar-item.active .icon { opacity: 1; }

.sidebar-project {
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgba(0,0,0,0.04);
  margin-bottom: 12px;
}
.sidebar-project .label { font-size: var(--fs-caption-1); color: var(--label-tertiary); margin-bottom: 4px; }
.sidebar-project select {
  width: 100%; background: transparent; border: none;
  font-size: var(--fs-subhead); font-weight: 500; color: var(--label-primary);
  padding: 0; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236e6e73' d='M6 8.5L1.5 4l1-1L6 6.5 9.5 3l1 1z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  padding-right: 18px;
}

/* ============== MAIN ============== */
.main { min-width: 0; display: flex; flex-direction: column; }
.toolbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separator);
  padding: 18px 32px 14px;
  display: block;
}
.tb-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.tb-greet { font-size: var(--fs-title-2); font-weight: 600; letter-spacing: -0.025em; color: var(--label-primary); margin: 0; }
.tb-meta { color: var(--label-secondary); font-size: var(--fs-footnote); margin-top: 2px; letter-spacing: -0.005em; }
.tb-meta .dot { color: var(--label-quaternary); margin: 0 6px; }
.tb-meta strong { color: var(--label-primary); font-weight: 600; }
.tb-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--separator); }
.toolbar h2 {
  margin: 0; font-size: var(--fs-title-3); font-weight: 500; letter-spacing: -0.022em; color: var(--label-secondary);
}
.toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.content { padding: 28px 32px 60px; max-width: 1280px; width: 100%; }
.section { display: none; animation: fadeIn 0.25s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.page-title {
  font-size: var(--fs-large-title);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
.page-subtitle {
  font-size: var(--fs-callout);
  color: var(--label-secondary);
  margin: 0 0 28px;
  letter-spacing: -0.018em;
}

/* ============== BUTTONS ============== */
button { cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-subhead); font-weight: 500;
  padding: 8px 16px; border-radius: 980px;
  border: none; cursor: pointer; transition: all 0.15s ease;
  letter-spacing: -0.01em;
}
.btn-primary { background: var(--label-primary); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-secondary { background: rgba(0,0,0,0.06); color: var(--label-primary); }
.btn-secondary:hover { background: rgba(0,0,0,0.1); }
.btn-tinted { background: var(--pastel-sky); color: var(--text-sky); }
.btn-tinted:hover { background: #c8def0; }
.btn-ghost { background: transparent; color: var(--label-primary); }
.btn-ghost:hover { background: rgba(0,0,0,0.04); }
.btn-danger { background: transparent; color: var(--text-rose); border: 1px solid var(--pastel-rose); }
.btn-danger:hover { background: var(--pastel-rose); }
.btn-sm { padding: 5px 12px; font-size: var(--fs-footnote); }

/* ============== INPUTS ============== */
input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="tel"], select, textarea {
  font-size: var(--fs-subhead);
  border: 1px solid var(--separator-strong);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  background: var(--bg-elevated);
  color: var(--label-primary);
  letter-spacing: -0.01em;
  transition: all 0.15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0,122,255,0.12);
}
.editable {
  background: rgba(0,0,0,0.03);
  border: 1px solid transparent;
  padding: 6px 10px;
  border-radius: 6px;
  width: 96px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-footnote);
}
.editable:hover { background: rgba(0,0,0,0.06); }
.editable:focus { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,122,255,0.12); }

/* ============== SEARCH FIELD ============== */
.search {
  background: rgba(0,0,0,0.06);
  border: none; border-radius: 980px;
  padding: 8px 16px 8px 36px;
  font-size: var(--fs-subhead);
  width: 280px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%236e6e73' d='M9.5 9c.7-.9 1-2 1-3.1C10.5 3.2 8.3 1 5.5 1S.5 3.2.5 6s2.2 5 5 5c1.2 0 2.3-.4 3.2-1l3.3 3.3 1-1L9.5 9zM5.5 9.5C3.6 9.5 2 7.9 2 6s1.6-3.5 3.5-3.5S9 4.1 9 6 7.4 9.5 5.5 9.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
}
.search:focus { background-color: #fff; box-shadow: 0 0 0 4px rgba(0,122,255,0.15); }

/* ============== KPI CARDS ============== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.kpi {
  background: var(--bg-elevated);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--separator);
}
.kpi .label {
  font-size: var(--fs-footnote);
  color: var(--label-secondary);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.kpi .value {
  font-size: var(--fs-title-1);
  font-weight: 600;
  margin-top: 6px;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.kpi .sub {
  font-size: var(--fs-footnote);
  margin-top: 8px;
  color: var(--label-tertiary);
  letter-spacing: -0.01em;
}
.kpi-input {
  width: 100%;
  text-align: left;
  font-size: var(--fs-title-1);
  font-weight: 600;
  background: transparent;
  border: none;
  padding: 6px 0 0;
  margin: 0;
  color: inherit;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.kpi-input:hover { background: rgba(0,0,0,0.03); border-radius: 8px; }
.kpi-input:focus { background: var(--bg-elevated); box-shadow: 0 0 0 3px rgba(0,122,255,0.15); border-radius: 8px; outline: none; }
.kpi-tier { margin-top: 8px; }
.kpi.success { background: var(--pastel-sage); border-color: rgba(45,106,60,0.12); }
.kpi.success .label, .kpi.success .value, .kpi.success .sub { color: var(--text-sage); }
.kpi.success .sub { opacity: 0.78; }
.kpi.danger { background: var(--pastel-rose); border-color: rgba(162,50,64,0.12); }
.kpi.danger .label, .kpi.danger .value, .kpi.danger .sub { color: var(--text-rose); }
.kpi.danger .sub { opacity: 0.78; }
.kpi.warning { background: var(--pastel-peach); border-color: rgba(156,79,0,0.12); }
.kpi.warning .label, .kpi.warning .value, .kpi.warning .sub { color: var(--text-peach); }
.kpi.warning .sub { opacity: 0.78; }
.kpi.brand { background: var(--pastel-sand); border-color: rgba(61,53,40,0.12); }
.kpi.brand .label, .kpi.brand .value, .kpi.brand .sub { color: var(--text-sand); }
.kpi.brand .sub { opacity: 0.78; }
.kpi.sky { background: var(--pastel-sky); border-color: rgba(42,97,144,0.12); }
.kpi.sky .label, .kpi.sky .value, .kpi.sky .sub { color: var(--text-sky); }
.kpi.lavender { background: var(--pastel-lavender); border-color: rgba(79,64,144,0.12); }
.kpi.lavender .label, .kpi.lavender .value, .kpi.lavender .sub { color: var(--text-lavender); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ============== CARD ============== */
.card {
  background: var(--bg-elevated);
  border-radius: var(--r-lg);
  border: 1px solid var(--separator);
  padding: 24px;
  box-shadow: var(--shadow-1);
  margin-bottom: 16px;
}
.card h3 {
  margin: 0 0 4px;
  font-size: var(--fs-title-3);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.card .card-sub { margin: 0 0 18px; color: var(--label-secondary); font-size: var(--fs-subhead); }
.card-header-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.card-header-row > div:first-child { flex: 1; }
.card-header-row h3 { margin: 0 0 4px; }

.chart-wrap { position: relative; height: 280px; }
.chart-wrap.tall { height: 360px; }

/* ============== TABLES ============== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-subhead); }
table th {
  text-align: left;
  font-weight: 500;
  color: var(--label-tertiary);
  padding: 12px 12px;
  border-bottom: 1px solid var(--separator);
  font-size: var(--fs-footnote);
  letter-spacing: -0.005em;
}
table td { padding: 14px 12px; border-bottom: 1px solid var(--separator); letter-spacing: -0.01em; }
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: var(--bg-tertiary); }
table td.right, table th.right { text-align: right; font-variant-numeric: tabular-nums; }
table td.bold { font-weight: 600; }
table tfoot td { font-weight: 600; border-top: 1px solid var(--separator-strong); border-bottom: none; background: var(--bg-secondary); }

/* ============== TAGS ============== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: var(--fs-caption-1);
  font-weight: 500;
  border-radius: 980px;
  letter-spacing: -0.005em;
}
.tag.success { background: var(--pastel-sage); color: var(--text-sage); }
.tag.danger { background: var(--pastel-rose); color: var(--text-rose); }
.tag.warning { background: var(--pastel-peach); color: var(--text-peach); }
.tag.brand { background: var(--pastel-sand); color: var(--text-sand); }
.tag.neutral { background: rgba(0,0,0,0.06); color: var(--label-secondary); }
.tag.blue { background: var(--pastel-sky); color: var(--text-sky); }
.tag.lavender { background: var(--pastel-lavender); color: var(--text-lavender); }

/* ============== SEGMENTED CONTROL ============== */
.segmented {
  display: inline-flex;
  gap: 2px;
  background: rgba(0,0,0,0.06);
  padding: 2px;
  border-radius: 9px;
}
.segmented button {
  background: transparent;
  border: none;
  padding: 6px 14px;
  font-size: var(--fs-footnote);
  font-weight: 500;
  border-radius: 7px;
  cursor: pointer;
  color: var(--label-primary);
  transition: all 0.2s;
  letter-spacing: -0.01em;
}
.segmented button.active { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

/* ============== DRE ============== */
.dre-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  padding: 13px 8px;
  border-bottom: 1px solid var(--separator);
  font-size: var(--fs-subhead);
  align-items: center;
  letter-spacing: -0.01em;
}
.dre-row.header {
  font-weight: 500;
  color: var(--label-tertiary);
  font-size: var(--fs-footnote);
  letter-spacing: 0.005em;
  border-bottom: 1px solid var(--separator-strong);
  padding: 10px 8px 12px;
}
.dre-row.sub { padding-left: 32px; color: var(--label-secondary); font-size: var(--fs-footnote); padding-top: 8px; padding-bottom: 8px; }
.dre-row.total {
  font-weight: 600;
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 14px 12px;
  margin: 8px 0;
  border-bottom: none;
}
.dre-row.profit {
  font-weight: 600;
  background: var(--brand-soft);
  color: var(--brand-2);
  border-radius: 12px;
  padding: 18px 14px;
  margin-top: 12px;
  font-size: var(--fs-headline);
  border-bottom: none;
}
.dre-row.profit.neg { background: rgba(255,59,48,0.08); color: var(--red); }
.dre-row .val { text-align: right; font-variant-numeric: tabular-nums; }
.dre-row .pct { text-align: right; color: var(--label-tertiary); font-size: var(--fs-footnote); min-width: 68px; font-variant-numeric: tabular-nums; }

/* ============== ITEM CARD (used for projects, clients, briefings, etc.) ============== */
.item-card {
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-1);
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  transition: all 0.2s;
}
.item-card:hover { box-shadow: var(--shadow-2); }
.item-card .info h4 { margin: 0 0 6px; font-size: var(--fs-headline); font-weight: 600; letter-spacing: -0.018em; }
.item-card .info .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--label-secondary); font-size: var(--fs-footnote); }
.item-card .stats { display: flex; gap: 28px; align-items: center; }
.item-card .stat .lbl { font-size: var(--fs-caption-1); color: var(--label-tertiary); font-weight: 500; letter-spacing: -0.005em; }
.item-card .stat .val { font-size: var(--fs-headline); font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -0.018em; }

/* ============== EMPTY STATE ============== */
.empty {
  text-align: center;
  padding: 80px 24px;
  background: var(--bg-elevated);
  border-radius: var(--r-lg);
  border: 1px solid var(--separator);
}
.empty .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.35; }
.empty h3 { font-size: var(--fs-title-3); font-weight: 600; margin: 0 0 6px; letter-spacing: -0.02em; }
.empty p { color: var(--label-secondary); font-size: var(--fs-subhead); margin: 0 0 20px; }

/* ============== TOAST ============== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: rgba(29,29,31,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  padding: 13px 22px;
  border-radius: 980px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  font-weight: 500;
  font-size: var(--fs-subhead);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============== DIALOG ============== */
dialog {
  border: none;
  border-radius: var(--r-lg);
  padding: 0;
  max-width: 540px;
  width: 92%;
  box-shadow: 0 24px 80px rgba(0,0,0,0.28);
  background: var(--bg-elevated);
}
dialog::backdrop { background: rgba(0,0,0,0.35); backdrop-filter: blur(6px); }
.dialog-content { padding: 28px 32px; }
.dialog-content h3 { margin: 0 0 22px; font-size: var(--fs-title-2); font-weight: 600; letter-spacing: -0.022em; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: var(--fs-footnote); font-weight: 500; color: var(--label-secondary); margin-bottom: 6px; letter-spacing: -0.005em; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 26px; }

/* ============== HINT ============== */
.hint {
  font-size: var(--fs-subhead);
  color: var(--label-primary);
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--brand-soft);
  border-radius: var(--r-md);
  line-height: 1.5;
}

/* ============== PIPELINE (Kanban for CRM) ============== */
.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  overflow-x: auto;
}
@media (max-width: 1100px) { .pipeline { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .pipeline { grid-template-columns: 1fr; } }
.pipeline-col {
  background: var(--bg-secondary);
  border-radius: var(--r-md);
  padding: 12px;
  min-height: 200px;
}
.pipeline-col h4 {
  font-size: var(--fs-footnote);
  font-weight: 600;
  color: var(--label-secondary);
  margin: 0 0 12px;
  padding: 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pipeline-card {
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  border: 1px solid var(--separator);
  transition: all 0.15s;
}
.pipeline-card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.pipeline-card .nome { font-weight: 600; font-size: var(--fs-subhead); margin-bottom: 2px; letter-spacing: -0.015em; }
.pipeline-card .desc { font-size: var(--fs-caption-1); color: var(--label-secondary); }
.pipeline-card .valor { font-weight: 600; font-size: var(--fs-footnote); margin-top: 8px; color: var(--brand); }

/* ============== DASHBOARD MONDAY-STYLE ============== */
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 1100px) { .hero-grid { grid-template-columns: 1fr; } }

.event-hero {
  background: linear-gradient(135deg, #2c1810 0%, #6f4e2c 100%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.event-hero::before {
  content: "";
  position: absolute; top: -40%; right: -10%;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.event-hero .lbl-mini { font-size: var(--fs-caption-1); font-weight: 500; opacity: 0.7; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
.event-hero h2 { margin: 0 0 6px; font-size: 28px; font-weight: 700; letter-spacing: -0.022em; }
.event-hero .sub { opacity: 0.85; font-size: var(--fs-subhead); margin-bottom: 18px; }
.event-hero .meta-row { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; font-size: var(--fs-footnote); opacity: 0.85; }
.event-hero .countdown { display: inline-flex; align-items: baseline; gap: 6px; }
.event-hero .countdown .num { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.event-hero .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.event-hero .btn { background: rgba(255,255,255,0.15); color: #fff !important; backdrop-filter: blur(8px); }
.event-hero .btn:hover { background: rgba(255,255,255,0.22); }
.event-hero .btn.primary { background: #fff; color: var(--brand-2) !important; }

.quick-stat {
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-1);
}
.quick-stat .lbl { font-size: var(--fs-caption-1); color: var(--label-tertiary); font-weight: 500; }
.quick-stat .val { font-size: var(--fs-title-3); font-weight: 600; margin-top: 4px; letter-spacing: -0.018em; font-variant-numeric: tabular-nums; }
.quick-stat-grid { display: grid; gap: 10px; }

/* Status board (kanban) */
.status-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.status-col {
  background: var(--bg-secondary);
  border-radius: var(--r-md);
  padding: 12px;
  min-height: 280px;
}
.status-col-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.status-col-header .name { font-size: var(--fs-footnote); font-weight: 600; color: var(--label-secondary); text-transform: uppercase; letter-spacing: 0.06em; }
.status-col-header .count {
  background: rgba(0,0,0,0.08);
  font-size: 11px; font-weight: 600; color: var(--label-secondary);
  padding: 1px 8px; border-radius: 980px;
}

.event-card {
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  border: 1px solid var(--separator);
  transition: all 0.18s;
  border-left: 4px solid var(--brand);
}
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.event-card.cls-Corporativo { border-left-color: var(--blue); }
.event-card.cls-Casamento { border-left-color: #ff2d92; }
.event-card.cls-Premium { border-left-color: var(--indigo); }
.event-card.cls-Feira { border-left-color: var(--orange); }
.event-card.cls-Coffee_break { border-left-color: var(--brand); }
.event-card.cls-Ativacao_de_marca { border-left-color: #af52de; }
.event-card.cls-Arquitetura\\/_Design { border-left-color: #ff9500; }
.event-card.cls-Experiencia_sensorial { border-left-color: #5ac8fa; }

.event-card .h { font-weight: 600; font-size: var(--fs-subhead); margin-bottom: 4px; letter-spacing: -0.015em; }
.event-card .meta { font-size: var(--fs-caption-1); color: var(--label-tertiary); display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.event-card .footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: var(--fs-caption-1); }
.event-card .progress { width: 100%; height: 4px; background: rgba(0,0,0,0.06); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.event-card .progress-fill { height: 100%; background: var(--brand); transition: width 0.3s; }

/* Sub-tabs (dentro da página do evento) */
.subtabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--separator);
  margin-bottom: 24px;
  overflow-x: auto;
}
.subtabs::-webkit-scrollbar { display: none; }
.subtab {
  padding: 12px 18px;
  font-size: var(--fs-subhead);
  font-weight: 500;
  color: var(--label-tertiary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  letter-spacing: -0.01em;
}
.subtab:hover { color: var(--label-primary); }
.subtab.active { color: var(--label-primary); border-bottom-color: var(--label-primary); font-weight: 600; }

/* Event page header */
.event-header {
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: var(--r-xl);
  padding: 24px 28px;
  box-shadow: var(--shadow-1);
  margin-bottom: 24px;
}
.event-header .h-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.event-header h2 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -0.022em; }
.event-header .meta-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-footnote); color: var(--label-secondary); }
.event-header .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Alert cards (previsibilidade) */
.alert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 14px 0 0; }
.alert {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--bg-secondary);
  border-left: 3px solid var(--separator-strong);
}
.alert.success { background: rgba(52,199,89,0.08); border-left-color: var(--green); }
.alert.warning { background: rgba(255,149,0,0.08); border-left-color: var(--orange); }
.alert.danger { background: rgba(255,59,48,0.08); border-left-color: var(--red); }
.alert .a-label { font-size: var(--fs-caption-1); font-weight: 500; color: var(--label-tertiary); letter-spacing: -0.005em; }
.alert .a-value { font-size: var(--fs-subhead); font-weight: 600; margin-top: 2px; }
.alert .a-meta { font-size: 11px; color: var(--label-tertiary); margin-top: 2px; }

/* Stars rating */
.stars { display: inline-flex; gap: 6px; font-size: 32px; }
.star { cursor: pointer; color: var(--label-quaternary); transition: color 0.15s, transform 0.15s; line-height: 1; }
.star:hover { transform: scale(1.15); }
.star.active { color: var(--yellow); }

/* ============== CALENDAR ============== */
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.cal-header .month-label { font-size: var(--fs-title-2); font-weight: 600; letter-spacing: -0.022em; min-width: 200px; }
.cal-nav { display: flex; gap: 4px; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--separator);
  border: 1px solid var(--separator);
  border-radius: var(--r-md);
  overflow: hidden;
  gap: 1px;
}
.cal-dow {
  background: var(--bg-secondary);
  padding: 10px 8px;
  font-size: var(--fs-caption-1);
  font-weight: 600;
  color: var(--label-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}
.cal-day {
  background: var(--bg-elevated);
  min-height: 96px;
  padding: 6px 8px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.cal-day:hover { background: var(--bg-tertiary); }
.cal-day.other { background: var(--bg-secondary); color: var(--label-quaternary); }
.cal-day.today .cal-day-num { background: var(--blue); color: #fff; }
.cal-day-num {
  font-size: var(--fs-footnote);
  font-weight: 600;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.cal-event {
  display: block;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.005em;
  font-weight: 500;
}
.cal-event.evento { background: rgba(111,78,44,0.15); color: var(--brand-2); }
.cal-event.briefing { background: rgba(0,122,255,0.15); color: var(--blue); }
.cal-event.followup { background: rgba(255,149,0,0.15); color: #c46b00; }
.cal-event.followup-overdue { background: rgba(255,59,48,0.18); color: var(--red); }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-legend-item { display: flex; align-items: center; gap: 6px; font-size: var(--fs-footnote); color: var(--label-secondary); }
.cal-legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ============== CHECKLIST ============== */
.checklist-template { background: var(--bg-elevated); border: 1px solid var(--separator); border-radius: var(--r-md); padding: 16px 20px; margin-bottom: 12px; }
.checklist-template h4 { margin: 0 0 12px; font-size: var(--fs-headline); font-weight: 600; }
.checklist-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: var(--fs-subhead); border-bottom: 1px solid var(--separator); letter-spacing: -0.01em; }
.checklist-item:last-child { border-bottom: none; }
.checklist-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }
.checklist-item.done span { text-decoration: line-through; color: var(--label-tertiary); }

/* ============== PROPOSTA COMERCIAL ============== */
.prop-grid { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
@media (max-width: 1120px) { .prop-grid { grid-template-columns: 1fr; } }
.prop-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.price-hero {
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  color: #fff; border-radius: var(--r-lg); padding: 24px 26px;
  box-shadow: var(--shadow-2);
}
.price-hero .ph-label { font-size: var(--fs-caption-1); text-transform: uppercase; letter-spacing: 0.09em; opacity: 0.78; font-weight: 600; }
.price-hero .ph-value { font-size: 42px; font-weight: 600; letter-spacing: -0.03em; margin: 3px 0 2px; font-variant-numeric: tabular-nums; }
.price-hero .ph-sub { font-size: var(--fs-footnote); opacity: 0.82; }
.price-hero .ph-divider { height: 1px; background: rgba(255,255,255,0.16); margin: 16px 0; }
.price-hero .ph-line { display: flex; justify-content: space-between; font-size: var(--fs-subhead); padding: 4px 0; }
.price-hero .ph-line .v { font-variant-numeric: tabular-nums; font-weight: 600; }
.cost-line { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--separator); font-size: var(--fs-subhead); }
.cost-line:last-child { border-bottom: none; }
.cost-line .v { font-variant-numeric: tabular-nums; }
.cost-line.tot { font-weight: 600; border-top: 1px solid var(--separator-strong); border-bottom: none; margin-top: 4px; padding-top: 12px; }
.range-margin { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 980px; background: var(--bg-secondary); outline: none; }
.range-margin::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--separator-strong); box-shadow: 0 1px 4px rgba(0,0,0,0.2); cursor: pointer; }
.range-margin::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--separator-strong); box-shadow: 0 1px 4px rgba(0,0,0,0.2); cursor: pointer; }
.ai-panel { background: linear-gradient(180deg, rgba(111,78,44,0.06), rgba(111,78,44,0.015)); border: 1px solid var(--brand-soft); border-radius: var(--r-md); padding: 18px 20px; }
.ai-badge { display:inline-flex; align-items:center; gap:6px; font-size:var(--fs-caption-1); font-weight:600; color:var(--brand-2); background:var(--brand-soft); padding:4px 11px; border-radius:980px; }
.ai-factor { display:flex; justify-content:space-between; gap:12px; font-size:var(--fs-footnote); padding:6px 0; border-bottom:1px solid var(--separator); }
.ai-factor:last-child { border-bottom:none; }
.ai-factor .fv { font-variant-numeric: tabular-nums; font-weight:600; }
.bench-track { position: relative; height: 8px; background: var(--bg-secondary); border-radius: 980px; margin: 12px 0 6px; }
.bench-range { position:absolute; top:0; bottom:0; background: var(--brand-soft); border-radius:980px; }
.bench-marker { position:absolute; top:-5px; width:4px; height:18px; background:var(--brand-2); border-radius:2px; transform:translateX(-50%); }
.viab-box { border-radius: var(--r-md); padding: 16px 18px; }
.viab-box.success { background: rgba(52,199,89,0.08); border:1px solid rgba(52,199,89,0.25); }
.viab-box.warning { background: rgba(255,149,0,0.08); border:1px solid rgba(255,149,0,0.32); }
.viab-box.danger  { background: rgba(255,59,48,0.07); border:1px solid rgba(255,59,48,0.3); }
.prop-cat-head { font-size: var(--fs-caption-1); font-weight:600; text-transform:uppercase; letter-spacing:0.06em; color:var(--label-tertiary); margin: 16px 0 2px; }
.catalog-panel { background: var(--bg-secondary); border:1px solid var(--separator); border-radius: var(--r-md); padding: 16px 18px; margin-top: 12px; }
.catalog-row { display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid var(--separator); font-size:var(--fs-footnote); }
.catalog-row:last-child { border-bottom:none; }
.catalog-row .cn { flex:1; }
.catalog-row .cmeta { color:var(--label-tertiary); font-variant-numeric:tabular-nums; }

/* Fotos */
.foto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.foto-thumb { position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: var(--bg-secondary); border: 1px solid var(--separator); box-shadow: var(--shadow-1); }
.foto-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-thumb .foto-rm {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,0.65); color: #fff; border: none; cursor: pointer; font-size: 16px;
  line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background 0.15s;
}
.foto-thumb .foto-rm:hover { background: var(--red); }
.foto-empty { padding: 30px 20px; text-align: center; color: var(--label-tertiary); background: var(--bg-secondary); border-radius: 10px; border: 1px dashed var(--separator-strong); }
.foto-mini { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; display: block; cursor: pointer; border: 1px solid var(--separator); }
.foto-mini-add {
  width: 40px; height: 40px; border-radius: 8px; background: var(--bg-secondary);
  border: 1px dashed var(--separator-strong); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--label-tertiary); transition: all 0.15s;
}
.foto-mini-add:hover { background: var(--bg-tertiary); border-color: var(--brand); color: var(--brand); }
.foto-mini-add input { display: none; }

/* Lista de itens do cardápio (em cards verticais) */
.prop-itens-list { display: flex; flex-direction: column; margin-top: 4px; }
.prop-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  padding: 14px 10px;
  border-bottom: 1px solid var(--separator);
  align-items: flex-start;
  border-radius: 10px;
  transition: background 0.15s;
}
.prop-item:last-child { border-bottom: none; }
.prop-item:hover { background: rgba(0,0,0,0.015); }
.prop-item.hidden { opacity: 0.45; background: rgba(0,0,0,0.025); }
.prop-item .foto-mini, .prop-item .foto-mini-add { width: 60px !important; height: 60px !important; border-radius: 10px !important; }
.prop-item-body { min-width: 0; }
.prop-item-nome {
  font-size: var(--fs-headline) !important;
  font-weight: 500;
  width: 100% !important;
  border: 1px solid var(--separator) !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  letter-spacing: -0.015em !important;
}
.prop-item.hidden .prop-item-nome { text-decoration: line-through; }
.prop-item-meta { display: flex; gap: 18px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.prop-item-cat {
  font-size: var(--fs-footnote) !important;
  padding: 6px 12px !important;
  width: auto !important;
  background: var(--bg-secondary) !important;
  border-color: transparent !important;
  min-width: 160px;
}
.prop-item-num { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.prop-item-num .lbl {
  font-size: var(--fs-caption-1);
  color: var(--label-tertiary);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.prop-item-num input[type="number"] {
  width: 90px !important;
  font-size: var(--fs-footnote) !important;
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding: 6px 10px !important;
  min-width: 0;
}
.prop-item-num .val { font-size: var(--fs-subhead); font-weight: 600; font-variant-numeric: tabular-nums; }
.prop-item-actions { display: flex; gap: 4px; align-items: center; padding-top: 8px; }
.prop-itens-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 10px; margin-top: 6px;
  border-top: 1px solid var(--separator-strong);
  font-size: var(--fs-subhead);
}
.prop-itens-foot strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.prop-itens-empty { text-align: center; color: var(--label-tertiary); padding: 36px 16px; font-size: var(--fs-subhead); }
/* ============================================================= */
/* ============== GESTAO DE PESSOAS (HR) ======================== */
/* ============================================================= */

/* Avatar */
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: var(--fs-subhead); flex-shrink: 0;
  object-fit: cover; overflow: hidden; letter-spacing: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; font-size: var(--fs-title-2); }
.avatar.sm { width: 30px; height: 30px; font-size: var(--fs-caption-1); }

/* People grid (collaborator cards) */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.person-card {
  background: var(--bg-elevated); border: 1px solid var(--separator);
  border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-1);
  cursor: pointer; transition: all 0.18s; display: flex; flex-direction: column; gap: 12px;
}
.person-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.person-card .pc-top { display: flex; align-items: center; gap: 12px; }
.person-card .pc-name { font-weight: 600; font-size: var(--fs-headline); letter-spacing: -0.018em; }
.person-card .pc-role { font-size: var(--fs-footnote); color: var(--label-secondary); }
.person-card .pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.person-card .pc-meta { font-size: var(--fs-caption-1); color: var(--label-tertiary); }

/* Status dots for collaborator status */
.tag.ativo { background: var(--pastel-sage); color: var(--text-sage); }
.tag.afastado { background: var(--pastel-peach); color: var(--text-peach); }
.tag.ferias { background: var(--pastel-sky); color: var(--text-sky); }
.tag.desligado { background: rgba(0,0,0,0.06); color: var(--label-secondary); }
.tag.experiencia { background: var(--pastel-lavender); color: var(--text-lavender); }

/* Profile header */
.profile-header {
  background: var(--bg-elevated); border: 1px solid var(--separator);
  border-radius: var(--r-xl); padding: 24px 28px; box-shadow: var(--shadow-1); margin-bottom: 22px;
}
.profile-header .ph-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile-header h2 { margin: 0 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -0.022em; }
.profile-header .ph-sub { font-size: var(--fs-subhead); color: var(--label-secondary); }
.profile-header .ph-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.profile-header .ph-tags { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* Definition list (data display) */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 24px; }
.dl .dl-item { padding: 10px 0; border-bottom: 1px solid var(--separator); }
.dl .dl-k { font-size: var(--fs-caption-1); color: var(--label-tertiary); font-weight: 500; letter-spacing: -0.005em; }
.dl .dl-v { font-size: var(--fs-subhead); margin-top: 2px; letter-spacing: -0.01em; }

/* Doc list row */
.doc-row {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--separator); border-radius: var(--r-md);
  background: var(--bg-elevated); margin-bottom: 8px; box-shadow: var(--shadow-1); transition: all 0.15s;
}
.doc-row:hover { box-shadow: var(--shadow-2); }
.doc-icon {
  width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.doc-row .d-title { font-weight: 600; font-size: var(--fs-subhead); letter-spacing: -0.015em; }
.doc-row .d-meta { font-size: var(--fs-caption-1); color: var(--label-tertiary); margin-top: 2px; }
.doc-row .d-actions { display: flex; gap: 6px; }

/* Timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--separator-strong); }
.tl-item { position: relative; padding: 0 0 20px; }
.tl-item::before { content: ""; position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid var(--bg-elevated); box-shadow: 0 0 0 1px var(--separator-strong); }
.tl-item.green::before { background: var(--green); }
.tl-item.orange::before { background: var(--orange); }
.tl-item.red::before { background: var(--red); }
.tl-item.blue::before { background: var(--blue); }
.tl-date { font-size: var(--fs-caption-1); color: var(--label-tertiary); font-weight: 500; }
.tl-title { font-size: var(--fs-subhead); font-weight: 600; margin: 1px 0; letter-spacing: -0.015em; }
.tl-desc { font-size: var(--fs-footnote); color: var(--label-secondary); }

/* Onboarding progress ring inline */
.mini-progress { display: inline-flex; align-items: center; gap: 8px; }
.mini-progress .bar { width: 90px; height: 6px; background: rgba(0,0,0,0.08); border-radius: 999px; overflow: hidden; }
.mini-progress .bar > i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.mini-progress .pct { font-size: var(--fs-caption-1); color: var(--label-secondary); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Benefit chips */
.benefit-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  background: var(--bg-secondary); border: 1px solid var(--separator); border-radius: 980px;
  font-size: var(--fs-footnote); margin: 0 6px 6px 0;
}
.benefit-chip .bc-val { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--brand); }

/* Receipt thumb (benefit receipts) */
.receipt-thumb {
  width: 46px; height: 46px; border-radius: 8px; background: var(--bg-secondary);
  border: 1px solid var(--separator); display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer; flex-shrink: 0;
}
.receipt-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Doc print sheet (generated documents preview) */
.doc-sheet {
  background: #fff; color: #1d1d1f; max-width: 820px; margin: 0 auto;
  padding: 56px 64px; font-size: 14px; line-height: 1.6;
}
.doc-sheet h1 { font-size: 22px; font-weight: 700; text-align: center; margin: 0 0 4px; letter-spacing: -0.01em; }
.doc-sheet .ds-org { text-align: center; color: #6e6e73; font-size: 12px; margin-bottom: 28px; }
.doc-sheet .ds-logo { display: flex; justify-content: center; margin-bottom: 16px; }
.doc-sheet .ds-logo svg { height: 46px; color: #3d2817; }
.doc-sheet table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; }
.doc-sheet th, .doc-sheet td { border: 1px solid #d2d2d7; padding: 8px 12px; text-align: left; }
.doc-sheet th { background: #f5f5f7; font-weight: 600; }
.doc-sheet .ds-sign { margin-top: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.doc-sheet .ds-sign .line { border-top: 1px solid #1d1d1f; padding-top: 8px; text-align: center; font-size: 12px; }
.doc-sheet .ds-meta { color: #6e6e73; font-size: 11px; margin-top: 40px; text-align: center; }
@media print {
  body * { visibility: hidden; }
  #docPrintArea, #docPrintArea * { visibility: visible; }
  #docPrintArea { position: absolute; left: 0; top: 0; width: 100%; }
}

/* ============== RELATÓRIO GERENCIAL (impressão) ============== */
.rpt {
  background: #fff; color: #1d1d1f; max-width: 980px; margin: 0 auto;
  padding: 0 0 40px; font-size: 13px; line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", sans-serif;
}
.rpt-cover {
  padding: 48px 56px 32px; border-bottom: 3px solid #3d2817; margin-bottom: 32px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
}
.rpt-cover .rpt-brand { display: flex; align-items: center; gap: 14px; }
.rpt-cover .rpt-brand svg { height: 40px; color: #3d2817; }
.rpt-cover h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; color: #1d1d1f; }
.rpt-cover .rpt-sub { font-size: 13px; color: #6e6e73; }
.rpt-cover .rpt-period {
  text-align: right; font-size: 12px; color: #6e6e73;
}
.rpt-cover .rpt-period strong { display: block; font-size: 16px; color: #3d2817; font-weight: 700; margin-bottom: 2px; }
.rpt-section { padding: 0 56px; margin-bottom: 36px; }
.rpt-section-title {
  display: flex; align-items: baseline; gap: 10px; margin: 0 0 16px;
  padding-bottom: 8px; border-bottom: 1.5px solid #e5e5ea;
}
.rpt-section-title .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: #3d2817; color: #fff;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.rpt-section-title h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin: 0; color: #1d1d1f; }
.rpt-section-title .rpt-hint { font-size: 11px; color: #86868b; margin-left: auto; }
.rpt-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rpt-kpi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.rpt-kpi {
  border: 1px solid #e5e5ea; border-radius: 10px; padding: 16px 16px 14px;
  border-top: 3px solid #3d2817;
}
.rpt-kpi.tone-good { border-top-color: #248a3d; }
.rpt-kpi.tone-warn { border-top-color: #c77700; }
.rpt-kpi.tone-bad { border-top-color: #d70015; }
.rpt-kpi .rpt-kpi-label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #86868b; margin-bottom: 8px; }
.rpt-kpi .rpt-kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: #1d1d1f; font-variant-numeric: tabular-nums; }
.rpt-kpi .rpt-kpi-sub { font-size: 11px; color: #6e6e73; margin-top: 4px; }
.rpt-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; margin-top: 6px; }
.rpt-delta.up { color: #248a3d; }
.rpt-delta.down { color: #d70015; }
.rpt-delta.flat { color: #86868b; }
.rpt-bar-row { display: grid; grid-template-columns: 160px 1fr 90px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f2f2f4; }
.rpt-bar-row .rl { font-size: 12px; font-weight: 600; color: #1d1d1f; }
.rpt-bar-row .rb { height: 8px; border-radius: 999px; background: #f2f2f4; overflow: hidden; position: relative; }
.rpt-bar-row .rb i { display: block; height: 100%; border-radius: 999px; background: #3d2817; }
.rpt-bar-row .rv { text-align: right; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rpt table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rpt th { background: #f5f5f7; font-weight: 700; text-align: left; padding: 8px 10px; border-bottom: 2px solid #d2d2d7; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.03em; color: #6e6e73; }
.rpt td { padding: 8px 10px; border-bottom: 1px solid #eeeef0; }
.rpt tr:last-child td { border-bottom: none; }
.rpt tr.rpt-total td { font-weight: 700; border-top: 2px solid #d2d2d7; background: #fafafa; }
.rpt .num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.rpt .rpt-rank { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #f2f2f4; font-size: 10px; font-weight: 700; color: #6e6e73; }
.rpt .rpt-pillars { display: flex; gap: 3px; align-items: center; }
.rpt .rpt-pillars .pb { width: 22px; height: 6px; border-radius: 3px; background: #f2f2f4; overflow: hidden; }
.rpt .rpt-pillars .pb i { display: block; height: 100%; background: #3d2817; }
.rpt .rpt-status-ok { color: #248a3d; font-weight: 700; }
.rpt .rpt-status-bad { color: #86868b; }
.rpt-insight-box { background: #faf7f2; border: 1px solid #ecdfc9; border-radius: 10px; padding: 14px 18px; font-size: 12.5px; color: #4a3a26; line-height: 1.55; }
.rpt-insight-box strong { color: #3d2817; }
.rpt-foot { padding: 20px 56px 0; color: #86868b; font-size: 10.5px; text-align: center; border-top: 1px solid #eeeef0; margin-top: 8px; }
.rpt-page-break { page-break-before: always; padding-top: 40px; }
@media print {
  .rpt-section, .rpt-cover, .rpt-foot { padding-left: 0; padding-right: 0; }
  .rpt-page-break { padding-top: 0; }
  .rpt-kpi { break-inside: avoid; }
  .rpt table { break-inside: auto; }
  .rpt tr { break-inside: avoid; }
}
@page { margin: 16mm 14mm; }

/* Filter bar */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.comp-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comp-nav input[type="month"] { width: auto; }
.comp-nav .btn-sm { padding: 8px 12px; min-height: 0; }
.filter-bar select { width: auto; min-width: 150px; }

/* Kanban recruitment reuse pipeline */
.recruit-card .nome { font-weight: 600; font-size: var(--fs-subhead); }
.recruit-card .desc { font-size: var(--fs-caption-1); color: var(--label-secondary); margin-top: 2px; }

/* Section helper */
.subtle-head { font-size: var(--fs-caption-1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--label-tertiary); margin: 22px 0 10px; }

/* Upload dropzone */
.dropzone {
  border: 1px dashed var(--separator-strong); border-radius: var(--r-md); padding: 22px;
  text-align: center; color: var(--label-tertiary); background: var(--bg-secondary); cursor: pointer;
  transition: all 0.15s; font-size: var(--fs-subhead);
}
.dropzone:hover { border-color: var(--brand); color: var(--brand); background: var(--bg-tertiary); }
.dropzone input { display: none; }

/* ============== RECRUTAMENTO AVANÇADO + DISC + 1:1 ============== */
/* Segmented full width nav for sub-views */
.subnav { display:flex; gap:2px; background:rgba(0,0,0,0.06); padding:3px; border-radius:11px; margin-bottom:20px; width:fit-content; }
.subnav button { background:transparent; border:none; padding:8px 18px; font-size:var(--fs-subhead); font-weight:500; border-radius:8px; cursor:pointer; color:var(--label-secondary); letter-spacing:-0.01em; transition:all .15s; }
.subnav button.active { background:#fff; color:var(--label-primary); box-shadow:0 1px 3px rgba(0,0,0,0.08); }

/* DISC */
.disc-bars { display:grid; grid-template-columns:1fr; gap:8px; margin:8px 0; }
.disc-bar { display:flex; align-items:center; gap:10px; }
.disc-bar .dl { width:120px; font-size:var(--fs-footnote); font-weight:600; }
.disc-bar .track { flex:1; height:10px; background:var(--bg-secondary); border-radius:999px; overflow:hidden; }
.disc-bar .fill { height:100%; border-radius:999px; }
.disc-bar .pct { width:42px; text-align:right; font-size:var(--fs-caption-1); font-variant-numeric:tabular-nums; color:var(--label-secondary); }
.disc-D .fill, .disc-dot.D { background:#ff3b30; } .disc-I .fill, .disc-dot.I { background:#ff9500; }
.disc-S .fill, .disc-dot.S { background:#34c759; } .disc-C .fill, .disc-dot.C { background:#007aff; }
.disc-badge { display:inline-flex; align-items:center; gap:6px; padding:4px 12px; border-radius:980px; font-size:var(--fs-caption-1); font-weight:600; }
.disc-badge.D { background:rgba(255,59,48,0.12); color:#d70015; } .disc-badge.I { background:rgba(255,149,0,0.14); color:#c46b00; }
.disc-badge.S { background:rgba(52,199,89,0.14); color:#1e8939; } .disc-badge.C { background:rgba(0,122,255,0.12); color:#0064d2; }
.disc-dot { width:10px; height:10px; border-radius:50%; display:inline-block; }
.disc-q { border:1px solid var(--separator); border-radius:var(--r-md); padding:12px 14px; margin-bottom:10px; }
.disc-q .qn { font-size:var(--fs-caption-1); color:var(--label-tertiary); font-weight:600; margin-bottom:8px; }
.disc-opt { display:grid; grid-template-columns:auto 1fr auto auto; gap:10px; align-items:center; padding:5px 0; font-size:var(--fs-subhead); }
.disc-opt .adj { letter-spacing:-0.01em; }
.disc-pick { display:inline-flex; align-items:center; gap:4px; font-size:var(--fs-caption-1); cursor:pointer; color:var(--label-tertiary); }
.disc-pick input { width:auto; margin:0; }

/* WhatsApp preview */
.wa-preview { background:#e7f7e0; border:1px solid #cfe8c4; border-radius:14px; padding:16px 18px; font-size:var(--fs-subhead); white-space:pre-wrap; line-height:1.5; color:#1d2b1a; max-height:340px; overflow:auto; }

/* 1:1 */
.oo-card { border:1px solid var(--separator); border-radius:var(--r-md); padding:16px 18px; margin-bottom:10px; background:var(--bg-elevated); box-shadow:var(--shadow-1); }
.oo-steps { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:16px; padding-bottom:12px; border-bottom:1px solid var(--separator); }
.oo-step-item { display:flex; align-items:center; gap:6px; font-size:var(--fs-footnote); font-weight:600; color:var(--label-tertiary); cursor:pointer; padding:5px 10px; border-radius:8px; transition:background .12s; }
.oo-step-item:hover { background:var(--bg-secondary); }
.oo-step-item.active { color:var(--brand-2); background:var(--brand-soft); }
.oo-step-item.done { color:var(--label-secondary); }
.oo-step-num { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:50%; background:rgba(0,0,0,0.08); font-size:10px; font-weight:700; flex-shrink:0; }
.oo-step-item.active .oo-step-num { background:var(--brand); color:#fff; }
.oo-step-item.done .oo-step-num { background:var(--green); color:#fff; }
.oo-step-body { min-height:180px; }
.oo-card .oo-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px; flex-wrap:wrap; }
.oo-card .oo-date { font-weight:600; font-size:var(--fs-subhead); }
.oo-metric { display:inline-flex; gap:5px; align-items:center; font-size:var(--fs-caption-1); color:var(--label-secondary); }
.oo-scale { display:inline-flex; gap:3px; }
.oo-scale .pip { width:8px; height:8px; border-radius:50%; background:rgba(0,0,0,0.12); }
.oo-scale .pip.on { background:var(--brand); }
.oo-action { display:flex; align-items:center; gap:8px; padding:5px 0; font-size:var(--fs-footnote); }
.oo-action.done span { text-decoration:line-through; color:var(--label-tertiary); }
.agent-panel { background:linear-gradient(180deg, rgba(111,78,44,0.07), rgba(111,78,44,0.02)); border:1px solid var(--brand-soft); border-radius:var(--r-md); padding:18px 20px; margin-bottom:16px; }
.agent-panel .ap-bullet { display:flex; gap:10px; padding:7px 0; border-bottom:1px solid var(--separator); font-size:var(--fs-subhead); align-items:flex-start; }
.agent-panel .ap-bullet:last-child { border-bottom:none; }
.agent-panel .ap-ic { flex-shrink:0; width:20px; height:20px; border-radius:6px; background:var(--brand-soft); color:var(--brand-2); display:inline-flex; align-items:center; justify-content:center; font-size:12px; margin-top:1px; }

/* Journey timeline within candidate */
.journey { display:flex; gap:0; flex-wrap:wrap; margin:10px 0; }
.journey-step { display:flex; align-items:center; gap:6px; font-size:var(--fs-caption-1); padding:5px 12px; border-radius:980px; background:var(--bg-secondary); color:var(--label-secondary); margin:0 6px 6px 0; }
.journey-step.active { background:var(--brand); color:#fff; font-weight:600; }
.journey-step.done { background:var(--brand-soft); color:var(--brand-2); }

/* ============================================================= */
/* ============== HUMANIZAÇÃO DE TONS (warm) =================== */
/* ============================================================= */
body { background: var(--bg-secondary); }
.tb-greet { color: var(--label-primary); }

/* Rodapé de usuário na sidebar */
.sidebar { display:flex; flex-direction:column; }
.sidebar-user {
  margin-top:auto; display:flex; align-items:center; gap:10px;
  padding:10px; border-top:1px solid var(--separator); margin-top:14px;
}
.sidebar-user .su-info { min-width:0; flex:1; }
.sidebar-user .su-name { font-size:var(--fs-footnote); font-weight:600; letter-spacing:-0.01em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-user .su-role { font-size:var(--fs-caption-2); color:var(--label-tertiary); }
.sidebar-user .su-logout {
  background:transparent; border:none; cursor:pointer; color:var(--label-tertiary);
  width:30px; height:30px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; transition:all .15s;
}
.sidebar-user .su-logout:hover { background:rgba(255,59,48,0.08); color:var(--red); }

/* ============================================================= */
/* ============== LOGIN ======================================== */
/* ============================================================= */
.login-screen {
  position:fixed; inset:0; z-index:2000;
  display:grid; grid-template-columns:1.15fr 1fr;
  background:linear-gradient(135deg, #241309 0%, #43291a 45%, #6f4e2c 100%);
  overflow:hidden;
}
.login-photo {
  position:absolute; inset:0;
  background-image:url("https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?auto=format&fit=crop&w=1600&q=80");
  background-size:cover; background-position:center;
  opacity:0.5;
}
.login-overlay {
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 78% 30%, rgba(255,255,255,0.10), transparent 45%),
    linear-gradient(115deg, rgba(28,16,9,0.92) 0%, rgba(45,28,17,0.78) 42%, rgba(61,40,23,0.55) 100%);
}
.login-grain {
  position:absolute; inset:0; opacity:0.04; pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Hero (lado esquerdo) */
.login-hero {
  position:relative; z-index:2; align-self:center;
  padding:0 8% 0 9%; color:#fff;
}
.login-hero-mark svg { height:34px; width:auto; color:#fff; margin-bottom:40px; opacity:0.96; }
.login-hero h1 {
  font-size:clamp(34px, 4.4vw, 58px); font-weight:700; letter-spacing:-0.03em; line-height:1.04; margin:0 0 18px;
  text-shadow:0 2px 30px rgba(0,0,0,0.3);
}
.login-hero p { font-size:var(--fs-title-3); font-weight:400; opacity:0.86; max-width:440px; line-height:1.45; letter-spacing:-0.01em; }
.login-steam { position:absolute; right:7%; bottom:7%; width:160px; opacity:0.5; }
.login-steam svg { width:100%; height:auto; }
.steam { stroke-dasharray:60; animation:steamRise 3.4s ease-in-out infinite; opacity:0; }
.steam.s2 { animation-delay:0.7s; } .steam.s3 { animation-delay:1.4s; }
@keyframes steamRise { 0%{opacity:0; transform:translateY(8px);} 40%{opacity:0.7;} 100%{opacity:0; transform:translateY(-10px);} }

/* Card (lado direito) */
.login-card {
  position:relative; z-index:3; align-self:center; justify-self:center;
  width:min(400px, 86vw); margin:0 9% 0 0;
  background:rgba(255,255,255,0.92);
  backdrop-filter:saturate(180%) blur(24px); -webkit-backdrop-filter:saturate(180%) blur(24px);
  border:1px solid rgba(255,255,255,0.6);
  border-radius:24px; padding:40px 38px;
  box-shadow:0 30px 80px rgba(0,0,0,0.4);
}
.login-card-brand svg { height:30px; width:auto; color:var(--brand-2); margin-bottom:20px; }
.login-card h2 { margin:0 0 4px; font-size:var(--fs-title-1); font-weight:700; letter-spacing:-0.025em; color:var(--label-primary); }
.login-sub { margin:0 0 26px; color:var(--label-secondary); font-size:var(--fs-subhead); }
.login-field { margin-bottom:16px; }
.login-field label { display:block; font-size:var(--fs-footnote); font-weight:600; color:var(--label-secondary); margin-bottom:7px; }
.login-field input { width:100%; padding:12px 14px; font-size:var(--fs-callout); border:1px solid var(--separator-strong); border-radius:12px; background:#fff; }
.login-pass { position:relative; }
.login-pass input { padding-right:44px; }
.login-eye { position:absolute; right:6px; top:50%; transform:translateY(-50%); background:transparent; border:none; cursor:pointer; color:var(--label-tertiary); padding:8px; border-radius:8px; display:flex; }
.login-eye:hover { color:var(--label-primary); }
.login-remember { display:flex; align-items:center; gap:8px; font-size:var(--fs-footnote); color:var(--label-secondary); margin:4px 0 18px; cursor:pointer; }
.login-remember input { width:auto; margin:0; }
.login-error { color:var(--red); font-size:var(--fs-footnote); font-weight:500; min-height:18px; margin-bottom:8px; }
.login-btn {
  width:100%; padding:14px; border:none; border-radius:980px; cursor:pointer;
  background:linear-gradient(135deg, var(--brand-2), var(--brand)); color:#fff;
  font-size:var(--fs-callout); font-weight:600; letter-spacing:-0.01em; transition:all .15s;
  box-shadow:0 8px 24px rgba(111,78,44,0.35);
}
.login-btn:hover { transform:translateY(-1px); box-shadow:0 12px 30px rgba(111,78,44,0.45); }
.login-foot { text-align:center; margin-top:22px; font-size:var(--fs-caption-1); color:var(--label-tertiary); }

@media (max-width: 860px) {
  .login-screen { grid-template-columns:1fr; }
  .login-hero { padding:48px 28px 0; text-align:center; align-self:end; }
  .login-hero p { margin:0 auto; }
  .login-steam { display:none; }
  .login-card { margin:28px auto 40px; align-self:start; }
}

/* ============== SIDEBAR COMPACTA + GRUPOS RECOLHÍVEIS ============== */
.sidebar { padding-top: 14px; }
.sidebar-brand { padding: 6px 10px 14px; margin-bottom: 12px; }
.sidebar-brand svg { height: 52px !important; }
.sidebar-group { margin-bottom: 6px; }
.sidebar-group-title {
  display:flex; align-items:center; justify-content:space-between;
  font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em;
  color:var(--label-tertiary); padding:8px 10px 4px; cursor:pointer; user-select:none;
}
.sidebar-group-title:hover { color:var(--label-secondary); }
.sidebar-group-title .chev { width:12px; height:12px; transition:transform .2s; opacity:.7; }
.sidebar-group.collapsed .chev { transform:rotate(-90deg); }
.sidebar-group.collapsed .sidebar-group-items { display:none; }
/* itens mais compactos para caber sem rolagem */
.sidebar-item { padding:6px 10px; margin-bottom:0; }
.sidebar-item .icon { width:17px; height:17px; }
.cal-event.neutral { background: rgba(0,0,0,0.06); color: var(--label-secondary); }
.cal-day { min-height: 78px; }

/* Rodapé do rateio de gorjetas */
.rateio-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; background:var(--bg-elevated); border:1px solid var(--separator); border-radius:var(--r-lg); padding:16px 24px; box-shadow:var(--shadow-2); position:sticky; bottom:16px; margin-top:4px; }

/* ============== METAS / PROGRAMA EXCELÊNCIA — visual inspirador ============== */
.tier-goal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 4px; }
@media (max-width: 1000px) { .tier-goal-grid { grid-template-columns: 1fr; } }
.tier-goal-card {
  position: relative; overflow: hidden;
  border-radius: 20px; padding: 22px 22px 20px;
  background: linear-gradient(160deg, var(--bg-elevated) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--separator); box-shadow: var(--shadow-2);
}
.tier-goal-card::before {
  content: ""; position: absolute; top: -30%; right: -20%; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(111,78,44,0.10), transparent 70%); pointer-events: none;
}
.tg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.tg-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; background: var(--brand-soft); flex-shrink: 0; }
.tier-goal-card h4 { margin: 0; font-size: var(--fs-headline); font-weight: 700; letter-spacing: -0.015em; }
.tier-goal-card .tg-sub { font-size: var(--fs-caption-1); color: var(--label-tertiary); margin: 2px 0 16px; }
.tg-level { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 13px; margin-bottom: 8px; transition: transform .15s; }
.tg-level:hover { transform: translateX(2px); }
.tg-level.tg-essencia { background: linear-gradient(90deg, rgba(139,94,52,0.10), rgba(139,94,52,0.03)); border: 1px solid rgba(139,94,52,0.22); }
.tg-level.tg-inspira { background: linear-gradient(90deg, rgba(120,120,128,0.10), rgba(120,120,128,0.03)); border: 1px solid rgba(120,120,128,0.20); }
.tg-level.tg-insight { background: linear-gradient(90deg, rgba(20,20,22,0.09), rgba(20,20,22,0.02)); border: 1px solid rgba(20,20,22,0.18); }
.tg-level.tg-atingido { box-shadow: 0 0 0 2px var(--green) inset; }
.tg-medal { font-size: 19px; line-height: 1; flex-shrink: 0; }
.tg-name { font-size: var(--fs-footnote); font-weight: 700; flex: 1; min-width: 46px; letter-spacing: -0.01em; }
.tg-level input { width: 84px; flex-shrink: 0; text-align: right; background: #fff; font-size: var(--fs-footnote); padding: 6px 9px; }
.tg-level .tg-check { font-size: 15px; color: var(--green); flex-shrink: 0; width: 16px; text-align: center; }

/* Pill de nível atingido (usado no painel/comercial) */
.tier-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px 5px 9px; border-radius: 980px; font-size: var(--fs-caption-1); font-weight: 700; letter-spacing: -0.005em; }
.tier-pill .tp-medal { font-size: 14px; }
.tier-pill.tp-none { background: rgba(0,0,0,0.05); color: var(--label-tertiary); }
.tier-pill.tp-essencia { background: linear-gradient(90deg, rgba(139,94,52,0.16), rgba(139,94,52,0.07)); color: #6b4423; }
.tier-pill.tp-inspira { background: linear-gradient(90deg, rgba(120,120,128,0.18), rgba(120,120,128,0.08)); color: #48484a; }
.tier-pill.tp-insight { background: linear-gradient(135deg, #2c2c2e, #48484a); color: #fff; }
.tier-progress-mini { font-size: 11px; color: var(--label-tertiary); margin-top: 3px; }
.tier-progress-mini strong { color: var(--brand-2); }

/* Score gauge (Excelência Score) */
.score-gauge { display: flex; align-items: baseline; gap: 6px; }
.score-gauge .sg-num { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; background: linear-gradient(135deg, var(--brand-2), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.score-gauge .sg-max { font-size: var(--fs-footnote); color: var(--label-tertiary); font-weight: 600; }

/* ============== PREVISTO × REALIZADO (pacing de metas) ============== */
.mini-progress .bar { position: relative; }
.mini-progress .bar .tick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: rgba(0,0,0,0.55); border-radius: 1px; }
.pacing-box { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--bg-secondary); }
.pacing-box .pc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.pc-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 980px; font-size: var(--fs-caption-1); font-weight: 700; }
.pc-tag.pc-ok { background: rgba(52,199,89,0.16); color: #1e8939; }
.pc-tag.pc-warn { background: rgba(255,149,0,0.16); color: #c46b00; }
.pc-tag.pc-bad { background: rgba(255,59,48,0.14); color: var(--red); }
.pc-line { font-size: var(--fs-footnote); color: var(--label-secondary); line-height: 1.5; }
.pc-line strong { color: var(--label-primary); font-variant-numeric: tabular-nums; }


/* ═══════════════════════════════════════════════════════════════════
   NAVEGAÇÃO MOBILE — MANTER SEMPRE COMO ÚLTIMO BLOCO DESTE ARQUIVO.
   Já houve bugs (2x) de uma regra ".sidebar{}" mais acima no arquivo
   sobrescrever isto por vir depois no cascade. Por isso: fica no fim
   + !important nas propriedades disputadas (position/tamanho/z-index).
   ═══════════════════════════════════════════════════════════════════ */
.mobile-topbar { display: none; }
.sidebar-backdrop { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; padding-top: 54px; }
  .content { padding: 20px 16px 60px; }
  .toolbar { position: sticky; top: 54px; padding: 14px 16px 10px; }

  .mobile-topbar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; top: 0; left: 0; right: 0; height: 54px; z-index: 2001;
    padding: 0 14px; background: rgba(255,255,255,0.94);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--separator);
  }
  .mobile-menu-btn { background: transparent; border: none; padding: 8px; margin: -8px; display: flex; color: var(--label-primary); cursor: pointer; }
  .mobile-topbar-title { font-weight: 600; font-size: var(--fs-subhead); color: var(--label-primary); letter-spacing: -0.01em; }

  /* Sidebar = página cheia ao abrir (não é mais uma gaveta estreita).
     Isso elimina qualquer chance de o conteúdo de trás aparecer entre os itens. */
  .sidebar {
    position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 100% !important; height: 100% !important; max-height: none !important;
    z-index: 2000 !important; border-right: none !important;
    background: var(--bg-elevated) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    padding: calc(54px + env(safe-area-inset-top, 0px)) 16px 32px !important;
    overflow-y: auto !important; -webkit-overflow-scrolling: touch !important;
    display: flex !important; flex-direction: column !important;
    visibility: hidden !important; opacity: 0 !important;
    transition: opacity 0.18s ease, visibility 0.18s ease !important;
  }
  .sidebar.mobile-open { visibility: visible !important; opacity: 1 !important; }
  .sidebar-brand { display: none !important; } /* a marca já aparece na barra superior mobile */

  /* ── Revisão UI/UX mobile ──────────────────────────────────────────
     Problemas encontrados na auditoria: formulários de 2 colunas não
     empilhavam, botões pequenos demais pro dedo, abas internas sem
     rolagem, diálogos sem limite de altura (Salvar ficava escondido
     no fim de um formulário longo), busca com largura fixa, itens do
     menu com densidade de desktop, campos de filtro com largura fixa
     definida inline em várias telas. Corrigido tudo abaixo. */

  /* Formulários: 2 colunas viram 1 — maior ganho de usabilidade */
  .field-row { grid-template-columns: 1fr; gap: 10px; }

  /* Toque maior em botões (mínimo confortável ~38-44px) */
  .btn { min-height: 44px; padding: 10px 18px; }
  .btn-sm { min-height: 38px; padding: 9px 14px; }
  td .btn-sm, th .btn-sm { margin: 2px 4px 2px 0; }

  /* Abas internas (.subnav) ganham rolagem horizontal em vez de estourar a tela */
  .subnav { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav button { flex-shrink: 0; white-space: nowrap; }

  /* Diálogos: quase tela cheia, com rolagem interna e o botão Salvar sempre visível
     (fixo no rodapé), sem precisar rolar o formulário inteiro pra confirmar. */
  dialog { width: 94vw; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; }
  .dialog-content { padding: 22px 18px 0; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; min-height: 0; }
  .dialog-actions {
    position: sticky; bottom: 0; margin: 20px -18px 0;
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-elevated); border-top: 1px solid var(--separator);
  }
  .dialog-actions .btn { flex: 1; justify-content: center; }

  /* Busca ocupa a largura toda em vez de 280px fixos */
  .search { width: 100%; }

  /* Itens do menu com toque confortável (é tela cheia agora, não precisa de densidade de desktop) */
  .sidebar-item { padding: 12px 12px !important; font-size: var(--fs-body) !important; }
  .sidebar-item .icon { width: 20px; height: 20px; }
  .sidebar-group-title { padding: 14px 10px 8px !important; }

  /* Filtros: campos com largura fixa em px (definida inline em várias telas) viram flexíveis */
  .filter-bar input, .filter-bar select { width: auto !important; flex: 1 1 140px !important; min-width: 0 !important; }

  /* Tabelas largas: sombra sutil na borda indicando que dá pra arrastar pro lado */
  .table-wrap { box-shadow: inset -14px 0 10px -10px rgba(0,0,0,0.10); }

  /* KPIs: números grandes (ex.: R$ 57.000,00) não estouram o card */
  .kpi .value, .kpi-input { font-size: var(--fs-title-2) !important; }
  .kpi { overflow-wrap: break-word; }

  /* Trava real do scroll de fundo no iOS (overflow:hidden isolado não funciona no Safari/Chrome) */
  body.nav-locked { position: fixed !important; left: 0; right: 0; width: 100%; overflow: hidden; }
}
@media (min-width: 901px) {
  .mobile-topbar, .sidebar-backdrop { display: none !important; }
}
