:root {
  accent-color: #0050b0;
  --page: #f4f8ff;
  --surface: #ffffff;
  --surface-2: #e9f2ff;
  --ink: #102744;
  --muted: #5c6f8e;
  --line: #d7e3f3;
  --accent: #0050b0;
  --accent-2: #ffb020;
  --accent-3: #8060a0;
  --focus: rgba(0, 80, 176, 0.22);
  --danger: #a13f32;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  overflow: hidden;
  padding-bottom: 0;
}

body.modal-open {
  overflow: hidden;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.login-screen {
  display: grid;
  min-height: calc(100vh - 62px);
  place-items: center;
  padding: 28px;
}

.login-card {
  display: grid;
  gap: 13px;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 30px;
  box-shadow: 0 24px 70px rgba(16, 39, 68, 0.14);
}

.login-card img {
  width: 180px;
  max-height: 100px;
  object-fit: contain;
  justify-self: center;
}

.login-card h1 {
  margin-bottom: 0;
  text-align: center;
}

.login-card p {
  color: var(--muted);
  text-align: center;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  width: 100%;
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--accent);
  background: var(--surface-2);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .eye-closed {
  display: none;
}

.password-toggle.is-visible .eye-open {
  display: none;
}

.password-toggle.is-visible .eye-closed {
  display: block;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(180deg, #0a2547 0%, #0f3466 54%, #081d3a 100%);
  color: #f5f9ff;
  padding: 16px 14px;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 2px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.brand-text {
  flex: 1 1 auto;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: #d7e3f3;
  color: #0f3466;
  font-weight: 800;
  flex-shrink: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: #f5f9ff;
  padding: 4px;
  flex-shrink: 0;
}

.brand-fallback {
  display: none;
}

.brand small {
  display: block;
  color: #b7c8e0;
  margin-top: 2px;
}

.brand strong {
  letter-spacing: 0;
}

.brand-logout {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #d7e3f3;
  cursor: pointer;
}

.brand-logout svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-logout:hover {
  background: #b3453f;
  color: #ffffff;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.menu-group-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #b7d3f5;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 8px;
  width: 100%;
  border-left: 3px solid #ffb020;
}

.menu-group-toggle:first-of-type {
  margin-top: 4px;
}

.menu-group-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.menu-group-toggle .menu-icon {
  background: transparent;
  color: #ffb020;
  width: 20px;
  height: 20px;
}

.menu-group-toggle .menu-icon svg {
  width: 13px;
  height: 13px;
}

.group-chevron {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
  opacity: 0.6;
}

.group-chevron svg {
  width: 12px;
  height: 12px;
}

.group-chevron path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

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

.menu-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  transition: max-height 0.25s ease;
  max-height: 400px;
  padding-left: 8px;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  margin-left: 6px;
}

.menu-group.collapsed {
  max-height: 0;
}

.menu-item.menu-sub {
  padding-left: 12px;
  min-height: 32px;
  font-size: 13.5px;
  border-radius: 7px;
}

.menu-item.menu-sub .menu-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.menu-item.menu-sub .menu-icon svg {
  width: 14px;
  height: 14px;
}

.user-panel {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.user-panel span {
  color: #d7e3f3;
  font-size: 12px;
  font-weight: 800;
}

.user-panel .ghost-button {
  width: 100%;
  min-height: 30px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 0 10px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #e6f0ff;
  text-align: left;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.menu-item.active,
.menu-item:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.menu-item.active {
  box-shadow: inset 3px 0 0 #ffb020;
}

.menu-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.12);
  color: #d7e3f3;
  line-height: 1;
  flex: 0 0 auto;
}

.menu-icon svg {
  width: 16px;
  height: 16px;
}

.menu-icon path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.menu-item.active .menu-icon,
.menu-item:hover .menu-icon {
  background: #d7e3f3;
  color: #0f3466;
}

.workspace {
  height: 100vh;
  height: 100dvh;
  padding: 28px 32px;
  padding-bottom: 46px;
  overflow-y: auto;
  overflow-x: hidden;
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 28px;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.topbar p,
.hint {
  color: var(--muted);
}

.edit-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-right {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.notif-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.notif-bell svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notif-bell:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.notif-bell .badge-count {
  position: absolute;
  top: -6px;
  right: -6px;
  margin-left: 0;
}

.notif-bell-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(380px, 90vw);
  max-height: 420px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 56px rgba(8, 29, 58, 0.22);
  padding: 16px;
}

.notif-bell-dropdown.hidden {
  display: none;
}

.notif-bell-dropdown-header {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.notif-bell-dropdown-header strong {
  font-size: 15px;
}

.notif-bell-dropdown .empty-state {
  padding: 10px 2px;
}

.hidden {
  display: none !important;
}

#homeScreen {
  padding: 16px 18px;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
}

.home-hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-align: left;
  gap: 30px;
  padding: 2px 10px 12px;
  color: #0a3a7a;
}

.home-hero-logo {
  width: min(210px, 38vw);
  max-height: 130px;
  object-fit: contain;
  margin-bottom: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.home-hero-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-hero h2 {
  margin: 0 0 6px;
  font-size: 26px;
  color: #0a3a7a;
}

.home-clock {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.home-clock strong {
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 1px;
  color: #0a3a7a;
  font-variant-numeric: tabular-nums;
}

.home-clock span {
  border: 1px solid rgba(0, 80, 176, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  color: #0a3a7a;
  padding: 7px 18px;
  font-size: 14px;
  font-weight: 700;
  text-transform: capitalize;
}

.weather-card {
  margin-top: 18px;
  border: 1px solid rgba(0, 80, 176, 0.45);
  border-radius: 16px;
  background: rgba(233, 242, 255, 0.7);
  padding: 22px 24px;
  box-shadow: 0 22px 48px rgba(16, 39, 68, 0.12);
}

.service-alerts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.service-alerts-list:empty {
  display: none;
}

.service-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--muted);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.service-alert-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16, 39, 68, 0.12);
}

.service-alert-item.today {
  border-left-color: #c98a12;
  background: #fff8ea;
}

.service-alert-item.overdue {
  border-left-color: var(--danger);
  background: #fdf0ee;
}

.service-alert-main {
  display: grid;
  gap: 2px;
}

.service-alert-main strong {
  font-size: 15px;
}

.service-alert-quote {
  color: var(--muted);
  font-size: 12px;
}

.service-alert-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.service-alert-countdown {
  font-weight: 800;
  font-size: 13px;
  color: var(--ink);
}

.service-alert-item.today .service-alert-countdown {
  color: #7a5800;
}

.service-alert-item.overdue .service-alert-countdown {
  color: var(--danger);
}

.weather-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.weather-card-header h3 {
  margin: 0;
  font-size: 22px;
}

.weather-location {
  color: var(--muted);
  font-size: 13px;
}

.weather-status {
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--surface-2);
}

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

.weather-subheading {
  display: block;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.weather-grid-top {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.4fr);
  gap: 20px;
  margin-bottom: 24px;
}

.weather-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

.weather-now-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: 16px;
  padding: 22px;
  color: #f5f9ff;
  background: linear-gradient(160deg, #0a2547 0%, #0f3466 55%, #081d3a 100%);
  box-shadow: 0 18px 40px rgba(8, 29, 58, 0.3);
}

.weather-now-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.weather-now-location {
  margin: 4px 0 2px;
  font-size: 22px;
  font-weight: 800;
}

.weather-now-time {
  color: #b7c8e0;
  font-size: 13px;
}

.weather-now-icon {
  font-size: 44px;
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

.weather-now-temp {
  display: flex;
  align-items: center;
  gap: 16px;
}

.weather-now-temp strong {
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
}

.weather-now-condition {
  display: block;
  font-size: 16px;
  font-weight: 800;
}

.weather-now-feels {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: #b7c8e0;
}

.weather-now-rain {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #d7e3f3;
}

.weather-now-rain strong {
  color: #ffffff;
}

.weather-now-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: auto;
}

.weather-now-stats div {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 10px 12px;
  text-align: center;
}

.weather-now-stats small {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffb020;
}

.weather-now-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  font-weight: 800;
}

.weather-radar-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.weather-radar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.weather-radar-header .weather-eyebrow {
  color: var(--accent);
  opacity: 1;
}

.weather-radar-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.weather-badge {
  flex-shrink: 0;
  background: #c98a12;
  color: #3a2900;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 6px 12px;
}

.weather-radar-card .weather-radar {
  margin-bottom: 0;
  flex: 1;
  height: auto;
  min-height: 280px;
}

.weather-radar {
  position: relative;
  width: 100%;
  height: 380px;
  margin: 0 0 22px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 80, 176, 0.3);
  background: #dfe9ea;
  box-shadow: 0 12px 28px rgba(16, 39, 68, 0.14);
}

.weather-radar iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.weather-days {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.weather-day {
  flex: 1 1 130px;
  border: 1px solid rgba(0, 80, 176, 0.38);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(215, 227, 243, 0.7), rgba(183, 211, 245, 0.7));
  padding: 14px 10px;
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.weather-day-date {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.weather-day:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 26px rgba(16, 39, 68, 0.14);
}

.weather-day.rain-alert {
  border-color: rgba(45, 108, 180, 0.45);
  background: linear-gradient(180deg, rgba(216, 235, 255, 0.7), rgba(173, 213, 249, 0.7));
}

.weather-day-label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  text-transform: capitalize;
}

.weather-day-icon {
  display: block;
  margin: 5px 0 3px;
  font-size: 32px;
  line-height: 1;
}

.weather-day-temp {
  display: block;
  margin: 2px 0 4px;
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}

.weather-day-temp small {
  color: var(--muted);
  font-weight: 600;
}

.weather-day-rain {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #2d6cb4;
  background: rgba(45, 108, 180, 0.1);
  border-radius: 999px;
  padding: 3px 9px;
}

.home-quick {
  margin-top: 18px;
  border: 1px solid rgba(0, 80, 176, 0.42);
  border-radius: 16px;
  background: rgba(233, 242, 255, 0.7);
  padding: 20px 24px 22px;
  box-shadow: 0 18px 40px rgba(16, 39, 68, 0.1);
}

.home-quick h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(7, minmax(100px, 1fr));
  gap: 14px;
}

.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(215, 227, 243, 0.7);
  padding: 16px 10px;
  min-height: 96px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.quick-link span {
  font-size: 30px;
  line-height: 1;
}

.quick-link:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 26px rgba(0, 80, 176, 0.18);
}

.home-animate .home-hero-logo {
  animation: homeLogoEntrance 850ms ease both;
}

.home-animate .home-hero h2,
.home-animate .home-clock {
  animation: homeTextEntrance 720ms ease 120ms both;
}

.home-animate .weather-card {
  animation: homeWeatherEntrance 760ms ease 220ms both;
}

.home-animate .home-quick {
  animation: homeWeatherEntrance 760ms ease 320ms both;
}

@keyframes homeLogoEntrance {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

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

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.permission-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
}

.permission-grid input {
  width: auto;
  min-height: auto;
}

.compact-list {
  margin: 0 18px 18px;
}

.app-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 300px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #0a2547;
  color: #f5f9ff;
  padding: 4px 18px;
  box-shadow: none;
}

.footer-brand,
.footer-support {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.08);
}

.sync-status strong {
  color: #ffffff;
  font-size: 11px;
}

.sync-status span {
  color: #d7e3f3;
  font-size: 11px;
}

.sync-status.offline {
  background: rgba(180, 106, 33, 0.26);
}

.sync-status.pending {
  background: rgba(0, 80, 176, 0.22);
}

.footer-brand strong,
.footer-support strong {
  color: #ffffff;
  font-size: 11px;
}

.footer-brand span,
.footer-support span {
  color: #d7e3f3;
  font-size: 11px;
}

.primary-button,
.ghost-button {
  min-height: 42px;
  border-radius: 7px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
}

.ghost-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.ghost-button.danger {
  border-color: #f3b6ae;
  background: #fff5f4;
  color: #a13f32;
}

.ghost-button.danger:hover {
  border-color: #a13f32;
  background: #fbe4e0;
}

.saved-products {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(16, 39, 68, 0.08);
}

.product-form {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.lookup-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.lookup-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--surface);
  border: 1.5px solid var(--primary);
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.lookup-dropdown.open {
  display: block;
}

.lookup-dropdown-item {
  padding: 9px 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
}

.lookup-dropdown-item:last-child {
  border-bottom: none;
}

.lookup-dropdown-item:hover,
.lookup-dropdown-item.active {
  background: rgba(0, 80, 176,0.13);
  color: var(--primary);
}

.lookup-dropdown-item .ldi-code {
  font-weight: 700;
  font-size: 12px;
  color: var(--primary);
}

.lookup-dropdown-item .ldi-name {
  color: var(--text-muted);
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 80, 176, 0.30);
  padding: 18px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-backdrop.stacked {
  z-index: 45;
}

.modal-window {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1120px, 100%);
  max-height: min(92vh, 860px);
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(8, 29, 58, 0.32);
}

.modal-window.wide {
  width: min(1280px, 100%);
}

.modal-window.small {
  width: min(760px, 100%);
}

.modal-window.supplier-window {
  width: min(980px, 100%);
}

.supplier-window .entry-panel {
  padding: 26px 30px;
}

.supplier-window .supplier-grid {
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 22px 26px;
}

.supplier-window label {
  gap: 9px;
  font-size: 13.5px;
}

.supplier-window input,
.supplier-window textarea {
  min-height: 46px;
  padding: 0 14px;
}

.supplier-window textarea {
  padding: 12px 14px;
}

.modal-window.quote-client-window {
  width: min(760px, 100%);
}

.quote-client-window .entry-panel {
  padding: 26px 30px;
}

.quote-client-window .quote-client-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 22px 26px;
}

