:root {
  color-scheme: light;
  --bg: #f3f7fa;
  --panel: #fff;
  --text: #1d354b;
  --muted: #62788a;
  --sub: #3e596d;
  --line: #dce7ee;
  --soft: #f5f9fb;
  --accent: #087f8c;
  --accent-hover: #066774;
  --accent-soft: #e8f6f7;
  --brand-navy: #102c46;
  --brand-teal: #087f8c;
  --brand-light: #85d8df;
  --blue: #2c6590;
  --green: #248574;
  --danger: #c3444a;
  --radius: 12px;
  --shadow: 0 2px 5px #0c233904, 0 9px 22px #0c233904;
}
.owner-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 22px;
  border: 1px solid #bbdfe3;
  border-left: 4px solid var(--accent);
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--text);
}
.owner-context > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.owner-context b {
  overflow-wrap: anywhere;
}
.owner-context small {
  display: block;
  color: var(--sub);
  margin-top: 3px;
}
#sidebar .global-return {
  margin: 12px 18px 5px;
  background: #1c4b5c;
  color: #d3f2f3;
  border: 1px solid #3c6977;
}
#sidebar .global-return:hover {
  background: #245d6d;
}
.company-profile {
  padding: 26px;
  max-width: 960px;
}
.profile-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.profile-heading h2,
.setup-card h2 {
  margin: 6px 0 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}
