:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #64748b;
  --line: #dbe3ef;
  --primary: #0f766e;
  --primary-dark: #0b5852;
  --accent: #2563eb;
  --danger: #dc2626;
  --warn: #b45309;
  --ok: #15803d;
  --sidebar-bg: rgba(71, 85, 105, .74);
  --sidebar-soft: rgba(255, 255, 255, .16);
  --sidebar-hover: rgba(255, 255, 255, .22);
  --sidebar-text: rgba(255, 255, 255, .86);
  --sidebar-strong: #ffffff;
  --sidebar-muted: rgba(255, 255, 255, .72);
  --input-bg: #ffffff;
  --shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

/* CAETÉ UI Concept layer: visual refresh only */
:root {
  --bg: #f5f6f7;
  --panel: #ffffff;
  --ink: #1f2328;
  --muted: #747b72;
  --line: #e8e6e1;
  --primary: #46614e;
  --primary-dark: #33483a;
  --accent: #7aaa67;
  --danger: #b25a4f;
  --warn: #9a6b30;
  --ok: #46614e;
  --sidebar-bg: rgba(255, 255, 255, .86);
  --sidebar-soft: #f4f5f2;
  --sidebar-hover: #eef1ec;
  --sidebar-text: #677064;
  --sidebar-strong: #1f2328;
  --sidebar-muted: #858b81;
  --input-bg: #ffffff;
  --shadow: 0 18px 50px rgba(31, 35, 40, .055);
  --caete-sand: #e8e2d8;
  --caete-soft: #f5f6f7;
  --caete-radius: 22px;
}

body[data-theme="dark"] {
  --bg: #171b1d;
  --panel: #202528;
  --ink: #f5f6f7;
  --muted: #a6ada3;
  --line: #303734;
  --primary: #7aaa67;
  --primary-dark: #9abd8d;
  --accent: #e8e2d8;
  --sidebar-bg: rgba(31, 35, 40, .92);
  --sidebar-soft: rgba(255, 255, 255, .07);
  --sidebar-hover: rgba(255, 255, 255, .09);
  --sidebar-text: rgba(245, 246, 247, .72);
  --sidebar-strong: #ffffff;
  --sidebar-muted: rgba(245, 246, 247, .58);
  --input-bg: #191f21;
  --shadow: 0 22px 60px rgba(0, 0, 0, .25);
}

body {
  background:
    radial-gradient(circle at 22% -8%, rgba(122, 170, 103, .11), transparent 34%),
    linear-gradient(180deg, #fafaf8 0%, var(--bg) 44%);
  font-family: Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.sidebar {
  inset: 16px auto 16px 16px;
  width: 254px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--sidebar-bg);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(31, 35, 40, .08);
}

.brand {
  gap: 12px;
  margin-bottom: 30px;
}

.brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: .18em;
}

.brand-mark {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 0;
  background: transparent;
  color: transparent;
}

.brand-mark i {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid var(--primary);
}

.brand-mark i:nth-child(1) { left: 0; bottom: 0; }
.brand-mark i:nth-child(2) { left: 11px; bottom: 11px; }
.brand-mark i:nth-child(3) { left: 22px; bottom: 22px; background: var(--primary); }
.brand-mark i:nth-child(4) { left: 22px; bottom: 0; border-color: var(--accent); }

.brand small {
  max-width: 150px;
  color: var(--sidebar-muted);
  font-size: 11px;
  line-height: 1.35;
}

nav {
  gap: 7px;
}

nav button {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 15px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 560;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

nav button svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.75;
}

nav button.active,
nav button:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-strong);
  transform: translateX(2px);
}

nav button.active {
  box-shadow: none;
}

.sidebar-user {
  border-top: 1px solid var(--line);
}

.avatar {
  background: var(--primary);
  color: #fff;
}

.profile-row small,
.account-menu .ghost {
  color: var(--sidebar-muted);
}

.account-menu button {
  border-radius: 14px;
}

.account-menu .ghost:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-strong);
}

.plan-button {
  background: var(--primary);
  color: #fff;
}

.plan-button:hover {
  background: var(--primary-dark);
}

.main {
  margin-left: 286px;
  padding: 30px;
}

.topbar {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(300px, 28vw);
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--muted);
}

.topbar-search span {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.topbar-search span::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  width: 10px;
  height: 10px;
  border: 1.7px solid currentColor;
  border-radius: 50%;
}

.topbar-search span::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 6px;
  border-top: 1.7px solid currentColor;
  transform: rotate(45deg);
}

.topbar-search input {
  min-width: 0;
  min-height: 0;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.topbar-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(70, 97, 78, .1);
}

.icon-button {
  position: relative;
  width: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}

.icon-button span::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 9px;
  width: 13px;
  height: 15px;
  border: 1.7px solid currentColor;
  border-radius: 9px 9px 5px 5px;
}

.icon-button span::after {
  content: "";
  position: absolute;
  left: 16px;
  bottom: 9px;
  width: 7px;
  border-top: 1.7px solid currentColor;
}

h1 {
  font-size: 30px;
  letter-spacing: -.035em;
}

h2 {
  font-size: 17px;
  letter-spacing: -.02em;
}

h3 {
  font-size: 14px;
}

button {
  min-height: 40px;
  border-radius: 14px;
  padding: 9px 15px;
  background: var(--primary);
  font-size: 13px;
  font-weight: 650;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(31, 35, 40, .08);
}

.ghost {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--primary);
}

.ghost:hover {
  background: #f1f3ef;
  color: var(--primary-dark);
}

input,
select,
textarea {
  min-height: 42px;
  border-color: var(--line);
  border-radius: 14px;
  background: var(--input-bg);
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(70, 97, 78, .1);
}

.cards {
  gap: 18px;
}

.cards article,
.panel,
.settings-menu,
.login-form,
.workspace-card,
.office-calendar,
.office-day-agenda,
.calendar-drawer,
.project-hero,
.dashboard-command-bar,
.time-weather-card,
.mini-calendar-card {
  border-color: var(--line);
  border-radius: var(--caete-radius);
  box-shadow: var(--shadow);
}

.cards article,
.panel {
  background: rgba(255, 255, 255, .9);
}

.cards article {
  padding: 22px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.cards article:hover,
.panel:hover,
.workspace-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 70px rgba(31, 35, 40, .08);
}

.cards strong {
  font-size: 26px;
  letter-spacing: -.035em;
}

.panel {
  padding: 22px;
}

.panel-head {
  margin-bottom: 18px;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 16px 12px;
  border-bottom-color: var(--line);
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

tbody tr {
  transition: background .18s ease;
}

tbody tr:hover {
  background: #fafaf8;
}

.icon {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8f5;
}

.tag {
  padding: 5px 10px;
  font-size: 11px;
}

.tag.neutral {
  color: var(--primary);
  background: #edf2ea;
}

.tag.ok {
  color: var(--primary);
  background: #e8f1e4;
}

.tag.warn {
  color: #8a652c;
  background: #f5ead8;
}

.project-hero {
  background: linear-gradient(135deg, var(--graphite, #1f2328), var(--primary));
  box-shadow: 0 18px 50px rgba(70, 97, 78, .18);
}

.time-weather-clock {
  background: var(--graphite, #1f2328);
}

.weather-icon {
  background: #edf2ea;
  color: var(--primary);
}

.weather-forecast article,
.mini-calendar-days button,
.office-calendar-grid button,
.clean-list li {
  background: #fafaf8;
}

.mini-calendar-days button.selected,
.office-calendar-grid button.active {
  background: var(--primary);
}

.progress b,
.progress-line i {
  background: var(--primary);
}

.login-shell {
  background:
    radial-gradient(circle at 20% 10%, rgba(122, 170, 103, .16), transparent 30%),
    var(--caete-soft);
}

.login-brand {
  background: linear-gradient(135deg, var(--graphite, #1f2328), #2f3f35);
}

.login-brand p {
  color: rgba(255, 255, 255, .72);
}

.login-visual div {
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(232, 226, 216, .9), rgba(122, 170, 103, .55));
}

.login-form {
  border-radius: 26px;
}

.modal {
  border-radius: 28px;
}

@media (max-width: 900px) {
  .sidebar {
    inset: auto;
    margin: 12px;
  }

  .main {
    margin-left: 0;
    padding: 14px;
  }
}

body[data-theme="dark"] {
  --bg: #0b1220;
  --panel: #162033;
  --ink: #edf3fb;
  --muted: #9fb0c7;
  --line: #253247;
  --primary: #34d399;
  --primary-dark: #10b981;
  --accent: #60a5fa;
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #4ade80;
  --sidebar-bg: rgba(30, 41, 59, .78);
  --sidebar-soft: rgba(255, 255, 255, .12);
  --sidebar-hover: rgba(255, 255, 255, .18);
  --sidebar-text: rgba(255, 255, 255, .82);
  --sidebar-strong: #ffffff;
  --sidebar-muted: rgba(255, 255, 255, .62);
  --input-bg: #101827;
  --shadow: 0 14px 34px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 272px;
  padding: 22px 16px;
  background: var(--sidebar-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: white;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 16px 0 42px rgba(15, 23, 42, .14);
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--primary);
  font-weight: 800;
}
.brand small { display: block; color: var(--sidebar-muted); margin-top: 3px; }
nav { display: grid; gap: 6px; }
nav button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--sidebar-text);
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  align-items: center;
  border-radius: 14px;
}
nav button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
nav button.active, nav button:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-strong);
}
nav button.active {
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, .82);
}
.sidebar-user {
  border-top: 1px solid rgba(255, 255, 255, .18);
  padding-top: 16px;
}
.profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-weight: 800;
}
.profile-row small {
  display: block;
  color: var(--sidebar-muted);
  margin-top: 2px;
}
.account-menu {
  display: grid;
  gap: 7px;
}
.account-menu button {
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  font-size: 13px;
}
.account-menu .ghost {
  background: transparent;
  color: var(--sidebar-text);
}
.account-menu .ghost:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.plan-button {
  background: #f59e0b;
  color: #101827;
}
.plan-button:hover { background: #d97706; color: #fff; }

.main { margin-left: 272px; padding: 24px; }
.login-mode .sidebar,
.login-mode .topbar {
  display: none;
}
.login-mode .main {
  margin-left: 0;
  padding: 0;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: #eef3f8;
}
.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 56px;
  background: #101827;
  color: #fff;
}
.login-brand .brand-mark {
  width: 58px;
  height: 58px;
  margin-bottom: 4px;
}
.login-brand h1 {
  font-size: 42px;
}
.login-brand p {
  max-width: 560px;
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1.45;
}
.login-visual {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 520px;
  margin-top: 22px;
}
.login-visual div {
  min-height: 160px;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(15, 118, 110, .95), rgba(37, 99, 235, .65));
}
.login-visual div:nth-child(2) { margin-top: 34px; }
.login-visual div:nth-child(3) { margin-top: 68px; }
.login-panel {
  display: grid;
  align-content: center;
  padding: 42px;
}
.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.login-tabs button {
  background: #e2e8f0;
  color: var(--ink);
}
.login-tabs button.active {
  background: var(--primary);
  color: #fff;
}
.login-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .09);
  display: grid;
  gap: 16px;
}
.login-form input {
  width: 100%;
}
.login-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
.topbar p { color: var(--muted); margin-top: 5px; }
.user { display: flex; align-items: center; gap: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.project-dashboard-mode .topbar {
  display: none;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.theme-toggle span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: currentColor;
  color: transparent;
  box-shadow: inset -6px -2px 0 rgba(255, 255, 255, .64);
}
body[data-theme="dark"] .theme-toggle span {
  box-shadow: none;
}
.user select { min-width: 210px; }
button {
  border: 0;
  border-radius: 8px;
  min-height: 36px;
  padding: 8px 13px;
  background: var(--primary);
  color: white;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
button:hover { background: var(--primary-dark); }
.ghost { background: color-mix(in srgb, var(--primary) 12%, var(--panel)); color: var(--primary); }
.ghost:hover { background: color-mix(in srgb, var(--primary) 18%, var(--panel)); color: var(--primary-dark); }
.danger-btn { background: #fee2e2; color: var(--danger); }
.danger-btn:hover { background: #fecaca; color: #991b1b; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.cards article, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.cards article { padding: 18px; }
.cards small, .cards span, .muted { color: var(--muted); }
.cards strong { display: block; font-size: 28px; margin: 8px 0; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.panel { padding: 18px; margin-bottom: 16px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
input, select, textarea {
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--input-bg);
  font: inherit;
}
input[type="checkbox"] {
  min-width: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
textarea { min-height: 88px; resize: vertical; }
button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.bars { display: grid; gap: 14px; }
.bars label { display: grid; grid-template-columns: 140px 1fr; align-items: center; color: var(--muted); }
.bars b {
  display: block;
  min-width: 38px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: white;
  padding: 7px 12px;
  text-align: right;
}
.alerts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.alerts li { border-left: 4px solid var(--accent); padding-left: 12px; }
.alerts span { display: block; color: var(--muted); margin-top: 3px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1900px; }
.table-wrap.clean-planned-table table { min-width: 1040px; }
.table-wrap.compact table { min-width: 880px; }
.table-wrap.report-table table { min-width: 1120px; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; cursor: pointer; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.clean-planned-table th {
  font-size: 11px;
  letter-spacing: 0;
}
.clean-planned-table td {
  padding: 11px 9px;
}
.clean-planned-table td strong {
  display: block;
  font-size: 13px;
}
.clean-planned-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.clean-planned-table td:nth-child(5) {
  min-width: 170px;
}
.clean-planned-table .row-actions {
  gap: 4px;
  justify-content: flex-start;
  flex-wrap: nowrap;
}
.clean-planned-table .icon {
  min-width: 0;
  padding: 7px 9px;
  font-size: 12px;
}
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.clickable-row td:last-child {
  min-width: 98px;
  width: 98px;
}
.table-inline-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 10px;
  width: max-content;
  min-width: 86px;
  margin-inline: auto;
}
.clickable-row { cursor: pointer; }
.clickable-row:hover td {
  background: color-mix(in srgb, var(--sage) 9%, var(--panel));
}
.icon {
  min-width: 38px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--line) 48%, var(--panel));
  color: var(--ink);
  font-size: 12px;
}
.icon:hover { background: color-mix(in srgb, var(--line) 75%, var(--panel)); }
.caete-icon-action {
  min-width: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--sage) 14%, var(--panel));
}
.caete-icon-action:hover {
  color: #fff;
  background: var(--accent);
  transform: translateY(-1px);
}
.caete-icon-action.danger-btn {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--panel));
}
.caete-icon-action.danger-btn:hover {
  color: #fff;
  background: var(--danger);
}
.finance-view-modal {
  grid-column: 1 / -1;
  width: min(860px, 100%);
}
.finance-view-intro {
  margin: 0 0 14px;
  color: var(--muted);
}
.finance-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.finance-view-field {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--sage) 7%, var(--panel));
}
.finance-view-field.full {
  grid-column: 1 / -1;
}
.finance-view-field span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.finance-view-field strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .finance-view-grid {
    grid-template-columns: 1fr;
  }
}
.tag { display: inline-block; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.tag.danger { color: var(--danger); background: #fee2e2; }
.tag.warn { color: var(--warn); background: #fef3c7; }
.tag.ok { color: var(--ok); background: #dcfce7; }
.tag.neutral { color: var(--accent); background: #dbeafe; }
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  padding-top: 14px;
}
.pagination div { display: flex; gap: 8px; }

.report-list { display: grid; gap: 10px; }
.report-row { display: grid; grid-template-columns: 1fr 140px; align-items: center; gap: 12px; }
.report-row span:last-child { text-align: right; font-weight: 800; }

.office-logo-uploader {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(245, 246, 247, .72);
}

.office-logo-preview {
  width: 112px;
  height: 72px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.office-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}
.progress { height: 9px; border-radius: 999px; background: var(--line); margin-top: 7px; overflow: hidden; }
.progress b { display: block; height: 100%; background: var(--primary); }

.settings-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
}
.settings-menu {
  display: grid;
  align-content: start;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.settings-menu button {
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 10px 12px;
}
.settings-menu button.active,
.settings-menu button:hover {
  background: color-mix(in srgb, var(--primary) 12%, var(--panel));
  color: var(--primary);
}
.settings-panel { min-width: 0; }
.report-filters .panel-head { align-items: flex-start; }
.filters-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}
.filter-actions { align-items: end; }
.swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--line);
  vertical-align: middle;
  margin-right: 8px;
}

.office-home {
  display: grid;
  gap: 16px;
}
.executive-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.executive-cards article { min-height: 118px; }
.executive-cards strong { font-size: 22px; }
.office-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 16px;
}
.office-chart {
  min-height: 245px;
  margin-bottom: 0;
}
.office-bars { display: grid; gap: 18px; }
.office-bar-row { display: grid; gap: 9px; }
.office-bar-row > div:first-child,
.office-calendar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.office-bar-row span {
  color: var(--muted);
  font-weight: 800;
}
.office-bar-track {
  height: 13px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.office-bar-track b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}
.office-bar-row.expense .office-bar-track b { background: var(--warn); }
.office-flow-chart {
  min-height: 156px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.flow-point {
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.flow-point span {
  width: 22px;
  border-radius: 999px;
  background: var(--primary);
}
.flow-point span.negative { background: var(--danger); }
.flow-point small {
  font-size: 11px;
  text-align: center;
}
.office-status-chart { display: grid; gap: 12px; }
.office-status-chart > div {
  display: grid;
  grid-template-columns: 1fr 1.5fr 32px;
  gap: 10px;
  align-items: center;
}
.office-status-chart span { color: var(--muted); }
.office-main-grid {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 16px;
}
.office-calendar,
.office-day-agenda { margin-bottom: 0; }
.office-calendar .panel-head h2 {
  font-size: 18px;
}
.office-calendar .panel-head p,
.office-calendar-head,
.office-calendar-grid {
  font-size: 13px;
}
.office-calendar .actions button {
  min-height: 38px;
  padding: 9px 14px;
  font-size: 14px;
}
.office-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}
.office-calendar-grid b {
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}
.office-calendar-grid button,
.office-calendar-grid span {
  min-height: 42px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--line) 18%, var(--panel));
  color: var(--ink);
  padding: 5px;
}
.office-calendar-grid button {
  border: 0;
  cursor: pointer;
  display: grid;
  gap: 2px;
  align-content: center;
  position: relative;
  font-size: 13px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.office-calendar-grid button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .1);
}
.office-calendar-grid button.active {
  background: var(--primary);
  color: #fff;
}
.office-calendar-grid button.selected {
  outline: 2px solid color-mix(in srgb, var(--primary) 60%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
}
.office-calendar-grid button.weekend:not(.active) {
  background: color-mix(in srgb, var(--line) 28%, var(--panel));
}
.office-calendar-grid button.has-event:not(.active) {
  outline: 2px solid color-mix(in srgb, var(--accent) 32%, transparent);
}
.office-calendar-grid button.has-overdue:not(.active) {
  outline-color: color-mix(in srgb, var(--danger) 34%, transparent);
}
.office-calendar-grid small {
  font-size: 11px;
  color: inherit;
  opacity: .78;
}
.day-badges {
  display: flex;
  justify-content: center;
  gap: 4px;
  min-height: 6px;
}
.day-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
}
.day-dot.payment { background: var(--danger); }
.day-dot.receipt { background: #16a34a; }
.day-dot.meeting { background: #2563eb; }
.day-dot.overdue { background: #f97316; }
.office-agenda-list,
.activity-list,
.finance-summary {
  display: grid;
  gap: 10px;
}
.office-agenda-item {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  border-left: 4px solid var(--event-color, var(--primary));
  padding: 11px 0 11px 12px;
  border-bottom: 1px solid var(--line);
}
.office-agenda-item time {
  color: var(--primary);
  font-weight: 900;
}
.office-agenda-item span,
.activity-item small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.calendar-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  width: min(520px, 35vw);
  height: 100vh;
  background: var(--panel);
  color: var(--ink);
  border-left: 1px solid var(--line);
  box-shadow: -22px 0 48px rgba(15, 23, 42, .18);
  transform: translateX(105%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
}
.calendar-drawer.open { transform: translateX(0); }
.calendar-drawer-header {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
.calendar-drawer-header h2 {
  margin: 4px 0;
  font-size: 22px;
  text-transform: capitalize;
}
.calendar-drawer-header p {
  margin: 0;
  color: var(--muted);
}
.drawer-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}
.calendar-drawer-body {
  overflow: auto;
  padding: 20px 24px;
  display: grid;
  gap: 22px;
}
.drawer-section,
.drawer-activity-list,
.pending-list {
  display: grid;
  gap: 12px;
}
.drawer-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.drawer-activity-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--type-color, var(--primary));
  border-radius: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  background: color-mix(in srgb, var(--panel) 94%, var(--type-color, var(--primary)));
  position: relative;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
}
.drawer-activity-time {
  display: grid;
  align-content: start;
  gap: 4px;
}
.drawer-activity-time strong {
  color: var(--primary);
  font-size: 15px;
}
.drawer-activity-time span {
  color: var(--muted);
  font-size: 12px;
}
.drawer-activity-content {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.drawer-activity-content small,
.drawer-activity-content span {
  color: var(--muted);
}
.drawer-activity-content strong,
.drawer-activity-content span {
  overflow-wrap: anywhere;
}
.drawer-activity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.drawer-activity-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, max-height .18s ease;
}
.drawer-activity-card:hover .drawer-activity-actions,
.drawer-activity-card:focus-within .drawer-activity-actions {
  opacity: 1;
  max-height: 56px;
  transform: translateY(0);
}
.drawer-activity-actions .ghost {
  padding: 8px 10px;
  min-height: 34px;
}
.drawer-activity-actions .danger {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 9%, var(--panel));
}
.pending-list label {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}
.pending-list input { accent-color: var(--primary); }
.calendar-drawer-footer {
  margin-top: auto;
  padding: 18px 24px 24px;
  border-top: 1px solid var(--line);
}
.calendar-drawer-footer button {
  width: 100%;
  min-height: 46px;
}
.empty-state {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}
.office-bottom-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
}
.activity-item {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.activity-item > span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}
.finance-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--line) 18%, var(--panel));
}
.finance-summary span { color: var(--muted); }
.finance-summary strong { font-size: 18px; }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.plan-card {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
  box-shadow: var(--shadow);
  min-height: 520px;
}
.plan-card.active {
  border-color: var(--primary);
  box-shadow: 0 14px 34px rgba(15, 118, 110, .14);
}
.plan-card.popular {
  border-color: color-mix(in srgb, var(--primary) 72%, var(--line));
}
.plan-card-content {
  display: grid;
  align-content: start;
  gap: 12px;
}
.plan-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.plan-card-content > strong {
  font-size: 24px;
}
.plan-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 10%, var(--panel));
  font-size: 20px;
}
.plan-tagline {
  min-height: 38px;
}
.plan-card p,
.plan-card small {
  color: var(--muted);
}
.plan-card button {
  align-self: end;
  width: 100%;
}
.plan-card ul,
.subscription-summary ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.plan-card li,
.subscription-summary li {
  margin: 6px 0;
}
.subscription-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.subscription-summary > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--line) 22%, var(--panel));
}
.google-sync-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.google-sync-actions {
  align-items: stretch;
}
.google-calendar-panel input[readonly] {
  background: color-mix(in srgb, var(--line) 22%, var(--panel));
}

/* Subscription: compact account overview */
.subscription-page {
  display: grid;
  gap: 12px;
}

.subscription-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.subscription-kpi {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  min-height: 92px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(31, 35, 40, .035);
}

.subscription-kpi-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 8%, var(--panel));
  color: var(--primary);
  font-size: 16px;
}

.subscription-kpi > div,
.subscription-kpi-value { min-width: 0; }

.subscription-kpi small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.subscription-kpi-value {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subscription-kpi-value strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-kpi-value .tag {
  flex: 0 0 auto;
  padding: 3px 7px;
  font-size: 9px;
}

.subscription-kpi p {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-benefits-panel { padding: 0; overflow: hidden; }

.subscription-section-head {
  margin: 0;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.subscription-title-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subscription-title-with-icon > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--primary);
}

.subscription-title-with-icon h2,
.subscription-compact-head h2 {
  margin: 0 0 2px;
  font-size: 14px;
}

.subscription-title-with-icon p,
.subscription-compact-head p { margin: 0; font-size: 10px; }

.subscription-benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
}

