:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  --bg: #eaf1f3;
  --surface: #fbfdfd;
  --surface-alt: #eef5f5;
  --text: #172026;
  --muted: #66737d;
  --line: #d4e0e3;
  --border: #d4e0e3;
  --primary: #16645a;
  --primary-dark: #0f4b43;
  --accent: #65d6a6;
  --ink: #10232b;
  --warning: #fff5d6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  padding: 0 16px;
  font-weight: 700;
}

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

input,
select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--text);
}

.hidden {
  display: none !important;
}

#reportsPanel .report-filters label.hidden,
#reportsPanel .report-filters label[hidden],
#reportCompanyFilterWrap.hidden,
#reportCompanyFilterWrap[hidden] {
  display: none !important;
}

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

.login-layout {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 440px);
}

.login-theme-actions {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 56px;
  background:
    linear-gradient(135deg, rgba(16, 35, 43, 0.92), rgba(22, 100, 90, 0.9)),
    radial-gradient(circle at 82% 18%, rgba(101, 214, 166, 0.24), transparent 34%),
    #10232b;
  color: #ffffff;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #dbe9e7;
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-dark);
  font-size: 28px;
}

.brand-panel h1 {
  margin: 0;
  max-width: 620px;
  font-size: 52px;
  line-height: 1;
  letter-spacing: 0;
}

.brand-panel p {
  max-width: 560px;
  color: #d8e8e5;
}

.brand-lead {
  margin: -8px 0 0;
  font-size: 18px;
  line-height: 1.55;
}

.brand-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  max-width: 680px;
}

.brand-metrics div {
  min-height: 86px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.brand-metrics strong,
.brand-metrics span {
  display: block;
}

.brand-metrics strong {
  margin-bottom: 6px;
  font-size: 18px;
}

.brand-metrics span {
  color: #c3d7d4;
  font-size: 13px;
}

.activity-preview {
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin-top: 8px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(16, 35, 43, 0.58);
}

.activity-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
}

.activity-row strong,
.activity-row span {
  display: block;
}

.activity-row strong {
  margin-bottom: 4px;
}

.activity-row span {
  color: #c3d7d4;
  font-size: 13px;
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: #65d6a6;
  box-shadow: 0 0 0 5px rgba(101, 214, 166, 0.16);
}

.secondary-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(101, 214, 166, 0.18);
}

.activity-line {
  width: 1px;
  height: 18px;
  margin-left: 5px;
  background: rgba(255, 255, 255, 0.2);
}

.muted-row {
  opacity: 0.9;
}

.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 48px;
  background: var(--surface);
}

.login-form h2 {
  margin: 0 0 8px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.message {
  min-height: 20px;
  color: #a33a25;
}

.message.success {
  color: var(--primary);
}

.dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: radial-gradient(circle at top right, rgba(22,100,90,0.08), transparent 35%), linear-gradient(180deg, #e8f0f2 0%, #dfe9ec 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  padding: 26px 20px;
  background: var(--ink);
  color: #ffffff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar h1,
.topbar h2,
.panel-header h2 {
  margin: 0;
  letter-spacing: 0;
}

.sidebar h1 {
  font-size: 30px;
  line-height: 1;
}

.sidebar nav {
  display: grid;
  align-content: start;
  gap: 6px;
}

.nav-button,
.secondary {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
  color: #dce9e7;
}

.nav-button.active,
.nav-button:hover,
.secondary:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-button.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.content {
  width: min(100%, 1480px);
  padding: 28px;
}

.topbar,
.panel,
.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(16, 35, 43, 0.07);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  background: #e8f4f1;
  color: var(--primary-dark);
  font-weight: 800;
}

.notice {
  margin-top: 16px;
  padding: 16px;
  background: var(--warning);
}

.panel {
  margin-top: 16px;
  padding: 28px;
}

.edit-panel {
  border-color: #9bb9b3;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2 {
  font-size: 25px;
}

.panel-header button,
#newCompanyButton,
#newUserButton,
#newSiteButton {
  min-height: 40px;
  border-radius: 8px;
  background: var(--primary);
}

.dashboard-company-filter {
  min-width: 260px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

.metric-card,
.dashboard-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 16px;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
  font-weight: 800;
}

.metric-card span {
  font-size: 12px;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.metric-card small {
  font-size: 13px;
  line-height: 1.3;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  gap: 14px;
  margin-top: 14px;
}

.dashboard-section {
  padding: 16px;
}

.dashboard-section-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-section h3 {
  margin: 0;
  font-size: 20px;
}

.status-overview,
.dashboard-activity {
  display: grid;
  gap: 10px;
}

.status-row {
  display: grid;
  gap: 8px;
}

.status-row div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-row strong {
  color: var(--ink);
}

.status-row span {
  color: var(--muted);
}

.status-group {
  display: grid;
  gap: 10px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.status-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.status-group-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2px;
}

.status-group-title strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-group-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.status-bar {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #edf2f4;
}

.status-bar span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
}

.status-bar .completed {
  background: #3fb383;
}

.status-bar .open {
  background: var(--accent);
}

.status-bar .draft {
  background: #8aa0ad;
}

.activity-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.activity-card div {
  display: grid;
  gap: 4px;
}

.activity-card strong {
  color: var(--ink);
}

.activity-card span {
  color: var(--muted);
}

.empty-dashboard {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.inline-form,
.user-form,
.site-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 140px 150px 120px;
  gap: 10px;
  margin-bottom: 16px;
}

.user-form {
  grid-template-columns: minmax(190px, 1fr) minmax(180px, 1fr) minmax(150px, 1fr) minmax(170px, 1fr) 190px 190px 110px;
}

.site-form {
  grid-template-columns:
    minmax(160px, 1.35fr)
    minmax(110px, .8fr)
    minmax(70px, .45fr)
    minmax(140px, 1fr)
    minmax(180px, 1.25fr)
    repeat(2, minmax(105px, .65fr))
    minmax(150px, 1fr)
    minmax(150px, 1fr)
    118px;
  align-items: end;
}

.demand-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.demand-email-toggle {
  align-content: end;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
}

.demand-email-toggle input {
  min-height: 0;
  align-self: center;
}

.demand-recipient-field {
  grid-column: span 2;
  min-width: 0;
}

.demand-recipient-field select {
  width: 100%;
  min-width: 0;
}

.demand-form textarea {
  min-height: 96px;
  resize: vertical;
}

.annotation-notepad {
  min-height: 140px;
  line-height: 1.55;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 30px,
      color-mix(in srgb, var(--line) 70%, transparent) 31px
    ),
    #ffffff;
}

.annotation-create-form {
  margin-bottom: 16px;
}

.modal-open {
  overflow: hidden;
}

.annotation-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 10, 13, 0.72);
  backdrop-filter: blur(3px);
}

.annotation-modal-card {
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 26px 30px;
  border: 1px solid color-mix(in srgb, var(--fc-primary, var(--primary)) 36%, var(--fc-line, var(--line)));
  border-radius: 14px;
  background: color-mix(in srgb, var(--fc-card, var(--card)) 92%, #001f22 8%);
  color: var(--fc-text, var(--text));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.annotation-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.annotation-modal-header h3 {
  margin: 0 0 6px;
  font-size: 24px;
  color: var(--fc-text, var(--text));
}

.annotation-modal-header p {
  margin: 0;
  color: var(--fc-muted, var(--muted));
  font-weight: 650;
}

.annotation-modal .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--fc-muted, var(--muted));
  background: transparent;
  font-size: 28px;
  line-height: 1;
}

.annotation-modal .icon-button:hover {
  color: var(--fc-text, var(--text));
  background: color-mix(in srgb, var(--fc-primary, var(--primary)) 12%, transparent);
}

.annotation-modal .annotation-create-form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.annotation-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.annotation-modal-actions button {
  min-width: 124px;
}

.annotation-share-list {
  min-height: 84px;
  max-height: 180px;
  align-content: start;
  background: #ffffff;
}

.annotation-share-list label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
}

.annotation-share-list label:hover {
  background: color-mix(in srgb, var(--primary) 7%, transparent);
}

.annotation-share-list input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
}

.annotation-share-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.annotation-card p {
  white-space: pre-wrap;
  line-height: 1.55;
}

.annotations-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.annotation-note-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--fc-line, var(--line));
  border-radius: 14px;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--fc-card, var(--card)) 92%, var(--fc-accent, var(--accent)) 8%),
      var(--fc-card, var(--card))
    );
  box-shadow: var(--fc-shadow-soft, none);
}

.annotation-note-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.annotation-note-header h3 {
  margin: 6px 0 3px;
  color: var(--fc-text, var(--text));
  font-size: 18px;
  line-height: 1.2;
}

.annotation-note-header p,
.annotation-note-footer {
  margin: 0;
  color: var(--fc-muted, var(--muted));
  font-size: 13px;
  font-weight: 650;
}

.annotation-note-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.annotation-note-actions button {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 13px;
}

.annotation-share-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--fc-line, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--fc-card, var(--card)) 88%, var(--fc-accent, var(--accent)) 12%);
}

.annotation-share-panel-title {
  color: var(--fc-text, var(--text));
  font-size: 13px;
  font-weight: 850;
}

.annotation-share-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.annotation-share-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--fc-line, var(--line));
  border-radius: 9px;
  color: var(--fc-text, var(--text));
  background: var(--fc-field, var(--field));
  cursor: pointer;
}

.annotation-share-options small {
  display: block;
  color: var(--fc-muted, var(--muted));
  font-size: 11px;
  font-weight: 700;
}

.annotation-share-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.annotation-note-text {
  width: 100%;
  min-height: 126px;
  max-height: 220px;
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
  border: 1px solid var(--fc-line, var(--line));
  border-radius: 10px;
  color: var(--fc-text, var(--text));
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 30px,
      color-mix(in srgb, var(--fc-line, var(--line)) 72%, transparent) 31px
    ),
    color-mix(in srgb, var(--fc-card, #fff) 94%, #ffffff);
}

.annotation-note-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
}

.demand-form .full-row {
  grid-column: 1 / -1;
}

.demand-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.demand-list {
  display: grid;
  gap: 14px;
}

.demand-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: var(--card);
}

.demand-card.pending {
  border-left-color: #f59e0b;
}

.demand-card.completed {
  border-left-color: #14b8a6;
}

.demand-card-main {
  display: grid;
  gap: 12px;
}

.demand-card h3 {
  margin: 10px 0 6px;
  font-size: 18px;
}

.demand-card p {
  margin: 0;
  color: var(--muted);
}

.technical-demand {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  padding: 12px 16px;
}

.technical-demand-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.technical-demand-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  min-width: 0;
}

.technical-demand-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.technical-demand-title-row h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.technical-demand-title-row strong {
  color: var(--text);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.technical-demand-title,
.technical-demand-description {
  margin-top: 4px;
}

.technical-demand-title {
  color: var(--text);
  font-weight: 800;
}

.technical-demand-description {
  font-size: 14px;
  color: var(--text);
}

.technical-demand-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 900;
}

.sequence-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--primary) 10%, var(--card));
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.priority-badge.priority-alta {
  background: #fae7e2;
  color: #9a321f;
}

.priority-badge.priority-media {
  background: #fff4d6;
  color: #8a5b00;
}

.priority-badge.priority-baixa {
  background: #dff5ec;
  color: #126348;
}

.technical-demand-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 7px;
}

.technical-demand-flow {
  display: contents;
}

.technical-demand-flow span {
  min-width: 0;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 4%, var(--card));
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.technical-demand-flow strong {
  display: block;
  margin-bottom: 1px;
  color: var(--text);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.technical-demand-gps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}

.technical-demand-gps span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 4%, var(--card));
}

.technical-demand-gps a {
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.technical-demand-gps a:hover {
  text-decoration: underline;
}

.technical-demand-actions {
  grid-column: 1;
  grid-row: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  align-self: end;
}

.technical-demand-actions button {
  min-height: 38px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
}

.technical-notifications {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.technical-notifications-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.technical-notifications-header h3 {
  margin: 0;
  font-size: 18px;
}

.technical-notification-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.technical-notification-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 4%, var(--card));
}

.technical-notification-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
}

.technical-notification-item strong {
  display: block;
  color: var(--text);
}

.technical-notification-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.notification-bell-wrap {
  position: relative;
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 42%, var(--line));
  background: color-mix(in srgb, var(--panel) 92%, #fff);
  color: var(--primary);
  box-shadow: none;
  font-weight: 800;
}

.notification-bell:hover {
  background: color-mix(in srgb, var(--primary) 8%, var(--panel));
  transform: none;
}

.notification-bell-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--primary);
  font-size: 16px;
  line-height: 1;
}

.notification-bell-count {
  position: absolute;
  top: -7px;
  right: 4px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--fc-red, #b42318);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  border: 2px solid var(--panel);
}

.notification-bell-dropdown {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 86vw);
  max-height: 520px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.notification-bell-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--text);
}

.notification-bell-header span {
  color: var(--muted);
  font-size: 12px;
}

.notification-bell-list {
  display: grid;
  gap: 8px;
}

.notification-bell-list .technical-notification-item {
  grid-template-columns: 10px minmax(0, 1fr);
}

.demand-card-attachment,
.demand-attachment-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: min(100%, 520px);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 4%, var(--card));
  color: var(--text);
  text-decoration: none;
}

.demand-card-attachment img,
.demand-attachment-card img {
  width: 120px;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.demand-card-attachment span,
.demand-attachment-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.demand-attachment-field input {
  padding-top: 9px;
}

.demand-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}

.demand-meta span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: color-mix(in srgb, var(--primary) 4%, var(--card));
  font-size: 13px;
  font-weight: 700;
}

.email-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.email-nav-group {
  display: grid;
  gap: 4px;
}

.email-nav-submenu {
  margin: 2px 0 4px 26px;
  padding-left: 12px;
}

.email-sidebar-tab {
  min-height: 36px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
}

.email-subnav {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.email-subnav-button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  box-shadow: none;
}

.email-subnav-button.active {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
  background: color-mix(in srgb, var(--primary) 12%, var(--card));
  color: var(--primary-dark);
}

.email-content {
  display: grid;
  gap: 14px;
}

.email-tab {
  display: grid;
  gap: 16px;
}

.email-tab.hidden {
  display: none;
}

.email-form-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.email-contact-form {
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
}

.email-contact-form label,
.email-contact-form #emailContactCompanyWrap {
  min-width: 0;
}

.email-contact-form input,
.email-contact-form select {
  width: 100%;
  min-width: 0;
}

.email-contact-form button {
  width: fit-content;
  min-width: 160px;
  justify-self: start;
}

.email-contact-form #cancelEmailContactEditButton {
  min-width: 150px;
}

.email-config-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.email-config-form input,
.email-config-form select,
.email-config-form textarea {
  width: 100%;
  min-width: 0;
}

.email-config-form textarea {
  min-height: 150px;
  line-height: 1.45;
}

#emailBodyTemplateInput {
  min-height: 280px;
  resize: vertical;
}

.email-save-button,
html[data-theme="light"] .email-save-button {
  width: fit-content !important;
  min-width: 150px !important;
  max-width: 180px !important;
  min-height: 40px !important;
  padding: 0 22px !important;
  justify-self: start !important;
}

.email-config-form .email-save-button {
  min-width: 120px !important;
  max-width: 140px !important;
}

.email-group-form {
  grid-template-columns: minmax(220px, 0.85fr) minmax(220px, 0.85fr) minmax(260px, 1fr);
  align-items: end;
}

.email-group-form .full-row,
.email-group-form label.full-row {
  grid-column: 1 / -1;
}

.email-tab h3 {
  margin: 0;
  color: var(--text);
}

.email-compact-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
}

.email-compact-header,
.email-compact-row {
  display: grid;
  grid-template-columns: minmax(105px, 0.8fr) minmax(110px, 0.85fr) minmax(190px, 1.25fr) minmax(110px, 0.85fr) minmax(140px, 1fr) 168px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
}

.email-compact-header {
  color: var(--muted);
  font-weight: 800;
  border-bottom: 1px solid var(--line);
}

.email-compact-row {
  min-height: 56px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.email-compact-row:last-child {
  border-bottom: 0;
}

.email-compact-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-compact-row span:first-child b {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  color: var(--primary);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.email-row-actions button {
  min-width: 76px !important;
  padding: 9px 10px !important;
  border-radius: 8px;
}

@media (max-width: 980px) {
  .email-compact-header {
    display: none;
  }

  .email-compact-row {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
  }

  .email-row-actions {
    justify-content: flex-start;
  }
}

.email-template-preview {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 6%, var(--card));
}

.email-template-preview span {
  color: var(--primary-dark);
  font-weight: 800;
}

.email-demand-preview {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 5%, var(--card));
}

.email-demand-preview pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.45;
  color: var(--text);
}

.edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.edit-form label {
  color: var(--text);
}

.edit-form .full-row {
  grid-column: 1 / -1;
}

.edit-form.site-edit-form {
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 1fr);
  align-items: end;
}

.edit-form.site-edit-form .full-row {
  grid-column: auto;
}

.edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
}

.edit-actions .secondary-action {
  background: var(--surface-alt);
  color: var(--text);
}

.edit-actions .secondary-action:hover {
  background: #dfe8ec;
}

.list {
  display: grid;
  gap: 12px;
}

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.item:hover {
  border-color: #bed0d6;
  box-shadow: 0 10px 24px rgba(16, 35, 43, 0.06);
  transform: translateY(-1px);
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  grid-column: 2;
  grid-row: 1 / span 6;
  margin-top: 0;
}

.section-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.section-tools .secondary-action {
  background: var(--surface-alt);
  color: var(--text);
}

.section-tools .secondary-action:hover {
  background: #dfe8ec;
}

.item-actions button,
.item-actions .button-link {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  background: #e8f4f1;
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 800;
}

.item-actions button:hover,
.item-actions .button-link:hover {
  background: #d6ece7;
}

.item-actions .danger {
  background: #fae7e2;
  color: #9a321f;
}

.item-actions .danger:hover {
  background: #f3d0c7;
}

.form-note {
  margin: 0;
  color: var(--muted);
}

.reminder-days,
.reminder-list {
  display: grid;
  gap: 10px;
}

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(56px, 1fr));
  gap: 8px;
}

.weekday-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
}

.weekday-grid input {
  min-height: auto;
}

.reminder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.reminder-item div {
  display: grid;
  gap: 4px;
}

.item strong {
  color: var(--ink);
  font-size: 17px;
}

.record-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.record-filters button {
  min-height: 42px;
}

.record-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-hero {
  align-items: flex-start;
}

.report-hero-text {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

.reports-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.report-query-panel,
.report-results-panel,
.report-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 7%, transparent), transparent 42%),
    var(--card);
}

.report-query-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.28fr) minmax(0, 1fr);
  align-items: end;
  gap: 16px;
  padding: 18px;
}

.report-query-panel h3,
.report-results-panel h3,
.report-card h3 {
  margin: 0;
}

.report-query-panel span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.report-filters {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr)) minmax(130px, .8fr);
  gap: 10px;
  align-items: end;
}

.report-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-results-panel {
  padding: 18px;
}

@media (max-width: 1400px) {
  .report-query-panel {
    grid-template-columns: 1fr;
  }

  .report-filters {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }
}

.report-insight-header,
.report-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.report-period-label {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

.report-metrics.compact {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.report-metric {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 5%, var(--card));
}

.report-metric span:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.report-metric strong {
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
}

.report-metric span:last-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.report-analysis-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.25fr) minmax(280px, .75fr);
  gap: 16px;
  margin-bottom: 16px;
}

.report-technical-grid {
  grid-template-columns: minmax(360px, 1fr) minmax(340px, .9fr);
}

.report-card {
  padding: 18px;
}

.report-status-overview {
  display: grid;
  gap: 14px;
}

.report-summary-list {
  display: grid;
  gap: 10px;
}

.report-summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 6%, var(--card));
}

.report-summary-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-summary-item span {
  color: var(--muted);
  font-weight: 800;
}

.report-technician-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.report-technician-item small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-justification-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.report-justification-note small,
.report-cell-note {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-table-card {
  padding-bottom: 12px;
}

.report-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.report-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.report-table th,
.report-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.report-table th {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--primary) 5%, var(--card));
}

.report-table tbody tr:hover {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.report-table tbody tr:last-child td {
  border-bottom: 0;
}

.record-card-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.record-title-group {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.record-title-group strong {
  font-size: 19px;
}

.record-code {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.record-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 8px 16px;
}

.record-details {
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.record-thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 220px));
  gap: 12px;
}

.record-thumb {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 130px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4f3;
  color: var(--primary-dark);
  text-decoration: none;
}

.record-thumb img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.record-thumb span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.record-thumb-empty {
  place-items: center;
  min-height: 150px;
  padding: 14px;
  text-align: center;
}

.record-thumb-empty span {
  position: static;
}

.record-thumb-empty strong {
  color: var(--muted);
  font-size: 14px;
}

.record-detail-grid {
  display: grid;
  gap: 5px;
}

.record-item {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.record-card-main {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.record-sync-error {
  color: var(--danger);
  font-size: 13px;
}

.record-detail-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.record-detail-grid > div,
.record-response-row,
.record-sync-error-detail {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 6%, var(--card));
}

.record-detail-grid strong,
.record-response-row strong {
  color: var(--text);
}

.record-detail-body {
  display: grid;
  gap: 12px;
}

.record-detail-toolbar {
  display: flex;
  justify-content: flex-end;
}

.record-detail-content {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 0.9fr);
  gap: 12px;
  align-items: start;
}

.record-detail-content .record-detail-grid,
.record-detail-content .record-responses {
  grid-column: 1;
}

.record-detail-content .record-detail-photos {
  grid-column: 2;
  grid-row: 1 / span 3;
}

.record-detail-content .record-sync-error-detail {
  grid-column: 1 / -1;
}

.record-detail-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 260px));
  gap: 12px;
}

.record-detail-photos .record-thumb {
  min-height: 360px;
  background: #f8fafc;
}

.record-detail-photos .record-thumb img {
  width: 100%;
  height: 360px;
  object-fit: contain;
  background: #f8fafc;
}

.record-export-menu {
  position: relative;
  display: inline-flex;
  width: fit-content;
}

.record-export-trigger {
  border: 0;
  background: transparent;
  color: #f97316;
  padding: 8px 10px;
  box-shadow: none;
}

.record-export-trigger:hover {
  background: transparent;
  color: #ea580c;
}

.record-export-options {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  display: grid;
  min-width: 150px;
  padding: 8px 0;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.record-export-options button {
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
  padding: 10px 12px;
  box-shadow: none;
  text-align: left;
  font-weight: 500;
}

.record-export-options button:hover {
  background: #f8fafc;
  color: #111827;
}

.record-responses {
  display: grid;
  gap: 10px;
}

.record-responses h3 {
  margin: 0;
  font-size: 16px;
}

.record-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.record-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.record-status.status-open {
  background: #fff4d6;
  color: #8a5b00;
}

.record-status.status-draft {
  background: #e8eef2;
  color: #52616b;
}

.record-status.status-completed {
  background: #dff5ec;
  color: #126348;
}

.item span {
  color: var(--muted);
  line-height: 1.35;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.photo-actions a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f4f1;
}

.photo-actions a:hover {
  background: #d6ece7;
  text-decoration: none;
}

.eyebrow {
  margin: 0 0 6px;
  color: inherit;
  opacity: 0.72;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .login-layout,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    gap: 16px;
  }

  .brand-panel,
  .login-form,
  .content,
  .sidebar {
    padding: 20px;
  }

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

  .brand-metrics {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .user-form {
    grid-template-columns: 1fr;
  }

  .site-form {
    grid-template-columns: 1fr;
  }

  .demand-form,
  .email-config-form,
  .demand-metrics,
  .demand-card,
  .demand-meta,
  .email-workspace {
    grid-template-columns: 1fr;
  }

  .technical-demand {
    grid-template-columns: 1fr;
  }

  .technical-demand-header,
  .technical-demand-badges {
    justify-content: flex-start;
  }

  .technical-demand-header {
    flex-direction: column;
    gap: 10px;
  }

  .technical-demand-flow {
    display: contents;
  }

  .technical-demand-info {
    grid-template-columns: 1fr;
  }

  .technical-demand-actions {
    grid-column: 1;
    grid-row: auto;
    justify-content: stretch;
  }

  .technical-demand-actions button {
    flex: 1 1 140px;
  }

  .edit-form {
    grid-template-columns: 1fr;
  }

  .record-detail-content {
    grid-template-columns: 1fr;
  }

  .record-detail-content .record-detail-grid,
  .record-detail-content .record-responses,
  .record-detail-content .record-detail-photos {
    grid-column: 1;
    grid-row: auto;
  }

  .record-filters {
    grid-template-columns: 1fr;
  }

  .reports-workspace,
  .report-query-panel,
  .report-analysis-grid,
  .report-filters,
  .report-metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-metrics,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-company-filter {
    width: 100%;
  }

  .topbar,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .item {
    grid-template-columns: 1fr;
  }

  .item-actions {
    grid-column: 1;
    grid-row: auto;
    margin-top: 8px;
  }

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

  .record-thumbs {
    grid-template-columns: 1fr;
  }

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

  .reminder-item {
    align-items: stretch;
    flex-direction: column;
  }
}

.checklist-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0;
}

.checklist-form textarea,
.edit-form textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  min-height: 180px;
  padding: 12px;
  resize: vertical;
}

.checkbox-label {
  align-items: center;
  display: flex;
  gap: 8px;
}

.technical-demand-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.technical-demand-options legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.technical-demand-options .checkbox-label {
  min-height: 28px;
  font-weight: 700;
}

.full-row {
  grid-column: 1 / -1;
}

.checklist-builder-header {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px;
}

.checklist-builder-header div {
  display: grid;
  gap: 4px;
}

.checklist-builder-header span {
  color: var(--muted);
  font-size: 0.9rem;
}

.checklist-descriptions-list {
  display: grid;
  gap: 12px;
}

.checklist-description-row {
  align-items: end;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 14px;
}

.checklist-description-text {
  display: grid;
  gap: 6px;
}

.checklist-photo-required {
  margin-bottom: 11px;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .checklist-builder-header,
  .checklist-description-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .checklist-builder-header {
    flex-direction: column;
  }

  .checklist-photo-required {
    margin-bottom: 0;
  }
}


.checklist-item-row {
  align-items: start;
  grid-template-columns: auto minmax(240px, 1.2fr) minmax(140px, 0.8fr) repeat(3, auto) auto;
}

.checklist-item-number {
  align-items: center;
  background: rgba(15, 112, 92, 0.08);
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  margin-top: 24px;
  width: 32px;
}

.checklist-response-preview {
  border: 1px dashed var(--border);
  border-radius: 12px;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
}

.checklist-response-preview strong {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.required {
  color: #dc2626;
}

@media (max-width: 1100px) {
  .checklist-item-row {
    grid-template-columns: 1fr;
  }

  .checklist-item-number {
    margin-top: 0;
  }
}

.checklist-description-content {
  display: grid;
  gap: 12px;
  flex: 1;
}

.checklist-description-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.checklist-responses-block {
  border: 1px solid #d8e2ea;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbfd;
  display: grid;
  gap: 10px;
}

.checklist-responses-title {
  display: grid;
  gap: 4px;
}

.checklist-responses-title span {
  color: #5f6f7b;
  font-size: 0.88rem;
}

.checklist-responses-list {
  display: grid;
  gap: 8px;
}

.checklist-response-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
}

.checklist-response-row input[type="text"] {
  min-width: 0;
}

.checklist-response-photo,
.checklist-response-dialog {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .checklist-response-row {
    grid-template-columns: 1fr;
  }

  .checklist-description-options {
    display: grid;
  }
}

.inline-field {
  display: contents;
}