.profile-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 30px;
  margin: 26px 0;
}
.profile-data div {
  min-width: 0;
}
.profile-data dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.profile-data dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.setup-card {
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px;
  margin-top: 20px;
  border-color: #b9dce1;
}
.history-import-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.history-import-summary > div {
  min-width: 0;
}
.history-import-summary dt {
  font-size: 11px;
}
.history-import-summary dd {
  margin: 6px 0 0;
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 750;
}
.history-import-review p + p {
  margin-top: 12px;
}
.setup-card p {
  color: var(--muted);
  margin: 8px 0 0;
}
.setup-card button {
  flex-shrink: 0;
}
.management-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-bottom: 18px;
}
.management-filters label {
  min-width: 220px;
  max-width: 420px;
  flex: 1;
  color: var(--sub);
  font-size: 12px;
}
.management-filters select {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.management-filters small {
  color: var(--muted);
  padding-bottom: 10px;
}
.metric-card:has(> div) {
  min-width: 0;
}
td code {
  overflow-wrap: anywhere;
  white-space: normal;
  color: var(--brand-teal);
}
.badge.gestor,
.badge.proprietario {
  color: #086671;
  background: #e5f4f5;
}
@media (max-width: 650px) {
  .owner-context,
  .setup-card {
    flex-direction: column;
    align-items: stretch;
  }
  .owner-context {
    padding: 13px 14px;
  }
  .owner-context > div {
    align-items: flex-start;
  }
  .company-profile,
  .setup-card {
    padding: 20px 17px;
  }
  .profile-data {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .profile-heading {
    flex-direction: column;
    gap: 10px;
  }
  .profile-actions {
    flex-direction: column;
  }
  .management-filters label {
    min-width: 0;
    flex-basis: 100%;
  }
  .management-filters small {
    padding-bottom: 0;
  }
}
*[hidden] {
  display: none !important;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font:
    14px/1.5 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--accent);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 15px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.12s,
    border-color 0.12s;
}
button:hover,
.button:hover {
  background: var(--accent-hover);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
.table-scroll:focus-visible {
  outline: 3px solid #087f8c70;
  outline-offset: 3px;
}
.secondary {
  color: var(--sub);
  background: #fff;
  border-color: #d5e2e9;
}
.secondary:hover {
  background: #edf4f8;
  border-color: #b5cbd8;
}
.danger {
  color: #b12f38;
  background: #fff1f2;
  border-color: #edc5c9;
}
.danger:hover {
  background: #ffe4e7;
}
.small {
  min-height: 33px;
  padding: 7px 11px;
  font-size: 11px;
  white-space: nowrap;
}
.icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.icon-button {
  padding: 9px;
  width: 38px;
  min-height: 38px;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
}
.icon-button:hover {
  background: #ebf3f7;
  color: var(--text);
}
a {
  color: var(--accent);
}
small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(23px, 2.2vw, 29px);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.3;
}
h2 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.45px;
}
h3 {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.2px;
}
.eyebrow {
  display: block;
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 1.8px;
  line-height: 1.6;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  padding: 12px 18px;
  background: #fff;
  z-index: 100;
}
.skip-link:focus {
  top: 15px;
}
.layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100dvh;
}
#sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 28px 14px 0;
  background: #102c46;
  color: #f7fcff;
  z-index: 40;
}
.brand {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-shrink: 0;
}
#sidebar > .brand {
  padding: 0 9px;
}
.brand-symbol {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 44px;
  flex-shrink: 0;
  background: #eef9fb;
  border: 1px solid #d6eaf0;
  border-radius: 9px;
}
.brand-symbol img {
  display: block;
  width: 32px;
  height: 40px;
  object-fit: contain;
}
#sidebar .brand strong,
.auth-intro .brand strong {
  color: #f7fcff;
}
#sidebar .brand strong span,
.auth-intro .brand strong span {
  color: var(--brand-light);
}
.page-brand {
  margin-bottom: 25px;
}
::selection {
  background: #c9eaed;
  color: #12374e;
}
.brand strong {
  display: block;
  font-size: 17px;
  letter-spacing: -0.6px;
  font-weight: 800;
  line-height: 1.2;
}
.brand strong span {
  color: #087f8c;
  font-weight: 550;
}
.brand small {
  margin-top: 5px;
  font-size: 8px;
  color: #a5c0d1;
  letter-spacing: 1.9px;
}
.company {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 28px 5px 22px;
  padding: 12px 10px;
  background: #173850;
  border: 1px solid #2b5069;
  border-radius: 8px;
}
.company-avatar {
  width: 29px;
  height: 29px;
  background: #245069;
  color: #deedf5;
  display: grid;
  place-items: center;
  border-radius: 6px;
  flex-shrink: 0;
  font-size: 13px;
}
.company > div {
  min-width: 0;
}
.company b {
  font-size: 11px;
  font-weight: 600;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.company small {
  color: #99b6c8;
  font-size: 9px;
}
.online-dot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #5ac2b4;
  margin-left: auto;
  flex-shrink: 0;
}
nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #365e75 transparent;
  overscroll-behavior: contain;
  overflow-anchor: none;
  margin: 0 -3px;
  padding: 0 3px 12px;
}
.nav-group {
  margin-bottom: 6px;
}
nav .nav-group-toggle {
  min-height: 42px;
  font-size: 12px;
  font-weight: 650;
  color: #d7e7f1;
}
.nav-group.has-active > .nav-group-toggle {
  color: #98e1e6;
}
nav .nav-group-toggle .nav-chevron {
  width: 14px;
  height: 14px;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 140ms ease;
}
.nav-group-toggle[aria-expanded="true"] .nav-chevron {
  transform: rotate(180deg);
}
.nav-group-items {
  margin: 2px 0 10px 12px;
  padding-left: 7px;
  border-left: 1px solid #365970;
}
.nav-group-items button > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: reduce) {
  nav .nav-group-toggle .nav-chevron {
    transition: none;
  }
}
nav button {
  width: 100%;
  justify-content: flex-start;
  border-radius: 6px;
  padding: 10px 11px;
  min-height: 37px;
  background: transparent;
  color: #b8cfdd;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 3px;
  gap: 10px;
  text-align: left;
}
nav button .icon {
  width: 17px;
  height: 17px;
  opacity: 0.8;
}
nav button:hover {
  background: #1b4058;
  color: white;
}
nav button.active {
  background: #164d60;
  color: #98e1e6;
  border-color: #2b6e7e;
}
nav button.active .icon {
  opacity: 1;
}
.nav-count {
  margin-left: auto;
  background: #ffffff15;
  color: inherit;
  font-size: 9px;
  border-radius: 4px;
  min-width: 19px;
  text-align: center;
  padding: 2px 4px;
}
.account {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #2a4d65;
  padding: 17px 4px 20px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  background: #244b61;
  color: #8bdce0;
  border-radius: 50%;
  font-size: 12px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.account > div {
  min-width: 0;
  flex: 1;
}
.account strong {
  display: block;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.account small {
  color: #9dbacd;
  font-size: 9px;
}
.account .icon-button {
  color: #9dbacd;
}
.account .icon-button:hover {
  background: #234a63;
  color: white;
}
.workspace {
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 65px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.breadcrumb {
  font-size: 11px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 11px;
  color: #b8ccd9;
}
.breadcrumb b {
  font-weight: 500;
  color: #35546a;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 10px;
  color: var(--muted);
}
.environment {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #edf8f6;
  border: 1px solid #d7ebe6;
  color: #42786d;
  border-radius: 5px;
  font-size: 9px;
  white-space: nowrap;
}
.environment i {
  width: 5px;
  height: 5px;
  background: #449c89;
  border-radius: 50%;
}
main {
  min-width: 0;
  padding: 30px 32px 15px;
}
main:focus {
  outline: none;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-header h1 {
  margin: 5px 0 7px;
}
.page-header p {
  color: var(--muted);
  font-size: 11px;
}
.refresh-button {
  flex-shrink: 0;
  min-height: 37px;
  font-size: 10px;
}
.refresh-button .icon {
  width: 15px;
  height: 15px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 27px;
}
.metric-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 19px 17px;
  min-width: 0;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
}
.metric-card:hover {
  background: #fff;
  border-color: #a4ced4;
}
.metric-card > div {
  min-width: 0;
}
.metric-card small {
  font-size: 10px;
  font-weight: 500;
}
.metric-card strong {
  display: block;
  font-size: clamp(19px, 1.9vw, 27px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.7px;
  margin: 9px 0 6px;
  overflow-wrap: anywhere;
}
.metric-card > div > span {
  font-size: 9px;
  color: #7e96a7;
  font-weight: 400;
}
.metric-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  margin-left: 7px;
  flex-shrink: 0;
}
.metric-icon .icon {
  width: 16px;
  height: 16px;
}
.metric-icon.teal {
  color: #087f8c;
  background: #e9f7f8;
}
.metric-icon.blue {
  color: #32698e;
  background: #eaf4fb;
}
.metric-icon.green {
  color: #2b8778;
  background: #edf8f4;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}
.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.toolbar-actions .icon {
  width: 16px;
  height: 16px;
}
.search-field {
  display: flex;
  align-items: center;
  width: min(100%, 315px);
  position: relative;
}
.search-field > .icon {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  color: #7e97a8;
}
.search-field > input {
  margin: 0;
  padding-left: 36px;
  min-height: 40px;
  font-size: 11px;
}
.updated-at {
  color: #7b94a7;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}
.updated-at .icon {
  width: 14px;
  height: 14px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d5e2e9;
  background: #fff;
  color: var(--text);
  border-radius: 6px;
  padding: 10px 11px;
  min-height: 42px;
  outline: none;
  font-size: 12px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #49a5b1;
  box-shadow: 0 0 0 3px #087f8c16;
}
input::placeholder {
  color: #7d94a6;
}
label {
  display: block;
  font-size: 11px;
  color: #496477;
  line-height: 1.6;
}
label input,
label select,
label textarea {
  display: block;
  margin-top: 6px;
}
textarea {
  resize: vertical;
  min-height: 92px;
}
input[type="file"] {
  padding: 9px;
  font-size: 11px;
}
.filter-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 19px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-tab {
  flex-shrink: 0;
  min-height: 42px;
  padding: 8px 1px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  gap: 7px;
}
.filter-tab:hover {
  background: transparent;
  color: var(--accent);
}
.filter-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 650;
}
.filter-tab > span {
  font-size: 9px;
  min-width: 17px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #e7f0f5;
  color: #6f8b9e;
}
.filter-tab.active > span {
  background: #def1f3;
  color: var(--accent);
}
.table-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.table-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #bfd3df #f3f7fa;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  padding: 13px 15px;
  background: #f6fafc;
  color: #6f889b;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px;
  color: #456175;
  font-size: 11px;
  border-bottom: 1px solid #e7f0f5;
  vertical-align: middle;
  max-width: 270px;
  overflow-wrap: anywhere;
}
td b {
  font-weight: 650;
  color: #203e56;
}
td small {
  font-size: 10px;
  margin-top: 4px;
}
td .record-id {
  color: #203e56;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: #f6fbfc;
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.row-actions {
  min-width: 110px;
}
.row-actions > button {
  margin: 2px 0;
}
.proof-link {
  font-size: 10px;
  font-weight: 550;
  white-space: nowrap;
  text-decoration: none;
}
.proof-link:hover {
  text-decoration: underline;
}
.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9e5ec;
  border-radius: 5px;
  padding: 4px 7px;
  color: #607e92;
  background: #edf4f8;
  font-size: 9px;
  white-space: nowrap;
  margin: 2px 1px 2px 0;
  line-height: 1.3;
}
.badge.em_rota {
  color: #2b668e;
  background: #edf6fc;
  border-color: #cfe3f1;
}
.badge.entregue,
.badge.concluida,
.badge.ativo,
.badge.no-prazo {
  color: #277967;
  background: #ecf8f3;
  border-color: #d2e9df;
}
.badge.cancelado,
.badge.inativo,
.badge.vencido,
.badge.fora-do-prazo {
  color: #b23e43;
  background: #fff1f1;
  border-color: #f3d6d7;
}
.badge.programado,
.badge.parcial,
.badge.aberta {
  color: #2d6b80;
  background: #edf7fb;
  border-color: #d0e6ee;
}
.text-danger {
  color: var(--danger) !important;
}
.text-success {
  color: var(--green) !important;
}
.mini-progress {
  width: 85px;
  height: 3px;
  border-radius: 3px;
  background: #e7f0f5;
  margin-top: 9px;
  overflow: hidden;
}
.mini-progress i {
  display: block;
  height: 100%;
  background: var(--green);
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #7891a4;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 11px;
}
.pagination .small {
  font-size: 18px;
  width: 28px;
  min-height: 28px;
  padding: 0;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 210px;
  text-align: center;
  padding: 30px 18px;
  white-space: normal;
}
.empty-state > .icon {
  color: #aec5d3;
  width: 31px;
  height: 31px;
  margin-bottom: 14px;
}
.empty-state strong {
  color: #5b788e;
  font-size: 13px;
  font-weight: 550;
}
.empty-state p {
  color: #7d94a6;
  font-size: 11px;
  margin-top: 7px;
  max-width: 390px;
}
.empty-row td {
  max-width: none;
}
.compact {
  min-height: 160px;
}
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  color: #476c80;
  background: #f0f9fb;
  border: 1px solid #d7e9ef;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.6;
}
.notice > .icon {
  width: 17px;
  height: 17px;
  color: #087f8c;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.section-head h2 {
  margin-top: 4px;
}
.history-filters {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}
.history-filters .filter-tabs {
  margin-bottom: 0;
}
.date-filters {
  display: flex;
  gap: 10px;
}
.date-filters label {
  width: 155px;
  max-width: 100%;
  font-size: 10px;
}
.date-filters input {
  font-size: 11px;
  min-height: 37px;
  padding: 7px 9px;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding: 17px 0 5px;
  margin-top: 30px;
  color: #7e96a8;
  font-size: 9px;
}
.app-footer img {
  display: block;
  width: 36px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  background: transparent;
  opacity: 1;
}
.calendar-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
}
.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 22px;
}
.calendar-toolbar h2 {
  margin-top: 4px;
  text-transform: capitalize;
}
.calendar-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.calendar-controls button {
  min-height: 33px;
  font-size: 11px;
}
.calendar-controls .icon-button {
  font-size: 21px;
}
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 17px;
  padding: 0 22px 19px;
}
.cal-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  color: #728da1;
}
.cal-count i,
.event-marker {
  display: inline-block;
  background: #3b849c;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal-count.planned i,
.event-marker.planned {
  background: #209bad;
}
.cal-count.route i,
.event-marker.route {
  background: #397da3;
}
.cal-count.done i,
.event-marker.done {
  background: #359984;
}
.cal-count.order i,
.event-marker.order {
  background: #6f92b0;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.calendar-week {
  padding: 10px;
  font-size: 9px;
  text-align: center;
  text-transform: uppercase;
  color: #7b96a8;
  background: #f6fafc;
  border-bottom: 1px solid var(--line);
}
.calendar-day,
.calendar-empty {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0;
  min-height: 122px;
  padding: 9px 10px;
  border: 0;
  border-right: 1px solid #e7eff4;
  border-bottom: 1px solid #e7eff4;
  border-radius: 0;
  background: #fff;
  color: #58758a;
  text-align: left;
  gap: 4px;
}
.calendar-day:nth-child(7n) {
  border-right: 0;
}
.calendar-empty {
  background: #fafcfd;
}
.calendar-day > b {
  font-size: 11px;
  font-weight: 500;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
}
.calendar-day:hover {
  background: #f2f9fb;
}
.calendar-day.selected {
  background: #eaf7f9;
  box-shadow: inset 0 0 0 1.5px #59a6b4;
}
.calendar-day.today > b {
  background: var(--accent);
  color: #fff;
}
.calendar-counts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-top: 4px;
}
.calendar-counts .cal-count {
  gap: 4px;
  min-width: 0;
}
.cal-count strong {
  font-size: 9px;
  font-weight: 550;
}
.cal-count em {
  font-style: normal;
  font-weight: 400;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.agenda {
  margin-top: 20px;
}
.count-label {
  font-size: 10px;
  color: var(--muted);
}
.calendar-event {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.event-marker {
  width: 7px;
  height: 7px;
}
.event-description {
  flex: 1;
  min-width: 0;
}
.event-description b {
  display: block;
  font-size: 11px;
  font-weight: 600;
}
.event-description span {
  font-size: 10px;
  color: var(--muted);
}
.report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 24px;
}
.report-heading h2 {
  font-size: 23px;
  margin: 5px 0;
}
.report-heading p {
  color: var(--muted);
  font-size: 11px;
}
.range-buttons {
  display: flex;
  gap: 6px;
}
.range-buttons button {
  min-height: 33px;
  padding: 8px 11px;
  font-size: 10px;
  white-space: nowrap;
}
.range-buttons button.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #b7d9df;
}
.period {
  display: flex;
  align-items: end;
  gap: 22px;
  padding-bottom: 24px;
}
.period > small {
  max-width: 550px;
  font-size: 10px;
}
.report-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.report-card {
  padding: 20px;
}
.report-card small {
  font-size: 10px;
}
.report-card strong {
  display: block;
  font-size: clamp(19px, 1.8vw, 27px);
  font-weight: 650;
  letter-spacing: -0.8px;
  margin: 12px 0 8px;
  overflow-wrap: anywhere;
}
.report-card > span {
  font-size: 9px;
  color: #7e96a8;
}
.report-card.attention strong {
  color: var(--accent);
}
.report-grid {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 20px;
  align-items: start;
}
.report-grid > .card {
  min-height: 288px;
}
.report-grid h3 + small {
  margin-top: 6px;
}
.bars {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-evenly;
  min-height: 205px;
  overflow-x: auto;
  padding: 16px 0 0;
}
.bars > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 22px;
  max-width: 45px;
}
.bars b {
  font-size: 10px;
  color: #607f95;
  margin-bottom: 8px;
  font-weight: 500;
}
.bars i {
  display: block;
  width: 85%;
  max-width: 27px;
  background: #299ba9;
  border-radius: 4px 4px 0 0;
}
.bars small {
  white-space: nowrap;
  font-size: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  width: 100%;
  text-align: center;
}
.chart-unit {
  font-size: 9px;
  color: var(--muted);
}
.progress-list {
  display: grid;
  gap: 23px;
  margin-top: 25px;
}
.progress-item > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}
.progress-item b {
  font-size: 11px;
  font-weight: 600;
}
.progress-item small {
  margin-top: 7px;
  font-size: 9px;
}
.progress-track {
  height: 5px;
  border-radius: 3px;
  background: #edf4f8;
  margin-top: 10px;
  overflow: hidden;
}
.progress-track i {
  display: block;
  background: #299ba9;
  height: 100%;
  border-radius: 3px;
}
.progress-track.blue i {
  background: #608dad;
}
.progress-track.green i {
  background: #4eaa98;
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 9px;
  color: var(--muted);
  margin: 22px 0;
}
.chart-legend span,
.legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.chart-legend i,
.legend i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  flex-shrink: 0;
}
i.teal {
  background: #299ba9;
}
i.green {
  background: #4eaa98;
}
i.blue {
  background: #608dad;
}
i.red {
  background: #cf7a80;
}
.comparison-row {
  margin-top: 21px;
}
.comparison-row > b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 9px;
}
.comparison-track {
  position: relative;
  display: flex;
  align-items: center;
  background: #f5fafc;
  height: 27px;
  margin-bottom: 5px;
}
.comparison-track i {
  display: block;
  height: 100%;
  background: #83c4cb;
  border-radius: 3px;
}
.comparison-track span {
  font-size: 10px;
  position: absolute;
  left: 9px;
  color: #173c50;
}
.comparison-track.green i {
  background: #a0d4c9;
}
.comparison-track.green span {
  color: #24584e;
}
.summary-list {
  margin-top: 18px;
}
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid #e7f0f5;
  font-size: 11px;
}
.summary-row:last-child {
  border-bottom: 0;
}
.summary-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #648298;
}
.summary-row b {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}
.summary-row small {
  font-size: 9px;
  margin-top: 3px;
}
.report-note {
  font-size: 10px;
  background: #f3f8fb;
  padding: 12px;
  margin-top: 15px;
  border-radius: 6px;
}
.donut-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 27px;
  padding: 28px 0;
}
.donut {
  background: var(--donut);
  width: 154px;
  height: 154px;
  border-radius: 50%;
  padding: 20px;
  flex-shrink: 0;
}
.donut > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 50%;
}
.donut strong {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 650;
}
.donut small {
  margin-top: 4px;
  font-size: 10px;
}
.legend {
  display: grid;
  gap: 16px;
  min-width: 110px;
  font-size: 10px;
  color: var(--muted);
}
.legend b {
  margin-left: auto;
  font-weight: 600;
}
dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(90dvh, 900px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  color: var(--text);
  background: white;
  box-shadow: 0 20px 100px #0003;
}
dialog::backdrop {
  background: #0a233b80;
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 21px 25px;
  border-bottom: 1px solid var(--line);
}
.dialog-header h2 {
  margin-top: 4px;
  font-size: 20px;
}
.dialog-body {
  padding: 24px 25px 18px;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
.full-field {
  grid-column: 1 / -1;
}
.required {
  color: var(--accent);
}
.optional {
  font-size: 9px;
  font-weight: 400;
  color: #7e96a8;
}
.dialog-footer {
  position: sticky;
  bottom: 0;
  padding: 15px 25px;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}
.dialog-footer .icon {
  width: 16px;
  height: 16px;
}
.form-error {
  color: var(--danger);
  font-size: 11px;
  margin-top: 15px;
}
.form-error:empty {
  margin: 0;
}
.record-options {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 15px;
}
.record-options summary {
  font-size: 11px;
  color: #7894a8;
  cursor: pointer;
}
.record-options .actions {
  margin: 15px 0 8px;
}
.record-options small {
  font-size: 10px;
}
#toast {
  display: none;
  position: fixed;
  right: 25px;
  bottom: 25px;
  max-width: min(450px, calc(100vw - 32px));
  padding: 15px 20px;
  border: 1px solid #b6ddd1;
  border-radius: 8px;
  color: #265f52;
  background: #f0fbf7;
  box-shadow: 0 5px 30px #0b344520;
  font-size: 12px;
  z-index: 100;
}
#toast.show {
  display: block;
}
#toast.error {
  color: #a4353d;
  border-color: #edbec1;
  background: #fff4f4;
}
.auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
  padding: 0;
}
.auth-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 55px max(45px, 8vw);
  color: #fff;
  background: #102c46;
  position: relative;
}
.auth-intro .brand {
  margin-bottom: 60px;
}
.auth-intro h1 {
  font-size: clamp(32px, 3.5vw, 52px);
  line-height: 1.18;
  letter-spacing: -1.8px;
  margin: 20px 0;
}
.auth-intro p {
  color: #adc8db;
  font-size: 13px;
  max-width: 330px;
  line-height: 1.8;
}
.auth-intro .eyebrow {
  color: #85d8df;
}
.auth-intro > small {
  font-size: 8px;
  letter-spacing: 2px;
  color: #86a9c2;
  margin-top: 70px;
}
.auth-features {
  display: grid;
  gap: 18px;
  margin-top: 50px;
}
.auth-features span {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 11px;
  color: #b0cada;
}
.auth-features .icon {
  color: #70c8d1;
  width: 17px;
  height: 17px;
}
.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 50px max(35px, 6vw) 20px;
  background: #fff;
}
.auth-card {
  max-width: 380px;
  width: 100%;
  margin: auto;
}
.auth-card h2 {
  font-size: 29px;
  margin: 12px 0 8px;
  letter-spacing: -0.9px;
}
.auth-card > p {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 32px;
}
.auth-card form {
  display: grid;
  gap: 18px;
}
.auth-card input {
  min-height: 46px;
}
.wide {
  width: 100%;
  min-height: 46px;
  justify-content: space-between;
  padding: 12px 17px;
}
.password-field {
  display: flex;
  position: relative;
}
.password-field input {
  padding-right: 70px;
}
.password-toggle {
  position: absolute;
  right: 3px;
  top: 10px;
  padding: 8px 10px;
  min-height: 35px;
  background: transparent;
  color: #7693a8;
  font-size: 10px;
}
.password-toggle:hover {
  background: #f1f7fa;
  color: #3c617a;
}
.access-hint {
  color: #7894a8;
  font-size: 10px;
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 18px;
}
.auth-panel .app-footer {
  margin: 45px auto 0;
  width: 100%;
  max-width: 430px;
  font-size: 8px;
}
.auth-panel .app-footer img {
  width: 30px;
  height: 34px;
}
.install {
  max-width: 820px;
  margin: 50px auto;
  padding: 35px;
}
.install .brand {
  color: #1d354b;
  margin-bottom: 25px;
}
.install h1 {
  margin-bottom: 14px;
}
.install p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 20px;
}
.install form > button {
  margin-top: 25px;
}
.install-alert {
  background: #fff1f2;
  border: 1px solid #ecc6c9;
  color: #ac3942;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  font-size: 12px;
}
.install-ok {
  background: #edf8f4;
  border-color: #bfddd2;
  color: #2d7c68;
}
.install-hint {
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 15px;
  font-size: 12px;
  margin-bottom: 24px;
  border-radius: 8px;
}
.loading-state {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: #53758c;
}
.loading-state strong {
  font-size: 20px;
  color: #203e56;
}
.loading-state p {
  font-size: 12px;
}
.loading-mark {
  width: 30px;
  height: 5px;
  border-radius: 4px;
  background: var(--accent);
  margin-bottom: 6px;
}
.menu-toggle {
  display: inline-flex;
}
.mobile-nav-close,
.nav-overlay,
.auth-mobile-brand {
  display: none;
}
.rank-chart {
  display: grid;
  gap: 17px;
  margin-top: 20px;
}
.rank-item > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
}
.rank-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-item b {
  flex-shrink: 0;
}
.rank-track {
  height: 6px;
  background: var(--soft);
  border-radius: 4px;
  margin: 7px 0 3px;
  overflow: hidden;
}
.rank-track i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}
.rank-item small {
  color: var(--muted);
  font-size: 10px;
}
.executive-summary {
  margin-top: 20px;
}
.monthly-chart {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}
.monthly-item {
  display: grid;
  grid-template-columns: 65px minmax(0, 1fr);
  gap: 8px 15px;
  align-items: start;
}
.monthly-item > b {
  font-size: 11px;
  padding-top: 4px;
}
.monthly-item > small {
  grid-column: 2;
  color: var(--muted);
  font-size: 10px;
}
.monthly-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  align-items: center;
  gap: 8px;
  min-height: 21px;
}
.monthly-track i {
  display: block;
  height: 9px;
  background: var(--accent);
  border-radius: 3px;
  min-width: 0;
  max-width: 100%;
}
.monthly-line.cost i {
  background: var(--blue);
}
.monthly-line span {
  font-size: 10px;
  white-space: nowrap;
  color: var(--sub);
  text-align: right;
}
.topbar .breadcrumb {
  margin-right: auto;
}
.antt-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 15px 18px;
  background: var(--accent-soft);
  border: 1px solid #c2e4e6;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 12px;
}
.antt-source > div {
  flex: 1;
  min-width: 220px;
}
.antt-source span,
.antt-source small {
  display: block;
  color: var(--sub);
  margin-top: 3px;
  font-size: 11px;
}
.antt-source a {
  color: var(--accent-hover);
  font-weight: 600;
}
.antt-source.pending {
  background: #fff9ee;
  border-color: #eadcbf;
}
.calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.8fr);
  gap: 22px;
  align-items: start;
}
.calculator-form,
.calculator-result,
.calculator-loading {
  padding: 24px;
  min-width: 0;
}
.calculator-form > h2,
.calculator-form .section-head h2 {
  margin: 5px 0 7px;
  font-size: 21px;
}
.calculator-form p,
.calculator-result p,
.calculator-loading p {
  color: var(--muted);
}
.calculator-form .fields {
  margin: 20px 0;
}
.calculator-form input,
.calculator-form select {
  min-width: 0;
  width: 100%;
}
.calculator-section {
  border: 1px solid var(--line);
  padding: 0 16px;
  border-radius: 9px;
  margin-top: 14px;
}
.calculator-section > summary {
  cursor: pointer;
  font-weight: 650;
  padding: 15px 0;
  font-size: 12px;
}
.calculator-section .fields {
  margin: 3px 0 18px;
}
.calculation-help {
  border-top: 1px solid var(--line);
  margin: 20px 0;
  padding-top: 15px;
  font-size: 11px;
}
.calculation-help summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--sub);
}
.calculation-help p {
  margin-bottom: 0;
  line-height: 1.7;
}
.calculator-result > small {
  color: var(--muted);
  display: block;
}
.calculation-total {
  display: block;
  font-size: clamp(26px, 2.5vw, 36px);
  color: var(--brand-navy);
  letter-spacing: -1px;
  margin: 7px 0 2px;
  overflow-wrap: anywhere;
}
.calculation-breakdown {
  margin: 22px 0;
}
.calculation-breakdown > div {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.calculation-breakdown dt {
  color: var(--sub);
  min-width: 0;
}
.calculation-breakdown dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
  flex-shrink: 0;
}
.field-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.profit-summary {
  background: var(--accent-soft);
  border-radius: 9px;
  padding: 17px;
  margin: 20px 0;
  color: var(--accent-hover);
}
.profit-summary small,
.profit-summary span {
  display: block;
  font-size: 11px;
}
.profit-summary strong {
  display: block;
  font-size: 27px;
  margin: 5px 0;
}
.profit-summary.negative {
  color: var(--danger);
  background: #fff0f1;
}
.simulation-tools,
.linked-floor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}
.linked-floor {
  background: var(--accent-soft);
  padding: 12px;
  border-radius: 8px;
  margin: 17px 0;
  font-size: 11px;
}
.linked-floor span {
  flex: 1;
}
.parameter-form {
  max-width: 1100px;
}
.parameter-form .updated-at {
  display: block;
  margin-top: 20px;
}
.empty-calculation h3 {
  margin-top: 10px;
}
.sidebar-hidden .layout {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 1250px) {
  .calculator-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 650px) {
  .calculator-form,
  .calculator-result,
  .calculator-loading {
    padding: 20px 16px;
  }
  .calculator-section {
    padding: 0 12px;
  }
  .calculator-form .fields {
    grid-template-columns: 1fr;
  }
  .antt-source {
    padding: 13px 14px;
  }
  .antt-source > div {
    min-width: 0;
    flex-basis: 100%;
  }
  .calculation-breakdown > div {
    font-size: 11px;
    gap: 12px;
  }
  .calculation-breakdown dd {
    max-width: 48%;
    overflow-wrap: anywhere;
  }
  .monthly-item {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 7px 10px;
  }
  .monthly-line span {
    font-size: 9px;
  }
}
@media (min-width: 1600px) {
  main {
    max-width: 1680px;
    margin: 0 auto;
    padding: 36px 45px 20px;
  }
  .topbar {
    padding-inline: 45px;
  }
}
@media (max-width: 1250px) {
  .layout {
    grid-template-columns: 219px minmax(0, 1fr);
  }
  main {
    padding: 26px 23px 15px;
  }
  .topbar {
    padding-inline: 23px;
  }
  .metrics {
    gap: 10px;
  }
  .metric-card {
    padding: 16px 13px;
  }
  .metric-icon {
    width: 27px;
    height: 27px;
  }
  .metric-card strong {
    font-size: 22px;
  }
  .metric-card small {
    font-size: 9px;
  }
  .report-cards {
    gap: 12px;
  }
  .report-card {
    padding: 16px;
  }
  .calendar-counts .cal-count em {
    display: none;
  }
}
@media (max-width: 1050px) {
  .layout {
    display: block;
  }
  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    transform: translateX(-100%);
    visibility: hidden;
  }
  .nav-open #sidebar {
    transform: translateX(0);
    visibility: visible;
  }
  .mobile-nav-close {
    display: inline-flex;
    position: absolute;
    top: 13px;
    right: 9px;
    color: #9cbdd1;
    width: 28px;
    min-height: 28px;
  }
  .mobile-nav-close:hover {
    background: #1d435e;
    color: #fff;
  }
  .nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 39;
    border: 0;
    border-radius: 0;
    background: #08213999;
    width: 100%;
    height: 100%;
  }
  .nav-overlay:hover {
    background: #08213999;
  }
  .nav-open .nav-overlay {
    display: block;
  }
  .nav-open {
    overflow: hidden;
  }
  .menu-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }
  .breadcrumb {
    flex: 1;
  }
  .topbar {
    padding-left: 15px;
  }
  .metrics {
    gap: 14px;
  }
  .metric-card {
    padding: 20px 16px;
  }
  .metric-card small {
    font-size: 10px;
  }
  .metric-card strong {
    font-size: 24px;
  }
}
@media (max-width: 800px) {
  .desktop-date {
    display: none;
  }
  main {
    padding: 24px 20px 15px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .metric-card {
    padding: 17px;
  }
  .metric-card strong {
    font-size: 25px;
  }
  .report-grid {
    grid-template-columns: 1fr;
  }
  .report-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-card strong {
    font-size: 25px;
  }
  .period {
    flex-wrap: wrap;
    gap: 14px;
  }
  .report-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .history-filters {
    flex-wrap: wrap;
  }
  .auth {
    grid-template-columns: 0.9fr 1.1fr;
  }
  .auth-intro {
    padding: 40px 30px;
  }
  .auth-intro h1 {
    font-size: 35px;
  }
  .auth-panel {
    padding: 40px 30px 20px;
  }
  .auth-card h2 {
    font-size: 25px;
  }
}
@media (max-width: 600px) {
  body {
    font-size: 13px;
  }
  .topbar {
    height: 57px;
    padding: 0 13px 0 9px;
    gap: 5px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .breadcrumb > span {
    margin-inline: 6px;
  }
  .environment {
    font-size: 0;
    padding: 6px;
    border: 0;
    background: none;
  }
  .environment i {
    width: 7px;
    height: 7px;
  }
  main {
    padding: 23px 16px 15px;
  }
  .page-header {
    margin-bottom: 22px;
    gap: 10px;
    align-items: flex-start;
  }
  .page-header h1 {
    font-size: 24px;
    margin-top: 6px;
  }
  .page-header p {
    font-size: 10px;
    max-width: 280px;
    line-height: 1.7;
  }
  .refresh-button {
    min-height: 34px;
    padding: 8px;
    margin-top: 20px;
  }
  .refresh-button > span {
    display: none;
  }
  .metrics {
    gap: 10px;
    margin-bottom: 23px;
  }
  .metric-card {
    padding: 14px 12px;
    min-height: 114px;
  }
  .metric-card small {
    font-size: 9px;
  }
  .metric-card strong {
    font-size: 21px;
    margin-top: 10px;
    letter-spacing: -0.8px;
  }
  .metric-card > div > span {
    font-size: 8px;
  }
  .metric-icon {
    width: 23px;
    height: 23px;
    margin-left: 3px;
    border-radius: 6px;
  }
  .metric-icon .icon {
    width: 13px;
    height: 13px;
  }
  .toolbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .search-field {
    width: 100%;
  }
  .search-field > input {
    min-height: 42px;
    font-size: 12px;
  }
  .toolbar-actions {
    flex: 1;
    width: 100%;
    justify-content: flex-end;
  }
  .toolbar-actions > button {
    flex: 1;
    min-height: 40px;
    padding: 9px 11px;
    font-size: 11px;
  }
  .toolbar:has(.updated-at) .toolbar-actions {
    flex: none;
    width: auto;
  }
  .toolbar:has(.updated-at) .export-button span {
    display: none;
  }
  .filter-tabs {
    gap: 20px;
    margin-bottom: 15px;
  }
  .filter-tab {
    font-size: 10px;
    min-height: 42px;
  }
  .table-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .table-scroll {
    overflow: visible;
  }
  table,
  tbody {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 4px 14px;
    margin-bottom: 12px;
  }
  td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 12px 6px 11px 0;
    max-width: none;
    border-bottom: 1px solid #eaf2f7;
    font-size: 11px;
    min-width: 0;
  }
  td::before {
    content: attr(data-label);
    display: block;
    color: #7d98aa;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-size: 8px;
    margin-bottom: 7px;
  }
  td:first-child,
  .row-actions {
    grid-column: 1 / -1;
  }
  td:first-child {
    padding-top: 13px;
  }
  td:first-child > b {
    font-size: 13px;
  }
  td small {
    font-size: 10px;
    margin-top: 4px;
  }
  .row-actions {
    border: 0;
    padding: 13px 0;
    width: 100%;
    min-width: 0;
  }
  .row-actions::before {
    display: none;
  }
  .row-actions .actions {
    width: 100%;
  }
  .row-actions .small {
    min-height: 38px;
    padding: 9px 13px;
  }
  tbody tr:hover td {
    background: transparent;
  }
  tbody tr:last-child td {
    border-bottom: 1px solid #eaf2f7;
  }
  tbody tr:last-child .row-actions {
    border: 0;
  }
  .empty-row {
    display: block;
    padding: 0;
  }
  .empty-row td {
    display: block;
    padding: 0;
    border: 0 !important;
  }
  .empty-row td::before {
    display: none;
  }
  .table-footer {
    padding: 9px 2px;
    border: 0;
  }
  .pagination .small {
    width: 33px;
    min-height: 33px;
  }
  .history-filters {
    gap: 12px;
  }
  .history-filters > div,
  .date-filters {
    width: 100%;
  }
  .date-filters label {
    width: auto;
    flex: 1;
  }
  .date-filters input {
    width: 100%;
    font-size: 12px;
    min-height: 42px;
  }
  .notice {
    font-size: 10px;
    align-items: flex-start;
    padding: 12px;
  }
  .notice > .icon {
    margin-top: 2px;
  }
  .calendar-toolbar {
    padding: 16px 12px;
    gap: 7px;
  }
  .calendar-toolbar h2 {
    font-size: 15px;
  }
  .calendar-toolbar .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .calendar-controls {
    gap: 3px;
  }
  .calendar-controls .icon-button {
    width: 29px;
  }
  .calendar-controls button {
    padding: 7px 8px;
    min-height: 34px;
  }
  .calendar-legend {
    gap: 8px 13px;
    padding: 0 13px 15px;
  }
  .calendar-legend .cal-count {
    font-size: 8px;
  }
  .calendar-week {
    padding: 9px 0;
    font-size: 8px;
  }
  .calendar-day,
  .calendar-empty {
    min-height: 81px;
    padding: 5px 3px;
    gap: 1px;
  }
  .calendar-day > b {
    width: 21px;
    height: 21px;
    font-size: 10px;
  }
  .calendar-counts {
    gap: 3px;
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 4px;
  }
  .calendar-counts .cal-count {
    gap: 2px;
  }
  .cal-count strong {
    font-size: 8px;
  }
  .cal-count i {
    width: 4px;
    height: 4px;
  }
  .cal-count em {
    display: none;
  }
  .agenda {
    padding: 16px;
  }
  .agenda .section-head h2 {
    font-size: 17px;
  }
  .calendar-event {
    gap: 9px;
    flex-wrap: wrap;
  }
  .event-description {
    flex-basis: calc(100% - 22px);
  }
  .calendar-event .actions {
    padding-left: 16px;
  }
  .calendar-event .small {
    min-height: 38px;
  }
  .card {
    padding: 18px;
  }
  .report-cards {
    gap: 10px;
  }
  .report-card {
    padding: 15px 12px;
  }
  .report-card small {
    font-size: 9px;
  }
  .report-card strong {
    font-size: 23px;
  }
  .report-card > span {
    font-size: 9px;
  }
  .range-buttons {
    width: 100%;
  }
  .range-buttons button {
    flex: 1;
    min-height: 38px;
    font-size: 10px;
  }
  .report-heading h2 {
    font-size: 21px;
  }
  .report-heading p {
    font-size: 10px;
  }
  .period {
    padding-bottom: 20px;
  }
  .report-grid {
    gap: 15px;
  }
  .bars {
    gap: 9px;
  }
  .donut-row {
    gap: 20px;
  }
  .donut {
    width: 132px;
    height: 132px;
    padding: 17px;
  }
  .legend {
    min-width: 95px;
    font-size: 9px;
  }
  dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 12px;
  }
  .dialog-header {
    padding: 17px;
  }
  .dialog-header h2 {
    font-size: 18px;
  }
  .dialog-body {
    padding: 20px 17px;
  }
  .fields {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .fields label {
    font-size: 12px;
  }
  .fields input,
  .fields select,
  .fields textarea {
    font-size: 16px;
    min-height: 46px;
  }
  .full-field {
    grid-column: auto;
  }
  .dialog-footer {
    padding: 13px 17px;
  }
  .dialog-footer button {
    min-height: 44px;
    flex: 1;
  }
  .app-footer {
    font-size: 8px;
    line-height: 1.8;
    margin-top: 25px;
  }
  .app-footer img {
    width: 30px;
    height: 34px;
  }
  #toast {
    left: 16px;
    right: 16px;
    bottom: 18px;
    max-width: none;
    font-size: 11px;
  }
  .auth {
    display: block;
    min-height: 100dvh;
    background: #fff;
  }
  .auth-intro {
    display: none;
  }
  .auth-panel {
    padding: 35px 25px 15px;
    min-height: 100dvh;
  }
  .auth-mobile-brand {
    display: block;
    margin: 0 auto 50px;
    color: #1d354b;
  }
  .auth-mobile-brand .brand strong span {
    color: var(--accent);
  }
  .auth-card {
    margin: auto;
  }
  .auth-card h2 {
    font-size: 28px;
  }
  .auth-card input {
    font-size: 16px;
    min-height: 48px;
  }
  .auth-card label {
    font-size: 12px;
  }
  .auth-panel .app-footer {
    margin-top: 55px;
  }
  .install {
    margin: 14px;
    padding: 25px 18px;
  }
  .install .fields input {
    font-size: 16px;
  }
}
@media (max-width: 360px) {
  main {
    padding-inline: 12px;
  }
  .metric-card {
    padding: 13px 10px;
  }
  .metric-icon {
    display: none;
  }
  .metric-card strong {
    font-size: 23px;
  }
  .toolbar-actions > button {
    font-size: 10px;
  }
  .breadcrumb {
    font-size: 9px;
  }
  .donut-row {
    gap: 15px;
  }
  .donut {
    width: 118px;
    height: 118px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  #sidebar,
  .topbar,
  .toolbar,
  .metrics,
  .filter-tabs,
  .date-filters,
  .pagination,
  .row-actions,
  #toast {
    display: none !important;
  }
  .layout {
    display: block;
  }
  main {
    padding: 0;
  }
  body {
    background: white;
  }
  .table-card {
    border: 0;
  }
  td {
    font-size: 9px;
  }
}