.subscription-benefits-grid > article {
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 96%, var(--primary));
}

.subscription-benefits-grid h3 {
  margin: 0 0 11px;
  color: var(--text);
  font-size: 12px;
}

.subscription-check-list,
.subscription-module-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.subscription-check-list li,
.subscription-module-list li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.subscription-check-list i,
.subscription-module-list i {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 11px;
}

.subscription-google-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.subscription-google-status {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: var(--primary);
}

.subscription-google-status > i { font-size: 16px; }
.subscription-google-status > span { display: grid; min-width: 0; gap: 2px; }
.subscription-google-status strong { color: var(--text); font-size: 10px; }
.subscription-google-status small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.subscription-google-actions { display: flex; align-items: center; gap: 7px; }
.subscription-google-actions input { width: min(190px, 24vw); min-height: 30px; padding: 6px 9px; font-size: 10px; }
.subscription-google-row button { min-height: 30px; padding: 6px 10px; font-size: 10px; }

.subscription-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.subscription-plans-panel,
.subscription-history-panel {
  min-width: 0;
  min-height: 220px;
  padding: 13px;
}

.subscription-compact-head { margin-bottom: 10px; }
.subscription-compact-head button { min-height: 31px; padding: 6px 10px; font-size: 10px; }
.subscription-plans-table { table-layout: fixed; min-width: 650px; }
.subscription-plans-table th { padding: 8px; font-size: 8px; }
.subscription-plans-table td { padding: 8px; font-size: 9px; }
.subscription-plans-table .current-plan-row td { background: color-mix(in srgb, var(--primary) 7%, var(--panel)); }
.subscription-plans-table .current-plan-row td:first-child { border-left: 2px solid var(--primary); }

.subscription-payment-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.subscription-payment-list li {
  display: flex;
  min-height: 45px;
  align-items: stretch;
  gap: 10px;
}

.subscription-payment-line {
  flex: 0 0 2px;
  border-radius: 2px;
  background: var(--primary);
}

.subscription-payment-list li > div {
  display: grid;
  align-content: center;
  gap: 4px;
}

.subscription-payment-list strong { color: var(--text); font-size: 10px; }
.subscription-payment-list small { color: var(--muted); font-size: 9px; }
.subscription-payment-list .subscription-empty { align-items: center; justify-content: center; color: var(--muted); }

.subscription-plan-modal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 900px;
}

.subscription-plan-modal-grid .plan-card { min-height: 100%; }

@media (max-width: 1180px) {
  .subscription-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subscription-bottom-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .subscription-kpis,
  .subscription-benefits-grid { grid-template-columns: 1fr; }
  .subscription-section-head { align-items: stretch; flex-direction: column; }
  .subscription-section-head .actions { width: 100%; }
  .subscription-section-head .actions button { flex: 1; }
  .subscription-check-list,
  .subscription-module-list { grid-template-columns: 1fr; }
  .subscription-google-row { align-items: stretch; flex-direction: column; }
  .subscription-google-actions { width: 100%; }
  .subscription-google-actions input { width: 100%; }
  .subscription-google-row button { flex: 0 0 auto; }
  .subscription-plans-panel { padding-inline: 10px; }
  .subscription-plan-modal-grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .subscription-kpi { min-height: 84px; padding: 12px 13px; }
  .subscription-kpi-value strong { font-size: 16px; }
  .subscription-section-head .actions { flex-direction: column; }
}

.project-dashboard {
  display: grid;
  gap: 16px;
}
.dashboard-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.dashboard-actions {
  flex: 1 1 auto;
  justify-content: flex-start;
  min-width: 0;
  padding: 0;
}
.dashboard-actions button {
  min-width: auto;
}
.dashboard-system-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.dashboard-system-actions select {
  min-width: 190px;
}
.dashboard-system-actions > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.project-hero {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, 1fr)) 180px;
  align-items: end;
  gap: 20px;
  min-height: 148px;
  padding: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .24);
}
.project-hero.has-cover {
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.project-hero.has-cover > * {
  position: relative;
  z-index: 1;
}
.project-hero.has-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, .74), rgba(15, 118, 110, .42));
}
.project-hero h2 { font-size: 26px; margin-bottom: 10px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tags span {
  border-radius: 6px;
  background: rgba(255, 255, 255, .18);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}
.hero-tags span:first-child { background: #dcfce7; color: #166534; }
.hero-meta small,
.project-progress-card small {
  display: block;
  color: #dbeafe;
  font-size: 12px;
  margin-bottom: 5px;
}
.hero-meta strong { display: block; font-size: 13px; line-height: 1.35; }
.project-progress-card {
  align-self: start;
  justify-self: end;
  min-width: 150px;
  padding: 13px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .14);
}
.project-progress-card strong { display: block; font-size: 24px; margin-bottom: 9px; }
.project-progress-card .progress { background: rgba(255, 255, 255, .22); }
.project-progress-card .progress b { background: #fff; }
.dashboard-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(520px, 1fr);
  gap: 16px;
  align-items: stretch;
}
.time-card,
.time-weather-card,
.weather-card,
.mini-calendar-card {
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.time-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: #101827;
  color: #fff;
}
.time-card::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -54px;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .12);
}
.time-card small,
.time-card span { display: block; color: #bfdbfe; }
.time-card strong { display: block; margin: 12px 0 6px; font-size: 32px; }
.time-weather-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  overflow: hidden;
}
.time-weather-clock {
  position: relative;
  overflow: hidden;
  padding: 16px;
  background: #101827;
  color: #fff;
}
.time-weather-clock::after {
  content: none;
}
.time-weather-clock small,
.time-weather-clock span {
  display: block;
  color: #bfdbfe;
}
.time-weather-clock small {
  font-size: 12px;
}
.time-weather-clock span {
  font-size: 12px;
  line-height: 1.35;
}
.time-weather-clock strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 22px;
}
.time-weather-forecast {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
}
.weather-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
}
.weather-main {
  display: flex;
  align-items: center;
  gap: 14px;
}
.weather-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 13%, var(--panel));
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}
.weather-main strong {
  display: block;
  font-size: 28px;
}
.weather-main small,
.weather-location {
  color: var(--muted);
}
.weather-week-title {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}
.weather-forecast {
  display: grid;
  grid-template-columns: repeat(7, minmax(74px, 1fr));
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.weather-forecast article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: color-mix(in srgb, var(--line) 18%, var(--panel));
  min-width: 74px;
}
.weather-forecast b,
.weather-forecast span,
.weather-forecast small {
  display: block;
}
.weather-forecast span {
  margin: 4px 0 3px;
  font-weight: 900;
}
.weather-forecast small {
  color: var(--muted);
  line-height: 1.3;
  font-size: 11px;
}
.mini-calendar-card { padding: 18px; }
.mini-calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.mini-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  text-align: center;
}
.mini-calendar-days b,
.mini-calendar-days span,
.mini-calendar-days button {
  display: grid;
  place-items: center;
  min-height: 25px;
  border-radius: 6px;
  font-size: 12px;
}
.mini-calendar-days b { color: var(--muted); font-size: 11px; }
.mini-calendar-days button {
  border: 0;
  background: color-mix(in srgb, var(--line) 18%, var(--panel));
  color: var(--ink);
  cursor: pointer;
  gap: 1px;
  padding: 4px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.mini-calendar-days button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .1);
}
.mini-calendar-days button.weekend:not(.selected) {
  background: color-mix(in srgb, var(--line) 28%, var(--panel));
}
.mini-calendar-days button.has-event:not(.selected) {
  outline: 2px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.mini-calendar-days button.has-overdue:not(.selected) {
  outline-color: color-mix(in srgb, var(--danger) 34%, transparent);
}
.mini-calendar-days button.drawer-selected {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
}
.mini-calendar-days button small {
  color: inherit;
  opacity: .78;
}
.mini-calendar-days span.selected,
.mini-calendar-days button.selected {
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .32);
}
.project-calendar-drawer .drawer-activity-card.generated {
  background: color-mix(in srgb, var(--panel) 90%, var(--line));
}
.drawer-activity-actions button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.project-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.project-kpis article {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
}
.project-kpis article::before {
  content: "$";
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--accent);
  font-weight: 900;
  grid-row: span 3;
}
.project-kpis article:nth-child(2)::before { content: "↗"; background: #dcfce7; color: var(--ok); }
.project-kpis article:nth-child(3)::before { content: "▣"; background: #ede9fe; color: #7c3aed; }
.dashboard-metric-grid article::before { content: "•"; background: #f1f5f9; color: var(--accent); }
.dashboard-metric-grid article:nth-child(2)::before { content: "%"; background: #dcfce7; color: var(--ok); }
.dashboard-metric-grid article:nth-child(3)::before { content: "↳"; background: #dbeafe; color: var(--accent); }
.dashboard-metric-grid article:nth-child(4)::before { content: "●"; background: #fef3c7; color: #b45309; }
.dashboard-metric-grid article:nth-child(5)::before { content: "−"; background: #fee2e2; color: var(--danger); }
.dashboard-metric-grid article:nth-child(6)::before { content: "+"; background: #dcfce7; color: var(--ok); }
.dashboard-metric-grid article:nth-child(7)::before { content: "P"; background: #e0f2fe; color: #0369a1; }
.dashboard-metric-grid article:nth-child(8)::before { content: "F"; background: #ede9fe; color: #7c3aed; }
.project-kpis strong { font-size: 20px; }
.dashboard-charts {
  align-items: start;
}
.dashboard-chart .report-list {
  min-height: 156px;
}
.project-calendar-panel {
  margin-bottom: 0;
}
.calendar-filters {
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  margin-bottom: 16px;
}
.project-event-list {
  display: grid;
  gap: 10px;
}
.project-event-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: var(--panel);
  padding: 13px;
}
.project-event-card.generated {
  border-left-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, var(--panel));
}
.project-event-card span,
.project-event-card small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.event-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.project-tabs { display: flex; flex-wrap: wrap; gap: 0; }
.project-tabs button {
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 0;
  background: var(--panel);
  color: var(--ink);
  padding: 8px 12px;
  font-size: 12px;
}
.project-tabs button:first-child { border-radius: 6px 0 0 6px; }
.project-tabs button:last-child { border-right: 1px solid var(--line); border-radius: 0 6px 6px 0; }
.project-tabs button.active { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); color: var(--accent); }
.project-details-panel { margin-bottom: 0; }
.compact-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dashboard-tab-table {
  margin-top: 14px;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.photo-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}
.photo-card div {
  min-height: 130px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .28), rgba(15, 118, 110, .22)),
    linear-gradient(45deg, #e0f2fe, #f8fafc);
}
.photo-card span {
  color: var(--muted);
  font-size: 13px;
}
.project-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 90px;
}
.detail-item { display: grid; gap: 7px; }
.detail-item.full { grid-column: 1 / -1; }
.detail-item small { color: var(--muted); font-weight: 800; }
.detail-item strong { font-size: 13px; line-height: 1.45; }

.workspace-groups { display: grid; gap: 22px; }
.workspace-section { display: grid; gap: 10px; }
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.workspace-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.project-cover {
  height: 118px;
  border-radius: 8px;
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .78), rgba(37, 99, 235, .68)),
    linear-gradient(45deg, #dbeafe, #dcfce7);
  background-size: cover;
  background-position: center;
}
.project-cover.has-image {
  min-height: 118px;
}
.project-cover-preview {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .18), rgba(37, 99, 235, .14)),
    color-mix(in srgb, var(--line) 18%, var(--panel));
  background-size: cover;
  background-position: center;
  color: var(--muted);
  font-weight: 800;
}
.project-cover-preview.has-image {
  border-style: solid;
}
.workspace-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
}
.workspace-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.workspace-card p { color: var(--muted); margin-top: 6px; }
.workspace-card small { display: block; color: var(--muted); margin-top: 8px; }

.calendar-list { display: grid; gap: 10px; }
.calendar-event {
  border-left: 5px solid var(--event-color, var(--primary));
  background: color-mix(in srgb, var(--line) 22%, var(--panel));
  border-radius: 8px;
  padding: 13px 14px;
  cursor: pointer;
}
.calendar-event span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.wide-input { width: 100%; min-width: 0; }
.agenda-table table { min-width: 760px; }
.finance-actions {
  gap: 8px;
}
.finance-actions button { min-width: auto; }
.permissions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.permission-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--line) 22%, var(--panel));
}
.client-cover {
  display: grid;
  place-items: center;
  min-height: 140px;
  border-radius: 8px;
  background: linear-gradient(135deg, #dbeafe, #dcfce7);
  background-size: cover;
  background-position: center;
  color: #0f172a;
  font-weight: 800;
  margin-bottom: 12px;
}
.approval-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.client-mode .sidebar,
.client-mode .topbar {
  display: none;
}
.client-mode .main {
  margin-left: 0;
  padding: 0;
}
.client-shell {
  min-height: 100vh;
  padding: 0;
  background:
    radial-gradient(circle at 58% 2%, rgba(232, 226, 216, .34), transparent 26%),
    #fbfaf7;
  display: grid;
  grid-template-columns: 286px 1fr;
  color: #1f2328;
}
.client-unavailable {
  grid-column: 1 / -1;
  place-self: center;
  width: min(460px, calc(100vw - 32px));
  padding: 32px;
  border: 1px solid rgba(70, 97, 78, .16);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(31, 35, 40, .08);
}
.client-portal-sidebar {
  min-height: 100vh;
  padding: 44px 18px 32px;
  background:
    radial-gradient(circle at 18% 4%, rgba(122, 166, 126, .16), transparent 26%),
    linear-gradient(158deg, #24362d 0%, #101c18 54%, #0b1513 100%);
  color: rgba(255, 255, 255, .82);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  box-shadow: inset -1px 0 rgba(255, 255, 255, .08);
}
.client-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 14px 42px;
  color: #fff;
}
.client-logo strong {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: .08em;
}
.client-logo .brand-mark {
  width: 25px;
  height: 25px;
  min-width: 25px;
  filter: brightness(0) invert(1);
}
.client-logo img {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  padding: 4px;
}
.client-nav-label {
  display: block;
  margin: 0 14px 14px;
  color: rgba(255, 255, 255, .46);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.client-nav {
  display: grid;
  gap: 10px;
}
.client-nav button {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 9px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 15px;
  color: rgba(255, 255, 255, .78);
  background: transparent;
  text-align: left;
  font-size: 15px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.client-nav button.active,
.client-nav button:hover {
  background: #f3eadf;
  color: #1f2328;
  transform: none;
}
.client-nav svg,
.client-metric svg,
.client-list-card svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.client-help {
  margin: 0 0 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
}
.client-help p,
.client-powered {
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  line-height: 1.55;
}
.client-help button {
  margin-top: 14px;
  width: 100%;
  min-height: 42px;
  background: rgba(232, 226, 216, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .16);
  display: inline-flex;
  justify-content: center;
  gap: 8px;
}
.client-help button svg {
  width: 16px;
  height: 16px;
}
.client-sidebar-footer {
  margin-top: auto;
}
.client-sidebar-exit {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: rgba(255, 255, 255, .76);
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, .1);
  border-radius: 0;
}
.client-sidebar-exit:hover {
  color: #fff;
  background: rgba(255, 255, 255, .05);
}
.client-sidebar-exit svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
}
.client-portal-main {
  padding: 42px 56px 20px;
  min-width: 0;
}
.client-portal-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}
.client-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.client-notification {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  place-items: center;
  border-radius: 999px;
  color: #46614e;
  background: transparent;
}
.client-notification svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
}
.client-notification i {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #bd7b20;
}
.client-portal-topbar h1 {
  font-size: 31px;
  font-weight: 650;
  letter-spacing: 0;
}
.client-portal-topbar p {
  margin-top: 8px;
  color: #1f2328;
  font-size: 13px;
}
.client-portal-topbar p span {
  color: #888d85;
  margin: 0 4px;
}
.client-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: #1f2328;
}
.client-profile span,
.client-comments span {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f1e8de;
  color: #46614e;
  font-weight: 700;
}
.client-profile small {
  color: #747b72;
}
.client-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 20px;
}
.client-metric,
.client-card {
  border: 1px solid rgba(31, 35, 40, .11);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 46px rgba(31, 35, 40, .045);
}
.client-metric {
  min-height: 118px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.client-metric span,
.client-card h2,
.client-card dt,
.client-card small,
.client-card header button,
.client-request span,
.client-list-card span,
.client-timeline span {
  color: #747b72;
}
.client-metric strong {
  display: block;
  margin-top: 12px;
  color: #1f2328;
  font-size: 29px;
  line-height: 1;
}
.client-metric small {
  display: block;
  margin-top: 8px;
}
.client-metric i {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f1e8de;
  color: #46614e;
  flex: 0 0 auto;
}
.client-progress {
  width: 100%;
  height: 7px;
  margin-top: 14px;
  border-radius: 999px;
  background: #d9d2c8;
  overflow: hidden;
}
.client-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #46614e;
}

/* Identidade visual configurável por escritório no Portal do Cliente. */
.client-shell {
  --client-neutral-950: #202326;
  --client-neutral-800: #3d4246;
  --client-neutral-700: #50575c;
  --client-neutral-600: #697076;
  --client-neutral-300: #cdd1d4;
  --client-neutral-200: #dfe2e4;
  --client-neutral-100: #eef0f1;
  --client-neutral-50: #f7f8f8;
}
.client-portal-sidebar {
  background:
    radial-gradient(circle at 18% 4%, rgb(255 255 255 / 8%), transparent 28%),
    linear-gradient(158deg, #454a4e 0%, #303438 52%, #25282b 100%);
}
.client-nav button.active,
.client-nav button:hover {
  background: var(--client-neutral-100);
  color: var(--client-neutral-950);
}
.client-notification,
.client-metric i,
.client-profile span,
.client-comments span,
.client-card a,
.client-card header button,
.client-timeline b,
.client-list-card i {
  color: var(--client-neutral-700);
}
.client-metric i,
.client-profile span,
.client-comments span,
.client-list-card i {
  background: var(--client-neutral-100);
}
.client-progress b,
.client-primary-action,
.client-budget-actions button:first-child,
.client-request-form button[type="submit"] {
  background: var(--client-neutral-800);
}
.client-card,
.client-metric {
  border-color: var(--client-neutral-200);
}
.client-timeline li::before,
.client-notification i {
  background-color: var(--client-neutral-700);
}

.client-dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr .92fr 1.14fr;
  gap: 20px;
}
.client-card {
  padding: 20px;
  min-width: 0;
}
.client-card h2 {
  font-size: 17px;
  color: #1f2328;
  margin-bottom: 17px;
}
.client-project-cover {
  min-height: 157px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(31, 35, 40, .12), rgba(31, 35, 40, .25)),
    linear-gradient(135deg, #8a7f70, #28362d);
  background-size: cover;
  background-position: center;
  margin-bottom: 16px;
}
.client-summary dl {
  display: grid;
  gap: 13px;
  margin: 0 0 18px;
}
.client-summary dl div,
.client-list-card section,
.client-calendar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.client-summary dt {
  font-size: 12px;
}
.client-summary dd {
  margin: 0;
  font-weight: 600;
}
.client-summary button,
.client-timeline button,
.client-request button {
  width: 100%;
  min-height: 44px;
  background: #f1e8de;
  color: #1f2328;
  justify-content: space-between;
}
.client-timeline section {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  position: relative;
  padding-bottom: 20px;
}
.client-timeline section:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 28px;
  bottom: 0;
  width: 1px;
  background: #ddd3c6;
}
.client-timeline i {
  width: 26px;
  height: 26px;
  border: 2px solid #d7ccbf;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #fff;
  font-style: normal;
  font-size: 12px;
  z-index: 1;
}
.client-timeline .done i {
  border-color: #46614e;
  background: #46614e;
}
.client-timeline .current i {
  border-color: #46614e;
}
.client-budget-head {
  padding: 18px 20px;
  margin: -6px 0 18px;
  border-radius: 9px;
  background: linear-gradient(135deg, #efe5d8, #f7f3ed);
}
.client-budget-head strong,
.client-budget-head span {
  display: block;
}
.client-budget > b {
  display: block;
  margin: 7px 0 11px;
  font-size: 25px;
}
.client-budget-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 18px 0;
}
.client-budget-actions button:first-child {
  background: #46614e;
  color: #fff;
}
.client-budget-actions .ghost {
  border: 1px solid rgba(70, 97, 78, .2);
  background: #fff;
  color: #46614e;
}
.client-card-link {
  display: flex;
  width: 100%;
  min-height: 38px;
  padding: 0;
  justify-content: space-between;
  color: #46614e;
  background: transparent;
  font-weight: 700;
  font-size: 13px;
}
.client-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
}
.client-card header h2 {
  margin: 0;
}
.client-card header button {
  background: transparent;
  padding: 0;
  min-height: auto;
  font-size: 12px;
}
.client-list-card section {
  justify-content: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid #ece8e2;
}
.client-list-card section:last-child {
  border-bottom: 0;
}
.client-list-card i {
  color: #46614e;
}
.client-list-card strong,
.client-list-card span {
  display: block;
}
.client-gallery div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.client-gallery-thumb {
  min-height: 78px;
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(31, 35, 40, .08), rgba(31, 35, 40, .22)),
    linear-gradient(135deg, #b0a392, #2c3a30);
  overflow: hidden;
  margin: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.client-gallery-thumb figcaption {
  opacity: 0;
  pointer-events: none;
}
.client-request strong,
.client-request span,
.client-request p {
  display: block;
}
.client-request p {
  margin: 13px 0 18px;
  color: #555c54;
}
.client-comments {
  margin-top: 20px;
  padding: 22px 24px;
}
.client-comments > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: center;
}
.client-comments small {
  display: block;
  margin-top: 5px;
}
.client-empty-state {
  display: grid;
  min-height: 142px;
  place-content: center;
  justify-items: center;
  gap: 7px;
  color: #747b72;
  text-align: center;
}
.client-empty-state i {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  place-items: center;
  border-radius: 999px;
  color: #46614e;
  background: #f1e8de;
}
.client-empty-state i svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
}
.client-empty-state strong {
  color: #1f2328;
  font-size: 13px;
}
.client-empty-state span {
  max-width: 250px;
  font-size: 12px;
}
.client-footer {
  padding: 22px 0 0;
  color: #8a8f86;
  text-align: center;
  font-size: 12px;
}