.permission-box, .checklist-photo-flow {
  border: 1px solid #d8e1e6;
  border-radius: 14px;
  padding: 14px 16px;
  background: #f8fbfb;
  display: grid;
  gap: 10px;
}
.permission-box strong, .checklist-photo-flow strong { color: #0f2c33; }
.permission-box label, .checklist-photo-flow label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334b55;
  font-weight: 600;
}
.two-factor-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--fc-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--fc-primary) 6%, var(--fc-card));
}
.two-factor-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--fc-primary);
}
.two-factor-toggle span {
  display: grid;
  gap: 4px;
}
.two-factor-toggle strong {
  color: var(--fc-text);
  font-size: 14px;
}
.two-factor-toggle small {
  color: var(--fc-muted);
  font-size: 12px;
  line-height: 1.35;
}
.record-checklist-full {
  margin-top: 14px;
  border-top: 1px solid #dde7eb;
  padding-top: 14px;
}
.record-checklist-full h4 { margin: 0 0 10px; color: #0f2c33; }
.record-checklist-item {
  border: 1px solid #d8e1e6;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: #ffffff;
}
.record-checklist-item strong { display: block; margin-bottom: 6px; }
.record-answer-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: #e8f5f1;
  color: #0b684f;
  font-weight: 700;
  margin: 4px 0;
}
.record-observation { color: #5f7077; margin-top: 4px; white-space: pre-wrap; }
.record-photo-required { color: #a33; font-weight: 700; font-size: 0.9rem; margin-top: 4px; }


/* Interface clean v2 */
.content { padding: 26px 32px 40px; }
.topbar, .panel, .notice { background: rgba(251,253,253,0.96); }
.panel-header { margin-bottom: 24px; }
input, select, textarea { border-color: #cddbe0; background: #ffffff; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(22,100,90,0.14); border-color: rgba(22,100,90,0.45); }
button { border-radius: 10px; }
.secondary-action { background: #eef6f4; color: var(--primary-dark); border: 1px solid #cbe0db; }
.secondary-action:hover { background: #dfeeea; }
.danger-light, .ghost-danger { background: #fff5f3; color: #b42318; border: 1px solid #f4c8c2; }
.danger-light:hover, .ghost-danger:hover { background: #ffe6e1; color: #8f1d14; }
.checklist-form { gap: 18px; }
.checklist-photo-flow { background: #f1f8f6; border-color: #cfe4df; padding: 16px 18px; }
.checklist-photo-flow span { color: #657782; }
.checklist-builder-header { background: #f6faf9; border-color: #d8e6e3; padding: 18px 20px; }
.checklist-descriptions-list { gap: 18px; }
.checklist-description-row {
  position: relative;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: start;
  padding: 20px;
  border-color: #d6e4e7;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcfc 100%);
  box-shadow: 0 10px 24px rgba(16, 35, 43, 0.05);
}
.checklist-item-number { margin-top: 4px; background: #e8f4f1; color: #0e6858; }
.checklist-description-content { gap: 16px; }
.checklist-item-head { display: grid; gap: 8px; }
.checklist-description-text { font-weight: 800; color: #1f333b; }
.checklist-description-text input { margin-top: 6px; font-weight: 600; }
.checklist-description-options {
  padding: 10px 12px;
  border: 1px solid #e0e9ec;
  border-radius: 12px;
  background: #fbfdfd;
}
.checklist-photo-required { margin: 0; font-weight: 700; color: #40545d; }
.checklist-responses-block {
  background: #f5faf9;
  border-color: #d7e6e3;
  border-radius: 16px;
  padding: 16px;
}
.checklist-responses-title strong { font-size: 1rem; color: #163138; }
.checklist-response-row {
  grid-template-columns: minmax(240px, 1fr) auto auto 90px;
  padding: 10px;
  border: 1px solid #e0e9ec;
  border-radius: 12px;
  background: #ffffff;
}
.checklist-response-photo,
.checklist-response-dialog { font-weight: 700; color: #334b55; }
.checklist-responses-block > .secondary-action { justify-self: start; min-width: 210px; }
.checklist-form > button[type="submit"] { min-height: 48px; }
@media (max-width: 1100px) {
  .checklist-description-row { grid-template-columns: 1fr; }
  .checklist-response-row { grid-template-columns: 1fr; }
}

/* Interface delicada - checklist v4 */
:root {
  --bg: #eef5f5;
  --surface: #ffffff;
  --surface-alt: #f5f9f8;
  --line: #dbe6e7;
  --border: #dbe6e7;
}
body {
  background: linear-gradient(180deg, #eef5f5 0%, #f6faf9 100%);
}
.content {
  padding: 22px 28px 36px;
}
.topbar,
.panel,
.notice {
  border-color: #dce7e8;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(16, 35, 43, 0.035);
}
.panel {
  padding: 22px 24px;
}
.panel-header {
  margin-bottom: 16px;
  padding-bottom: 14px;
}
.panel-header h2 {
  font-size: 1.55rem;
}
button {
  min-height: 38px;
  border-radius: 9px;
  padding: 0 14px;
  font-size: 0.95rem;
}
input,
select,
textarea {
  min-height: 40px;
  border-radius: 9px;
  font-size: 0.95rem;
}
.checklist-form {
  gap: 14px;
  max-width: 1120px;
}
.checklist-main-fields {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, 0.7fr);
  gap: 12px;
}
#checklistCompanyField.hidden {
  display: none !important;
}
.checklist-main-fields:has(#checklistCompanyField.hidden) {
  grid-template-columns: minmax(260px, 1fr);
}
.checklist-photo-flow {
  background: #f5faf8;
  border: 1px solid #d9e8e4;
  border-radius: 13px;
  padding: 13px 15px;
  gap: 8px;
}
.checklist-photo-flow strong {
  font-size: 0.98rem;
}
.checklist-photo-flow span {
  font-size: 0.88rem;
}
.checklist-photo-flow label {
  font-size: 0.92rem;
}
.checklist-builder-header {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #dce7e8;
  border-radius: 0;
  padding: 6px 0 12px;
}
.checklist-builder-header strong {
  font-size: 1.05rem;
}
.checklist-description-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  padding: 14px;
  gap: 12px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(16, 35, 43, 0.035);
}
.checklist-item-number {
  width: 28px;
  height: 28px;
  margin-top: 2px;
  font-size: 0.9rem;
}
.checklist-description-content {
  gap: 11px;
}
.checklist-description-text {
  font-weight: 700;
}
.checklist-description-text input {
  font-weight: 500;
}
.checklist-description-options {
  padding: 8px 10px;
  gap: 10px 16px;
  background: #fbfdfd;
}
.checklist-photo-required {
  font-size: 0.9rem;
  font-weight: 600;
}
.checklist-responses-block {
  background: #f8fbfa;
  border-radius: 13px;
  padding: 12px;
  gap: 8px;
}
.checklist-responses-title strong {
  font-size: 0.95rem;
}
.checklist-responses-title span {
  font-size: 0.82rem;
}
.checklist-response-row {
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  padding: 8px;
  border-radius: 10px;
}
.checklist-response-row input[type="text"] {
  min-height: 38px;
}
.checklist-response-photo,
.checklist-response-dialog {
  font-size: 0.9rem;
  font-weight: 600;
}
.danger-light,
.ghost-danger {
  min-height: 36px;
  font-size: 0.9rem;
}
.checklist-responses-block > .secondary-action {
  min-width: 0;
  justify-self: start;
}
.checklist-form > button[type="submit"] {
  min-height: 42px;
  justify-self: start;
  min-width: 220px;
}
@media (max-width: 900px) {
  .checklist-main-fields,
  .checklist-main-fields:has(#checklistCompanyField.hidden) {
    grid-template-columns: 1fr;
  }
  .content { padding: 18px; }
}

.profile-permission-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 111, 96, 0.09);
  color: #0f6f60;
  font-size: 12px;
  font-weight: 700;
}

.muted-text {
  color: #718096;
  font-size: 13px;
}


/* Empresa no cabeçalho e cadastro completo */
.topbar {
  flex-wrap: wrap;
}
.company-header-brand {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #d7e6e3;
  border-radius: 14px;
  background: #f6fbfa;
  color: #17343b;
}
.company-header-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #e5f1ef;
  color: var(--primary-dark);
  font-weight: 800;
}
.company-header-logo img,
.company-list-logo img,
.company-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.company-header-brand p {
  margin: 0 0 2px;
  font-size: 0.74rem;
  color: #718087;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}
.company-header-brand strong {
  display: block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.company-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}
.company-form-grid label {
  display: grid;
  gap: 7px;
  color: #40545d;
  font-weight: 700;
}
.company-logo-field span {
  font-size: .86rem;
  color: #718087;
  font-weight: 500;
}
.company-logo-preview {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #d7e6e3;
  border-radius: 14px;
  background: #f8fbfb;
  color: #50636c;
  font-weight: 700;
}
.company-logo-preview img {
  width: 72px;
  height: 52px;
}
.company-list-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.company-list-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #e8f4f1;
  color: var(--primary-dark);
  font-weight: 900;
  border: 1px solid #d7e6e3;
}
.company-list-info {
  display: grid;
  gap: 3px;
}
.company-list-info strong {
  font-size: 1.05rem;
}
@media (max-width: 860px) {
  .company-form-grid { grid-template-columns: 1fr; }
  .company-header-brand { order: 3; width: 100%; margin-left: 0; }
}

/* Corporate light/dark theme integration */
:root,
html[data-theme="light"] {
  color-scheme: light;
  --fc-bg: #f3f6f8;
  --fc-bg-soft: #edf2f4;
  --fc-panel: rgba(255, 255, 255, 0.94);
  --fc-panel-solid: #ffffff;
  --fc-card: rgba(255, 255, 255, 0.96);
  --fc-card-hover: #ffffff;
  --fc-text: #172026;
  --fc-muted: #66737d;
  --fc-subtle: #7a8992;
  --fc-line: rgba(16, 35, 43, 0.14);
  --fc-sidebar: #172026;
  --fc-sidebar-text: #d8e8e5;
  --fc-sidebar-active: rgba(22, 100, 90, 0.82);
  --fc-primary: #16645a;
  --fc-primary-2: #0f4b43;
  --fc-cyan: #65d6a6;
  --fc-green: #16645a;
  --fc-yellow: #b7791f;
  --fc-red: #a33a25;
  --fc-shadow: 0 18px 44px rgba(16, 35, 43, 0.08);
  --fc-shadow-soft: 0 10px 28px rgba(16, 35, 43, 0.06);
  --fc-radius: 14px;
  --bg: var(--fc-bg);
  --surface: var(--fc-panel-solid);
  --surface-alt: #f8faff;
  --text: var(--fc-text);
  --muted: var(--fc-muted);
  --line: var(--fc-line);
  --border: var(--fc-line);
  --primary: var(--fc-primary);
  --primary-dark: #0f4b43;
  --accent: var(--fc-cyan);
  --ink: var(--fc-text);
  --warning: #fff7df;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --fc-bg: #10232b;
  --fc-bg-soft: #172026;
  --fc-panel: rgba(23, 32, 38, 0.94);
  --fc-panel-solid: #172026;
  --fc-card: rgba(24, 47, 55, 0.96);
  --fc-card-hover: #20353d;
  --fc-text: #d8e8e5;
  --fc-muted: #b5c7c4;
  --fc-subtle: #91a39f;
  --fc-line: rgba(216, 232, 229, 0.16);
  --fc-sidebar: #0b181d;
  --fc-sidebar-text: #d8e8e5;
  --fc-sidebar-active: rgba(22, 100, 90, 0.34);
  --fc-primary: #65d6a6;
  --fc-primary-2: #16645a;
  --fc-cyan: #65d6a6;
  --fc-green: #65d6a6;
  --fc-yellow: #fbbf24;
  --fc-red: #ff8a75;
  --fc-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  --fc-shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.18);
  --fc-radius: 14px;
  --bg: var(--fc-bg);
  --surface: var(--fc-panel-solid);
  --surface-alt: #10142d;
  --text: var(--fc-text);
  --muted: var(--fc-muted);
  --line: var(--fc-line);
  --border: var(--fc-line);
  --primary: var(--fc-primary);
  --primary-dark: #65d6a6;
  --accent: var(--fc-cyan);
  --ink: var(--fc-text);
  --warning: rgba(245, 158, 11, 0.14);
}

* { box-sizing: border-box; }
html { background: var(--fc-bg); }
body {
  margin: 0;
  color: var(--fc-text);
  background:
    linear-gradient(180deg, rgba(29, 78, 112, 0.06), transparent 280px),
    linear-gradient(135deg, var(--fc-bg) 0%, var(--fc-bg-soft) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

button, input, select, textarea { font: inherit; }
button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--fc-primary), var(--fc-primary-2));
  color: #fff;
  cursor: pointer;
  padding: 0 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 20px rgba(29, 78, 112, 0.16);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
button:hover { transform: translateY(-1px); filter: brightness(1.04); }
button:active { transform: translateY(0); }
input, select, textarea {
  min-height: 42px;
  border: 1px solid var(--fc-line);
  border-radius: 9px;
  padding: 0 13px;
  background: color-mix(in srgb, var(--fc-panel-solid) 92%, transparent);
  color: var(--fc-text);
  box-shadow: none;
  outline: none;
}
textarea { padding: 12px 13px; }
input:focus, select:focus, textarea:focus {
  border-color: color-mix(in srgb, var(--fc-primary) 52%, var(--fc-line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--fc-primary) 14%, transparent);
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--fc-muted) 72%, transparent); }

.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(320px, 48vw);
  background:
    linear-gradient(90deg, rgba(16, 36, 52, 0.08), transparent 38%),
    linear-gradient(135deg, #eef3f6 0%, #f8fafc 100%);
}
html[data-theme="dark"] .login-layout {
  background:
    linear-gradient(90deg, rgba(79, 159, 195, 0.10), transparent 38%),
    linear-gradient(135deg, #08131d 0%, #102131 100%);
}
.brand-panel {
  justify-content: center;
  gap: 28px;
  padding: 56px;
  background: transparent;
  color: var(--fc-text);
  border-right: 1px solid var(--fc-line);
}
.brand-mark {
  color: var(--fc-text);
  font-size: 15px;
  font-weight: 850;
  text-transform: none;
  letter-spacing: -0.02em;
}
.brand-symbol {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--fc-primary), var(--fc-primary-2));
  color: #fff;
  font-size: 17px;
  box-shadow: 0 12px 28px rgba(29, 78, 112, 0.22);
}
.brand-panel h1 {
  max-width: 520px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: #14212b;
}
html[data-theme="dark"] .brand-panel h1 { color: var(--fc-text); }
.brand-panel h1::first-line { color: var(--fc-text); }
.brand-lead, .brand-panel p {
  max-width: 540px;
  color: var(--fc-muted);
  font-size: 15.5px;
  line-height: 1.55;
}
.brand-metrics {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 14px;
  max-width: 600px;
}
.brand-metrics div, .activity-preview, .login-form {
  border: 1px solid var(--fc-line);
  background: var(--fc-card);
  backdrop-filter: blur(18px);
  box-shadow: var(--fc-shadow-soft);
}
.brand-metrics div {
  min-height: 72px;
  padding: 16px;
  border-radius: 10px;
}
.brand-metrics strong { color: var(--fc-text); font-size: 15px; }
.brand-metrics span, .activity-row span { color: var(--fc-muted); }
.activity-preview {
  max-width: 545px;
  margin-top: auto;
  padding: 18px;
  border-radius: 12px;
}
.activity-row strong { color: var(--fc-text); }
.activity-line { background: var(--fc-line); }
.login-form {
  width: min(420px, calc(100% - 48px));
  align-self: center;
  justify-self: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 32px;
  border-radius: 16px;
  background: var(--fc-panel);
}
.login-form h2 { color: var(--fc-text); font-size: 24px; letter-spacing: -0.02em; }
.login-form label { color: var(--fc-muted); font-size: 13px; font-weight: 650; }
.login-form button { min-height: 39px; margin-top: 8px; }
.two-factor-step {
  display: grid;
  gap: 14px;
}
.two-factor-step.hidden {
  display: none;
}
.two-factor-heading {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--fc-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--fc-primary) 8%, var(--fc-panel));
}
.two-factor-heading strong {
  color: var(--fc-text);
  font-size: 16px;
}
.two-factor-heading span {
  color: var(--fc-muted);
  font-size: 13px;
  line-height: 1.45;
}
.two-factor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.login-form .two-factor-actions button {
  margin-top: 0;
}

.dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(22, 100, 90, 0.08), transparent 280px),
    linear-gradient(135deg, var(--fc-bg), var(--fc-bg-soft));
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  padding: 26px 16px;
  background:
    radial-gradient(circle at 18% 0%, rgba(101, 214, 166, 0.12), transparent 34%),
    linear-gradient(180deg, #12232b 0%, var(--fc-sidebar) 100%);
  color: var(--fc-sidebar-text);
  border-right: 1px solid var(--fc-line);
  box-shadow: 14px 0 34px rgba(8, 19, 29, 0.08);
}
.sidebar .eyebrow { color: rgba(216, 232, 229, 0.52); letter-spacing: .28em; }
.sidebar h1 { color: #f2fbf8; font-size: 20px; letter-spacing: -0.04em; }
.sidebar nav { gap: 8px; }
.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-group-toggle span {
  transition: transform 160ms ease;
}

.nav-group-toggle[aria-expanded="false"] span {
  transform: rotate(-90deg);
}

.nav-group-toggle.active-parent {
  background: rgba(101, 214, 166, 0.10);
  color: #f2fbf8;
  border-color: rgba(101, 214, 166, 0.18);
}

.nav-submenu {
  display: grid;
  gap: 6px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(216, 232, 229, 0.22);
}

.nav-subitem {
  min-height: 34px;
  font-size: 14px;
}

.nav-button, .secondary {
  width: 100%;
  min-height: 38px;
  justify-content: flex-start;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  border-radius: 9px;
  text-align: left;
  color: rgba(216, 232, 229, 0.88);
  font-weight: 650;
}
.nav-button:hover, .secondary:hover {
  background: rgba(101, 214, 166, 0.10);
  color: #ffffff;
  border-color: rgba(101, 214, 166, 0.18);
  transform: none;
}
.nav-button.active {
  background: linear-gradient(135deg, rgba(101, 214, 166, 0.20), rgba(22, 100, 90, 0.42));
  color: #ffffff;
  border-color: rgba(101, 214, 166, 0.32);
  box-shadow: inset 3px 0 0 #65d6a6, 0 8px 22px rgba(0, 0, 0, 0.12);
}
.secondary {
  align-self: end;
  text-align: center;
  justify-content: center;
  background: rgba(216, 232, 229, 0.08);
  color: rgba(216, 232, 229, 0.92);
  border-color: rgba(216, 232, 229, 0.22);
}
.content { width: min(100%, 1500px); padding: 28px 36px 44px; }
.topbar, .panel, .notice {
  background: var(--fc-panel);
  border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow);
  backdrop-filter: blur(10px);
}
.topbar {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
}
.topbar h2 { color: var(--fc-text); font-size: 18px; }
.topbar .eyebrow, .panel-header .eyebrow, .dashboard-section .eyebrow {
  color: var(--fc-subtle);
  letter-spacing: .24em;
  font-size: 11px;
}
.topbar-actions { display: inline-flex; align-items: center; gap: 10px; }
.theme-toggle {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--fc-card);
  color: var(--fc-text);
  border: 1px solid var(--fc-line);
  box-shadow: none;
  font-size: 12px;
}
.theme-toggle:hover { background: var(--fc-card-hover); transform: none; }
.badge {
  min-height: 30px;
  border-radius: 999px;
  padding: 0 14px;
  background: color-mix(in srgb, var(--fc-primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--fc-primary) 32%, var(--fc-line));
  color: var(--fc-primary);
  font-size: 12px;
  letter-spacing: .10em;
  font-weight: 900;
}
.company-header-brand {
  margin-left: 0;
  padding: 8px 14px 8px 8px;
  border-color: var(--fc-line);
  border-radius: 999px;
  background: var(--fc-card);
  color: var(--fc-text);
}
.company-header-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fc-primary-2), var(--fc-primary));
  color: #fff;
}
.company-header-brand p { color: var(--fc-subtle); font-size: 10px; letter-spacing: .22em; }
.company-header-brand strong { color: var(--fc-text); }
.panel {
  margin-top: 22px;
  padding: 24px;
}
.panel-header {
  align-items: start;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom-color: var(--fc-line);
}
.panel-header h2 { font-size: 22px; color: var(--fc-text); letter-spacing: -0.04em; }
.dashboard-hero-text {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--fc-muted);
  font-size: 14px;
  font-weight: 700;
}
.dashboard-company-filter { color: var(--fc-muted); text-transform: none; font-size: 13px; letter-spacing: 0; }
.dashboard-metrics {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}
.metric-card, .dashboard-section, .item, .activity-card, .record-filters,
.permission-box, .checklist-photo-flow, .checklist-responses-block,
.record-checklist-item, .weekday-grid label, .reminder-item {
  border: 1px solid var(--fc-line);
  background: var(--fc-card);
  border-radius: 12px;
  color: var(--fc-text);
  box-shadow: none;
}
.metric-card {
  min-height: 112px;
  padding: 18px;
  background:
    linear-gradient(145deg, var(--fc-card), color-mix(in srgb, var(--fc-primary) 5%, var(--fc-card))),
    var(--fc-card);
  position: relative;
  overflow: hidden;
}
.metric-card::after {
  content: "";
  position: absolute;
  right: -22px;
  top: -22px;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fc-primary) 13%, transparent);
}
.metric-card span { color: var(--fc-subtle); letter-spacing: .24em; font-size: 11px; }
.metric-card strong { color: var(--fc-text); font-size: 29px; position: relative; z-index: 1; }
.metric-card small { color: var(--fc-muted); font-weight: 650; }
.dashboard-grid { grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr); gap: 16px; margin-top: 18px; }
.dashboard-section { padding: 18px; }
.dashboard-section h3 { color: var(--fc-text); font-size: 18px; letter-spacing: -0.03em; }
.status-row {
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--fc-line) 72%, transparent);
}
.status-row:last-child { border-bottom: 0; }
.status-bar { background: color-mix(in srgb, var(--fc-line) 55%, transparent); height: 8px; }
.status-bar .completed { background: linear-gradient(90deg, var(--fc-green), var(--fc-cyan)); }
.status-bar .open { background: var(--fc-yellow); }
.status-bar .draft { background: var(--fc-primary); }
.activity-card { background: color-mix(in srgb, var(--fc-card) 90%, #0000); padding: 13px 15px; }
.activity-card-featured {
  border-color: color-mix(in srgb, var(--fc-primary) 28%, var(--fc-line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--fc-primary) 8%, var(--fc-card)), var(--fc-card));
}
.activity-card strong, .item strong, .status-row strong { color: var(--fc-text); }
.activity-card span, .item span, .status-row span, .form-note, .muted-text { color: var(--fc-muted); }
.activity-card small {
  color: var(--fc-subtle);
  font-size: 12px;
  font-weight: 800;
}
.item {
  padding: 16px;
  border-radius: 12px;
  background: var(--fc-card);
}
.item:hover { border-color: color-mix(in srgb, var(--fc-primary) 32%, var(--fc-line)); box-shadow: var(--fc-shadow-soft); }
.item-actions button, .item-actions .button-link, .secondary-action, .edit-actions .secondary-action, .section-tools .secondary-action {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--fc-primary) 10%, var(--fc-card));
  color: var(--fc-text);
  border: 1px solid var(--fc-line);
  box-shadow: none;
}
.item-actions button:hover, .item-actions .button-link:hover, .secondary-action:hover { background: color-mix(in srgb, var(--fc-primary) 18%, var(--fc-card)); transform: none; }
.item-actions .danger, .danger-light, .ghost-danger {
  background: color-mix(in srgb, var(--fc-red) 10%, var(--fc-card));
  color: var(--fc-red);
  border: 1px solid color-mix(in srgb, var(--fc-red) 26%, var(--fc-line));
}
.notice { padding: 16px; background: color-mix(in srgb, var(--fc-yellow) 12%, var(--fc-panel)); color: var(--fc-text); }
.record-status.status-completed { background: color-mix(in srgb, var(--fc-green) 18%, transparent); color: var(--fc-green); border: 1px solid color-mix(in srgb, var(--fc-green) 35%, transparent); }
.record-status.status-open { background: color-mix(in srgb, var(--fc-yellow) 18%, transparent); color: var(--fc-yellow); border: 1px solid color-mix(in srgb, var(--fc-yellow) 35%, transparent); }
.record-status.status-draft { background: color-mix(in srgb, var(--fc-primary) 18%, transparent); color: var(--fc-primary); border: 1px solid color-mix(in srgb, var(--fc-primary) 35%, transparent); }
.record-thumb, .record-thumb-empty { background: color-mix(in srgb, var(--fc-primary) 8%, var(--fc-card)); border-color: var(--fc-line); color: var(--fc-text); }
.photo-actions a, .mini-pill, .record-answer-pill {
  background: color-mix(in srgb, var(--fc-primary) 12%, transparent);
  color: var(--fc-primary);
}

.checklist-form { max-width: none; gap: 18px; }
.checklist-main-fields { grid-template-columns: minmax(280px, 1fr) minmax(240px, .55fr); }
.checklist-photo-flow, .checklist-builder-header, .checklist-description-row, .checklist-responses-block {
  background: var(--fc-card);
  border-color: var(--fc-line);
}
.checklist-builder-header { border-radius: 16px; padding: 16px; border: 1px solid var(--fc-line); }
.checklist-description-row { box-shadow: none; border-radius: 18px; }
.checklist-item-number { background: color-mix(in srgb, var(--fc-primary) 13%, transparent); color: var(--fc-primary); }
.checklist-description-text, .checklist-responses-title strong, .permission-box strong, .checklist-photo-flow strong, .record-checklist-full h4 { color: var(--fc-text); }
.checklist-description-options, .checklist-response-row { background: color-mix(in srgb, var(--fc-panel-solid) 82%, transparent); border-color: var(--fc-line); }
.checklist-responses-title span, .checklist-photo-flow span { color: var(--fc-muted); }

html[data-theme="dark"] img { filter: none; }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: rgba(7, 8, 18, 0.36);
}
html[data-theme="dark"] option { background: #122333; color: #edf4f8; }

@media (max-width: 1100px) {
  .dashboard { grid-template-columns: 224px minmax(0, 1fr); }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .topbar { grid-template-columns: 1fr; }
  .topbar-actions { justify-content: flex-start; }
  .company-header-brand { width: fit-content; }
}
@media (max-width: 820px) {
  .login-layout, .dashboard { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .content, .brand-panel, .login-form, .sidebar { padding: 20px; }
  .login-form { width: calc(100% - 32px); }
  .dashboard-metrics, .dashboard-grid, .checklist-main-fields { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
}


/* Storage status by company */
.panel-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.storage-status-panel {
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.035);
}

.storage-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.storage-status-header h3 {
  margin: 0.15rem 0 0;
  font-size: 1rem;
}

.storage-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.storage-card {
  padding: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.storage-card-title,
.storage-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.storage-card-title strong {
  display: block;
  font-size: 0.98rem;
}

.firebase-usage-section {
  display: grid;
  gap: 0.85rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.firebase-usage-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.firebase-usage-card {
  min-height: 112px;
}

.firebase-usage-card .storage-card-title strong {
  margin-top: 0.45rem;
  color: var(--fc-text, #0f172a);
  font-size: 1.8rem;
  line-height: 1;
}

.firebase-usage-note {
  margin: 0;
  font-size: 0.76rem;
}

.backup-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.backup-status-list {
  display: grid;
  gap: 0.55rem;
}

.backup-status-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(220px, 0.7fr);
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.backup-status-row div {
  display: grid;
  gap: 0.18rem;
}

.backup-status-row strong {
  color: var(--fc-text, #0f172a);
}

.backup-status-row span,
.backup-status-row small {
  color: var(--muted-foreground, #64748b);
}

.status-pill {
  width: fit-content;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-size: 0.75rem;
  font-weight: 800;
}

.status-pill.success {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.28);
}

.status-pill.warning {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.3);
}

.status-pill.danger {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.26);
}

.storage-card-title span,
.storage-card-footer span {
  color: var(--muted-foreground, #64748b);
  font-size: 0.82rem;
}

.storage-breakdown {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 0.55rem;
}

.storage-badge {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #166534 !important;
  font-weight: 700;
  white-space: nowrap;
}

.storage-progress {
  height: 0.55rem;
  margin: 0.9rem 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
}

.storage-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #0ea5e9);
}

.dark .storage-status-panel {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(148, 163, 184, 0.2);
}

.dark .storage-card {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.18);
}

.dark .storage-badge {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac !important;
}

html[data-theme="dark"] .storage-status-panel {
  background: rgba(0, 26, 28, 0.72) !important;
  border-color: rgba(0, 213, 167, 0.18) !important;
}

html[data-theme="dark"] .storage-card {
  background: color-mix(in srgb, var(--fc-card) 92%, #003b3a 8%) !important;
  border-color: rgba(0, 213, 167, 0.20) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .storage-card-title strong,
html[data-theme="dark"] .storage-card-footer strong,
html[data-theme="dark"] .firebase-usage-card .storage-card-title strong {
  color: #f2fbf8 !important;
}

html[data-theme="dark"] .storage-card-title span,
html[data-theme="dark"] .storage-card-footer span,
html[data-theme="dark"] .storage-card small,
html[data-theme="dark"] .firebase-usage-note {
  color: #a8c5c1 !important;
}

html[data-theme="dark"] .storage-badge {
  background: rgba(101, 214, 166, 0.16) !important;
  color: #7ee7c7 !important;
}

html[data-theme="dark"] .storage-progress {
  background: rgba(168, 197, 193, 0.14) !important;
}

.error-message {
  color: #dc2626;
}


.contract-access-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contract-checkbox-list {
  min-height: 7rem;
  max-height: 11rem;
  overflow: auto;
  border: 1px solid var(--fc-line, rgba(148, 163, 184, 0.25));
  border-radius: 10px;
  padding: 0.45rem;
  background: var(--fc-input, rgba(15, 23, 42, 0.18));
  display: grid;
  gap: 0.25rem;
}

.contract-checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
}

.contract-checkbox-option:hover {
  background: rgba(29, 78, 112, 0.12);
}

.user-contract-multi-select {
  position: relative;
  width: min(420px, 100%);
}

.user-contract-trigger,
html[data-theme="light"] .user-contract-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--select-menu-bg, #132638);
  color: var(--text);
  box-shadow: none;
  font-weight: 800;
  text-align: left;
  transform: none;
}

.user-contract-trigger:hover,
html[data-theme="light"] .user-contract-trigger:hover {
  background: var(--select-menu-bg, #132638);
  color: var(--text);
  transform: none;
}

.user-contract-trigger[aria-expanded="true"] {
  border-color: var(--primary);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.user-contract-options,
html[data-theme="light"] .user-contract-options {
  position: absolute;
  z-index: 60;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  min-width: 260px;
  max-width: 420px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--line));
  border-radius: 0 0 8px 8px;
  background: #132638;
  box-shadow: var(--shadow);
}

.user-contract-options.hidden {
  display: none;
}

.user-contract-options-list {
  display: grid;
  max-height: 210px;
  overflow: auto;
  gap: 2px;
  padding: 2px;
}

.user-contract-option,
html[data-theme="light"] .user-contract-option {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 8px;
  gap: 10px;
  border-radius: 6px;
  background: transparent;
  color: #eef8f6;
  font-weight: 800;
}

.user-contract-option:hover,
.user-contract-option:focus-within,
html[data-theme="light"] .user-contract-option:hover,
html[data-theme="light"] .user-contract-option:focus-within {
  background: rgba(147, 197, 253, 0.16);
  color: #ffffff;
}

.user-contract-option input[type="checkbox"],
html[data-theme="light"] .user-contract-option input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--primary);
  flex: 0 0 auto;
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
}

.user-contract-option span {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.user-contract-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 2px 2px;
  border-top: 1px solid rgba(216, 232, 229, 0.12);
}

.user-contract-actions button,
html[data-theme="light"] .user-contract-actions button {
  min-height: 30px;
  padding: 5px 14px;
  border-radius: 7px;
  font-size: 12px;
}

.email-multi-select {
  position: relative;
  max-width: 430px;
}

.email-multi-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--fc-line, rgba(148, 163, 184, 0.25));
  border-radius: 8px;
  background: var(--fc-input, rgba(15, 23, 42, 0.18));
  color: var(--fc-text, var(--text));
  font-weight: 800;
  text-align: left;
}

.email-multi-select-trigger[aria-expanded="true"] {
  border-color: var(--fc-accent, var(--primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fc-accent, var(--primary)) 18%, transparent);
}

.email-multi-select-options {
  position: absolute;
  z-index: 35;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  max-height: 190px;
  overflow: auto;
  padding: 6px 0;
  border: 1px solid var(--fc-line, rgba(148, 163, 184, 0.25));
  background: var(--fc-input, #132638);
  box-shadow: var(--shadow);
}

.email-multi-select-options.hidden {
  display: none;
}

.email-multi-select-options .contract-checkbox-option {
  border-radius: 0;
  padding: 7px 12px;
}

.email-multi-select .email-multi-select-trigger,
html[data-theme="light"] .email-multi-select .email-multi-select-trigger {
  width: 100% !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: var(--select-menu-bg, #132638) !important;
  color: var(--text) !important;
  box-shadow: none !important;
  font-weight: 800 !important;
  text-align: left !important;
  transform: none !important;
}

.email-multi-select .email-multi-select-trigger:hover,
html[data-theme="light"] .email-multi-select .email-multi-select-trigger:hover {
  background: var(--select-menu-bg, #132638) !important;
  color: var(--text) !important;
  transform: none !important;
}

.email-multi-select .email-multi-select-trigger[aria-expanded="true"] {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent) !important;
}

.email-multi-select .email-multi-select-options {
  border-color: var(--line) !important;
  border-radius: 0 0 8px 8px;
  background: var(--select-menu-bg, #132638) !important;
}

.email-multi-select .contract-checkbox-option,
html[data-theme="light"] .email-multi-select .contract-checkbox-option {
  min-height: 30px;
  margin: 0;
  background: #132638 !important;
  color: #ffffff !important;
  border: 0 !important;
  font-weight: 500;
}

.email-multi-select .contract-checkbox-option:hover,
.email-multi-select .contract-checkbox-option:focus-within,
html[data-theme="light"] .email-multi-select .contract-checkbox-option:hover,
html[data-theme="light"] .email-multi-select .contract-checkbox-option:focus-within {
  background: #93c5fd !important;
  color: #0f172a !important;
}

.contract-access-box small {
  color: var(--muted-foreground, #64748b);
  line-height: 1.35;
}

.contract-access-label {
  font-weight: 700;
}

.contract-access-box select {
  width: 100%;
  min-height: 44px;
}

.contract-access-box small {
  display: block;
  margin-top: 6px;
}

.technical-checklist-list {
  display: grid;
  gap: 14px;
}

.technical-checklist-item {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--fc-panel) 86%, transparent);
}

.technical-checklist-options {
  display: grid;
  gap: 8px;
}

.technical-checklist-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.technical-checklist-item textarea {
  min-height: 78px;
  resize: vertical;
}

/* Editorial enterprise theme inspired by the Lovable direction.
   The previous theme remains above this block, so reverting is straightforward. */
:root,
html[data-theme="light"] {
  --fc-bg: #f4f0e6;
  --fc-bg-soft: #ebe6da;
  --fc-panel: rgba(255, 255, 255, 0.92);
  --fc-panel-solid: #fffdf8;
  --fc-card: #fffefa;
  --fc-card-hover: #ffffff;
  --fc-text: #151821;
  --fc-muted: #151821;
  --fc-subtle: #151821;
  --fc-line: rgba(42, 44, 52, 0.16);
  --fc-sidebar: #14161d;
  --fc-sidebar-text: #e8e3d8;
  --fc-sidebar-active: #16645a;
  --fc-primary: #16645a;
  --fc-primary-2: #0f4b43;
  --fc-cyan: #65d6a6;
  --fc-green: #28745d;
  --fc-yellow: #16645a;
  --fc-red: #b84c43;
  --fc-shadow: 0 18px 44px rgba(29, 27, 22, 0.08);
  --fc-shadow-soft: 0 10px 28px rgba(29, 27, 22, 0.06);
  --fc-radius: 14px;
  --bg: var(--fc-bg);
  --surface: var(--fc-panel-solid);
  --surface-alt: #f8f4ea;
  --text: var(--fc-text);
  --muted: var(--fc-muted);
  --line: var(--fc-line);
  --border: var(--fc-line);
  --primary: var(--fc-primary);
  --primary-dark: var(--fc-primary-2);
  --accent: var(--fc-primary);
  --ink: var(--fc-text);
  --warning: #fff6df;
}

html[data-theme="dark"] {
  --fc-bg: #0b0d12;
  --fc-bg-soft: #151820;
  --fc-panel: rgba(25, 28, 37, 0.94);
  --fc-panel-solid: #191c25;
  --fc-card: #1a1d26;
  --fc-card-hover: #20242f;
  --fc-text: #f3efe6;
  --fc-muted: #a6abb7;
  --fc-subtle: #8f94a1;
  --fc-line: rgba(243, 239, 230, 0.13);
  --fc-sidebar: #0b0d12;
  --fc-sidebar-text: #e7e1d5;
  --fc-sidebar-active: #16645a;
  --fc-primary: #65d6a6;
  --fc-primary-2: #16645a;
  --fc-cyan: #65d6a6;
  --fc-green: #62c49d;
  --fc-yellow: #65d6a6;
  --fc-red: #ff8d82;
  --fc-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  --fc-shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.2);
  --bg: var(--fc-bg);
  --surface: var(--fc-panel-solid);
  --surface-alt: #12151c;
  --text: var(--fc-text);
  --muted: var(--fc-muted);
  --line: var(--fc-line);
  --border: var(--fc-line);
  --primary: var(--fc-primary);
  --primary-dark: var(--fc-primary-2);
  --accent: var(--fc-primary);
  --ink: var(--fc-text);
  --warning: rgba(101, 214, 166, 0.15);
}

body {
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--fc-primary) 10%, transparent), transparent 26rem),
    linear-gradient(135deg, var(--fc-bg), var(--fc-bg-soft));
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

.dashboard {
  background:
    radial-gradient(circle at 92% 5%, color-mix(in srgb, var(--fc-primary) 10%, transparent), transparent 24rem),
    linear-gradient(135deg, var(--fc-bg), var(--fc-bg-soft));
}

.sidebar {
  background: var(--fc-sidebar);
  color: var(--fc-sidebar-text);
  border-right: 1px solid color-mix(in srgb, var(--fc-line) 78%, transparent);
  box-shadow: none;
}

.sidebar .eyebrow,
.topbar .eyebrow,
.panel-header .eyebrow,
.dashboard-section .eyebrow,
.metric-card span {
  letter-spacing: .30em;
  text-transform: uppercase;
}

.sidebar h1,
.panel-header h2,
.dashboard-section h3,
.metric-card strong,
.login-form h2 {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: -0.04em;
}

.sidebar h1 {
  color: #fff8e9;
  font-size: 22px;
}

.nav-button,
.secondary {
  border-radius: 9px;
  color: color-mix(in srgb, var(--fc-sidebar-text) 88%, transparent);
}

.nav-button:hover,
.secondary:hover,
.nav-group-toggle.active-parent {
  background: color-mix(in srgb, var(--fc-primary) 16%, transparent);
  border-color: color-mix(in srgb, var(--fc-primary) 28%, transparent);
  color: #fff8e9;
}

.nav-button.active {
  background: var(--fc-sidebar-active);
  color: #11131a;
  border-color: transparent;
  box-shadow: none;
}

.nav-submenu {
  border-left-color: rgba(232, 227, 216, 0.18);
}

.secondary {
  background: color-mix(in srgb, var(--fc-sidebar-text) 9%, transparent);
}

.topbar,
.panel,
.notice,
.metric-card,
.dashboard-section,
.item,
.activity-card,
.record-filters,
.permission-box,
.checklist-photo-flow,
.checklist-responses-block,
.record-checklist-item,
.weekday-grid label,
.reminder-item,
.technical-checklist-item {
  background: var(--fc-card);
  border-color: var(--fc-line);
  box-shadow: none;
}

.topbar {
  border-radius: 0;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  margin: -28px -36px 28px;
  padding: 18px 32px;
  background: color-mix(in srgb, var(--fc-card) 94%, transparent);
}

.panel {
  border-radius: 13px;
}

.panel-header h2 {
  font-size: 30px;
}

.dashboard-hero-text {
  font-weight: 500;
  color: var(--fc-muted);
}

button {
  background: var(--fc-primary);
  color: #151821;
  border-radius: 999px;
  box-shadow: none;
}

button:hover {
  background: var(--fc-primary-2);
}

.theme-toggle,
.notification-bell,
.company-header-brand,
.badge {
  border-radius: 999px;
  box-shadow: none;
}

.company-header-logo {
  background: var(--fc-primary);
  color: #151821;
}

.badge {
  color: var(--fc-primary);
  background: color-mix(in srgb, var(--fc-primary) 12%, transparent);
  border-color: color-mix(in srgb, var(--fc-primary) 34%, var(--fc-line));
}

.dashboard-metrics {
  gap: 16px;
}

.metric-card {
  min-height: 138px;
  padding: 20px;
}

.metric-card::after {
  width: 86px;
  height: 86px;
  background: color-mix(in srgb, var(--fc-primary) 11%, transparent);
}

.metric-card strong {
  font-size: 34px;
  font-weight: 650;
}

.metric-card small {
  font-weight: 500;
}

.activity-card-featured,
.item:hover {
  border-color: color-mix(in srgb, var(--fc-primary) 34%, var(--fc-line));
  box-shadow: none;
}

.record-status.status-open,
.priority-badge.priority-alta,
.priority-chip.priority-alta {
  background: color-mix(in srgb, #e46055 14%, transparent);
  color: #c44b42;
  border-color: color-mix(in srgb, #e46055 28%, transparent);
}

.record-status.status-completed,
.status-chip.completed {
  background: color-mix(in srgb, var(--fc-green) 14%, transparent);
  color: var(--fc-green);
  border-color: color-mix(in srgb, var(--fc-green) 28%, transparent);
}

.record-status.status-draft,
.priority-badge.priority-media,
.priority-chip.priority-media {
  background: color-mix(in srgb, var(--fc-primary) 14%, transparent);
  color: var(--fc-primary);
  border-color: color-mix(in srgb, var(--fc-primary) 34%, transparent);
}

html[data-theme="light"] .badge,
html[data-theme="light"] .record-status.status-draft,
html[data-theme="light"] .priority-badge.priority-media,
html[data-theme="light"] .priority-chip.priority-media,
html[data-theme="light"] .checklist-item-number,
html[data-theme="light"] .record-code,
html[data-theme="light"] .technical-demand-code,
html[data-theme="light"] .dashboard-demand-code {
  color: var(--fc-text);
}

html[data-theme="light"] .technical-demand-flow strong,
html[data-theme="light"] .technical-demand-summary-card strong,
html[data-theme="light"] .record-detail-card strong {
  color: var(--fc-text);
}

input,
select,
textarea {
  border-radius: 10px;
}

@media (max-width: 820px) {
  .topbar {
    margin: 0 0 18px;
    padding: 18px;
    border-radius: 13px;
    border: 1px solid var(--fc-line);
  }
}

/* Clean header and persistent logout */
.sidebar {
  min-height: 0;
}

.sidebar nav {
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

#logoutButton {
  position: sticky;
  bottom: 0;
  z-index: 2;
  min-height: 48px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--fc-sidebar-text) 10%, transparent);
  border-color: color-mix(in srgb, var(--fc-sidebar-text) 28%, transparent);
  color: var(--fc-sidebar-text);
  font-weight: 800;
}