.quote-client-window label {
  gap: 9px;
  font-size: 13.5px;
}

.quote-client-window input {
  min-height: 46px;
  padding: 0 14px;
}

.launch-window .modal-header {
  background: var(--accent);
  color: #ffffff;
}

.launch-window .modal-header p {
  color: #ffffff;
}

.launch-window .icon-button {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.launch-window .entry-panel {
  background: #f3f7fd;
}

.launch-window input,
.launch-window select,
.launch-window textarea {
  background: #eaf0f9;
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.launch-header {
  background: #0a3a7a;
  color: white;
}

.launch-header p {
  color: #ffffff;
}

.modal-logo {
  width: 92px;
  height: 58px;
  object-fit: contain;
  border-radius: 6px;
  background: white;
  padding: 4px;
}

.modal-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 130%;
  line-height: 1.35;
}

.modal-header h2 {
  margin: 0;
  font-size: 130%;
  line-height: 1.2;
}

.launch-window .modal-header h2,
.launch-window .modal-header p,
.launch-header h2,
.launch-header p {
  color: #ffffff;
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: #f5f9ff;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.app-dialog-backdrop {
  z-index: 600;
}

.app-dialog-window {
  width: min(420px, 100%);
}

.app-dialog-window .modal-header {
  background: var(--accent);
  color: #ffffff;
}

.app-dialog-window .modal-header h2 {
  color: #ffffff;
  font-size: 118%;
}

.app-dialog-window.danger .modal-header {
  background: var(--danger);
}

.app-dialog-body {
  padding: 18px;
}

.app-dialog-body p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.app-dialog-input {
  width: 100%;
  margin-top: 12px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
}

.app-dialog-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus);
}

.app-dialog-window .primary-button.danger {
  border-color: var(--danger);
  background: var(--danger);
}

.modal-window .product-form {
  min-height: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  white-space: nowrap;
  cursor: pointer;
}

.tab.active {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
}

.tab-panel {
  display: none;
  padding: 20px;
}

.tab-panel.active {
  display: block;
}

.entry-panel {
  display: block;
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 16px;
}

.checkbox-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  align-self: end;
}

.checkbox-inline input {
  width: auto;
  min-height: 0;
}

label {
  display: grid;
  gap: 7px;
  color: #3f4f6b;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 9px 10px;
  outline: none;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}

input[readonly] {
  background: #f3f7fd;
  color: #455265;
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.client-form-grid {
  grid-template-columns: repeat(2, minmax(200px, 1fr));
}

.alert-box {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 7px;
  background: #fce4e4;
  border: 1.5px solid var(--danger);
  color: var(--danger);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.alert-box.hidden {
  display: none;
}

.sale-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}

.sale-header-client {
  flex: 2 1 320px;
  min-width: 280px;
}

.sale-header-field {
  flex: 1 1 170px;
  min-width: 160px;
}

@media (max-width: 620px) {
  .sale-header-row {
    flex-direction: column;
  }

  .sale-header-client,
  .sale-header-field {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }
}

.autocomplete-wrap {
  position: relative;
}

.suggestions {
  display: none;
  position: absolute;
  z-index: 10;
  top: 68px;
  right: 0;
  left: 0;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 40px rgba(16, 39, 68, 0.14);
}

.suggestions.open {
  display: block;
}

.suggestion {
  width: 100%;
  border: 0;
  background: white;
  text-align: left;
  padding: 12px;
  cursor: pointer;
}

.suggestion:hover,
.suggestion.active {
  background: var(--surface-2);
}

.suggestion strong {
  display: block;
}

.suggestion small {
  color: var(--muted);
}

.photo-layout {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(260px, 1fr);
  gap: 20px;
  align-items: start;
}

.photo-preview {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

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

.photo-fields {
  display: grid;
  gap: 10px;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 16px;
  max-height: 380px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.photo-gallery-item {
  position: relative;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--surface-2);
}

.photo-gallery-item:hover {
  border-color: var(--color-primary, #0050b0);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary, #0050b0) 25%, transparent);
}

.photo-gallery-item.selected {
  border-color: var(--color-primary, #0050b0);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary, #0050b0) 35%, transparent);
}

.photo-gallery-item img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.photo-gallery-item .gallery-source {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 10px;
  padding: 2px 5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-gallery-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
  font-size: 14px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.suppliers-filter {
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
}

.clients-filter {
  grid-template-columns: minmax(320px, 560px);
}

.clients-filter input {
  min-height: 44px;
  font-size: 15px;
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  align-items: end;
}

.entry-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(0, 80, 176, 0.25);
}

.step-label:first-child {
  margin-top: 0;
}

.step-number {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
}

.step-text {
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent);
}

.step-label + .entry-items-header {
  margin-top: 0;
}

.sale-step {
  border-radius: 12px;
  padding: 18px 20px 22px;
  margin-bottom: 18px;
}

.sale-step .step-label {
  margin-top: 0;
}

.sale-step-1 {
  background: rgba(0, 80, 176, 0.07);
}

.sale-step-2 {
  background: rgba(45, 108, 180, 0.06);
}

.sale-step-3 {
  background: rgba(224, 90, 43, 0.06);
}

.sale-step-4 {
  background: rgba(201, 138, 18, 0.09);
  margin-bottom: 0;
}

.sale-step-1 .step-number { background: #0050b0; }
.sale-step-2 .step-number { background: #2d6cb4; }
.sale-step-3 .step-number { background: #e05a2b; }
.sale-step-4 .step-number { background: #c98a12; }

.sale-step-1 .step-text { color: #0050b0; }
.sale-step-2 .step-text { color: #2d6cb4; }
.sale-step-3 .step-text { color: #e05a2b; }
.sale-step-4 .step-text { color: #c98a12; }

.entry-editor-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.entry-launch-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quick-inline-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid rgba(0, 80, 176, 0.35);
  border-radius: 8px;
  background: #eef5ff;
  padding: 14px;
}

.entry-items-header.compact {
  margin-bottom: 0;
}

.inline-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-panel-actions .hint {
  margin-right: auto;
}

.entry-items-header h3 {
  margin: 0;
  font-size: 17px;
}

.entry-items-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.entry-items-list {
  display: grid;
  gap: 12px;
}

.field-with-action {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 8px;
}

.compact-button {
  min-height: 42px;
  white-space: nowrap;
}

.action-supplier {
  border-color: #8d5b00;
  background: #ffe29a;
  color: #3b2600;
}

.action-product {
  border-color: #145f91;
  background: #c8eaff;
  color: #073a5a;
}

.action-client {
  border-color: #7d3f12;
  background: #ffd6b8;
  color: #4b2106;
}

.action-client,
.action-product,
.action-supplier {
  box-shadow: 0 0 0 3px rgba(0, 80, 176, 0.08), 0 8px 18px rgba(16, 39, 68, 0.08);
  font-weight: 900;
}

.action-launch {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.entry-item-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.entry-item-card:first-child {
  border-color: rgba(0, 80, 176, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 80, 176, 0.08);
}

.entry-item-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 14px;
}

.entry-item-product-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.entry-product-summary {
  display: grid;
  gap: 4px;
  min-height: 42px;
  align-content: center;
}

.entry-product-summary span {
  color: var(--muted);
  font-size: 13px;
}

.entry-product-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.entry-stock-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 12px;
  background: #e5f3e8;
  border: 1px solid #bfe0c8;
}

.entry-stock-badge .entry-stock {
  color: #1f6b3a;
  font-size: 14px;
  font-weight: 800;
}

.entry-item-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 14px;
  align-items: end;
}

.entry-item-grid label {
  min-width: 0;
}

.entry-item-notes {
  grid-column: span 2;
}

.entry-item-total-box {
  display: grid;
  gap: 4px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.entry-item-total-box strong {
  color: var(--ink);
  font-size: 15px;
}

.entry-item-total-box .primary-button {
  width: 100%;
  min-height: 36px;
}

.entry-totals {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.entry-totals span {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f5f9ff;
  padding: 8px 10px;
  color: var(--muted);
}

.entry-totals strong {
  color: var(--ink);
}

.saved-products {
  margin-top: 18px;
  overflow: hidden;
}

.subtabs {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  border-bottom: 3px solid var(--accent);
}

.subtab {
  min-height: 40px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #e3ebf7;
  color: #455265;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

.subtab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

/* Cor própria pras abas de Vendas que pedem atenção (2026-09-23): "Contas a
   receber" (dinheiro pendente de entrar) fica âmbar, "Estornadas" fica
   vermelha — dá pra notar de longe sem precisar ler o texto da aba. */
#salesScreen .subtab-receivable {
  border-color: #e2ad3c;
  color: #8a5f00;
}

#salesScreen .subtab-receivable.active {
  border-color: #c98a00;
  background: #c98a00;
  color: #ffffff;
}

#salesScreen .subtab-reversed {
  border-color: #d9b3ae;
  color: var(--danger);
}

#salesScreen .subtab-reversed.active {
  border-color: var(--danger);
  background: var(--danger);
  color: #ffffff;
}

.entry-tab-panel,
.stock-tab-panel,
.sales-tab-panel,
.quote-tab-panel,
.purchase-tab-panel,
.report-panel {
  display: none;
  margin-top: 0;
  border-top-left-radius: 0;
}

.entry-tab-panel.active,
.stock-tab-panel.active,
.sales-tab-panel.active,
.quote-tab-panel.active,
.purchase-tab-panel.active,
.report-panel.active {
  display: block;
}

.report-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 18px 0;
}

.report-indicators {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px 18px;
}

.report-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f9ff;
  padding: 12px;
}

.report-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-card strong {
  display: block;
  margin-top: 7px;
  color: var(--accent);
  font-size: 18px;
}

.diarias-cost-summary {
  padding: 0 18px 6px;
}

.diarias-cost-summary h3 {
  margin: 4px 0 4px;
  font-size: 14px;
  color: var(--ink);
}

.diarias-cost-summary.hidden {
  display: none;
}

.diaria-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}

.diaria-side,
.diaria-main {
  min-width: 0;
}

.diaria-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.diaria-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

.diaria-form input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

.diaria-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  max-height: 520px;
  overflow-y: auto;
}

.diaria-worker-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.diaria-worker-card:hover {
  border-color: var(--accent);
  background: #f5f9ff;
}

.diaria-worker-card.selected {
  background: #e9f2ff;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 80, 176, 0.15);
}

.diaria-worker-card.inactive {
  opacity: 0.55;
}

.diaria-worker-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  flex: 1;
  padding: 0;
}

.diaria-worker-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.diaria-worker-info span {
  font-size: 12px;
  color: var(--muted);
}

.diaria-worker-chevron {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

.diaria-worker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.diaria-calendar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 20px 4px;
}

.diaria-calendar-header strong {
  min-width: 170px;
  text-align: center;
  font-size: 15px;
}

.diaria-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 4px 20px 14px;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
}

.diaria-legend .hint {
  margin-left: auto;
  font-style: italic;
}

.diaria-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

.diaria-dot-integral { background: #0050b0; }
.diaria-dot-meia { background: #c98a12; }
.diaria-dot-empty { background: #d7e3f3; }

.diaria-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  padding: 0 20px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
  text-transform: uppercase;
}

.diaria-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  padding: 6px 20px 20px;
  transition: opacity 0.12s ease;
}

.diaria-calendar-grid.diaria-calendar-loading {
  opacity: 0.5;
  pointer-events: none;
}

.diaria-day {
  aspect-ratio: 1 / 0.6;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.diaria-day:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -4px rgba(16, 39, 68, 0.35);
}

.diaria-day.empty-cell {
  border: none;
  background: transparent;
  cursor: default;
}

.diaria-day.empty-cell:hover {
  transform: none;
  box-shadow: none;
}

.diaria-day.diaria-future {
  cursor: not-allowed;
  color: var(--muted);
  background: #f3f7fd;
}

.diaria-day.diaria-future:hover {
  transform: none;
  box-shadow: none;
}

.diaria-day-number {
  font-weight: 800;
  font-size: 13px;
}

.diaria-day-label {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.diaria-day.diaria-integral {
  background: #e5f3e8;
  border-color: #0050b0;
  color: #1e5c33;
}

.diaria-day.diaria-meia {
  background: #fff3cd;
  border-color: #c98a12;
  color: #7a5800;
}

@media (max-width: 900px) {
  .diaria-layout {
    grid-template-columns: 1fr;
  }
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  padding: 0 18px 18px;
}

.chart-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.chart-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 2fr minmax(64px, auto);
  gap: 9px;
  align-items: center;
  margin: 8px 0;
  font-size: 12px;
}

.bar-row div {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.print-body {
  padding: 24px;
  background: white;
}

.print-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 12px;
}

.print-header img {
  width: 140px;
  max-height: 80px;
  object-fit: contain;
}

.print-header h1 {
  margin: 0 0 6px;
}

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

.section-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.section-heading-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 330px);
}

.table-wrap.entry-launched-table {
  max-height: none;
  overflow-y: visible;
}

.product-table-wrap {
  max-height: calc(100vh - 330px);
  overflow: auto;
}

.product-table-wrap table {
  table-layout: fixed;
  min-width: 1450px;
}

/* Colunas otimizadas do Relatório por produto (2026-09-23): larguras fixas
   por conteúdo em vez de nowrap genérico em tudo, pra caber mais na tela sem
   rolar de lado à toa. */
.sales-report-table-wrap table {
  table-layout: fixed;
}

