/* Cinza de base, superfícies claras e acentos da Criativerso. */
html[data-theme="light"] {
  --bg: #eeedf2;
  --panel: #fff;
  --panel2: #f6f4f8;
  --text: #211a2e;
  --muted: #5b5369;
  --soft: #625a72;
  --line: #e9e4ef;
  --line2: #ded7e7;
  --os-accent: #6528af;
  --os-focus: #702ebc;
  --os-lavender: #f1e8ff;
  --os-rose: #faeaf4;
  --os-shell: #f8f7fa;
  --os-shadow: 0 9px 26px rgb(45 28 64 / 6%);
}
html[data-theme="dark"] {
  --os-accent: #d6b6ff;
  --os-focus: #d6b6ff;
  --os-lavender: #2b2040;
  --os-rose: #3a2037;
  --os-shell: #10111a;
  --os-shadow: 0 9px 26px rgb(0 0 0 / 18%);
}
[data-theme="light"] body {
  --bg: inherit;
  --text: inherit;
  --muted: inherit;
  --soft: inherit;
  background: var(--bg);
}
.app { grid-template-columns: 224px minmax(0, 1fr); }
.sidebar {
  width: 224px; padding: 19px 13px;
  border-right-color: var(--line2);
}
[data-theme="light"] .sidebar, [data-theme="light"] .topbar { background: var(--os-shell); }
.sidebar .brand { padding: 9px 8px 16px; }
.sidebar .nav-label { color: var(--muted); }
.nav button { border-radius: 12px; min-height: 40px; }
.nav .ico { border-radius: 9px; }
[data-theme="light"] .nav button.active {
  background: var(--os-lavender); color: #542291; border-color: #e6d7fa;
}
[data-theme="light"] .nav button.active .ico { background: #e6d5fc; color: #542291; }
.topbar { min-height: 62px; gap: 10px; border-bottom-color: var(--line); }
.content { max-width: 1680px; margin-inline: auto; padding: clamp(16px, 2.4vw, 36px); }
.page-head h1, #dashboard .hero h1 {
  letter-spacing: -.045em; font-weight: 760; line-height: 1.04;
}
.page-head h1 { font-size: clamp(26px, 3vw, 42px); }
#dashboard .hero h1 { font-size: clamp(34px, 4.6vw, 65px); }
#dashboard .hero {
  min-height: 0; padding: clamp(19px, 3.1vw, 42px);
  border: 1px solid var(--line2); border-radius: 27px;
  box-shadow: var(--os-shadow);
}
[data-theme="light"] #dashboard .hero {
  background: radial-gradient(ellipse at 96% -20%, #eed7f8 0%, transparent 58%),
    radial-gradient(ellipse at 70% 120%, #ebe1ff 0%, transparent 55%), var(--panel) !important;
}
#dashboard .hero p, .page-head p { max-width: 68ch; font-size: 13px; line-height: 1.55; }
#dashboard .hero .eyebrow { color: var(--os-accent); }
#dashboard .command { max-width: 650px; border-radius: 16px; }
#dashboard .quick { margin-top: 12px; }
.panel, .metric, .client, .deal, .member, .integration-card {
  border-radius: 20px;
  box-shadow: var(--os-shadow);
}
.panel-head h2, .os-panel-head h2, .operation h2 { letter-spacing: -.035em; }
.primary, .secondary, .tiny, .quick button, .tabs button, .filter-pill, .badge {
  border-radius: 999px;
}
.primary, .secondary { min-height: 38px; }
.tabs { gap: 6px; }
.tabs button { min-height: 35px; padding-inline: 13px; }
.filter-pill { min-height: 32px; }
[data-theme="light"] .panel, [data-theme="light"] .metric,
[data-theme="light"] .client, [data-theme="light"] .deal, [data-theme="light"] .member,
[data-theme="light"] .integration-card { background: var(--panel) !important; border-color: var(--line2); }
.os-dashboard-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .42fr);
  gap: 16px; align-items: start; margin-block: 19px;
}
.os-dashboard-layout .operation, .os-dashboard-aside .os-section { margin: 0; }
.os-dashboard-aside { display: grid; gap: 12px; min-width: 0; }
.os-dashboard-aside .os-capacity-grid { grid-template-columns: minmax(0, 1fr); }
.os-dashboard-layout .operation-heading { align-items: end; }
.os-dashboard-layout .operation-heading h2 { font-size: clamp(21px, 2.3vw, 31px); }
.operation-stat {
  position: relative; border: 1px solid var(--line2); border-radius: 17px;
  min-height: 89px; padding: 13px 12px; box-shadow: var(--os-shadow);
}
.operation-stat span { font-size: 11px; line-height: 1.35; }
.operation-stat strong { font-size: clamp(26px, 3vw, 36px); font-variant-numeric: tabular-nums; letter-spacing: -.055em; }
#operationOverview .operation-stat[data-tone="today"] { background: var(--os-lavender); color: var(--os-accent); border-color: var(--line2); }
#operationOverview .operation-stat[data-tone="overdue"] { background: var(--os-rose); color: var(--text); border-color: var(--line2); }
.operation-group { border-radius: 18px; box-shadow: var(--os-shadow); }
.operation-group > header { padding: 13px 15px; }
[data-theme="light"] .operation-group > header { background: linear-gradient(95deg, #f4ecfd, #faf5fa); }
.operation-group-counts span { padding: 5px 8px; border-radius: 999px; }
.operation-task { border-radius: 11px; padding-block: 9px; }
.operation-task:hover { border-color: var(--os-accent); }
.os-app-card, .os-capacity-card, .os-connection-group, .os-integration-form { border-radius: 16px; }
.os-app-icon { border-radius: 13px; }
.metric strong { font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
#taskBoard.pipeline { grid-template-columns: repeat(8, minmax(245px, 1fr)); gap: 12px; }
#taskBoard .col { min-width: 245px; border-radius: 17px; border-top: 3px solid var(--line2); }
#taskBoard .col[data-os-stage="entrada"], #taskBoard .col[data-os-stage="cliente"] { border-top-color: #a777e6; }
#taskBoard .col[data-os-stage="criacao"], #taskBoard .col[data-os-stage="alteracao"] { border-top-color: #cf7abd; }
#taskBoard .task { border-radius: 15px; padding: 13px; min-height: 114px; }
[data-theme="light"] #taskBoard .col[data-os-stage="cliente"] { background: #f7f1ff !important; }
[data-theme="light"] #taskBoard .col[data-os-stage="alteracao"] { background: #fbf1f7 !important; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--os-focus); outline-offset: 3px;
}
@media (max-width: 1130px) {
  .os-dashboard-layout { grid-template-columns: minmax(0, 1fr); }
  .os-dashboard-aside { grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr)); }
}
@media (max-width: 1000px) {
  .sidebar { width: 100%; }
}
@media (max-width: 760px) {
  .content { padding-inline: 13px; }
  .sidebar .brand { padding-block: 4px 9px; }
  #dashboard .hero { border-radius: 20px; }
  #taskBoard .col { min-width: 0; }
  .operation-stat { min-height: 72px; }
}