#logoutButton:hover {
  background: color-mix(in srgb, var(--fc-sidebar-text) 16%, transparent);
  color: #fff8e9;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 58px;
}

.topbar-actions {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  width: auto;
  margin-left: auto;
}

.icon-only-action,
.theme-toggle,
.notification-bell {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--fc-text);
  border: 1px solid var(--fc-line);
  box-shadow: none;
  font-size: 16px;
  line-height: 1;
}

.icon-only-action:hover,
.theme-toggle:hover,
.notification-bell:hover {
  background: color-mix(in srgb, var(--fc-primary) 10%, var(--fc-card));
  color: var(--fc-text);
  border-color: color-mix(in srgb, var(--fc-primary) 36%, var(--fc-line));
  transform: none;
}

.notification-bell-icon {
  width: auto;
  height: auto;
  font-size: 15px;
}

.notification-bell-count {
  top: -5px;
  right: -4px;
  border-color: var(--fc-card);
}

.notification-bell-wrap {
  order: 2;
}

#themeToggle {
  order: 1;
}

.company-header-brand,
#roleBadge {
  display: none !important;
}

/* Compact operational layout */
.content {
  width: min(100%, 1440px);
  padding: 18px 24px;
}

.dashboard {
  height: 100vh;
  overflow: hidden;
}

.content {
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar,
.sidebar nav {
  overscroll-behavior: contain;
}

.topbar {
  margin: -18px -24px 18px;
  min-height: 46px;
  padding: 10px 24px;
  justify-content: flex-end;
}

.panel {
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: 11px;
}

.panel-header {
  min-height: 0;
  margin-bottom: 14px;
  padding-bottom: 12px;
  gap: 12px;
}

.panel-header h2 {
  font-size: 24px;
  line-height: 1.05;
}

.panel-header .eyebrow {
  font-size: 10px;
  letter-spacing: .22em;
}

button,
.button-link,
.secondary-action {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 14px;
}

.panel-header button,
#newCompanyButton,
#newUserButton,
#newSiteButton,
#newContractButton,
#newChecklistButton,
#newTechnicalDemandButton,
#newDemandButton {
  min-height: 36px;
  padding: 0 16px;
}

input,
select {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
}

textarea {
  min-height: 86px;
  padding: 10px;
  border-radius: 8px;
}

label {
  gap: 5px;
  font-size: 14px;
}

.form-grid,
.filters-grid,
.record-filters,
.dashboard-report-filters,
.email-contact-form,
.email-settings-form,
.technical-demand-form,
.demand-form {
  gap: 10px 12px;
}

.notice {
  margin-top: 10px;
  padding: 11px 14px;
  border-radius: 10px;
}

.list {
  gap: 10px;
}

.item {
  min-height: 0;
  padding: 12px 14px;
  border-radius: 10px;
}

.item strong {
  font-size: 16px;
  line-height: 1.2;
}

.item span {
  font-size: 14px;
  line-height: 1.35;
}

.item-actions {
  gap: 8px;
  align-items: center;
}

.item-actions button,
.item-actions .button-link {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.mini-pill,
.record-status,
.priority-badge,
.priority-chip,
.status-chip,
.badge {
  min-height: 24px;
  padding: 0 9px;
  font-size: 11px;
}

.metric-card {
  min-height: 92px;
  padding: 14px;
  border-radius: 10px;
}

.metric-card::after {
  width: 58px;
  height: 58px;
  right: -16px;
  top: -16px;
}

.metric-card span {
  font-size: 10px;
  letter-spacing: .20em;
}

.metric-card strong {
  font-size: 27px;
}

.metric-card small {
  font-size: 12px;
}

.dashboard-metrics {
  gap: 10px;
}

.dashboard-grid {
  gap: 12px;
  margin-top: 12px;
}

.dashboard-section {
  padding: 14px;
  border-radius: 10px;
}

.dashboard-section-header {
  margin-bottom: 10px;
}

.dashboard-section h3 {
  font-size: 17px;
}

.activity-card {
  padding: 10px 12px;
  border-radius: 9px;
}

.status-row {
  padding: 8px 0;
  gap: 6px;
}

.status-bar {
  height: 6px;
}

.record-filters {
  padding: 12px;
  border-radius: 10px;
}

.record-filters label {
  min-width: 0;
}

.record-detail-grid,
.technical-demand-summary-grid,
.report-card-grid,
.demand-stats-grid {
  gap: 10px;
}

.record-detail-card,
.technical-demand-summary-card,
.report-card,
.storage-card,
.email-settings-preview,
.email-preview,
.note-card {
  padding: 12px;
  border-radius: 10px;
}

.checklist-form {
  gap: 12px;
}

.checklist-builder-header,
.checklist-photo-flow,
.checklist-description-row,
.checklist-responses-block,
.permission-box {
  padding: 12px;
  border-radius: 10px;
}

.checklist-description-row {
  gap: 10px;
}

.checklist-description-options,
.checklist-response-row {
  padding: 10px;
  border-radius: 8px;
}

.record-thumb,
.record-thumb-empty {
  min-height: 160px;
  border-radius: 9px;
}

.record-export-menu,
.record-export-options {
  gap: 6px;
}

@media (min-width: 1101px) {
  .item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
  }

  .item-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 820px) {
  .content {
    padding: 14px;
  }

  .topbar {
    margin: 0 0 12px;
    min-height: 44px;
    padding: 10px;
  }

  .panel {
    padding: 14px;
  }
}

/* Notification dropdown must float above the scrollable content area. */
.content {
  isolation: isolate;
}

.topbar,
.topbar-actions,
.notification-bell-wrap {
  overflow: visible;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 9000;
}

.panel,
.notice {
  position: relative;
  z-index: 1;
}

.notification-bell-dropdown {
  position: fixed;
  top: 62px;
  right: 28px;
  z-index: 99999;
  width: min(380px, calc(100vw - 40px));
  max-height: min(460px, calc(100vh - 84px));
  overflow-y: auto;
  padding: 12px;
  border-radius: 12px;
  background: var(--fc-card);
  border: 1px solid var(--fc-line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.notification-bell-dropdown.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .notification-bell-dropdown {
    top: 58px;
    right: 14px;
    left: 14px;
    width: auto;
  }
}

/* Light theme text cleanup for technical demand cards. */
html:not([data-theme="dark"]) .technical-demand .technical-demand-title-row strong,
html:not([data-theme="dark"]) .technical-demand .technical-demand-description,
html:not([data-theme="dark"]) .technical-demand .technical-demand-flow strong,
html:not([data-theme="dark"]) .technical-demand .technical-demand-gps,
html:not([data-theme="dark"]) .technical-demand .technical-demand-gps strong,
html:not([data-theme="dark"]) .technical-demand .technical-demand-gps a,
html[data-theme="light"] .technical-demand .technical-demand-title-row strong,
html[data-theme="light"] .technical-demand .technical-demand-description,
html[data-theme="light"] .technical-demand .technical-demand-flow strong,
html[data-theme="light"] .technical-demand .technical-demand-gps,
html[data-theme="light"] .technical-demand .technical-demand-gps strong,
html[data-theme="light"] .technical-demand .technical-demand-gps a {
  color: var(--fc-text) !important;
}

/* Compact application header. */
.topbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 16px !important;
  min-height: 56px !important;
  margin: 0 0 18px !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  background: color-mix(in srgb, var(--fc-card) 96%, transparent) !important;
  border: 1px solid var(--fc-line) !important;
  box-shadow: none !important;
  position: sticky;
  top: 0;
  z-index: 9000;
}

.topbar-actions {
  flex: 0 0 auto;
  margin-left: auto !important;
  width: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

.topbar .icon-only-action,
.topbar .theme-toggle,
.topbar .notification-bell {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 999px;
  background: var(--fc-card);
}

@media (max-width: 640px) {
  .topbar {
    gap: 10px !important;
    padding: 10px 12px !important;
  }

}

/* Compact reports layout. */
.report-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.report-hero .panel-actions {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 10px;
}

.reports-workspace {
  gap: 12px;
}

.report-query-panel {
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  align-items: end;
  gap: 14px;
  padding: 14px;
  overflow: hidden;
}

.report-query-panel h3 {
  font-size: 19px;
}

.report-query-panel span {
  max-width: 210px;
  font-size: 12px;
  line-height: 1.35;
}

.report-filters {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  min-width: 0;
}

.report-filters label {
  min-width: 0;
}

.report-filters input,
.report-filters select {
  width: 100%;
}

#clearReportFiltersButton {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .report-query-panel {
    grid-template-columns: 1fr;
  }

  .report-query-panel span {
    max-width: none;
  }
}

/* Full system visual direction: compact dark SaaS, inspired by the provider/client mockup. */
html[data-theme="dark"],
html[data-theme="light"] {
  --fc-bg: #001b1f;
  --fc-sidebar: #001116;
  --fc-card: #00252a;
  --fc-card-2: #002d32;
  --fc-field: #001b20;
  --fc-line: rgba(148, 209, 199, 0.18);
  --fc-text: #eef8f6;
  --fc-muted: #99b5b1;
  --fc-primary: #00d5a7;
  --fc-primary-2: #00b48f;
  --fc-danger: #ff6b6b;
  --fc-shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.22);
  color-scheme: dark;
}

body {
  background: var(--fc-bg) !important;
  color: var(--fc-text) !important;
}

.dashboard {
  grid-template-columns: 280px minmax(0, 1fr) !important;
  background: var(--fc-bg) !important;
}

.sidebar {
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  padding: 20px 14px !important;
  border-right: 1px solid var(--fc-line) !important;
  background: var(--fc-sidebar) !important;
  color: var(--fc-text) !important;
  overflow-y: auto !important;
}

.sidebar .eyebrow {
  color: color-mix(in srgb, var(--fc-muted) 72%, transparent) !important;
}

.sidebar h1 {
  color: var(--fc-text) !important;
  font-size: 22px !important;
}

.sidebar nav {
  gap: 4px !important;
}

.nav-button,
.secondary {
  min-height: 40px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  color: #d7e7e4 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  font-size: 15px !important;
}

.nav-button:hover,
.nav-group-toggle.active-parent {
  background: rgba(0, 213, 167, 0.09) !important;
  border-color: rgba(0, 213, 167, 0.12) !important;
  color: #ffffff !important;
}

.nav-button.active {
  background: rgba(0, 213, 167, 0.18) !important;
  border-color: rgba(0, 213, 167, 0.28) !important;
  color: #ffffff !important;
}

.nav-submenu {
  margin: 6px 0 8px 12px !important;
  padding-left: 12px !important;
  border-left: 1px solid rgba(148, 209, 199, 0.18) !important;
}

#logoutButton {
  margin-top: auto !important;
  color: var(--fc-text) !important;
  border-color: rgba(148, 209, 199, 0.22) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.content {
  width: 100% !important;
  max-width: none !important;
  padding: 0 30px 34px !important;
  background: var(--fc-bg) !important;
}

.topbar {
  min-height: 66px !important;
  margin: 0 -30px 28px !important;
  padding: 12px 30px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--fc-line) !important;
  border-radius: 0 !important;
  background: color-mix(in srgb, var(--fc-bg) 88%, #000 12%) !important;
  box-shadow: none !important;
}

.panel-header h2,
.dashboard-section h3,
.item strong {
  color: var(--fc-text) !important;
}

.report-hero-text,
.dashboard-hero-text,
.item span,
.muted-text,
.panel-header p {
  color: var(--fc-muted) !important;
}

.topbar .icon-only-action,
.topbar .theme-toggle,
.topbar .notification-bell {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--fc-line) !important;
  color: var(--fc-text) !important;
}

.panel,
.notice,
.dashboard-section,
.storage-status-panel {
  padding: 22px 24px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--fc-card) 90%, #000 10%) !important;
  color: var(--fc-text) !important;
  box-shadow: none !important;
}

.panel-header {
  align-items: center !important;
  margin-bottom: 18px !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid var(--fc-line) !important;
}

.panel-header h2 {
  font-size: 28px !important;
  letter-spacing: -0.04em !important;
}

.panel-header button,
button:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.theme-toggle) {
  min-height: 44px !important;
  border-radius: 12px !important;
  background: var(--fc-primary) !important;
  color: #001316 !important;
  border: 0 !important;
  font-weight: 850 !important;
}

.panel-header button:hover,
button:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.theme-toggle):hover {
  background: var(--fc-primary-2) !important;
}

.secondary-action,
.secondary,
.item-actions .button-link {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--fc-text) !important;
  border: 1px solid var(--fc-line) !important;
}

.danger,
.item-actions .danger,
.danger-light,
.ghost-danger {
  background: rgba(255, 107, 107, 0.12) !important;
  color: #ff8f8f !important;
  border: 1px solid rgba(255, 107, 107, 0.34) !important;
}

input,
select,
textarea {
  min-height: 44px !important;
  border-radius: 10px !important;
  border: 1px solid var(--fc-line) !important;
  background: var(--fc-field) !important;
  color: var(--fc-text) !important;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--fc-muted) 72%, transparent) !important;
}

label {
  color: var(--fc-muted) !important;
}

.record-filters,
.dashboard-report-filters,
.report-query-panel,
.item,
.metric-card,
.annotation-note-card,
.technical-demand,
.demand-card {
  border: 1px solid var(--fc-line) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--fc-card) 88%, #000 12%) !important;
  color: var(--fc-text) !important;
  box-shadow: none !important;
}

.item {
  padding: 14px 16px !important;
  min-height: 0 !important;
}

.item:hover,
.annotation-note-card:hover {
  border-color: rgba(0, 213, 167, 0.38) !important;
  box-shadow: 0 12px 36px rgba(0, 213, 167, 0.06) !important;
}

.record-filters {
  padding: 14px !important;
  gap: 10px !important;
}

.dashboard-metrics {
  gap: 12px !important;
}

.metric-card {
  min-height: 126px !important;
  padding: 18px !important;
}

.record-status,
.priority-badge,
.priority-chip,
.badge {
  border-radius: 999px !important;
}

.record-status.status-done,
.status-concluida {
  background: rgba(0, 213, 167, 0.14) !important;
  color: #63f0c8 !important;
  border-color: rgba(0, 213, 167, 0.32) !important;
}

.record-status.status-open,
.status-aberto {
  background: rgba(255, 204, 85, 0.12) !important;
  color: #ffd36a !important;
  border-color: rgba(255, 204, 85, 0.26) !important;
}

body:has(#companyForm:not(.hidden), #userForm:not(.hidden), #siteForm:not(.hidden), #contractForm:not(.hidden), #checklistForm:not(.hidden), #demandForm:not(.hidden), #technicalDemandForm:not(.hidden)) {
  overflow: hidden;
}

body:has(#companyForm:not(.hidden), #userForm:not(.hidden), #siteForm:not(.hidden), #contractForm:not(.hidden), #checklistForm:not(.hidden), #demandForm:not(.hidden), #technicalDemandForm:not(.hidden)) .content,
body:has(#companyForm:not(.hidden), #userForm:not(.hidden), #siteForm:not(.hidden), #contractForm:not(.hidden), #checklistForm:not(.hidden), #demandForm:not(.hidden), #technicalDemandForm:not(.hidden)) .panel {
  isolation: auto !important;
  z-index: auto !important;
}

body:has(#companyForm:not(.hidden), #userForm:not(.hidden), #siteForm:not(.hidden), #contractForm:not(.hidden), #checklistForm:not(.hidden), #demandForm:not(.hidden), #technicalDemandForm:not(.hidden))::before {
  content: none;
}

#companyForm:not(.hidden),
#userForm:not(.hidden),
#siteForm:not(.hidden),
#contractForm:not(.hidden),
#checklistForm:not(.hidden),
#demandForm:not(.hidden),
#technicalDemandForm:not(.hidden) {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 10000 !important;
  width: min(900px, calc(100vw - 42px)) !important;
  max-height: calc(100vh - 48px) !important;
  overflow: auto !important;
  transform: translate(-50%, -50%) !important;
  padding: 26px 30px !important;
  border: 1px solid rgba(0, 213, 167, 0.28) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--fc-card) 92%, #001016 8%) !important;
  color: var(--fc-text) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.44) !important;
}

.annotation-modal-card {
  background: color-mix(in srgb, var(--fc-card) 92%, #001016 8%) !important;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 5, 7, 0.68);
}

#technicalDemandPreviewModal {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 260px !important;
  z-index: 10050 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  overflow: hidden !important;
}

#technicalDemandPreviewModal.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  #technicalDemandPreviewModal {
    left: 0 !important;
  }
}

.app-modal-card {
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 26px 30px;
  border: 1px solid rgba(0, 213, 167, 0.28);
  border-radius: 14px;
  background: color-mix(in srgb, var(--fc-card) 92%, #001016 8%);
  color: var(--fc-text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
}

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

.app-modal-card-confirm .app-modal-actions {
  margin-top: 8px;
}

.app-modal-card-confirm .app-modal-actions button {
  min-width: 116px;
}

.app-modal-card-wide {
  width: min(860px, 100%);
}

#technicalDemandPreviewModal .app-modal-card-wide {
  width: min(1040px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  margin: auto !important;
  transform: none !important;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 0;
}

#technicalDemandPreviewModal .app-modal-header {
  margin: 0;
  padding: 22px 28px 14px;
  border-bottom: 1px solid var(--fc-border);
}

#technicalDemandPreviewModal .app-modal-body {
  overflow: auto;
  padding: 16px 28px;
}

#technicalDemandPreviewContent {
  display: grid;
  gap: 14px;
}

#technicalDemandPreviewModal .app-modal-actions {
  margin: 0;
  padding: 14px 28px 22px;
  border-top: 1px solid var(--fc-border);
  background: color-mix(in srgb, var(--fc-card) 92%, #001016 8%);
}

#technicalDemandPreviewModal .app-modal-actions button {
  min-width: 108px;
}

#technicalDemandPreviewModal .app-modal-actions .secondary-action {
  background: rgba(0, 213, 167, 0.08) !important;
  color: var(--fc-text) !important;
  border: 1px solid var(--fc-border) !important;
}

#technicalDemandPreviewModal .preview-section {
  gap: 10px;
}

#technicalDemandPreviewModal .modal-detail-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#technicalDemandPreviewModal .modal-detail-item {
  min-height: 74px;
  padding: 10px 12px;
  border-radius: 8px;
}

#technicalDemandPreviewModal .modal-detail-item strong {
  font-size: 11px;
}

#technicalDemandPreviewModal .modal-detail-item span {
  font-size: 15px;
  line-height: 1.3;
}

#technicalDemandPreviewModal .preview-conclusion-section .modal-detail-list {
  grid-template-columns: 1fr;
}

#technicalDemandPreviewModal .preview-conclusion-section .modal-detail-item {
  min-height: 0;
}

#technicalDemandPreviewModal .preview-checklist-item,
#technicalDemandPreviewModal .preview-component-item,
#technicalDemandPreviewModal .preview-record-item {
  padding: 10px 12px;
  border-radius: 8px;
}

@media (max-width: 900px) {
  #technicalDemandPreviewModal .modal-detail-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  #technicalDemandPreviewModal {
    left: 0 !important;
    padding: 10px !important;
  }

  #technicalDemandPreviewModal .app-modal-card-wide {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
  }

  #technicalDemandPreviewModal .app-modal-header,
  #technicalDemandPreviewModal .app-modal-body,
  #technicalDemandPreviewModal .app-modal-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  #technicalDemandPreviewModal .modal-detail-list {
    grid-template-columns: 1fr;
  }
}

#usersPanel .user-filters {
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.85fr) auto;
  gap: 12px;
  align-items: end;
}

#usersPanel .user-filters label {
  min-width: 0;
}

#usersPanel #clearUserFiltersButton,
html[data-theme="light"] #usersPanel #clearUserFiltersButton {
  width: auto !important;
  min-width: 104px !important;
  max-width: 124px !important;
  min-height: 44px !important;
  padding: 10px 18px !important;
  justify-self: end;
}

@media (max-width: 860px) {
  #usersPanel .user-filters {
    grid-template-columns: 1fr;
  }

  #usersPanel #clearUserFiltersButton,
  html[data-theme="light"] #usersPanel #clearUserFiltersButton {
    justify-self: stretch;
    max-width: none !important;
  }
}

.app-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.app-modal-header h3 {
  margin: 0 0 6px;
  color: var(--fc-text);
  font-size: 24px;
}

.app-modal-header p,
.modal-summary {
  margin: 0;
  color: var(--fc-muted);
  font-weight: 650;
}

.app-modal .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--fc-muted);
  background: transparent !important;
  font-size: 28px;
  line-height: 1;
}

.app-modal .icon-button:hover {
  color: var(--fc-text);
  background: rgba(0, 213, 167, 0.10) !important;
}

.app-modal-body {
  display: grid;
  gap: 14px;
}

.app-modal-body textarea {
  width: 100%;
  min-height: 120px !important;
  resize: vertical;
}

.modal-detail-list {
  display: grid;
  gap: 10px;
}

.modal-detail-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  background: rgba(0, 213, 167, 0.06);
}

.modal-detail-item strong {
  color: var(--fc-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.modal-detail-item span {
  color: var(--fc-text);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.preview-section {
  display: grid;
  gap: 12px;
}

.preview-section h4 {
  margin: 4px 0 0;
  color: var(--fc-text);
  font-size: 16px;
}

.preview-checklist-title {
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(0, 213, 167, 0.24);
  border-radius: 999px;
  background: rgba(0, 213, 167, 0.10);
  color: var(--fc-accent);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.preview-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 180px));
  gap: 12px;
  align-items: start;
}

.preview-photo {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  background: rgba(0, 213, 167, 0.05);
  max-width: 180px;
}

.preview-photo img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.preview-photo-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.preview-photo figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  color: var(--fc-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.preview-photo figcaption a {
  color: var(--fc-accent);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.preview-photo figcaption a:hover {
  text-decoration: underline;
}

.preview-photo-caption-action {
  color: var(--fc-muted);
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.preview-photo-caption-action:hover {
  text-decoration: underline;
}

.photo-preview-modal {
  z-index: 11000;
}

.photo-preview-card {
  width: min(720px, 100%);
  max-height: min(82dvh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
}

.photo-preview-header {
  align-items: center;
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--fc-border);
  background: #ffffff;
}

.photo-preview-header h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.photo-preview-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.photo-preview-body {
  display: grid;
  place-items: center;
  min-height: 0;
  max-height: min(64vh, 620px);
  padding: 12px;
  overflow: auto;
  background: #07111f;
  overscroll-behavior: contain;
}

.photo-preview-modal.is-zoomed .photo-preview-body {
  place-items: start;
}

.photo-preview-body img {
  display: block;
  max-width: 100%;
  max-height: min(64vh, 620px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.photo-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.photo-preview-toolbar button,
html[data-theme="light"] .photo-preview-toolbar button,
html[data-theme="dark"] .photo-preview-toolbar button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 1px solid rgba(31, 64, 112, 0.18) !important;
  border-radius: 7px !important;
  background: #eef3f8 !important;
  color: #122440 !important;
  box-shadow: none !important;
  transform: none !important;
}

.photo-preview-toolbar button:hover,
html[data-theme="light"] .photo-preview-toolbar button:hover,
html[data-theme="dark"] .photo-preview-toolbar button:hover {
  border-color: rgba(31, 64, 112, 0.36) !important;
  background: #e2eaf3 !important;
}

.photo-preview-toolbar button:disabled {
  cursor: default !important;
  opacity: 0.42 !important;
}

.photo-preview-control-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo-preview-toolbar span {
  min-width: 42px;
  color: var(--fc-muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

#technicalDemandPreviewModal .preview-photo .preview-photo-caption-action,
html[data-theme="light"] #technicalDemandPreviewModal .preview-photo .preview-photo-caption-action,
html[data-theme="dark"] #technicalDemandPreviewModal .preview-photo .preview-photo-caption-action {
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--fc-muted) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transform: none !important;
  filter: none !important;
}

#technicalDemandPreviewModal .preview-photo .preview-photo-caption-action:hover {
  color: var(--fc-text) !important;
  text-decoration: underline !important;
  background: transparent !important;
  transform: none !important;
  filter: none !important;
}

#photoPreviewModal.photo-preview-modal {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 280px !important;
  width: calc(100vw - 280px) !important;
  z-index: 11000 !important;
  display: grid !important;
  place-items: center !important;
  box-sizing: border-box !important;
  padding: 24px !important;
  overflow: hidden !important;
}

#photoPreviewModal.photo-preview-modal.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  #photoPreviewModal.photo-preview-modal {
    left: 0 !important;
    width: 100vw !important;
    padding: 12px !important;
  }

  .photo-preview-card {
    width: min(720px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
  }
}

@media (max-width: 560px) {
  .photo-preview-header {
    padding: 10px 12px;
  }

  .photo-preview-header h3 {
    max-width: 84px;
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .photo-preview-header-actions {
    gap: 6px;
  }

  .photo-preview-toolbar {
    gap: 4px;
  }

  .photo-preview-toolbar button,
  html[data-theme="light"] .photo-preview-toolbar button,
  html[data-theme="dark"] .photo-preview-toolbar button {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
  }

  .photo-preview-toolbar span {
    min-width: 38px;
  }

  .photo-preview-body {
    max-height: calc(100dvh - 82px);
    padding: 8px;
  }
}

.technical-demand-components-history {
  display: grid;
  gap: 12px;
}

.preview-component-item {
  display: grid;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  background: rgba(31, 64, 112, 0.05);
}

.preview-component-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-component-header strong {
  color: var(--fc-text);
  overflow-wrap: anywhere;
}

.preview-component-header span {
  color: var(--fc-muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.technical-demand-records-history {
  display: grid;
  gap: 12px;
}

.preview-record-item {
  display: grid;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  background: rgba(0, 213, 167, 0.05);
}

.preview-record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-record-header strong {
  color: var(--fc-text);
  overflow-wrap: anywhere;
}

.preview-record-header span {
  color: var(--fc-muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.preview-record-checklist {
  display: grid;
  gap: 10px;
}

.preview-record-checklist > strong {
  color: var(--fc-text);
  font-size: 13px;
}

.preview-checklist-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  background: rgba(0, 213, 167, 0.05);
}

.preview-checklist-item div {
  display: grid;
  gap: 5px;
}

.preview-checklist-item strong {
  color: var(--fc-text);
}

.preview-checklist-item span {
  color: var(--fc-text);
  font-weight: 750;
}

.preview-checklist-item small {
  color: var(--fc-muted);
  overflow-wrap: anywhere;
}

.preview-checklist-item .preview-photo {
  width: 100%;
  max-width: 180px;
}

@media (max-width: 680px) {
  .preview-checklist-item {
    grid-template-columns: 1fr;
  }
}

.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.app-modal-actions button {
  min-width: 132px;
}

#demandForm.demand-modal-form {
  position: fixed !important;
  top: 50vh !important;
  left: calc(280px + ((100vw - 280px) / 2)) !important;
  z-index: 10020 !important;
  width: min(980px, calc(100vw - 328px)) !important;
  max-height: calc(100vh - 72px) !important;
  overflow: auto !important;
  transform: translate(-50%, -50%) !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-content: start !important;
  gap: 12px 16px !important;
  padding: 26px 30px 0 !important;
  border: 1px solid rgba(0, 213, 167, 0.28) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--fc-card) 92%, #001016 8%) !important;
  color: var(--fc-text) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.44) !important;
}

#demandForm.demand-modal-form .full-row {
  grid-column: 1 / -1;
}

#demandForm.demand-modal-form label:has(#demandEmailTargetInput) {
  grid-column: 1 / 2;
}

#demandForm.demand-modal-form label:has(#demandEmailCcInput) {
  grid-column: 2 / 3;
}

#demandForm.demand-modal-form .demand-email-toggle {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#demandEmailCcInput {
  width: 100%;
  min-height: 44px !important;
}

.demand-form-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin: 8px -30px 0;
  padding: 14px 30px 18px;
  border-top: 1px solid var(--fc-line);
  background: color-mix(in srgb, var(--fc-card) 94%, #001016 6%);
}

.demand-form-footer button {
  width: 100%;
}

@media (max-width: 920px) {
  .dashboard {
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    position: relative !important;
    height: auto !important;
  }

  .content {
    padding: 0 14px 24px !important;
  }

  .topbar {
    margin: 0 -14px 18px !important;
    padding: 10px 14px !important;
  }

  #demandForm.demand-modal-form {
    top: 50vh !important;
    left: 50vw !important;
    width: calc(100vw - 28px) !important;
    max-height: calc(100vh - 28px) !important;
    grid-template-columns: 1fr !important;
  }

  #demandForm.demand-modal-form label:has(#demandEmailTargetInput),
  #demandForm.demand-modal-form label:has(#demandEmailCcInput) {
    grid-column: 1 / -1;
  }

  .demand-form-footer {
    grid-template-columns: 1fr;
  }
}

/* Cleaner reports filter bar. */
#reportsPanel .reports-workspace {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
}

#reportsPanel .report-query-panel {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-items: stretch !important;
  gap: 14px !important;
  padding: 16px 18px !important;
  overflow: visible !important;
}

#reportsPanel .report-query-panel > div:first-child {
  display: flex !important;
  align-items: end !important;
  justify-content: space-between !important;
  gap: 14px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid var(--fc-line) !important;
}

#reportsPanel .report-query-panel > div:first-child .eyebrow,
#reportsPanel .report-query-panel > div:first-child h3,
#reportsPanel .report-query-panel > div:first-child span {
  margin: 0 !important;
}

#reportsPanel .report-query-panel > div:first-child h3 {
  font-size: 18px !important;
  line-height: 1.1 !important;
}

#reportsPanel .report-query-panel > div:first-child span {
  max-width: none !important;
  color: var(--fc-muted) !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  text-align: right !important;
}

#reportsPanel .report-filters {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(130px, 1fr)) minmax(140px, 0.7fr) !important;
  align-items: end !important;
  gap: 10px !important;
  min-width: 0 !important;
}

#reportsPanel .report-filters label {
  display: grid !important;
  gap: 6px !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#reportsPanel .report-filters input,
#reportsPanel .report-filters select {
  width: 100% !important;
  min-height: 44px !important;
}

#reportsPanel #clearReportFiltersButton {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 44px !important;
  align-self: end !important;
  white-space: nowrap !important;
}

@media (max-width: 1500px) {
  #reportsPanel .report-filters {
    grid-template-columns: repeat(4, minmax(160px, 1fr)) !important;
  }
}

@media (max-width: 980px) {
  #reportsPanel .report-query-panel > div:first-child {
    display: grid !important;
    align-items: start !important;
  }

  #reportsPanel .report-query-panel > div:first-child span {
    text-align: left !important;
  }

  #reportsPanel .report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  #reportsPanel .report-filters {
    grid-template-columns: 1fr !important;
  }
}

/* Restore a true light theme while keeping the green product accent. */
html[data-theme="light"] {
  --fc-bg: #f4f7f6;
  --fc-sidebar: #ffffff;
  --fc-card: #ffffff;
  --fc-card-2: #f8fbfa;
  --fc-field: #ffffff;
  --fc-line: rgba(17, 24, 39, 0.12);
  --fc-text: #101828;
  --fc-muted: #475467;
  --fc-primary: #16836f;
  --fc-primary-2: #0f6f5d;
  --fc-danger: #b94a48;
  --fc-shadow-soft: 0 14px 34px rgba(15, 23, 42, 0.08);
  color-scheme: light;
}

html[data-theme="light"] body,
html[data-theme="light"] .dashboard,
html[data-theme="light"] .content {
  background: var(--fc-bg) !important;
  color: var(--fc-text) !important;
}

html[data-theme="light"] .sidebar,
html[data-theme="light"] .topbar,
html[data-theme="light"] .panel,
html[data-theme="light"] .notice,
html[data-theme="light"] .dashboard-section,
html[data-theme="light"] .storage-status-panel,
html[data-theme="light"] .record-filters,
html[data-theme="light"] .dashboard-report-filters,
html[data-theme="light"] .report-query-panel,
html[data-theme="light"] .item,
html[data-theme="light"] .metric-card,
html[data-theme="light"] .annotation-note-card,
html[data-theme="light"] .technical-demand,
html[data-theme="light"] .demand-card,
html[data-theme="light"] .report-card,
html[data-theme="light"] .report-results-panel {
  background: var(--fc-card) !important;
  color: var(--fc-text) !important;
  border-color: var(--fc-line) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .topbar {
  background: #ffffff !important;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: var(--fc-field) !important;
  color: var(--fc-text) !important;
  border-color: var(--fc-line) !important;
}

html[data-theme="light"] .nav-button,
html[data-theme="light"] .secondary,
html[data-theme="light"] .secondary-action,
html[data-theme="light"] .item-actions .button-link,
html[data-theme="light"] .topbar .icon-only-action,
html[data-theme="light"] .topbar .theme-toggle,
html[data-theme="light"] .topbar .notification-bell {
  color: var(--fc-text) !important;
  background: transparent !important;
  border-color: transparent !important;
}

html[data-theme="light"] .topbar .icon-only-action,
html[data-theme="light"] .topbar .theme-toggle,
html[data-theme="light"] .topbar .notification-bell {
  background: #ffffff !important;
  border-color: var(--fc-line) !important;
}

html[data-theme="light"] .nav-button:hover,
html[data-theme="light"] .nav-group-toggle.active-parent {
  background: rgba(22, 131, 111, 0.08) !important;
  border-color: rgba(22, 131, 111, 0.16) !important;
  color: var(--fc-text) !important;
}

html[data-theme="light"] .nav-button.active {
  background: rgba(22, 131, 111, 0.14) !important;
  border-color: rgba(22, 131, 111, 0.24) !important;
  color: var(--fc-text) !important;
}

html[data-theme="light"] .panel-header button,
html[data-theme="light"] button:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.theme-toggle) {
  background: var(--fc-primary) !important;
  color: #ffffff !important;
}

html[data-theme="light"] .secondary-action,
html[data-theme="light"] .secondary,
html[data-theme="light"] .item-actions .button-link {
  background: #ffffff !important;
  color: var(--fc-text) !important;
  border: 1px solid var(--fc-line) !important;
}

html[data-theme="light"] .record-status.status-done,
html[data-theme="light"] .status-concluida {
  background: rgba(22, 131, 111, 0.10) !important;
  color: #0f6f5d !important;
  border-color: rgba(22, 131, 111, 0.24) !important;
}

html[data-theme="light"] .record-status.status-open,
html[data-theme="light"] .status-aberto {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #92400e !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
}