.sales-report-table-wrap th:nth-child(1),
.sales-report-table-wrap td:nth-child(1) { width: 9%; }
.sales-report-table-wrap th:nth-child(2),
.sales-report-table-wrap td:nth-child(2) { width: 13%; }
.sales-report-table-wrap th:nth-child(3),
.sales-report-table-wrap td:nth-child(3) { width: 18%; }
.sales-report-table-wrap th:nth-child(4),
.sales-report-table-wrap td:nth-child(4) { width: 10%; }
.sales-report-table-wrap th:nth-child(5),
.sales-report-table-wrap td:nth-child(5) { width: 6%; }
.sales-report-table-wrap th:nth-child(6),
.sales-report-table-wrap td:nth-child(6) { width: 6%; }
.sales-report-table-wrap th:nth-child(7),
.sales-report-table-wrap td:nth-child(7) { width: 8%; }
.sales-report-table-wrap th:nth-child(8),
.sales-report-table-wrap td:nth-child(8) { width: 8%; }
.sales-report-table-wrap th:nth-child(9),
.sales-report-table-wrap td:nth-child(9) { width: 8%; }
.sales-report-table-wrap th:nth-child(10),
.sales-report-table-wrap td:nth-child(10) { width: 8%; }
.sales-report-table-wrap th:nth-child(11),
.sales-report-table-wrap td:nth-child(11) { width: 10%; }
.sales-report-table-wrap th:nth-child(12),
.sales-report-table-wrap td:nth-child(12) { width: 8%; }

.sales-report-table-wrap td {
  padding: 9px 10px;
  white-space: normal;
  overflow-wrap: break-word;
}

.sales-report-table-wrap .num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.report-subtext {
  color: var(--muted);
  font-size: 11px;
}

.product-table-wrap th:nth-child(1),
.product-table-wrap td:nth-child(1) { width: 30px; }

.product-table-wrap th:nth-child(2),
.product-table-wrap td:nth-child(2) { width: 64px; }

.product-table-wrap th:nth-child(3),
.product-table-wrap td:nth-child(3) { width: 120px; }

.product-table-wrap th:nth-child(4),
.product-table-wrap td:nth-child(4) {
  width: 220px;
  white-space: normal;
  word-break: break-word;
}

.product-table-wrap th:nth-child(5),
.product-table-wrap td:nth-child(5) { width: 90px; }

.product-table-wrap th:nth-child(6),
.product-table-wrap td:nth-child(6) { width: 130px; }

.product-table-wrap th:nth-child(7),
.product-table-wrap td:nth-child(7) { width: 90px; }

.product-table-wrap th:nth-child(8),
.product-table-wrap td:nth-child(8) { width: 80px; }

.product-table-wrap th:nth-child(9),
.product-table-wrap td:nth-child(9) { width: 100px; }

.product-table-wrap th:nth-child(10),
.product-table-wrap td:nth-child(10) { width: 90px; }

.product-table-wrap th:nth-child(11),
.product-table-wrap td:nth-child(11) { width: 460px; }

.supplier-table-wrap table {
  table-layout: fixed;
  min-width: 1480px;
}

.supplier-table-wrap th:nth-child(1),
.supplier-table-wrap td:nth-child(1) {
  width: 200px;
  white-space: normal;
  word-break: break-word;
}

.supplier-table-wrap th:nth-child(2),
.supplier-table-wrap td:nth-child(2) {
  width: 150px;
  white-space: normal;
  word-break: break-word;
}

.supplier-table-wrap th:nth-child(3),
.supplier-table-wrap td:nth-child(3) { width: 130px; }

.supplier-table-wrap th:nth-child(4),
.supplier-table-wrap td:nth-child(4) {
  width: 150px;
  white-space: normal;
  word-break: break-word;
}

.supplier-table-wrap th:nth-child(5),
.supplier-table-wrap td:nth-child(5) {
  width: 150px;
  white-space: normal;
  word-break: break-word;
}

.supplier-table-wrap th:nth-child(6),
.supplier-table-wrap td:nth-child(6) {
  width: 170px;
  white-space: normal;
  word-break: break-word;
}

.supplier-table-wrap th:nth-child(7),
.supplier-table-wrap td:nth-child(7) { width: 90px; }

.supplier-table-wrap th:nth-child(8),
.supplier-table-wrap td:nth-child(8) { width: 140px; }

.supplier-table-wrap th:nth-child(9),
.supplier-table-wrap td:nth-child(9) { width: 300px; }

.costs-table-wrap table {
  table-layout: fixed;
  width: 100%;
  min-width: 1020px;
}

.costs-table-wrap th,
.costs-table-wrap td {
  padding: 9px 10px;
  font-size: 13px;
}

.costs-table-wrap th:nth-child(1),
.costs-table-wrap td:nth-child(1) { width: 7%; }

.costs-table-wrap th:nth-child(2),
.costs-table-wrap td:nth-child(2) { width: 8%; }

.costs-table-wrap th:nth-child(3),
.costs-table-wrap td:nth-child(3) { width: 9%; }

.costs-table-wrap th:nth-child(4),
.costs-table-wrap td:nth-child(4) {
  width: 22%;
  white-space: normal;
  word-break: break-word;
}

.costs-table-wrap th:nth-child(5),
.costs-table-wrap td:nth-child(5) { width: 8%; }

.costs-table-wrap th:nth-child(6),
.costs-table-wrap td:nth-child(6) { width: 8%; }

.costs-table-wrap th:nth-child(7),
.costs-table-wrap td:nth-child(7) { width: 8%; }

.costs-table-wrap th:nth-child(8),
.costs-table-wrap td:nth-child(8) { width: 8%; }

.costs-table-wrap th:nth-child(9),
.costs-table-wrap td:nth-child(9) {
  display: none;
}

.costs-table-wrap th:nth-child(10),
.costs-table-wrap td:nth-child(10) { width: 22%; }

.costs-table-wrap .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.costs-table-wrap .small-button {
  min-height: 27px;
  padding: 0 8px;
  font-size: 11px;
  text-align: center;
}

.costs-table-wrap .baixa-cost {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.costs-table-wrap .baixa-cost:hover {
  border-color: #0a3a7a;
  background: #0a3a7a;
  color: #ffffff;
}

.costs-table-wrap .edit-cost {
  border-color: #2f6fa8;
  background: #eaf2f9;
  color: #1f4e78;
}

.costs-table-wrap .edit-cost:hover {
  border-color: #1f4e78;
  background: #dcebf5;
  color: #1f4e78;
}

.costs-table-wrap .reverse-cost {
  border-color: #c84f3c;
  background: #fbe4e0;
  color: #a13f32;
}

.costs-table-wrap .reverse-cost:hover {
  border-color: #a13f32;
  background: #f7d3cd;
  color: #7a2e24;
}

.costs-table-wrap .delete-cost {
  border-color: #c84f3c;
  background: #fbe4e0;
  color: #a13f32;
}

.costs-table-wrap .delete-cost:hover {
  border-color: #a13f32;
  background: #f7d3cd;
  color: #7a2e24;
}

.sales-table-wrap table {
  table-layout: fixed;
  min-width: 1070px;
}

.sales-table-wrap th,
.sales-table-wrap td {
  padding: 8px 8px;
  font-size: 12.5px;
}

.sales-table-wrap th:nth-child(1),
.sales-table-wrap td:nth-child(1) { width: 84px; }

.sales-table-wrap th:nth-child(2),
.sales-table-wrap td:nth-child(2) {
  width: 150px;
  white-space: normal;
  word-break: break-word;
}

.sales-table-wrap th:nth-child(3),
.sales-table-wrap td:nth-child(3) { width: 130px; }

.sales-table-wrap th:nth-child(4),
.sales-table-wrap td:nth-child(4) { width: 56px; }

.sales-table-wrap th:nth-child(5),
.sales-table-wrap td:nth-child(5) { width: 92px; }

.sales-table-wrap th:nth-child(6),
.sales-table-wrap td:nth-child(6) { width: 84px; }

.sales-table-wrap th:nth-child(7),
.sales-table-wrap td:nth-child(7) { width: 130px; }

.sales-table-wrap th:nth-child(8),
.sales-table-wrap td:nth-child(8) { width: 84px; }

.sales-table-wrap th:nth-child(9),
.sales-table-wrap td:nth-child(9) { width: 260px; }

.sales-table-wrap .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sales-table-wrap .small-button {
  min-height: 27px;
  padding: 0 8px;
  font-size: 11px;
  text-align: center;
}

.sales-table-wrap .edit-sale {
  border-color: #2f6fa8;
  background: #eaf2f9;
  color: #1f4e78;
}

.sales-table-wrap .edit-sale:hover {
  border-color: #1f4e78;
  background: #dcebf5;
  color: #1f4e78;
}

.sales-table-wrap .reverse-sale {
  border-color: #c84f3c;
  background: #fbe4e0;
  color: #a13f32;
}

.sales-table-wrap .reverse-sale:hover {
  border-color: #a13f32;
  background: #f7d3cd;
  color: #7a2e24;
}

.sales-table-wrap .print-sale {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.sales-table-wrap .print-sale:hover {
  border-color: #0a3a7a;
  background: #0a3a7a;
  color: #ffffff;
}

.product-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 0.8fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #eef5ff;
}

.product-filters label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.product-filters input,
.product-filters select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f9ff;
  color: #49586c;
  font-size: 12px;
  text-transform: uppercase;
}

.sort-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  font-weight: 800;
  text-transform: uppercase;
}

.sort-header::after {
  content: "↕";
  color: #7b8da6;
  font-size: 11px;
}

.sort-header.active::after {
  content: "↑";
  color: var(--accent);
}

.sort-header.active[data-direction="desc"]::after {
  content: "↓";
}

.product-thumb {
  width: 54px;
  height: 42px;
  border-radius: 7px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--surface-2);
}

.row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.actions-cell {
  white-space: nowrap;
}

.product-table-wrap th,
.product-table-wrap td {
  padding: 10px 8px;
}

.small-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 0 9px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12.5px;
}

.small-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.small-button.warning:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.edit-product {
  border-color: #2f6fa8;
  background: #eaf2f9;
  color: #1f4e78;
}

.edit-product:hover {
  border-color: #1f4e78;
  color: #1f4e78;
  background: #dcebf5;
}

.duplicate-product {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.duplicate-product:hover {
  border-color: #0a3a7a;
  background: #0a3a7a;
  color: #ffffff;
}

.print-sale {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.print-sale:hover {
  border-color: #0a3a7a;
  background: #0a3a7a;
  color: #ffffff;
}

/* Botões de Contas a receber (2026-09-23): "Dar baixa" e "Ver vendas" eram
   brancos e iguais a qualquer outro botão — difícil de achar rápido na
   tabela. "Dar baixa" (ação principal, recebe o dinheiro) fica verde
   cheio; "Ver vendas" fica azul, igual ao padrão de "ver detalhes" do
   resto do sistema. */
.small-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.small-button.primary:hover {
  border-color: #0a3a7a;
  background: #0a3a7a;
  color: #ffffff;
}

.view-client-receivables {
  border-color: #2f6fa8;
  background: #eaf2f9;
  color: #1f4e78;
}

.view-client-receivables:hover {
  border-color: #1f4e78;
  background: #dcebf5;
  color: #1f4e78;
}

.adjust-price {
  border-color: var(--accent-2);
  background: #fbeee4;
  color: #7a3d1a;
}

.adjust-price:hover {
  border-color: #7a3d1a;
  color: #7a3d1a;
  background: #f6e0cd;
}

.toggle-status {
  border-color: #c98a12;
  background: #fff3cd;
  color: #7a5800;
}

.toggle-status:hover {
  border-color: #7a5800;
  color: #7a5800;
  background: #ffe9a8;
}

.delete-product {
  border-color: #c84f3c;
  background: #fbe4e0;
  color: #a13f32;
}

.delete-product:hover {
  border-color: #a13f32;
  color: #7a2e24;
  background: #f7d3cd;
}

.small-button.danger {
  border-color: #c84f3c;
  color: #a13f32;
  background: #fff0ed;
}

.edit-purchase-request {
  border-color: #2f6fa8;
  background: #eaf2f9;
  color: #1f4e78;
}

.edit-purchase-request:hover {
  border-color: #1f4e78;
  color: #1f4e78;
  background: #dcebf5;
}

.confirm-purchase-request-arrival {
  border-color: var(--accent);
  background: #e8f3ec;
  color: #1f6b3a;
}

.confirm-purchase-request-arrival:hover {
  border-color: #1f6b3a;
  color: #ffffff;
  background: var(--accent);
}

.cancel-purchase-request {
  border-color: #c84f3c;
  background: #fbe4e0;
  color: #a13f32;
}

.cancel-purchase-request:hover {
  border-color: #a13f32;
  color: #7a2e24;
  background: #f7d3cd;
}

.small-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.active {
  background: #e5f3e8;
  color: #25673e;
}

.status-pill.inactive {
  background: #f6e8e4;
  color: var(--danger);
}

.status-pill.pending {
  background: #fff3cd;
  color: #7a5800;
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e05a2b;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
}

.badge-count.hidden {
  display: none;
}

tr.inactive-row {
  color: #647893;
  background: #faf7f6;
}

tr.import-pending-row {
  background: #fde3e0;
}

tr.import-pending-row td {
  color: #7a231a;
}

tr.import-pending-row .product-thumb {
  opacity: 0.85;
}

.status-pill.import-pending {
  background: #e0362a;
  color: #fff;
  margin-left: 8px;
  vertical-align: middle;
}

.col-check {
  text-align: center;
}

.col-check input {
  width: 16px;
  height: 16px;
  accent-color: #e0362a;
  cursor: pointer;
}

.row-select-check {
  width: 16px;
  height: 16px;
  accent-color: #e0362a;
  cursor: pointer;
}

tr.cost-overdue {
  background: #fdecec;
}

tr.cost-overdue td {
  color: #8a2a2a;
}

tr.cost-due-soon {
  background: #fff6df;
}

tr.cost-due-soon td {
  color: #7a5b00;
}

tr.cost-paid {
  background: #eaf6ec;
}

tr.cost-paid td {
  color: #1e5c33;
}

tr.cost-group-row {
  background: #eef5ff;
  font-weight: 600;
}

.cost-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  padding: 4px 0;
  text-align: left;
}

.cost-group-chevron {
  color: var(--accent);
  font-weight: 800;
}

tr.cost-row-nested td:first-child {
  padding-left: 34px;
  color: var(--muted);
}

tr.row-clickable {
  cursor: pointer;
}

tr.row-clickable:hover {
  background: rgba(0, 80, 176, 0.08);
}

#quotesBody tr.row-even,
#quoteHistoryBody tr.row-even {
  background: #eef5ff;
}