.client-module {
  display: grid;
  gap: 18px;
}
.client-module-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.client-module-head h2 {
  font-size: 24px;
  font-weight: 650;
  margin: 0;
}
.client-module-head p {
  margin: 6px 0 0;
  color: #747b72;
}
.client-module-head > button,
.client-row-actions button,
.client-doc-card button,
.client-photo-card button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  background: #46614e;
  color: #fff;
}
.client-search {
  width: min(310px, 100%);
  min-height: 42px;
  border: 1px solid rgba(31, 35, 40, .12);
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
}
.client-filter-row,
.client-schedule-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.client-filter-row button,
.client-schedule-tabs button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(31, 35, 40, .1);
  border-radius: 999px;
  background: #fff;
  color: #555c54;
}
.client-filter-row .active,
.client-schedule-tabs .active {
  background: #edf3ed;
  color: #46614e;
}
.client-table-card,
.client-doc-grid,
.client-schedule-list,
.client-photo-grid,
.client-request-list {
  border: 1px solid rgba(31, 35, 40, .1);
  border-radius: 13px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 46px rgba(31, 35, 40, .045);
}
.client-table-card {
  overflow-x: auto;
}
.client-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.client-table th {
  color: #747b72;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: left;
  padding: 14px 16px;
}
.client-table td {
  border-top: 1px solid #ece8e2;
  padding: 14px 16px;
  vertical-align: middle;
}
.client-table td strong,
.client-table td small {
  display: block;
}
.client-table td small {
  margin-top: 4px;
  color: #747b72;
}
.client-money {
  color: #46614e;
  font-weight: 800;
  white-space: nowrap;
}
.client-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.client-row-actions button {
  min-height: 31px;
  padding: 0 9px;
  background: #f1e8de;
  color: #46614e;
  font-size: 12px;
}
.client-badge,
.client-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.client-badge {
  background: #f1e8de;
  color: #46614e;
}
.client-status.pending { background: #fff3d7; color: #a76500; }
.client-status.done { background: #e2f5e7; color: #2f7440; }
.client-status.review { background: #ede7f7; color: #5d4a86; }
.client-status.danger { background: #ffe4e4; color: #b42323; }
.client-doc-grid,
.client-request-list {
  display: grid;
  gap: 0;
  padding: 8px 18px;
}
.client-doc-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid #ece8e2;
}
.client-doc-card:last-child,
.client-request-ticket:last-child {
  border-bottom: 0;
}
.client-doc-card i {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #edf3ed;
  color: #46614e;
}
.client-doc-card i svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
}
.client-doc-card strong,
.client-doc-card span,
.client-doc-card small {
  display: block;
}
.client-doc-card span,
.client-doc-card small {
  color: #747b72;
  margin-top: 3px;
}
.client-schedule-list {
  display: grid;
  padding: 12px;
}
.client-schedule-item {
  display: grid;
  grid-template-columns: 42px 1fr 180px auto;
  align-items: center;
  gap: 15px;
  padding: 14px;
  border-radius: 11px;
  cursor: pointer;
}
.client-schedule-item:hover {
  background: #f7f5f0;
}
.client-schedule-item > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #edf3ed;
  color: #46614e;
  font-weight: 800;
}
.client-schedule-item small,
.client-photo-card span,
.client-photo-card p,
.client-request-ticket span,
.client-request-ticket p,
.client-history small {
  color: #747b72;
}
.client-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}
.client-photo-card {
  display: grid;
  gap: 9px;
  min-width: 0;
}
.client-photo-card .client-gallery-thumb {
  min-height: 138px;
}
.client-photo-card p {
  margin: 0;
  line-height: 1.45;
}
.client-photo-card button {
  width: fit-content;
  background: #f1e8de;
  color: #46614e;
}
.client-request-ticket {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid #ece8e2;
}
.client-request-ticket p,
.client-history {
  grid-column: 1 / -1;
}
.client-history {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  background: #f7f5f0;
}
.client-readonly-detail {
  display: grid;
  gap: 10px;
  color: #1f2328;
}
.client-readonly-detail p {
  margin: 0;
}

@media (max-width: 1180px) {
  .client-shell { grid-template-columns: 1fr; }
  .client-portal-sidebar { min-height: auto; }
  .client-dashboard-grid,
  .client-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .client-portal-main { padding: 22px 16px; }
  .client-dashboard-grid,
  .client-metrics { grid-template-columns: 1fr; }
  .client-budget-actions { grid-template-columns: 1fr; }
  .client-module-head,
  .client-doc-card,
  .client-schedule-item,
  .client-request-ticket { grid-template-columns: 1fr; }
  .client-module-head { display: grid; }
  .client-photo-grid { grid-template-columns: 1fr; }
}

dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  max-width: 860px;
  width: min(860px, calc(100vw - 28px));
  box-shadow: 0 24px 70px rgba(15, 23, 42, .3);
  overflow-x: hidden;
  background: var(--panel);
  color: var(--ink);
}
dialog::backdrop { background: rgba(15, 23, 42, .45); }
.modal {
  display: block;
  position: static;
  width: auto;
  height: auto;
  padding: 18px;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  outline: 0;
  background: var(--panel);
}
.modal header, .modal footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.modal footer { justify-content: flex-end; margin-top: 18px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
  min-width: 0;
}
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--muted); font-weight: 700; font-size: 13px; }
.field small,
.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.account-office-context {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--sage) 12%, var(--panel));
}
.account-office-context strong {
  color: var(--ink);
  font-size: 15px;
}
.multi-items {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.multi-items-head,
.multi-items-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.multi-items-head h3 {
  margin-bottom: 4px;
}
.multi-items-head > div {
  min-width: 0;
}
.multi-items-head button {
  flex: 0 1 170px;
  white-space: normal;
}
#purchase-items {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.purchase-item-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: color-mix(in srgb, var(--line) 22%, var(--panel));
  min-width: 0;
}
.purchase-item-row .field:nth-child(1) { grid-column: span 2; }
.purchase-item-row .field:nth-child(2) { grid-column: span 2; }
.purchase-item-row .item-description { grid-column: span 4; }
.purchase-item-row .field:nth-child(4) { grid-column: span 2; }
.purchase-item-row .field:nth-child(5) { grid-column: span 2; }
.purchase-item-row button {
  grid-column: 1 / -1;
  justify-self: end;
}
.purchase-item-row input,
.purchase-item-row select {
  min-width: 0;
  width: 100%;
}
.multi-items-total {
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
}
.multi-items-total strong {
  color: var(--ink);
}

.project-month-timeline,
.project-calendar-list {
  display: grid;
  gap: 10px;
}

.project-month-timeline article,
.project-calendar-list article {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(220px, 2fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 94%, var(--sage));
}

.project-month-timeline small,
.project-calendar-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.project-month-bar {
  height: 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
  overflow: hidden;
}

.project-month-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.project-calendar-list article {
  grid-template-columns: 118px 1fr auto;
}

.project-calendar-list time {
  color: var(--muted);
  font-weight: 750;
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 390px;
  background: #101827;
  color: white;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .25);
  z-index: 10000;
}
.hidden { display: none; }

.account-user-form-feedback {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 2px;
  padding: 11px 13px;
  border: 1px solid #efcaca;
  border-radius: 8px;
  background: #fff5f5;
  color: #9f2f2f;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650;
}

.account-user-form-feedback::before {
  content: "!";
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #f7dede;
  font-size: 12px;
  font-weight: 800;
}

.account-user-form-feedback.hidden { display: none; }

#modal-body [aria-invalid="true"] {
  border-color: #c84d4d;
  box-shadow: 0 0 0 3px rgba(200, 77, 77, .12);
}

.button-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: caete-button-spin .7s linear infinite;
}

@keyframes caete-button-spin { to { transform: rotate(360deg); } }

.login-feedback {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}

.password-change-feedback {
  margin-top: 16px;
  padding: 11px 13px;
  border: 1px solid #efc6c2;
  border-radius: 8px;
  background: #fff4f2;
  color: #9f2f28;
  font-size: 14px;
}

.password-change-feedback.success {
  border-color: #b9d3bf;
  background: #f0f7f1;
  color: #365b40;
}

.password-strength {
  margin-top: 9px;
}

.password-strength-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.password-strength-track span {
  height: 4px;
  border-radius: 999px;
  background: var(--line, #e2e5e1);
  transition: background-color 180ms ease, transform 180ms ease;
}

.password-strength[data-level="muito-fraca"] .password-strength-track span.active,
.password-strength[data-level="fraca"] .password-strength-track span.active {
  background: #c94b43;
}

.password-strength[data-level="media"] .password-strength-track span.active {
  background: #c78a2b;
}

.password-strength[data-level="forte"] .password-strength-track span.active,
.password-strength[data-level="muito-forte"] .password-strength-track span.active {
  background: #46614e;
}

.password-strength-copy {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 10px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted, #727973);
}

.password-strength-copy strong {
  color: var(--text, #1f2328);
}

.password-medium-confirmation {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #dfc38e;
  border-radius: 8px;
  background: #fff8e9;
  color: #75551e;
  font-size: 13px;
}

.password-medium-confirmation input {
  width: 16px;
  height: 16px;
}

@media (max-width: 900px) {
  .sidebar { position: static; width: auto; }
  .main { margin-left: 0; padding: 16px; }
  .login-mode .main { padding: 0; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand, .login-panel { padding: 28px; }
  .login-brand h1 { font-size: 34px; }
  .login-brand p { font-size: 16px; }
  .login-visual { display: none; }
  .cards, .grid, .form-grid { grid-template-columns: 1fr; }
  .executive-cards,
  .office-dashboard-grid,
  .office-main-grid,
  .office-bottom-grid { grid-template-columns: 1fr; }
  .office-status-chart > div,
  .office-agenda-item,
  .activity-item { grid-template-columns: 1fr; }
  .office-calendar-grid { min-width: 620px; }
  .office-calendar { overflow-x: auto; }
  .calendar-drawer {
    width: min(420px, 96vw);
  }
  .calendar-drawer-header,
  .calendar-drawer-body,
  .calendar-drawer-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
  .drawer-activity-card {
    grid-template-columns: 1fr;
  }
  .drawer-activity-actions {
    opacity: 1;
    max-height: none;
    transform: none;
  }
  .plans-grid,
  .subscription-summary,
  .google-sync-grid { grid-template-columns: 1fr; }
  .project-hero,
  .dashboard-command-bar,
  .dashboard-top-grid,
  .time-weather-card,
  .project-kpis,
  .dashboard-metric-grid,
  .compact-cards,
  .photo-grid,
  .calendar-filters,
  .project-details-grid { grid-template-columns: 1fr; }
  .project-progress-card { justify-self: stretch; }
  .dashboard-top-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-command-bar,
  .dashboard-system-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-system-actions select {
    min-width: 0;
  }
  .project-event-card { grid-template-columns: 1fr; }
  .event-actions { justify-content: flex-start; }
  .hero-meta strong { font-size: 12px; }
  .time-card, .time-weather-card, .weather-card, .mini-calendar-card { min-height: auto; }
  .project-tabs button { flex: 1 1 140px; border-right: 1px solid var(--line); border-radius: 0; }
  .permissions-grid { grid-template-columns: 1fr; }
  .workspace-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .filters-grid { grid-template-columns: 1fr; }
  .topbar, .panel-head, .pagination { align-items: flex-start; flex-direction: column; }
  input, select, textarea { min-width: 0; width: 100%; }
  .actions { width: 100%; flex-direction: column; align-items: stretch; }
  .multi-items-head,
  .multi-items-total,
  .purchase-item-row { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; }
  .report-row { grid-template-columns: 1fr; }
  .report-row span:last-child { text-align: left; }
}

/* CAETÉ final polish: keep this block last so the visual concept wins over legacy rules. */
body {
  background:
    radial-gradient(circle at 22% -8%, rgba(122, 170, 103, .11), transparent 34%),
    linear-gradient(180deg, #fafaf8 0%, var(--bg) 44%);
  font-family: Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sidebar {
  inset: 16px auto 16px 16px;
  width: 254px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--sidebar-bg);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(31, 35, 40, .08);
}

.main {
  margin-left: 286px;
  padding: 30px;
}

.brand strong {
  font-size: 15px;
  letter-spacing: .18em;
}

.brand-mark,
.login-brand .brand-mark {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 0;
  background: transparent;
  color: transparent;
  margin-bottom: 0;
}

.login-brand .brand-mark {
  width: 58px;
  height: 58px;
}

.brand-mark i {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid var(--primary);
}

.login-brand .brand-mark i {
  width: 20px;
  height: 20px;
  border-color: #f5f6f7;
}

.brand-mark i:nth-child(1) { left: 0; bottom: 0; }
.brand-mark i:nth-child(2) { left: 11px; bottom: 11px; }
.brand-mark i:nth-child(3) { left: 22px; bottom: 22px; background: var(--primary); }
.brand-mark i:nth-child(4) { left: 22px; bottom: 0; border-color: var(--accent); }
.login-brand .brand-mark i:nth-child(2) { left: 16px; bottom: 16px; }
.login-brand .brand-mark i:nth-child(3) { left: 32px; bottom: 32px; background: #f5f6f7; }
.login-brand .brand-mark i:nth-child(4) { left: 32px; bottom: 0; border-color: #7aaa67; }

nav button {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 15px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 560;
}

nav button.active,
nav button:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-strong);
  box-shadow: none;
  transform: translateX(2px);
}

.project-nav-group {
  display: grid;
  gap: 5px;
}

.project-nav-group summary {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 15px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 11px;
  align-items: center;
  list-style: none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.project-nav-group summary::-webkit-details-marker {
  display: none;
}

.project-nav-group summary svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-nav-group summary i {
  color: var(--sidebar-muted);
  font-style: normal;
  transition: transform .2s ease;
}

.project-nav-group[open] summary i {
  transform: rotate(180deg);
}

.project-nav-group summary.active,
.project-nav-group summary:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-strong);
  transform: translateX(2px);
}

.project-nav-subitems {
  display: grid;
  gap: 4px;
  padding: 2px 0 7px 31px;
}

.project-nav-subitems button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  grid-template-columns: 0 1fr;
  gap: 0;
  font-size: 12px;
}

.project-nav-subitems button svg {
  display: none;
}

.project-main-link {
  margin-bottom: 8px;
}

.project-nav-section {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.project-nav-section small {
  display: block;
  padding: 0 12px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--sidebar-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.project-nav-section + .project-nav-single {
  margin-top: 12px;
}

.project-nav-single {
  margin-top: 6px;
}

.project-nav-subitems {
  display: grid;
  gap: 7px;
  padding: 0;
}

.project-nav-subitems button {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 15px;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  font-size: 13px;
}

.project-nav-subitems button svg {
  display: block;
  width: 21px;
  height: 21px;
}

.sidebar-context {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.sidebar-context small {
  padding: 0 12px;
  color: var(--sidebar-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

nav .sidebar-back {
  background: rgba(70, 97, 78, .07);
  color: var(--sidebar-strong);
}

.topbar {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

button,
.icon,
.ghost,
.plan-button {
  border-radius: 14px;
}

.cards article,
.panel,
.settings-menu,
.login-form,
.workspace-card,
.dashboard-command-bar,
.time-weather-card,
.mini-calendar-card,
.modal {
  border-radius: var(--caete-radius);
  box-shadow: var(--shadow);
}

.cards article,
.panel,
.workspace-card {
  transition: transform .18s ease, box-shadow .18s ease;
}

.cards article:hover,
.panel:hover,
.workspace-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 70px rgba(31, 35, 40, .08);
}

.login-brand {
  background: linear-gradient(135deg, #1f2328, #2f3f35);
}

.login-visual div {
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(232, 226, 216, .9), rgba(122, 170, 103, .55));
}

@media (max-width: 900px) {
  .sidebar {
    inset: auto;
    width: auto;
    margin: 12px;
  }

  .main {
    margin-left: 0;
    padding: 14px;
  }
}

/* CAETÉ login model */
body.login-mode {
  min-height: 100vh;
  overflow: hidden;
  background: #ffffff;
}

body.login-mode .sidebar,
body.login-mode .topbar,
body.login-mode .page-header {
  display: none;
}

body.login-mode .main {
  margin: 0;
  padding: 0;
}

body.login-mode #app {
  min-height: 100vh;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(480px, 1fr) minmax(520px, 1fr);
  min-height: 100vh;
  background: #ffffff;
  color: #1f2328;
}

.login-brand {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 100vh;
  padding: clamp(56px, 8vw, 132px);
  background:
    radial-gradient(circle at 26% 12%, rgba(122, 170, 103, .18), transparent 28%),
    radial-gradient(circle at 78% 82%, rgba(70, 97, 78, .44), transparent 30%),
    linear-gradient(135deg, rgba(18, 28, 25, .98), rgba(31, 35, 40, .96));
  color: #ffffff;
}

.login-brand::before {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -9%;
  width: 72%;
  height: 54%;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .1), transparent 30%),
    linear-gradient(135deg, rgba(0, 0, 0, .3), rgba(255, 255, 255, .08));
  clip-path: polygon(18% 42%, 72% 14%, 100% 36%, 100% 100%, 0 100%);
  border-left: 1px solid rgba(255, 255, 255, .12);
  opacity: .78;
}

.login-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 18, 16, .34) 100%);
  pointer-events: none;
}

.login-brand-content,
.login-security,
.login-brand-lines {
  position: relative;
  z-index: 1;
}

.login-logo-lockup {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: clamp(44px, 6vw, 76px);
}

.login-logo-lockup .brand-mark {
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
}

.login-logo-lockup .brand-mark i {
  width: 33px;
  height: 33px;
  border-width: 6px;
  border-color: rgba(255, 255, 255, .96);
}

.login-logo-lockup .brand-mark i:nth-child(1) { left: 0; bottom: 0; }
.login-logo-lockup .brand-mark i:nth-child(2) { left: 28px; bottom: 28px; }
.login-logo-lockup .brand-mark i:nth-child(3) {
  left: 56px;
  bottom: 56px;
  background: #7aaa67;
  border-color: #7aaa67;
}
.login-logo-lockup .brand-mark i:nth-child(4) {
  left: 56px;
  bottom: 0;
  border-color: #7aaa67;
}

.login-logo-lockup strong {
  color: #ffffff;
  font-size: clamp(42px, 4.2vw, 66px);
  font-weight: 500;
  letter-spacing: .26em;
  line-height: 1;
}

.login-brand h1 {
  max-width: 620px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(42px, 4.6vw, 72px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0;
}

.login-brand h1::before {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-bottom: 26px;
  background: #7aaa67;
}

.login-brand h1 span {
  display: block;
  color: #7aaa67;
}

.login-brand p {
  max-width: 560px;
  margin: 34px 0 0;
  color: rgba(255, 255, 255, .9);
  font-size: 18px;
  line-height: 1.55;
}

.login-brand-lines span {
  position: absolute;
  display: block;
  background: rgba(122, 170, 103, .62);
}

.login-brand-lines span:nth-child(1) {
  top: -18px;
  left: clamp(120px, 18vw, 280px);
  width: 1px;
  height: 178px;
}

.login-brand-lines span:nth-child(2) {
  top: 25vh;
  left: -26px;
  width: 190px;
  height: 1px;
}

.login-brand-lines span:nth-child(3) {
  top: 20vh;
  left: clamp(170px, 26vw, 360px);
  width: 88px;
  height: 88px;
  border: 1px solid rgba(122, 170, 103, .78);
  background: transparent;
}

.login-security {
  position: absolute;
  left: clamp(44px, 8vw, 132px);
  bottom: clamp(28px, 5vw, 72px);
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, .86);
  font-size: 13px;
}

.login-security span {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(122, 170, 103, .72);
  border-radius: 11px;
  background: rgba(122, 170, 103, .12);
}

.login-security span::before {
  content: "";
  display: block;
  width: 10px;
  height: 14px;
  margin: 8px auto 0;
  border: 2px solid #7aaa67;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.login-security p {
  margin: 0;
  color: inherit;
  font-size: 13px;
  line-height: 1.35;
}

.login-security strong {
  color: #ffffff;
}

.login-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(36px, 6vw, 96px);
  background:
    radial-gradient(circle at 22% 18%, rgba(238, 226, 216, .4), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #fbfbfa 100%);
}

.login-language {
  position: absolute;
  top: clamp(28px, 5vw, 64px);
  right: clamp(28px, 6vw, 92px);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 198px;
  height: 56px;
  padding: 0 18px;
  border: 1px solid #dfe2dd;
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
  color: #1f2328;
  box-shadow: 0 18px 50px rgba(31, 35, 40, .05);
}

.login-language span {
  width: 20px;
  height: 20px;
  border: 1.8px solid #1f2328;
  border-radius: 999px;
}

.login-language span::before,
.login-language span::after {
  content: "";
  display: block;
  margin: 4px auto 0;
  width: 12px;
  height: 1px;
  background: #1f2328;
  box-shadow: 0 5px 0 #1f2328;
}

.login-language strong {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.login-language small {
  color: #1f2328;
  font-size: 18px;
}

.login-card {
  width: min(520px, 100%);
}

.login-card h2 {
  margin: 0;
  color: #1f2328;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 650;
  letter-spacing: -.02em;
}

.login-card > .muted {
  margin: 10px 0 34px;
  color: #6e7785;
  font-size: 17px;
}

.login-tabs {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 24px;
  padding: 5px;
  border: 1px solid #e8e2d8;
  border-radius: 999px;
  background: #f7f6f3;
}

.login-tabs button {
  min-height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6e7785;
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
}

.login-tabs button.active {
  background: #ffffff;
  color: #46614e;
  box-shadow: 0 8px 22px rgba(31, 35, 40, .08);
}

.login-form {
  display: grid;
  gap: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-field {
  display: grid;
  gap: 10px;
}

.login-field label {
  color: #1f2328;
  font-size: 13px;
  font-weight: 520;
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 18px;
  border: 1px solid #dfe2dd;
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.input-shell:focus-within {
  border-color: rgba(70, 97, 78, .55);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(122, 170, 103, .14);
}

.input-shell input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1f2328;
  font-size: 15px;
}

.input-shell input::placeholder {
  color: #8c95a3;
}

.input-shell > span {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: #4a5565;
}

.input-mail > span::before {
  content: "";
  position: absolute;
  inset: 4px 2px;
  border: 1.8px solid currentColor;
  border-radius: 4px;
}

.input-mail > span::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 14px;
  height: 10px;
  border-left: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(-45deg);
}

.input-lock > span::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  width: 14px;
  height: 11px;
  border: 1.8px solid currentColor;
  border-radius: 4px;
}

.input-lock > span::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 8px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.input-user > span::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 8px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-radius: 999px;
}

.input-user > span::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  width: 14px;
  height: 7px;
  border: 1.8px solid currentColor;
  border-radius: 12px 12px 0 0;
}

.input-shell em {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  opacity: .72;
}

.input-shell em::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 20px;
  height: 11px;
  border: 1.7px solid #4a5565;
  border-radius: 50%;
}

.input-shell em::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 10px;
  width: 6px;
  height: 6px;
  border: 1.7px solid #4a5565;
  border-radius: 50%;
  background: #ffffff;
}

.login-forgot {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
}

.login-forgot .ghost,
.login-links .ghost {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #46614e;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
}

.login-submit {
  width: 100%;
  height: 64px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #46614e, #33513b);
  color: #ffffff;
  font-size: 15px;
  font-weight: 650;
  box-shadow: 0 20px 50px rgba(70, 97, 78, .22);
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 62px rgba(70, 97, 78, .28);
}

.login-divider {
  height: 1px;
  margin: 18px 0 2px;
  background: #e4e5e2;
}

.login-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #6e7785;
  font-size: 14px;
}

.login-form small.muted {
  display: block;
  margin-top: 2px;
  text-align: center;
  color: #8c95a3;
}

@media (max-width: 980px) {
  body.login-mode {
    overflow: auto;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 44vh;
    padding: 46px 28px 96px;
  }

  .login-logo-lockup {
    margin-bottom: 34px;
  }

  .login-security {
    left: 28px;
    bottom: 28px;
  }

  .login-panel {
    min-height: 56vh;
    padding: 88px 24px 48px;
  }

  .login-language {
    top: 22px;
    right: 24px;
  }
}

@media (max-width: 560px) {
  .login-brand {
    min-height: 38vh;
  }

  .login-logo-lockup .brand-mark {
    width: 58px;
    height: 58px;
  }

  .login-logo-lockup .brand-mark i {
    width: 20px;
    height: 20px;
    border-width: 4px;
  }

  .login-logo-lockup .brand-mark i:nth-child(2) { left: 18px; bottom: 18px; }
  .login-logo-lockup .brand-mark i:nth-child(3) { left: 36px; bottom: 36px; }
  .login-logo-lockup .brand-mark i:nth-child(4) { left: 36px; bottom: 0; }

  .login-logo-lockup strong {
    font-size: 32px;
  }

  .login-brand h1 {
    font-size: 34px;
  }

  .login-language {
    min-width: 164px;
    height: 48px;
  }

  .input-shell,
  .login-submit {
    height: 58px;
  }
}

/* CAETÉ clean topbar */
body:not(.login-mode) .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 78px;
  margin-bottom: 24px;
  padding: 16px 18px 16px 22px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 28px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 22px 70px rgba(31, 35, 40, .07);
  backdrop-filter: blur(22px);
}

body:not(.login-mode) .topbar-heading {
  min-width: 220px;
}

body:not(.login-mode) .topbar h1 {
  margin: 0;
  color: #1f2328;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.12;
}

body:not(.login-mode) .topbar p {
  max-width: 680px;
  margin-top: 6px;
  color: #7b837b;
  font-size: 13px;
  line-height: 1.35;
}

body:not(.login-mode) .topbar .user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

body:not(.login-mode) .topbar-search {
  width: clamp(210px, 22vw, 320px);
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(31, 35, 40, .1);
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  color: #7b837b;
  box-shadow: 0 12px 28px rgba(31, 35, 40, .04);
}

body:not(.login-mode) .topbar-search input {
  color: #1f2328;
  font-size: 13px;
}

body:not(.login-mode) .topbar-search input::placeholder {
  color: #8a928a;
}