html[data-theme="light"] .sidebar {
  background:
    radial-gradient(circle at 18% 0%, rgba(101, 214, 166, 0.12), transparent 34%),
    linear-gradient(180deg, #12232b 0%, #001f22 100%) !important;
  color: rgba(216, 232, 229, 0.88) !important;
  border-right-color: rgba(216, 232, 229, 0.12) !important;
  box-shadow: 14px 0 34px rgba(8, 19, 29, 0.08) !important;
}

html[data-theme="light"] .sidebar .sidebar-brand strong,
html[data-theme="light"] .sidebar .sidebar-user strong,
html[data-theme="light"] .sidebar h1 {
  color: #f2fbf8 !important;
}

html[data-theme="light"] .sidebar .sidebar-brand span,
html[data-theme="light"] .sidebar .sidebar-user span,
html[data-theme="light"] .sidebar .nav-section-title {
  color: rgba(216, 232, 229, 0.62) !important;
}

html[data-theme="light"] .sidebar .nav-button,
html[data-theme="light"] .sidebar .secondary {
  color: rgba(216, 232, 229, 0.88) !important;
  background: transparent !important;
  border-color: transparent !important;
}

html[data-theme="light"] .sidebar .nav-button:hover,
html[data-theme="light"] .sidebar .secondary:hover,
html[data-theme="light"] .sidebar .nav-group-toggle.active-parent {
  background: rgba(101, 214, 166, 0.10) !important;
  color: #ffffff !important;
  border-color: rgba(101, 214, 166, 0.18) !important;
}

html[data-theme="light"] .sidebar .nav-button.active {
  background: linear-gradient(135deg, rgba(101, 214, 166, 0.20), rgba(22, 100, 90, 0.42)) !important;
  color: #ffffff !important;
  border-color: rgba(101, 214, 166, 0.32) !important;
  box-shadow: inset 3px 0 0 #65d6a6, 0 8px 22px rgba(0, 0, 0, 0.12) !important;
}

html[data-theme="light"] .sidebar .secondary {
  background: rgba(216, 232, 229, 0.08) !important;
  color: rgba(216, 232, 229, 0.92) !important;
  border-color: rgba(216, 232, 229, 0.22) !important;
}

html[data-theme="light"] .sidebar-logo {
  background: rgba(101, 214, 166, 0.14) !important;
  color: #09d4b0 !important;
  border-color: rgba(101, 214, 166, 0.42) !important;
}

/* Checklist form as a contained modal. */
#checklistForm:not(.hidden) {
  top: calc(50vh + 36px) !important;
  left: calc(280px + ((100vw - 280px) / 2)) !important;
  z-index: 10030 !important;
  width: min(980px, calc(100vw - 328px)) !important;
  max-height: calc(100vh - 120px) !important;
  align-content: start !important;
  gap: 12px !important;
  padding: 22px 26px !important;
}

#checklistForm .checklist-main-fields {
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

#checklistForm .contract-access-box,
#checklistForm .checklist-photo-flow,
#checklistForm .checklist-builder-header,
#checklistForm .checklist-description-row,
#checklistForm .checklist-responses-block {
  padding: 12px 14px !important;
  border-radius: 24px !important;
}

#checklistForm .contract-access-box {
  gap: 6px !important;
}

#checklistForm .contract-access-box select {
  min-height: 42px !important;
}

#checklistForm .checklist-photo-flow {
  gap: 8px !important;
}

#checklistForm .checklist-photo-flow label {
  min-height: 32px !important;
  margin: 0 !important;
}

#checklistForm .checklist-builder-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
}

#checklistForm .checklist-builder-header button {
  min-width: 180px !important;
}

#checklistForm .checklist-description-row {
  grid-template-columns: 32px minmax(0, 1fr) auto !important;
  gap: 10px !important;
}

#checklistForm .checklist-description-options {
  padding: 10px !important;
}

#checklistForm .checklist-response-row {
  grid-template-columns: minmax(170px, 1fr) auto auto auto !important;
}

@media (max-width: 920px) {
  #checklistForm:not(.hidden) {
    top: 50vh !important;
    left: 50vw !important;
    width: calc(100vw - 28px) !important;
    max-height: calc(100vh - 28px) !important;
  }

  #checklistForm .checklist-builder-header,
  #checklistForm .checklist-description-row,
  #checklistForm .checklist-response-row {
    grid-template-columns: 1fr !important;
  }

  #checklistForm .checklist-builder-header button {
    width: 100% !important;
  }
}

/* Checklist stays inline because the builder is too large for a modal flow. */
body:has(#checklistForm:not(.hidden)) {
  overflow: auto !important;
}

#checklistForm:not(.hidden) {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  width: 100% !important;
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
  transform: none !important;
  margin: 18px 0 !important;
  padding: 16px !important;
  box-shadow: none !important;
}

#checklistForm .checklist-main-fields {
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.65fr) !important;
}

#checklistForm .contract-access-box,
#checklistForm .checklist-photo-flow,
#checklistForm .checklist-builder-header,
#checklistForm .checklist-description-row,
#checklistForm .checklist-responses-block {
  background: var(--fc-card) !important;
}

@media (max-width: 920px) {
  #checklistForm .checklist-main-fields {
    grid-template-columns: 1fr !important;
  }
}

/* Compact record filters. */
#recordsPanel #recordFilters {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: end !important;
  gap: 10px !important;
  padding: 14px 16px !important;
  margin-bottom: 16px !important;
  overflow: hidden !important;
}

#recordsPanel #recordFilters label {
  display: grid !important;
  gap: 6px !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#recordsPanel #recordFilters input,
#recordsPanel #recordFilters select {
  width: 100% !important;
  min-height: 42px !important;
}

#recordsPanel #clearRecordFiltersButton {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  align-self: end !important;
  white-space: nowrap !important;
}

@media (max-width: 1500px) {
  #recordsPanel #recordFilters {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  #recordsPanel #recordFilters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 560px) {
  #recordsPanel #recordFilters {
    grid-template-columns: 1fr !important;
  }
}

/* Export menu should follow the current theme, without white gutters. */
.record-export-options {
  min-width: 132px !important;
  gap: 6px !important;
  padding: 4px 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.record-export-options button {
  width: 100% !important;
  justify-content: flex-start !important;
  min-height: 42px !important;
  border-radius: 10px !important;
  background: var(--fc-primary) !important;
  color: #001316 !important;
  border: 0 !important;
  padding: 0 14px !important;
  text-align: left !important;
}

.record-export-options button:hover {
  background: var(--fc-primary-2) !important;
  color: #001316 !important;
}

html[data-theme="light"] .record-export-options {
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme="light"] .record-export-options button {
  background: var(--fc-primary) !important;
  color: #ffffff !important;
}

/* Stability guard: hover effects must not move elements or trigger layout jitter. */
button:hover,
.item:hover,
.annotation-note-card:hover,
.nav-button:hover,
.secondary:hover,
.secondary-action:hover,
.item-actions button:hover,
.item-actions .button-link:hover,
.panel-header button:hover,
.theme-toggle:hover,
.notification-bell:hover,
.icon-only-action:hover,
.record-export-trigger:hover,
.record-export-options button:hover,
.technical-demand-gps a:hover,
.photo-actions a:hover {
  transform: none !important;
  filter: none !important;
}

html,
body {
  scrollbar-gutter: stable !important;
}

.app-shell,
.content,
.sidebar,
.panel {
  backface-visibility: hidden;
}

/* Sidebar inspired by the compact NET reference */
.dashboard {
  grid-template-columns: 260px minmax(0, 1fr) !important;
}

.sidebar {
  display: grid !important;
  grid-template-rows: auto 1fr auto !important;
  gap: 18px !important;
  padding: 22px 10px 16px 12px !important;
  overflow: hidden !important;
  background: #001419 !important;
  color: #effffb !important;
  border-right: 1px solid rgba(101, 214, 166, 0.14) !important;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 213, 167, 0.32);
  border-radius: 14px;
  background: rgba(0, 213, 167, 0.10);
  color: #00d5a7;
  font-size: 22px;
  font-weight: 900;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #ffffff;
  padding: 5px;
}

.sidebar-logo.has-image {
  background: #ffffff;
  color: transparent;
}

.sidebar-brand strong,
.sidebar-user strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand span:not(.sidebar-logo),
.sidebar-user span:not(.sidebar-user-icon) {
  display: block;
  margin-top: 2px;
  color: #00d5a7;
  font-size: 13px;
  line-height: 1.1;
}

.sidebar nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 4px 4px 10px 0 !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.38) transparent;
}

.sidebar nav::-webkit-scrollbar {
  width: 8px;
}

.sidebar nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.nav-section-title {
  margin: 20px 2px 8px;
  color: #9dc9c2;
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
}

.nav-section-title:first-child {
  margin-top: 4px;
}

.nav-button,
.secondary {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 40px !important;
  padding: 0 10px !important;
  border-radius: 12px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #e4f1ee !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  box-shadow: none !important;
}

.nav-button span:last-child,
.secondary span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  width: 20px;
  min-width: 20px;
  display: inline-flex;
  justify-content: center;
  color: currentColor;
  font-size: 16px;
  line-height: 1;
  opacity: 0.96;
}

.nav-button:hover,
.secondary:hover,
.nav-group-toggle.active-parent {
  background: rgba(0, 213, 167, 0.08) !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

.nav-button.active {
  background: rgba(0, 213, 167, 0.13) !important;
  border-color: rgba(0, 213, 167, 0.08) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.nav-button.active .nav-icon {
  color: #ffffff;
}

.nav-group {
  display: grid !important;
  gap: 4px !important;
}

.nav-group-toggle {
  justify-content: space-between !important;
}

.nav-group-toggle > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  transform: none !important;
}

.nav-caret {
  width: auto;
  min-width: auto;
  color: #d4eee8;
  transition: transform 160ms ease;
}

.nav-group-toggle[aria-expanded="false"] span {
  transform: none;
}

.nav-group-toggle[aria-expanded="false"] .nav-caret {
  transform: rotate(-90deg);
}

.nav-submenu {
  display: grid;
  gap: 4px;
  margin: 4px 0 8px 15px;
  padding-left: 14px;
  border-left: 1px solid rgba(216, 232, 229, 0.18);
}

.nav-submenu.hidden {
  display: none !important;
}

.nav-button.hidden,
.sidebar .nav-button.hidden,
.sidebar .nav-button[hidden] {
  display: none !important;
}

.nav-subitem {
  padding-left: 8px !important;
  font-size: 13.5px !important;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  background: #001419;
}

.sidebar-user {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 4px;
}

.sidebar-user-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #00d5a7;
  font-size: 18px;
}

.sidebar-user strong {
  font-size: 14px;
}

.sidebar-user span:not(.sidebar-user-icon) {
  color: #9bd4ca;
  font-size: 13px;
}

#logoutButton {
  position: static !important;
  justify-content: flex-start !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  background: transparent !important;
  border-color: transparent !important;
  color: #eef8f6 !important;
}

#logoutButton:hover {
  background: rgba(0, 213, 167, 0.08) !important;
  color: #ffffff !important;
}

@media (max-width: 820px) {
  .dashboard {
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

.sidebar nav {
    max-height: none;
  }
}

.topbar-actions {
  align-items: center;
  gap: 14px;
}

.theme-toggle,
.notification-bell,
.topbar .theme-toggle,
.topbar .notification-bell,
html[data-theme="light"] .topbar .theme-toggle,
html[data-theme="light"] .topbar .notification-bell {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--fc-text, var(--text)) !important;
  box-shadow: none !important;
}

.theme-toggle:hover,
.notification-bell:hover,
.topbar .theme-toggle:hover,
.topbar .notification-bell:hover,
html[data-theme="light"] .topbar .theme-toggle:hover,
html[data-theme="light"] .topbar .notification-bell:hover {
  background: transparent !important;
  color: var(--fc-accent, var(--primary)) !important;
  transform: none !important;
}

.theme-toggle svg,
.notification-bell-icon svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-bell {
  justify-content: center;
  gap: 0;
}

.notification-bell-icon {
  width: auto !important;
  height: auto !important;
  color: inherit !important;
  font-size: 0 !important;
}

.notification-bell-count {
  top: -8px;
  right: -8px;
}

.email-compact-table {
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.email-compact-header,
.email-compact-row {
  min-width: 720px;
  grid-template-columns: minmax(105px, 0.8fr) minmax(120px, 0.9fr) minmax(210px, 1.55fr) minmax(150px, 1fr) 132px !important;
  gap: 12px !important;
}

.email-row-actions {
  width: 132px;
  justify-content: flex-end !important;
  gap: 6px !important;
}

.email-row-actions button,
html[data-theme="light"] .email-row-actions button {
  min-width: 62px !important;
  width: 62px !important;
  min-height: 42px !important;
  padding: 8px 6px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

.compact-table {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
}

.compact-header,
.compact-row {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
}

.compact-header {
  color: var(--muted);
  font-weight: 800;
  border-bottom: 1px solid var(--line);
}

.compact-header span:last-child {
  text-align: right;
}

.compact-row {
  min-height: 58px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.compact-row:last-child {
  border-bottom: 0;
}

.compact-row > span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-row > span:first-child b {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  color: var(--primary);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.compact-row-actions button,
html[data-theme="light"] .compact-row-actions button {
  min-width: 62px !important;
  min-height: 42px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

.compact-table-users .compact-header,
.compact-table-users .compact-row {
  min-width: 0;
  grid-template-columns: minmax(150px, .95fr) minmax(230px, 1.35fr) minmax(130px, .78fr) minmax(240px, 1.35fr) 190px;
  gap: 8px;
  padding-left: 10px;
  padding-right: 10px;
}

.compact-table-users .compact-row-actions {
  width: 186px;
  flex-wrap: nowrap;
  gap: 5px;
}

.compact-table-users .compact-row-actions button,
html[data-theme="light"] .compact-table-users .compact-row-actions button {
  min-width: 56px !important;
  width: 56px !important;
  min-height: 38px !important;
  padding: 7px 5px !important;
  font-size: 12px !important;
}

.device-status {
  display: inline-flex;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  white-space: normal;
}

.device-status-approved {
  border: 1px solid rgba(103, 222, 178, 0.32);
  background: rgba(103, 222, 178, 0.12);
  color: #8de8c6;
}

.device-status-pending {
  border: 1px solid rgba(255, 205, 86, 0.35);
  background: rgba(255, 205, 86, 0.12);
  color: #ffd86b;
}

.device-status-empty {
  border: 1px solid var(--fc-border);
  background: rgba(148, 163, 184, 0.10);
  color: var(--fc-muted);
}

.compact-table-equipment .compact-header,
.compact-table-equipment .compact-row {
  min-width: 920px;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, .75fr) minmax(250px, 1.45fr) minmax(150px, .9fr) minmax(150px, .9fr) 132px;
}

.compact-table-profiles .compact-header,
.compact-table-profiles .compact-row {
  min-width: 640px;
  grid-template-columns: minmax(210px, 1.35fr) minmax(190px, 1fr) minmax(140px, .8fr) 132px;
}

.compact-table-contracts .compact-header,
.compact-table-contracts .compact-row {
  min-width: 700px;
  grid-template-columns: minmax(280px, 1.4fr) minmax(260px, 1.2fr) 218px;
}

.compact-table-contracts .compact-row > span:first-child b {
  font-size: 14px;
  padding: 6px 12px;
}

.compact-table-contracts .compact-row-actions {
  width: 218px;
}

.compact-table-checklists .compact-header,
.compact-table-checklists .compact-row {
  min-width: 840px;
  grid-template-columns: minmax(220px, 1.25fr) minmax(190px, 1fr) minmax(120px, .7fr) minmax(250px, 1.35fr) 132px;
}

.compact-table-justifications .compact-header,
.compact-table-justifications .compact-row {
  min-width: 900px;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.45fr) minmax(180px, .8fr) 132px;
}

.compact-table-records .compact-header,
.compact-table-records .compact-row {
  min-width: 980px;
  grid-template-columns: minmax(110px, .75fr) minmax(160px, 1fr) minmax(150px, .95fr) minmax(130px, .85fr) minmax(150px, .95fr) minmax(130px, .8fr) 132px;
}

.justification-select {
  position: relative;
  display: grid;
  gap: 0;
}

.justification-select input,
html[data-theme="light"] .justification-select input {
  width: 100% !important;
  min-height: 46px !important;
  padding: 0 38px 0 12px !important;
  border: 1px solid color-mix(in srgb, var(--primary) 42%, var(--line)) !important;
  border-radius: 8px !important;
  background: color-mix(in srgb, var(--card) 92%, #001016 8%) !important;
  color: var(--text) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent) !important;
  font-weight: 800 !important;
  text-align: left !important;
}

.justification-select input::-webkit-search-cancel-button {
  display: none;
}

.justification-select-caret {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 2;
  color: var(--text);
  pointer-events: none;
  font-weight: 900;
}

.justification-select-options {
  position: absolute;
  z-index: 10060;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  display: grid;
  gap: 0;
  max-height: 220px;
  overflow: auto;
  padding: 6px 0;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: #132638;
  box-shadow: var(--shadow);
}

.justification-select-option,
html[data-theme="light"] .justification-select-option {
  min-height: 28px;
  padding: 6px 12px;
  background: #132638 !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-weight: 500;
  line-height: 1.2;
  cursor: default;
}

.justification-select-option:hover,
.justification-select-option:focus,
html[data-theme="light"] .justification-select-option:hover,
html[data-theme="light"] .justification-select-option:focus {
  background: #93c5fd !important;
  color: #0f172a !important;
  outline: none !important;
}

.report-justification-select .justification-select-options {
  padding: 0 !important;
  overflow: hidden !important;
}

.report-justification-options-list {
  display: grid;
  max-height: 190px;
  overflow: auto;
  padding: 6px 0;
}

.report-justification-option,
html[data-theme="light"] .report-justification-option {
  display: grid !important;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  cursor: pointer !important;
}

.report-justification-option input {
  width: 14px !important;
  min-width: 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  margin: 0 !important;
}

.report-justification-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-justification-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--line);
  background: #132638;
}

.report-justification-actions button,
html[data-theme="light"] .report-justification-actions button {
  min-height: 34px !important;
  padding: 6px 10px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
}

.report-justification-select .justification-select-options,
html[data-theme="light"] .report-justification-select .justification-select-options {
  width: 100% !important;
  min-width: 220px !important;
  border-color: color-mix(in srgb, var(--primary) 38%, var(--line)) !important;
  background: #132638 !important;
}

.report-justification-select .report-justification-options-list {
  gap: 0 !important;
  padding: 4px 0 !important;
}

.report-justification-select .report-justification-option,
html[data-theme="light"] .report-justification-select .report-justification-option {
  display: flex !important;
  min-height: 30px !important;
  padding: 6px 10px !important;
  gap: 9px !important;
  align-items: center !important;
  background: #132638 !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  line-height: 1.2 !important;
}

.report-justification-select .report-justification-option:hover,
.report-justification-select .report-justification-option:focus-within,
html[data-theme="light"] .report-justification-select .report-justification-option:hover,
html[data-theme="light"] .report-justification-select .report-justification-option:focus-within {
  background: #93c5fd !important;
  color: #0f172a !important;
}

.report-justification-select .report-justification-option input[type="checkbox"],
html[data-theme="light"] .report-justification-select .report-justification-option input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
  flex: 0 0 14px !important;
  width: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #718096 !important;
  border-radius: 3px !important;
  background: #0b1f2e !important;
  box-shadow: none !important;
  outline: none !important;
}

.report-justification-select .report-justification-option input[type="checkbox"]:checked,
html[data-theme="light"] .report-justification-select .report-justification-option input[type="checkbox"]:checked {
  border-color: #93c5fd !important;
  background: #93c5fd !important;
  background-image: linear-gradient(45deg, transparent 58%, #0f172a 58%), linear-gradient(-45deg, transparent 58%, #0f172a 58%), linear-gradient(45deg, #0f172a 42%, transparent 42%) !important;
  background-position: 8px 3px, 5px 6px, 3px 6px !important;
  background-size: 5px 8px, 5px 5px, 5px 5px !important;
  background-repeat: no-repeat !important;
}

.report-justification-select .report-justification-option span {
  min-width: 0 !important;
  color: inherit !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
}

.report-justification-select .report-justification-actions {
  padding: 7px !important;
  gap: 7px !important;
  background: #102334 !important;
}

.report-justification-select .report-justification-actions button,
html[data-theme="light"] .report-justification-select .report-justification-actions button {
  min-height: 30px !important;
  padding: 5px 8px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
}

#reportsPanel .report-justification-select .justification-select-options,
#reportsPanel .report-multi-select .justification-select-options,
html[data-theme="light"] #reportsPanel .report-justification-select .justification-select-options,
html[data-theme="light"] #reportsPanel .report-multi-select .justification-select-options {
  min-width: 260px !important;
  max-width: 320px !important;
  padding: 6px !important;
  overflow: visible !important;
  border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--line)) !important;
  border-radius: 0 0 8px 8px !important;
  background: #132638 !important;
}

#reportsPanel .report-justification-options-list {
  max-height: 210px !important;
  overflow: auto !important;
  padding: 2px !important;
  gap: 2px !important;
}

#reportsPanel .report-justification-option,
html[data-theme="light"] #reportsPanel .report-justification-option {
  display: flex !important;
  align-items: center !important;
  min-height: 34px !important;
  padding: 7px 8px !important;
  gap: 10px !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #eef8f6 !important;
}

#reportsPanel .report-justification-option:hover,
#reportsPanel .report-justification-option:focus-within,
html[data-theme="light"] #reportsPanel .report-justification-option:hover,
html[data-theme="light"] #reportsPanel .report-justification-option:focus-within {
  background: rgba(147, 197, 253, 0.16) !important;
  color: #ffffff !important;
}

#reportsPanel .report-justification-option input[type="checkbox"],
html[data-theme="light"] #reportsPanel .report-justification-option input[type="checkbox"],
#reportsPanel .report-justification-option input[type="checkbox"]:checked,
html[data-theme="light"] #reportsPanel .report-justification-option input[type="checkbox"]:checked {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  accent-color: var(--primary) !important;
  flex: 0 0 auto !important;
  width: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 3px !important;
  background-image: none !important;
  box-shadow: none !important;
}

#reportsPanel .report-justification-option span {
  color: inherit !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
}

#reportsPanel .report-justification-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  padding: 8px 2px 2px !important;
  border-top: 1px solid rgba(216, 232, 229, 0.12) !important;
  background: transparent !important;
}

#reportsPanel .report-justification-actions button,
html[data-theme="light"] #reportsPanel .report-justification-actions button {
  width: auto !important;
  min-width: 82px !important;
  min-height: 32px !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

#reportsPanel .report-filter-actions {
  grid-column: 3 / -1 !important;
  display: grid !important;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) !important;
  gap: 12px !important;
  align-items: end !important;
  justify-self: stretch !important;
}

#reportsPanel .report-filter-actions button,
html[data-theme="light"] #reportsPanel .report-filter-actions button,
#reportsPanel #clearReportFiltersButton,
#reportsPanel #generateReportButton {
  width: 100% !important;
  min-height: 44px !important;
  padding: 0 18px !important;
  border-radius: 10px !important;
}

@media (max-width: 980px) {
  #reportsPanel .report-filter-actions {
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

#reportsPanel .report-filters {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: end !important;
}

#reportsPanel .report-filters label,
#reportsPanel .report-filters .justification-select,
#reportsPanel .report-filters .report-multi-select {
  width: 100% !important;
  min-width: 0 !important;
}

#reportsPanel .report-filters input,
#reportsPanel .report-filters select,
#reportsPanel .report-filters .justification-select > input {
  width: 100% !important;
  min-width: 0 !important;
}

#reportsPanel .report-filter-actions {
  grid-column: 3 / -1 !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  justify-self: stretch !important;
}

#reportsPanel .report-filter-actions button,
html[data-theme="light"] #reportsPanel .report-filter-actions button,
#reportsPanel #clearReportFiltersButton,
#reportsPanel #generateReportButton {
  width: 150px !important;
  min-width: 128px !important;
  max-width: 160px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  border-radius: 9px !important;
}

@media (max-width: 980px) {
  #reportsPanel .report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #reportsPanel .report-filter-actions {
    grid-column: 1 / -1 !important;
    justify-content: stretch !important;
  }

  #reportsPanel .report-filter-actions button,
  html[data-theme="light"] #reportsPanel .report-filter-actions button,
  #reportsPanel #clearReportFiltersButton,
  #reportsPanel #generateReportButton {
    width: 100% !important;
    max-width: none !important;
  }
}

.email-save-button,
html[data-theme="light"] .email-save-button {
  width: fit-content !important;
  min-width: 120px !important;
  max-width: 180px !important;
  min-height: 40px !important;
  padding: 0 22px !important;
  justify-self: start !important;
}

.email-group-form .email-multi-select {
  max-width: 430px !important;
}

.email-group-form .email-multi-select-trigger,
html[data-theme="light"] .email-group-form .email-multi-select-trigger {
  width: 100% !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: #132638 !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
}

.email-group-form .email-multi-select-trigger[aria-expanded="true"],
html[data-theme="light"] .email-group-form .email-multi-select-trigger[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line)) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent) !important;
}

.email-group-form .email-multi-select-options,
html[data-theme="light"] .email-group-form .email-multi-select-options {
  top: calc(100% - 1px) !important;
  max-height: 190px !important;
  padding: 6px 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 0 0 8px 8px !important;
  background: #132638 !important;
}

.email-group-form .email-multi-select .contract-checkbox-option,
html[data-theme="light"] .email-group-form .email-multi-select .contract-checkbox-option {
  min-height: 30px !important;
  padding: 7px 12px !important;
  background: #132638 !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-weight: 500 !important;
}

.email-group-form .email-multi-select .contract-checkbox-option:hover,
.email-group-form .email-multi-select .contract-checkbox-option:focus-within,
html[data-theme="light"] .email-group-form .email-multi-select .contract-checkbox-option:hover,
html[data-theme="light"] .email-group-form .email-multi-select .contract-checkbox-option:focus-within {
  background: #93c5fd !important;
  color: #0f172a !important;
}

#dashboardActivityList {
  gap: 6px !important;
}

#dashboardActivityList .activity-card {
  min-height: 0 !important;
  padding: 7px 10px !important;
  gap: 8px !important;
  border-radius: 7px !important;
  align-items: center !important;
}

#dashboardActivityList .activity-card div {
  gap: 1px !important;
  min-width: 0 !important;
}

#dashboardActivityList .activity-card strong {
  font-size: 13px !important;
  line-height: 1.15 !important;
}

#dashboardActivityList .activity-card span,
#dashboardActivityList .activity-card small {
  font-size: 12px !important;
  line-height: 1.2 !important;
}

#dashboardActivityList .record-status {
  min-height: 22px !important;
  padding: 3px 9px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

#reportResultsPanel .report-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

#reportResultsPanel .report-metric {
  min-height: 86px !important;
  padding: 10px 12px !important;
  gap: 5px !important;
  border-radius: 7px !important;
}

#reportResultsPanel .report-metric span:first-child {
  font-size: 9.5px !important;
  letter-spacing: 3px !important;
  line-height: 1.15 !important;
}

#reportResultsPanel .report-metric strong {
  font-size: 26px !important;
}

#reportResultsPanel .report-metric span:last-child {
  font-size: 11px !important;
  line-height: 1.2 !important;
}

@media (max-width: 980px) {
  #reportResultsPanel .report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

#reportJustificationGrid {
  gap: 10px !important;
  margin-bottom: 10px !important;
}

#reportJustificationGrid .report-card {
  min-height: 0 !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
}

#reportJustificationGrid .report-card-header {
  margin-bottom: 8px !important;
}

#reportJustificationGrid .report-card-header .eyebrow {
  font-size: 10px !important;
  line-height: 1 !important;
}

#reportJustificationGrid .report-card-header h3 {
  font-size: 16px !important;
  line-height: 1.15 !important;
}

#reportJustificationGrid .report-summary-list {
  gap: 6px !important;
}

#reportJustificationGrid .report-summary-item {
  min-height: 0 !important;
  padding: 8px 10px !important;
  gap: 8px !important;
  border-radius: 7px !important;
}

#reportJustificationGrid .report-summary-item strong,
#reportJustificationGrid .report-summary-item span {
  font-size: 13px !important;
  line-height: 1.2 !important;
}

#reportJustificationGrid .report-justification-note small {
  font-size: 11px !important;
  line-height: 1.2 !important;
}

#reportComponentGrid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr) !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
}

#reportComponentGrid .report-card {
  min-height: 0 !important;
  padding: 12px 14px !important;
  border-radius: 8px !important;
}

#reportComponentGrid .report-card-header {
  align-items: center !important;
  margin-bottom: 8px !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid rgba(18, 36, 64, 0.12) !important;
}

#reportComponentGrid .report-card-header .eyebrow {
  font-size: 10px !important;
  line-height: 1 !important;
}

#reportComponentGrid .report-card-header h3 {
  font-size: 18px !important;
  line-height: 1.1 !important;
}

.report-component-overview {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
}

.report-component-overview span {
  display: grid !important;
  gap: 2px !important;
  min-height: 58px !important;
  padding: 9px 10px !important;
  border: 1px solid rgba(18, 36, 64, 0.14) !important;
  border-radius: 8px !important;
  background: color-mix(in srgb, #ffffff 90%, #acb4bf) !important;
}

.report-component-overview strong {
  color: #122440 !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

.report-component-overview small {
  color: #5b6d88 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.report-component-ranking,
#reportComponentGrid .report-summary-list {
  display: grid !important;
  gap: 6px !important;
}

#reportComponentGrid .report-summary-item {
  min-height: 0 !important;
  padding: 8px 10px !important;
  border-radius: 7px !important;
  background: color-mix(in srgb, #ffffff 92%, #acb4bf) !important;
}

.report-component-rank {
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
}

.report-component-rank .report-rank-index {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  background: #122440 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

.report-component-rank strong,
.report-component-latest strong {
  color: #122440 !important;
  font-size: 14px !important;
  line-height: 1.15 !important;
}

.report-component-rank span:not(.report-rank-index) {
  color: #1f4070 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

.report-component-rank small {
  grid-column: 2 / -1 !important;
  color: #5b6d88 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

.report-component-latest {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
}

.report-component-latest div {
  min-width: 0 !important;
}

.report-component-latest small {
  display: block !important;
  margin-top: 4px !important;
  color: #5b6d88 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.report-component-latest span {
  max-width: 160px !important;
  color: #1f4070 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 980px) {
  #reportComponentGrid {
    grid-template-columns: 1fr !important;
  }

  .report-component-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

.annotation-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: grid !important;
  align-items: flex-start !important;
  justify-items: center !important;
  padding: 74px 18px 18px !important;
  overflow: auto !important;
}

.annotation-modal.hidden {
  display: none !important;
}

.annotation-modal-card {
  width: min(820px, calc(100vw - 36px)) !important;
  max-height: calc(100vh - 92px) !important;
  padding: 22px 28px !important;
  overflow: auto !important;
  transform: none !important;
  border-radius: 10px !important;
}

.annotation-modal .annotation-create-form {
  display: grid !important;
  position: static !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px 14px !important;
  width: 100% !important;
  max-height: none !important;
  overflow: visible !important;
  transform: none !important;
}

.annotation-modal-header {
  margin-bottom: 14px !important;
}

.annotation-modal-header h3 {
  font-size: 22px !important;
  line-height: 1.1 !important;
}

.annotation-share-list {
  min-height: 92px !important;
  max-height: 150px !important;
  overflow: auto !important;
  padding: 8px !important;
  border: 1px solid var(--fc-line, var(--line)) !important;
  border-radius: 8px !important;
  background: var(--fc-field, var(--field)) !important;
}

.annotation-share-list label {
  min-height: 36px !important;
  padding: 6px 8px !important;
  border-radius: 6px !important;
}

.annotation-share-list input[type="checkbox"] {
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  accent-color: var(--fc-primary, var(--primary)) !important;
}

.annotation-notepad {
  min-height: 92px !important;
}

.annotation-modal-actions {
  padding-top: 0 !important;
}

.annotation-modal-actions button {
  min-width: 124px !important;
  max-width: 150px !important;
  min-height: 44px !important;
}

html[data-theme="light"] .annotation-modal {
  background: rgba(15, 23, 42, 0.52) !important;
}

html[data-theme="light"] .annotation-modal-card {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #99d5cb !important;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22) !important;
}

html[data-theme="light"] .annotation-modal .annotation-create-form {
  background: transparent !important;
  color: #0f172a !important;
  border: 0 !important;
  box-shadow: none !important;
}

html[data-theme="light"] .annotation-modal-header h3,
html[data-theme="light"] .annotation-modal .annotation-create-form label,
html[data-theme="light"] .annotation-share-list label {
  color: #334155 !important;
}

html[data-theme="light"] .annotation-modal-header p {
  color: #64748b !important;
}

html[data-theme="light"] .annotation-share-list {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] .annotation-share-list label:hover {
  background: #e6f7f4 !important;
}

@media (max-width: 760px) {
  .annotation-modal {
    padding: 56px 12px 12px !important;
  }

  .annotation-modal-card {
    width: min(100%, calc(100vw - 24px)) !important;
    max-height: calc(100vh - 68px) !important;
    padding: 18px !important;
  }

  .annotation-modal .annotation-create-form {
    grid-template-columns: 1fr !important;
  }
}

/* Production action palette */
#newTechnicalDemandButton,
#technicalDemandsPanel .technical-demand-actions button:not(.danger) {
  background: #122440 !important;
  color: #ffffff !important;
  border-color: #122440 !important;
}

#newTechnicalDemandButton:hover,
#technicalDemandsPanel .technical-demand-actions button:not(.danger):hover {
  background: #0b1728 !important;
  border-color: #0b1728 !important;
}

#technicalDemandsPanel .technical-demand-actions .danger {
  background: #b84c43 !important;
  color: #ffffff !important;
  border-color: #b84c43 !important;
}

#technicalDemandsPanel .technical-demand-actions .danger:hover {
  background: #963b34 !important;
  border-color: #963b34 !important;
}

#accountPasswordButton,
html[data-theme="light"] #accountPasswordButton,
html[data-theme="dark"] #accountPasswordButton {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
}

#accountPasswordButton:hover,
html[data-theme="light"] #accountPasswordButton:hover,
html[data-theme="dark"] #accountPasswordButton:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.34) !important;
}

.email-config-form #emailBodyTemplateInput,
html[data-theme="light"] .email-config-form #emailBodyTemplateInput {
  min-height: 360px !important;
  height: 360px;
  resize: vertical;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .email-config-form #emailBodyTemplateInput,
  html[data-theme="light"] .email-config-form #emailBodyTemplateInput {
    min-height: 280px !important;
    height: 280px;
  }
}

.dashboard-technical-grid .report-metrics.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.dashboard-technical-grid .report-metric {
  min-height: 104px !important;
  padding: 14px 16px !important;
  gap: 7px !important;
  align-content: start;
}

.dashboard-technical-grid .report-metric span:first-child {
  font-size: 10px !important;
  letter-spacing: .22em !important;
  line-height: 1.28 !important;
  word-break: normal;
}

.dashboard-technical-grid .report-metric strong {
  font-size: 30px !important;
  line-height: .98 !important;
}

.dashboard-technical-grid .report-metric span:last-child {
  font-size: 12px !important;
  line-height: 1.25 !important;
}

@media (max-width: 1280px) {
  .dashboard-technical-grid .report-metrics.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

.login-legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  color: var(--fc-muted);
  font-size: 12px;
  font-weight: 700;
}

.login-app-download {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(31, 64, 112, 0.16);
  border-radius: 14px;
  background: rgba(172, 180, 191, 0.16);
  color: #122440;
}

.login-app-download img {
  width: 96px;
  height: 96px;
  padding: 5px;
  border: 1px solid rgba(31, 64, 112, 0.14);
  border-radius: 10px;
  background: #ffffff;
}

.login-app-download div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.login-app-download strong {
  font-size: 15px;
  line-height: 1.2;
}

.login-app-download span {
  color: #5b6d88;
  font-size: 12px;
  line-height: 1.35;
}

.login-app-download a {
  width: max-content;
  color: #1f4070;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-app-download a:hover {
  color: #122440;
}