[data-theme="light"] .mark {
  background: #eee3fc;
  border-color: #dcc8f4;
}
[data-theme="light"] .mark::before,
[data-theme="light"] .mark::after,
[data-theme="light"] .mark i { border-color: #6427ae; }
.os-personal-apps-grid { display: grid; gap: 10px; }
.os-app-icon svg { display: block; width: 25px; height: 25px; }
.os-app-setup { flex-basis: 100%; border-top: 1px solid var(--line); padding-top: 10px; }
.os-app-setup summary { cursor: pointer; font-weight: 750; color: var(--os-accent); }
.os-app-setup p { margin: 8px 0; color: var(--muted); }
.os-app-setup code { overflow-wrap: anywhere; }
.os-app-setup a { color: var(--os-accent); text-decoration: underline; }

.os-task-client-filter { position: relative; min-width: 155px; margin-right: auto; }
.os-task-client-filter summary {
  cursor: pointer; padding: 9px 12px; border: 1px solid var(--line2);
  border-radius: 12px; background: var(--panel); color: var(--text); font-weight: 700;
}
.os-task-client-filter fieldset {
  position: absolute; z-index: 17; top: 100%; left: 0;
  min-width: min(275px, 76vw); max-width: 76vw; margin: 0; padding: 9px 12px 12px;
  border: 1px solid var(--line2); border-radius: 12px; background: var(--panel);
  color: var(--text); box-shadow: var(--os-shadow);
}
.os-task-client-filter legend { padding: 0 5px; background: var(--panel); }
#osTaskClientOptions { max-height: 230px; overflow-y: auto; margin-top: 6px; }
#osTaskClientOptions label { display: flex; align-items: baseline; gap: 6px; padding: 4px 0; cursor: pointer; }
.os-agency-days > .os-agency-other { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }

#tdDescription,
.external-comment-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#tdDescription {
  margin-top: 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

#tdDescription a {
  color: inherit;
  text-decoration: underline;
}