body:not(.login-mode) .icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  border: 1px solid rgba(31, 35, 40, .1);
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  color: #1f2328;
  box-shadow: 0 12px 28px rgba(31, 35, 40, .04);
}

body:not(.login-mode) .icon-button::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 9px;
  width: 7px;
  height: 7px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #46614e;
}

body:not(.login-mode) .topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

body:not(.login-mode) .theme-toggle {
  min-height: 42px;
  padding: 0 13px;
  border-radius: 14px;
  background: #edf5ef;
  color: #46614e;
  font-size: 12px;
  font-weight: 700;
}

body:not(.login-mode) #project-switcher {
  min-width: 190px;
  height: 42px;
  min-height: 42px;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, .86);
  font-size: 13px;
}

body:not(.login-mode) [data-action="back-office"] {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: #edf5ef;
  color: #46614e;
  font-size: 12px;
  font-weight: 700;
}

body:not(.login-mode) .topbar-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-left: 4px;
  color: #1f2328;
}

body:not(.login-mode) .topbar-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #46614e;
  color: #ffffff;
  font-size: 11px;
  font-weight: 750;
}

body:not(.login-mode) .topbar-user-name {
  max-width: 135px;
  overflow: hidden;
  color: #1f2328;
  font-size: 13px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.login-mode) .topbar-logout {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  background: #46614e;
  color: #ffffff;
  font-size: 12px;
  font-weight: 750;
}

body[data-theme="dark"]:not(.login-mode) .topbar {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(31, 35, 40, .78);
}

body[data-theme="dark"]:not(.login-mode) .topbar h1,
body[data-theme="dark"]:not(.login-mode) .topbar-user-name,
body[data-theme="dark"]:not(.login-mode) .icon-button {
  color: #f5f6f7;
}

body[data-theme="dark"]:not(.login-mode) .topbar p {
  color: rgba(245, 246, 247, .62);
}

body[data-theme="dark"]:not(.login-mode) .topbar-search,
body[data-theme="dark"]:not(.login-mode) .icon-button,
body[data-theme="dark"]:not(.login-mode) #project-switcher {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .06);
}

@media (max-width: 1180px) {
  body:not(.login-mode) .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  body:not(.login-mode) .topbar .user {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  body:not(.login-mode) .topbar-search {
    width: min(100%, 360px);
  }
}

@media (max-width: 640px) {
  body:not(.login-mode) .topbar {
    border-radius: 22px;
    padding: 16px;
  }

  body:not(.login-mode) .topbar .user {
    gap: 7px;
  }

  body:not(.login-mode) .topbar-search,
  body:not(.login-mode) #project-switcher {
    width: 100%;
  }
}

/* CAETÉ executive metric cards */
.executive-cards {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.executive-cards .metric-card {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 150px;
  padding: 18px 18px 14px;
  overflow: hidden;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 18px 50px rgba(31, 35, 40, .055);
}

.executive-cards .metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 70px rgba(31, 35, 40, .075);
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 15px;
  border-radius: 11px;
  background: #eef4ee;
  color: #46614e;
  font-size: 14px;
}

.metric-card small {
  color: #6f796f;
  font-size: 11px;
  font-weight: 520;
  letter-spacing: 0;
}

.metric-card strong {
  margin-top: 8px;
  color: #1f2328;
  font-size: 20px;
  font-weight: 660;
  letter-spacing: -.025em;
  line-height: 1.1;
}

.metric-card span {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  color: #6f796f;
  font-size: 10.5px;
  line-height: 1.2;
}

.metric-card span b {
  color: #46614e;
  font-weight: 760;
}

.metric-card.metric-down span b {
  color: #d94b4b;
}

.metric-spark {
  width: 100%;
  height: 30px;
  margin-top: 12px;
}

.metric-spark path {
  fill: none;
  stroke: #46614e;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-down .metric-spark path {
  stroke: #d94b4b;
}

body[data-theme="dark"] .executive-cards .metric-card {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .055);
}

body[data-theme="dark"] .metric-card strong {
  color: #f5f6f7;
}

body[data-theme="dark"] .metric-card small,
body[data-theme="dark"] .metric-card span {
  color: rgba(245, 246, 247, .62);
}

@media (max-width: 1400px) {
  .executive-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .executive-cards {
    grid-template-columns: 1fr;
  }
}

/* CAETÉ sidebar profile dropdown */
.sidebar-user > .profile-row,
.sidebar-user > .account-menu {
  display: none !important;
}

.profile-dropdown {
  position: relative;
}

.profile-dropdown summary {
  list-style: none;
}

.profile-dropdown summary::-webkit-details-marker {
  display: none;
}

.profile-dropdown .profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.profile-dropdown .avatar {
  display: grid !important;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(70, 97, 78, .18);
  border-radius: 999px;
  background: #46614e !important;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(70, 97, 78, .18);
}

.profile-dropdown .profile-row:hover {
  border-color: rgba(70, 97, 78, .18);
  background: #ffffff;
  transform: translateY(-1px);
}

.profile-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.profile-copy strong {
  overflow: hidden;
  color: #1f2328;
  font-size: 13px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy small {
  overflow: hidden;
  color: #6e7785;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chevron {
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  color: rgba(31, 35, 40, .58);
  transform: rotate(45deg);
  transition: transform .18s ease;
}

.profile-dropdown[open] .profile-chevron {
  transform: rotate(225deg);
}

.profile-dropdown .account-menu {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(31, 35, 40, .1);
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 70px rgba(31, 35, 40, .18);
  animation: dropdownFade .16s ease both;
}

.account-menu-head {
  display: grid;
  gap: 3px;
  padding: 8px 10px 7px;
}

.account-menu-head strong {
  color: #1f2328;
  font-size: 13px;
  font-weight: 760;
}

.account-menu-head small {
  color: #7b837b;
  font-size: 11px;
}

.profile-dropdown .account-menu hr {
  width: 100%;
  height: 1px;
  margin: 6px 0;
  border: 0;
  background: rgba(31, 35, 40, .09);
  opacity: 1;
}

.profile-dropdown .account-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  background: transparent;
  color: #4f5b50;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}

.profile-dropdown .account-menu button i {
  display: inline-grid;
  place-items: center;
  width: 18px;
  color: #46614e;
  font-size: 14px;
}

.profile-dropdown .account-menu button:hover {
  background: #f2f5f1;
  color: #1f2328;
}

.profile-dropdown .account-menu button.danger {
  color: #a33c3c;
}

.profile-dropdown .account-menu button.danger i {
  color: #a33c3c;
}

body[data-theme="dark"] .profile-dropdown .account-menu {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(31, 35, 40, .96);
}

body[data-theme="dark"] .account-menu-head strong,
body[data-theme="dark"] .profile-dropdown .account-menu button:hover {
  color: #f5f6f7;
}

body[data-theme="dark"] .account-menu-head small,
body[data-theme="dark"] .profile-dropdown .account-menu button {
  color: rgba(245, 246, 247, .7);
}

body[data-theme="dark"] .profile-dropdown .account-menu button:hover {
  background: rgba(255, 255, 255, .08);
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CAETÉ projects page model */
.workspace-panel {
  padding: 24px;
  border-radius: 22px;
}

.workspace-panel .panel-head {
  align-items: flex-start;
  margin-bottom: 22px;
}

.workspace-actions {
  align-items: center;
  gap: 10px;
}

.workspace-actions input[type="search"] {
  width: 230px;
  min-height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
  font-size: 13px;
}

.workspace-view-toggle {
  display: inline-flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--line) 20%, var(--panel));
}

.workspace-view-toggle button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 9px;
  color: var(--muted);
}

.workspace-view-toggle button.active {
  background: var(--panel);
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(31, 35, 40, .08);
}

.workspace-groups {
  gap: 28px;
}

.workspace-section {
  gap: 12px;
}

.workspace-section h3 {
  color: #1f2328;
  font-size: 14px;
  font-weight: 720;
}

.workspace-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.workspace-card {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: 0 16px 38px rgba(31, 35, 40, .1);
}

.workspace-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 70px rgba(31, 35, 40, .16);
}

.workspace-card .project-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 238px;
  height: auto;
  margin: 0;
  padding: 18px;
  overflow: hidden;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(8, 14, 12, .02), rgba(8, 14, 12, .82)),
    radial-gradient(circle at 30% 18%, rgba(122, 170, 103, .34), transparent 28%),
    linear-gradient(135deg, #46614e, #1f2328);
}

.workspace-card .project-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(150deg, transparent 0 38%, rgba(255, 255, 255, .1) 39% 40%, transparent 41%),
    linear-gradient(90deg, rgba(255, 255, 255, .18) 0 1px, transparent 1px 72px),
    linear-gradient(0deg, rgba(255, 255, 255, .12) 0 1px, transparent 1px 46px);
  opacity: .28;
}

.workspace-card .project-cover::after {
  content: "";
  position: absolute;
  right: -4%;
  bottom: 18%;
  width: 74%;
  height: 48%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .04)),
    linear-gradient(90deg, rgba(232, 226, 216, .52) 0 8%, transparent 8% 14%, rgba(232, 226, 216, .45) 14% 24%, transparent 24% 32%, rgba(232, 226, 216, .5) 32% 45%, transparent 45%);
  clip-path: polygon(0 38%, 48% 0, 100% 24%, 100% 100%, 0 100%);
  opacity: .56;
}

.workspace-card .project-cover.has-image::before,
.workspace-card .project-cover.has-image::after {
  opacity: .18;
}

.project-card-top,
.project-card-content {
  position: relative;
  z-index: 1;
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(237, 245, 239, .9);
  color: #46614e;
  font-size: 11px;
  font-weight: 800;
}

.project-card-icons {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, .9);
  font-size: 18px;
}

.project-favorite-btn {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, .78);
  background: rgba(255, 255, 255, .08);
  box-shadow: none;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease;
}

.project-favorite-btn:hover {
  transform: scale(1.12);
  color: #f4b400;
  background: rgba(255, 255, 255, .16);
}

.project-favorite-btn.is-favorite {
  color: #f4b400;
  background: rgba(244, 180, 0, .16);
}

.project-favorite-btn:active {
  transform: scale(.94);
}

.workspace-list-icons .project-favorite-btn {
  color: #9aa29a;
  background: color-mix(in srgb, var(--line) 45%, var(--panel));
}

.workspace-list-icons .project-favorite-btn.is-favorite,
.workspace-list-icons .project-favorite-btn:hover {
  color: #f4b400;
  background: rgba(244, 180, 0, .14);
}

.workspace-empty-state {
  min-height: 128px;
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 82%, var(--sage, #7aaa67));
}

.workspace-empty-state strong {
  color: var(--ink);
}

.workspace-empty-state span {
  font-size: 13px;
}

.project-card-content {
  display: grid;
  gap: 7px;
  color: #ffffff;
}

.project-card-content strong {
  color: #ffffff;
  font-size: 20px;
  font-weight: 760;
  letter-spacing: -.025em;
}

.project-card-content p {
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  line-height: 1.35;
}

.project-card-content p b {
  color: #ffffff;
  font-weight: 760;
}

.project-progress-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

.project-progress-row .progress {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .3);
}

.project-progress-row .progress b {
  background: #eaf2e9;
}

.project-progress-row small {
  margin: 0;
  color: rgba(255, 255, 255, .86);
  font-size: 11px;
}

.workspace-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 18px 48px rgba(31, 35, 40, .06);
}

.workspace-summary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 8px;
}

.workspace-summary-card > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #edf5ef;
  color: #46614e;
  font-size: 18px;
}

.workspace-summary-card div {
  display: grid;
  gap: 2px;
}

.workspace-summary-card small {
  color: #6f796f;
  font-size: 11px;
}

.workspace-summary-card strong {
  color: #1f2328;
  font-size: 18px;
  line-height: 1;
}

.workspace-summary-card em {
  color: #6f796f;
  font-size: 10px;
  font-style: normal;
}

.workspace-summary-card.up em {
  color: #46614e;
}

body[data-theme="dark"] .workspace-section h3,
body[data-theme="dark"] .workspace-summary-card strong {
  color: #f5f6f7;
}

body[data-theme="dark"] .workspace-summary {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .055);
}

@media (max-width: 1280px) {
  .workspace-grid,
  .workspace-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .workspace-panel {
    padding: 18px;
  }

  .workspace-panel .panel-head,
  .workspace-actions {
    align-items: stretch;
  }

  .workspace-actions,
  .workspace-actions input[type="search"] {
    width: 100%;
  }

  .workspace-grid,
  .workspace-summary {
    grid-template-columns: 1fr;
  }
}

/* CAETÉ corrected brand symbol */
.brand-mark,
.login-brand .brand-mark,
.login-logo-lockup .brand-mark {
  --logo-dark: #1f2328;
  --logo-green: #46614e;
  --logo-dot: 8px;
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  margin: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent !important;
  color: transparent;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  display: block;
  box-sizing: border-box;
}

.brand-mark::before {
  inset: 0;
  background: var(--logo-dark);
  clip-path: polygon(
    16% 35%,
    34% 17%,
    74% 17%,
    74% 30%,
    40% 30%,
    29% 41%,
    29% 78%,
    16% 91%
  );
}

.brand-mark::after {
  inset: 0;
  background: var(--logo-green);
  clip-path: polygon(
    30% 82%,
    61% 82%,
    74% 69%,
    74% 52%,
    87% 52%,
    87% 76%,
    68% 94%,
    17% 94%
  );
}

.brand-mark i {
  display: none !important;
}

.brand-mark i:nth-child(3) {
  position: absolute;
  top: 1%;
  right: 8%;
  display: block !important;
  width: var(--logo-dot);
  height: var(--logo-dot);
  border: 0 !important;
  border-radius: 0;
  background: var(--logo-green) !important;
}

.brand .brand-mark {
  width: 34px;
  height: 34px;
  --logo-dot: 7px;
}

.login-logo-lockup .brand-mark,
.login-brand .brand-mark {
  width: 92px;
  height: 92px;
  --logo-dot: 16px;
}

.login-logo-lockup .brand-mark,
.login-brand .brand-mark {
  --logo-dark: #ffffff;
  --logo-green: #7aaa67;
}

@media (max-width: 560px) {
  .login-logo-lockup .brand-mark,
  .login-brand .brand-mark {
    width: 58px;
    height: 58px;
    --logo-dot: 11px;
  }
}

/* CAETÉ square project cards */
.workspace-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.workspace-card {
  aspect-ratio: 1 / 1;
}

.workspace-card .project-cover {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.workspace-card .project-cover.has-image {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.workspace-card .project-cover.has-image::before {
  opacity: .12;
}

.workspace-card .project-cover.has-image::after {
  opacity: 0;
}

.project-card-content {
  max-width: 100%;
}

.project-card-content strong {
  font-size: clamp(17px, 1.25vw, 20px);
}

.project-card-content p {
  overflow-wrap: anywhere;
}

.project-progress-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

@media (min-width: 1500px) {
  .workspace-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* CAETÉ compact project card proportions */
.workspace-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 300px));
  justify-content: start;
  gap: 16px;
}

.workspace-card {
  width: 100%;
  max-width: 300px;
  border-radius: 13px;
}

.workspace-card .project-cover {
  padding: 14px;
  border-radius: 13px;
}

.project-status-pill {
  min-height: 23px;
  padding: 0 9px;
  font-size: 10px;
}

.project-card-icons {
  gap: 9px;
  font-size: 15px;
}

.project-card-content {
  gap: 5px;
}

.project-card-content strong {
  font-size: 16px;
}

.project-card-content p {
  font-size: 10px;
  line-height: 1.3;
}

.project-progress-row {
  gap: 8px;
  margin-top: 5px;
}

.project-progress-row .progress {
  height: 5px;
}

.project-progress-row small {
  font-size: 9.5px;
}

@media (min-width: 1500px) {
  .workspace-grid {
    grid-template-columns: repeat(4, minmax(230px, 300px));
  }
}

@media (max-width: 1180px) {
  .workspace-grid {
    grid-template-columns: repeat(2, minmax(230px, 300px));
  }
}

@media (max-width: 700px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-card {
    max-width: none;
  }
}

/* CAETÉ fluid project grid: fill rows without oversized cards */
.workspace-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
  justify-content: space-between;
  align-items: start;
  gap: 22px;
}

.workspace-card {
  width: 100%;
  max-width: 380px;
  min-width: 0;
}

.workspace-card .project-cover {
  padding: 17px;
}

.project-card-content {
  gap: 6px;
}

.project-card-content strong {
  font-size: clamp(17px, 1.05vw, 19px);
  line-height: 1.12;
}

.project-card-content p {
  font-size: clamp(10.5px, .72vw, 12px);
  line-height: 1.35;
}

.project-status-pill {
  min-height: 25px;
  padding: 0 10px;
  font-size: 10.5px;
}

.project-card-icons {
  font-size: 16px;
}

.project-progress-row small {
  font-size: 10.5px;
  white-space: nowrap;
}

@media (min-width: 1700px) {
  .workspace-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 400px));
  }

  .workspace-card {
    max-width: 400px;
  }
}

@media (max-width: 1180px) {
  .workspace-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    justify-content: stretch;
  }

  .workspace-card {
    max-width: none;
  }
}

@media (max-width: 700px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* CAETÉ fixed 5-column project grid on wide screens */
.workspace-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-content: stretch;
  gap: 18px;
}

.workspace-card {
  max-width: none;
}