#quotesBody tr.row-odd,
#quoteHistoryBody tr.row-odd {
  background: #ffffff;
}

#quotesBody tr.row-even.row-clickable:hover,
#quotesBody tr.row-odd.row-clickable:hover {
  background: rgba(0, 80, 176, 0.16);
}

.btn-edit {
  border-color: #2f6fa8;
  background: #eaf2f9;
  color: #1f4e78;
}

.btn-edit:hover {
  border-color: #1f4e78;
  color: #1f4e78;
  background: #dcebf5;
}

.btn-approve {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.btn-approve:hover {
  border-color: #0a3a7a;
  background: #0a3a7a;
  color: #ffffff;
}

.btn-reverse {
  border-color: #c98a12;
  background: #fff3cd;
  color: #7a5800;
}

.btn-reverse:hover {
  border-color: #7a5800;
  color: #7a5800;
  background: #ffe9a8;
}

.btn-sign {
  border-color: #6c4fb0;
  background: #efe8fb;
  color: #4a3480;
}

.btn-sign:hover {
  border-color: #4a3480;
  color: #4a3480;
  background: #e1d4f5;
}

.btn-pdf {
  border-color: #2f6fa8;
  background: #ffffff;
  color: #2f6fa8;
}

.btn-pdf:hover {
  border-color: #1f4e78;
  color: #1f4e78;
  background: #eaf2f9;
}

.btn-sale {
  border-color: var(--accent-2);
  background: #fbeee4;
  color: #7a3d1a;
  font-weight: 800;
}

.btn-sale:hover {
  border-color: #7a3d1a;
  color: #7a3d1a;
  background: #f6e0cd;
}

.btn-delete {
  border-color: #c84f3c;
  background: #fbe4e0;
  color: #a13f32;
}

.btn-delete:hover {
  border-color: #a13f32;
  color: #7a2e24;
  background: #f7d3cd;
}

tr.row-clickable .actions-cell,
tr.row-clickable .row-actions {
  cursor: default;
}

tr.credit-warn-row {
  background: #fff9e0;
}

tr.credit-limit-row {
  background: #fce4e4;
}

tr.credit-over-row {
  background: #fce4e4;
  box-shadow: inset 0 0 0 2px var(--danger);
}

.credit-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  margin-left: 4px;
  vertical-align: middle;
}

.credit-badge-warn {
  background: #ffe9a8;
  color: #7a5800;
}

.credit-badge-limit {
  background: var(--danger);
  color: #fff;
}

.credit-badge-over {
  background: #fff;
  color: var(--danger);
  border: 1.5px solid var(--danger);
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 26px;
}

.mobile-menu-toggle {
  display: none;
}

.mobile-menu-backdrop {
  display: none;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: 100vh;
    height: 100dvh;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 60;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: #0a2547;
    color: #f5f9ff;
    box-shadow: 0 6px 16px rgba(8, 29, 58, 0.35);
    cursor: pointer;
  }

  .mobile-menu-toggle svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .mobile-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(8, 29, 58, 0.5);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .app-shell.mobile-menu-open .mobile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(300px, 85vw);
    height: 100vh;
    height: 100dvh;
    max-height: none;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 58;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 24px rgba(8, 29, 58, 0.35);
  }

  .app-shell.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .app-shell.mobile-menu-open .mobile-menu-toggle {
    display: none;
  }

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

  .workspace {
    height: auto;
    min-height: 0;
    padding: 18px;
    padding-top: 70px;
  }

  .weather-grid-top {
    grid-template-columns: 1fr;
  }

  .quick-links {
    grid-template-columns: repeat(4, minmax(90px, 1fr));
  }

  .home-hero {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .home-hero-text {
    align-items: center;
  }

  .topbar,
  .photo-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar-actions {
    justify-content: start;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

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

  .field-with-action {
    grid-template-columns: 1fr;
  }

  .entry-item-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .entry-item-total-box {
    grid-column: span 2;
  }

  .filters-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .product-filters {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 620px) {
  .workspace {
    padding: 12px;
  }

  h1 {
    font-size: 23px;
  }

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

  .span-2, .span-3 {
    grid-column: auto;
  }

  .topbar-actions,
  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .entry-item-grid,
  .filters-grid,
  .product-filters {
    grid-template-columns: 1fr;
  }

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

  .weather-day {
    flex-basis: 120px;
  }

  .entry-item-total-box {
    grid-column: auto;
  }

  .app-footer {
    left: 0;
    align-items: center;
    flex-direction: row;
    gap: 8px;
    min-height: 30px;
  }
}

/* Resumo e dias em aberto das contas a receber */
.receivable-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 16px 22px 4px;
}

.receivable-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border: 1px solid #d7e3f3;
  border-radius: 10px;
  background: #fff;
}

.receivable-card span {
  font-size: 12px;
  color: #516177;
}

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

.receivable-card-main {
  background: #0050b0;
  border-color: #0050b0;
}

.receivable-card-main span,
.receivable-card-main strong {
  color: #fff;
}

.receivable-card-warn strong {
  color: #9a6b00;
}