.trello-comment-form:not(.hidden) {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line2);
  color: var(--text);
}
.trello-comment-form button { justify-self: start; }

.production-counts { margin-bottom: 16px; }
.production-counts-header, .production-counts-totals {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.production-counts-header label { color: var(--muted); }
.production-counts-header input { margin-left: 6px; }
.production-counts-totals { margin: 12px 0; justify-content: flex-start; }
.production-counts-totals > div {
  flex: 1 1 200px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--os-lavender);
  color: var(--text);
}
.production-counts-totals strong { display: block; font-size: 28px; }
.production-counts summary { cursor: pointer; }
.production-counts details p { color: var(--muted); }
.production-counts-table { overflow-x: auto; }
.production-counts-table th, .production-counts-table td { white-space: nowrap; }

.production-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:12px 0; }
.production-toolbar input[type="search"] { flex:1 1 260px; min-width:0; }
.production-toolbar [aria-pressed="true"], .kanban-tools [aria-pressed="true"] {
  color:var(--os-accent); border-color:var(--os-accent); background:var(--os-lavender);
}
.production-week, .production-calendar-scroll { overflow-x:auto; padding-bottom:12px; }
.production-week { display:grid; grid-template-columns:repeat(9,minmax(255px,1fr)); gap:12px; }
.production-day {
  min-width:0; min-height:190px; padding:12px; border:1px solid var(--line2);
  border-radius:16px; background:var(--panel2);
}
.production-day > header, .production-calendar-day > header {
  display:flex; align-items:center; justify-content:space-between; gap:6px; margin-bottom:10px;
}
.production-day h2 { margin:0; font-size:15px; }
.production-day small { color:var(--muted); }
.production-day.today, .production-calendar-day.today { border-color:var(--os-accent); }
.production-day .task { margin-bottom:8px; }
.production-results-title { margin:12px 0; font-size:16px; }
.production-results { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(265px,100%),1fr)); gap:10px; }
.production-calendar { display:grid; grid-template-columns:repeat(7,minmax(125px,1fr)); min-width:875px; gap:6px; }
.production-calendar-weekday { padding:6px; font-size:12px; color:var(--muted); }
.production-calendar-day {
  min-height:105px; min-width:0; padding:8px; border-radius:12px; border:1px solid var(--line2); background:var(--panel2);
}
.production-calendar-day.outside { opacity:.5; }
.production-calendar-task {
  display:block; width:100%; margin:4px 0; padding:6px; text-align:left; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis; border:0; border-radius:6px;
  color:var(--text); background:var(--os-lavender); cursor:pointer;
}
.production-count-bars { padding:0; list-style:none; }
.production-count-bars li { display:grid; grid-template-columns:minmax(100px,1fr) minmax(70px,2fr) 35px; gap:10px; align-items:center; margin:7px 0; }
.production-count-bars progress { width:100%; accent-color:var(--os-accent); }
.production-sidebar-toggle { display:none; }
@media (min-width:901px) {
  .production-sidebar-toggle { display:inline-flex; }
  .app.production-sidebar-collapsed { grid-template-columns:0 minmax(0,1fr); }
  .app.production-sidebar-collapsed .sidebar { display:none; }
}
#taskBoard .task select { max-width:100%; font-size:12px; color:var(--text); background:var(--panel); }
#taskBoard .task h4 { overflow-wrap:anywhere; }

.production-previous { margin-top:12px; }
.production-previous summary { cursor:pointer; margin-bottom:10px; }
@media (min-width: 901px) { .os-agency-days { grid-template-columns: repeat(3,minmax(0,1fr)); } }