.brand-app-download,
html[data-theme="dark"] .brand-app-download,
html[data-theme="light"] .brand-app-download {
  width: min(420px, 100%) !important;
  margin-top: 18px !important;
  border-color: rgba(172, 180, 191, 0.28) !important;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

.brand-app-download strong,
html[data-theme="dark"] .brand-app-download strong,
html[data-theme="light"] .brand-app-download strong {
  color: #ffffff !important;
}

.brand-app-download span,
html[data-theme="dark"] .brand-app-download span,
html[data-theme="light"] .brand-app-download span {
  color: #dce5ef !important;
}

.brand-app-download a,
html[data-theme="dark"] .brand-app-download a,
html[data-theme="light"] .brand-app-download a {
  color: #ffffff !important;
}

.brand-app-download a:hover,
html[data-theme="dark"] .brand-app-download a:hover,
html[data-theme="light"] .brand-app-download a:hover {
  color: #acb4bf !important;
}

.login-legal-links button {
  min-height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: color-mix(in srgb, var(--fc-primary) 88%, var(--fc-text)) !important;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.login-legal-links button:hover {
  color: var(--fc-text) !important;
}

#loginForm .login-legal-links button,
html[data-theme="light"] #loginForm .login-legal-links button {
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: color-mix(in srgb, var(--fc-primary) 86%, var(--fc-text)) !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

#loginForm .login-legal-links button:hover,
html[data-theme="light"] #loginForm .login-legal-links button:hover {
  background: transparent !important;
  color: var(--fc-text) !important;
}

.legal-modal {
  z-index: 10080 !important;
}

.legal-modal-card {
  width: min(880px, calc(100vw - 48px)) !important;
  max-height: calc(100vh - 48px) !important;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden !important;
}

.legal-document {
  overflow: auto;
  padding-right: 6px;
  line-height: 1.55;
}

.legal-document h4 {
  margin: 8px 0 0;
  color: var(--fc-text);
  font-size: 15px;
}

.legal-document p {
  margin: 0;
  color: var(--fc-muted);
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 760px) {
  .legal-modal-card {
    width: min(100%, calc(100vw - 20px)) !important;
    max-height: calc(100vh - 20px) !important;
  }
}

/* Mobile web navigation */
.mobile-menu-button,
.mobile-sidebar-close,
.mobile-sidebar-overlay {
  display: none !important;
}

.mobile-menu-button {
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-width: 92px !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 10px !important;
  background: color-mix(in srgb, var(--fc-card) 92%, transparent) !important;
  color: var(--fc-text) !important;
  box-shadow: none !important;
}

.mobile-menu-button span {
  font-size: 18px;
  line-height: 1;
}

.mobile-menu-button strong {
  font-size: 13px;
  line-height: 1;
}

@media (max-width: 900px) {
  body:has(.dashboard.mobile-sidebar-open) {
    overflow: hidden;
  }

  .dashboard {
    grid-template-columns: minmax(0, 1fr) !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }

  .dashboard .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 10050 !important;
    width: min(82vw, 300px) !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 18px 12px 16px !important;
    transform: translateX(-104%) !important;
    transition: transform 180ms ease !important;
    overflow: hidden !important;
    border-right: 1px solid rgba(0, 213, 167, 0.24) !important;
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.35) !important;
  }

  .dashboard.mobile-sidebar-open .sidebar {
    transform: translateX(0) !important;
  }

  .dashboard .sidebar nav {
    max-height: none !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding-right: 6px !important;
  }

  .mobile-sidebar-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10040 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(0, 12, 16, 0.62) !important;
    cursor: pointer !important;
  }

  .dashboard.mobile-sidebar-open .mobile-sidebar-overlay {
    display: block !important;
  }

  .mobile-menu-button {
    display: inline-flex !important;
  }

  .mobile-sidebar-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0, 213, 167, 0.22) !important;
    background: rgba(0, 213, 167, 0.13) !important;
    color: #effffb !important;
    font-size: 26px !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }

  .content {
    height: 100dvh !important;
    min-width: 0 !important;
    padding: 0 12px 24px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .topbar {
    margin: 0 -12px 14px !important;
    padding: 10px 12px !important;
    min-height: 58px !important;
    gap: 10px !important;
  }

  .topbar-actions {
    gap: 8px !important;
  }

  .dashboard .sidebar-brand {
    grid-template-columns: 38px minmax(0, 1fr) 40px;
  }

  .dashboard .sidebar-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 20px;
  }

  .dashboard .sidebar-brand strong {
    font-size: 17px;
  }

  .dashboard .sidebar-footer {
    padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
  }

  .dashboard .nav-section-title {
    margin-top: 12px;
  }

  .panel,
  .notice,
  .dashboard-section,
  .storage-status-panel {
    padding: 16px !important;
    border-radius: 12px !important;
  }

  .panel-header {
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .panel-header h2 {
    font-size: 24px !important;
  }
}

@media (max-width: 520px) {
  .dashboard .sidebar {
    width: min(88vw, 292px) !important;
  }

  .mobile-menu-button {
    min-width: 86px !important;
    width: auto !important;
    padding: 0 10px !important;
  }

  .content {
    padding-inline: 10px !important;
  }

  .topbar {
    margin-inline: -10px !important;
    padding-inline: 10px !important;
  }

  .notification-bell-dropdown {
    left: 10px !important;
    right: 10px !important;
  }
}

/* Faithful AppShell port from the Lovable reference. */
[data-icon="search"] { --icon-url: url("./assets/icons/search.svg"); }
[data-icon="panel-left"] { --icon-url: url("./assets/icons/panel-left.svg"); }
[data-icon="activity"] { --icon-url: url("./assets/icons/activity.svg"); }

:root {
  --lovable-sidebar-width: 256px;
  --lovable-sidebar-collapsed: 68px;
  --lovable-header-height: 64px;
}

#dashboardView:not(.hidden) {
  grid-template-columns: var(--lovable-sidebar-width) minmax(0, 1fr) !important;
}

#dashboardView:not(.hidden) .sidebar,
html[data-theme="light"] #dashboardView:not(.hidden) .sidebar,
html[data-theme="dark"] #dashboardView:not(.hidden) .sidebar {
  width: var(--lovable-sidebar-width) !important;
  background: #081b3a !important;
}

#dashboardView:not(.hidden) .sidebar-brand,
#dashboardView:not(.hidden) .sidebar:has(.sidebar-logo.has-image) .sidebar-brand {
  min-height: var(--lovable-header-height) !important;
  padding: 10px 14px !important;
}

#dashboardView:not(.hidden) .sidebar-brand > div {
  display: grid !important;
  gap: 1px !important;
}

#dashboardView:not(.hidden) .sidebar-brand strong {
  font-size: 15px !important;
}

#dashboardView:not(.hidden) .sidebar-brand span:not(.sidebar-logo) {
  color: rgba(255, 255, 255, 0.58) !important;
  font-size: 12px !important;
}

#dashboardView:not(.hidden) .sidebar nav {
  padding: 10px 8px 18px !important;
}

#dashboardView:not(.hidden) .nav-section-title,
#dashboardView:not(.hidden) .nav-group[data-nav-group="cadastros"] > .nav-group-toggle {
  min-height: 24px !important;
  margin: 12px 0 4px !important;
  padding: 0 12px !important;
  color: rgba(212, 226, 245, 0.68) !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  text-transform: none !important;
}

#dashboardView:not(.hidden) .nav-button,
#dashboardView:not(.hidden) .nav-subitem {
  min-height: 40px !important;
  padding: 0 11px !important;
  color: rgba(239, 246, 255, 0.88) !important;
  font-size: 14px !important;
  font-weight: 520 !important;
}

#dashboardView:not(.hidden) .nav-button.active {
  border-color: transparent !important;
  background: rgba(52, 91, 145, 0.34) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

#dashboardView:not(.hidden) .nav-button.active::before {
  content: "" !important;
  position: absolute !important;
  top: 7px !important;
  bottom: 7px !important;
  left: 0 !important;
  width: 3px !important;
  border-radius: 0 3px 3px 0 !important;
  background: #a9c9ef !important;
}

#dashboardView:not(.hidden) .nav-button {
  position: relative !important;
}

#dashboardView:not(.hidden) .topbar,
html[data-theme="light"] #dashboardView:not(.hidden) .topbar,
html[data-theme="dark"] #dashboardView:not(.hidden) .topbar {
  min-height: var(--lovable-header-height) !important;
  height: var(--lovable-header-height) !important;
  gap: 12px !important;
  padding: 0 24px !important;
  background: rgba(243, 246, 249, 0.94) !important;
}

#dashboardView:not(.hidden) .sidebar-collapse-button {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--lovable-muted) !important;
}

#dashboardView:not(.hidden) .sidebar-collapse-button:hover {
  background: #e8edf3 !important;
  color: var(--lovable-text) !important;
}

#dashboardView:not(.hidden) .topbar-context {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

#dashboardView:not(.hidden) .topbar-context span {
  font-size: 11px !important;
  font-weight: 600 !important;
}

#dashboardView:not(.hidden) .topbar-context strong {
  font-size: 16px !important;
}

#dashboardView:not(.hidden) .topbar-actions {
  flex: 0 0 auto !important;
  gap: 10px !important;
}

#dashboardView:not(.hidden) .topbar-search {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 200px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 9px !important;
  border: 1px solid var(--lovable-border) !important;
  border-radius: 7px !important;
  background: var(--lovable-surface) !important;
  color: var(--lovable-muted) !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .topbar-search > [data-icon] {
  width: 17px !important;
  height: 17px !important;
  font-size: 17px !important;
}

#dashboardView:not(.hidden) .topbar-search input,
html[data-theme="light"] #dashboardView:not(.hidden) .topbar-search input,
html[data-theme="dark"] #dashboardView:not(.hidden) .topbar-search input {
  min-width: 0 !important;
  min-height: 32px !important;
  height: 32px !important;
  flex: 1 1 auto !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: var(--lovable-text) !important;
  font-size: 13px !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .topbar-search input:disabled {
  cursor: default !important;
  opacity: 0.72 !important;
}

#dashboardView:not(.hidden) .topbar-search kbd {
  flex: 0 0 auto !important;
  padding: 2px 5px !important;
  border-radius: 4px !important;
  background: #eef2f6 !important;
  color: var(--lovable-muted) !important;
  font-family: inherit !important;
  font-size: 9px !important;
  font-weight: 700 !important;
}

#dashboardView:not(.hidden) .topbar-identity {
  gap: 9px !important;
  min-width: 166px !important;
  min-height: 40px !important;
  padding: 4px 10px !important;
}

#dashboardView:not(.hidden) .topbar-avatar {
  display: grid !important;
  place-items: center !important;
  flex: 0 0 auto !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  background: var(--lovable-primary) !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

#dashboardView:not(.hidden) .topbar-identity strong,
#dashboardView:not(.hidden) .topbar-identity span:not(.topbar-avatar) {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#dashboardView:not(.hidden) .topbar-identity strong {
  color: var(--lovable-text) !important;
  font-size: 12px !important;
}

#dashboardView:not(.hidden) .topbar-identity span:not(.topbar-avatar) {
  color: var(--lovable-muted) !important;
  font-size: 10px !important;
}

#dashboardView:not(.hidden) .panel {
  width: min(100%, 1280px) !important;
  padding: 32px 32px 44px !important;
}

#dashboardView:not(.hidden) .panel-header {
  margin-bottom: 28px !important;
}

#dashboardView:not(.hidden) .panel-header h2 {
  font-size: 30px !important;
  font-weight: 700 !important;
}

#dashboardView:not(.hidden) .panel-header p:not(.eyebrow) {
  font-size: 14px !important;
}

/* First Dashboard viewport mirrors the Lovable composition. */
#dashboardView:not(.hidden) .dashboard-overview-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin-bottom: 24px !important;
}

#dashboardView:not(.hidden) .dashboard-overview-card {
  display: grid !important;
  min-height: 160px !important;
  padding: 20px !important;
  border: 1px solid var(--lovable-border) !important;
  border-radius: 8px !important;
  background: var(--lovable-surface) !important;
  box-shadow: var(--lovable-shadow) !important;
}

#dashboardView:not(.hidden) .dashboard-overview-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

#dashboardView:not(.hidden) .dashboard-overview-card-header > span {
  color: var(--lovable-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

#dashboardView:not(.hidden) .dashboard-overview-card-header > i {
  display: grid !important;
  place-items: center !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 8px !important;
  background: #e9edf3 !important;
  color: var(--lovable-primary) !important;
  font-size: 18px !important;
  font-style: normal !important;
}

#dashboardView:not(.hidden) .dashboard-overview-card > strong {
  align-self: end !important;
  color: #050b16 !important;
  font-size: 32px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

#dashboardView:not(.hidden) .dashboard-overview-card > small {
  margin-top: 7px !important;
  color: var(--lovable-muted) !important;
  font-size: 12px !important;
}

#dashboardView:not(.hidden) .dashboard-reference-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 2.05fr) minmax(280px, 1fr) !important;
  gap: 16px !important;
}

#dashboardView:not(.hidden) .dashboard-reference-card {
  padding: 24px !important;
  border: 1px solid var(--lovable-border) !important;
  border-radius: 8px !important;
  background: var(--lovable-surface) !important;
  box-shadow: var(--lovable-shadow) !important;
}

#dashboardView:not(.hidden) .dashboard-reference-heading h3,
#dashboardView:not(.hidden) .dashboard-detail-heading h3 {
  margin: 0 !important;
  color: #050b16 !important;
  font-size: 17px !important;
  font-weight: 700 !important;
}

#dashboardView:not(.hidden) .dashboard-reference-heading p {
  margin: 3px 0 18px !important;
  color: var(--lovable-muted) !important;
  font-size: 12px !important;
}

#dashboardView:not(.hidden) .dashboard-step-list {
  display: grid !important;
}

#dashboardView:not(.hidden) .dashboard-step-list button,
#dashboardView:not(.hidden) .dashboard-step-list button:hover {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  width: 100% !important;
  min-height: 62px !important;
  padding: 10px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--lovable-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--lovable-text) !important;
  text-align: left !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .dashboard-step-list button:last-child {
  border-bottom: 0 !important;
}

#dashboardView:not(.hidden) .dashboard-step-list button:hover {
  color: var(--lovable-accent) !important;
}

#dashboardView:not(.hidden) .dashboard-step-list button > span {
  display: grid !important;
  gap: 2px !important;
}

#dashboardView:not(.hidden) .dashboard-step-list strong {
  font-size: 14px !important;
  font-weight: 650 !important;
}

#dashboardView:not(.hidden) .dashboard-step-list small {
  color: var(--lovable-muted) !important;
  font-size: 12px !important;
  font-weight: 450 !important;
}

#dashboardView:not(.hidden) .dashboard-step-list b {
  flex: 0 0 auto !important;
  color: var(--lovable-primary) !important;
  font-size: 11px !important;
  font-weight: 650 !important;
}

#dashboardView:not(.hidden) .dashboard-overview-summary {
  display: grid !important;
  gap: 15px !important;
}

#dashboardView:not(.hidden) .dashboard-overview-summary > div {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

#dashboardView:not(.hidden) .dashboard-overview-summary span {
  color: var(--lovable-muted) !important;
  font-size: 13px !important;
}

#dashboardView:not(.hidden) .dashboard-overview-summary strong {
  color: #050b16 !important;
  font-size: 14px !important;
}

#dashboardView:not(.hidden) .dashboard-detail-heading {
  margin: 32px 0 14px !important;
}

#dashboardView:not(.hidden) .dashboard-detail-heading .eyebrow {
  margin: 0 0 3px !important;
  color: var(--lovable-muted) !important;
  font-size: 10px !important;
  text-transform: uppercase !important;
}

#dashboardView:not(.hidden).sidebar-collapsed {
  grid-template-columns: var(--lovable-sidebar-collapsed) minmax(0, 1fr) !important;
}

#dashboardView:not(.hidden).sidebar-collapsed .sidebar {
  width: var(--lovable-sidebar-collapsed) !important;
}

#dashboardView:not(.hidden).sidebar-collapsed .sidebar-brand {
  grid-template-columns: 42px !important;
  justify-content: center !important;
  padding-right: 13px !important;
  padding-left: 13px !important;
}

#dashboardView:not(.hidden).sidebar-collapsed .sidebar-brand > div,
#dashboardView:not(.hidden).sidebar-collapsed .nav-section-title,
#dashboardView:not(.hidden).sidebar-collapsed .nav-group[data-nav-group="cadastros"] > .nav-group-toggle,
#dashboardView:not(.hidden).sidebar-collapsed .nav-button > span:last-child,
#dashboardView:not(.hidden).sidebar-collapsed .nav-caret,
#dashboardView:not(.hidden).sidebar-collapsed .sidebar-user,
#dashboardView:not(.hidden).sidebar-collapsed .sidebar-footer .secondary > span:last-child,
#dashboardView:not(.hidden).sidebar-collapsed .email-nav-submenu {
  display: none !important;
}

#dashboardView:not(.hidden).sidebar-collapsed .nav-button,
#dashboardView:not(.hidden).sidebar-collapsed .nav-subitem,
#dashboardView:not(.hidden).sidebar-collapsed .sidebar-footer .secondary {
  justify-content: center !important;
  width: 44px !important;
  min-width: 44px !important;
  margin-right: auto !important;
  margin-left: auto !important;
  padding: 0 !important;
}

#dashboardView:not(.hidden).sidebar-collapsed .sidebar nav {
  padding-right: 6px !important;
  padding-left: 6px !important;
}

#dashboardView:not(.hidden).sidebar-collapsed .sidebar-footer {
  padding-right: 6px !important;
  padding-left: 6px !important;
}

#dashboardView:not(.hidden).sidebar-collapsed #technicalDemandPreviewModal {
  left: var(--lovable-sidebar-collapsed) !important;
}

@media (max-width: 1180px) and (min-width: 901px) {
  #dashboardView:not(.hidden) {
    grid-template-columns: var(--lovable-sidebar-width) minmax(0, 1fr) !important;
  }

  #dashboardView:not(.hidden) .sidebar {
    width: var(--lovable-sidebar-width) !important;
  }

  #dashboardView:not(.hidden).sidebar-collapsed {
    grid-template-columns: var(--lovable-sidebar-collapsed) minmax(0, 1fr) !important;
  }

  #dashboardView:not(.hidden).sidebar-collapsed .sidebar {
    width: var(--lovable-sidebar-collapsed) !important;
  }

  #dashboardView:not(.hidden) .dashboard-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  #dashboardView:not(.hidden).sidebar-collapsed {
    display: block !important;
  }

  #dashboardView:not(.hidden) .sidebar-collapse-button,
  #dashboardView:not(.hidden) .topbar-search,
  #dashboardView:not(.hidden) .topbar-identity {
    display: none !important;
  }

  #dashboardView:not(.hidden) .dashboard-reference-grid {
    grid-template-columns: 1fr !important;
  }

  #dashboardView:not(.hidden) .dashboard-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #dashboardView:not(.hidden) .panel {
    padding: 22px 14px 32px !important;
  }
}

@media (max-width: 520px) {
  #dashboardView:not(.hidden) .dashboard-overview-metrics {
    grid-template-columns: 1fr !important;
  }

  #dashboardView:not(.hidden) .dashboard-overview-card {
    min-height: 132px !important;
  }

  #dashboardView:not(.hidden) .dashboard-reference-card {
    padding: 18px !important;
  }
}

.dashboard.mobile-web-layout {
  grid-template-columns: minmax(0, 1fr) !important;
  height: 100dvh !important;
  overflow: hidden !important;
}

.dashboard.mobile-web-layout .sidebar {
  position: fixed !important;
  inset: 0 auto 0 0 !important;
  z-index: 10050 !important;
  width: min(88vw, 300px) !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  padding: 18px 12px 16px !important;
  transform: translateX(-104%) !important;
  transition: transform 180ms ease !important;
  overflow: hidden !important;
  border-right: 1px solid rgba(172, 180, 191, 0.24) !important;
  box-shadow: 16px 0 40px rgba(0, 0, 0, 0.35) !important;
}

.dashboard.mobile-web-layout.mobile-sidebar-open .sidebar {
  transform: translateX(0) !important;
}

.dashboard.mobile-web-layout .mobile-menu-button {
  position: relative !important;
  inset: auto !important;
  z-index: 2 !important;
  display: inline-flex !important;
  min-width: 70px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 8px !important;
  gap: 6px !important;
  background: #122440 !important;
  color: #ffffff !important;
  border-color: rgba(172, 180, 191, 0.35) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28) !important;
  pointer-events: auto !important;
}

.dashboard.mobile-web-layout .mobile-menu-button span {
  font-size: 16px !important;
}

.dashboard.mobile-web-layout .mobile-menu-button strong {
  font-size: 12px !important;
}

.dashboard.mobile-web-layout.mobile-sidebar-open .mobile-menu-button {
  display: none !important;
}

.dashboard.mobile-web-layout .mobile-sidebar-close {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 213, 167, 0.22) !important;
  background: rgba(0, 213, 167, 0.16) !important;
  color: #effffb !important;
  font-size: 26px !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

.dashboard.mobile-web-layout .mobile-sidebar-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10040 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(0, 12, 16, 0.62) !important;
}

.dashboard.mobile-web-layout.mobile-sidebar-open .mobile-sidebar-overlay {
  display: block !important;
}

.dashboard.mobile-web-layout .content {
  height: 100dvh !important;
  min-width: 0 !important;
  padding: 0 10px 24px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.dashboard.mobile-web-layout .topbar {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  min-height: 36px !important;
  height: 36px !important;
  margin: 0 -10px 10px !important;
  padding: 3px 8px !important;
  align-items: center !important;
  gap: 8px !important;
  overflow: visible !important;
}

.dashboard.mobile-web-layout .topbar .icon-only-action,
.dashboard.mobile-web-layout .topbar .theme-toggle,
.dashboard.mobile-web-layout .topbar .notification-bell {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
}

.dashboard.mobile-web-layout .topbar .mobile-menu-button {
  grid-column: 1 !important;
  justify-self: start !important;
}

.dashboard.mobile-web-layout .topbar-actions {
  grid-column: 3 !important;
  justify-self: end !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: auto !important;
  margin: 0 !important;
  gap: 8px !important;
}

.dashboard.mobile-web-layout .notification-bell-count {
  top: -5px !important;
  right: -5px !important;
  min-width: 18px !important;
  height: 18px !important;
  font-size: 10px !important;
}

.dashboard.mobile-web-layout .sidebar-brand {
  grid-template-columns: 38px minmax(0, 1fr) 40px !important;
}

.dashboard.mobile-web-layout .sidebar nav {
  max-height: none !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding-right: 6px !important;
}

@media (max-width: 900px), (pointer: coarse) {
  #dashboardView:not(.hidden) {
    grid-template-columns: minmax(0, 1fr) !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }

  #dashboardView:not(.hidden) .topbar {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    min-height: 36px !important;
    height: 36px !important;
    margin: 0 -10px 10px !important;
    padding: 3px 8px !important;
    align-items: center !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  #dashboardView:not(.hidden) .mobile-menu-button {
    display: inline-flex !important;
    grid-column: 1 !important;
    justify-self: start !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 70px !important;
    width: auto !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 8px !important;
    gap: 6px !important;
    border-radius: 10px !important;
    background: #122440 !important;
    color: #ffffff !important;
    pointer-events: auto !important;
  }

  #dashboardView:not(.hidden).mobile-sidebar-open .mobile-menu-button {
    display: none !important;
  }

  #dashboardView:not(.hidden) .mobile-menu-button span {
    font-size: 16px !important;
  }

  #dashboardView:not(.hidden) .mobile-menu-button strong {
    font-size: 12px !important;
  }

  #dashboardView:not(.hidden) .topbar-actions {
    grid-column: 3 !important;
    justify-self: end !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    margin: 0 !important;
    gap: 8px !important;
  }

  #dashboardView:not(.hidden) .topbar .icon-only-action,
  #dashboardView:not(.hidden) .topbar .theme-toggle,
  #dashboardView:not(.hidden) .topbar .notification-bell {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
  }

  #dashboardView:not(.hidden) .content {
    height: 100dvh !important;
    min-width: 0 !important;
    padding: 0 10px 24px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  #dashboardView:not(.hidden) .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 10050 !important;
    width: min(88vw, 300px) !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    transform: translateX(-104%) !important;
    overflow: hidden !important;
  }

  #dashboardView:not(.hidden).mobile-sidebar-open .sidebar {
    transform: translateX(0) !important;
  }

  #dashboardView:not(.hidden) .mobile-sidebar-close {
    display: inline-flex !important;
  }
}

/* Palette update: FieldCheck-in blue/slate theme. Colors only. */
:root,
html,
html[data-theme="dark"],
html[data-theme="light"] {
  color-scheme: light;
  --fc-bg: #eff4f8;
  --fc-bg-soft: #e8eef6;
  --fc-panel: rgba(255, 255, 255, 0.96);
  --fc-panel-solid: #ffffff;
  --fc-card: #ffffff;
  --fc-card-2: #f6f8fb;
  --fc-card-hover: #ffffff;
  --fc-field: #ffffff;
  --fc-text: #122440;
  --fc-muted: #5b6d88;
  --fc-subtle: #708096;
  --fc-line: rgba(31, 63, 110, 0.18);
  --fc-sidebar: #122440;
  --fc-sidebar-text: #eef3f8;
  --fc-sidebar-active: rgba(31, 64, 112, 0.82);
  --fc-primary: #1f4070;
  --fc-primary-2: #122440;
  --fc-cyan: #1f3f6e;
  --fc-green: #1f4070;
  --fc-yellow: #b7791f;
  --fc-red: #b84c43;
  --fc-danger: #b84c43;
  --fc-accent: #5b6d88;
  --fc-shadow: 0 18px 44px rgba(18, 36, 64, 0.12);
  --fc-shadow-soft: 0 12px 28px rgba(18, 36, 64, 0.08);
  --bg: var(--fc-bg);
  --surface: var(--fc-panel-solid);
  --surface-alt: var(--fc-bg-soft);
  --text: var(--fc-text);
  --muted: var(--fc-muted);
  --line: var(--fc-line);
  --border: var(--fc-line);
  --primary: var(--fc-primary);
  --primary-dark: var(--fc-primary-2);
  --accent: var(--fc-accent);
  --ink: var(--fc-primary-2);
  --warning: #fff3cc;
}

html body,
html[data-theme="dark"] body,
html[data-theme="light"] body,
.dashboard,
.content {
  background: var(--fc-bg) !important;
  color: var(--fc-text) !important;
}

.sidebar,
html[data-theme="light"] .sidebar,
html[data-theme="dark"] .sidebar,
#dashboardView:not(.hidden) .sidebar {
  background: linear-gradient(180deg, #122440 0%, #1f3f6e 100%) !important;
  color: var(--fc-sidebar-text) !important;
  border-right-color: rgba(172, 180, 191, 0.24) !important;
  box-shadow: 14px 0 34px rgba(18, 36, 64, 0.18) !important;
}

.sidebar .sidebar-brand strong,
.sidebar .sidebar-user strong,
.sidebar h1,
html[data-theme="light"] .sidebar .sidebar-brand strong,
html[data-theme="light"] .sidebar .sidebar-user strong,
html[data-theme="light"] .sidebar h1 {
  color: #ffffff !important;
}

.sidebar .sidebar-brand span,
.sidebar .sidebar-user span,
.sidebar .nav-section-title,
.sidebar .eyebrow,
html[data-theme="light"] .sidebar .sidebar-brand span,
html[data-theme="light"] .sidebar .sidebar-user span,
html[data-theme="light"] .sidebar .nav-section-title {
  color: #acb4bf !important;
}

.sidebar .nav-button,
.sidebar .secondary,
html[data-theme="light"] .sidebar .nav-button,
html[data-theme="light"] .sidebar .secondary {
  color: #eef3f8 !important;
  background: transparent !important;
  border-color: transparent !important;
}

.sidebar .nav-button:hover,
.sidebar .secondary:hover,
.sidebar .nav-group-toggle.active-parent,
html[data-theme="light"] .sidebar .nav-button:hover,
html[data-theme="light"] .sidebar .secondary:hover,
html[data-theme="light"] .sidebar .nav-group-toggle.active-parent {
  background: rgba(172, 180, 191, 0.12) !important;
  color: #ffffff !important;
  border-color: rgba(172, 180, 191, 0.22) !important;
}

.sidebar .nav-button.active,
html[data-theme="light"] .sidebar .nav-button.active {
  background: rgba(172, 180, 191, 0.20) !important;
  color: #ffffff !important;
  border-color: rgba(172, 180, 191, 0.34) !important;
  box-shadow: inset 3px 0 0 #acb4bf, 0 8px 22px rgba(18, 36, 64, 0.20) !important;
}

.sidebar-logo,
html[data-theme="light"] .sidebar-logo {
  background: rgba(172, 180, 191, 0.16) !important;
  color: #ffffff !important;
  border-color: rgba(172, 180, 191, 0.42) !important;
}

.topbar,
.panel,
.notice,
.dashboard-section,
.storage-status-panel,
.record-filters,
.dashboard-report-filters,
.report-query-panel,
.item,
.metric-card,
.annotation-note-card,
.technical-demand,
.demand-card,
.report-card,
.report-results-panel,
html[data-theme="light"] .topbar,
html[data-theme="light"] .panel,
html[data-theme="light"] .notice,
html[data-theme="light"] .dashboard-section,
html[data-theme="light"] .storage-status-panel,
html[data-theme="light"] .record-filters,
html[data-theme="light"] .dashboard-report-filters,
html[data-theme="light"] .report-query-panel,
html[data-theme="light"] .item,
html[data-theme="light"] .metric-card,
html[data-theme="light"] .annotation-note-card,
html[data-theme="light"] .technical-demand,
html[data-theme="light"] .demand-card,
html[data-theme="light"] .report-card,
html[data-theme="light"] .report-results-panel {
  background: var(--fc-card) !important;
  color: var(--fc-text) !important;
  border-color: var(--fc-line) !important;
  box-shadow: var(--fc-shadow-soft) !important;
}

input,
select,
textarea,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: var(--fc-field) !important;
  color: var(--fc-text) !important;
  border-color: var(--fc-line) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(31, 64, 112, 0.58) !important;
  outline-color: rgba(31, 64, 112, 0.16) !important;
}

button:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.theme-toggle):not(.mobile-sidebar-overlay),
html[data-theme="light"] button:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.theme-toggle):not(.mobile-sidebar-overlay),
.email-row-actions button,
.compact-row-actions button,
.report-filter-actions button,
.record-export-options button,
.mobile-menu-button,
.dashboard.mobile-web-layout .mobile-menu-button,
#dashboardView:not(.hidden) .mobile-menu-button {
  background: var(--fc-primary) !important;
  color: #ffffff !important;
  border-color: rgba(31, 64, 112, 0.36) !important;
}

button:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.theme-toggle):not(.mobile-sidebar-overlay):hover,
.email-row-actions button:hover,
.compact-row-actions button:hover,
.report-filter-actions button:hover {
  background: var(--fc-primary-2) !important;
  color: #ffffff !important;
}

.secondary-action,
.secondary,
.item-actions .button-link,
html[data-theme="light"] .secondary-action,
html[data-theme="light"] .secondary,
html[data-theme="light"] .item-actions .button-link {
  background: #eef3f8 !important;
  color: var(--fc-primary-2) !important;
  border-color: rgba(31, 63, 110, 0.20) !important;
}

.icon-only-action,
.theme-toggle,
.notification-bell,
html[data-theme="light"] .topbar .icon-only-action,
html[data-theme="light"] .topbar .theme-toggle,
html[data-theme="light"] .topbar .notification-bell {
  background: #ffffff !important;
  color: var(--fc-primary-2) !important;
  border-color: rgba(31, 63, 110, 0.18) !important;
}

.icon-only-action:hover,
.theme-toggle:hover,
.notification-bell:hover,
html[data-theme="light"] .topbar .theme-toggle:hover,
html[data-theme="light"] .topbar .notification-bell:hover {
  background: #eef3f8 !important;
  color: var(--fc-primary) !important;
}

.record-status.status-done,
.status-concluida,
.record-status.status-completed,
html[data-theme="light"] .record-status.status-done,
html[data-theme="light"] .status-concluida {
  background: rgba(31, 64, 112, 0.12) !important;
  color: var(--fc-primary) !important;
  border-color: rgba(31, 64, 112, 0.28) !important;
}

.record-status.status-open,
.status-aberto,
.priority-badge.priority-alta,
.priority-chip.priority-alta,
html[data-theme="light"] .record-status.status-open,
html[data-theme="light"] .status-aberto {
  background: rgba(183, 121, 31, 0.12) !important;
  color: #8a5b00 !important;
  border-color: rgba(183, 121, 31, 0.28) !important;
}

.record-status.status-draft,
.priority-badge.priority-media,
.priority-chip.priority-media,
.badge,
.checklist-item-number,
.record-code,
.technical-demand-code,
.dashboard-demand-code,
html[data-theme="light"] .badge,
html[data-theme="light"] .record-status.status-draft,
html[data-theme="light"] .priority-badge.priority-media,
html[data-theme="light"] .priority-chip.priority-media,
html[data-theme="light"] .checklist-item-number,
html[data-theme="light"] .record-code,
html[data-theme="light"] .technical-demand-code,
html[data-theme="light"] .dashboard-demand-code {
  background: rgba(91, 109, 136, 0.14) !important;
  color: #1f3f6e !important;
  border-color: rgba(91, 109, 136, 0.26) !important;
}

.justification-select-options,
.report-justification-select .justification-select-options,
.email-group-form .email-multi-select-options,
html[data-theme="light"] .justification-select-option,
html[data-theme="light"] .report-justification-select .justification-select-options,
html[data-theme="light"] #reportsPanel .report-justification-select .justification-select-options,
html[data-theme="light"] #reportsPanel .report-multi-select .justification-select-options,
html[data-theme="light"] .email-group-form .email-multi-select-options {
  background: #122440 !important;
  color: #eef3f8 !important;
  border-color: rgba(172, 180, 191, 0.34) !important;
}

.justification-select-option,
.report-justification-option,
.email-group-form .email-multi-select .contract-checkbox-option,
html[data-theme="light"] .justification-select-option,
html[data-theme="light"] .report-justification-select .report-justification-option,
html[data-theme="light"] #reportsPanel .report-justification-option,
html[data-theme="light"] .email-group-form .email-multi-select .contract-checkbox-option {
  background: #122440 !important;
  color: #eef3f8 !important;
}

.justification-select-option:hover,
.justification-select-option:focus,
.report-justification-option:hover,
.report-justification-option:focus-within,
.email-group-form .email-multi-select .contract-checkbox-option:hover,
.email-group-form .email-multi-select .contract-checkbox-option:focus-within,
html[data-theme="light"] .justification-select-option:hover,
html[data-theme="light"] .justification-select-option:focus,
html[data-theme="light"] .report-justification-select .report-justification-option:hover,
html[data-theme="light"] .report-justification-select .report-justification-option:focus-within,
html[data-theme="light"] .email-group-form .email-multi-select .contract-checkbox-option:hover,
html[data-theme="light"] .email-group-form .email-multi-select .contract-checkbox-option:focus-within {
  background: #acb4bf !important;
  color: #122440 !important;
}