@media (max-width: 1680px) {
  .workspace-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1360px) {
  .workspace-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* Controle de cotações integrado à planilha orçamentária */
.quote-control-kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(145px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.quote-control-kpis .budget-sheet-kpi {
  min-height: 104px;
  padding: 16px;
}

.quote-control-panel { overflow: hidden; }
.quote-control-accordions {
  display: grid;
  gap: 9px;
  padding: 0 16px 16px;
}

.quote-category-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.quote-category-group.is-open {
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
  box-shadow: 0 10px 24px rgba(31, 35, 40, 0.05);
}

.quote-category-toggle {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(190px, 1.05fr) auto minmax(190px, .9fr) minmax(190px, 1fr) minmax(185px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
  color: var(--ink);
  text-align: left;
}

.quote-category-toggle:hover {
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}

.quote-category-leading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quote-category-leading > i { color: var(--muted); font-size: 11px; }
.quote-category-leading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-category-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 11%, var(--surface));
  color: var(--primary);
}

.quote-category-stat {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.quote-category-stat b { color: var(--ink); }
.quote-category-pill {
  min-width: 0;
  width: max-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-category-pill.saving { background: #edf6ee; color: #3d7147; }
.quote-category-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.quote-control-table-wrap {
  max-height: min(58vh, 620px);
  overflow: auto;
  border-top: 1px solid var(--line);
}

.quote-control-table {
  min-width: 1760px;
  table-layout: fixed;
  margin: 0;
}

.quote-control-table th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.quote-control-table th:nth-child(1) { width: 82px; }
.quote-control-table th:nth-child(2) { width: 215px; }
.quote-control-table th:nth-child(3) { width: 220px; }
.quote-control-table th:nth-child(4) { width: 110px; }
.quote-control-table th:nth-child(5) { width: 62px; }
.quote-control-table th:nth-child(6) { width: 62px; }
.quote-control-table th:nth-child(7),
.quote-control-table th:nth-child(8),
.quote-control-table th:nth-child(9) { width: 205px; }
.quote-control-table th:nth-child(10),
.quote-control-table th:nth-child(11) { width: 130px; }
.quote-control-table th:nth-child(12) { width: 120px; }
.quote-control-table th:nth-child(13) { width: 92px; }
.quote-control-table td { height: 62px; }
.quote-control-table tfoot td {
  height: 46px;
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
  font-weight: 700;
}
.quote-control-table tfoot .saving-value { color: #bb3f3f; }

.quote-category-row td {
  padding: 0;
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}

.quote-category-row button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.quote-category-row button > span:not(.budget-category-spacer) {
  color: var(--muted);
  font-size: 12px;
}

.quote-category-row button > span b { color: var(--ink); margin-left: 3px; }
.quote-item-row > td { vertical-align: middle; }
.quote-description strong, .quote-description small { display: block; }
.quote-description small { color: var(--muted); margin-top: 4px; }
.quote-model { color: var(--muted); font-size: 12px; line-height: 1.35; }

.quote-supplier-cell {
  padding: 8px !important;
  background: transparent;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.quote-supplier-cell.is-best {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.quote-supplier-cell.is-selected {
  box-shadow: inset 3px 0 var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.quote-supplier-summary {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.quote-supplier-summary strong,
.quote-supplier-summary span,
.quote-supplier-summary b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-supplier-summary span { color: var(--muted); font-size: 11px; }
.quote-supplier-summary b { margin-top: 3px; color: var(--primary); }

.quote-winner-button {
  width: 100%;
  min-height: 27px;
  margin-top: 7px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--primary);
  font-size: 11px;
}

.quote-winner-button.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.quote-control-summary {
  display: grid;
  grid-template-columns: .8fr repeat(3, 1fr) 1.25fr;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--soft) 54%, var(--surface));
}

.quote-control-summary > div {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 16px 22px;
  border-right: 1px solid var(--line);
}

.quote-control-summary > div:last-child { border-right: 0; }
.quote-control-summary small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.quote-control-summary strong { color: var(--ink); font-size: 18px; }
.quote-summary-saving {
  flex-direction: row !important;
  align-items: center;
  color: var(--primary);
}
.quote-summary-saving > i { font-size: 28px; }
.quote-summary-saving > span { display: grid; gap: 3px; }
.quote-summary-saving strong { color: #347441; }
.quote-summary-saving em { color: #4d7c55; font-size: 11px; font-style: normal; }

.quote-best small { display: block; margin-top: 4px; color: var(--muted); }
.quote-modal-item { grid-column: 1 / -1; display: grid; gap: 3px; padding: 12px 14px; border-radius: 10px; background: var(--soft); }
.quote-modal-item small { color: var(--muted); }

.quote-modal-supplier {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.quote-modal-supplier legend { padding: 0 8px; color: var(--primary); font-weight: 700; }
.budget-source-badge { display: inline-flex; padding: 5px 8px; border-radius: 7px; background: var(--soft); color: var(--primary); font-size: 11px; font-weight: 700; }

@media (max-width: 1500px) {
  .quote-control-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quote-category-toggle { grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr) minmax(180px, 1fr) auto; }
  .quote-category-stat:nth-of-type(2) { display: none; }
}

@media (max-width: 980px) {
  .quote-control-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-category-toggle { grid-template-columns: minmax(180px, 1fr) auto auto; }
  .quote-category-pill, .quote-category-stat:nth-of-type(2) { display: none; }
  .quote-control-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-control-summary > div { border-bottom: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .quote-control-kpis { grid-template-columns: 1fr; }
  .quote-modal-supplier { grid-template-columns: 1fr; }
  .quote-category-toggle { grid-template-columns: 1fr auto; gap: 8px; }
  .quote-category-stat, .quote-category-pill { display: none; }
  .quote-control-summary { grid-template-columns: 1fr; }
}

/* CAETÉ projects model v2 */
body:not(.login-mode) .topbar {
  box-shadow: none;
  background: transparent;
  border-color: transparent;
  padding: 10px 0 18px;
  min-height: 58px;
  position: relative;
  z-index: 4000;
}

body:not(.login-mode) .topbar h1 {
  font-size: 24px;
}

body:not(.login-mode) .topbar p {
  font-size: 12px;
}

body:not(.login-mode) .topbar .user {
  gap: 12px;
}

body:not(.login-mode) .topbar-search {
  width: 250px;
  min-height: 40px;
  border-radius: 11px;
  box-shadow: none;
}

.topbar-profile-dropdown {
  position: relative;
  z-index: 3000;
}

.topbar-profile-dropdown[open] {
  z-index: 5000;
}

.topbar-profile-dropdown summary {
  list-style: none;
}

.topbar-profile-dropdown summary::-webkit-details-marker {
  display: none;
}

body:not(.login-mode) .topbar-profile {
  min-height: 40px;
  padding: 0 12px 0 4px;
  border-radius: 14px;
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease;
}

body:not(.login-mode) .topbar-profile:hover,
.topbar-profile-dropdown[open] .topbar-profile {
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 14px 34px rgba(31, 35, 40, .08);
}

.topbar-profile-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: #6e7785;
  transform: rotate(45deg);
}

.topbar-profile-dropdown[open] .topbar-profile-chevron {
  transform: rotate(225deg);
}

.topbar-account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 5001;
  display: grid;
  gap: 4px;
  width: 250px;
  padding: 12px;
  border: 1px solid rgba(31, 35, 40, .1);
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 24px 72px rgba(31, 35, 40, .16);
  animation: dropdownFade .16s ease both;
}

.topbar-account-menu .account-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 8px;
}

.topbar-account-menu .account-menu-head div {
  display: grid;
  gap: 2px;
}

.topbar-account-menu hr {
  width: 100%;
  height: 1px;
  margin: 6px 0;
  border: 0;
  background: rgba(31, 35, 40, .08);
  opacity: 1;
}

.topbar-account-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 11px;
  background: transparent;
  color: #3f473f;
  font-size: 12px;
  font-weight: 560;
  text-align: left;
}

.topbar-account-menu button i {
  width: 18px;
  color: #46614e;
}

.topbar-account-menu button:hover {
  background: #f2f5f1;
}

.topbar-account-menu button.danger,
.topbar-account-menu button.danger i {
  color: #a33c3c;
}

.workspace-panel {
  padding: 22px;
  border-radius: 18px;
}

.workspace-panel .panel-head {
  margin-bottom: 20px;
}

.workspace-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.workspace-card {
  aspect-ratio: auto;
  max-width: none;
  border-radius: 13px;
}

.workspace-card .project-cover {
  aspect-ratio: 16 / 9;
  min-height: 0;
  height: auto;
  padding: 16px;
  border-radius: 13px;
}

.project-card-content strong {
  font-size: 18px;
}

.project-card-content p {
  font-size: 11px;
}

.project-progress-row .progress {
  height: 5px;
}

.workspace-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 24px;
}

@media (max-width: 1180px) {
  .workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .workspace-grid,
  .workspace-summary {
    grid-template-columns: 1fr;
  }

.topbar-account-menu {
    right: auto;
    left: 0;
  }
}

/* Workspace list view */
.workspace-list {
  display: grid;
  gap: 10px;
}

.workspace-list-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(160px, 220px) auto;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 34px rgba(31, 35, 40, .06);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.workspace-list-row:hover {
  transform: translateY(-2px);
  border-color: rgba(70, 97, 78, .18);
  box-shadow: 0 18px 46px rgba(31, 35, 40, .1);
}

.workspace-list-cover {
  width: 88px;
  height: 66px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(8, 14, 12, .02), rgba(8, 14, 12, .82)),
    radial-gradient(circle at 30% 18%, rgba(122, 170, 103, .34), transparent 28%),
    linear-gradient(135deg, #46614e, #1f2328);
  background-size: cover;
  background-position: center;
}

.workspace-list-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.workspace-list-main > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.workspace-list-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-list-main p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-list-main b {
  color: var(--text);
  font-weight: 650;
}

.workspace-list-main span {
  color: color-mix(in srgb, var(--muted) 65%, transparent);
}

.workspace-list-progress {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.workspace-list-progress small {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.workspace-list-progress .progress {
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
}

.workspace-list-progress .progress b {
  background: var(--primary);
}

.workspace-list-icons {
  display: inline-flex;
  gap: 10px;
  color: var(--muted);
  font-size: 16px;
}

body[data-theme="dark"] .workspace-list-row {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .055);
}

@media (max-width: 900px) {
  .workspace-list-row {
    grid-template-columns: 72px minmax(0, 1fr) auto;
  }

  .workspace-list-cover {
    width: 72px;
    height: 58px;
  }

  .workspace-list-progress {
    grid-column: 2 / -1;
  }

  .workspace-list-progress small {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .workspace-list-row {
    grid-template-columns: 1fr auto;
  }

  .workspace-list-cover {
    display: none;
  }
}

/* CAETE project dashboard hub */
body.project-dashboard-mode .topbar {
  display: flex;
}

.project-dashboard {
  display: grid;
  gap: 14px;
}

.project-hero-card,
.project-dashboard-card,
.project-metric-card,
.project-details-panel {
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 48px rgba(31, 35, 40, .06);
}

.project-hero-card {
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: center;
  padding: 18px;
}

.project-hero-cover {
  width: 146px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(8, 14, 12, .03), rgba(8, 14, 12, .74)),
    radial-gradient(circle at 28% 18%, rgba(122, 170, 103, .34), transparent 30%),
    linear-gradient(135deg, #46614e, #1f2328);
  background-size: cover;
  background-position: center;
}

.project-hero-main {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.project-hero-title {
  display: grid;
  gap: 10px;
}

.project-hero-title h2 {
  color: var(--text);
  font-size: 25px;
  font-weight: 720;
  letter-spacing: -.02em;
}

.project-hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.project-hero-card .hero-tags span {
  min-height: 25px;
  border-radius: 999px;
  background: #edf5ef;
  color: #46614e;
  padding: 5px 11px;
  font-size: 11px;
}

.project-hero-card .hero-tags span + span {
  background: #f2eee7;
  color: #6f5f4d;
}

.project-hero-card .hero-meta {
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid rgba(31, 35, 40, .08);
}

.project-hero-card .hero-meta:first-child {
  border-left: 0;
  padding-left: 0;
}

.project-hero-card .hero-meta small,
.project-progress-card small {
  display: block;
  margin: 0 0 6px;
  color: #7a8278;
  font-size: 11px;
}

.project-hero-card .hero-meta strong {
  display: block;
  overflow: hidden;
  color: #1f2328;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.project-progress-card {
  display: grid;
  gap: 9px;
  align-self: stretch;
  min-width: 0;
  padding: 18px 20px;
  border-left: 1px solid rgba(31, 35, 40, .08);
  border-radius: 0;
  background: transparent;
}

.project-progress-card strong {
  color: #1f2328;
  font-size: 30px;
  line-height: 1;
}

.project-progress-card span {
  color: #7a8278;
  font-size: 12px;
}

.project-progress-card .progress {
  height: 8px;
  border-radius: 999px;
  background: #e6e9e3;
}

.project-progress-card .progress b {
  background: #46614e;
}

.dashboard-command-bar {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  overflow-x: auto;
}

.dashboard-actions button {
  flex: 0 0 auto;
  min-height: 38px;
  border-radius: 11px;
  font-size: 12px;
}

.dashboard-actions button.ghost {
  border: 1px solid rgba(31, 35, 40, .1);
  background: rgba(255, 255, 255, .86);
  color: #2f3a31;
}

.dashboard-actions .icon-only {
  width: 42px;
  padding-inline: 0;
}

.project-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.project-metric-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 16px;
}

.project-metric-card > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #edf5ef;
  color: #46614e;
  font-size: 18px;
}

.project-metric-card:nth-child(2) > span,
.project-metric-card:nth-child(4) > span {
  background: #fff0ed;
  color: #b94b43;
}

.project-metric-card:nth-child(3) > span {
  background: #fff5df;
  color: #b87917;
}

.project-metric-card small,
.project-metric-card em {
  display: block;
  color: #7a8278;
  font-size: 11px;
  font-style: normal;
}

.project-metric-card strong {
  display: block;
  margin: 4px 0;
  overflow: hidden;
  color: #1f2328;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(460px, 1.55fr) minmax(300px, .9fr);
  gap: 14px;
  align-items: stretch;
}

.project-dashboard-card {
  padding: 16px;
}

.project-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.project-card-head h3 {
  color: #1f2328;
  font-size: 15px;
  font-weight: 720;
}

.project-weather-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.project-weather-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.project-weather-main strong {
  display: block;
  color: #1f2328;
  font-size: 30px;
}

.project-weather-main small,
.project-weather-card p,
.project-weather-stats {
  color: #6f796f;
  font-size: 12px;
}

.project-weather-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-weather-week {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-top: 4px;
}

.project-weather-week article {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 10px;
  background: #f7f8f6;
}

.project-weather-week b,
.project-weather-week strong {
  color: #1f2328;
  font-size: 11px;
}

.project-weather-week small {
  color: #7a8278;
  font-size: 10px;
}

.weather-icon,
.weather-mini-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
}

.weather-icon {
  width: 54px;
  height: 54px;
  background: #fff6df;
  color: #d88713;
  font-size: 30px;
}

.weather-mini-icon {
  width: 24px;
  height: 24px;
  margin: 3px 0 2px;
  background: #fff6df;
  color: #d88713;
  font-size: 15px;
}

.weather-icon.is-rain,
.weather-mini-icon.is-rain {
  background: #e8f1f7;
  color: #3f7c9f;
}

.weather-icon.is-cloud,
.weather-mini-icon.is-cloud,
.weather-icon.is-mixed,
.weather-mini-icon.is-mixed {
  background: #eef1ee;
  color: #738074;
}

.weather-icon.is-wind,
.weather-mini-icon.is-wind {
  background: #edf5ef;
  color: #46614e;
}

.weather-icon.is-cold,
.weather-mini-icon.is-cold {
  background: #edf3f7;
  color: #567181;
}

.project-weather-week article {
  justify-items: start;
}

.project-calendar-hub-grid {
  display: grid;
  grid-template-columns: minmax(250px, .95fr) minmax(230px, .8fr);
  gap: 18px;
  align-items: start;
}

.project-calendar-hub .mini-calendar-card {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.project-calendar-hub .mini-calendar-days {
  gap: 6px;
}

.project-calendar-hub .mini-calendar-days b,
.project-calendar-hub .mini-calendar-days button,
.project-calendar-hub .mini-calendar-days span {
  min-height: 31px;
  border-radius: 9px;
}

.project-next-activities {
  display: grid;
  gap: 10px;
  padding-left: 18px;
  border-left: 1px solid rgba(31, 35, 40, .08);
}

.project-next-activities > strong {
  color: #1f2328;
  font-size: 13px;
}

.project-next-activity {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f2328;
  text-align: left;
}

.project-next-activity > span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--type-color, #46614e);
}

.project-next-activity strong,
.project-next-activity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-next-activity strong {
  font-size: 12px;
}

.project-next-activity small {
  color: #7a8278;
  font-size: 11px;
}

.project-next-activity em {
  border-radius: 999px;
  background: #edf5ef;
  color: #46614e;
  padding: 5px 8px;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.project-finance-layout {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.project-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  background: conic-gradient(#46614E 0 calc(var(--executed) * 1%), #E8E2D8 calc(var(--executed) * 1%) calc((var(--executed) + var(--payable)) * 1%), #7AA67E calc((var(--executed) + var(--payable)) * 1%) 100%);
}

.project-donut::after {
  content: "";
  position: absolute;
  inset: 7.5%;
  border-radius: inherit;
  background: #fff;
}

.project-donut-center {
  position: relative;
  z-index: 1;
  width: 85%;
  height: 85%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 12px;
  min-width: 0;
}

.project-donut span {
  color: #1F2937;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.05;
  font-weight: 800;
}

.project-donut small {
  color: #6B7280;
  max-width: 100%;
  font-size: clamp(11px, .9vw, 13px);
  line-height: 1.1;
  font-weight: 500;
}

.project-finance-legend {
  display: grid;
  gap: 12px;
}

.project-finance-legend label {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.project-finance-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.project-finance-legend span {
  color: #1f2328;
  font-size: 12px;
}

.project-finance-legend strong {
  color: #1f2328;
  font-size: 12px;
}

.project-finance-legend small {
  grid-column: 2 / -1;
  color: #7a8278;
  font-size: 11px;
}

.project-tabs {
  display: flex;
  gap: 18px;
  padding: 0 14px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 34px rgba(31, 35, 40, .04);
}

.project-tabs button {
  min-height: 48px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #6f796f;
  font-size: 12px;
  font-weight: 620;
}

.project-tabs button.active {
  border-color: #46614e;
  background: transparent;
  color: #1f2328;
}

.project-details-panel {
  margin-top: -14px;
  padding: 18px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.project-details-grid.project-details-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 34px;
}

.project-details-grid.project-details-grid-3 .detail-item {
  gap: 5px;
}

.project-details-grid.project-details-grid-3 .detail-item small {
  color: #7a8278;
  font-size: 11px;
}

.project-details-grid.project-details-grid-3 .detail-item strong {
  color: #1f2328;
  font-size: 12px;
}

body[data-theme="dark"] .project-hero-card,
body[data-theme="dark"] .project-dashboard-card,
body[data-theme="dark"] .project-metric-card,
body[data-theme="dark"] .project-details-panel,
body[data-theme="dark"] .project-tabs {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .055);
}

body[data-theme="dark"] .project-hero-title h2,
body[data-theme="dark"] .project-hero-card .hero-meta strong,
body[data-theme="dark"] .project-progress-card strong,
body[data-theme="dark"] .project-metric-card strong,
body[data-theme="dark"] .project-card-head h3,
body[data-theme="dark"] .project-weather-main strong,
body[data-theme="dark"] .project-weather-week b,
body[data-theme="dark"] .project-weather-week strong,
body[data-theme="dark"] .project-next-activities > strong,
body[data-theme="dark"] .project-next-activity,
body[data-theme="dark"] .project-finance-legend span,
body[data-theme="dark"] .project-finance-legend strong,
body[data-theme="dark"] .project-details-grid.project-details-grid-3 .detail-item strong {
  color: #f5f6f7;
}

body[data-theme="dark"] .project-donut::after {
  background: #1f2328;
}

body[data-theme="dark"] .project-donut span {
  color: #F5F6F7;
}

body[data-theme="dark"] .project-donut small {
  color: #B8C0B8;
}

@media (max-width: 1500px) {
  .project-dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-dashboard-main-grid {
    grid-template-columns: 1fr 1.3fr;
  }

  .project-finance-situation {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  .project-hero-card,
  .project-dashboard-main-grid,
  .project-calendar-hub-grid {
    grid-template-columns: 1fr;
  }

  .project-hero-cover {
    width: 100%;
    max-height: 220px;
    aspect-ratio: 16 / 9;
  }

  .project-hero-meta-grid,
  .project-details-grid.project-details-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-progress-card {
    border-left: 0;
    border-top: 1px solid rgba(31, 35, 40, .08);
  }

  .project-next-activities {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .project-dashboard-kpis,
  .project-hero-meta-grid,
  .project-details-grid.project-details-grid-3,
  .project-finance-layout {
    grid-template-columns: 1fr;
  }

  .project-tabs {
    overflow-x: auto;
  }

  .project-donut {
    justify-self: center;
  }
}

/* Office weekly schedule */
.office-schedule-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 18px;
  align-items: start;
}

.office-schedule-shell:not(:has(.schedule-detail-drawer)) {
  grid-template-columns: 1fr;
}

.schedule-panel-head {
  align-items: flex-start;
}

.week-range {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 12px;
  background: #fff;
  color: #46614e;
  font-size: 12px;
  font-weight: 750;
}

.schedule-board {
  overflow: auto;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 18px;
  background: #fff;
}

.schedule-header,
.schedule-project-row,
.schedule-activity-row {
  display: grid;
  grid-template-columns: var(--schedule-cols);
  min-width: 1040px;
}

.schedule-header {
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: 1px solid rgba(31, 35, 40, .08);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}

.schedule-corner,
.schedule-day-head {
  min-height: 72px;
  padding: 14px;
}

.schedule-corner {
  display: flex;
  align-items: center;
  color: #1f2328;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.schedule-day-head {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  border-left: 1px solid rgba(31, 35, 40, .06);
  color: #6e7785;
}

.schedule-day-head strong {
  color: #1f2328;
  font-size: 22px;
  line-height: 1;
}

.schedule-day-head small {
  color: #7a5b00;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.schedule-project-row {
  border-top: 1px solid rgba(31, 35, 40, .06);
  background: #fbfbfa;
}

.schedule-project-row > div {
  min-height: 44px;
  border-left: 1px solid rgba(31, 35, 40, .04);
}

.schedule-project-row > div:first-child {
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-left: 0;
  color: #46614e;
  font-size: 13px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.schedule-activity-row {
  position: relative;
  min-height: 74px;
  border-top: 1px solid rgba(31, 35, 40, .05);
}

.schedule-activity-label {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 16px;
}

.schedule-activity-label strong {
  color: #1f2328;
  font-size: 14px;
}

.schedule-activity-label small {
  color: #6e7785;
  font-size: 11px;
}

.schedule-day-cell {
  min-height: 74px;
  border-left: 1px solid rgba(31, 35, 40, .055);
  transition: background .16s ease;
}

.schedule-day-cell:hover {
  background: rgba(70, 97, 78, .06);
}

.is-weekend {
  background: rgba(31, 35, 40, .045);
}

.is-holiday {
  background: rgba(232, 226, 216, .72);
}

.is-today {
  box-shadow: inset 0 0 0 1px rgba(70, 97, 78, .38);
  background: rgba(122, 166, 126, .09);
}

.schedule-bar {
  position: relative;
  z-index: 2;
  align-self: center;
  display: grid;
  grid-template-columns: 12px 1fr 12px;
  align-items: stretch;
  min-height: 48px;
  margin: 12px 8px;
  overflow: hidden;
  border: 0;
  border-radius: 15px;
  background: color-mix(in srgb, var(--activity-color) 88%, #ffffff);
  color: #fff;
  box-shadow: 0 14px 32px color-mix(in srgb, var(--activity-color) 24%, transparent);
  cursor: pointer;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
}

.schedule-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px color-mix(in srgb, var(--activity-color) 30%, transparent);
}

.schedule-bar-main {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  padding: 8px 6px;
  cursor: grab;
}

.schedule-bar-main b,
.schedule-bar-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-bar-main b {
  font-size: 12px;
  font-weight: 820;
}

.schedule-bar-main small {
  color: rgba(255, 255, 255, .78);
  font-size: 10px;
}

.schedule-resize-handle {
  cursor: ew-resize;
  background: rgba(255, 255, 255, .16);
}

.schedule-resize-handle:hover {
  background: rgba(255, 255, 255, .34);
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: #6e7785;
  font-size: 12px;
}

.schedule-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.schedule-legend i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(31, 35, 40, .08);
}

.schedule-legend .weekend { background: rgba(31, 35, 40, .08); }
.schedule-legend .holiday { background: rgba(232, 226, 216, .9); }
.schedule-legend .today { background: rgba(122, 166, 126, .18); border-color: rgba(70, 97, 78, .38); }

.schedule-detail-drawer {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 24px 80px rgba(31, 35, 40, .11);
  padding: 20px;
}

.schedule-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.schedule-drawer-head h2 {
  margin: 4px 0 0;
  color: #1f2328;
  font-size: 22px;
  letter-spacing: -.03em;
}

.schedule-owner {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border-radius: 16px;
  background: #f5f6f7;
}

.schedule-owner strong,
.schedule-owner small {
  display: block;
}

.schedule-owner small {
  color: #6e7785;
  margin-top: 2px;
}

.schedule-detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.schedule-detail-list div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid rgba(31, 35, 40, .07);
  border-radius: 14px;
}

.schedule-detail-list dt {
  color: #6e7785;
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.schedule-detail-list dd {
  margin: 0;
  color: #1f2328;
  font-size: 13px;
}

.schedule-detail-drawer .drawer-section {
  padding: 14px;
  border: 1px solid rgba(31, 35, 40, .07);
  border-radius: 16px;
}

.schedule-detail-drawer .drawer-section p,
.schedule-detail-drawer .drawer-section label {
  margin: 0;
  color: #5f685f;
  font-size: 13px;
}

.schedule-drawer-actions {
  align-items: stretch;
}

.schedule-empty {
  padding: 28px;
  color: #6e7785;
}

.schedule-summary-cards {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body[data-theme="dark"] .schedule-board,
body[data-theme="dark"] .schedule-header,
body[data-theme="dark"] .schedule-detail-drawer {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(31, 35, 40, .92);
}

body[data-theme="dark"] .schedule-project-row {
  background: rgba(255, 255, 255, .04);
}

body[data-theme="dark"] .schedule-corner,
body[data-theme="dark"] .schedule-day-head strong,
body[data-theme="dark"] .schedule-activity-label strong,
body[data-theme="dark"] .schedule-drawer-head h2,
body[data-theme="dark"] .schedule-detail-list dd {
  color: #f5f6f7;
}

@media (max-width: 1180px) {
  .office-schedule-shell {
    grid-template-columns: 1fr;
  }

  .schedule-detail-drawer {
    position: relative;
    top: auto;
    max-height: none;
  }

  .schedule-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .schedule-panel-head .actions {
    width: 100%;
  }

  .schedule-summary-cards {
    grid-template-columns: 1fr;
  }
}

/* Compact office schedule, closer to spreadsheet planning density */
.office-schedule-panel {
  padding: 16px;
}

.office-schedule-shell {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  gap: 14px;
}

.schedule-panel-head {
  margin-bottom: 12px;
}

.schedule-panel-head h2 {
  font-size: 16px;
}

.schedule-panel-head p {
  display: none;
}

.schedule-panel-head .actions {
  gap: 7px;
}

.schedule-panel-head .actions button,
.week-range {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 11px;
}

.compact-schedule-board,
.schedule-board {
  border-radius: 14px;
}

.schedule-header,
.schedule-project-row,
.schedule-activity-row {
  min-width: 860px;
}

.schedule-corner,
.schedule-day-head {
  min-height: 56px;
  padding: 10px;
}

.schedule-corner {
  font-size: 10px;
  line-height: 1.25;
}

.schedule-day-head {
  gap: 1px;
}

.schedule-day-head span {
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.schedule-day-head strong {
  font-size: 14px;
}

.schedule-day-head small {
  position: absolute;
  transform: translateY(-20px);
  padding: 2px 5px;
  border-radius: 4px;
  background: #46614e;
  color: #fff;
  font-size: 8px;
}

.schedule-project-row > div {
  min-height: 30px;
}

.schedule-project-row > div:first-child {
  padding: 0 12px;
  font-size: 10px;
}

.schedule-activity-row {
  min-height: 58px;
}

.schedule-activity-label {
  gap: 3px;
  padding: 8px 12px;
}

.schedule-activity-label strong {
  font-size: 12px;
}

.schedule-activity-label small {
  font-size: 10px;
}

.schedule-day-cell {
  min-height: 58px;
}

.schedule-bar {
  min-height: 36px;
  margin: 10px 8px;
  border-radius: 8px;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--activity-color) 18%, transparent);
}

.schedule-bar-main {
  gap: 1px;
  padding: 6px 5px;
}

.schedule-bar-main b {
  font-size: 10px;
}

.schedule-bar-main small {
  font-size: 9px;
}

.schedule-resize-handle {
  min-width: 8px;
}

.schedule-legend {
  margin-top: 9px;
  gap: 9px;
  font-size: 10px;
}

.schedule-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.schedule-detail-drawer {
  top: 12px;
  gap: 12px;
  max-height: calc(100vh - 24px);
  border-radius: 18px;
  padding: 16px;
}

.schedule-drawer-head h2 {
  font-size: 16px;
  line-height: 1.2;
}

.schedule-owner {
  gap: 9px;
  padding: 9px;
  border-radius: 12px;
}

.schedule-owner .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.schedule-owner strong,
.schedule-detail-list dd,
.schedule-detail-drawer .drawer-section p,
.schedule-detail-drawer .drawer-section label {
  font-size: 11px;
}

.schedule-owner small,
.schedule-detail-list dt {
  font-size: 9px;
}

.schedule-detail-list {
  gap: 7px;
}

.schedule-detail-list div {
  gap: 2px;
  padding: 9px;
  border-radius: 11px;
}

.schedule-detail-drawer .drawer-section {
  padding: 10px;
  border-radius: 12px;
  gap: 8px;
}

.schedule-detail-drawer .drawer-section-title strong {
  font-size: 12px;
}

.schedule-drawer-actions {
  gap: 7px;
}

.schedule-drawer-actions button {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 11px;
}

.schedule-summary-cards {
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 0;
}

.schedule-summary-cards article {
  min-height: 78px;
  padding: 14px 16px;
}

.schedule-summary-cards strong {
  margin: 5px 0;
  font-size: 18px;
}

.schedule-summary-cards small,
.schedule-summary-cards span {
  font-size: 11px;
}

/* Dense timeline: only activity rows, no empty project bands */
.schedule-project-row {
  display: none;
}

.schedule-header,
.schedule-activity-row,
.schedule-project-group {
  min-width: 820px;
}

.schedule-corner,
.schedule-day-head {
  min-height: 46px;
  padding: 8px 10px;
}

.schedule-corner {
  font-size: 9px;
}

.schedule-day-head strong {
  font-size: 13px;
}

.schedule-activity-row {
  min-height: 42px;
  border-top: 1px solid rgba(31, 35, 40, .055);
}

.schedule-activity-row.is-project-start {
  border-top-color: rgba(70, 97, 78, .16);
}

.schedule-activity-label {
  grid-row: 1;
  gap: 2px;
  padding: 6px 10px;
}

.schedule-activity-label strong {
  color: #1f2328;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .015em;
  text-transform: uppercase;
}

.schedule-activity-label small {
  color: #5f685f;
  font-size: 9px;
}

.schedule-day-cell {
  grid-row: 1;
  min-height: 68px;
}

.schedule-day-cell.is-range-preview {
  background: rgba(122, 166, 126, .13);
  box-shadow: inset 0 0 0 1px rgba(70, 97, 78, .12);
}

.schedule-day-cell.is-drop-target {
  background: rgba(70, 97, 78, .18);
  box-shadow: inset 0 0 0 2px rgba(70, 97, 78, .34);
}

.schedule-bar {
  grid-row: 1;
  grid-template-columns: 8px 1fr 8px;
  align-self: center;
  min-height: 36px;
  margin: 16px 14px;
  border-radius: 9px;
  touch-action: none;
  user-select: none;
}

.schedule-bar.is-dragging {
  opacity: .72;
  transform: scale(.995);
  box-shadow: 0 20px 42px color-mix(in srgb, var(--activity-color) 34%, transparent);
}

.schedule-bar-main {
  padding: 4px 5px;
  cursor: grab;
}

.schedule-bar.is-dragging .schedule-bar-main {
  cursor: grabbing;
}

.schedule-bar-main b {
  font-size: 9px;
}

.schedule-bar-main small {
  font-size: 8px;
}

.schedule-resize-handle {
  min-width: 8px;
  opacity: .46;
  cursor: ew-resize;
  transition: opacity .16s ease, background .16s ease;
}

.schedule-bar:hover .schedule-resize-handle,
.schedule-bar.is-dragging .schedule-resize-handle {
  opacity: .95;
}

.schedule-is-dragging {
  cursor: grabbing;
}

.schedule-is-dragging.schedule-is-resizing {
  cursor: ew-resize;
}

.schedule-is-dragging.schedule-is-resizing .schedule-bar-main {
  cursor: ew-resize;
}

.schedule-drag-tooltip {
  position: fixed;
  z-index: 9000;
  pointer-events: none;
  padding: 8px 10px;
  border: 1px solid rgba(31, 35, 40, .1);
  border-radius: 12px;
  background: rgba(31, 35, 40, .92);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(31, 35, 40, .22);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.35;
  white-space: nowrap;
}

.schedule-drag-tooltip[hidden] {
  display: none;
}

.schedule-color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 7px 0;
}

.schedule-color-swatch {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(31, 35, 40, .12);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: none;
}

.schedule-color-swatch span {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(31, 35, 40, .1);
  border-radius: 999px;
  background: var(--swatch);
}

.schedule-color-swatch:hover {
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(31, 35, 40, .1);
  transform: translateY(-1px);
}

.schedule-color-swatch.active {
  border-color: #46614e;
  box-shadow: 0 0 0 3px rgba(70, 97, 78, .14);
}

.schedule-project-group {
  display: grid;
  grid-template-columns: var(--schedule-cols);
  grid-template-rows: repeat(var(--project-rows), 68px);
  border-top: 1px solid rgba(70, 97, 78, .16);
}

.schedule-project-merged-label {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 12px 10px;
  border-right: 1px solid rgba(31, 35, 40, .06);
  background: rgba(255, 255, 255, .96);
}

.schedule-project-merged-label strong {
  color: #1f2328;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .015em;
  line-height: 1.2;
  text-transform: uppercase;
}

.schedule-project-merged-label small {
  color: #5f685f;
  font-size: 9px;
  line-height: 1.25;
}

.schedule-project-group .schedule-day-cell {
  min-height: 68px;
}

.schedule-project-group .schedule-bar {
  min-height: 36px;
}

/* Cronograma: weekly, monthly and calendar views */
.schedule-panel-head {
  align-items: flex-start;
  margin-bottom: 24px;
}

.schedule-panel-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0;
}

.schedule-panel-head p {
  display: block;
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.month-timeline {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
}

.month-timeline-head,
.month-project-row {
  display: grid;
  grid-template-columns: var(--month-cols);
  min-width: 900px;
}

.month-timeline-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
}

.month-corner,
.month-week-head,
.month-project-label,
.month-week-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.month-corner,
.month-week-head {
  min-height: 58px;
  padding: 12px 14px;
}

.month-corner {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.month-week-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.month-week-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.month-project-row {
  position: relative;
  min-height: 76px;
}

.month-project-label {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 12px 14px;
}

.month-project-label strong {
  font-size: 12px;
  font-weight: 760;
}

.month-project-label small {
  color: var(--muted);
  font-size: 11px;
}

.month-week-cell {
  grid-row: 1;
  min-height: 76px;
  background: linear-gradient(180deg, rgba(245, 246, 247, .46), rgba(255, 255, 255, .72));
}

.month-task-bar {
  grid-row: 1;
  align-self: center;
  z-index: 1;
  display: grid;
  gap: 2px;
  min-height: 42px;
  margin: 16px 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--activity-color) 82%, #ffffff);
  color: #ffffff;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--activity-color) 22%, transparent);
  text-align: left;
}

.month-task-bar strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-task-bar span {
  font-size: 10px;
  opacity: .86;
}

.schedule-calendar-panel {
  min-height: 620px;
}

.schedule-calendar-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
}

.schedule-calendar-head strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
}

.schedule-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 8px;
}

.schedule-calendar-grid > b {
  padding: 0 6px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.schedule-calendar-cell {
  min-height: 118px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.schedule-calendar-cell:hover {
  border-color: rgba(70, 97, 78, .26);
  box-shadow: 0 14px 28px rgba(31, 35, 40, .06);
  transform: translateY(-1px);
}

.schedule-calendar-cell.muted-cell {
  background: transparent;
  border-color: transparent;
}

.schedule-calendar-cell.is-today {
  border-color: rgba(70, 97, 78, .45);
  background: rgba(70, 97, 78, .07);
}

.calendar-day-number {
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(70, 97, 78, .08);
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
}

.schedule-calendar-events {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.schedule-calendar-event {
  min-height: auto;
  padding: 5px 7px;
  border: 0;
  border-left: 3px solid var(--activity-color);
  border-radius: 8px;
  background: color-mix(in srgb, var(--activity-color) 13%, #ffffff);
  color: var(--ink);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
}

.schedule-calendar-event b {
  color: var(--primary);
  font-weight: 780;
}

body[data-theme="dark"] .month-timeline,
body[data-theme="dark"] .month-timeline-head,
body[data-theme="dark"] .schedule-calendar-cell {
  background: rgba(32, 37, 40, .82);
}

.sidebar-user {
  display: none !important;
}

.finance-dashboard {
  display: grid;
  gap: 18px;
}

.finance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(126px, 1fr));
  gap: 14px;
}

.finance-kpi-card,
.finance-card {
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 40px rgba(31, 35, 40, .055);
}

.finance-kpi-card {
  display: grid;
  min-height: 170px;
  padding: 16px 16px 12px;
  overflow: hidden;
}

.finance-kpi-top,
.finance-card-head,
.finance-legend-item,
.finance-cost-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finance-kpi-top span:first-child,
.finance-card-head p,
.finance-goal span,
.finance-cost-item small {
  color: var(--muted);
}

.finance-kpi-top span:first-child {
  font-size: 12px;
  font-weight: 620;
}

.finance-kpi-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: rgba(70, 97, 78, .09);
  color: var(--primary);
}

.finance-kpi-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.finance-kpi-card strong {
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 760;
  letter-spacing: 0;
}

.finance-kpi-card small {
  font-size: 11px;
  font-weight: 620;
}

.finance-kpi-card .is-positive {
  color: #46614E;
}

.finance-kpi-card .is-negative {
  color: #A84B42;
}

.finance-tone-sand .finance-kpi-icon {
  background: rgba(232, 226, 216, .72);
  color: #7B6C58;
}

.finance-tone-orange .finance-kpi-icon {
  background: rgba(245, 169, 74, .15);
  color: #A96816;
}

.finance-tone-red .finance-kpi-icon {
  background: rgba(185, 72, 66, .12);
  color: #A84B42;
}

.finance-sparkline {
  align-self: end;
  width: 100%;
  height: 48px;
  margin-top: 8px;
}

.finance-sparkline path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .9;
}

.finance-tone-green .finance-sparkline {
  color: #46614E;
}

.finance-tone-sand .finance-sparkline {
  color: #BDAF9D;
}

.finance-tone-orange .finance-sparkline {
  color: #CF8B2B;
}

.finance-tone-red .finance-sparkline {
  color: #C3564E;
}

.finance-grid-2,
.finance-grid-3 {
  display: grid;
  gap: 18px;
}

.finance-grid-2 {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
}

.finance-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-card {
  min-width: 0;
  padding: 18px;
}

.finance-card-head {
  margin-bottom: 14px;
}

.finance-card-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 710;
}

.finance-card-head p {
  margin: 4px 0 0;
  font-size: 12px;
}

.finance-period,
.finance-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
}

