/* #ARB #Tecnologia #UX */
:root {
  --gold: #927747;
  --ink: #20382b;
  --paper: #f5f1e8;
  --surface: #fffdf8;
  --soft: #eee8dc;
  --line: #d7cebd;
  --muted: #5d665f;
  --accent: #426b50;
  --primary: #244b39;
  --deep: #163628;
  --danger: #7c2729;
  --warning: #865a15;
  --success: #1f6d55;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  line-height: 1.15;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 16px;
}
small {
  font-size: 12px;
  color: var(--muted);
}
.hidden {
  display: none !important;
}
.primary,
.secondary,
.text-button,
.tab-button,
.nav-button,
.day-chip {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 11px 15px;
  font-weight: 650;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary {
  background: var(--primary);
  color: white;
}
.primary:hover {
  background: var(--deep);
}
.secondary {
  background: var(--surface);
  border-color: var(--line);
}
.secondary:hover {
  border-color: var(--accent);
  background: #edf1e8;
}
.text-button {
  background: transparent;
  color: var(--primary);
  padding: 10px 4px;
}
.danger {
  color: var(--danger);
  border-color: #dfbeba;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 800;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.7px;
}
.brand small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2px;
  font-weight: 500;
  margin-top: 2px;
}
.brand-mark {
  background: var(--primary);
  border-bottom: 4px solid var(--gold);
  color: white;
  font:
    italic 36px Georgia,
    serif;
  width: 44px;
  height: 47px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--surface);
  padding: 25px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
}
.company-name {
  border-block: 1px solid var(--line);
  margin: 24px 0 18px;
  padding: 14px 4px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.nav-button {
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  font-size: 13px;
  padding: 12px;
  gap: 12px;
}
.nav-button svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
  stroke-width: 1.8;
  fill: none;
  flex-shrink: 0;
}
.nav-button.active {
  background: #e7ede4;
  color: var(--deep);
  box-shadow: inset 3px 0 var(--accent);
}
.nav-button.active svg {
  stroke: var(--deep);
  stroke-width: 2.2;
}
.nav-button:hover {
  background: #eef2eb;
}
.sidebar-note {
  margin: auto 12px 22px;
  padding-top: 32px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.profile {
  border-top: 1px solid var(--line);
  padding: 17px 7px 0;
  display: grid;
  gap: 4px;
}
.profile > span {
  font-weight: 750;
  font-size: 14px;
}
.profile button {
  justify-content: flex-start;
  min-height: 40px;
  font-size: 12px;
}
.workspace {
  padding: 32px 36px 20px;
  min-width: 0;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.page-header p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 9px;
}
.header-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.demo-banner {
  padding: 10px 14px;
  border: 1px solid #d9bc84;
  background: #fbf0d7;
  border-radius: 8px;
  font-size: 12px;
  color: #725019;
  margin-bottom: 20px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.metric {
  padding: 17px 19px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.metric strong {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -1px;
  display: block;
  margin-top: 8px;
}
.metric p {
  font-size: 11px;
  margin-top: 6px;
  color: var(--muted);
}
.agenda-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}
.view-tabs {
  display: flex;
  background: #e8e5dc;
  padding: 4px;
  border-radius: 11px;
  gap: 3px;
}
.tab-button {
  padding: 9px 13px;
  min-height: 40px;
  font-size: 12px;
  background: transparent;
}
.tab-button.active {
  background: var(--surface);
  box-shadow: 0 2px 5px #20382b0b;
}
.date-controls {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.date-controls button {
  padding: 9px 12px;
}
.date-controls .arrow {
  font-size: 19px;
  min-width: 44px;
}
.date-controls input {
  max-width: 155px;
  min-height: 43px;
}
.date-controls select {
  max-width: 150px;
}
.filter-bar {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(3, minmax(140px, 190px));
  gap: 12px;
  margin-bottom: 18px;
}
.filter-bar label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: grid;
  gap: 6px;
}
.filter-bar input,
.filter-bar select {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}
.range-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 22px 0 13px;
}
.range-heading p {
  font-size: 12px;
  color: var(--muted);
}
.range-heading h2 {
  font-size: 18px;
}
.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.status {
  font-size: 10px;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  border-radius: 5px;
  padding: 4px 7px;
  font-weight: 750;
  line-height: 1.3;
  white-space: nowrap;
}
.status:before {
  content: "";
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.status-planned {
  color: #456047;
  background: #e9eee5;
}
.status-route {
  color: #865a15;
  background: #faf0d4;
}
.status-onsite {
  color: #1f6d55;
  background: #e4f2e9;
}
.status-done {
  color: #58645f;
  background: #e8ede6;
}
.status-issue {
  color: #7c2729;
  background: #f8e5e1;
}
.status-cancelled {
  color: #6d6261;
  background: #efe7e6;
}
.calendar-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  max-height: 76vh;
}
.calendar-grid {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: 100%;
  min-width: 1240px;
}
.calendar-grid th,
.calendar-grid td {
  border-right: 1px solid #e5ddd0;
  border-bottom: 1px solid #e5ddd0;
  vertical-align: top;
  padding: 10px;
  width: 155px;
}
.calendar-grid th {
  background: #eeece3;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 2;
}
.calendar-grid th strong {
  font-size: 16px;
  display: block;
  color: var(--ink);
  margin-top: 4px;
}
.calendar-grid .resource-label {
  width: 164px;
  min-width: 164px;
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 1;
  padding: 19px 13px;
}
.calendar-grid th.resource-label {
  background: var(--deep);
  color: white;
  z-index: 3;
  font-size: 12px;
  padding: 16px;
}
.resource-label strong {
  display: block;
  font-size: 13px;
  line-height: 1.5;
}
.resource-label small {
  display: block;
  line-height: 1.5;
  margin: 7px 0;
}
.calendar-grid td {
  height: 168px;
}
.calendar-grid td.today,
.calendar-grid th.today {
  background: #f1f7f4;
}
.appointment-card {
  display: block;
  text-align: left;
  border: 1px solid var(--line);
  border-left: 3px solid #72906f;
  border-radius: 9px;
  background: var(--surface);
  width: 100%;
  padding: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.5;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.appointment-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px #1636280a;
}
.appointment-card strong {
  font-size: 12px;
  display: block;
  line-height: 1.4;
  margin: 7px 0;
}
.appointment-card .card-time {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}
.appointment-card .card-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.appointment-card .card-team {
  color: var(--primary);
  font-size: 11px;
  font-weight: 650;
  margin-top: 6px;
}
.appointment-card.card-onsite {
  border-left-color: #1f6d55;
}
.appointment-card.card-route {
  border-left-color: #c29a37;
}
.appointment-card.card-issue {
  border-left-color: #9a3c38;
}
.appointment-card.card-done {
  border-left-color: #82988a;
  opacity: 0.85;
}
.cell-empty {
  display: block;
  color: #ada697;
  font-size: 11px;
  padding: 10px 4px;
}
.cell-add {
  width: 100%;
  min-height: 35px;
  border: 1px dashed #d5cdbf;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}
.mobile-calendar {
  display: none;
}
.day-chips {
  display: flex;
  gap: 6px;
  overflow: auto;
  margin: 15px 0;
}
.day-chip {
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border-color: var(--line);
  padding: 9px 10px;
  flex: 1;
  min-width: 40px;
  font-size: 10px;
}
.day-chip strong {
  font-size: 16px;
}
.day-chip.active {
  background: var(--primary);
  color: white;
}
.mobile-resource {
  margin-bottom: 14px;
}
.mobile-resource-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.mobile-resource-header small {
  display: block;
  margin-top: 4px;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.month-head,
.month-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px;
  background: var(--surface);
}
.month-head {
  font-size: 11px;
  font-weight: 700;
  background: var(--soft);
}
.month-cell {
  min-height: 135px;
}
.month-cell > button {
  padding: 3px 6px;
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 750;
}
.month-cell.outside {
  background: #eeeae0;
}
.month-cell.today {
  background: #ecf4ef;
}
.month-event {
  display: block;
  width: 100%;
  background: #e7ede4;
  border: 0;
  border-radius: 4px;
  text-align: left;
  padding: 5px 6px;
  font-size: 10px;
  color: var(--primary);
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-schedule {
  display: grid;
  gap: 12px;
}
.day-block {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.day-block time {
  font-size: 13px;
  font-weight: 750;
}
.day-block > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.day-block .appointment-card {
  margin: 0;
}
.kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 13px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.kanban-column {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #eeebe2;
  padding: 12px;
  min-height: 330px;
}
.kanban-column h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 17px;
  gap: 6px;
}
.kanban-column h3 > span:last-child {
  font-size: 11px;
  background: var(--surface);
  padding: 4px 8px;
  border-radius: 5px;
}
.kanban-column .appointment-card {
  margin-bottom: 12px;
}
.mobile-stage-select {
  display: none;
}
.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
.data-table th {
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 14px;
}
.data-table td {
  padding: 15px;
  border-bottom: 1px solid #e8e1d5;
  min-width: 130px;
  vertical-align: top;
  line-height: 1.7;
}
.data-table td:first-child {
  min-width: 210px;
}
.data-table .text-button {
  padding: 0;
  min-height: 32px;
}
.data-table small {
  display: block;
  font-size: 11px;
}
.table-cards {
  display: none;
}
.empty-state {
  padding: 45px 22px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
}
.empty-state h3 {
  color: var(--ink);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 13px;
  line-height: 1.7;
  margin: 0 auto 16px;
  max-width: 540px;
}
.empty-state button {
  margin: 3px;
}
.resource-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.resource-cards,
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 15px;
}
.resource-card,
.person-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.resource-card p,
.person-card p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 9px;
  overflow-wrap: anywhere;
}
.resource-card .actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}
.resource-card .actions button {
  font-size: 12px;
}
.resource-card.archived {
  opacity: 0.65;
}
.person-top {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 15px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e7ede4;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}
.person-top small {
  display: block;
  margin-top: 4px;
}
.person-card .current {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.person-card .current strong {
  font-size: 13px;
  display: block;
  margin: 11px 0 5px;
}
.person-card .current button {
  margin-top: 12px;
}
.notice {
  padding: 13px 16px;
  background: #e7ede4;
  color: var(--deep);
  border: 1px solid #c8d2bf;
  border-radius: 9px;
  margin-bottom: 20px;
  font-size: 12px;
  line-height: 1.7;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.loading {
  padding: 70px;
  text-align: center;
  color: var(--muted);
}
.error-state {
  background: #fbebe5;
  border-color: #dfbeba;
  color: var(--danger);
}
label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 650;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  min-height: 44px;
  font-size: 13px;
}
textarea {
  resize: vertical;
  min-height: 86px;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--primary);
}
.auth {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}
.auth-story {
  background: var(--deep);
  color: #fffdf8;
  padding: 60px 10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-story .brand {
  position: absolute;
  top: 45px;
}
.auth-story .eyebrow {
  color: #d4c190;
  margin-top: 70px;
}
.auth-story h1 {
  font-size: clamp(48px, 5vw, 80px);
  letter-spacing: -3px;
  margin: 18px 0 25px;
  line-height: 1.07;
}
.auth-story > p {
  font-size: 16px;
  line-height: 1.8;
  max-width: 380px;
  color: #d4e0d1;
}
.story-points {
  margin: 35px 0;
  border-top: 1px solid #42604a;
  padding-top: 25px;
}
.story-points p {
  font-size: 13px;
  line-height: 2.8;
  color: #d4e0d1;
}
.auth-story > small {
  color: #bccdb6;
}
.auth-panel {
  padding: 80px max(35px, 15%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-panel h2 {
  font-size: 32px;
  line-height: 1.25;
}
.auth-panel > p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin: 16px 0 30px;
}
.auth-panel form {
  display: grid;
  gap: 20px;
}
.auth-panel #registration-fields {
  display: grid;
  gap: 20px;
}
.auth-panel > small {
  margin-top: 34px;
}
.auth-panel > .text-button {
  margin-top: 17px;
}
.mobile-brand {
  display: none;
}
.form-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.6;
  min-height: 0;
}
.form-error:empty {
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 0;
  color: var(--ink);
  width: min(790px, calc(100vw - 32px));
  max-height: 90dvh;
  box-shadow: 0 25px 100px #142d2233;
}
dialog::backdrop {
  background: #142d2288;
  backdrop-filter: blur(3px);
}
.dialog-head {
  position: sticky;
  top: 0;
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 21px 25px;
  border-bottom: 1px solid var(--line);
  z-index: 4;
  gap: 12px;
}
.dialog-head .secondary {
  padding: 5px 12px;
}
.dialog-body {
  padding: 22px 25px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.form-grid > .full {
  grid-column: 1/-1;
}
.form-section {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 22px;
}
.form-section h3 {
  font-size: 14px;
  margin-bottom: 12px;
}
.checkbox-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #f1eee6;
  border: 1px solid #e7dece;
  border-radius: 7px;
  padding: 10px;
  font-size: 12px;
}
.check-row label {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
}
.check-row input[type="number"] {
  width: 74px;
  min-height: 38px;
  padding: 7px;
}
.form-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 11px 0;
}
.dialog-actions {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 17px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  z-index: 3;
}
.dialog-actions > div {
  display: flex;
  gap: 10px;
}
.history {
  display: grid;
  gap: 9px;
  margin-top: 13px;
  max-height: 210px;
  overflow: auto;
}
.history p {
  font-size: 11px;
  line-height: 1.6;
  padding: 10px;
  background: var(--paper);
  border-radius: 5px;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  border: 1px solid #72906f;
  background: var(--deep);
  color: white;
  padding: 15px 22px;
  border-radius: 10px;
  z-index: 20;
  font-size: 13px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 8px 30px #16362822;
}
.management-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.management-grid .panel > p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin: 12px 0 20px;
}
.management-grid .panel form {
  display: grid;
  gap: 13px;
}
.audit-list {
  padding: 0;
  list-style: none;
}
.audit-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.7;
}
.mobile-menu-label {
  display: none;
}
@media (min-width: 1650px) {
  .workspace {
    padding-inline: 50px;
  }
  .calendar-grid th,
  .calendar-grid td {
    width: auto;
  }
  .calendar-grid {
    min-width: 1300px;
  }
}
@media (max-width: 1120px) {
  .shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .sidebar {
    padding-inline: 13px;
  }
  .workspace {
    padding: 26px 23px;
  }
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
  .page-header {
    align-items: flex-start;
  }
  .header-actions {
    flex-direction: column;
  }
  .brand {
    font-size: 20px;
  }
  .summary {
    gap: 9px;
  }
  .metric {
    padding: 14px;
  }
  .calendar-grid {
    min-width: 1240px;
  }
}
@media (max-width: 760px) {
  h1 {
    font-size: 26px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 13px 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .sidebar .brand {
    font-size: 20px;
  }
  .brand-mark {
    width: 35px;
    height: 38px;
    font-size: 29px;
  }
  .sidebar .brand small {
    font-size: 9px;
  }
  .sidebar .company-name {
    display: none;
  }
  .sidebar nav {
    grid-column: 1/-1;
    display: flex;
    gap: 6px;
    overflow: auto;
    padding: 0 0 2px;
  }
  .nav-button {
    width: auto;
    padding: 9px 13px;
    flex-shrink: 0;
    min-height: 43px;
    font-size: 11px;
    gap: 7px;
  }
  .nav-button svg {
    height: 17px;
    width: 17px;
  }
  .sidebar-note {
    display: none;
  }
  .profile {
    border: 0;
    padding: 0;
    text-align: right;
    gap: 0;
  }
  .profile > span {
    font-size: 11px;
    max-width: 140px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .profile > small {
    font-size: 9px;
  }
  .profile button {
    font-size: 10px;
    justify-content: flex-end;
    min-height: 28px;
    padding: 4px 0;
  }
  .workspace {
    padding: 23px 16px;
  }
  .page-header {
    display: block;
    margin-bottom: 21px;
  }
  .header-actions {
    flex-direction: row;
    margin-top: 18px;
  }
  .header-actions button {
    font-size: 12px;
  }
  .header-actions .primary {
    flex: 1;
  }
  .page-header p {
    font-size: 12px;
  }
  .demo-banner {
    font-size: 10px;
    line-height: 1.6;
    margin-bottom: 20px;
  }
  .summary {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .metric {
    padding: 13px 14px;
  }
  .metric strong {
    font-size: 25px;
  }
  .metric span {
    font-size: 10px;
  }
  .metric p {
    font-size: 9px;
  }
  .agenda-tools {
    gap: 13px;
  }
  .view-tabs {
    width: 100%;
    justify-content: space-between;
  }
  .view-tabs button {
    flex: 1;
    font-size: 11px;
    padding: 9px 6px;
  }
  .date-controls {
    gap: 5px;
    width: 100%;
    justify-content: space-between;
  }
  .date-controls .arrow {
    padding: 6px 8px;
    min-width: 37px;
  }
  .date-controls button {
    font-size: 11px;
    padding: 7px 9px;
  }
  .date-controls input {
    max-width: 136px;
    font-size: 12px;
    padding: 8px 7px;
  }
  .date-controls select {
    max-width: 100px;
    padding: 8px;
    font-size: 11px;
  }
  .filter-bar {
    gap: 9px;
    margin-bottom: 13px;
  }
  .filter-bar label {
    font-size: 9px;
  }
  .filter-bar input,
  .filter-bar select {
    font-size: 11px;
    padding: 9px 8px;
  }
  .range-heading {
    margin-top: 17px;
    display: block;
  }
  .range-heading h2 {
    font-size: 16px;
  }
  .range-heading p {
    margin-top: 7px;
    font-size: 11px;
  }
  .legend {
    gap: 6px;
  }
  .status {
    font-size: 9px;
    padding: 4px 6px;
  }
  .desktop-calendar {
    display: none;
  }
  .mobile-calendar {
    display: block;
  }
  .full-grid {
    margin-top: 14px;
  }
  .full-grid > summary {
    padding: 12px 0;
    font-size: 12px;
    font-weight: 650;
    color: var(--primary);
    cursor: pointer;
  }
  .full-grid .calendar-scroll {
    margin-top: 12px;
  }
  .mobile-resource {
    padding: 16px;
  }
  .appointment-card {
    padding: 13px;
  }
  .appointment-card strong {
    font-size: 13px;
  }
  .appointment-card .card-meta {
    font-size: 11px;
  }
  .appointment-card .card-team {
    font-size: 12px;
  }
  .appointment-card .card-time {
    font-size: 12px;
  }
  .month-grid {
    display: none;
  }
  .month-mobile {
    display: block;
  }
  .kanban {
    display: block;
    overflow: visible;
  }
  .kanban-column {
    display: none;
    min-height: 170px;
  }
  .kanban-column.selected {
    display: block;
  }
  .mobile-stage-select {
    display: grid;
    gap: 8px;
    margin-bottom: 15px;
  }
  .table-scroll {
    display: none;
  }
  .table-cards {
    display: grid;
    gap: 12px;
  }
  .day-block {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 0;
  }
  .day-block time {
    font-size: 11px;
  }
  .day-block > div {
    display: block;
  }
  .day-block .appointment-card {
    margin-bottom: 9px;
  }
  .resource-toolbar .view-tabs {
    overflow: auto;
    justify-content: flex-start;
  }
  .resource-toolbar .view-tabs button {
    flex-shrink: 0;
    flex: none;
  }
  .resource-toolbar {
    gap: 13px;
  }
  .resource-toolbar > button {
    width: 100%;
    font-size: 12px;
  }
  .resource-cards,
  .people-grid {
    grid-template-columns: 1fr;
  }
  .management-grid {
    grid-template-columns: 1fr;
  }
  .page-footer {
    font-size: 9px;
    line-height: 1.6;
    flex-wrap: wrap;
  }
  .auth {
    display: block;
    min-height: 100dvh;
  }
  .auth-story {
    display: none;
  }
  .auth-panel {
    padding: 32px 24px;
    max-width: 470px;
    margin: auto;
    min-height: 100dvh;
  }
  .mobile-brand {
    display: flex;
    margin-bottom: 65px;
  }
  .auth-panel h2 {
    font-size: 29px;
  }
  .auth-panel > p {
    font-size: 13px;
  }
  .dialog-head,
  .dialog-body,
  .dialog-actions {
    padding: 17px;
  }
  .dialog-head h2 {
    font-size: 21px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid > .full {
    grid-column: auto;
  }
  .checkbox-list {
    grid-template-columns: 1fr;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  .dialog-actions .primary,
  .dialog-actions .secondary {
    font-size: 12px;
  }
  .toast {
    bottom: 18px;
    right: 16px;
  }
  .resource-card {
    padding: 18px;
  }
  .notice {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.plain-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.plain-fieldset:disabled {
  opacity: 1;
}
.plain-fieldset:disabled input,
.plain-fieldset:disabled select,
.plain-fieldset:disabled textarea {
  color: var(--ink);
  opacity: 1;
  background: #f5f1e8;
}
.management-grid > .full {
  grid-column: 1/-1;
}
@media (min-width: 761px) {
  .agenda-tools .date-controls {
    flex-wrap: nowrap;
    flex-shrink: 0;
  }
  .date-controls select {
    width: 112px;
  }
  .workspace {
    padding-top: 25px;
  }
  .page-header {
    margin-bottom: 22px;
  }
  .summary {
    margin-bottom: 18px;
  }
  .metric {
    padding-block: 13px;
  }
  .metric strong {
    font-size: 28px;
    margin-top: 4px;
  }
  .metric p {
    margin-top: 4px;
  }
  .calendar-grid {
    min-width: 1120px;
  }
  .calendar-grid th,
  .calendar-grid td {
    width: auto;
  }
  .calendar-grid .resource-label {
    width: 152px;
    min-width: 152px;
  }
  .range-heading {
    margin-top: 18px;
  }
  .demo-banner {
    margin-bottom: 18px;
  }
  .calendar-grid th.resource-label small {
    color: #ceddc9;
  }
}
@media (min-width: 761px) and (max-width: 1120px) {
  .agenda-tools {
    display: block;
  }
  .agenda-tools .date-controls {
    margin-top: 12px;
    width: 100%;
    justify-content: flex-start;
  }
  .agenda-tools .view-tabs {
    width: fit-content;
  }
}
@media (max-width: 760px) {
  .sidebar .profile {
    grid-column: 2;
    grid-row: 1;
    max-width: 112px;
  }
  .sidebar .profile > span {
    max-width: 112px;
  }
  .sidebar nav {
    grid-row: 2;
    scrollbar-width: none;
  }
  .sidebar nav::-webkit-scrollbar {
    display: none;
  }
  .date-controls {
    display: grid;
    grid-template-columns: 36px 47px minmax(0, 1fr) 36px;
  }
  .date-controls input {
    max-width: none;
    min-width: 0;
    width: 100%;
  }
  .date-controls select {
    grid-column: 1/-1;
    max-width: none;
    width: 100%;
  }
  .date-controls .arrow {
    min-width: 36px;
  }
  .sidebar .brand {
    font-size: 19px;
  }
  .day-chips {
    gap: 4px;
  }
  .day-chip {
    min-width: 0;
    padding: 9px 5px;
  }
  .calendar-grid th.resource-label small {
    color: #ceddc9;
  }
}

@media (max-width: 760px) {
  input,
  select,
  textarea,
  .filter-bar input,
  .filter-bar select,
  .date-controls input,
  .date-controls select {
    font-size: 16px;
    min-width: 0;
  }
  .filter-bar label {
    min-width: 0;
  }
  .date-controls input {
    font-size: 14px;
  }
  .filter-bar select {
    font-size: 14px;
  }
  .check-row input[type="number"] {
    font-size: 16px;
  }
}

.calendar-grid tbody th.resource-label {
  background: var(--surface);
  color: var(--ink);
  top: auto;
  font-size: 12px;
  padding: 19px 13px;
}
.calendar-grid tbody th.resource-label strong {
  color: var(--ink);
  font-size: 13px;
  margin-top: 0;
}
.calendar-grid tbody th.resource-label small {
  color: var(--muted);
}
.vehicle-grid .card-vehicle {
  display: none;
}
.calendar-grid .appointment-card .card-client {
  font-size: 9px;
}
.calendar-grid .appointment-card .card-items {
  font-size: 9px;
  line-height: 1.4;
}
.calendar-grid .appointment-card .status {
  white-space: normal;
  max-width: 100%;
  font-size: 9px;
  padding: 4px 5px;
}
.status:before {
  flex-shrink: 0;
}

/* Início: rotina do dia primeiro, planejamento em uma tela própria. */
.nav-more summary { list-style: none; cursor: pointer; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more-items { padding: 5px 0 5px 14px; border-left: 1px solid var(--line); margin-left: 21px; }
.home-layout { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(270px,1fr); gap: 24px; align-items: start; }
.home-section-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.home-section-heading h2,.home-next h2 { font-size: 20px; letter-spacing: -.4px; }
.home-section-heading p,.home-next > p { color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 9px; }
.home-section-heading > button { font-size: 12px; flex-shrink: 0; }
.home-summary { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 18px 0; margin-top: 10px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.home-summary strong { color: var(--ink); font-size: 18px; margin-right: 3px; }
.home-summary .home-attention,.home-summary .home-attention strong { color: var(--danger); }
.home-booking { display: grid; grid-template-columns: 88px minmax(0,1fr) auto 16px; gap: 13px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 22px 0; align-items: start; color: var(--ink); }
.home-booking:hover { background: #edf1e8; }
.home-booking-time { font-size: 12px; font-weight: 700; line-height: 1.6; color: var(--primary); }
.home-booking-time > span { display: block; color: var(--muted); font-weight: 500; margin-bottom: 3px; }
.home-booking-copy { display: grid; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.home-booking-copy strong { font-size: 15px; line-height: 1.5; }
.home-booking-copy > span { font-size: 13px; }
.home-booking-copy small { font-size: 12px; line-height: 1.6; }
.home-booking-arrow { color: var(--primary); font-size: 20px; }
.home-booking .status { white-space: normal; }
.home-more { margin-top: 10px; }
.home-side { display: grid; gap: 22px; min-width: 0; }
.home-shortcuts { display: grid; gap: 12px; }
.home-shortcut { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 20px; color: var(--primary); }
.home-shortcut:hover { background: #e7ede4; border-color: var(--accent); }
.home-shortcut svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; flex-shrink: 0; }
.home-shortcut > span:nth-child(2) { flex: 1; }
.home-shortcut strong { font-size: 15px; display: block; }
.home-shortcut small { display: block; margin-top: 7px; font-size: 12px; line-height: 1.6; font-weight: 400; }
.home-next .home-booking { grid-template-columns: minmax(0,1fr) auto; gap: 7px 12px; padding: 17px 0; }
.home-next .home-booking-time { grid-column: 1/-1; }
.home-next .home-booking-copy { grid-column: 1/-1; }
.home-next .home-booking .status { grid-column: 1; justify-self: start; }
.home-next .home-booking-arrow { grid-column: 2; grid-row: 3; }
.home-next .home-booking:last-child { border-bottom: 0; padding-bottom: 0; }
.home-empty { padding: 28px 0; }
.home-empty h3,.home-setup h3 { font-size: 16px; }
.home-empty p,.home-setup p { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 9px; }
.home-setup { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 8px; }
.home-setup button { margin-top: 15px; font-size: 13px; }
@media (max-width: 1200px) {
  .home-layout { grid-template-columns: minmax(0,1fr); }
  .home-side { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
}
@media (max-width: 760px) {
  .sidebar nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); overflow: visible; gap: 5px; }
  .sidebar .nav-button { flex-direction: column; justify-content: center; width: 100%; min-width: 0; gap: 5px; padding: 8px 4px; font-size: 12px; min-height: 58px; }
  .sidebar .nav-button.active { box-shadow: inset 0 -3px var(--accent); }
  .nav-more { position: relative; }
  .nav-more-items { position: absolute; right: 0; top: calc(100% + 8px); width: 220px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 25px #1636281a; padding: 8px; margin: 0; }
  .nav-more-items .nav-button { flex-direction: row; justify-content: flex-start; padding: 12px; font-size: 14px; min-height: 48px; gap: 12px; }
  .home-layout,.home-side { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .home-day,.home-next { padding: 18px; }
  .home-section-heading { display: block; }
  .home-section-heading > button { padding-top: 12px; }
  .home-summary { gap: 12px; padding-top: 8px; margin-top: 0; font-size: 11px; }
  .home-summary strong { font-size: 16px; }
  .home-booking { grid-template-columns: minmax(0,1fr) auto; gap: 8px 10px; padding: 20px 0; }
  .home-booking-time { grid-column: 1; }
  .home-booking .status { grid-column: 2; grid-row: 1; max-width: 120px; }
  .home-booking-copy { grid-column: 1; grid-row: 2; }
  .home-booking-arrow { grid-column: 2; grid-row: 2; justify-self: end; }
  .home-booking-copy strong { font-size: 15px; }
  .home-next .home-booking .status { grid-row: 3; }
  .home-next .home-booking-copy { grid-row: 2; }
  .home-shortcut { padding: 18px; }
}