.brand-panel,
html[data-theme="dark"] .brand-panel,
html[data-theme="light"] .brand-panel {
  background: linear-gradient(135deg, #122440 0%, #1f3f6e 100%) !important;
  color: #ffffff !important;
}

.login-layout,
html[data-theme="dark"] .login-layout,
html[data-theme="light"] .login-layout {
  background: #eff4f8 !important;
}

.login-form,
.login-card,
html[data-theme="light"] .login-form,
html[data-theme="dark"] .login-form {
  background: #ffffff !important;
  color: #122440 !important;
}

.storage-card,
.firebase-usage-card,
html[data-theme="dark"] .storage-card,
html[data-theme="dark"] .firebase-usage-card {
  background: #ffffff !important;
  color: #122440 !important;
  border-color: rgba(31, 63, 110, 0.18) !important;
}

.storage-card-title span,
.storage-card small,
.firebase-usage-note,
html[data-theme="dark"] .storage-card-title span,
html[data-theme="dark"] .storage-card-footer span,
html[data-theme="dark"] .storage-card small,
html[data-theme="dark"] .firebase-usage-note {
  color: #5b6d88 !important;
}

.storage-card-title strong,
.storage-card-footer strong,
html[data-theme="dark"] .storage-card-title strong,
html[data-theme="dark"] .storage-card-footer strong,
html[data-theme="dark"] .firebase-usage-card .storage-card-title strong {
  color: #122440 !important;
}

.storage-badge,
html[data-theme="dark"] .storage-badge {
  background: rgba(31, 64, 112, 0.12) !important;
  color: #1f4070 !important;
}

.mobile-sidebar-close,
.dashboard.mobile-web-layout .mobile-sidebar-close,
#dashboardView:not(.hidden) .mobile-sidebar-close {
  background: rgba(172, 180, 191, 0.16) !important;
  color: #ffffff !important;
  border-color: rgba(172, 180, 191, 0.28) !important;
}

.mobile-sidebar-overlay,
.dashboard.mobile-web-layout .mobile-sidebar-overlay {
  background: rgba(18, 36, 64, 0.62) !important;
}

/* Final palette refinements requested after first deploy. */
:root,
html,
html[data-theme="dark"],
html[data-theme="light"] {
  --fc-sidebar: #122440;
  --fc-primary: #122440;
  --fc-primary-2: #0b1728;
  --primary: #122440;
  --primary-dark: #0b1728;
}

.theme-toggle,
.login-theme-actions,
#themeToggle {
  display: none !important;
}

.sidebar,
html[data-theme="light"] .sidebar,
html[data-theme="dark"] .sidebar,
#dashboardView:not(.hidden) .sidebar {
  background: linear-gradient(180deg, #122440 0%, #19345d 100%) !important;
}

.sidebar-footer,
html[data-theme="light"] .sidebar-footer,
html[data-theme="dark"] .sidebar-footer {
  margin: 2px 0 0 !important;
  padding: 12px 4px 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(172, 180, 191, 0.20) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.sidebar-user-icon,
html[data-theme="light"] .sidebar-user-icon,
html[data-theme="dark"] .sidebar-user-icon {
  color: #acb4bf !important;
}

#logoutButton,
html[data-theme="light"] #logoutButton,
html[data-theme="dark"] #logoutButton {
  color: #ffffff !important;
  min-height: 34px !important;
  padding: 0 4px !important;
  border-color: transparent !important;
}

#logoutButton:hover,
html[data-theme="light"] #logoutButton:hover,
html[data-theme="dark"] #logoutButton:hover {
  background: rgba(172, 180, 191, 0.16) !important;
}

.login-layout,
html[data-theme="dark"] .login-layout,
html[data-theme="light"] .login-layout {
  background: linear-gradient(135deg, #eef3f8 0%, #f8fbfd 100%) !important;
}

.brand-panel,
html[data-theme="dark"] .brand-panel,
html[data-theme="light"] .brand-panel {
  background:
    radial-gradient(circle at 12% 8%, rgba(172, 180, 191, 0.18), transparent 30%),
    linear-gradient(135deg, #122440 0%, #1f3f6e 100%) !important;
  color: #ffffff !important;
  border-right-color: rgba(31, 63, 110, 0.16) !important;
}

.brand-panel h1,
.brand-panel h1::first-line,
html[data-theme="dark"] .brand-panel h1,
html[data-theme="light"] .brand-panel h1 {
  color: #ffffff !important;
  text-shadow: none !important;
}

.brand-panel p,
.brand-lead,
.brand-mark,
html[data-theme="dark"] .brand-panel p,
html[data-theme="light"] .brand-panel p,
html[data-theme="dark"] .brand-lead,
html[data-theme="light"] .brand-lead,
html[data-theme="dark"] .brand-mark,
html[data-theme="light"] .brand-mark {
  color: #dce5ef !important;
}

.brand-symbol,
html[data-theme="dark"] .brand-symbol,
html[data-theme="light"] .brand-symbol {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(172, 180, 191, 0.30) !important;
  box-shadow: none !important;
}

.brand-metrics div,
.activity-preview,
html[data-theme="dark"] .brand-metrics div,
html[data-theme="light"] .brand-metrics div,
html[data-theme="dark"] .activity-preview,
html[data-theme="light"] .activity-preview {
  background: rgba(255, 255, 255, 0.10) !important;
  border-color: rgba(172, 180, 191, 0.28) !important;
  box-shadow: none !important;
}

.brand-metrics strong,
.activity-row strong,
html[data-theme="dark"] .brand-metrics strong,
html[data-theme="light"] .brand-metrics strong,
html[data-theme="dark"] .activity-row strong,
html[data-theme="light"] .activity-row strong {
  color: #ffffff !important;
}

.brand-metrics span,
.activity-row span,
html[data-theme="dark"] .brand-metrics span,
html[data-theme="light"] .brand-metrics span,
html[data-theme="dark"] .activity-row span,
html[data-theme="light"] .activity-row span {
  color: #dce5ef !important;
}

.login-form,
.login-card,
html[data-theme="light"] .login-form,
html[data-theme="dark"] .login-form {
  border-color: rgba(31, 63, 110, 0.16) !important;
  background: #ffffff !important;
  box-shadow: 0 24px 62px rgba(18, 36, 64, 0.12) !important;
}

.topbar,
html[data-theme="light"] .topbar,
html[data-theme="dark"] .topbar,
#dashboardView:not(.hidden) .topbar {
  background: #122440 !important;
  color: #ffffff !important;
  border-bottom-color: rgba(172, 180, 191, 0.24) !important;
  box-shadow: none !important;
}

.topbar .notification-bell,
html[data-theme="light"] .topbar .notification-bell,
html[data-theme="dark"] .topbar .notification-bell {
  background: transparent !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

.topbar .notification-bell:hover,
html[data-theme="light"] .topbar .notification-bell:hover,
html[data-theme="dark"] .topbar .notification-bell:hover {
  background: rgba(172, 180, 191, 0.14) !important;
  color: #ffffff !important;
}

#technicalDemandPreviewModal .app-modal-card-wide,
html[data-theme="light"] #technicalDemandPreviewModal .app-modal-card-wide,
html[data-theme="dark"] #technicalDemandPreviewModal .app-modal-card-wide {
  border-color: rgba(31, 64, 112, 0.24) !important;
  background: #ffffff !important;
  color: #122440 !important;
}

#technicalDemandPreviewModal .app-modal-header,
#technicalDemandPreviewModal .app-modal-actions {
  border-color: rgba(31, 64, 112, 0.16) !important;
  background: #ffffff !important;
}

#technicalDemandPreviewModal .icon-button {
  background: #122440 !important;
  color: #ffffff !important;
  border-color: rgba(31, 64, 112, 0.24) !important;
}

#technicalDemandPreviewModal .preview-checklist-title {
  border-color: rgba(31, 64, 112, 0.22) !important;
  background: rgba(31, 64, 112, 0.10) !important;
  color: #122440 !important;
}

#technicalDemandPreviewModal .preview-checklist-item,
#technicalDemandPreviewModal .preview-component-item,
#technicalDemandPreviewModal .preview-record-item,
#technicalDemandPreviewModal .modal-detail-item,
#technicalDemandPreviewModal .preview-photo {
  border-color: rgba(31, 64, 112, 0.12) !important;
  background: #eef3f8 !important;
}

#technicalDemandPreviewModal .app-modal-actions .secondary-action {
  background: #eef3f8 !important;
  color: #122440 !important;
  border-color: rgba(31, 64, 112, 0.18) !important;
}

#technicalDemandPreviewModal .app-modal-actions button:not(.secondary-action) {
  background: #122440 !important;
  color: #ffffff !important;
  border-color: #122440 !important;
}

@media (max-width: 620px) {
  #technicalDemandPreviewModal {
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 14px !important;
    overflow: hidden !important;
  }

  #technicalDemandPreviewModal .app-modal-card-wide {
    width: 100% !important;
    max-width: none !important;
    height: calc(100dvh - 28px) !important;
    max-height: calc(100dvh - 28px) !important;
    border-radius: 14px !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
  }

  #technicalDemandPreviewModal .app-modal-header {
    position: relative !important;
    padding: 18px 58px 12px 18px !important;
  }

  #technicalDemandPreviewModal .app-modal-header h3 {
    font-size: 26px !important;
    line-height: 1.08 !important;
  }

  #technicalDemandPreviewModal .app-modal-header p {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
  }

  #technicalDemandPreviewModal .app-modal-header .icon-button,
  #closeTechnicalDemandPreviewModalButton {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 10px !important;
    font-size: 28px !important;
    line-height: 1 !important;
    z-index: 2 !important;
  }

  #technicalDemandPreviewModal .app-modal-body {
    padding: 14px 18px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  #technicalDemandPreviewModal .modal-summary {
    font-size: 13px !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
  }

  #technicalDemandPreviewModal .preview-section {
    gap: 10px !important;
  }

  #technicalDemandPreviewModal .preview-section h4 {
    font-size: 16px !important;
  }

  #technicalDemandPreviewModal .preview-checklist-title {
    width: 100% !important;
    justify-content: flex-start !important;
    border-radius: 12px !important;
    font-size: 14px !important;
  }

  #technicalDemandPreviewModal .preview-checklist-item,
  #technicalDemandPreviewModal .preview-component-item,
  #technicalDemandPreviewModal .preview-record-item,
  #technicalDemandPreviewModal .modal-detail-item {
    padding: 12px !important;
    border-radius: 10px !important;
  }

  #technicalDemandPreviewModal .preview-checklist-item strong,
  #technicalDemandPreviewModal .preview-checklist-item span,
  #technicalDemandPreviewModal .modal-detail-item span {
    font-size: 15px !important;
    line-height: 1.25 !important;
  }

  #technicalDemandPreviewModal .app-modal-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 10px 14px calc(14px + env(safe-area-inset-bottom)) !important;
  }

  #technicalDemandPreviewModal .app-modal-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    line-height: 1.1 !important;
  }
}

.compact-table-components .compact-header,
.compact-table-components .compact-row {
  min-width: 520px !important;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.35fr) 132px !important;
  gap: 10px !important;
  padding: 9px 14px !important;
}

.compact-table-justifications .compact-header,
.compact-table-justifications .compact-row {
  min-width: 720px !important;
  grid-template-columns: minmax(190px, 1fr) minmax(280px, 1.35fr) minmax(150px, .8fr) 132px !important;
  gap: 10px !important;
  padding: 9px 14px !important;
}

.compact-table-components .compact-row,
.compact-table-justifications .compact-row {
  min-height: 48px !important;
}

.compact-table-components .compact-row > span:first-child b,
.compact-table-justifications .compact-row > span:first-child b {
  padding: 3px 9px !important;
  font-size: 11px !important;
}

.compact-table-components .compact-row-actions button,
.compact-table-justifications .compact-row-actions button,
html[data-theme="light"] .compact-table-components .compact-row-actions button,
html[data-theme="light"] .compact-table-justifications .compact-row-actions button {
  min-width: 58px !important;
  width: 58px !important;
  min-height: 36px !important;
  padding: 7px 5px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

.technical-demand-form-backdrop:not(.hidden) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9998 !important;
  display: block !important;
  background: rgba(18, 36, 64, 0.24) !important;
}

#technicalDemandForm:not(.hidden) {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 9999 !important;
  width: min(820px, calc(100vw - 42px)) !important;
  max-height: calc(100dvh - 56px) !important;
  overflow: auto !important;
  transform: translate(-50%, -50%) !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-content: start !important;
  gap: 12px 16px !important;
  margin: 0 !important;
  padding: 26px 30px !important;
  border: 1px solid rgba(172, 180, 191, 0.42) !important;
  border-radius: 14px !important;
  background: #f7fafc !important;
  color: #122440 !important;
  box-shadow: 0 22px 70px rgba(18, 36, 64, 0.22) !important;
}

#technicalDemandForm:not(.hidden) .full-row {
  grid-column: 1 / -1 !important;
}

#technicalDemandForm:not(.hidden) label,
#technicalDemandForm:not(.hidden) #technicalDemandCompanyInputWrap {
  min-width: 0 !important;
}

#technicalDemandForm:not(.hidden) input,
#technicalDemandForm:not(.hidden) select,
#technicalDemandForm:not(.hidden) textarea {
  width: 100% !important;
}

#technicalDemandForm:not(.hidden) input[type="checkbox"] {
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  flex: 0 0 18px !important;
  accent-color: #1f4070 !important;
}

#technicalDemandForm:not(.hidden) .technical-demand-options {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px 20px !important;
}

#technicalDemandForm:not(.hidden) .technical-demand-options .checkbox-label {
  width: auto !important;
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 !important;
  line-height: 1.25 !important;
}

#technicalDemandForm:not(.hidden) .technical-demand-options .checkbox-label span {
  display: inline !important;
  color: inherit !important;
}

#technicalDemandForm:not(.hidden) button {
  width: 100% !important;
}

#technicalDemandForm:not(.hidden) textarea {
  min-height: 86px !important;
}

@media (max-width: 900px), (pointer: coarse) {
  .technical-demand-form-backdrop:not(.hidden) {
    background: rgba(18, 36, 64, 0.34) !important;
  }

  #technicalDemandForm:not(.hidden) {
    top: 58px !important;
    left: 50% !important;
    width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 80px) !important;
    transform: translateX(-50%) !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 16px !important;
    border-radius: 14px !important;
  }

  #technicalDemandForm:not(.hidden) .technical-demand-options {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 16px !important;
  }

  #technicalDemandForm:not(.hidden) .technical-demand-options .checkbox-label {
    width: 100% !important;
    min-height: 26px !important;
    justify-content: flex-start !important;
    font-size: 16px !important;
  }
}

.form-modal-backdrop:not(.hidden) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9998 !important;
  display: block !important;
  background: rgba(18, 36, 64, 0.22) !important;
}

#contractForm:not(.hidden) {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 10001 !important;
  width: min(760px, calc(100vw - 48px)) !important;
  max-height: calc(100dvh - 96px) !important;
  overflow: auto !important;
  transform: translate(-50%, -50%) !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: end !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 24px !important;
  border: 1px solid rgba(172, 180, 191, 0.42) !important;
  border-radius: 16px !important;
  background: #f7fafc !important;
  color: #122440 !important;
  box-shadow: 0 22px 70px rgba(18, 36, 64, 0.22) !important;
}

#contractForm:not(.hidden) .form-modal-title {
  grid-column: 1 / -1 !important;
  display: grid !important;
  gap: 4px !important;
  margin: 0 0 4px !important;
}

#contractForm:not(.hidden) .form-modal-title h3 {
  margin: 0 !important;
  color: #122440 !important;
  font-size: 24px !important;
  line-height: 1.1 !important;
}

#contractForm:not(.hidden) .form-modal-title p {
  margin: 0 !important;
  color: #5b6d88 !important;
  font-size: 14px !important;
}

#contractForm:not(.hidden) label {
  display: grid !important;
  gap: 7px !important;
  color: #5b6d88 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

#contractForm:not(.hidden) input,
#contractForm:not(.hidden) select {
  width: 100% !important;
  min-height: 46px !important;
  border-color: rgba(91, 109, 136, 0.28) !important;
  background: #ffffff !important;
  color: #122440 !important;
}

#contractForm:not(.hidden) #contractCompanyField {
  grid-column: 1 / -1 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#contractForm:not(.hidden) button {
  width: 100% !important;
  min-height: 46px !important;
}

@media (max-width: 900px), (pointer: coarse) {
  .form-modal-backdrop:not(.hidden) {
    background: rgba(18, 36, 64, 0.34) !important;
  }

  #contractForm:not(.hidden) {
    left: 50% !important;
    width: calc(100vw - 28px) !important;
    max-height: calc(100dvh - 48px) !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 18px !important;
  }
}

.user-access-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr) !important;
  gap: 12px !important;
  align-items: stretch !important;
}

.user-access-row .two-factor-toggle,
.user-access-row .user-contract-field {
  grid-column: auto !important;
  margin: 0 !important;
  min-height: 86px !important;
}

.user-contract-field {
  justify-content: start !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.user-contract-inline-slot,
.user-contract-inline-slot .user-contract-multi-select,
.user-access-row .user-contract-multi-select {
  width: 100% !important;
  max-width: none !important;
}

.user-contract-trigger,
html[data-theme="light"] .user-contract-trigger,
html[data-theme="dark"] .user-contract-trigger {
  min-height: 46px !important;
  padding: 0 14px !important;
  border: 1px solid #cfd8e3 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #122440 !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.user-contract-trigger:hover,
html[data-theme="light"] .user-contract-trigger:hover,
html[data-theme="dark"] .user-contract-trigger:hover {
  background: #ffffff !important;
  color: #122440 !important;
}

.user-contract-trigger[aria-expanded="true"] {
  border-color: #5b6d88 !important;
  border-radius: 10px 10px 0 0 !important;
  box-shadow: 0 0 0 3px rgba(91, 109, 136, 0.18) !important;
}

.user-contract-options,
html[data-theme="light"] .user-contract-options,
html[data-theme="dark"] .user-contract-options {
  z-index: 10080 !important;
  top: calc(100% - 1px) !important;
  max-width: none !important;
  min-width: 100% !important;
  padding: 0 !important;
  border: 1px solid #cfd8e3 !important;
  border-top: 0 !important;
  border-radius: 0 0 10px 10px !important;
  background: #132638 !important;
  box-shadow: 0 16px 34px rgba(18, 36, 64, 0.24) !important;
}

.user-contract-options-list {
  max-height: 180px !important;
  padding: 6px 0 !important;
  gap: 0 !important;
  overflow: auto !important;
}

.user-contract-option,
html[data-theme="light"] .user-contract-option,
html[data-theme="dark"] .user-contract-option {
  min-height: 36px !important;
  padding: 8px 14px !important;
  gap: 10px !important;
  border-radius: 0 !important;
  color: #ffffff !important;
  background: #132638 !important;
  font-weight: 600 !important;
}

.user-contract-option:hover,
.user-contract-option:focus-within,
html[data-theme="light"] .user-contract-option:hover,
html[data-theme="light"] .user-contract-option:focus-within,
html[data-theme="dark"] .user-contract-option:hover,
html[data-theme="dark"] .user-contract-option:focus-within {
  background: #95bef0 !important;
  color: #122440 !important;
}

.user-contract-option input[type="checkbox"],
html[data-theme="light"] .user-contract-option input[type="checkbox"],
html[data-theme="dark"] .user-contract-option input[type="checkbox"] {
  width: 14px !important;
  min-width: 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  margin: 0 !important;
  accent-color: #1f4070 !important;
}

.user-contract-option span {
  font-size: 13px !important;
  line-height: 1.25 !important;
  color: inherit !important;
}

.user-contract-actions {
  display: flex !important;
  gap: 8px !important;
  justify-content: flex-end !important;
  padding: 8px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: #132638 !important;
}

.user-contract-actions button,
html[data-theme="light"] .user-contract-actions button,
html[data-theme="dark"] .user-contract-actions button {
  min-height: 32px !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

@media (max-width: 760px) {
  .user-access-row {
    grid-template-columns: 1fr !important;
  }

  .user-access-row .two-factor-toggle,
  .user-access-row .user-contract-field {
    min-height: 0 !important;
  }
}

/* Demandas tecnicas: card organizado em cabecalho, grade e rodape. */
#technicalDemandsPanel .technical-demand {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
  padding: 16px 20px !important;
  min-height: 0 !important;
  align-items: stretch !important;
}

#technicalDemandsPanel .technical-demand-main {
  display: grid !important;
  gap: 12px !important;
  min-width: 0 !important;
}

#technicalDemandsPanel .technical-demand-header {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) auto !important;
  align-items: start !important;
  gap: 18px !important;
  min-width: 0 !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid rgba(18, 36, 64, 0.12) !important;
}

#technicalDemandsPanel .technical-demand-heading {
  min-width: 0 !important;
}

#technicalDemandsPanel .technical-demand-title-row {
  gap: 8px !important;
}

#technicalDemandsPanel .technical-demand-title-row h3,
#technicalDemandsPanel .technical-demand-title-row strong {
  font-size: 22px !important;
  line-height: 1.05 !important;
}

#technicalDemandsPanel .technical-demand-title,
#technicalDemandsPanel .technical-demand-description {
  margin-top: 3px !important;
  line-height: 1.15 !important;
}

#technicalDemandsPanel .technical-demand-header-meta {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  align-content: start !important;
  gap: 8px !important;
  min-width: 0 !important;
}

#technicalDemandsPanel .technical-demand-opened {
  display: inline-grid !important;
  gap: 1px !important;
  min-width: 170px !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(31, 64, 112, 0.2) !important;
  border-radius: 10px !important;
  color: var(--text-primary) !important;
  background: color-mix(in srgb, #ffffff 88%, #acb4bf) !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}

#technicalDemandsPanel .technical-demand-opened strong {
  display: block !important;
  color: var(--text-muted) !important;
  font-size: 11px !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

#technicalDemandsPanel .technical-demand-badges {
  justify-content: flex-end !important;
  gap: 6px !important;
}

#technicalDemandsPanel .technical-demand-gps-header {
  display: none !important;
}

#technicalDemandsPanel .technical-demand-info {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) !important;
  gap: 8px !important;
  max-width: none !important;
}

#technicalDemandsPanel .technical-demand-flow {
  display: contents !important;
}

#technicalDemandsPanel .technical-demand-flow span {
  min-height: 48px !important;
  padding: 8px 11px !important;
  line-height: 1.15 !important;
  border-color: rgba(18, 36, 64, 0.16) !important;
  background: color-mix(in srgb, #ffffff 92%, #acb4bf) !important;
}

#technicalDemandsPanel .technical-demand-flow span strong {
  margin-bottom: 3px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

#technicalDemandsPanel .technical-demand-footer {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(18, 36, 64, 0.1) !important;
}

#technicalDemandsPanel .technical-demand-footer-spacer {
  flex: 1 1 auto !important;
}

#technicalDemandsPanel .technical-demand-gps-footer {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#technicalDemandsPanel .technical-demand-gps-footer span {
  min-height: 0 !important;
  padding: 7px 10px !important;
  border-radius: 999px !important;
  line-height: 1.1 !important;
  background: color-mix(in srgb, #ffffff 88%, #acb4bf) !important;
  border-color: rgba(18, 36, 64, 0.16) !important;
}

#technicalDemandsPanel .technical-demand-actions {
  grid-column: 1 !important;
  flex: 0 0 auto !important;
  margin-top: 0 !important;
  gap: 8px !important;
  justify-content: flex-end !important;
}

#technicalDemandsPanel .technical-demand-actions button {
  min-height: 36px !important;
  padding: 0 13px !important;
  border-radius: 10px !important;
}

@media (max-width: 1180px) {
  #technicalDemandsPanel .technical-demand-header {
    grid-template-columns: minmax(220px, 1fr) auto !important;
  }

  #technicalDemandsPanel .technical-demand-info {
    grid-template-columns: repeat(3, minmax(140px, 1fr)) !important;
  }

  #technicalDemandsPanel .technical-demand-footer {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  #technicalDemandsPanel .technical-demand-actions {
    width: 100% !important;
  }
}

@media (max-width: 760px) {
  #technicalDemandsPanel .technical-demand {
    padding: 14px !important;
  }

  #technicalDemandsPanel .technical-demand-header,
  #technicalDemandsPanel .technical-demand-info {
    grid-template-columns: 1fr !important;
  }

  #technicalDemandsPanel .technical-demand-header-meta {
    align-items: flex-start !important;
  }

  #technicalDemandsPanel .technical-demand-footer,
  #technicalDemandsPanel .technical-demand-gps-footer,
  #technicalDemandsPanel .technical-demand-actions {
    justify-content: stretch !important;
  }

  #technicalDemandsPanel .technical-demand-gps-footer span,
  #technicalDemandsPanel .technical-demand-actions button {
    width: 100% !important;
  }
}

/* Brand logo replacement */
.brand-mark.brand-mark-logo,
html[data-theme="dark"] .brand-mark.brand-mark-logo,
html[data-theme="light"] .brand-mark.brand-mark-logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 14px !important;
  width: auto !important;
  line-height: 1 !important;
  color: #ffffff !important;
  font-size: 19px !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
}

.brand-mark.brand-mark-logo img {
  display: block !important;
  width: 58px !important;
  max-width: 58px !important;
  height: 58px !important;
  object-fit: contain !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.brand-mark.brand-mark-logo span,
html[data-theme="dark"] .brand-mark.brand-mark-logo span,
html[data-theme="light"] .brand-mark.brand-mark-logo span {
  color: #ffffff !important;
}

.sidebar-logo.has-image,
html[data-theme="dark"] .sidebar-logo.has-image,
html[data-theme="light"] .sidebar-logo.has-image {
  width: 68px !important;
  height: 52px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 18px !important;
  color: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.sidebar-logo.has-image img,
html[data-theme="dark"] .sidebar-logo.has-image img,
html[data-theme="light"] .sidebar-logo.has-image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: inherit !important;
}

.sidebar:has(.sidebar-logo.has-image) .sidebar-brand,
html[data-theme="dark"] .sidebar:has(.sidebar-logo.has-image) .sidebar-brand,
html[data-theme="light"] .sidebar:has(.sidebar-logo.has-image) .sidebar-brand {
  grid-template-columns: 68px minmax(0, 1fr) !important;
  gap: 12px !important;
}

.dashboard.mobile-web-layout .sidebar:has(.sidebar-logo.has-image) .sidebar-brand {
  grid-template-columns: 68px minmax(0, 1fr) 40px !important;
}

@media (max-width: 760px) {
  .brand-mark.brand-mark-logo,
  html[data-theme="dark"] .brand-mark.brand-mark-logo,
  html[data-theme="light"] .brand-mark.brand-mark-logo {
    width: auto !important;
    gap: 12px !important;
    font-size: 18px !important;
  }

  .brand-mark.brand-mark-logo img {
    width: 52px !important;
    height: 52px !important;
    max-width: 52px !important;
  }
}

/* Storage and backup readability */
#storageStatusPanel.storage-status-panel,
html[data-theme="dark"] #storageStatusPanel.storage-status-panel,
html[data-theme="light"] #storageStatusPanel.storage-status-panel {
  padding: 24px !important;
  border: 1px solid rgba(31, 64, 112, 0.14) !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  color: #122440 !important;
  box-shadow: 0 18px 44px rgba(18, 36, 64, 0.08) !important;
}

#storageStatusPanel .firebase-usage-section,
html[data-theme="dark"] #storageStatusPanel .firebase-usage-section,
html[data-theme="light"] #storageStatusPanel .firebase-usage-section {
  padding: 0 0 20px !important;
  margin: 0 0 20px !important;
  border-bottom: 1px solid rgba(31, 64, 112, 0.12) !important;
  background: transparent !important;
}

#storageStatusPanel .storage-status-header,
html[data-theme="dark"] #storageStatusPanel .storage-status-header,
html[data-theme="light"] #storageStatusPanel .storage-status-header {
  margin-bottom: 14px !important;
  color: #122440 !important;
}

#storageStatusPanel .eyebrow,
html[data-theme="dark"] #storageStatusPanel .eyebrow,
html[data-theme="light"] #storageStatusPanel .eyebrow {
  color: #5b6d88 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.18em !important;
}

#storageStatusPanel h3,
html[data-theme="dark"] #storageStatusPanel h3,
html[data-theme="light"] #storageStatusPanel h3 {
  color: #122440 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

#storageStatusPanel .muted-text,
#storageStatusPanel .firebase-usage-note,
html[data-theme="dark"] #storageStatusPanel .muted-text,
html[data-theme="dark"] #storageStatusPanel .firebase-usage-note,
html[data-theme="light"] #storageStatusPanel .muted-text,
html[data-theme="light"] #storageStatusPanel .firebase-usage-note {
  color: #5b6d88 !important;
}

#storageStatusPanel .storage-status-grid,
html[data-theme="dark"] #storageStatusPanel .storage-status-grid,
html[data-theme="light"] #storageStatusPanel .storage-status-grid {
  gap: 12px !important;
}

#storageStatusPanel .firebase-usage-grid,
html[data-theme="dark"] #storageStatusPanel .firebase-usage-grid,
html[data-theme="light"] #storageStatusPanel .firebase-usage-grid {
  grid-template-columns: repeat(5, minmax(140px, 1fr)) !important;
}

#storageStatusPanel .backup-summary-grid,
html[data-theme="dark"] #storageStatusPanel .backup-summary-grid,
html[data-theme="light"] #storageStatusPanel .backup-summary-grid {
  grid-template-columns: repeat(4, minmax(170px, 1fr)) !important;
}

#storageStatusPanel .storage-card,
#storageStatusPanel .firebase-usage-card,
html[data-theme="dark"] #storageStatusPanel .storage-card,
html[data-theme="dark"] #storageStatusPanel .firebase-usage-card,
html[data-theme="light"] #storageStatusPanel .storage-card,
html[data-theme="light"] #storageStatusPanel .firebase-usage-card {
  min-height: 96px !important;
  padding: 16px !important;
  border: 1px solid rgba(31, 64, 112, 0.16) !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  color: #122440 !important;
  box-shadow: none !important;
}

#storageStatusPanel .firebase-usage-card .storage-card-title strong,
html[data-theme="dark"] #storageStatusPanel .firebase-usage-card .storage-card-title strong,
html[data-theme="light"] #storageStatusPanel .firebase-usage-card .storage-card-title strong {
  margin-top: 8px !important;
  color: #122440 !important;
  font-size: 30px !important;
  line-height: 1.05 !important;
}

#storageStatusPanel .storage-card-title span,
#storageStatusPanel .storage-card-footer span,
#storageStatusPanel .storage-card small,
html[data-theme="dark"] #storageStatusPanel .storage-card-title span,
html[data-theme="dark"] #storageStatusPanel .storage-card-footer span,
html[data-theme="dark"] #storageStatusPanel .storage-card small,
html[data-theme="light"] #storageStatusPanel .storage-card-title span,
html[data-theme="light"] #storageStatusPanel .storage-card-footer span,
html[data-theme="light"] #storageStatusPanel .storage-card small {
  color: #5b6d88 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

#storageStatusPanel .storage-card-title strong,
#storageStatusPanel .storage-card-footer strong,
html[data-theme="dark"] #storageStatusPanel .storage-card-title strong,
html[data-theme="dark"] #storageStatusPanel .storage-card-footer strong,
html[data-theme="light"] #storageStatusPanel .storage-card-title strong,
html[data-theme="light"] #storageStatusPanel .storage-card-footer strong {
  color: #122440 !important;
}

#storageStatusPanel .backup-status-row,
html[data-theme="dark"] #storageStatusPanel .backup-status-row,
html[data-theme="light"] #storageStatusPanel .backup-status-row {
  border-color: rgba(31, 64, 112, 0.14) !important;
  background: #f8fafc !important;
  color: #122440 !important;
}

#storageStatusPanel .secondary-action,
html[data-theme="dark"] #storageStatusPanel .secondary-action,
html[data-theme="light"] #storageStatusPanel .secondary-action {
  background: #122440 !important;
  color: #ffffff !important;
  border-color: #122440 !important;
}

@media (max-width: 1180px) {
  #storageStatusPanel .firebase-usage-grid,
  html[data-theme="dark"] #storageStatusPanel .firebase-usage-grid,
  html[data-theme="light"] #storageStatusPanel .firebase-usage-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr)) !important;
  }

  #storageStatusPanel .backup-summary-grid,
  html[data-theme="dark"] #storageStatusPanel .backup-summary-grid,
  html[data-theme="light"] #storageStatusPanel .backup-summary-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #storageStatusPanel.storage-status-panel,
  html[data-theme="dark"] #storageStatusPanel.storage-status-panel,
  html[data-theme="light"] #storageStatusPanel.storage-status-panel {
    padding: 18px !important;
  }

  #storageStatusPanel .storage-status-header,
  html[data-theme="dark"] #storageStatusPanel .storage-status-header,
  html[data-theme="light"] #storageStatusPanel .storage-status-header {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  #storageStatusPanel .firebase-usage-grid,
  #storageStatusPanel .backup-summary-grid,
  html[data-theme="dark"] #storageStatusPanel .firebase-usage-grid,
  html[data-theme="dark"] #storageStatusPanel .backup-summary-grid,
  html[data-theme="light"] #storageStatusPanel .firebase-usage-grid,
  html[data-theme="light"] #storageStatusPanel .backup-summary-grid {
    grid-template-columns: 1fr !important;
  }

  #storageStatusPanel .backup-status-row,
  html[data-theme="dark"] #storageStatusPanel .backup-status-row,
  html[data-theme="light"] #storageStatusPanel .backup-status-row {
    grid-template-columns: 1fr !important;
  }
}

/* FieldCheck-in visual system consolidation - 2026-07-10 */
:root,
html,
html[data-theme="light"],
html[data-theme="dark"] {
  --ui-canvas: #f3f6f9;
  --ui-surface: #ffffff;
  --ui-surface-subtle: #f8fafc;
  --ui-surface-selected: #e9eff6;
  --ui-border: #d8e0ea;
  --ui-border-strong: #c5d0dd;
  --ui-text: #10233f;
  --ui-muted: #5d6f87;
  --ui-navy: #102846;
  --ui-navy-strong: #0a1d34;
  --ui-blue: #315f96;
  --ui-blue-soft: #dce8f5;
  --ui-success: #327058;
  --ui-success-soft: #e2f0e9;
  --ui-warning: #9a6400;
  --ui-warning-soft: #fff1cf;
  --ui-danger: #ad443d;
  --ui-danger-soft: #f9e8e6;
  --ui-shadow: 0 8px 24px rgba(16, 35, 63, 0.07);
  --fc-bg: var(--ui-canvas);
  --fc-bg-soft: var(--ui-surface-subtle);
  --fc-panel: var(--ui-surface);
  --fc-panel-solid: var(--ui-surface);
  --fc-card: var(--ui-surface);
  --fc-field: var(--ui-surface);
  --fc-text: var(--ui-text);
  --fc-muted: var(--ui-muted);
  --fc-line: var(--ui-border);
  --fc-border: var(--ui-border);
  --fc-primary: var(--ui-navy);
  --fc-primary-2: var(--ui-navy-strong);
  --fc-shadow: var(--ui-shadow);
  --fc-shadow-soft: var(--ui-shadow);
  --bg: var(--ui-canvas);
  --surface: var(--ui-surface);
  --surface-alt: var(--ui-surface-subtle);
  --text: var(--ui-text);
  --muted: var(--ui-muted);
  --line: var(--ui-border);
  --border: var(--ui-border);
  --primary: var(--ui-navy);
  --primary-dark: var(--ui-navy-strong);
  --ink: var(--ui-text);
}

html,
body,
button,
input,
select,
textarea {
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  letter-spacing: 0 !important;
}

html body {
  background: var(--ui-canvas) !important;
  color: var(--ui-text) !important;
  font-size: 14px;
  line-height: 1.4;
}

/* Application frame */
#dashboardView:not(.hidden) {
  grid-template-columns: 236px minmax(0, 1fr) !important;
  min-height: 100vh !important;
  background: var(--ui-canvas) !important;
}