.finance-chip {
  display: inline-flex;
  align-items: center;
}

.finance-line-chart {
  width: 100%;
  min-height: 250px;
}

.finance-line-chart text {
  fill: var(--muted);
  font-size: 11px;
}

.chart-fill {
  fill: url(#financeRevenueFill);
}

.chart-line-income,
.chart-line-expense {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line-income {
  stroke: #46614E;
}

.chart-line-expense {
  stroke: #C8BCA9;
}

.chart-line-expense.dashed {
  stroke-dasharray: 5 6;
}

.finance-chart-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.income-dot,
.expense-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.income-dot {
  background: #46614E;
}

.expense-dot {
  background: #C8BCA9;
}

.finance-donut-layout {
  display: grid;
  grid-template-columns: minmax(170px, 220px) 1fr;
  gap: 24px;
  align-items: center;
}

.finance-donut {
  display: grid;
  width: min(220px, 100%);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--donut));
  position: relative;
}

.finance-donut::after {
  content: '';
  position: absolute;
  inset: 7.5%;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(31, 35, 40, .06);
}

.finance-donut span,
.finance-donut small {
  grid-column: 1;
  position: relative;
  z-index: 1;
}

.finance-donut span {
  align-self: end;
  color: var(--ink);
  max-width: 85%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(16px, 1.4vw, 22px);
  font-weight: 760;
}

.finance-donut small {
  align-self: start;
  color: var(--muted);
  font-size: 11px;
}

.finance-legend-list {
  display: grid;
  gap: 11px;
}

.finance-legend-item {
  display: grid;
  grid-template-columns: 1fr auto 42px;
  color: var(--ink);
  font-size: 12px;
}

.finance-legend-name {
  display: flex;
  gap: 8px;
  align-items: center;
}

.finance-legend-name i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.finance-legend-item strong,
.finance-legend-item small {
  text-align: right;
}

.finance-table-wrap {
  overflow-x: auto;
}

.finance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.finance-table th {
  padding: 10px 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  text-align: left;
  text-transform: uppercase;
}

.finance-table td {
  padding: 13px 8px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
}

.finance-badge {
  display: inline-flex;
  min-height: 24px;
  padding: 0 10px;
  align-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
}

.finance-badge.success {
  background: rgba(122, 166, 126, .2);
  color: #46614E;
}

.finance-badge.warning {
  background: rgba(232, 226, 216, .86);
  color: #8A662A;
}

.finance-badge.danger {
  background: rgba(185, 72, 66, .12);
  color: #A84B42;
}

.finance-recent-list {
  display: grid;
  gap: 8px;
}

.finance-recent-item {
  display: grid;
  grid-template-columns: 28px 78px 1fr 110px auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  text-align: left;
  transition: background .18s ease, transform .18s ease;
}

.finance-recent-item:hover {
  background: rgba(70, 97, 78, .06);
  transform: translateX(2px);
}

.finance-recent-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-recent-item small {
  color: var(--muted);
}

.finance-recent-item b {
  text-align: right;
  white-space: nowrap;
}

.finance-mini-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  font-weight: 760;
}

.finance-mini-icon.income,
.finance-recent-item b.income {
  color: #46614E;
}

.finance-mini-icon.expense,
.finance-recent-item b.expense {
  color: #A84B42;
}

.finance-mini-icon.income {
  background: rgba(122, 166, 126, .18);
}

.finance-mini-icon.expense {
  background: rgba(185, 72, 66, .12);
}

.finance-forecast-values {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: baseline;
  margin-bottom: 8px;
}

.finance-forecast-values strong {
  color: var(--ink);
  font-size: 20px;
}

.finance-forecast-values span {
  color: var(--muted);
  font-size: 12px;
}

.finance-forecast-chart {
  width: 100%;
  min-height: 130px;
}

.finance-goals {
  display: grid;
  gap: 16px;
}

.finance-goal {
  display: grid;
  gap: 7px;
}

.finance-goal > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 12px;
}

.finance-progress,
.finance-cost-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 35, 40, .08);
}

.finance-progress i,
.finance-cost-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #46614E;
}

.finance-goal small {
  justify-self: end;
  color: #46614E;
  font-size: 11px;
  font-weight: 650;
}

.finance-cost-list {
  display: grid;
  gap: 13px;
}

.finance-cost-item {
  display: grid;
  grid-template-columns: 86px 1fr auto 34px;
  font-size: 12px;
}

.finance-cost-item span {
  color: var(--ink);
  font-weight: 650;
}

.finance-cost-item strong {
  color: var(--ink);
  white-space: nowrap;
}

body[data-theme="dark"] .finance-kpi-card,
body[data-theme="dark"] .finance-card,
body[data-theme="dark"] .finance-period,
body[data-theme="dark"] .finance-chip {
  background: rgba(32, 37, 40, .88);
  border-color: rgba(255, 255, 255, .09);
}

body[data-theme="dark"] .finance-donut::after {
  background: #202528;
}

body[data-theme="dark"] .finance-recent-item:hover {
  background: rgba(122, 166, 126, .09);
}

.office-reports-page {
  display: grid;
  gap: 16px;
}

.office-reports-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 20px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 32px rgba(31, 35, 40, .04);
}

.office-reports-table {
  padding: 18px;
}

.reports-history-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
}

.reports-history-table th,
.reports-history-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(31, 35, 40, .08);
  color: var(--ink);
  font-size: 13px;
  vertical-align: middle;
}

.reports-history-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.reports-history-table td strong {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-history-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.report-modal-intro {
  padding: 14px 16px;
  border: 1px solid rgba(70, 97, 78, .14);
  border-radius: 18px;
  background: rgba(70, 97, 78, .055);
}

.report-modal-intro strong {
  color: var(--ink);
  font-size: 15px;
}

.report-modal-intro p {
  margin: 4px 0 0;
}

.report-generation-grid {
  align-items: start;
}

.report-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(245, 246, 247, .68);
}

.report-category-grid {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  max-height: 156px;
  overflow: auto;
}

.report-checkbox-grid label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 11px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 620;
  background: rgba(255, 255, 255, .74);
}

.report-checkbox-grid input {
  accent-color: var(--primary);
}

body[data-theme="dark"] .office-reports-filters,
body[data-theme="dark"] .report-modal-intro,
body[data-theme="dark"] .report-checkbox-grid label {
  background: rgba(32, 37, 40, .88);
  border-color: rgba(255, 255, 255, .09);
}

body[data-theme="dark"] .report-checkbox-grid {
  background: rgba(255, 255, 255, .04);
}

@media (max-width: 980px) {
  .office-reports-filters,
  .report-checkbox-grid,
  .report-category-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .office-reports-filters,
  .report-checkbox-grid,
  .report-category-grid {
    grid-template-columns: 1fr;
  }
}

/* Compact executive finance dashboard */
.finance-dashboard {
  gap: 14px;
}

.finance-kpi-grid {
  gap: 10px;
}

.finance-kpi-card {
  min-height: 138px;
  padding: 12px 13px 9px;
  border-radius: 16px;
}

.finance-date-card {
  align-content: start;
}

.finance-date-card strong {
  margin-top: 6px;
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1;
}

.finance-date-card > span:last-child {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.finance-kpi-top {
  gap: 8px;
}

.finance-kpi-top span:first-child {
  font-size: 11px;
}

.finance-kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.finance-kpi-icon svg {
  width: 15px;
  height: 15px;
}

.finance-kpi-card strong {
  margin-top: 4px;
  font-size: clamp(18px, 1.55vw, 22px);
}

.finance-kpi-card small {
  font-size: 10px;
}

.finance-sparkline {
  height: 34px;
  margin-top: 4px;
}

.finance-sparkline path {
  stroke-width: 2;
}

.finance-grid-2,
.finance-grid-3 {
  gap: 14px;
}

.finance-card {
  padding: 14px;
  border-radius: 16px;
}

.finance-card-head {
  margin-bottom: 9px;
}

.finance-card-head h3 {
  font-size: 14px;
}

.finance-card-head p {
  margin-top: 2px;
  font-size: 11px;
}

.finance-period,
.finance-chip {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 11px;
}

.finance-line-chart {
  height: 210px;
  min-height: 0;
}

.finance-chart-legend {
  margin-top: -4px;
  font-size: 11px;
}

.finance-donut-layout {
  grid-template-columns: 172px 1fr;
  gap: 4px;
}

.finance-donut {
  width: 172px;
  grid-template-rows: 1fr auto auto 1fr;
}

.finance-donut span {
  align-self: end;
  grid-row: 2;
  justify-self: center;
  max-width: 136px;
  font-size: clamp(14px, 1.15vw, 19px);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.finance-donut small {
  align-self: start;
  grid-row: 3;
  margin-top: 5px;
  justify-self: center;
  text-align: center;
}

.finance-legend-list {
  gap: 6px;
}

.finance-legend-item {
  grid-template-columns: minmax(76px, 1fr) auto 30px;
  gap: 7px;
  font-size: 10.5px;
}

.finance-table-wrap {
  max-height: 205px;
  overflow-x: hidden;
}

.finance-table {
  table-layout: fixed;
  min-width: 0;
}

.finance-table th {
  padding: 7px 6px;
  font-size: 9px;
}

.finance-table td {
  padding: 9px 6px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-table th:nth-child(1),
.finance-table td:nth-child(1) {
  width: 78px;
}

.finance-table th:nth-child(2),
.finance-table td:nth-child(2) {
  width: auto;
}

.finance-table th:nth-child(3),
.finance-table td:nth-child(3) {
  width: 92px;
}

.finance-table th:nth-child(4),
.finance-table td:nth-child(4) {
  width: 92px;
  text-align: right;
}

.finance-table th:nth-child(5),
.finance-table td:nth-child(5) {
  width: 74px;
}

.finance-badge {
  min-height: 21px;
  padding: 0 8px;
  font-size: 10px;
}

.finance-recent-list {
  gap: 4px;
  max-height: 204px;
  overflow: hidden;
}

.finance-recent-item {
  grid-template-columns: 24px 68px 1fr 86px auto;
  gap: 8px;
  padding: 7px 6px;
  border-radius: 10px;
  font-size: 11px;
}

.finance-mini-icon {
  width: 22px;
  height: 22px;
}

.finance-grid-3 .finance-card {
  min-height: 188px;
}

.finance-forecast-values {
  grid-template-columns: auto 1fr auto 1fr;
  gap: 2px 8px;
  margin-bottom: 0;
}

.finance-forecast-values strong {
  font-size: 14px;
}

.finance-forecast-values span {
  font-size: 9.5px;
}

.finance-forecast-chart {
  display: block;
  height: 144px;
  min-height: 0;
  margin-top: 2px;
}

.finance-goals,
.finance-cost-list {
  gap: 10px;
}

.finance-goal {
  gap: 5px;
}

.finance-goal > div:first-child,
.finance-cost-item {
  font-size: 11px;
}

.finance-progress,
.finance-cost-bar {
  height: 6px;
}

.finance-cost-item {
  grid-template-columns: 74px 1fr auto 30px;
  gap: 8px;
}

@media (max-width: 980px) {
  .finance-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .finance-grid-2,
  .finance-grid-3 {
    grid-template-columns: 1fr;
  }

  .finance-donut-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .finance-kpi-grid {
    grid-template-columns: 1fr;
  }

  .finance-recent-item {
    grid-template-columns: 28px 1fr auto;
  }

  .finance-recent-item > span:nth-child(2),
  .finance-recent-item small {
    display: none;
  }
}

.office-ledger {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.office-ledger.has-detail {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: start;
}

.office-ledger-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.office-ledger-head,
.office-ledger-panel,
.ledger-summary,
.office-finance-detail {
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 40px rgba(31, 35, 40, .05);
}

.office-ledger-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 22px;
}

.office-ledger-head > div:first-child {
  flex: 0 0 auto;
  min-width: 260px;
}

.office-ledger-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  font-weight: 720;
  letter-spacing: 0;
}

.office-ledger-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.office-ledger-actions {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.office-ledger-actions input,
.office-ledger-actions button {
  min-height: 44px;
}

.office-ledger-actions input[type="search"] {
  flex: 1 1 340px;
  min-width: 240px;
  max-width: 420px;
}

.ledger-date-range {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  width: 368px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .88);
  color: var(--muted);
  overflow: hidden;
}

.ledger-date-range span {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--primary);
}

.ledger-date-range svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.ledger-date-range input {
  flex: 0 0 134px;
  min-height: 0;
  width: 134px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.ledger-date-range input::-webkit-calendar-picker-indicator {
  width: 14px;
  height: 14px;
  margin-left: 2px;
}

.ledger-date-range em {
  color: var(--muted);
  font-style: normal;
}

.ledger-filter-button,
.ledger-report-button,
.ledger-new-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ledger-filter-button span {
  margin-right: 4px;
  font-weight: 800;
}

.ledger-report-button {
  border-color: rgba(31, 35, 40, .12);
  background: #fff;
  color: var(--primary);
}

.ledger-new-button {
  background: var(--primary);
  color: #fff;
}

.office-ledger-panel {
  overflow: visible;
  padding: 18px;
}

.ledger-toolbar,
.ledger-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.ledger-toolbar {
  margin-bottom: 12px;
}

.ledger-count,
.ledger-footer,
.ledger-pagination span {
  color: var(--muted);
  font-size: 12px;
}

.ledger-segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(245, 246, 247, .75);
}

.ledger-segmented button {
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ledger-segmented button.active {
  background: rgba(70, 97, 78, .12);
  color: var(--primary);
}

.ledger-advanced {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(245, 246, 247, .6);
}

.ledger-filter-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.ledger-table-wrap {
  overflow: visible;
}

.ledger-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
}

.ledger-table th,
.ledger-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(31, 35, 40, .08);
  color: var(--ink);
  font-size: 13px;
  vertical-align: middle;
}