.receivable-card-danger strong {
  color: var(--danger, #c0392b);
}

.days-open {
  font-weight: 700;
}

.days-open-mid {
  color: #9a6b00;
}

.days-open-high {
  color: var(--danger, #c0392b);
}

/* Inventário (2026-09-26): pensado pro celular — linha grande com campo e botão fáceis de tocar. */
.inventory-panel { padding: 18px; }
.inventory-idle { display: grid; gap: 14px; }
.inventory-idle h2 { margin: 0; }
.inventory-idle p { margin: 0; color: var(--muted); }
.inventory-idle .inventory-start { width: 100%; min-height: 52px; font-size: 17px; }
.inventory-active { display: grid; gap: 12px; }
.inventory-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.inventory-bar > div { display: grid; gap: 3px; min-width: 0; flex: 1 1 auto; }
.inventory-bar strong { font-size: 18px; }
.inventory-bar span { color: var(--muted); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.inventory-bar .ghost-button { width: auto; flex: 0 0 auto; min-height: 42px; padding: 0 18px; }
.inventory-search { display: block; width: 100%; min-height: 50px; font-size: 16px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.inventory-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.inventory-filters .subtab { border-bottom: 1px solid var(--line); border-radius: 999px; min-height: 38px; padding: 0 16px; }
.inventory-count { color: var(--muted); font-size: 13px; line-height: 1.4; }
.inventory-list { display: grid; gap: 8px; }
.inv-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.inv-row.done { background: #eef7f0; border-color: #b9dcc4; }
.inv-info { display: grid; gap: 2px; min-width: 0; }
.inv-info strong { overflow-wrap: anywhere; line-height: 1.25; }
.inv-info small { color: var(--muted); overflow-wrap: anywhere; }
.inv-info small.inv-done { color: var(--accent); font-weight: 700; }
.inv-input { width: 100%; min-height: 46px; font-size: 18px; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; background: #fff; color: var(--ink); }
.inv-row .inv-ok { width: auto; min-height: 46px; min-width: 56px; padding: 0 14px; }
@media (max-width: 980px) {
  .workspace { padding-top: 66px; }
}
@media (max-width: 620px) {
  .workspace { padding-top: 66px; }
  .inventory-panel { padding: 14px; }
  .inv-row { grid-template-columns: minmax(0, 1fr) 82px 54px; gap: 8px; padding: 10px; }
  .inv-row .inv-ok { min-width: 54px; padding: 0; }
}

/* Inventário: quantidade em destaque e cabeçalho compacto no celular (2026-09-26). */
.inv-info small .inv-qty { color: #f76707; font-size: 22px; font-weight: 800; line-height: 1; margin-right: 2px; }
@media (max-width: 980px) {
  .workspace.compact-header .topbar { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
  .workspace.compact-header .topbar > div:first-child { flex: 1 1 auto; min-width: 0; }
  .workspace.compact-header .topbar-right { flex: 0 0 auto; flex-wrap: nowrap; }
  .workspace.compact-header #pageSubtitle { display: none; }
  .workspace.compact-header .topbar h1 { margin-bottom: 0; line-height: 1.2; }
}

/* Histórico de inventários (2026-09-26) */
.inventory-subtitle { margin: 6px 0 0; font-size: 16px; }
.inventory-history { display: grid; gap: 8px; }
.inv-history-card { display: grid; gap: 3px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.inv-history-card:hover, .inv-history-card:focus-visible { border-color: var(--accent); background: #f3f8ff; }
.inv-history-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.inv-history-top > span { color: var(--muted); font-size: 13px; }
.inv-history-sub { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.inventory-detail { display: grid; gap: 12px; }
.inventory-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.inventory-summary > div { display: grid; gap: 2px; text-align: center; padding: 10px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.inventory-summary b { font-size: 20px; }
.inventory-summary span { font-size: 12px; color: var(--muted); }
.inv-plus { color: #0a8f3c; }
.inv-minus { color: #d6280f; }
.inv-detail-row { grid-template-columns: minmax(0, 1fr) auto; }
.inv-diff { font-size: 20px; font-weight: 800; min-width: 52px; text-align: right; color: var(--muted); }

/* Inventário sem botão OK: grava ao sair do campo (2026-09-26) */
.inv-row { grid-template-columns: minmax(0, 1fr) 110px; }
.inv-row.saving { opacity: .6; }
.inv-row.done .inv-input { border-color: #7cc48f; font-weight: 700; }
@media (max-width: 620px) {
  .inv-row { grid-template-columns: minmax(0, 1fr) 96px; }
}
.inv-row.inv-detail-row { grid-template-columns: minmax(0, 1fr) auto; }

/* Inventário: ajuste de preço junto da contagem (2026-09-27) */
.inv-row { grid-template-columns: minmax(0, 1fr) 128px; align-items: start; }
.inv-fields { display: grid; gap: 6px; }
.inv-info small .inv-price-current { color: #0050b0; font-size: 22px; font-weight: 800; line-height: 1; margin-left: 2px; }
.inv-price-input { width: 100%; min-height: 40px; font-size: 15px; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 0 4px; background: #fff; color: var(--ink); }
.inv-price-input:not(:placeholder-shown) { border-color: #7cc48f; font-weight: 700; }
.inv-info small.inv-price-done { color: #b8590b; font-weight: 700; }
@media (max-width: 620px) {
  .inv-row { grid-template-columns: minmax(0, 1fr) 108px; }
}
.inv-price-history { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Prestadores e Contrato de serviço (2026-09-26) */
.ct-panel { padding: 18px; }
.ct-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ct-head h2 { margin: 0; }
.ct-head .primary-button, .ct-head .ghost-button { width: auto; flex: 0 0 auto; }
.ct-sub { color: var(--muted); font-size: 13px; }
.ct-hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.ct-form { display: grid; gap: 12px; margin: 0 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.ct-form label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; }
.ct-form input, .ct-form select, .ct-form textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; font-size: 16px; }
.ct-form textarea { resize: vertical; line-height: 1.45; }
.ct-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ct-check { display: flex !important; align-items: center; gap: 8px; }
.ct-check input { width: 20px; min-height: 20px; }
.ct-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-buttons .primary-button, .ct-buttons .ghost-button { width: auto; }
.ct-warn { padding: 10px 12px; border-radius: 8px; background: #fff4dc; border: 1px solid #f0cf85; color: #7a4b00; font-size: 14px; }
.ct-list { display: grid; gap: 10px; margin-top: 12px; }
.ct-card { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ct-card.ct-off { opacity: .6; }
.ct-card-main { display: grid; gap: 4px; min-width: 0; flex: 1 1 auto; }
.ct-card-main strong { overflow-wrap: anywhere; }
.ct-card-main small { color: var(--muted); overflow-wrap: anywhere; }
.ct-card .ghost-button, .ct-card .primary-button { width: auto; min-height: 38px; padding: 0 14px; }
.ct-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.ct-tag { color: var(--accent); font-size: 13px; font-weight: 700; }
.ct-pill { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.ct-pill.wait { background: #fff4dc; color: #8a5f00; }
.ct-pill.ok { background: #e6f5ea; color: #14632f; }
.ct-pill.bad { background: #fde8e6; color: #a11a0d; }
.ct-pill.off { background: #eceff1; color: #546e7a; }
.ct-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ct-link { padding: 12px; border: 1px dashed var(--accent); border-radius: 10px; background: #f3f8ff; word-break: break-all; font-family: Consolas, monospace; font-size: 13px; margin: 0 0 12px; }
@media (max-width: 620px) {
  .ct-panel { padding: 14px; }
  .ct-two { grid-template-columns: 1fr; }
  .ct-head { align-items: flex-start; }
  .ct-card { flex-direction: column; }
}

.opt { color: var(--muted); font-weight: 400; font-size: 12px; }
.client-form-grid label { align-content: start; }
.opt { line-height: 1; }

/* Montador de serviços do contrato (2026-09-26) */
.ct-services-block { display: grid; gap: 10px; }
.ct-services-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.ct-services-head .ghost-button { width: auto; min-height: 36px; padding: 0 12px; font-size: 13px; }
.ct-svc { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ct-svc-head { display: flex; justify-content: space-between; align-items: center; }
.ct-svc-head .ghost-button { width: auto; min-height: 34px; padding: 0 12px; font-size: 13px; }
.ct-svc-price { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ct-svc-sub { text-align: right; font-size: 15px; color: var(--muted); }
.ct-svc-sub strong { color: var(--accent); font-size: 17px; }
.ct-add { width: auto; justify-self: start; }
.ct-total { padding: 12px 14px; border-radius: 10px; background: #eef7f0; border: 1px solid #b9dcc4; font-size: 16px; text-align: right; }
.ct-total strong { color: var(--accent); font-size: 22px; }

/* Aditivos aninhados no cartão do contrato (2026-09-26) */
.ct-addenda { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); display: grid; gap: 8px; }
.ct-addenda-title { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ct-sub-card { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ct-sub-card small { color: var(--muted); overflow-wrap: anywhere; }
.ct-sub-card .ct-actions { margin-top: 4px; }

.ct-link-box { display: grid; gap: 6px; margin: 0 0 14px; }
.ct-link-box .ct-link { margin: 0; }


/* O.S: serviços rápidos e selos de envio */
.quick-services {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
}
.quick-services-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}
.quick-service {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.quick-service:hover,
.quick-service:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.os-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #e9f2ff;
  color: var(--accent);
}
.os-badge.ok { background: #e5f3e8; color: #1f6b3a; }
.os-badge.wait { background: #fff4dc; color: #7a5800; }
.os-type-line { display: block; color: var(--muted); font-size: 0.75rem; }
.btn-send { background: #1f6b3a; color: #fff; }


/* Painel de O.S (tela inicial) */
.os-board { display: flex; flex-direction: column; gap: 14px; height: 100%; min-height: 0; padding: 4px 2px 40px; }
.os-board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.os-board-title { display: flex; align-items: center; gap: 12px; }
.os-board-logo { height: 46px; border-radius: 8px; background: #fff; padding: 3px; }
.os-board-head h2 { margin: 0; font-size: 1.35rem; }
.os-board-head p { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }
.os-board-new { background: var(--accent-2); color: #0a2547; font-weight: 800; font-size: 1rem; padding: 12px 22px; border-radius: 10px; }
.os-board-new:hover { filter: brightness(1.06); }
.os-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.os-metric { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.os-metric small { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.os-metric strong { font-size: 1.25rem; color: var(--ink); }
.os-columns { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(215px, 1fr); gap: 10px; overflow-x: auto; align-items: start; padding-bottom: 8px; scroll-snap-type: x proximity; }
.os-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; scroll-snap-align: start; min-height: 120px; }
.os-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 800; font-size: 0.85rem; color: var(--ink); }
.os-col-head i { font-style: normal; font-size: 0.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; color: var(--muted); }
.os-col[data-stage="aprovada"] .os-col-head { color: #1f6b3a; }
.os-col[data-stage="execucao"] .os-col-head { color: var(--accent); }
.os-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; font-size: 0.85rem; line-height: 1.35; }
.os-card:hover { border-color: var(--accent); }
.os-card-top { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.os-card-top b { font-size: 0.92rem; }
.os-card-num { color: var(--muted); font-size: 0.72rem; white-space: nowrap; }
.os-card .os-what { color: var(--muted); }
.os-card .os-value { display: block; margin-top: 4px; font-weight: 800; font-size: 1rem; color: var(--ink); }
.os-card .os-meta { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 3px; }
.os-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.os-card-actions button { flex: 1 1 auto; border: 1px solid var(--line); background: var(--surface); color: var(--accent); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.os-card-actions button.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.os-card-actions button.mini { flex: 0 0 auto; color: var(--muted); }
.os-empty { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; text-align: center; color: var(--muted); font-size: 0.8rem; }
.os-board-foot { margin: 0; color: var(--muted); font-size: 0.85rem; }
.os-board-foot a { color: var(--accent); font-weight: 700; cursor: pointer; }
.side-new-os { display: block; width: 100%; margin: 0 0 12px; padding: 12px; border: 0; border-radius: 10px; background: var(--accent-2); color: #0a2547; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; flex-shrink: 0; }
.side-new-os:hover { filter: brightness(1.06); }
.fab-new-os { display: none; }
@media (max-width: 980px) {
  .os-board { padding-top: 56px; }
  .os-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .os-columns { grid-auto-columns: 82%; }
  .os-board-new { display: none; }
  .fab-new-os { display: block; position: fixed; right: 16px; bottom: 44px; z-index: 40; border: 0; border-radius: 999px; padding: 14px 22px; background: var(--accent-2); color: #0a2547; font: inherit; font-weight: 800; box-shadow: 0 8px 20px rgba(8, 29, 58, 0.35); }
}


/* ===== Visual de piscina (Cia do Lazer) ===== */
:root {
  --page: #eef7fb;
  --surface-2: #e4f3fa;
  --line: #cfe3ee;
  --aqua: #00a6c8;
}
body {
  background-color: var(--page);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40' viewBox='0 0 120 40'%3E%3Cpath d='M0 20 Q15 8 30 20 T60 20 T90 20 T120 20' fill='none' stroke='%230a7ab5' stroke-opacity='.07' stroke-width='1.5'/%3E%3C/svg%3E");
  background-attachment: fixed;
}
.sidebar {
  background: linear-gradient(180deg, #082a52 0%, #0a4a8a 58%, #0b78ad 100%);
  overflow: hidden;
}
.sidebar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 80' preserveAspectRatio='none'%3E%3Cpath d='M0 40 Q50 10 100 40 T200 40 T300 40 T400 40 V80 H0Z' fill='%23ffffff' fill-opacity='.07'/%3E%3Cpath d='M0 55 Q50 30 100 55 T200 55 T300 55 T400 55 V80 H0Z' fill='%23ffffff' fill-opacity='.09'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 0;
}
.sidebar > * { position: relative; z-index: 1; }
.menu-group-toggle { border-left-color: var(--aqua); background: rgba(255, 255, 255, 0.09); }
.menu-item.active { box-shadow: inset 3px 0 0 var(--accent-2); }
.side-new-os { box-shadow: 0 6px 16px rgba(0, 20, 50, 0.3); }
.os-board-head {
  position: relative;
  overflow: hidden;
  padding: 16px 20px 26px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(120deg, #0a3f7a 0%, #0b6fb0 55%, #00a6c8 100%);
  box-shadow: 0 14px 30px rgba(0, 80, 140, 0.22);
}
.os-board-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 Q37 6 75 30 T150 30 T225 30 T300 30 T375 30 T450 30 T525 30 T600 30 V60 H0Z' fill='%23ffffff' fill-opacity='.10'/%3E%3Cpath d='M0 44 Q37 24 75 44 T150 44 T225 44 T300 44 T375 44 T450 44 T525 44 T600 44 V60 H0Z' fill='%23ffffff' fill-opacity='.14'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
  pointer-events: none;
}
.os-board-head > * { position: relative; z-index: 1; }
.os-board-head p { color: rgba(255, 255, 255, 0.85); }
.os-board-head h2 { color: #fff; }
.os-metric, .os-col, .os-card, .saved-products, .weather-card {
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(10, 74, 138, 0.08);
}
.os-card { border-radius: 12px; box-shadow: 0 3px 10px rgba(10, 74, 138, 0.07); }
.os-metric { border-top: 3px solid var(--aqua); }
.os-col { background: rgba(228, 243, 250, 0.75); }
.os-col[data-stage="aguardando"] .os-col-head { color: #7a5800; }
.login-screen { background: linear-gradient(160deg, #082a52 0%, #0b6fb0 60%, #00a6c8 100%); }
.mobile-menu-toggle { background: #0a3f7a; }

/* Ícones do menu lateral: maiores, brancos e com todas as formas riscadas (círculo/retângulo ficavam pretos) */
.menu-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.menu-icon svg { width: 20px; height: 20px; }
.menu-icon svg *,
.menu-icon path,
.menu-icon circle,
.menu-icon rect,
.menu-icon line,
.menu-icon polyline {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}
.menu-item .menu-icon { margin-right: 2px; }
.menu-item.menu-sub .menu-icon { width: 30px; height: 30px; border-radius: 9px; }
.menu-item.menu-sub .menu-icon svg { width: 18px; height: 18px; }
.menu-item { min-height: 44px; font-size: 0.98rem; color: #ffffff; }
.menu-item.menu-sub { min-height: 40px; font-size: 0.94rem; }
.menu-item.active .menu-icon,
.menu-item:hover .menu-icon { background: #ffffff; color: #0a4a8a; }
.menu-item.active { background: rgba(255, 255, 255, 0.16); }
.menu-group-toggle .menu-icon { background: transparent; color: #ffb020; width: 24px; height: 24px; }
.menu-group-toggle .menu-icon svg { width: 16px; height: 16px; }
.menu-group-toggle { min-height: 32px; font-size: 11px; color: #d7ecff; }


/* ===== Menu lateral fino (opção B) ===== */
.app-shell { grid-template-columns: 84px minmax(0, 1fr); }
.app-footer { left: 84px; }
.sidebar.rail { padding: 12px 8px; align-items: center; gap: 6px; overflow: visible; }
.sidebar.rail::after { border-radius: 0; }
.sidebar.rail .brand { margin: 0; padding: 0 0 10px; border: 0; justify-content: center; width: 100%; }
.sidebar.rail .brand-logo { width: 52px; height: 52px; border-radius: 12px; background: #fff; padding: 3px; object-fit: contain; }
.sidebar.rail .side-new-os { width: 52px; height: 52px; margin: 0 0 8px; padding: 0; border-radius: 14px; font-size: 1.9rem; line-height: 1; display: grid; place-items: center; }
.sidebar.rail .menu { width: 100%; align-items: center; gap: 4px; overflow: visible; flex: 0 0 auto; }
.sidebar.rail .menu-item { flex-direction: column; justify-content: center; gap: 3px; width: 68px; min-height: 62px; padding: 6px 2px; border-radius: 12px; font-size: 0.72rem; font-weight: 700; text-align: center; white-space: normal; line-height: 1.1; }
.sidebar.rail .menu-item .menu-icon { width: 34px; height: 30px; border-radius: 9px; background: transparent; margin: 0; color: #fff; }
.sidebar.rail .menu-item .menu-icon svg { width: 24px; height: 24px; }
.sidebar.rail .menu-item:hover { background: rgba(255, 255, 255, 0.12); }
.sidebar.rail .menu-item.active,
.sidebar.rail .menu-item.rail-more.on { background: rgba(255, 255, 255, 0.22); box-shadow: inset 0 -3px 0 var(--accent-2); }
.sidebar.rail .menu-item.active .menu-icon,
.sidebar.rail .menu-item:hover .menu-icon { background: transparent; color: #fff; }
.rail-user { margin-top: auto; width: 48px; height: 48px; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 50%; background: rgba(255, 255, 255, 0.2); color: #fff; font: inherit; font-weight: 800; font-size: 1.1rem; cursor: pointer; flex-shrink: 0; }
.rail-user:hover { background: rgba(255, 255, 255, 0.32); }
.sidebar.rail .rail-pop { display: none; position: fixed; left: 92px; z-index: 200; width: 250px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: 0 18px 44px rgba(8, 29, 58, 0.3); }
.sidebar.rail .rail-pop.open { display: block; }
#railMorePop { top: 120px; }
#railUserPop { bottom: 16px; width: 230px; display: none; }
#railUserPop.open { display: grid; gap: 8px; padding: 12px; }
#railUserPop span { color: var(--ink); font-weight: 800; }
.rail-pop-title { margin: 6px 8px 2px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sidebar.rail .rail-pop .menu-item { flex-direction: row; justify-content: flex-start; gap: 12px; width: 100%; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--ink); font-size: 0.95rem; font-weight: 600; text-align: left; }
.sidebar.rail .rail-pop .menu-item .menu-icon { width: 32px; height: 32px; background: var(--surface-2); color: var(--accent); }
.sidebar.rail .rail-pop .menu-item .menu-icon svg { width: 20px; height: 20px; }
.sidebar.rail .rail-pop .menu-item:hover { background: var(--surface-2); }
.sidebar.rail .rail-pop .menu-item.active { background: #dcebf8; box-shadow: none; }
.sidebar.rail .rail-pop .menu-item.active .menu-icon,
.sidebar.rail .rail-pop .menu-item:hover .menu-icon { background: var(--accent); color: #fff; }
.rail-logout { color: var(--danger); }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-footer { left: 0; bottom: 64px; }
  .mobile-menu-toggle, .mobile-menu-backdrop, .app-shell.mobile-menu-open .mobile-menu-backdrop { display: none !important; }
  .sidebar.rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: 64px; max-height: none; flex-direction: row; justify-content: space-around; align-items: center; padding: 4px 6px; transform: none; z-index: 70; overflow: visible; }
  .sidebar.rail::after { display: none; }
  .sidebar.rail .brand, .sidebar.rail .side-new-os { display: none; }
  .sidebar.rail .menu { flex-direction: row; width: auto; flex: 1 1 auto; justify-content: space-around; }
  .sidebar.rail .menu-item { width: auto; flex: 1 1 0; min-width: 0; min-height: 54px; font-size: 0.66rem; }
  .sidebar.rail .menu-item .menu-icon svg { width: 22px; height: 22px; }
  .sidebar.rail .menu-item[data-screen="sales"] { display: none; }
  .rail-user { margin: 0; width: 40px; height: 40px; font-size: 0.95rem; }
  .sidebar.rail .rail-pop { left: 12px; right: 12px; width: auto; bottom: 74px; top: auto; max-height: 70vh; overflow-y: auto; }
  #railMorePop { top: auto; }
  #railUserPop { bottom: 74px; width: auto; }
  .workspace { padding-top: 18px; padding-bottom: 130px; }
  .os-board { padding-top: 4px; }
  .fab-new-os { bottom: 140px; }
}

.rail-sales-mobile { display: none !important; }
@media (max-width: 980px) {
  .sidebar.rail .rail-pop .rail-sales-mobile.menu-item { display: flex !important; }
  .sidebar.rail .rail-pop p.rail-sales-mobile { display: none !important; }
}


/* O.S: condições marcáveis e seleção múltipla de serviços */
.os-flags { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 12px 0 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }
.os-flags legend { padding: 0 8px; font-weight: 800; font-size: 0.85rem; color: var(--muted); }
.os-flag { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: 0.9rem; user-select: none; }
.os-flag input { width: 18px; height: 18px; flex: 0 0 auto; }
.os-flag:has(input:checked) { background: #e1eefb; border-color: var(--accent); font-weight: 700; }
.os-flag.urgent:has(input:checked) { background: #fde7df; border-color: #c84f3c; color: #7a2e24; }
.os-multi { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 12px; background: var(--surface); }
.os-multi summary { cursor: pointer; padding: 10px 14px; font-weight: 800; color: var(--accent); }
.os-multi-list { display: grid; gap: 6px; padding: 0 12px 8px; }
.os-multi-row { display: grid; grid-template-columns: 1fr 64px 120px; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; }
.os-multi-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9rem; }
.os-multi-row label input { width: 18px; height: 18px; }
.os-multi-row small { color: var(--muted); }
.os-multi-row input.os-multi-qty, .os-multi-row input.os-multi-val { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.os-multi-row:has(input[type="checkbox"]:checked) { background: #e1eefb; border-color: var(--accent); }
.os-multi-row input.os-multi-qty:disabled, .os-multi-row input.os-multi-val:disabled { opacity: 0.45; }
.os-multi-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px 12px; color: var(--muted); font-size: 0.85rem; }
.os-badge.urgent { background: #fde7df; color: #7a2e24; }
.os-card.is-urgent { border-left: 4px solid #c84f3c; }
@media (max-width: 620px) { .os-multi-row { grid-template-columns: 1fr 52px 96px; } }


/* Lista editável de serviços e condições */
.quick-edit { border: 1px dashed var(--accent); background: transparent; color: var(--accent); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.quick-edit:hover { background: var(--surface-2); }
.os-flags-edit { grid-column: 1 / -1; text-align: right; }
.os-catalog-body { max-height: 62vh; overflow-y: auto; }
.os-cat-head, .os-cat-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 120px 112px; gap: 8px; align-items: center; }
.os-cat-head { font-size: 0.75rem; font-weight: 800; color: var(--muted); padding: 0 2px 4px; }
.os-cat-row { margin-bottom: 6px; }
.os-cat-row input, .os-cat-row select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); }
.os-cat-row .os-cat-actions { display: flex; gap: 4px; justify-content: flex-end; }
.os-cat-row .os-cat-actions button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; width: 32px; height: 34px; cursor: pointer; font-weight: 800; color: var(--accent); }
.os-cat-row .os-cat-actions button.del { color: var(--danger); }
.os-cat-flag-row { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; align-items: center; margin-bottom: 6px; }
.os-cat-flag-row input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); }
.os-cat-flag-row .os-cat-actions { display: flex; gap: 4px; justify-content: flex-end; }
.os-cat-flag-row .os-cat-actions button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; width: 32px; height: 34px; cursor: pointer; font-weight: 800; color: var(--accent); }
.os-cat-flag-row .os-cat-actions button.del { color: var(--danger); }
@media (max-width: 720px) {
  .os-cat-head { display: none; }
  .os-cat-row { grid-template-columns: 1fr 1fr; }
  .os-cat-row input[data-f="name"] { grid-column: 1 / -1; }
  .os-cat-row .os-cat-actions { grid-column: 1 / -1; }
}


/* Agenda */
.agenda-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.agenda-nav { display: flex; align-items: center; gap: 8px; }
.agenda-nav h2 { margin: 0 8px; font-size: 1.35rem; min-width: 190px; text-align: center; text-transform: capitalize; }
.agenda-nav .ghost-button { min-width: 42px; }
.agenda-legend { display: flex; gap: 14px; font-size: 0.82rem; color: var(--muted); flex-wrap: wrap; }
.agenda-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.lg-scheduled { background: var(--accent); }
.lg-planned { background: #fff4dc; border: 2px solid #e2ad3c; }
.lg-done { background: #dcefe1; border: 1px solid #9ccaa8; }
.agenda-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
.agenda-cal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 8px 22px rgba(10, 74, 138, 0.08); }
.agenda-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #0a3f7a; color: #fff; font-size: 0.78rem; font-weight: 800; text-align: center; }
.agenda-weekdays span { padding: 9px 0; }
.agenda-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.agenda-day { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; cursor: pointer; overflow: hidden; background: var(--surface); position: relative; }
.agenda-day:nth-child(7n) { border-right: 0; }
.agenda-day:hover { background: #f1f8fd; }
.agenda-day.other { background: #f6fafd; color: var(--muted); }
.agenda-day.selected { outline: 2px solid var(--accent); outline-offset: -2px; background: #e9f3fc; }
.agenda-day .num { font-size: 0.82rem; font-weight: 800; display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; }
.agenda-day.today .num { background: var(--accent-2); color: #0a2547; }
.agenda-ev { display: block; width: 100%; text-align: left; border: 0; margin-top: 3px; padding: 3px 6px; border-radius: 6px; font: inherit; font-size: 0.72rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.agenda-ev.scheduled { background: var(--accent); color: #fff; }
.agenda-ev.planned { background: #fff4dc; color: #7a5800; border: 1px solid #e2ad3c; }
.agenda-ev.done { background: #dcefe1; color: #1f6b3a; }
.agenda-ev.urgent { box-shadow: inset 3px 0 0 #c84f3c; }
.agenda-more { font-size: 0.7rem; color: var(--muted); padding: 2px 6px; }
.agenda-side { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: 0 8px 22px rgba(10, 74, 138, 0.08); position: sticky; top: 0; }
.agenda-side h3 { margin: 0 0 2px; font-size: 1.05rem; text-transform: capitalize; }
.agenda-side .sub { color: var(--muted); font-size: 0.82rem; margin-bottom: 10px; }
.agenda-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; font-size: 0.86rem; background: var(--surface); }
.agenda-item.scheduled { border-left: 4px solid var(--accent); }
.agenda-item.planned { border-left: 4px solid #e2ad3c; }
.agenda-item.done { border-left: 4px solid #4c9b62; }
.agenda-item b { display: block; font-size: 0.95rem; }
.agenda-item .meta { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.agenda-item .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.agenda-item .actions button { flex: 1 1 auto; border: 1px solid var(--line); background: var(--surface); color: var(--accent); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.agenda-item .actions button.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.agenda-pending h4 { margin: 14px 0 6px; font-size: 0.9rem; }
.agenda-empty { color: var(--muted); font-size: 0.85rem; padding: 6px 0; }
@media (max-width: 980px) {
  .agenda-layout { grid-template-columns: 1fr; }
  .agenda-side { position: static; }
  .agenda-day { min-height: 64px; padding: 2px; }
  .agenda-ev { font-size: 0; padding: 0; height: 6px; border-radius: 3px; margin-top: 2px; }
  .agenda-ev.planned { border-width: 1px; }
  .agenda-nav h2 { min-width: 0; font-size: 1.1rem; }
}

@media (max-width: 980px) {
  .sidebar.rail .menu-item[data-screen="products"] { display: none; }
}
.agenda-side h3 { text-transform: none; }
.agenda-side h3::first-letter { text-transform: uppercase; }
@media (max-width: 980px) { .agenda-nav h2 { font-size: 1rem; white-space: nowrap; margin: 0 2px; } .agenda-nav { gap: 4px; } }


/* ===== Tela de Custos redesenhada ===== */
.costs-wrap { display: flex; flex-direction: column; gap: 14px; }
.costs-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #0a3f7a 0%, #0b6fb0 55%, #00a6c8 100%); box-shadow: 0 14px 30px rgba(0, 80, 140, 0.2); }
.costs-banner h2 { margin: 0; color: #fff; font-size: 1.35rem; }
.costs-banner p { margin: 2px 0 0; color: rgba(255, 255, 255, 0.85); font-size: 0.9rem; }
.costs-month { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.16); padding: 5px 8px; border-radius: 12px; }
.costs-month strong { min-width: 150px; text-align: center; text-transform: capitalize; }
.costs-month button { border: 0; border-radius: 9px; background: rgba(255, 255, 255, 0.22); color: #fff; font: inherit; font-weight: 800; min-width: 34px; height: 34px; cursor: pointer; }
.costs-month button:hover { background: rgba(255, 255, 255, 0.36); }
.costs-month .costs-all { padding: 0 12px; font-size: 0.8rem; }
.cost-quick { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: 0 8px 22px rgba(10, 74, 138, 0.08); }
.cost-quick-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cost-quick-head span { color: var(--muted); font-size: 0.85rem; }
.cost-quick-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cq-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: transform 0.12s ease, background 0.12s ease; }
.cq-chip:hover { background: var(--surface-2); transform: translateY(-1px); }
.cq-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cost-quick-row { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(110px, 1fr) minmax(140px, 1fr) minmax(100px, 0.8fr) auto auto auto; gap: 10px; align-items: end; }
.cost-quick-row label { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.cost-quick-row input:not([type="checkbox"]), .cost-quick-row select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 0.95rem; background: var(--surface); color: var(--ink); }
.cost-quick-row .cq-toggle { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 10px; font-size: 0.85rem; color: var(--ink); cursor: pointer; white-space: nowrap; }
.cost-quick-row .cq-toggle input { width: 18px; height: 18px; }
.cost-quick-row .cq-other { grid-column: span 1; }
.cq-actions { display: flex; gap: 8px; }
.cq-actions .primary-button { min-width: 96px; font-weight: 800; }
.cq-hint { margin: 8px 0 0; min-height: 1.1em; font-size: 0.85rem; color: var(--muted); }
.cq-hint.ok { color: #1f6b3a; font-weight: 700; }
.costs-alerts { display: flex; flex-wrap: wrap; gap: 8px; }
.cost-alert { border: 0; border-radius: 12px; padding: 9px 14px; font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer; }
.cost-alert.bad { background: #fde7df; color: #7a2e24; }
.cost-alert.warn { background: #fff4dc; color: #7a5800; }
.cost-alert.ok { background: #e5f3e8; color: #1f6b3a; cursor: default; }
.costs-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cost-metric { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 14px; padding: 12px 14px; box-shadow: 0 6px 16px rgba(10, 74, 138, 0.06); }
.cost-metric small { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.cost-metric strong { display: block; font-size: 1.3rem; margin-top: 2px; color: var(--ink); }
.cost-metric span { color: var(--muted); font-size: 0.78rem; }
.cost-metric.pending { border-top-color: #e2ad3c; }
.cost-metric.overdue { border-top-color: #c84f3c; }
.cost-metric.overdue strong { color: #a13f32; }
.cost-metric.paid { border-top-color: #4c9b62; }
.cost-progress { height: 8px; background: #dbe8f3; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.cost-progress i { display: block; height: 100%; background: linear-gradient(90deg, #4c9b62, #7cc48f); border-radius: 99px; transition: width 0.6s ease; }
.costs-chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: 0 6px 16px rgba(10, 74, 138, 0.06); }
.costs-chart-card h3 { margin: 0 0 10px; font-size: 1rem; }
.cost-bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 110px; gap: 10px; align-items: center; margin-bottom: 7px; font-size: 0.86rem; }
.cost-bar-track { height: 14px; background: #eaf2f9; border-radius: 99px; overflow: hidden; }
.cost-bar-track i { display: block; height: 100%; border-radius: 99px; transition: width 0.6s ease; }
.cost-bar-row b { text-align: right; }
.costs-filters { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.costs-filters summary { cursor: pointer; padding: 10px 14px; font-weight: 800; color: var(--accent); }
.costs-filters .filters-grid { padding: 0 14px 12px; }
.costs-table th.num, .costs-table td.num { text-align: right; white-space: nowrap; }
.costs-table td { vertical-align: middle; }
.cost-section td { background: #e4f0f9; font-weight: 800; font-size: 0.82rem; color: var(--ink); padding: 8px 12px; letter-spacing: 0.02em; }
.cost-section.overdue td { background: #fde7df; color: #7a2e24; }
.cost-section.paid td { background: #e5f3e8; color: #1f6b3a; }
.cost-cat { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.cost-cat i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.cost-sub { display: block; color: var(--muted); font-size: 0.76rem; font-weight: 400; }
.cost-due { font-weight: 700; white-space: nowrap; }
.cost-due small { display: block; font-weight: 400; color: var(--muted); font-size: 0.74rem; }
.cost-due.late { color: #a13f32; }
.cost-due.soon { color: #7a5800; }
.cost-tag { display: inline-block; font-size: 0.68rem; padding: 1px 7px; border-radius: 99px; background: #e9f2ff; color: var(--accent); margin-left: 6px; font-weight: 700; }
.costs-table .row-actions .baixa-cost { background: #1f6b3a; border-color: #1f6b3a; color: #fff; font-weight: 800; }
@media (max-width: 1100px) {
  .cost-quick-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-quick-row .cq-desc { grid-column: 1 / -1; }
  .cq-actions { grid-column: 1 / -1; }
  .cq-actions .primary-button { flex: 1; }
  .costs-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .cost-bar-row { grid-template-columns: 96px minmax(0, 1fr) 84px; font-size: 0.8rem; }
  .costs-month strong { min-width: 110px; }
  .cq-chip { padding: 6px 10px; font-size: 0.82rem; }
}


/* ===== Barra de aplicativos embaixo (opção D) ===== */
:root { --dock-h: 86px; }
.app-shell { grid-template-columns: 1fr; }
.sidebar.dock { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%; height: var(--dock-h); max-height: none; display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 6px 14px; overflow: visible; z-index: 24; transform: none; background: linear-gradient(90deg, #082a52 0%, #0a4a8a 55%, #0b78ad 100%); box-shadow: 0 -8px 24px rgba(8, 29, 58, 0.28); }
.sidebar.dock::after { display: none; }
.sidebar.dock .brand { margin: 0; padding: 0; border: 0; width: auto; flex: 0 0 auto; }
.sidebar.dock .brand-logo { width: 50px; height: 50px; border-radius: 12px; background: #fff; padding: 3px; object-fit: contain; }
.sidebar.dock .side-new-os { width: 74px; height: 66px; margin: 0; padding: 4px 2px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; flex: 0 0 auto; line-height: 1; }
.sidebar.dock .side-new-os .plus { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.sidebar.dock .side-new-os .lbl { font-size: 0.68rem; font-weight: 800; }
.sidebar.dock .menu { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: row; align-items: center; gap: 4px; overflow-x: auto; overflow-y: hidden; padding: 4px 0; scrollbar-width: none; justify-content: center; }
.sidebar.dock .menu::-webkit-scrollbar { display: none; }
.dock-group { display: flex; gap: 2px; padding: 0 8px; border-left: 1px solid rgba(255, 255, 255, 0.28); flex: 0 0 auto; }
.dock-group:first-child { border-left: 0; }
.dock-group.g1 { --chip: #3f8fe0; }
.dock-group.g2 { --chip: #12a3a8; }
.dock-group.g3 { --chip: #d99a1e; }
.dock-group.g4 { --chip: #4c9b62; }
.sidebar.dock .menu-item { flex-direction: column; justify-content: flex-start; gap: 4px; width: 70px; min-height: 66px; padding: 4px 2px; border-radius: 12px; background: transparent; box-shadow: none; font-size: 0.72rem; font-weight: 700; color: #fff; text-align: center; white-space: nowrap; line-height: 1.1; transition: transform 0.12s ease, background 0.12s ease; flex: 0 0 auto; }
.sidebar.dock .menu-item .menu-icon { width: 42px; height: 42px; margin: 0; border-radius: 12px; background: var(--chip); color: #fff; box-shadow: 0 3px 8px rgba(0, 20, 50, 0.3); }
.sidebar.dock .menu-item .menu-icon svg { width: 24px; height: 24px; }
.sidebar.dock .menu-item:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.sidebar.dock .menu-item:hover .menu-icon,
.sidebar.dock .menu-item.active .menu-icon { background: var(--chip); color: #fff; }
.sidebar.dock .menu-item.active { background: rgba(255, 255, 255, 0.2); box-shadow: inset 0 -3px 0 var(--accent-2); }
.sidebar.dock .menu-item.active .menu-icon { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.sidebar.dock .rail-user { margin: 0; flex: 0 0 auto; }
.sidebar.dock .rail-pop { display: none; position: fixed; right: 14px; left: auto; top: auto; bottom: calc(var(--dock-h) + 10px); z-index: 26; width: 230px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: 0 18px 44px rgba(8, 29, 58, 0.3); }
.sidebar.dock .rail-pop.open { display: grid; gap: 8px; }
.sidebar.dock .rail-pop span { color: var(--ink); font-weight: 800; }
.app-footer { left: 0; bottom: var(--dock-h); }
.workspace { padding-bottom: calc(var(--dock-h) + 52px); }
.fab-new-os { display: none !important; }
.mobile-menu-toggle, .mobile-menu-backdrop, .app-shell.mobile-menu-open .mobile-menu-backdrop { display: none !important; }
@media (max-width: 980px) {
  .sidebar.dock { position: fixed; top: auto; left: 0; right: 0; width: 100%; height: var(--dock-h); padding: 6px 8px; gap: 6px; transform: none; box-shadow: 0 -8px 24px rgba(8, 29, 58, 0.28); }
  .app-shell.mobile-menu-open .sidebar.dock { transform: none; }
  .sidebar.dock .brand { display: none; }
  .sidebar.dock .side-new-os { width: 62px; }
  .sidebar.dock .menu { justify-content: flex-start; scroll-snap-type: x proximity; }
  .sidebar.dock .menu-item { width: 64px; scroll-snap-align: center; }
  .app-footer { left: 0; bottom: var(--dock-h); }
  .workspace { padding-top: 18px; padding-bottom: calc(var(--dock-h) + 52px); }
  .os-board { padding-top: 4px; }
}


/* ===== Dock flutuante estilo macOS (computador) ===== */
.dock-tip { position: fixed; z-index: 27; pointer-events: none; background: rgba(16, 32, 60, 0.92); color: #fff; font-size: 0.8rem; font-weight: 700; padding: 5px 11px; border-radius: 9px; opacity: 0; transition: opacity 0.12s ease; white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 20, 50, 0.3); }
.dock-tip.on { opacity: 1; }
@media (min-width: 981px) {
  .app-footer { left: 0; bottom: 0; }
  .workspace { padding-bottom: 150px; }
  .sidebar.dock { left: 0; right: 0; margin: 0 auto; width: max-content; max-width: calc(100% - 24px); height: auto; bottom: 44px; padding: 10px 18px 16px; border-radius: 28px; gap: 8px; align-items: flex-end; overflow: visible; background: rgba(255, 255, 255, 0.5); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); border: 1px solid rgba(255, 255, 255, 0.9); box-shadow: 0 16px 44px rgba(10, 74, 138, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.95); z-index: 24; transition: padding 0.12s ease; }
  .sidebar.dock .brand { display: none; }
  .sidebar.dock .menu { display: flex; flex: 0 0 auto; overflow: visible; padding: 0; gap: 8px; justify-content: flex-start; align-items: flex-end; }
  .dock-group { display: flex; gap: 6px; padding: 0 10px; border-left: 1px solid rgba(10, 74, 138, 0.2); align-items: flex-end; }
  .dock-group:first-child { padding-left: 0; border-left: 0; }
  .sidebar.dock .menu-item,
  .sidebar.dock .side-new-os,
  .sidebar.dock .rail-user { position: relative; flex: 0 0 auto; width: 54px; min-height: 0; height: 54px; padding: 0; margin: 0; border: 0; border-radius: 15px; background: transparent; box-shadow: none; font-size: 0; color: transparent; display: flex; align-items: center; justify-content: center; transform-origin: 50% 100%; transition: transform 0.12s cubic-bezier(0.2, 0.8, 0.2, 1); will-change: transform; }
  .sidebar.dock .menu-item:hover { transform: none; background: transparent; }
  .sidebar.dock .menu-item.active { background: transparent; box-shadow: none; --lit: 1; }
  .sidebar.dock .menu-item .menu-icon { width: 54px; height: 54px; margin: 0; border-radius: 15px; background: linear-gradient(160deg, color-mix(in srgb, var(--chip) 62%, #fff) 0%, var(--chip) 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(0, 0, 0, 0.1), 0 5px 12px rgba(0, 30, 70, 0.28); color: #fff; outline: 0; filter: saturate(calc(0.55 + 0.45 * var(--lit, 0))) brightness(calc(1.18 - 0.18 * var(--lit, 0))); opacity: calc(0.82 + 0.18 * var(--lit, 0)); transition: filter 0.15s ease, opacity 0.15s ease; }
  .sidebar.dock .menu-item.active .menu-icon { outline: 0; filter: none; opacity: 1; }
  .sidebar.dock .menu-item .menu-icon svg { width: 28px; height: 28px; }
  .sidebar.dock .menu-item.active::after { content: ""; position: absolute; left: 50%; bottom: -10px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #0a4a8a; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7); }
  .sidebar.dock .side-new-os { background: linear-gradient(160deg, #ffd27a, #ffb020); color: #0a2547; font-size: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 5px 12px rgba(160, 100, 0, 0.35); margin-right: 4px; }
  .sidebar.dock .side-new-os .plus { font-size: 2rem; line-height: 1; font-weight: 800; color: #0a2547; }
  .sidebar.dock .side-new-os .lbl { display: none; }
  .sidebar.dock .rail-user { margin-left: 4px; border-radius: 50%; border: 0; background: linear-gradient(160deg, #6fb2ea, #0a4a8a); color: #fff; font-size: 1.15rem; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 5px 12px rgba(0, 30, 70, 0.3); }
  .sidebar.dock .rail-user span { color: #fff; font-size: 1.15rem; }
  .sidebar.dock .rail-pop { z-index: 27; }
}

.rail-pop-user { display: none; position: fixed; right: 14px; bottom: 120px; z-index: 27; width: 230px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: 0 18px 44px rgba(8, 29, 58, 0.3); }
.rail-pop-user.open { display: grid; gap: 8px; }
.rail-pop-user span { color: var(--ink); font-weight: 800; }


/* ===== Dock: cores vivas, etiquetas sempre visíveis ===== */
.menu-item[data-screen="home"] { --c1: #4f9bff; --c2: #1c56e0; }
.menu-item[data-screen="quotes"] { --c1: #ffa54d; --c2: #ec5b0a; }
.menu-item[data-screen="agenda"] { --c1: #ff6f83; --c2: #dc2b4c; }
.menu-item[data-screen="clients"] { --c1: #9a86ff; --c2: #5b3fe0; }
.menu-item[data-screen="products"] { --c1: #35d08a; --c2: #0e9a5b; }
.menu-item[data-screen="sales"] { --c1: #2fd6c4; --c2: #0a9a8c; }
.menu-item[data-screen="stock"] { --c1: #d99a5c; --c2: #a8621f; }
.menu-item[data-screen="inventory"] { --c1: #a7d84c; --c2: #63a318; }
.menu-item[data-screen="purchase-quotes"] { --c1: #ff7cc0; --c2: #dc2f8e; }
.menu-item[data-screen="entries"] { --c1: #4cc3ff; --c2: #0d84d6; }
.menu-item[data-screen="suppliers"] { --c1: #7d8dff; --c2: #3f4ee0; }
.menu-item[data-screen="costs"] { --c1: #ffd84a; --c2: #e5a800; }
.menu-item[data-screen="reports"] { --c1: #d267ff; --c2: #9a2ee0; }
.sidebar.dock .menu-item .menu-icon { background: linear-gradient(160deg, var(--c1, #4f9bff), var(--c2, #1c56e0)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 4px 10px rgba(0, 30, 70, 0.3); }
.sidebar.dock .menu-icon .fs { fill: currentColor; fill-opacity: 0.32; }
.dock-tip { display: none !important; }
@media (min-width: 981px) {
  .sidebar.dock .menu-item,
  .sidebar.dock .side-new-os,
  .sidebar.dock .rail-user { width: 60px; height: 74px; flex-direction: column; justify-content: flex-start; gap: 4px; font-size: 0.66rem; font-weight: 800; color: #0a2a52; line-height: 1; white-space: nowrap; }
  .sidebar.dock .menu-item .menu-icon { width: 50px; height: 50px; border-radius: 15px; filter: saturate(calc(0.88 + 0.12 * var(--lit, 0))) brightness(calc(1.06 - 0.06 * var(--lit, 0))); opacity: calc(0.93 + 0.07 * var(--lit, 0)); }
  .sidebar.dock .menu-item .menu-icon svg { width: 27px; height: 27px; }
  .sidebar.dock .menu-item.active .menu-icon { filter: none; opacity: 1; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 14px rgba(0, 30, 70, 0.4); }
  .sidebar.dock .menu-item.active { color: #0a4a8a; }
  .sidebar.dock .menu-item.active::after { bottom: -11px; }
  .sidebar.dock .side-new-os { background: transparent; box-shadow: none; margin-right: 6px; }
  .sidebar.dock .side-new-os .plus { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: linear-gradient(160deg, #ffd66a, #ff9f0a); color: #0a2547; font-size: 2rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 5px 12px rgba(160, 100, 0, 0.35); }
  .sidebar.dock .side-new-os .lbl { display: block; font-size: 0.66rem; font-weight: 800; color: #0a2a52; }
  .sidebar.dock .rail-user { background: transparent; box-shadow: none; border-radius: 0; margin-left: 6px; }
  .sidebar.dock .rail-user .ru-chip { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(160deg, #6fb2ea, #0a4a8a); color: #fff; font-size: 1.2rem; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 5px 12px rgba(0, 30, 70, 0.3); }
  .sidebar.dock .rail-user .ru-lbl { font-size: 0.66rem; font-weight: 800; color: #0a2a52; }
  .sidebar.dock { padding: 10px 18px 18px; bottom: 40px; }
  .workspace { padding-bottom: 170px; }
}
@media (min-width: 981px) and (max-width: 1150px) {
  .sidebar.dock .menu-item, .sidebar.dock .side-new-os, .sidebar.dock .rail-user { width: 52px; }
  .sidebar.dock .menu-item .menu-icon, .sidebar.dock .side-new-os .plus, .sidebar.dock .rail-user .ru-chip { width: 44px; height: 44px; }
  .sidebar.dock .menu-item .menu-icon svg { width: 24px; height: 24px; }
  .dock-group { padding: 0 6px; }
}
@media (max-width: 980px) {
  .sidebar.dock .menu-item .menu-icon { width: 40px; height: 40px; }
  .sidebar.dock .menu-item { min-height: 62px; }
  .sidebar.dock .rail-user .ru-chip { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(160deg, #6fb2ea, #0a4a8a); color: #fff; font-weight: 800; }
  .sidebar.dock .rail-user .ru-lbl { display: none; }
  .sidebar.dock .rail-user { background: transparent; border: 0; box-shadow: none; }
}


/* ===== Dashboard da empresa ===== */
.os-board-head.plain { background: transparent; box-shadow: none; padding: 4px 2px; color: var(--ink); overflow: visible; }
.os-board-head.plain::after { display: none; }
.os-board-head.plain h2 { color: var(--ink); }
.os-board-head.plain p { color: var(--muted); }
#osMetrics { display: none; }
.dash { display: flex; flex-direction: column; gap: 14px; margin-bottom: 26px; }
.dash-hero-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-month { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.16); padding: 5px 8px; border-radius: 12px; }
.dash-month strong { min-width: 130px; text-align: center; text-transform: capitalize; color: #fff; }
.dash-month button { border: 0; border-radius: 9px; background: rgba(255, 255, 255, 0.22); color: #fff; font: inherit; font-weight: 800; min-width: 32px; height: 32px; cursor: pointer; }
.dash-month button:hover { background: rgba(255, 255, 255, 0.36); }
.dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { position: relative; display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: 0 8px 22px rgba(10, 74, 138, 0.08); overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(10, 74, 138, 0.16); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--kc, var(--accent)); }
.kpi-ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: color-mix(in srgb, var(--kc, var(--accent)) 16%, #fff); }
.kpi-body { min-width: 0; flex: 1; }
.kpi-body small { display: block; color: var(--muted); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.02em; }
.kpi-body strong { display: block; font-size: 1.32rem; color: var(--ink); line-height: 1.2; white-space: nowrap; }
.kpi-sub { display: block; font-size: 0.76rem; color: var(--muted); margin-top: 1px; }
.kpi-delta { display: inline-block; font-weight: 800; padding: 0 6px; border-radius: 99px; font-size: 0.72rem; margin-right: 4px; }
.kpi-delta.up { background: #e5f3e8; color: #1f6b3a; }
.kpi-delta.down { background: #fde7df; color: #7a2e24; }
.kpi-spark { flex: 0 0 76px; height: 30px; }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dash-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: 0 8px 22px rgba(10, 74, 138, 0.08); min-width: 0; }
.dash-card.span2 { grid-column: span 2; }
.dash-card h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dash-card h3 .dc-link { border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 0.8rem; font-weight: 800; cursor: pointer; padding: 2px 4px; }
.dash-card h3 .dc-link:hover { text-decoration: underline; }
.dash-card .dc-sub { color: var(--muted); font-size: 0.8rem; margin: 2px 0 10px; }
.dc-empty { color: var(--muted); font-size: 0.86rem; padding: 14px 0; text-align: center; }
.dc-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); margin: 4px 0 6px; }
.dc-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.dc-chart { width: 100%; height: auto; display: block; }
.dc-chart text { font-family: inherit; }
.dc-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.dc-row:last-child { border-bottom: 0; }
.dc-row b { font-weight: 800; }
.dc-row small { color: var(--muted); font-size: 0.76rem; grid-column: 1 / -1; }
.dc-pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 0.7rem; font-weight: 800; background: #e9f2ff; color: var(--accent); }
.dc-pill.bad { background: #fde7df; color: #7a2e24; }
.dc-pill.warn { background: #fff4dc; color: #7a5800; }
.dc-pill.ok { background: #e5f3e8; color: #1f6b3a; }
.dc-day { display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
.dc-day:last-child { border-bottom: 0; }
.dc-date { text-align: center; border-radius: 12px; background: #e9f2ff; color: var(--accent); padding: 4px 0; line-height: 1.1; }
.dc-date b { display: block; font-size: 1.15rem; }
.dc-date small { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; }
.dc-date.today { background: var(--accent-2); color: #0a2547; }
.dc-bar { height: 9px; border-radius: 99px; background: #e4eef7; overflow: hidden; }
.dc-bar i { display: block; height: 100%; border-radius: 99px; transition: width 0.6s ease; }
.dc-funnel-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 84px; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 0.82rem; }
.dc-funnel-row b { text-align: right; font-size: 0.8rem; }
.dc-donut-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dc-donut-legend { flex: 1; min-width: 130px; font-size: 0.8rem; }
.dc-donut-legend div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.dc-donut-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
@media (max-width: 1250px) { .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-card.span2 { grid-column: span 2; } }
@media (max-width: 720px) { .dash-kpis, .dash-grid { grid-template-columns: 1fr; } .dash-card.span2 { grid-column: auto; } .kpi-spark { display: none; } .dash-month strong { min-width: 100px; } }

.dc-chart { max-height: 270px; }
.dash-month strong, .costs-month strong { text-transform: none; }
.dash-month strong::first-letter, .costs-month strong::first-letter { text-transform: uppercase; }

.os-card-actions button.del { color: var(--danger); border-color: #f1c7c0; }
.os-card-actions button.del:hover { background: #fde7df; }


/* ===== Cabeçalho das telas com vida ===== */
.topbar { position: relative; overflow: hidden; align-items: center; padding: 16px 22px 28px; margin-bottom: 18px; border-radius: 20px; color: #fff; background: linear-gradient(120deg, #0a3f7a 0%, #0b6fb0 55%, #00a6c8 100%); box-shadow: 0 14px 30px rgba(0, 80, 140, 0.22); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 44px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 Q37 6 75 30 T150 30 T225 30 T300 30 T375 30 T450 30 T525 30 T600 30 V60 H0Z' fill='%23ffffff' fill-opacity='.10'/%3E%3Cpath d='M0 44 Q37 24 75 44 T150 44 T225 44 T300 44 T375 44 T450 44 T525 44 T600 44 V60 H0Z' fill='%23ffffff' fill-opacity='.14'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat; pointer-events: none; }
.topbar > * { position: relative; z-index: 1; }
.topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.topbar-ic { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center; font-size: 1.8rem; background: linear-gradient(160deg, var(--tc1, #4f9bff), var(--tc2, #1c56e0)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 8px 18px rgba(0, 20, 50, 0.35); }
.topbar h1 { color: #fff; margin: 0; font-size: 1.75rem; }
.topbar p, .topbar .hint { color: rgba(255, 255, 255, 0.86); margin: 2px 0 0; }
.topbar .primary-button { background: linear-gradient(160deg, #ffd66a, #ffb020); color: #0a2547; border: 0; font-weight: 800; box-shadow: 0 6px 14px rgba(120, 70, 0, 0.3); }
.topbar .primary-button:hover { filter: brightness(1.05); }
.topbar .notif-bell { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.topbar .notif-bell svg, .topbar .notif-bell path { stroke: #fff; }
.topbar .notif-bell:hover { background: rgba(255, 255, 255, 0.3); }
@media (max-width: 720px) { .topbar { padding: 14px 14px 26px; } .topbar-ic { width: 46px; height: 46px; font-size: 1.4rem; border-radius: 14px; } .topbar h1 { font-size: 1.35rem; } }

.menu-item[data-screen="clima"] { --c1: #43dcf2; --c2: #0a8fb8; }
#climaScreen .weather-card { display: block; }


/* ===== Dock nítido: só o ícone cresce; o texto fica parado, sem distorcer ===== */
@media (min-width: 981px) {
  .sidebar.dock .menu-item,
  .sidebar.dock .side-new-os,
  .sidebar.dock .rail-user { will-change: auto; transform-origin: 50% 50%; overflow: visible; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.01em; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; height: 76px; gap: 6px; }
  .sidebar.dock .menu-item .menu-icon,
  .sidebar.dock .side-new-os .plus,
  .sidebar.dock .rail-user .ru-chip { transform: scale(var(--s, 1)); transform-origin: 50% 100%; transition: transform 0.12s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.15s ease, opacity 0.15s ease; will-change: transform; }
  .sidebar.dock .side-new-os .lbl,
  .sidebar.dock .rail-user .ru-lbl { font-size: 0.7rem; font-weight: 700; }
  .sidebar.dock .menu-item.active { font-weight: 800; }
}


/* ===== Tela de login: lago com carpas (tela cheia, sem faixa branca) ===== */
.login-screen { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; min-height: 0; padding: 24px; overflow: auto; background: #08507f; }
.pond-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.login-screen .login-card { position: relative; z-index: 1; background: rgba(255, 255, 255, 0.95); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 30px 80px rgba(0, 20, 50, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.5); }


/* ===== Login: cartão de vidro integrado ao lago ===== */
.pond-fish { z-index: 0; pointer-events: none; }
#pondWater { background: #08507f; }
.login-screen .login-card { position: relative; z-index: 1; color: #fff; border: 1px solid rgba(255, 255, 255, 0.34); border-radius: 26px; padding: 34px 32px; background: linear-gradient(160deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.08) 55%, rgba(120, 220, 245, 0.12) 100%); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); box-shadow: 0 30px 80px rgba(0, 25, 60, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(255, 255, 255, 0.12); animation: loginFloat 8s ease-in-out infinite; }
.login-screen .login-card::before { content: ""; position: absolute; inset: -16px; border-radius: 38px; border: 1px solid rgba(255, 255, 255, 0.28); pointer-events: none; animation: loginRing 6s ease-out infinite; }
.login-screen .login-card::after { content: ""; position: absolute; inset: -34px; border-radius: 50px; border: 1px solid rgba(255, 255, 255, 0.16); pointer-events: none; animation: loginRing 6s ease-out 1.6s infinite; }
@keyframes loginFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes loginRing { 0% { transform: scale(0.94); opacity: 0.7; } 100% { transform: scale(1.08); opacity: 0; } }
.login-screen .login-card img { width: 190px; padding: 10px 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 8px 20px rgba(0, 30, 70, 0.25); }
.login-screen .login-card h1 { color: #fff; text-shadow: 0 2px 12px rgba(0, 30, 70, 0.4); }
.login-screen .login-card p { color: rgba(255, 255, 255, 0.88); }
.login-screen .login-card label { color: rgba(255, 255, 255, 0.95); }
.login-screen .login-card .eyebrow { color: #bfeaff; }
.login-screen .login-card input { background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.38); color: #fff; box-shadow: none; }
.login-screen .login-card input::placeholder { color: rgba(255, 255, 255, 0.62); }
.login-screen .login-card input:focus { background: rgba(255, 255, 255, 0.24); border-color: #ffd66a; outline: 0; box-shadow: 0 0 0 3px rgba(255, 214, 106, 0.28); }
.login-screen .login-card input:-webkit-autofill { -webkit-text-fill-color: #fff; transition: background-color 9999s; }
.login-screen .login-card .password-toggle { color: rgba(255, 255, 255, 0.85); }
.login-screen .login-card .primary-button { background: linear-gradient(160deg, #ffd66a, #ffb020); color: #0a2547; border: 0; font-weight: 800; box-shadow: 0 10px 24px rgba(0, 30, 70, 0.35); }
.login-screen .login-card .primary-button:hover { filter: brightness(1.06); }
.login-screen .login-card .link-button { color: #ffe08a; }
.login-screen .login-card .hint, .login-screen .login-card #authStatus { color: #ffd4c8; }

/* saída do login e entrada do sistema */
.login-screen.leaving .login-card { animation: none; transition: transform 0.75s cubic-bezier(0.5, 0, 0.2, 1), opacity 0.6s ease, filter 0.6s ease; transform: scale(0.9) translateY(-22px); opacity: 0; filter: blur(10px); }
.login-screen.leaving .login-card::before, .login-screen.leaving .login-card::after { animation: none; opacity: 0; }
.login-screen.fading { transition: opacity 0.85s ease; opacity: 0; pointer-events: none; }
.app-shell.app-enter .workspace { animation: wsIn 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.app-shell.app-enter .sidebar.dock { animation: dockIn 0.95s cubic-bezier(0.2, 0.9, 0.25, 1.05) both; }
@keyframes wsIn { from { opacity: 0; transform: translateY(26px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes dockIn { from { opacity: 0; transform: translateY(100px); } to { opacity: 1; transform: none; } }


/* ===== Logo integrada (sem fundo branco) e vídeo real do lago ===== */
.login-screen .login-card img.logo-integrada { width: min(300px, 86%); max-height: 130px; padding: 0; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 3px 10px rgba(0, 25, 60, 0.55)) drop-shadow(0 0 22px rgba(120, 220, 255, 0.28)); }
.pond-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.3s linear; z-index: 0; display: none; }
.has-video .pond-video { display: block; }
.pond-video.on { opacity: 1; }
.has-video #pondWater { display: none; }
.pond-tint { position: absolute; inset: 0; z-index: 0; pointer-events: none; display: none; background: radial-gradient(ellipse at 50% 45%, rgba(4, 40, 70, 0.10) 0%, rgba(2, 22, 48, 0.55) 100%), linear-gradient(180deg, rgba(0, 60, 100, 0.18), rgba(0, 20, 45, 0.30)); }
.has-video .pond-tint { display: block; }
.pond-video { filter: brightness(1.35) saturate(1.2) contrast(1.05); }
.pond-tint { background: radial-gradient(ellipse at 50% 45%, rgba(10, 90, 140, 0.06) 0%, rgba(3, 30, 60, 0.32) 100%); }


/* ===== Carpas reais por cima da água clara ===== */
.has-video #pondWater { display: block; }
.pond-tint, .has-video .pond-tint { display: none; }
#pondKoiKey { z-index: 0; pointer-events: none; display: none; }
.login-screen.keyed #pondKoiKey { display: block; }
.login-screen.keyed .pond-video { display: block; position: absolute; left: 0; top: 0; width: 2px; height: 2px; opacity: 0.02; transition: none; pointer-events: none; }
.login-screen.blend .pond-video { display: block; mix-blend-mode: screen; filter: brightness(1.2) saturate(1.2); }
.pond-video { filter: none; }
.login-screen.blend .pond-video.on { opacity: 1; }