#dashboardView:not(.hidden) .sidebar,
html[data-theme="light"] #dashboardView:not(.hidden) .sidebar,
html[data-theme="dark"] #dashboardView:not(.hidden) .sidebar {
  width: 236px !important;
  gap: 14px !important;
  padding: 16px 12px 14px !important;
  border-right: 1px solid rgba(255, 255, 255, 0.10) !important;
  background: var(--ui-navy) !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .sidebar-brand,
#dashboardView:not(.hidden) .sidebar:has(.sidebar-logo.has-image) .sidebar-brand {
  grid-template-columns: 52px minmax(0, 1fr) !important;
  gap: 10px !important;
  min-height: 58px !important;
  padding: 0 4px 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

#dashboardView:not(.hidden) .sidebar-logo.has-image {
  width: 52px !important;
  height: 46px !important;
  border-radius: 8px !important;
}

#dashboardView:not(.hidden) .sidebar-brand strong {
  font-size: 16px !important;
  line-height: 1.15 !important;
}

#dashboardView:not(.hidden) .sidebar-brand span:not(.sidebar-logo) {
  margin-top: 3px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

#dashboardView:not(.hidden) .sidebar nav {
  gap: 2px !important;
  padding: 0 !important;
}

#dashboardView:not(.hidden) .nav-section-title {
  margin: 4px 10px 7px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

#dashboardView:not(.hidden) .nav-button,
#dashboardView:not(.hidden) .sidebar .secondary {
  min-height: 40px !important;
  padding: 0 11px !important;
  gap: 10px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #e8eef5 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  transform: none !important;
}

#dashboardView:not(.hidden) .nav-button:hover,
#dashboardView:not(.hidden) .sidebar .secondary:hover,
#dashboardView:not(.hidden) .nav-group-toggle.active-parent {
  border-color: rgba(255, 255, 255, 0.10) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

#dashboardView:not(.hidden) .nav-button.active {
  border-color: rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.13) !important;
  box-shadow: inset 3px 0 0 #8fb4dc !important;
  color: #ffffff !important;
}

#dashboardView:not(.hidden) .nav-icon {
  width: 18px !important;
  min-width: 18px !important;
  color: #b9c9db !important;
  font-size: 15px !important;
  text-align: center !important;
}

#dashboardView:not(.hidden) .nav-subitem {
  min-height: 36px !important;
  padding-left: 35px !important;
  font-size: 13px !important;
}

#dashboardView:not(.hidden) .sidebar-footer {
  gap: 4px !important;
  padding: 10px 2px 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
}

#dashboardView:not(.hidden) .sidebar-user {
  min-height: 46px !important;
  padding: 6px 8px !important;
  border: 0 !important;
  background: transparent !important;
}

#dashboardView:not(.hidden) .content {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 0 24px 32px !important;
  background: var(--ui-canvas) !important;
}

#dashboardView:not(.hidden) .topbar,
html[data-theme="light"] #dashboardView:not(.hidden) .topbar,
html[data-theme="dark"] #dashboardView:not(.hidden) .topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 120 !important;
  min-height: 56px !important;
  margin: 0 -24px 20px !important;
  padding: 8px 24px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ui-border) !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, 0.97) !important;
  color: var(--ui-text) !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px) !important;
}

#dashboardView:not(.hidden) .topbar .notification-bell,
html[data-theme="light"] #dashboardView:not(.hidden) .topbar .notification-bell,
html[data-theme="dark"] #dashboardView:not(.hidden) .topbar .notification-bell {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 6px !important;
  background: var(--ui-surface) !important;
  color: var(--ui-navy) !important;
}

#dashboardView:not(.hidden) .topbar .notification-bell:hover {
  border-color: var(--ui-border-strong) !important;
  background: var(--ui-surface-selected) !important;
  color: var(--ui-navy) !important;
}

/* Page hierarchy */
#dashboardView:not(.hidden) .panel,
html[data-theme="light"] #dashboardView:not(.hidden) .panel,
html[data-theme="dark"] #dashboardView:not(.hidden) .panel {
  width: min(100%, 1640px) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .panel-header {
  align-items: flex-start !important;
  min-height: 70px !important;
  margin: 0 0 18px !important;
  padding: 0 0 16px !important;
  border-bottom: 1px solid var(--ui-border) !important;
}

#dashboardView:not(.hidden) .panel-header h2 {
  margin: 0 !important;
  color: var(--ui-text) !important;
  font-size: 28px !important;
  font-weight: 750 !important;
  line-height: 1.1 !important;
}

#dashboardView:not(.hidden) .panel-header .eyebrow,
#dashboardView:not(.hidden) .dashboard-section .eyebrow {
  margin: 0 0 5px !important;
  color: var(--ui-muted) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
}

#dashboardView:not(.hidden) .panel-header p:not(.eyebrow) {
  max-width: 760px !important;
  margin: 5px 0 0 !important;
  color: var(--ui-muted) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

#dashboardView:not(.hidden) .panel-actions {
  gap: 8px !important;
}

/* Controls and commands */
#dashboardView:not(.hidden) input,
#dashboardView:not(.hidden) select,
#dashboardView:not(.hidden) textarea,
html[data-theme="light"] #dashboardView:not(.hidden) input,
html[data-theme="light"] #dashboardView:not(.hidden) select,
html[data-theme="light"] #dashboardView:not(.hidden) textarea,
html[data-theme="dark"] #dashboardView:not(.hidden) input,
html[data-theme="dark"] #dashboardView:not(.hidden) select,
html[data-theme="dark"] #dashboardView:not(.hidden) textarea {
  min-height: 40px !important;
  border: 1px solid var(--ui-border-strong) !important;
  border-radius: 6px !important;
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) input,
#dashboardView:not(.hidden) select {
  padding-right: 12px !important;
  padding-left: 12px !important;
}

#dashboardView:not(.hidden) textarea {
  min-height: 88px !important;
  padding: 10px 12px !important;
  resize: vertical !important;
}

#dashboardView:not(.hidden) input:focus,
#dashboardView:not(.hidden) select:focus,
#dashboardView:not(.hidden) textarea:focus {
  border-color: var(--ui-blue) !important;
  outline: 3px solid rgba(49, 95, 150, 0.14) !important;
  outline-offset: 0 !important;
}

#dashboardView:not(.hidden) label {
  color: var(--ui-muted) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

#dashboardView:not(.hidden) button:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open),
html[data-theme="light"] #dashboardView:not(.hidden) button:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open),
html[data-theme="dark"] #dashboardView:not(.hidden) button:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open) {
  min-height: 40px !important;
  padding: 0 14px !important;
  border: 1px solid var(--ui-navy) !important;
  border-radius: 6px !important;
  background: var(--ui-navy) !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
}

#dashboardView:not(.hidden) button:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open):hover {
  border-color: var(--ui-navy-strong) !important;
  background: var(--ui-navy-strong) !important;
  color: #ffffff !important;
  transform: none !important;
}

#dashboardView:not(.hidden) .secondary-action,
#dashboardView:not(.hidden) button.secondary-action,
html[data-theme="light"] #dashboardView:not(.hidden) .secondary-action,
html[data-theme="dark"] #dashboardView:not(.hidden) .secondary-action {
  border-color: var(--ui-border-strong) !important;
  background: var(--ui-surface) !important;
  color: var(--ui-navy) !important;
}

#dashboardView:not(.hidden) .secondary-action:hover,
#dashboardView:not(.hidden) button.secondary-action:hover {
  border-color: #b4c1d0 !important;
  background: var(--ui-surface-selected) !important;
  color: var(--ui-navy) !important;
}

#dashboardView:not(.hidden) button.danger,
#dashboardView:not(.hidden) .danger {
  border-color: #e4b9b5 !important;
  background: var(--ui-danger-soft) !important;
  color: var(--ui-danger) !important;
}

#dashboardView:not(.hidden) button.danger:hover,
#dashboardView:not(.hidden) .danger:hover {
  border-color: var(--ui-danger) !important;
  background: var(--ui-danger) !important;
  color: #ffffff !important;
}

#dashboardView:not(.hidden) button:focus-visible,
#dashboardView:not(.hidden) a:focus-visible {
  outline: 3px solid rgba(49, 95, 150, 0.24) !important;
  outline-offset: 2px !important;
}

/* Filters and data surfaces */
#dashboardView:not(.hidden) .record-filters,
#dashboardView:not(.hidden) .dashboard-report-filters,
html[data-theme="light"] #dashboardView:not(.hidden) .record-filters,
html[data-theme="dark"] #dashboardView:not(.hidden) .record-filters {
  gap: 12px !important;
  margin: 0 0 16px !important;
  padding: 14px !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .record-filters label {
  gap: 6px !important;
  color: var(--ui-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

#dashboardView:not(.hidden) .record-filters > button {
  min-width: 108px !important;
  justify-self: start !important;
}

#dashboardView:not(.hidden) .compact-table,
#dashboardView:not(.hidden) .email-compact-table {
  border: 1px solid var(--ui-border) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
  scrollbar-color: #9aa9ba #edf1f5;
  scrollbar-width: thin;
}

#dashboardView:not(.hidden) .compact-header,
#dashboardView:not(.hidden) .email-compact-header {
  min-height: 42px !important;
  padding-top: 9px !important;
  padding-bottom: 9px !important;
  border-bottom: 1px solid var(--ui-border) !important;
  background: var(--ui-surface-subtle) !important;
  color: var(--ui-muted) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

#dashboardView:not(.hidden) .compact-row,
#dashboardView:not(.hidden) .email-compact-row {
  min-height: 52px !important;
  border-bottom: 1px solid #e7ecf2 !important;
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
  font-size: 14px !important;
}

#dashboardView:not(.hidden) .compact-row:hover,
#dashboardView:not(.hidden) .email-compact-row:hover {
  background: #f7f9fc !important;
}

#dashboardView:not(.hidden) .compact-row > span:first-child b,
#dashboardView:not(.hidden) .record-code,
#dashboardView:not(.hidden) .technical-demand-code {
  border: 1px solid #cbd6e2 !important;
  border-radius: 999px !important;
  background: #e9eef5 !important;
  color: #294a72 !important;
  font-weight: 750 !important;
}

#dashboardView:not(.hidden) .compact-row-actions button,
#dashboardView:not(.hidden) .email-row-actions button,
html[data-theme="light"] #dashboardView:not(.hidden) .compact-row-actions button {
  min-height: 34px !important;
  padding: 0 10px !important;
  border-color: var(--ui-border-strong) !important;
  border-radius: 6px !important;
  background: var(--ui-surface) !important;
  color: var(--ui-navy) !important;
  font-size: 12px !important;
}

#dashboardView:not(.hidden) .compact-row-actions button:hover,
#dashboardView:not(.hidden) .email-row-actions button:hover {
  border-color: #aebccd !important;
  background: var(--ui-surface-selected) !important;
  color: var(--ui-navy) !important;
}

#dashboardView:not(.hidden) .compact-row-actions button.danger,
#dashboardView:not(.hidden) .email-row-actions button.danger {
  border-color: #e4b9b5 !important;
  background: var(--ui-danger-soft) !important;
  color: var(--ui-danger) !important;
}

#dashboardView:not(.hidden) .item,
#dashboardView:not(.hidden) .technical-demand,
#dashboardView:not(.hidden) .demand-card,
#dashboardView:not(.hidden) .annotation-note-card {
  border: 1px solid var(--ui-border) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
  transform: none !important;
}

#dashboardView:not(.hidden) .item:hover,
#dashboardView:not(.hidden) .technical-demand:hover,
#dashboardView:not(.hidden) .demand-card:hover,
#dashboardView:not(.hidden) .annotation-note-card:hover {
  border-color: var(--ui-border-strong) !important;
  box-shadow: var(--ui-shadow) !important;
  transform: none !important;
}

/* Dashboard */
#dashboardView:not(.hidden) .dashboard-metrics {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
  gap: 12px !important;
}

#dashboardView:not(.hidden) .metric-card {
  min-height: 108px !important;
  gap: 7px !important;
  padding: 15px 16px !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .metric-card::after {
  display: none !important;
}

#dashboardView:not(.hidden) .metric-card span {
  color: var(--ui-muted) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
}

#dashboardView:not(.hidden) .metric-card strong {
  color: var(--ui-text) !important;
  font-size: 30px !important;
  font-weight: 750 !important;
}

#dashboardView:not(.hidden) .metric-card small {
  color: var(--ui-muted) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

#dashboardView:not(.hidden) .dashboard-grid {
  gap: 14px !important;
  margin-top: 14px !important;
}

#dashboardView:not(.hidden) .dashboard-section {
  padding: 16px !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .dashboard-section h3 {
  color: var(--ui-text) !important;
  font-size: 18px !important;
  font-weight: 750 !important;
}

#dashboardView:not(.hidden) .activity-card,
#dashboardView:not(.hidden) .report-summary-item,
#dashboardView:not(.hidden) .report-metric {
  border-radius: 6px !important;
  box-shadow: none !important;
}

/* Status uses color only where it communicates meaning. */
#dashboardView:not(.hidden) .record-status.status-completed,
#dashboardView:not(.hidden) .record-status.status-done,
#dashboardView:not(.hidden) .status-concluida,
#dashboardView:not(.hidden) .status-chip.completed {
  border-color: #b8d7c8 !important;
  background: var(--ui-success-soft) !important;
  color: var(--ui-success) !important;
}

#dashboardView:not(.hidden) .record-status.status-open,
#dashboardView:not(.hidden) .status-aberto,
#dashboardView:not(.hidden) .priority-badge.priority-alta,
#dashboardView:not(.hidden) .priority-chip.priority-alta {
  border-color: #e9cf8f !important;
  background: var(--ui-warning-soft) !important;
  color: var(--ui-warning) !important;
}

/* Forms and dialogs */
#dashboardView:not(.hidden) .company-form,
#dashboardView:not(.hidden) .user-form,
#dashboardView:not(.hidden) .site-form,
#dashboardView:not(.hidden) .equipment-form,
#dashboardView:not(.hidden) .component-form,
#dashboardView:not(.hidden) .checklist-form,
#dashboardView:not(.hidden) .demand-form,
#dashboardView:not(.hidden) .reminder-form,
#dashboardView:not(.hidden) .email-form,
#dashboardView:not(.hidden) .edit-form,
#dashboardView:not(.hidden) .annotation-form {
  border: 1px solid var(--ui-border) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .app-modal {
  padding: 20px !important;
  background: rgba(9, 24, 43, 0.58) !important;
  backdrop-filter: blur(3px) !important;
}

#dashboardView:not(.hidden) .app-modal-card,
#dashboardView:not(.hidden) .app-modal-card-wide {
  max-height: calc(100dvh - 40px) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
  box-shadow: 0 24px 70px rgba(9, 24, 43, 0.24) !important;
}

#dashboardView:not(.hidden) .app-modal-header,
#dashboardView:not(.hidden) .app-modal-actions {
  border-color: var(--ui-border) !important;
  background: var(--ui-surface) !important;
}

#dashboardView:not(.hidden) .app-modal-header h3 {
  color: var(--ui-text) !important;
  font-size: 22px !important;
  font-weight: 750 !important;
}

#dashboardView:not(.hidden) .app-modal .icon-button {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  border: 1px solid var(--ui-border-strong) !important;
  border-radius: 6px !important;
  background: var(--ui-surface) !important;
  color: var(--ui-navy) !important;
}

#dashboardView:not(.hidden) .app-modal .icon-button:hover {
  background: var(--ui-surface-selected) !important;
  color: var(--ui-navy) !important;
}

#technicalDemandForm:not(.hidden),
#contractForm:not(.hidden) {
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
}

#technicalDemandsPanel .technical-demand-opened,
#technicalDemandsPanel .technical-demand-flow span,
#technicalDemandsPanel .technical-demand-gps-footer span,
#technicalDemandPreviewModal .preview-checklist-item,
#technicalDemandPreviewModal .preview-component-item,
#technicalDemandPreviewModal .preview-record-item,
#technicalDemandPreviewModal .modal-detail-item {
  border-radius: 6px !important;
}

#technicalDemandsPanel .technical-demand-title-row h3,
#technicalDemandsPanel .technical-demand-title-row strong {
  font-size: 20px !important;
  line-height: 1.15 !important;
}

#technicalDemandsPanel .technical-demand-actions button {
  border-radius: 6px !important;
}

/* Component photos and viewer */
#technicalDemandPreviewModal .preview-component-item {
  border: 1px solid var(--ui-border) !important;
  background: var(--ui-surface-subtle) !important;
}

#technicalDemandPreviewModal .preview-photo {
  max-width: 184px !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
}

#technicalDemandPreviewModal .preview-photo-thumb,
#technicalDemandPreviewModal .preview-photo-caption-action,
#technicalDemandPreviewModal .preview-photo-open {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ui-muted) !important;
  box-shadow: none !important;
}

#photoPreviewModal.photo-preview-modal {
  left: 236px !important;
  width: calc(100vw - 236px) !important;
  padding: 20px !important;
}

#photoPreviewModal .photo-preview-card {
  width: min(720px, 100%) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 8px !important;
  box-shadow: 0 24px 70px rgba(9, 24, 43, 0.30) !important;
}

#photoPreviewModal .photo-preview-header {
  min-height: 54px !important;
  padding: 9px 12px 9px 16px !important;
}

#photoPreviewModal .photo-preview-body {
  padding: 10px !important;
}

#photoPreviewModal .photo-preview-toolbar button,
html[data-theme="light"] #photoPreviewModal .photo-preview-toolbar button,
html[data-theme="dark"] #photoPreviewModal .photo-preview-toolbar button {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 6px !important;
  background: var(--ui-surface-subtle) !important;
  color: var(--ui-navy) !important;
}

/* Login */
#loginView.login-layout {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px) !important;
  background: var(--ui-canvas) !important;
}

#loginView .brand-panel {
  padding: 52px !important;
  border: 0 !important;
  background: var(--ui-navy) !important;
  color: #ffffff !important;
}

#loginView .brand-metrics div,
#loginView .activity-preview {
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.07) !important;
  box-shadow: none !important;
}

#loginView .login-form {
  padding: 42px !important;
  border: 0 !important;
  border-left: 1px solid var(--ui-border) !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
}

#loginView .login-form input,
#loginView .login-form select {
  min-height: 44px !important;
  border: 1px solid var(--ui-border-strong) !important;
  border-radius: 6px !important;
}

#loginView .login-form button {
  min-height: 44px !important;
  border: 1px solid var(--ui-navy) !important;
  border-radius: 6px !important;
  background: var(--ui-navy) !important;
  color: #ffffff !important;
}

@media (max-width: 1180px) {
  #dashboardView:not(.hidden) {
    grid-template-columns: 220px minmax(0, 1fr) !important;
  }

  #dashboardView:not(.hidden) .sidebar {
    width: 220px !important;
  }

  #dashboardView:not(.hidden) .dashboard-grid {
    grid-template-columns: 1fr !important;
  }

  #photoPreviewModal.photo-preview-modal {
    left: 220px !important;
    width: calc(100vw - 220px) !important;
  }
}

@media (max-width: 900px) {
  #dashboardView:not(.hidden),
  #dashboardView.mobile-web-layout:not(.hidden) {
    display: block !important;
  }

  #dashboardView:not(.hidden) .content,
  #dashboardView.mobile-web-layout:not(.hidden) .content {
    width: 100% !important;
    padding: 0 14px 24px !important;
  }

  #dashboardView:not(.hidden) .topbar,
  #dashboardView.mobile-web-layout:not(.hidden) .topbar {
    min-height: 52px !important;
    margin: 0 -14px 16px !important;
    padding: 7px 14px !important;
  }

  #dashboardView.mobile-web-layout .mobile-menu-button,
  #dashboardView:not(.hidden) .mobile-menu-button {
    min-height: 38px !important;
    padding: 0 10px !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 6px !important;
    background: var(--ui-surface) !important;
    color: var(--ui-navy) !important;
  }

  #dashboardView.mobile-web-layout .sidebar,
  #dashboardView:not(.hidden) .sidebar {
    width: min(300px, calc(100vw - 40px)) !important;
  }

  #dashboardView.mobile-web-layout .sidebar:has(.sidebar-logo.has-image) .sidebar-brand {
    grid-template-columns: 52px minmax(0, 1fr) 38px !important;
  }

  #dashboardView:not(.hidden) .panel-header {
    min-height: 0 !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
    padding-bottom: 14px !important;
  }

  #dashboardView:not(.hidden) .panel-header h2 {
    font-size: 24px !important;
  }

  #dashboardView:not(.hidden) .panel-actions {
    width: 100% !important;
  }

  #dashboardView:not(.hidden) .record-filters,
  #dashboardView:not(.hidden) .dashboard-report-filters {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  #dashboardView:not(.hidden) .record-filters > button {
    width: 100% !important;
    justify-self: stretch !important;
  }

  #dashboardView:not(.hidden) .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  #dashboardView:not(.hidden) .metric-card {
    min-height: 112px !important;
    padding: 13px !important;
  }

  #dashboardView:not(.hidden) .metric-card strong {
    font-size: 27px !important;
  }

  #dashboardView:not(.hidden) .dashboard-section {
    padding: 14px !important;
  }

  #dashboardView:not(.hidden) .item {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #dashboardView:not(.hidden) .item-actions {
    grid-column: 1 !important;
    grid-row: auto !important;
    margin-top: 10px !important;
  }

  #dashboardView:not(.hidden) .app-modal {
    padding: 10px !important;
  }

  #dashboardView:not(.hidden) .app-modal-card,
  #dashboardView:not(.hidden) .app-modal-card-wide {
    width: 100% !important;
    max-width: none !important;
    max-height: calc(100dvh - 20px) !important;
    border-radius: 8px !important;
  }

  #dashboardView:not(.hidden) .app-modal-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  #dashboardView:not(.hidden) .app-modal-actions button {
    width: 100% !important;
    min-width: 0 !important;
  }

  #technicalDemandsPanel .technical-demand-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  #technicalDemandsPanel .technical-demand-actions button {
    width: 100% !important;
  }

  #photoPreviewModal.photo-preview-modal {
    left: 0 !important;
    width: 100vw !important;
    padding: 10px !important;
  }

  #loginView.login-layout {
    grid-template-columns: 1fr !important;
  }

  #loginView .brand-panel {
    min-height: 86px !important;
    padding: 16px 20px !important;
  }

  #loginView .brand-panel > :not(.brand-mark) {
    display: none !important;
  }

  #loginView .login-form {
    min-height: calc(100dvh - 86px) !important;
    padding: 28px 22px !important;
    border-left: 0 !important;
  }
}

@media (max-width: 520px) {
  #dashboardView:not(.hidden) .panel-header .panel-actions,
  #dashboardView:not(.hidden) .panel-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  #dashboardView:not(.hidden) .panel-actions button {
    width: 100% !important;
  }

  #dashboardView:not(.hidden) .compact-table {
    margin-right: -2px !important;
    margin-left: -2px !important;
  }

  #dashboardView:not(.hidden) .app-modal-header {
    padding: 14px !important;
  }

  #dashboardView:not(.hidden) .app-modal-header h3 {
    font-size: 20px !important;
  }

  #dashboardView:not(.hidden) .app-modal-body {
    padding: 12px 14px !important;
  }

  #technicalDemandPreviewModal .app-modal-actions {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Final consistency guards for legacy selectors with higher specificity. */
#dashboardView:not(.hidden) *,
#loginView:not(.hidden) * {
  letter-spacing: 0 !important;
}

#dashboardView:not(.hidden) .report-query-panel,
#dashboardView:not(.hidden) .report-results-panel,
#dashboardView:not(.hidden) .report-card,
#dashboardView:not(.hidden) .storage-status-panel,
#dashboardView:not(.hidden) .storage-card,
#dashboardView:not(.hidden) .firebase-usage-card,
#dashboardView:not(.hidden) .backup-status-row {
  border-color: var(--ui-border) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .report-query-panel,
#dashboardView:not(.hidden) .report-results-panel,
#dashboardView:not(.hidden) .storage-status-panel {
  padding: 16px !important;
}

#dashboardView:not(.hidden) .storage-card,
#dashboardView:not(.hidden) .firebase-usage-card,
#dashboardView:not(.hidden) .backup-status-row {
  background: var(--ui-surface-subtle) !important;
}

#dashboardView:not(.hidden) .message:empty {
  min-height: 0 !important;
  margin: 0 !important;
}

#dashboardView:not(.hidden) .content button.secondary-action:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open),
#dashboardView:not(.hidden) .content button.secondary:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open) {
  border-color: var(--ui-border-strong) !important;
  background: var(--ui-surface) !important;
  color: var(--ui-navy) !important;
}

#dashboardView:not(.hidden) .content button.secondary-action:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open):hover,
#dashboardView:not(.hidden) .content button.secondary:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open):hover {
  border-color: #b4c1d0 !important;
  background: var(--ui-surface-selected) !important;
  color: var(--ui-navy) !important;
}

#dashboardView:not(.hidden) .content button.danger:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open) {
  border-color: #e4b9b5 !important;
  background: var(--ui-danger-soft) !important;
  color: var(--ui-danger) !important;
}

#dashboardView:not(.hidden) .content button.danger:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open):hover {
  border-color: var(--ui-danger) !important;
  background: var(--ui-danger) !important;
  color: #ffffff !important;
}

#dashboardView:not(.hidden) .record-filters > button.secondary-action {
  width: fit-content !important;
  min-width: 108px !important;
}

@media (max-width: 900px) {
  #dashboardView:not(.hidden) .record-filters > button.secondary-action {
    width: 100% !important;
  }
}

@media (max-width: 700px) {
  #dashboardView:not(.hidden) .compact-table-records {
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  #dashboardView:not(.hidden) .compact-table-records .compact-header {
    display: none !important;
  }

  #dashboardView:not(.hidden) .compact-table-records .compact-row {
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-bottom: 10px !important;
    padding: 14px !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 8px !important;
    background: var(--ui-surface) !important;
  }

  #dashboardView:not(.hidden) .compact-table-records .compact-row > span {
    display: grid !important;
    gap: 3px !important;
    align-content: start !important;
    overflow: visible !important;
    color: var(--ui-text) !important;
    line-height: 1.3 !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  #dashboardView:not(.hidden) .compact-table-records .compact-row > span::before {
    color: var(--ui-muted) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
  }

  #dashboardView:not(.hidden) .compact-table-records .compact-row > span:nth-child(1)::before { content: "Registro"; }
  #dashboardView:not(.hidden) .compact-table-records .compact-row > span:nth-child(2)::before { content: "Equipamento"; }
  #dashboardView:not(.hidden) .compact-table-records .compact-row > span:nth-child(3)::before { content: "Tecnico"; }
  #dashboardView:not(.hidden) .compact-table-records .compact-row > span:nth-child(4)::before { content: "Contrato"; }
  #dashboardView:not(.hidden) .compact-table-records .compact-row > span:nth-child(5)::before { content: "Data"; }
  #dashboardView:not(.hidden) .compact-table-records .compact-row > span:nth-child(6)::before { content: "Status"; }

  #dashboardView:not(.hidden) .compact-table-records .compact-row-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    padding-top: 2px !important;
  }

  #dashboardView:not(.hidden) .compact-table-records .compact-row-actions button {
    width: 100% !important;
    min-width: 0 !important;
  }
}

#dashboardView:not(.hidden) .content button[data-action="reopen-technical-demand"]:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open) {
  border-color: var(--ui-border-strong) !important;
  background: var(--ui-surface) !important;
  color: var(--ui-navy) !important;
}

#dashboardView:not(.hidden) .content button[data-action="reopen-technical-demand"]:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open):hover {
  border-color: #b4c1d0 !important;
  background: var(--ui-surface-selected) !important;
  color: var(--ui-navy) !important;
}

#dashboardView:not(.hidden) #accountPasswordButton,
#dashboardView:not(.hidden) #logoutButton {
  border-color: transparent !important;
  background: transparent !important;
  color: #ffffff !important;
}

#dashboardView:not(.hidden) #accountPasswordButton:hover,
#dashboardView:not(.hidden) #logoutButton:hover {
  border-color: rgba(255, 255, 255, 0.10) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

#dashboardView:not(.hidden) #accountPasswordButton {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  gap: 10px !important;
  padding: 0 14px !important;
  text-align: left !important;
}

#dashboardView:not(.hidden) #accountPasswordButton .nav-icon {
  width: 18px !important;
  min-width: 18px !important;
  justify-content: center !important;
  text-align: center !important;
}

/* Professional interface pass - 2026-07-10 */
[data-icon] {
  --icon-url: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: currentColor;
}

[data-icon]::before {
  content: "";
  display: block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: var(--icon-url) center / contain no-repeat;
  mask: var(--icon-url) center / contain no-repeat;
}

[data-icon="bell"] { --icon-url: url("./assets/icons/bell.svg"); }
[data-icon="box"] { --icon-url: url("./assets/icons/box.svg"); }
[data-icon="building-2"] { --icon-url: url("./assets/icons/building-2.svg"); }
[data-icon="chart-column"] { --icon-url: url("./assets/icons/chart-column.svg"); }
[data-icon="circle-check-big"] { --icon-url: url("./assets/icons/circle-check-big.svg"); }
[data-icon="clipboard-check"] { --icon-url: url("./assets/icons/clipboard-check.svg"); }
[data-icon="clipboard-list"] { --icon-url: url("./assets/icons/clipboard-list.svg"); }
[data-icon="database"] { --icon-url: url("./assets/icons/database.svg"); }
[data-icon="file-text"] { --icon-url: url("./assets/icons/file-text.svg"); }
[data-icon="layout-dashboard"] { --icon-url: url("./assets/icons/layout-dashboard.svg"); }
[data-icon="log-out"] { --icon-url: url("./assets/icons/log-out.svg"); }
[data-icon="mail"] { --icon-url: url("./assets/icons/mail.svg"); }
[data-icon="maximize-2"] { --icon-url: url("./assets/icons/maximize-2.svg"); }
[data-icon="menu"] { --icon-url: url("./assets/icons/menu.svg"); }
[data-icon="message-square-text"] { --icon-url: url("./assets/icons/message-square-text.svg"); }
[data-icon="monitor-cog"] { --icon-url: url("./assets/icons/monitor-cog.svg"); }
[data-icon="route"] { --icon-url: url("./assets/icons/route.svg"); }
[data-icon="shield-check"] { --icon-url: url("./assets/icons/shield-check.svg"); }
[data-icon="sticky-note"] { --icon-url: url("./assets/icons/sticky-note.svg"); }
[data-icon="timer"] { --icon-url: url("./assets/icons/timer.svg"); }
[data-icon="user-round"] { --icon-url: url("./assets/icons/user-round.svg"); }
[data-icon="users"] { --icon-url: url("./assets/icons/users.svg"); }
[data-icon="wrench"] { --icon-url: url("./assets/icons/wrench.svg"); }
[data-icon="zoom-in"] { --icon-url: url("./assets/icons/zoom-in.svg"); }
[data-icon="zoom-out"] { --icon-url: url("./assets/icons/zoom-out.svg"); }

#dashboardView:not(.hidden) .nav-icon,
#dashboardView:not(.hidden) .sidebar-user-icon {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  font-size: 18px !important;
}

#dashboardView:not(.hidden) .nav-section-title,
#dashboardView:not(.hidden) .panel-header .eyebrow,
#dashboardView:not(.hidden) .dashboard-section .eyebrow {
  font-size: 11px !important;
}

#dashboardView:not(.hidden) .topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
}

#dashboardView:not(.hidden) .topbar-context {
  display: grid;
  min-width: 0;
  gap: 1px;
  line-height: 1.15;
}

#dashboardView:not(.hidden) .topbar-context > span {
  color: var(--ui-muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

#dashboardView:not(.hidden) .topbar-context > strong {
  overflow: hidden;
  color: var(--ui-text);
  font-size: 15px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboardView:not(.hidden) .topbar-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-left: auto !important;
}

#dashboardView:not(.hidden) .topbar-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  padding-right: 12px;
  border-right: 1px solid var(--ui-border);
}

#dashboardView:not(.hidden) .topbar-identity-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--ui-border);
  border-radius: 50%;
  background: var(--ui-surface-subtle);
  color: var(--ui-blue);
  font-size: 16px;
}

#dashboardView:not(.hidden) .topbar-identity > div {
  display: grid;
  min-width: 0;
  gap: 1px;
  line-height: 1.15;
}

#dashboardView:not(.hidden) .topbar-identity strong,
#dashboardView:not(.hidden) .topbar-identity span {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboardView:not(.hidden) .topbar-identity strong {
  color: var(--ui-text);
  font-size: 12px;
  font-weight: 750;
}

#dashboardView:not(.hidden) .topbar-identity span {
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 550;
}

#dashboardView:not(.hidden) .notification-bell-icon {
  width: 18px !important;
  height: 18px !important;
  font-size: 18px !important;
}

#dashboardView:not(.hidden) .mobile-menu-button > [data-icon] {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

#dashboardView:not(.hidden) .panel-header h2 {
  font-size: 26px !important;
}

#dashboardView:not(.hidden) .metric-card span,
#dashboardView:not(.hidden) .record-filters label {
  font-size: 12px !important;
}

#dashboardView:not(.hidden) #dashboardActivityList {
  gap: 8px !important;
}

#dashboardView:not(.hidden) #dashboardActivityList .activity-card {
  position: relative;
  min-height: 88px;
  align-items: flex-start !important;
  gap: 16px !important;
  padding: 13px 14px !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: 6px !important;
  background: var(--ui-surface-subtle) !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) #dashboardActivityList .activity-card-featured {
  border-left: 3px solid var(--ui-blue) !important;
}

#dashboardView:not(.hidden) #dashboardActivityList .activity-card > div {
  display: grid !important;
  min-width: 0 !important;
  gap: 3px !important;
}

#dashboardView:not(.hidden) #dashboardActivityList .activity-card strong {
  color: var(--ui-text) !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  line-height: 1.25 !important;
}

#dashboardView:not(.hidden) #dashboardActivityList .activity-card span:not(.record-status),
#dashboardView:not(.hidden) #dashboardActivityList .activity-card small {
  color: var(--ui-muted) !important;
  font-size: 12px !important;
  font-weight: 550 !important;
  line-height: 1.35 !important;
  overflow-wrap: anywhere !important;
}

#dashboardView:not(.hidden) #dashboardActivityList .record-status {
  flex: 0 0 auto !important;
  margin-top: 1px !important;
}

#dashboardView:not(.hidden) .photo-preview-control-icon {
  width: 18px !important;
  height: 18px !important;
  font-size: 18px !important;
}

@media (max-width: 900px) {
  #dashboardView:not(.hidden) .topbar-context,
  #dashboardView:not(.hidden) .topbar-identity {
    display: none !important;
  }

  #dashboardView:not(.hidden) .topbar-actions {
    margin-left: 0 !important;
  }

  #dashboardView:not(.hidden) .panel-header h2 {
    font-size: 24px !important;
  }

  #dashboardView:not(.hidden) #dashboardActivityList .activity-card {
    min-height: 0 !important;
    gap: 10px !important;
    padding: 12px !important;
  }
}

@media (max-width: 520px) {
  #dashboardView:not(.hidden) #dashboardActivityList .activity-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #dashboardView:not(.hidden) #dashboardActivityList .record-status {
    justify-self: start !important;
  }
}

/* Regression fixes: navigation, dialogs and action alignment. */
#technicalDemandPreviewModal {
  left: 236px !important;
  padding: 20px !important;
  background: rgba(16, 40, 70, 0.22) !important;
  backdrop-filter: none !important;
}