.ledger-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.ledger-table tbody tr {
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.ledger-table tbody tr:hover,
.ledger-table tbody tr.selected {
  background: rgba(70, 97, 78, .055);
}

.ledger-table td strong {
  display: block;
  max-width: 280px;
  overflow: hidden;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.ledger-sort {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
}

.ledger-type,
.ledger-summary-icon,
.finance-detail-head .ledger-type {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.ledger-type.income,
.ledger-summary-card.income .ledger-summary-icon {
  background: rgba(122, 166, 126, .18);
  color: #46614E;
}

.ledger-type.expense,
.ledger-summary-card.expense .ledger-summary-icon {
  background: rgba(185, 72, 66, .12);
  color: #B94842;
}

.ledger-value {
  white-space: nowrap;
}

.ledger-value.income,
.detail-amount.income {
  color: #46614E;
}

.ledger-value.expense,
.detail-amount.expense {
  color: #B94842;
}

.ledger-category,
.payment-pill,
.ledger-status {
  display: inline-flex;
  min-height: 24px;
  padding: 0 10px;
  align-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 740;
}

.ledger-category {
  background: rgba(232, 226, 216, .62);
  color: #5E5549;
}

.ledger-category.equipe,
.ledger-category.salarios,
.ledger-category.projetos,
.ledger-category.consultorias {
  background: rgba(70, 97, 78, .12);
  color: #46614E;
}

.ledger-category.marketing {
  background: rgba(185, 72, 66, .11);
  color: #A84B42;
}

.ledger-category.softwares,
.ledger-category.escritorio,
.ledger-category.aluguel,
.ledger-category.internet,
.ledger-category.energia {
  background: rgba(232, 226, 216, .78);
  color: #7B6C58;
}

.payment-pill {
  background: rgba(245, 246, 247, .9);
  color: var(--muted);
}

.ledger-status.success {
  background: rgba(122, 166, 126, .18);
  color: #46614E;
}

.ledger-status.warning {
  background: rgba(232, 226, 216, .82);
  color: #8A662A;
}

.ledger-status.danger {
  background: rgba(185, 72, 66, .12);
  color: #B94842;
}

.ledger-actions-menu {
  position: relative;
}

.ledger-actions-menu summary {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.ledger-actions-menu summary::-webkit-details-marker {
  display: none;
}

.ledger-actions-menu[open] summary,
.ledger-actions-menu summary:hover {
  background: rgba(70, 97, 78, .08);
  color: var(--primary);
}

.ledger-actions-menu div {
  position: absolute;
  top: 36px;
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 150px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 18px 36px rgba(31, 35, 40, .12);
}

.ledger-actions-menu button {
  justify-content: flex-start;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.danger-text {
  color: #B94842 !important;
}

.ledger-footer {
  padding-top: 14px;
}

.ledger-pagination {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ledger-pagination button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.ledger-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px;
}

.ledger-summary-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px 18px;
  border-right: 1px solid var(--line);
}

.ledger-summary-card:last-child {
  border-right: 0;
}

.ledger-summary-card.balance .ledger-summary-icon,
.ledger-summary-card.count .ledger-summary-icon {
  background: rgba(232, 226, 216, .68);
  color: #5E5549;
}

.ledger-summary-card p,
.ledger-summary-card small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.ledger-summary-card strong {
  display: block;
  margin: 4px 0;
  color: var(--ink);
  font-size: 20px;
}

.office-finance-detail {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 16px;
  padding: 20px;
}

.finance-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.office-finance-detail h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.18;
}

.detail-amount {
  font-size: 28px;
}

.finance-detail-list {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 12px;
  margin: 0;
}

.finance-detail-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.finance-detail-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

body[data-theme="dark"] .office-ledger-head,
body[data-theme="dark"] .office-ledger-panel,
body[data-theme="dark"] .ledger-summary,
body[data-theme="dark"] .office-finance-detail,
body[data-theme="dark"] .ledger-actions-menu div {
  background: rgba(32, 37, 40, .9);
  border-color: rgba(255, 255, 255, .09);
}

body[data-theme="dark"] .ledger-advanced,
body[data-theme="dark"] .ledger-segmented {
  background: rgba(255, 255, 255, .04);
}

@media (max-width: 1280px) {
  .office-ledger.has-detail {
    grid-template-columns: 1fr;
  }

  .office-finance-detail {
    position: relative;
    top: auto;
  }
}

@media (max-width: 1180px) {
  .office-ledger-head {
    gap: 14px;
  }

  .office-ledger-head > div:first-child {
    min-width: 210px;
  }

  .office-ledger-actions input[type="search"] {
    min-width: 160px;
  }

  .ledger-date-range {
    width: 344px;
    padding-inline: 12px;
  }

  .ledger-date-range input {
    flex-basis: 124px;
    width: 124px;
  }
}

@media (max-width: 900px) {
  .office-ledger-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .office-ledger-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }

  .office-ledger-actions input[type="search"] {
    max-width: none;
  }

  .ledger-advanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger-table-wrap {
    overflow-x: auto;
  }

  .ledger-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger-summary-card:nth-child(2) {
    border-right: 0;
  }
}

@media (max-width: 640px) {
  .ledger-toolbar,
  .ledger-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .ledger-advanced,
  .ledger-summary {
    grid-template-columns: 1fr;
  }

  .ledger-summary-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ledger-summary-card:last-child {
    border-bottom: 0;
  }
}

/* Project document modal */
.document-modal-intro {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 16px;
  background: #f5f7f4;
}

.document-modal-intro strong {
  color: #1f2328;
  font-size: 14px;
}

.document-modal-intro p {
  font-size: 12px;
}

.document-upload-dropzone {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 178px;
  padding: 22px;
  border: 1.5px dashed rgba(70, 97, 78, .28);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(237, 245, 239, .72), rgba(255, 255, 255, .88));
  color: #46614e;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.document-upload-dropzone:hover,
.document-upload-dropzone.is-dragging {
  border-color: #46614e;
  background: #edf5ef;
  transform: translateY(-1px);
}

.document-upload-dropzone input {
  display: none;
}

.document-upload-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #ffffff;
  color: #46614e;
  box-shadow: 0 12px 28px rgba(31, 35, 40, .08);
  font-size: 22px;
}

.document-upload-dropzone strong {
  color: #1f2328;
  font-size: 15px;
}

.document-upload-dropzone small,
.document-upload-dropzone em {
  color: #6f796f;
  font-size: 12px;
  font-style: normal;
}

.document-upload-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 13px;
  background: rgba(255, 255, 255, .92);
  color: #6f796f;
  font-size: 12px;
}

.document-upload-preview.has-file {
  color: #1f2328;
}

.document-upload-preview span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-upload-preview small,
.document-upload-preview strong {
  white-space: nowrap;
}

.document-upload-preview small {
  color: #6f796f;
}

.document-upload-preview strong {
  color: #46614e;
  font-size: 12px;
}

.document-upload-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e9e3;
}

.document-upload-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #46614e;
  transition: width .45s ease;
}

body[data-theme="dark"] .document-modal-intro,
body[data-theme="dark"] .document-upload-preview {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .055);
}

body[data-theme="dark"] .document-modal-intro strong,
body[data-theme="dark"] .document-upload-dropzone strong,
body[data-theme="dark"] .document-upload-preview.has-file {
  color: #f5f6f7;
}

body[data-theme="dark"] .document-upload-dropzone {
  background: rgba(255, 255, 255, .045);
}

/* Project photo reports */
.photo-reports-page {
  display: grid;
  gap: 24px;
}

.photo-reports-head {
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 28px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 24px 70px rgba(31, 35, 40, .06);
}

.photo-reports-title {
  display: flex;
  align-items: center;
  gap: 18px;
}

.photo-module-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #edf3ed;
  color: #46614e;
  font-size: 24px;
}

.photo-reports-title h2 {
  margin: 0;
  color: #1f2328;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -.03em;
}

.photo-reports-title p {
  margin: 6px 0 0;
  color: #6f796f;
}

.photo-reports-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, .45fr)) auto auto;
  gap: 12px;
  align-items: center;
}

.photo-reports-toolbar input,
.photo-reports-toolbar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(31, 35, 40, .12);
  border-radius: 14px;
  background: #fff;
  color: #1f2328;
  padding: 0 14px;
}

.photo-reports-toolbar button {
  min-height: 46px;
  white-space: nowrap;
}

.photo-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.photo-report-card {
  overflow: hidden;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(31, 35, 40, .055);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.photo-report-card:hover,
.photo-report-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(70, 97, 78, .24);
  box-shadow: 0 26px 70px rgba(31, 35, 40, .09);
}

.photo-report-card:focus-visible {
  outline: 3px solid rgba(70, 97, 78, .18);
  outline-offset: 3px;
}

.photo-report-cover,
.photo-upload-thumb,
.photo-gallery-image {
  background-size: cover;
  background-position: center;
}

.photo-report-cover {
  position: relative;
  height: 210px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  color: #fff;
}

.photo-report-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(31, 35, 40, .04), rgba(31, 35, 40, .48));
  pointer-events: none;
}

.photo-report-cover > * {
  position: relative;
  z-index: 1;
}

.photo-report-cover > i {
  align-self: flex-end;
  opacity: .78;
  font-size: 18px;
}

.photo-cover-electrical { background: linear-gradient(135deg, #d8cec0 0%, #9e8f7c 42%, #3f4d43 100%); }
.photo-cover-drywall { background: linear-gradient(135deg, #e8e2d8 0%, #bab3a7 44%, #46614e 100%); }
.photo-cover-facade { background: linear-gradient(135deg, #bac8c1 0%, #6f8175 45%, #1f2328 100%); }
.photo-cover-floor { background: linear-gradient(135deg, #d8d1c7 0%, #a3927f 45%, #46614e 100%); }
.photo-cover-hydraulic { background: linear-gradient(135deg, #d9e3df 0%, #7aa67e 44%, #1f2328 100%); }
.photo-cover-foundation { background: linear-gradient(135deg, #c6b9a8 0%, #8c7b66 45%, #46614e 100%); }
.photo-cover-default { background: linear-gradient(135deg, #46614e 0%, #1f2328 100%); }

.photo-report-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.photo-report-body h3 {
  margin: 0;
  color: #1f2328;
  font-size: 18px;
  letter-spacing: -.02em;
}

.photo-report-meta,
.photo-report-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #6f796f;
  font-size: 13px;
}

.photo-report-meta span,
.photo-report-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.photo-report-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo-report-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f3f0;
  color: #46614e;
  font-size: 12px;
  font-weight: 700;
}

.photo-report-foot {
  justify-content: flex-start;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(31, 35, 40, .08);
}

.photo-report-form {
  align-items: start;
}

.photo-upload-dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 170px;
  padding: 24px;
  border: 1.5px dashed rgba(70, 97, 78, .3);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(237, 245, 239, .75), rgba(255, 255, 255, .9));
  color: #46614e;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.photo-upload-dropzone:hover,
.photo-upload-dropzone.is-dragging {
  border-color: #46614e;
  background: #edf5ef;
  transform: translateY(-1px);
}

.photo-upload-dropzone input {
  display: none;
}

.photo-upload-dropzone span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(31, 35, 40, .08);
  font-size: 22px;
}

.photo-upload-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #6f796f;
  font-size: 12px;
}

.photo-upload-head strong {
  color: #1f2328;
  font-size: 14px;
}

.photo-upload-list {
  display: grid;
  gap: 14px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.photo-upload-item {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 18px;
  background: #fff;
}

.photo-upload-thumb {
  position: relative;
  min-height: 118px;
  border-radius: 14px;
  overflow: hidden;
}

.photo-upload-thumb span,
.photo-cover-btn,
.photo-remove {
  position: absolute;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.photo-upload-thumb span,
.photo-cover-btn {
  left: 9px;
  bottom: 9px;
  padding: 5px 9px;
  background: #edf5ef;
  color: #46614e;
  font-size: 11px;
}

.photo-remove {
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, .92);
  color: #1f2328;
  cursor: pointer;
}

.photo-image-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.photo-image-fields small {
  grid-column: 1 / -1;
  color: #6f796f;
}

.photo-report-view {
  display: grid;
  gap: 16px;
}

.photo-report-drawer {
  position: fixed;
  top: 126px;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(520px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid rgba(31, 35, 40, .1);
  border-radius: 28px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 28px 90px rgba(31, 35, 40, .18);
  animation: photoDrawerIn .2s ease both;
  backdrop-filter: blur(18px);
}

@keyframes photoDrawerIn {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: translateX(0); }
}

.photo-report-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(31, 35, 40, .08);
}

.photo-report-drawer-head span {
  display: block;
  margin-bottom: 6px;
  color: #46614e;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.photo-report-drawer-head h2 {
  margin: 0;
  color: #1f2328;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.photo-report-drawer-head p {
  margin: 8px 0 0;
  color: #6f796f;
}

.photo-report-drawer-body {
  display: grid;
  align-content: start;
  gap: 16px;
  overflow: auto;
  padding: 18px 24px 24px;
}

.photo-drawer-cover {
  min-height: 210px;
  padding: 16px;
  border-radius: 22px;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 -80px 90px rgba(31, 35, 40, .35);
}

.photo-drawer-cover .tag {
  box-shadow: 0 10px 28px rgba(31, 35, 40, .12);
}

.photo-drawer-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.photo-drawer-gallery {
  display: grid;
  gap: 12px;
}

.photo-drawer-gallery figure {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 18px;
  background: #fff;
}

.photo-drawer-gallery .photo-gallery-image {
  min-height: 94px;
  border-radius: 14px;
}

.photo-drawer-gallery figcaption {
  display: grid;
  align-content: center;
  gap: 4px;
  color: #6f796f;
  font-size: 12px;
}

.photo-drawer-gallery figcaption strong {
  color: #1f2328;
  font-size: 13px;
}

.photo-drawer-gallery figcaption small {
  color: #8a9387;
}

.photo-report-drawer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid rgba(31, 35, 40, .08);
  background: rgba(255, 255, 255, .9);
}

.photo-view-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.photo-view-head strong,
.photo-view-head span {
  display: block;
}

.photo-view-head strong {
  color: #1f2328;
  font-size: 18px;
}

.photo-view-head span {
  margin-top: 4px;
  color: #6f796f;
  font-size: 13px;
}

.photo-report-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.photo-report-gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 18px;
  background: #fff;
}

.photo-gallery-image {
  min-height: 180px;
}

.photo-report-gallery figcaption {
  display: grid;
  gap: 4px;
  padding: 12px;
  color: #6f796f;
  font-size: 12px;
}

.photo-report-gallery figcaption strong {
  color: #1f2328;
}

.photo-export-grid .checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(31, 35, 40, .08);
  border-radius: 14px;
  background: #f8faf8;
}

@media (max-width: 1180px) {
  .photo-reports-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .photo-reports-title,
  .photo-report-foot,
  .photo-view-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .photo-reports-toolbar,
  .photo-upload-item,
  .photo-image-fields,
  .photo-report-gallery,
  .photo-export-grid .checkbox-grid {
    grid-template-columns: 1fr;
  }
}

body[data-theme="dark"] .photo-reports-head,
body[data-theme="dark"] .photo-report-card,
body[data-theme="dark"] .photo-upload-item,
body[data-theme="dark"] .photo-report-gallery figure,
body[data-theme="dark"] .photo-report-drawer,
body[data-theme="dark"] .photo-drawer-gallery figure {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .055);
}

body[data-theme="dark"] .photo-reports-title h2,
body[data-theme="dark"] .photo-report-body h3,
body[data-theme="dark"] .photo-upload-head strong,
body[data-theme="dark"] .photo-view-head strong,
body[data-theme="dark"] .photo-report-gallery figcaption strong,
body[data-theme="dark"] .photo-report-drawer-head h2,
body[data-theme="dark"] .photo-drawer-gallery figcaption strong {
  color: #f5f6f7;
}

body[data-theme="dark"] .photo-reports-toolbar input,
body[data-theme="dark"] .photo-reports-toolbar select,
body[data-theme="dark"] .photo-upload-dropzone,
body[data-theme="dark"] .photo-export-grid .checkbox-grid {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .05);
  color: #f5f6f7;
}

body[data-theme="dark"] .photo-report-drawer-head,
body[data-theme="dark"] .photo-report-drawer-actions {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(31, 35, 40, .86);
}

@media (max-width: 720px) {
  .photo-report-drawer {
    top: 118px;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
  }

  .photo-drawer-gallery figure,
  .photo-drawer-details {
    grid-template-columns: 1fr;
  }
}

/* CAETÉ dark mode refinement */
body[data-theme="dark"] {
  --bg: #080d0c;
  --panel: #111715;
  --ink: #f4f7f2;
  --muted: #9aa59b;
  --line: rgba(255, 255, 255, .09);
  --primary: #7aa67e;
  --primary-dark: #98bd9a;
  --accent: #e8e2d8;
  --input-bg: #0c1211;
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
  --sidebar-bg: rgba(9, 14, 13, .88);
  --sidebar-soft: rgba(122, 166, 126, .1);
  --sidebar-hover: rgba(122, 166, 126, .15);
  --sidebar-text: rgba(244, 247, 242, .76);
  --sidebar-strong: #f4f7f2;
  --sidebar-muted: rgba(244, 247, 242, .48);
  background:
    radial-gradient(circle at 18% -12%, rgba(122, 166, 126, .16), transparent 34%),
    radial-gradient(circle at 88% 4%, rgba(232, 226, 216, .06), transparent 32%),
    linear-gradient(180deg, #0b100f 0%, #080d0c 52%, #060908 100%);
  color: var(--ink);
}

body[data-theme="dark"] .main {
  background: transparent;
}

body[data-theme="dark"] .sidebar {
  border-color: rgba(255, 255, 255, .08);
  background:
    linear-gradient(180deg, rgba(16, 22, 20, .92), rgba(8, 13, 12, .94));
  box-shadow: 18px 0 60px rgba(0, 0, 0, .28);
}

body[data-theme="dark"]:not(.login-mode) .topbar {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body[data-theme="dark"]:not(.login-mode) .topbar h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] strong {
  color: #f4f7f2;
}

body[data-theme="dark"]:not(.login-mode) .topbar p,
body[data-theme="dark"] .muted,
body[data-theme="dark"] .photo-reports-title p,
body[data-theme="dark"] .photo-report-meta,
body[data-theme="dark"] .photo-report-foot,
body[data-theme="dark"] .photo-report-drawer-head p,
body[data-theme="dark"] .photo-drawer-gallery figcaption,
body[data-theme="dark"] .photo-drawer-gallery figcaption small {
  color: rgba(244, 247, 242, .58);
}

body[data-theme="dark"] .panel,
body[data-theme="dark"] .card,
body[data-theme="dark"] .project-hero-card,
body[data-theme="dark"] .project-dashboard-card,
body[data-theme="dark"] .project-metric-card,
body[data-theme="dark"] .project-details-panel,
body[data-theme="dark"] .project-tabs,
body[data-theme="dark"] .finance-card,
body[data-theme="dark"] .finance-kpi-card,
body[data-theme="dark"] .office-ledger-head,
body[data-theme="dark"] .office-ledger-panel,
body[data-theme="dark"] .ledger-summary,
body[data-theme="dark"] .workspace-shell,
body[data-theme="dark"] .schedule-board,
body[data-theme="dark"] .month-timeline,
body[data-theme="dark"] dialog,
body[data-theme="dark"] .modal {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(17, 23, 21, .82);
  color: #f4f7f2;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .topbar-search,
body[data-theme="dark"] .ledger-date-range {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(7, 12, 11, .72);
  color: #f4f7f2;
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: rgba(244, 247, 242, .42);
}

body[data-theme="dark"] .ghost,
body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .icon-button,
body[data-theme="dark"]:not(.login-mode) .topbar-profile {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .055);
  color: #c9d6c8;
}

body[data-theme="dark"] .ghost:hover,
body[data-theme="dark"] .theme-toggle:hover,
body[data-theme="dark"]:not(.login-mode) .topbar-profile:hover,
body[data-theme="dark"] .topbar-profile-dropdown[open] .topbar-profile {
  background: rgba(122, 166, 126, .14);
  color: #f4f7f2;
}

body[data-theme="dark"] button:not(.ghost):not(.icon):not(.icon-button):not(.drawer-close) {
  background: #46614e;
  color: #ffffff;
}

body[data-theme="dark"] button:not(.ghost):not(.icon):not(.icon-button):not(.drawer-close):hover {
  background: #58775f;
}

body[data-theme="dark"] .photo-reports-head {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  padding-inline: 0;
}

body[data-theme="dark"] .photo-module-icon {
  background: rgba(122, 166, 126, .14);
  color: #8fc494;
}

body[data-theme="dark"] .photo-report-card {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(17, 23, 21, .82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

body[data-theme="dark"] .photo-report-card:hover,
body[data-theme="dark"] .photo-report-card:focus-visible {
  border-color: rgba(122, 166, 126, .28);
  box-shadow: 0 28px 84px rgba(0, 0, 0, .34);
}

body[data-theme="dark"] .photo-report-cover::after {
  background: linear-gradient(180deg, rgba(8, 13, 12, .05), rgba(8, 13, 12, .72));
}

body[data-theme="dark"] .photo-report-tags span,
body[data-theme="dark"] .tag.ok,
body[data-theme="dark"] .tag.neutral {
  background: rgba(122, 166, 126, .16);
  color: #b8d8b9;
}

body[data-theme="dark"] .photo-report-foot,
body[data-theme="dark"] .photo-report-drawer-head,
body[data-theme="dark"] .photo-report-drawer-actions,
body[data-theme="dark"] .modal header,
body[data-theme="dark"] .modal footer {
  border-color: rgba(255, 255, 255, .08);
}

body[data-theme="dark"] .photo-report-drawer {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(13, 18, 17, .96);
  box-shadow: -24px 0 86px rgba(0, 0, 0, .44);
}

body[data-theme="dark"] .photo-report-drawer-head,
body[data-theme="dark"] .photo-report-drawer-actions {
  background: rgba(13, 18, 17, .92);
}

body[data-theme="dark"] .photo-drawer-gallery figure,
body[data-theme="dark"] .photo-upload-item,
body[data-theme="dark"] .document-upload-preview,
body[data-theme="dark"] .photo-export-grid .checkbox-grid {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .045);
}

body[data-theme="dark"] .photo-upload-dropzone,
body[data-theme="dark"] .document-upload-dropzone {
  border-color: rgba(122, 166, 126, .28);
  background: rgba(122, 166, 126, .06);
}

body[data-theme="dark"] .topbar-account-menu,
body[data-theme="dark"] .profile-dropdown .account-menu {
  border-color: rgba(255, 255, 255, .09);
  background: rgba(13, 18, 17, .96);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .42);
}

body.client-mode .sidebar,
body.client-mode .topbar {
  display: none !important;
}

body.client-mode .main {
  margin-left: 0 !important;
  padding: 0 !important;
}

/* Intelligent onboarding */
#onboarding-layer {
  position: fixed;
  inset: 0;
  z-index: 2100;
  pointer-events: none;
}

.onboarding-welcome-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 20, 18, .72);
  backdrop-filter: blur(6px);
  pointer-events: auto;
}

.onboarding-welcome {
  width: min(520px, 100%);
  padding: 38px;
  border: 1px solid rgba(70, 97, 78, .15);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 34px 100px rgba(15, 24, 19, .28);
  color: #1f2328;
  animation: onboarding-rise .24s ease-out;
}

.onboarding-brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 24px;
  border-radius: 14px;
  background: #eef2ed;
  color: #46614e;
}

.onboarding-welcome h2,
.onboarding-tour-card h2,
.onboarding-mission-drawer h2,
.academy-page h2 {
  margin: 8px 0 10px;
  letter-spacing: 0;
  color: #1f2328;
}

.onboarding-welcome p,
.onboarding-tour-card p,
.onboarding-mission-drawer p,
.academy-page p {
  color: #697169;
  line-height: 1.55;
}

.onboarding-eyebrow {
  color: #46614e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.onboarding-welcome-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
}

.onboarding-spotlight {
  position: fixed;
  z-index: 2101;
  border: 2px solid rgba(145, 190, 151, .9);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(12, 17, 15, .76), 0 0 0 6px rgba(122, 166, 126, .16), 0 12px 34px rgba(0, 0, 0, .2);
  transition: inset .22s ease, width .22s ease, height .22s ease;
  pointer-events: none;
}

.onboarding-tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  pointer-events: auto;
}

.onboarding-tour-card {
  position: fixed;
  z-index: 2102;
  width: min(390px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid rgba(70, 97, 78, .16);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(5, 12, 8, .3);
  color: #1f2328;
  pointer-events: auto;
  animation: onboarding-rise .2s ease-out;
}

.onboarding-tour-meta,
.onboarding-tour-card footer,
.onboarding-mission-drawer header,
.onboarding-mission-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.onboarding-tour-meta {
  color: #7b837c;
  font-size: 12px;
  font-weight: 650;
}

.onboarding-skip {
  padding: 0;
  border: 0;
  background: transparent !important;
  color: #697169 !important;
}

.onboarding-progress {
  height: 5px;
  margin: 12px 0 20px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebe6;
}

.onboarding-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #46614e;
  transition: width .25s ease;
}

.onboarding-tour-card footer {
  margin-top: 22px;
}

.onboarding-tour-card footer button {
  min-width: 92px;
}

.onboarding-mission-drawer {
  position: fixed;
  top: var(--onboarding-drawer-top, 112px);
  right: 18px;
  bottom: 18px;
  z-index: 2103;
  display: flex;
  flex-direction: column;
  width: min(430px, calc(100vw - 36px));
  max-height: calc(100dvh - var(--onboarding-drawer-top, 112px) - 18px);
  padding: 24px;
  overflow-y: auto;
  border: 1px solid rgba(70, 97, 78, .14);
  border-radius: 20px;
  background: #fff;
  box-shadow: -22px 18px 80px rgba(16, 25, 20, .22);
  color: #1f2328;
  pointer-events: auto;
  animation: onboarding-drawer .25s ease-out;
}

.onboarding-mission-drawer header {
  padding-bottom: 18px;
  border-bottom: 1px solid #e8ebe7;
}

.onboarding-mission-progress {
  margin: 22px 0 8px;
  padding: 16px;
  border-radius: 12px;
  background: #f5f6f4;
}

.onboarding-mission-progress strong {
  color: #46614e;
  font-size: 22px;
}

.onboarding-mission-progress span {
  color: #7a827b;
  font-size: 12px;
}

.onboarding-mission-progress .onboarding-progress {
  margin: 12px 0 0;
}

.onboarding-mission-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.onboarding-mission {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid #e5e9e4;
  border-radius: 13px;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.onboarding-mission:hover {
  border-color: rgba(70, 97, 78, .3);
  transform: translateY(-1px);
}

.onboarding-mission.complete {
  background: #f2f6f1;
}

.onboarding-mission-check {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef2ed;
  color: #46614e;
  font-size: 17px;
}

.onboarding-mission.complete .onboarding-mission-check {
  background: #46614e;
  color: #fff;
  animation: onboarding-check .28s ease-out;
}

.onboarding-mission h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 14px;
}

.onboarding-mission h3 small {
  padding: 2px 6px;
  border-radius: 999px;
  background: #eee8df;
  color: #756b5f;
  font-size: 9px;
  text-transform: uppercase;
}

.onboarding-mission p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.onboarding-mission button,
.onboarding-done-label {
  white-space: nowrap;
}

.onboarding-done-label {
  color: #46614e;
  font-size: 11px;
  font-weight: 700;
}

.onboarding-complete {
  display: grid;
  place-items: center;
  flex: 1;
  align-content: center;
  padding: 34px 12px;
  text-align: center;
}

.onboarding-complete > i {
  margin-bottom: 16px;
  color: #46614e;
  font-size: 58px;
}

.onboarding-confetti {
  position: fixed;
  top: 46%;
  right: 210px;
  z-index: 2200;
}

.onboarding-confetti i {
  position: absolute;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  background: hsl(calc(var(--i) * 39deg), 45%, 55%);
  animation: onboarding-confetti 1s ease-out forwards;
  transform: rotate(calc(var(--i) * 31deg));
}

.tutorial-menu-grid {
  display: grid;
  gap: 10px;
}

.tutorial-menu-option {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px;
  border: 1px solid #e4e8e3;
  border-radius: 12px;
  background: #fff !important;
  color: #1f2328 !important;
  text-align: left;
}

.tutorial-menu-option:hover {
  border-color: #9eafa1;
  background: #f4f7f3 !important;
}

.tutorial-menu-option > i {
  color: #46614e;
  font-size: 20px;
  text-align: center;
}

.tutorial-menu-option span {
  display: grid;
  gap: 3px;
}

.tutorial-menu-option small {
  color: #7b837c;
  font-weight: 400;
}

.academy-page {
  display: grid;
  gap: 18px;
}

.academy-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.academy-hero h2 {
  font-size: 28px;
}

.academy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 14px;
}

.academy-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 16px 45px rgba(30, 42, 34, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}

.academy-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 55px rgba(30, 42, 34, .1);
}

.academy-card > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eef2ed;
  color: #46614e;
  font-size: 19px;
}

.academy-card > small {
  position: absolute;
  top: 22px;
  right: 22px;
  color: #a1a8a2;
}

.academy-card h3 {
  margin: 24px 0 8px;
}

.academy-card p {
  flex: 1;
  font-size: 13px;
}

.academy-card button {
  align-self: flex-start;
}

body[data-theme="dark"] .onboarding-welcome,
body[data-theme="dark"] .onboarding-tour-card,
body[data-theme="dark"] .onboarding-mission-drawer {
  border-color: rgba(255, 255, 255, .1);
  background: #111715;
  color: #f4f7f2;
}

body[data-theme="dark"] .onboarding-welcome h2,
body[data-theme="dark"] .onboarding-tour-card h2,
body[data-theme="dark"] .onboarding-mission-drawer h2,
body[data-theme="dark"] .academy-page h2 {
  color: #f4f7f2;
}

body[data-theme="dark"] .onboarding-mission-progress,
body[data-theme="dark"] .onboarding-mission,
body[data-theme="dark"] .tutorial-menu-option,
body[data-theme="dark"] .academy-card > span {
  border-color: rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .055) !important;
  color: #f4f7f2 !important;
}

body[data-theme="dark"] .onboarding-mission.complete {
  background: rgba(122, 166, 126, .12) !important;
}

body[data-theme="dark"] .onboarding-mission-drawer header {
  border-color: rgba(255, 255, 255, .09);
}

@keyframes onboarding-rise {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes onboarding-drawer {
  from { opacity: 0; transform: translateX(34px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes onboarding-check {
  0% { transform: scale(.76); }
  70% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes onboarding-confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate(calc((var(--i) - 7) * 18px), calc(90px + (var(--i) % 3) * 20px)) rotate(280deg); }
}

/* Users: premium team and access management */
.users-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 4px 2px;
}
.users-page-head h2 {
  margin: 7px 0 5px;
  font-size: clamp(25px, 2vw, 32px);
  line-height: 1.1;
  letter-spacing: 0;
}
.users-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.users-page-head > button,
.users-page-head > button:hover {
  min-height: 42px;
  padding-inline: 17px;
}
.users-page-head button i,
.users-toolbar-actions button i {
  margin-right: 7px;
}
.users-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.users-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.users-metrics article {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(31, 35, 40, .035);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.users-metrics article:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
  box-shadow: 0 12px 28px rgba(31, 35, 40, .065);
}
.users-metric-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent);
  background: color-mix(in srgb, var(--sage) 16%, var(--panel));
  font-size: 17px;
}
.users-metric-icon.positive {
  color: #2f7446;
  background: color-mix(in srgb, #7aa67e 20%, var(--panel));
}
.users-metric-icon.warm {
  color: #89672c;
  background: color-mix(in srgb, var(--caete-sand) 65%, var(--panel));
}
.users-metrics article > div { min-width: 0; }
.users-metrics small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.users-metrics strong {
  display: block;
  margin: 3px 0 1px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}
.users-metrics p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.users-table-panel {
  overflow: hidden;
  padding: 0;
  border-radius: 18px;
}
.users-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.users-table-toolbar h2 {
  margin: 0 0 3px;
  font-size: 17px;
  letter-spacing: 0;
}
.users-table-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.users-toolbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.users-search {
  width: min(360px, 34vw);
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--input-bg);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.users-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 11%, transparent);
}
.users-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}
.users-toolbar-actions button { min-height: 40px; }
.users-table-wrap { overflow-x: auto; }
.users-premium-table {
  min-width: 1040px;
  table-layout: fixed;
}
.users-premium-table th {
  padding: 11px 16px;
  background: color-mix(in srgb, var(--sage) 6%, var(--panel));
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .06em;
  cursor: default;
}
.users-premium-table th:nth-child(1) { width: 24%; }
.users-premium-table th:nth-child(2) { width: 19%; }
.users-premium-table th:nth-child(3) { width: 18%; }
.users-premium-table th:nth-child(4) { width: 24%; }
.users-premium-table th:nth-child(5) { width: 8%; }
.users-premium-table th:nth-child(6) { width: 7%; }
.users-premium-table td {
  padding: 15px 16px;
  background: var(--panel);
}
.users-premium-table tbody tr:last-child td { border-bottom: 0; }
.users-premium-table tbody tr:hover td {
  background: color-mix(in srgb, var(--sage) 7%, var(--panel));
}
.users-member-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}
.users-avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 12%, var(--line));
  border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--sage) 18%, var(--panel));
  font-size: 12px;
  font-weight: 750;
}
.users-member-copy,
.users-detail-stack {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.users-member-copy strong,
.users-detail-stack strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.users-member-copy small,
.users-detail-stack small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.users-member-copy small,
.users-detail-stack strong {
  display: flex;
  align-items: center;
  gap: 5px;
}
.users-role-badge {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--sage) 13%, var(--panel));
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.users-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.users-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted) 12%, transparent);
}
.users-status.is-active { color: #2f7446; }
.users-status.is-active i {
  background: #58a36a;
  box-shadow: 0 0 0 3px color-mix(in srgb, #58a36a 14%, transparent);
}
.users-status.is-inactive { color: #9a5555; }
.users-status.is-inactive i {
  background: #c96a6a;
  box-shadow: 0 0 0 3px color-mix(in srgb, #c96a6a 14%, transparent);
}
.users-premium-table .clickable-row td:last-child {
  width: auto;
  min-width: 0;
}
.users-premium-table .table-inline-actions {
  min-width: 76px;
  gap: 7px;
}
.users-premium-table .caete-icon-action {
  width: 32px;
  height: 32px;
}
.users-actions-heading { text-align: center; }
.users-empty-row td {
  height: 210px;
  text-align: center;
}
.users-empty-row td > i,
.users-empty-row td > strong,
.users-empty-row td > span { display: block; }
.users-empty-row td > i { margin-bottom: 10px; color: var(--muted); font-size: 25px; }
.users-empty-row td > span { margin-top: 5px; color: var(--muted); font-size: 12px; }

body[data-theme="dark"] .users-metrics article,
body[data-theme="dark"] .users-table-panel {
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}

@media (max-width: 1180px) {
  .users-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .users-page-head,
  .users-table-toolbar { align-items: stretch; flex-direction: column; }
  .users-page-head > button { width: 100%; }
  .users-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .users-metrics article { padding: 14px; }
  .users-metric-icon { flex-basis: 36px; width: 36px; height: 36px; }
  .users-toolbar-actions { width: 100%; }
  .users-search { flex: 1 1 auto; min-width: 0; }
  .users-toolbar-actions .ghost { flex: 0 0 42px; padding-inline: 0; }
  .users-toolbar-actions .ghost span { display: none; }
  .users-toolbar-actions button i { margin-right: 0; }
  .users-table-wrap { overflow: visible; padding: 10px; }
  .users-premium-table,
  .users-premium-table tbody { min-width: 0; display: block; }
  .users-premium-table thead { display: none; }
  .users-premium-table tbody { display: grid; gap: 10px; }
  .users-premium-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
  }
  .users-premium-table tbody td {
    min-width: 0;
    display: block;
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }
  .users-premium-table tbody td::before {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .users-premium-table tbody td:first-child,
  .users-premium-table tbody td:nth-child(4) { grid-column: 1 / -1; }
  .users-premium-table tbody td:nth-last-child(-n + 2) { border-bottom: 0; }
  .users-premium-table .table-inline-actions { justify-content: flex-start; margin: 0; }
  .users-empty-row { display: block !important; }
  .users-empty-row td { height: auto; }
  .users-empty-row td::before { display: none; }
}

@media (max-width: 480px) {
  .users-metrics { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .tutorial-button span { display: none; }
  .onboarding-welcome { padding: 28px 22px; }
  .onboarding-welcome-actions { align-items: stretch; flex-direction: column-reverse; }
  .onboarding-mission-drawer {
    top: var(--onboarding-drawer-top, 96px);
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100dvh - var(--onboarding-drawer-top, 96px) - 10px);
    padding: 18px;
  }
  .onboarding-mission { grid-template-columns: 36px minmax(0, 1fr); }
  .onboarding-mission button,
  .onboarding-done-label { grid-column: 2; justify-self: start; }
  .academy-hero { align-items: flex-start; flex-direction: column; padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .onboarding-welcome,
  .onboarding-tour-card,
  .onboarding-mission-drawer,
  .onboarding-confetti i,
  .onboarding-mission.complete .onboarding-mission-check {
    animation: none !important;
  }
}

/* Shared CAETE confirmation dialog */
.caete-confirm-modal {
  width: min(470px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(31, 35, 40, .24);
}

.caete-confirm-modal::backdrop {
  background: rgba(31, 35, 40, .52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.caete-confirm-body {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding: 26px 26px 22px;
}

.caete-confirm-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: color-mix(in srgb, var(--danger) 11%, var(--panel));
  color: var(--danger);
  font-size: 20px;
}

.caete-confirm-modal.is-neutral .caete-confirm-icon {
  background: color-mix(in srgb, var(--primary) 11%, var(--panel));
  color: var(--primary);
}

.caete-confirm-copy {
  min-width: 0;
}

.caete-confirm-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--danger);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.caete-confirm-modal.is-neutral .caete-confirm-eyebrow {
  color: var(--primary);
}

.caete-confirm-copy h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.caete-confirm-copy p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.caete-confirm-copy small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.caete-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, var(--bg));
}

.caete-confirm-actions button {
  min-width: 106px;
}

.caete-confirm-actions .secondary {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}

.caete-confirm-actions .secondary:hover {
  background: color-mix(in srgb, var(--ink) 5%, var(--panel));
}

.caete-confirm-actions .danger {
  background: var(--danger);
  color: #fff;
}

.caete-confirm-actions .danger:hover {
  background: color-mix(in srgb, var(--danger) 84%, #1f2328);
}

.caete-confirm-actions button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 28%, transparent);
  outline-offset: 2px;
}

body[data-theme="dark"] .caete-confirm-modal {
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

@media (max-width: 520px) {
  .caete-confirm-body {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 22px 18px 18px;
  }

  .caete-confirm-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .caete-confirm-actions {
    padding: 14px 18px 18px;
  }

  .caete-confirm-actions button {
    flex: 1;
    min-width: 0;
  }
}

/* Project budget spreadsheet */
.budget-sheet-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.budget-sheet-kpi {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 96px;
  padding: 16px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(31, 35, 40, .035);
}

.budget-sheet-kpi-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 9%, var(--panel));
}

.budget-sheet-kpi > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.budget-sheet-kpi small,
.budget-sheet-kpi span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-sheet-kpi strong {
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(16px, 1.15vw, 21px);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-sheet-panel {
  overflow: hidden;
  padding: 0;
}

.budget-sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.budget-sheet-toolbar h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.budget-sheet-toolbar p {
  margin: 0;
}

.budget-sheet-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(780px, 64%);
}

.budget-sheet-toolbar-actions > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  white-space: nowrap;
}

.budget-sheet-toolbar-actions .is-active {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--panel));
}

.budget-sheet-search {
  position: relative;
  display: flex;
  flex: 1 1 330px;
  align-items: center;
  min-width: 210px;
}

.budget-sheet-search i {
  position: absolute;
  left: 13px;
  z-index: 1;
  color: var(--muted);
}

.budget-sheet-search input {
  width: 100%;
  min-height: 38px;
  padding-left: 38px;
}

.budget-sheet-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--primary) 3%, var(--panel));
}

.budget-sheet-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.budget-sheet-filters label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.budget-sheet-filters input,
.budget-sheet-filters select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
}

.budget-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
}

.budget-filter-chips > span {
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--panel));
  font-size: 11px;
}

.budget-filter-chips button {
  min-height: auto;
  padding: 5px 7px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}

.budget-sheet-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-color: color-mix(in srgb, var(--primary) 35%, transparent) transparent;
}

.budget-sheet-table {
  width: 100%;
  min-width: 1450px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.budget-sheet-table th,
.budget-sheet-table td {
  padding: 11px 10px;
  vertical-align: middle;
}

.budget-sheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  color: var(--muted);
  background: var(--panel);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.budget-sheet-table th:nth-child(1) { width: 84px; }
.budget-sheet-table th:nth-child(2) { width: 230px; }
.budget-sheet-table th:nth-child(3) { width: 170px; }
.budget-sheet-table th:nth-child(4) { width: 170px; }
.budget-sheet-table th:nth-child(5) { width: 105px; }
.budget-sheet-table th:nth-child(6) { width: 68px; }
.budget-sheet-table th:nth-child(7) { width: 74px; }
.budget-sheet-table th:nth-child(8) { width: 120px; }
.budget-sheet-table th:nth-child(9) { width: 76px; }
.budget-sheet-table th:nth-child(10) { width: 128px; }
.budget-sheet-table th:nth-child(11) { width: 110px; }
.budget-sheet-table th:nth-child(12) { width: 154px; }

.budget-sheet-table .sticky-code {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--panel);
}

.budget-sheet-table thead .sticky-code,
.budget-sheet-table thead .sticky-actions {
  z-index: 5;
}

.budget-sheet-table .sticky-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--panel);
  box-shadow: -8px 0 14px -14px rgba(31, 35, 40, .6);
}

.budget-category-row td {
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--category-color, var(--primary)) 8%, var(--panel));
}

.budget-category-row button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  gap: 9px;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.budget-category-row button:hover {
  background: color-mix(in srgb, var(--category-color, var(--primary)) 5%, transparent);
  transform: none;
}

.budget-category-row button > span:not(.budget-category-dot),
.budget-category-row button > em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.budget-category-row button > b {
  font-size: 12px;
}

.budget-category-spacer {
  flex: 1;
}

.budget-category-dot,
.budget-category-badge > span {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--category-color, var(--primary));
}

.category-color-0 { --category-color: #46614e; }
.category-color-1 { --category-color: #7aa67e; }
.category-color-2 { --category-color: #4f7894; }
.category-color-3 { --category-color: #a8754b; }
.category-color-4 { --category-color: #77648d; }
.category-color-5 { --category-color: #ad9250; }
.category-color-6 { --category-color: #78827b; }
.category-color-7 { --category-color: #8f6f68; }

.budget-item-row {
  height: 56px;
  cursor: pointer;
  transition: background-color .18s ease, box-shadow .18s ease;
}

.budget-item-row:hover,
.budget-item-row:hover .sticky-code,
.budget-item-row:hover .sticky-actions {
  background: color-mix(in srgb, var(--primary) 4%, var(--panel));
}

.budget-item-row:hover {
  box-shadow: inset 3px 0 var(--category-color, var(--primary));
}

.budget-description {
  display: grid;
  gap: 3px;
}

.budget-description strong,
.budget-description small,
.ellipsis-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-description small {
  color: var(--muted);
  font-size: 10px;
}

.budget-category-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 8px;
  gap: 6px;
  overflow: hidden;
  border-radius: 8px;
  color: var(--ink);
  background: color-mix(in srgb, var(--category-color, var(--primary)) 8%, var(--panel));
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-sheet-table .center { text-align: center; }
.budget-sheet-table .numeric { text-align: right; white-space: nowrap; }

.budget-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.budget-row-actions button {
  display: grid;
  width: 30px;
  height: 30px;
  min-height: 0;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--panel);
}

.budget-row-actions button:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, var(--panel));
}

.budget-row-actions .delete:hover {
  border-color: color-mix(in srgb, var(--danger) 34%, var(--line));
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, var(--panel));
}

.budget-category-subtotal td {
  color: var(--primary);
  background: color-mix(in srgb, var(--category-color, var(--primary)) 5%, var(--panel));
  font-size: 11px;
  font-weight: 700;
}

.budget-category-subtotal td:first-child { padding-left: 18px; }
.budget-category-subtotal span { margin-left: 8px; color: var(--muted); font-weight: 500; }

.budget-sheet-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 48px;
  color: var(--muted);
}

.budget-sheet-empty i { font-size: 28px; color: var(--primary); }
.budget-sheet-empty strong { color: var(--ink); }

.budget-sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.budget-sheet-footer > div:first-child span { margin: 0 6px; }

.budget-sheet-pagination,
.budget-sheet-pagination label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.budget-sheet-pagination select {
  min-height: 34px;
  padding: 0 28px 0 9px;
}

.budget-sheet-pagination button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 10px;
}

@media (max-width: 1500px) {
  .budget-sheet-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .budget-sheet-toolbar { align-items: flex-start; flex-direction: column; }
  .budget-sheet-toolbar-actions { width: 100%; min-width: 0; }
  .budget-sheet-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .budget-sheet-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .budget-sheet-toolbar-actions { flex-wrap: wrap; justify-content: flex-start; }
  .budget-sheet-search { flex-basis: 100%; }
  .budget-sheet-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .budget-sheet-footer { align-items: flex-start; flex-direction: column; }
  .budget-sheet-pagination { width: 100%; flex-wrap: wrap; }
}

@media (max-width: 520px) {
  .budget-sheet-kpis { grid-template-columns: 1fr; }
  .budget-sheet-toolbar-actions > button span { display: none; }
  .budget-sheet-toolbar-actions > button { width: 38px; padding: 0; }
  .budget-sheet-toolbar-actions > button:last-child { width: auto; padding: 0 14px; }
  .budget-sheet-toolbar-actions > button:last-child span { display: inline; }
  .budget-sheet-filters { grid-template-columns: 1fr; }
}

/* Project financial control summary */
.project-finance-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.project-finance-summary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 94px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgb(31 35 40 / 4%);
}

.project-finance-summary-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 9%, var(--panel));
  font-size: 17px;
}

.project-finance-summary-card > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.project-finance-summary-card small,
.project-finance-summary-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-finance-summary-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(15px, 1.15vw, 19px);
  line-height: 1.15;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-finance-summary-card.tone-success .project-finance-summary-icon {
  color: #31724a;
  background: #eaf5ed;
}

.project-finance-summary-card.tone-warning .project-finance-summary-icon {
  color: #a56910;
  background: #fff4dd;
}

body[data-theme="dark"] .project-finance-summary-card {
  background: var(--panel);
  box-shadow: none;
}

body[data-theme="dark"] .project-finance-summary-card.tone-success .project-finance-summary-icon,
body[data-theme="dark"] .project-finance-summary-card.tone-warning .project-finance-summary-icon {
  background: color-mix(in srgb, currentColor 14%, var(--panel));
}

@media (max-width: 1450px) {
  .project-finance-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .project-finance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .project-finance-summary { grid-template-columns: 1fr; }
}

/* Fixed neutral treatment for every client portal. */
.client-shell .client-card h2,
.client-shell .client-profile,
.client-shell .client-portal-topbar p,
.client-shell .client-empty-state strong {
  color: var(--client-neutral-950);
}
.client-shell .client-summary button,
.client-shell .client-timeline button,
.client-shell .client-request button,
.client-shell .client-row-actions button,
.client-shell .client-badge,
.client-shell .client-empty-state i {
  background: var(--client-neutral-100);
  color: var(--client-neutral-700);
}
.client-shell .client-timeline .done i,
.client-shell .client-module-head > button,
.client-shell .client-doc-card button,
.client-shell .client-photo-card button,
.client-shell .client-request-form button[type="submit"] {
  border-color: var(--client-neutral-800);
  background: var(--client-neutral-800);
  color: white;
}
.client-shell .client-timeline .current i {
  border-color: var(--client-neutral-700);
}
.client-shell .client-budget-head {
  background: linear-gradient(135deg, var(--client-neutral-100), white);
}
.client-shell .client-card-link,
.client-shell .client-list-card i,
.client-shell .client-money,
.client-shell .client-filter-row .active,
.client-shell .client-schedule-tabs .active {
  color: var(--client-neutral-700);
}
.client-shell .client-filter-row .active,
.client-shell .client-schedule-tabs .active {
  background: var(--client-neutral-100);
}
.client-shell .client-status,
.client-shell .client-status.pending,
.client-shell .client-status.done,
.client-shell .client-status.review,
.client-shell .client-status.danger,
.client-shell .client-badge {
  border-color: var(--client-neutral-200);
  background: var(--client-neutral-100);
  color: var(--client-neutral-700);
}
.client-shell .client-budget-actions .ghost,
.client-shell .client-doc-card i,
.client-shell .client-schedule-item > span,
.client-shell .client-photo-card button,
.client-shell .client-row-actions button,
.client-shell .client-card header button {
  border-color: var(--client-neutral-200);
  color: var(--client-neutral-700);
}
.client-shell .client-help button,
.client-shell .client-sidebar-exit:hover {
  border-color: rgb(255 255 255 / 22%);
  background: rgb(255 255 255 / 10%);
  color: white;
}
.client-shell .client-gallery-thumb,
.client-shell .client-project-cover {
  filter: grayscale(12%);
}