#technicalDemandPreviewModal .app-modal-card-wide {
  border: 1px solid var(--ui-border) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
  box-shadow: 0 18px 52px rgba(9, 24, 43, 0.22) !important;
}

#technicalDemandPreviewModal .app-modal-header,
#technicalDemandPreviewModal .app-modal-actions {
  border-color: var(--ui-border) !important;
  background: var(--ui-surface) !important;
}

#dashboardView:not(.hidden) .compact-header > span:last-child {
  text-align: center !important;
}

#dashboardView:not(.hidden) .compact-row-actions,
#dashboardView:not(.hidden) .compact-table-users .compact-row-actions,
#dashboardView:not(.hidden) .compact-table-contracts .compact-row-actions {
  display: flex !important;
  align-self: stretch !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
}

#dashboardView:not(.hidden) .compact-row-actions button,
#dashboardView:not(.hidden) .compact-table-users .compact-row-actions button,
#dashboardView:not(.hidden) .compact-table-components .compact-row-actions button,
#dashboardView:not(.hidden) .compact-table-justifications .compact-row-actions button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 64px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

#dashboardView:not(.hidden) .item-actions {
  align-items: center !important;
}

#dashboardView:not(.hidden) .item-actions button,
#dashboardView:not(.hidden) .item-actions .button-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

#dashboardView:not(.hidden) .compact-table-users .compact-header,
#dashboardView:not(.hidden) .compact-table-users .compact-row {
  grid-template-columns: minmax(150px, .95fr) minmax(230px, 1.35fr) minmax(130px, .78fr) minmax(240px, 1.35fr) 260px !important;
}

#dashboardView:not(.hidden) .compact-table-equipment .compact-header,
#dashboardView:not(.hidden) .compact-table-equipment .compact-row {
  grid-template-columns: minmax(160px, 1fr) minmax(120px, .75fr) minmax(250px, 1.45fr) minmax(150px, .9fr) minmax(150px, .9fr) 150px !important;
}

#dashboardView:not(.hidden) .compact-table-profiles .compact-header,
#dashboardView:not(.hidden) .compact-table-profiles .compact-row {
  grid-template-columns: minmax(210px, 1.35fr) minmax(190px, 1fr) minmax(140px, .8fr) 150px !important;
}

#dashboardView:not(.hidden) .compact-table-contracts .compact-header,
#dashboardView:not(.hidden) .compact-table-contracts .compact-row {
  grid-template-columns: minmax(280px, 1.4fr) minmax(260px, 1.2fr) 230px !important;
}

#dashboardView:not(.hidden) .compact-table-checklists .compact-header,
#dashboardView:not(.hidden) .compact-table-checklists .compact-row {
  grid-template-columns: minmax(220px, 1.25fr) minmax(190px, 1fr) minmax(120px, .7fr) minmax(250px, 1.35fr) 150px !important;
}

#dashboardView:not(.hidden) .compact-table-components .compact-header,
#dashboardView:not(.hidden) .compact-table-components .compact-row {
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.35fr) 150px !important;
}

#dashboardView:not(.hidden) .compact-table-justifications .compact-header,
#dashboardView:not(.hidden) .compact-table-justifications .compact-row {
  grid-template-columns: minmax(190px, 1fr) minmax(280px, 1.35fr) minmax(150px, .8fr) 150px !important;
}

#dashboardView:not(.hidden) .compact-table-records .compact-header,
#dashboardView:not(.hidden) .compact-table-records .compact-row {
  grid-template-columns: minmax(110px, .75fr) minmax(160px, 1fr) minmax(150px, .95fr) minmax(130px, .85fr) minmax(150px, .95fr) minmax(130px, .8fr) 150px !important;
}

@media (max-width: 1180px) and (min-width: 901px) {
  #technicalDemandPreviewModal {
    left: 220px !important;
  }
}

@media (max-width: 900px) {
  #technicalDemandPreviewModal {
    left: 0 !important;
    padding: 10px !important;
    background: rgba(16, 40, 70, 0.18) !important;
  }
}

/* Report dropdowns use the same light surface as the filter form. */
#reportsPanel .report-justification-select .justification-select-options,
#reportsPanel .report-multi-select .justification-select-options,
html[data-theme="light"] #reportsPanel .report-justification-select .justification-select-options,
html[data-theme="light"] #reportsPanel .report-multi-select .justification-select-options,
html[data-theme="dark"] #reportsPanel .report-justification-select .justification-select-options,
html[data-theme="dark"] #reportsPanel .report-multi-select .justification-select-options {
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  max-height: 280px !important;
  padding: 6px !important;
  overflow: hidden !important;
  border: 1px solid var(--ui-border-strong) !important;
  border-radius: 0 0 8px 8px !important;
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
  box-shadow: 0 12px 28px rgba(16, 35, 63, 0.14) !important;
}

#reportsPanel .report-justification-options-list {
  max-height: 210px !important;
  padding: 2px !important;
  gap: 2px !important;
  background: var(--ui-surface) !important;
  scrollbar-color: #aab6c4 #eef2f6 !important;
  scrollbar-width: thin !important;
}

#reportsPanel .report-justification-option,
html[data-theme="light"] #reportsPanel .report-justification-option,
html[data-theme="dark"] #reportsPanel .report-justification-option {
  min-height: 36px !important;
  padding: 7px 9px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
  box-shadow: none !important;
}

#reportsPanel .report-justification-option:hover,
#reportsPanel .report-justification-option:focus-within,
html[data-theme="light"] #reportsPanel .report-justification-option:hover,
html[data-theme="light"] #reportsPanel .report-justification-option:focus-within,
html[data-theme="dark"] #reportsPanel .report-justification-option:hover,
html[data-theme="dark"] #reportsPanel .report-justification-option:focus-within {
  background: var(--ui-surface-subtle) !important;
  color: var(--ui-text) !important;
  outline: none !important;
}

#reportsPanel .report-justification-option:has(input:checked),
html[data-theme="light"] #reportsPanel .report-justification-option:has(input:checked),
html[data-theme="dark"] #reportsPanel .report-justification-option:has(input:checked) {
  background: var(--ui-surface-selected) !important;
  color: var(--ui-navy) !important;
}

#reportsPanel .report-justification-option input[type="checkbox"],
#reportsPanel .report-justification-option input[type="checkbox"]:checked,
html[data-theme="light"] #reportsPanel .report-justification-option input[type="checkbox"],
html[data-theme="light"] #reportsPanel .report-justification-option input[type="checkbox"]:checked,
html[data-theme="dark"] #reportsPanel .report-justification-option input[type="checkbox"],
html[data-theme="dark"] #reportsPanel .report-justification-option input[type="checkbox"]:checked {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  accent-color: var(--ui-navy) !important;
  width: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
  height: 15px !important;
  min-height: 15px !important;
  max-height: 15px !important;
  border: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

#reportsPanel .report-justification-option span {
  color: inherit !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

#reportsPanel .report-justification-actions,
html[data-theme="light"] #reportsPanel .report-justification-actions,
html[data-theme="dark"] #reportsPanel .report-justification-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  padding: 8px 2px 2px !important;
  border-top: 1px solid var(--ui-border) !important;
  background: var(--ui-surface) !important;
}

#reportsPanel .report-justification-actions button,
html[data-theme="light"] #reportsPanel .report-justification-actions button,
html[data-theme="dark"] #reportsPanel .report-justification-actions button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
}

#reportsPanel .report-justification-actions .secondary-action,
html[data-theme="light"] #reportsPanel .report-justification-actions .secondary-action,
html[data-theme="dark"] #reportsPanel .report-justification-actions .secondary-action {
  border-color: var(--ui-border-strong) !important;
  background: var(--ui-surface) !important;
  color: var(--ui-navy) !important;
}

#reportsPanel .report-justification-select > input[aria-expanded="true"],
#reportsPanel .report-multi-select > input[aria-expanded="true"] {
  border-color: var(--ui-border-strong) !important;
  border-radius: 6px 6px 0 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Compact operational density inspired by data-first management systems. */
@media (min-width: 901px) {
  #dashboardView:not(.hidden) input,
  #dashboardView:not(.hidden) select,
  html[data-theme="light"] #dashboardView:not(.hidden) input,
  html[data-theme="light"] #dashboardView:not(.hidden) select,
  html[data-theme="dark"] #dashboardView:not(.hidden) input,
  html[data-theme="dark"] #dashboardView:not(.hidden) select {
    min-height: 36px !important;
    font-size: 13px !important;
  }

  #dashboardView:not(.hidden) button:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open),
  html[data-theme="light"] #dashboardView:not(.hidden) button:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open),
  html[data-theme="dark"] #dashboardView:not(.hidden) button:not(.nav-button):not(.icon-only-action):not(.notification-bell):not(.mobile-sidebar-overlay):not(.preview-photo-open) {
    min-height: 36px !important;
    padding-right: 12px !important;
    padding-left: 12px !important;
    font-size: 13px !important;
  }

  #dashboardView:not(.hidden) .record-filters,
  #dashboardView:not(.hidden) .dashboard-report-filters {
    gap: 10px !important;
    padding: 10px 12px !important;
  }

  #dashboardView:not(.hidden) .compact-header,
  #dashboardView:not(.hidden) .email-compact-header {
    min-height: 36px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }

  #dashboardView:not(.hidden) .compact-row,
  #dashboardView:not(.hidden) .email-compact-row {
    min-height: 44px !important;
  }
}

#remindersPanel #reminderForm {
  grid-template-columns: minmax(300px, 600px) 150px !important;
  align-items: end !important;
  width: min(100%, 980px) !important;
  gap: 10px 12px !important;
  margin: 0 !important;
  padding: 14px !important;
}

#remindersPanel #reminderForm > label {
  gap: 5px !important;
}

#remindersPanel #reminderForm .full-row {
  grid-column: 1 / -1 !important;
}

#remindersPanel #reminderForm #reminderMessageInput {
  width: 100% !important;
}

#remindersPanel .reminder-days {
  gap: 7px !important;
}

#remindersPanel .weekday-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
}

#remindersPanel .weekday-grid label {
  flex: 0 0 auto !important;
  width: 92px !important;
  min-height: 34px !important;
  padding: 5px 9px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
}

#remindersPanel .weekday-grid input {
  width: 14px !important;
  min-width: 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  margin: 0 !important;
}

#remindersPanel #reminderForm > button[type="submit"] {
  grid-column: 1 / -1 !important;
  justify-self: start !important;
  width: auto !important;
  min-width: 172px !important;
  padding-right: 16px !important;
  padding-left: 16px !important;
}

#remindersPanel #reminderMessage,
#remindersPanel #remindersList {
  width: min(100%, 980px) !important;
}

#remindersPanel #reminderMessage:not(:empty) {
  margin-top: 10px !important;
}

@media (max-width: 900px) {
  #remindersPanel #reminderForm {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    padding: 12px !important;
  }

  #remindersPanel #reminderForm .full-row,
  #remindersPanel #reminderForm > button[type="submit"] {
    grid-column: 1 !important;
  }

  #remindersPanel .weekday-grid label {
    width: calc(50% - 3px) !important;
    min-height: 40px !important;
  }

  #remindersPanel #reminderForm > button[type="submit"] {
    width: 100% !important;
  }
}

/* Lovable layout adaptation - geometry and hierarchy only, existing behavior preserved. */
:root,
html,
html[data-theme="light"],
html[data-theme="dark"] {
  --lovable-canvas: #f3f6f9;
  --lovable-surface: #ffffff;
  --lovable-surface-muted: #f8fafc;
  --lovable-border: #d8e0ea;
  --lovable-border-strong: #c5d0dd;
  --lovable-text: #10233f;
  --lovable-muted: #5d6f87;
  --lovable-primary: #102846;
  --lovable-primary-strong: #0a1d34;
  --lovable-accent: #315f96;
  --lovable-danger: #ad443d;
  --lovable-shadow: 0 6px 18px rgba(16, 35, 63, 0.06);
}

html,
body,
button,
input,
select,
textarea {
  letter-spacing: 0 !important;
}

html body {
  background: var(--lovable-canvas) !important;
  color: var(--lovable-text) !important;
}

/* Login follows the same restrained two-column hierarchy as the reference. */
#loginView:not(.hidden) {
  grid-template-columns: minmax(420px, 1.05fr) minmax(420px, 1fr) !important;
  background: var(--lovable-canvas) !important;
}

#loginView:not(.hidden) .brand-panel {
  justify-content: space-between !important;
  padding: clamp(36px, 5vw, 72px) !important;
  background: var(--lovable-primary) !important;
}

#loginView:not(.hidden) .brand-panel h1 {
  max-width: 560px !important;
  font-size: clamp(36px, 4vw, 52px) !important;
  line-height: 1.08 !important;
}

#loginView:not(.hidden) .brand-metrics > div,
#loginView:not(.hidden) .activity-preview,
#loginView:not(.hidden) .brand-app-download {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: none !important;
}

#loginView:not(.hidden) .login-form {
  width: min(100% - 48px, 440px) !important;
  margin: auto !important;
  padding: 32px !important;
  border: 1px solid var(--lovable-border) !important;
  border-radius: 8px !important;
  background: var(--lovable-surface) !important;
  box-shadow: var(--lovable-shadow) !important;
}

#loginView:not(.hidden) #loginCredentialsStep > button[type="submit"],
#loginView:not(.hidden) #verifyTwoFactorButton {
  width: 100% !important;
  margin-top: 4px !important;
}

#loginView:not(.hidden) .login-legal-links {
  justify-content: center !important;
  gap: 8px !important;
  margin-top: 24px !important;
}

#loginView:not(.hidden) .login-legal-links button {
  min-height: 0 !important;
  padding: 2px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--lovable-muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

#loginView:not(.hidden) .login-legal-links button:hover {
  color: var(--lovable-text) !important;
  text-decoration: underline !important;
}

/* Stable application shell. */
#dashboardView:not(.hidden) {
  grid-template-columns: 236px minmax(0, 1fr) !important;
  min-height: 100vh !important;
  background: var(--lovable-canvas) !important;
}

#dashboardView:not(.hidden) .sidebar,
html[data-theme="light"] #dashboardView:not(.hidden) .sidebar,
html[data-theme="dark"] #dashboardView:not(.hidden) .sidebar {
  position: sticky !important;
  top: 0 !important;
  width: 236px !important;
  height: 100vh !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-right: 1px solid rgba(255, 255, 255, 0.10) !important;
  background: var(--lovable-primary) !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .sidebar-brand,
#dashboardView:not(.hidden) .sidebar:has(.sidebar-logo.has-image) .sidebar-brand {
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 10px !important;
  min-height: 76px !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
}

#dashboardView:not(.hidden) .sidebar-logo.has-image {
  width: 42px !important;
  height: 42px !important;
  border-radius: 8px !important;
}

#dashboardView:not(.hidden) .sidebar-brand strong {
  font-size: 14px !important;
  font-weight: 750 !important;
}

#dashboardView:not(.hidden) .sidebar-brand span:not(.sidebar-logo) {
  font-size: 11px !important;
}

#dashboardView:not(.hidden) .sidebar nav {
  display: block !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: 10px 8px 16px !important;
  overflow-y: auto !important;
}

#dashboardView:not(.hidden) .nav-section-title,
#dashboardView:not(.hidden) .nav-group[data-nav-group="cadastros"] > .nav-group-toggle {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 26px !important;
  margin: 10px 0 4px !important;
  padding: 0 10px !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.52) !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .nav-section-title:first-child {
  margin-top: 2px !important;
}

#dashboardView:not(.hidden) .nav-group[data-nav-group="cadastros"] > .nav-group-toggle {
  pointer-events: none !important;
  cursor: default !important;
}

#dashboardView:not(.hidden) .nav-group[data-nav-group="cadastros"] > .nav-group-toggle .nav-icon,
#dashboardView:not(.hidden) .nav-group[data-nav-group="cadastros"] > .nav-group-toggle .nav-caret {
  display: none !important;
}

#dashboardView:not(.hidden) .nav-group[data-nav-group="cadastros"] > .nav-submenu,
#dashboardView:not(.hidden) .nav-group[data-nav-group="cadastros"] > .nav-submenu.hidden {
  display: grid !important;
  gap: 2px !important;
}

#dashboardView:not(.hidden) .nav-button,
#dashboardView:not(.hidden) .nav-subitem,
#dashboardView:not(.hidden) .secondary {
  width: 100% !important;
  min-height: 36px !important;
  margin: 1px 0 !important;
  padding: 0 10px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.76) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .nav-subitem {
  padding-left: 10px !important;
}

#dashboardView:not(.hidden) .nav-button:hover,
#dashboardView:not(.hidden) .nav-subitem:hover,
#dashboardView:not(.hidden) .nav-button.active {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

#dashboardView:not(.hidden) .nav-button.active {
  font-weight: 750 !important;
}

#dashboardView:not(.hidden) .nav-button .nav-icon {
  width: 17px !important;
  height: 17px !important;
  opacity: 0.88 !important;
}

#dashboardView:not(.hidden) .email-nav-group {
  margin: 0 !important;
}

#dashboardView:not(.hidden) .email-nav-group > .nav-group-toggle {
  pointer-events: auto !important;
  color: rgba(255, 255, 255, 0.76) !important;
  font-size: 13px !important;
  text-transform: none !important;
}

#dashboardView:not(.hidden) .email-nav-submenu {
  padding-left: 14px !important;
}

#dashboardView:not(.hidden) .sidebar-footer {
  flex: 0 0 auto !important;
  gap: 5px !important;
  padding: 10px 8px 12px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.10) !important;
  background: transparent !important;
}

#dashboardView:not(.hidden) .sidebar-user {
  min-height: 50px !important;
  padding: 7px 9px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

#dashboardView:not(.hidden) .sidebar-footer .secondary {
  justify-content: flex-start !important;
}

/* Top bar and page container. */
#dashboardView:not(.hidden) .content {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  background: var(--lovable-canvas) !important;
}

#dashboardView:not(.hidden) .topbar,
html[data-theme="light"] #dashboardView:not(.hidden) .topbar,
html[data-theme="dark"] #dashboardView:not(.hidden) .topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
  width: 100% !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 0 24px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(216, 224, 234, 0.85) !important;
  border-radius: 0 !important;
  background: rgba(243, 246, 249, 0.96) !important;
  box-shadow: none !important;
  backdrop-filter: blur(12px) !important;
}

#dashboardView:not(.hidden) .topbar-context {
  gap: 1px !important;
}

#dashboardView:not(.hidden) .topbar-context span {
  color: var(--lovable-muted) !important;
  font-size: 10px !important;
  font-weight: 650 !important;
  text-transform: uppercase !important;
}

#dashboardView:not(.hidden) .topbar-context strong {
  color: var(--lovable-text) !important;
  font-size: 14px !important;
  font-weight: 750 !important;
}

#dashboardView:not(.hidden) .topbar-identity {
  min-height: 38px !important;
  padding: 4px 10px !important;
  border: 1px solid var(--lovable-border) !important;
  border-radius: 6px !important;
  background: var(--lovable-surface) !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .notification-bell,
#dashboardView:not(.hidden) .icon-only-action {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  border: 1px solid var(--lovable-border) !important;
  border-radius: 6px !important;
  background: var(--lovable-surface) !important;
  color: var(--lovable-muted) !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .panel {
  width: min(100%, 1344px) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 28px 32px 40px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .panel-header {
  align-items: flex-end !important;
  gap: 18px !important;
  margin: 0 0 20px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#dashboardView:not(.hidden) .panel-header > div:first-child {
  min-width: 0 !important;
}

#dashboardView:not(.hidden) .panel-header .eyebrow {
  margin: 0 0 3px !important;
  color: var(--lovable-muted) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

#dashboardView:not(.hidden) .panel-header h2 {
  margin: 0 !important;
  color: var(--lovable-text) !important;
  font-size: 26px !important;
  font-weight: 750 !important;
  line-height: 1.15 !important;
}

#dashboardView:not(.hidden) .panel-header p:not(.eyebrow),
#dashboardView:not(.hidden) .report-hero-text,
#dashboardView:not(.hidden) .dashboard-hero-text {
  max-width: 680px !important;
  margin: 5px 0 0 !important;
  color: var(--lovable-muted) !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

/* Controls and action hierarchy. */
#dashboardView:not(.hidden) input,
#dashboardView:not(.hidden) select,
#dashboardView:not(.hidden) textarea {
  border: 1px solid var(--lovable-border-strong) !important;
  border-radius: 6px !important;
  background: var(--lovable-surface) !important;
  color: var(--lovable-text) !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) input,
#dashboardView:not(.hidden) select {
  min-height: 36px !important;
}

#dashboardView:not(.hidden) input:focus,
#dashboardView:not(.hidden) select:focus,
#dashboardView:not(.hidden) textarea:focus {
  border-color: var(--lovable-accent) !important;
  outline: 2px solid rgba(49, 95, 150, 0.14) !important;
  outline-offset: 0 !important;
}

#dashboardView:not(.hidden) button:not(.nav-button):not(.secondary):not(.secondary-action):not(.danger):not(.dashboard-step-button):not(.icon-only-action):not(.notification-bell):not(.mobile-menu-button):not(.mobile-sidebar-close):not(.mobile-sidebar-overlay):not(.icon-button):not(.preview-photo-open),
#dashboardView:not(.hidden) .button-link {
  min-height: 36px !important;
  border: 1px solid var(--lovable-primary) !important;
  border-radius: 6px !important;
  background: var(--lovable-primary) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) button:not(.nav-button):not(.secondary):not(.secondary-action):not(.danger):not(.dashboard-step-button):not(.icon-only-action):not(.notification-bell):not(.mobile-menu-button):not(.mobile-sidebar-close):not(.mobile-sidebar-overlay):not(.icon-button):not(.preview-photo-open):hover,
#dashboardView:not(.hidden) .button-link:hover {
  background: var(--lovable-primary-strong) !important;
}

#dashboardView:not(.hidden) .secondary-action,
#dashboardView:not(.hidden) button.secondary-action,
#dashboardView:not(.hidden) .app-modal-actions .secondary-action {
  border: 1px solid var(--lovable-border-strong) !important;
  background: var(--lovable-surface) !important;
  color: var(--lovable-primary) !important;
  box-shadow: none !important;
}

#dashboardView:not(.hidden) .secondary-action:hover,
#dashboardView:not(.hidden) button.secondary-action:hover {
  background: var(--lovable-surface-muted) !important;
}

#dashboardView:not(.hidden) button.danger,
#dashboardView:not(.hidden) .danger {
  border-color: #e5b8b4 !important;
  background: #fff7f6 !important;
  color: var(--lovable-danger) !important;
}

/* Data-first surfaces from the reference. */
#dashboardView:not(.hidden) .record-filters,
#dashboardView:not(.hidden) .dashboard-report-filters,
#dashboardView:not(.hidden) .report-filters,
#dashboardView:not(.hidden) .user-form,
#dashboardView:not(.hidden) .site-form,
#dashboardView:not(.hidden) .company-form,
#dashboardView:not(.hidden) .edit-form,
#dashboardView:not(.hidden) .demand-form,
#dashboardView:not(.hidden) .inline-form,
#dashboardView:not(.hidden) .email-form-card {
  border: 1px solid var(--lovable-border) !important;
  border-radius: 8px !important;
  background: var(--lovable-surface) !important;
  box-shadow: var(--lovable-shadow) !important;
}

#dashboardView:not(.hidden) .record-filters,
#dashboardView:not(.hidden) .dashboard-report-filters,
#dashboardView:not(.hidden) .report-filters {
  gap: 10px !important;
  margin: 0 0 16px !important;
  padding: 12px !important;
}

#dashboardView:not(.hidden) .record-filters label,
#dashboardView:not(.hidden) .dashboard-report-filters label,
#dashboardView:not(.hidden) .report-filters label,
#dashboardView:not(.hidden) form label {
  color: var(--lovable-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

#dashboardView:not(.hidden) .compact-table,
#dashboardView:not(.hidden) .email-compact-table {
  overflow: hidden !important;
  border: 1px solid var(--lovable-border) !important;
  border-radius: 8px !important;
  background: var(--lovable-surface) !important;
  box-shadow: var(--lovable-shadow) !important;
}

#dashboardView:not(.hidden) .compact-header,
#dashboardView:not(.hidden) .email-compact-header {
  min-height: 38px !important;
  padding: 8px 12px !important;
  border-bottom: 1px solid var(--lovable-border) !important;
  background: var(--lovable-surface-muted) !important;
  color: var(--lovable-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

#dashboardView:not(.hidden) .compact-row,
#dashboardView:not(.hidden) .email-compact-row {
  min-height: 46px !important;
  padding: 7px 12px !important;
  border-bottom: 1px solid var(--lovable-border) !important;
  background: var(--lovable-surface) !important;
  transition: background-color 140ms ease !important;
}

#dashboardView:not(.hidden) .compact-row:hover,
#dashboardView:not(.hidden) .email-compact-row:hover {
  background: var(--lovable-surface-muted) !important;
}

#dashboardView:not(.hidden) .compact-row:last-child,
#dashboardView:not(.hidden) .email-compact-row:last-child {
  border-bottom: 0 !important;
}

#dashboardView:not(.hidden) .compact-row-actions button {
  min-width: 36px !important;
  min-height: 32px !important;
  padding: 0 9px !important;
  font-size: 12px !important;
}

#dashboardView:not(.hidden) .dashboard-metrics,
#dashboardView:not(.hidden) .report-metrics,
#dashboardView:not(.hidden) .demand-metrics {
  gap: 12px !important;
}

#dashboardView:not(.hidden) .metric-card,
#dashboardView:not(.hidden) .report-metric,
#dashboardView:not(.hidden) .demand-metric {
  min-height: 116px !important;
  padding: 16px !important;
  border: 1px solid var(--lovable-border) !important;
  border-radius: 8px !important;
  background: var(--lovable-surface) !important;
  box-shadow: var(--lovable-shadow) !important;
}

#dashboardView:not(.hidden) .metric-card::after {
  display: none !important;
}

#dashboardView:not(.hidden) .metric-card strong,
#dashboardView:not(.hidden) .report-metric strong,
#dashboardView:not(.hidden) .demand-metric strong {
  font-size: 28px !important;
}

#dashboardView:not(.hidden) .dashboard-section {
  padding: 18px !important;
  border: 1px solid var(--lovable-border) !important;
  border-radius: 8px !important;
  background: var(--lovable-surface) !important;
  box-shadow: var(--lovable-shadow) !important;
}

#dashboardView:not(.hidden) .item,
#dashboardView:not(.hidden) .demand-card,
#dashboardView:not(.hidden) .technical-demand-card,
#dashboardView:not(.hidden) .activity-card,
#dashboardView:not(.hidden) .annotation-card {
  border: 1px solid var(--lovable-border) !important;
  border-radius: 8px !important;
  background: var(--lovable-surface) !important;
  box-shadow: var(--lovable-shadow) !important;
}

/* Dialogs retain every existing action while matching the quieter shell. */
#dashboardView:not(.hidden) .app-modal {
  background: rgba(16, 40, 70, 0.16) !important;
  backdrop-filter: none !important;
}

#dashboardView:not(.hidden) .app-modal-card,
#dashboardView:not(.hidden) .app-modal-card-wide {
  overflow: hidden !important;
  border: 1px solid var(--lovable-border) !important;
  border-radius: 8px !important;
  background: var(--lovable-surface) !important;
  box-shadow: 0 18px 52px rgba(9, 24, 43, 0.18) !important;
}

#dashboardView:not(.hidden) .app-modal-header,
#dashboardView:not(.hidden) .app-modal-actions {
  border-color: var(--lovable-border) !important;
  background: var(--lovable-surface) !important;
}

#dashboardView:not(.hidden) .app-modal-header {
  min-height: 68px !important;
  padding: 16px 18px !important;
}

#dashboardView:not(.hidden) .app-modal-header h3 {
  color: var(--lovable-text) !important;
  font-size: 20px !important;
}

#dashboardView:not(.hidden) .app-modal-body {
  padding: 18px !important;
}

#dashboardView:not(.hidden) .app-modal-actions {
  gap: 8px !important;
  min-height: 60px !important;
  padding: 11px 18px !important;
}

#dashboardView:not(.hidden) .status-chip,
#dashboardView:not(.hidden) .record-status,
#dashboardView:not(.hidden) .priority-chip {
  border-radius: 999px !important;
  font-size: 10px !important;
  font-weight: 750 !important;
}

@media (max-width: 1180px) and (min-width: 901px) {
  #dashboardView:not(.hidden) {
    grid-template-columns: 220px minmax(0, 1fr) !important;
  }

  #dashboardView:not(.hidden) .sidebar {
    width: 220px !important;
  }

  #dashboardView:not(.hidden) .panel {
    padding-right: 24px !important;
    padding-left: 24px !important;
  }
}

@media (max-width: 900px) {
  #loginView:not(.hidden) {
    grid-template-columns: 1fr !important;
  }

  #loginView:not(.hidden) .brand-panel {
    display: none !important;
  }

  #dashboardView:not(.hidden) {
    display: block !important;
  }

  #dashboardView:not(.hidden) .sidebar {
    position: fixed !important;
    width: min(86vw, 288px) !important;
    z-index: 100 !important;
  }

  #dashboardView:not(.hidden) .topbar {
    min-height: 58px !important;
    padding: 0 12px !important;
  }

  #dashboardView:not(.hidden) .panel {
    width: 100% !important;
    padding: 20px 14px 30px !important;
  }

  #dashboardView:not(.hidden) .panel-header {
    align-items: flex-start !important;
    margin-bottom: 16px !important;
  }

  #dashboardView:not(.hidden) .panel-header h2 {
    font-size: 23px !important;
  }

  #dashboardView:not(.hidden) .panel-header > button,
  #dashboardView:not(.hidden) .panel-actions {
    width: 100% !important;
  }

  #dashboardView:not(.hidden) .panel-actions button {
    flex: 1 1 auto !important;
  }

  #technicalDemandPreviewModal {
    left: 0 !important;
    padding: 8px !important;
  }
}

@media (max-width: 520px) {
  #dashboardView:not(.hidden) .panel-header {
    gap: 12px !important;
  }

  #dashboardView:not(.hidden) .record-filters,
  #dashboardView:not(.hidden) .dashboard-report-filters,
  #dashboardView:not(.hidden) .report-filters {
    padding: 10px !important;
  }

  #dashboardView:not(.hidden) .app-modal-actions {
    flex-wrap: wrap !important;
  }

  #dashboardView:not(.hidden) .app-modal-actions button {
    flex: 1 1 calc(50% - 4px) !important;
  }
}

/* Lovable shell v2: final precedence over the legacy compatibility layers. */
@media (min-width: 901px) {
  #dashboardView:not(.hidden) {
    grid-template-columns: var(--lovable-sidebar-width) minmax(0, 1fr) !important;
  }

  #dashboardView:not(.hidden) .sidebar {
    width: var(--lovable-sidebar-width) !important;
    background: #081b3a !important;
  }

  #dashboardView:not(.hidden) .sidebar-brand,
  #dashboardView:not(.hidden) .sidebar:has(.sidebar-logo.has-image) .sidebar-brand {
    min-height: var(--lovable-header-height) !important;
    padding: 10px 14px !important;
  }

  #dashboardView:not(.hidden) .sidebar nav {
    padding: 10px 8px 18px !important;
  }

  #dashboardView:not(.hidden) .nav-section-title,
  #dashboardView:not(.hidden) .nav-group[data-nav-group="cadastros"] > .nav-group-toggle {
    min-height: 24px !important;
    margin: 12px 0 4px !important;
    padding: 0 12px !important;
    color: rgba(212, 226, 245, 0.68) !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    text-transform: none !important;
  }

  #dashboardView:not(.hidden) .nav-button,
  #dashboardView:not(.hidden) .nav-subitem {
    min-height: 40px !important;
    padding: 0 11px !important;
    color: rgba(239, 246, 255, 0.88) !important;
    font-size: 14px !important;
    font-weight: 520 !important;
  }

  #dashboardView:not(.hidden) .nav-button.active {
    background: rgba(52, 91, 145, 0.34) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
  }

  #dashboardView:not(.hidden) .topbar {
    min-height: var(--lovable-header-height) !important;
    height: var(--lovable-header-height) !important;
    gap: 12px !important;
    padding: 0 24px !important;
  }

  #dashboardView:not(.hidden) .topbar-identity {
    gap: 9px !important;
    min-width: 166px !important;
    min-height: 40px !important;
    padding: 4px 10px !important;
  }

  #dashboardView:not(.hidden) .panel {
    width: min(100%, 1280px) !important;
    padding: 32px 32px 44px !important;
  }

  #dashboardView:not(.hidden) .panel-header {
    margin-bottom: 28px !important;
  }

  #dashboardView:not(.hidden) .panel-header h2 {
    font-size: 30px !important;
    font-weight: 700 !important;
  }

  #technicalDemandPreviewModal {
    left: var(--lovable-sidebar-width) !important;
  }

  #dashboardView:not(.hidden).sidebar-collapsed {
    grid-template-columns: var(--lovable-sidebar-collapsed) minmax(0, 1fr) !important;
  }

  #dashboardView:not(.hidden).sidebar-collapsed .sidebar {
    width: var(--lovable-sidebar-collapsed) !important;
  }

  #dashboardView:not(.hidden).sidebar-collapsed #technicalDemandPreviewModal {
    left: var(--lovable-sidebar-collapsed) !important;
  }
}

[data-icon="search"] { --icon-url: url("./assets/icons/search.svg"); }
[data-icon="panel-left"] { --icon-url: url("./assets/icons/panel-left.svg"); }
[data-icon="activity"] { --icon-url: url("./assets/icons/activity.svg"); }

#dashboardView#dashboardView:not(.hidden) .dashboard-reference-grid .dashboard-next-steps .dashboard-step-list button.dashboard-step-button[data-dashboard-view],
#dashboardView#dashboardView:not(.hidden) .dashboard-reference-grid .dashboard-next-steps .dashboard-step-list button.dashboard-step-button[data-dashboard-view]:hover {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  width: 100% !important;
  min-height: 62px !important;
  padding: 10px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--lovable-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--lovable-text) !important;
  text-align: left !important;
  box-shadow: none !important;
}

#dashboardView#dashboardView:not(.hidden) .dashboard-reference-grid .dashboard-next-steps .dashboard-step-list button.dashboard-step-button[data-dashboard-view]:last-child {
  border-bottom: 0 !important;
}

#dashboardView#dashboardView:not(.hidden) .dashboard-reference-grid .dashboard-next-steps .dashboard-step-list button.dashboard-step-button[data-dashboard-view]:hover {
  color: var(--lovable-accent) !important;
}

/* Super Admin company context */
#dashboardView:not(.hidden) .owner-company-context {
  display: grid;
  width: clamp(210px, 18vw, 290px);
  min-width: 0;
  gap: 3px;
}

#dashboardView:not(.hidden) .owner-company-context > span {
  color: var(--ui-muted, #60738f);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

#dashboardView:not(.hidden) .owner-company-context select {
  width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--ui-border, #ced9e7);
  border-radius: 6px;
  background-color: var(--ui-surface, #fff);
  color: var(--ui-text, #122440);
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

#dashboardView:not(.hidden) .owner-company-context select:focus {
  border-color: var(--ui-blue, #245a94);
  outline: 2px solid color-mix(in srgb, var(--ui-blue, #245a94) 18%, transparent);
  outline-offset: 1px;
}

#dashboardView:not(.hidden) .owner-company-context.is-loading {
  opacity: .65;
}

@media (max-width: 900px) {
  #dashboardView:not(.hidden) .owner-company-context {
    order: 1;
    width: min(100%, 300px);
  }
}
