:root {
  color-scheme:light;
  --ink:#202426;
  --muted:#677077;
  --line:#e2e6e8;
  --paper:#f6f7f8;
  --yellow:#fff300;
  --dark:#17191b;
  --blue:#3378a4;
  --green:#27876e;
  --purple:#8964a5;
  --orange:#b67b2b;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-synthesis:none;
  font-size:16px;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  color:var(--ink);
  background:var(--paper);
}

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

button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent;
}

button {
  cursor:pointer;
}

button:disabled {
  cursor:not-allowed;
  opacity:.55;
}

a {
  color:inherit;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #3074be;
  outline-offset:3px;
}

button {
  border:0;
}

svg {
  width:20px;
  height:20px;
  display:block;
  flex-shrink:0;
}

button>span[data-icon],a>span[data-icon] {
  display:inline-flex;
}

.skip-link {
  position:fixed;
  top:-100px;
  left:16px;
  z-index:20;
  background:var(--yellow);
  padding:12px;
}

.skip-link:focus {
  top:12px;
}

.preview-banner {
  min-height:37px;
  padding:9px 24px;
  display:flex;
  justify-content:center;
  gap:14px;
  align-items:center;
  background:#eeecb8;
  color:#414018;
  font-size:.8125rem;
  position:relative;
  z-index:2;
}

.preview-banner strong {
  font-size:.6875rem;
  letter-spacing:.09em;
  white-space:nowrap;
}

.app-shell {
  display:flex;
  min-height:calc(100vh - 37px);
}

.sidebar {
  width:224px;
  flex-shrink:0;
  background:var(--dark);
  color:#eff1f2;
  padding:34px 20px 22px;
  display:flex;
  flex-direction:column;
}

.brand {
  display:flex;
  align-items:center;
  gap:12px;
  color:white;
  text-decoration:none;
  font-size:1.45rem;
  font-weight:750;
  letter-spacing:-.05em;
  padding:0 8px;
}

.brand-mark {
  background:var(--yellow);
  color:#161616;
  width:42px;
  height:42px;
  border-radius:8px;
  display:grid;
  place-items:center;
  position:relative;
  font-weight:900;
  font-size:1.9rem;
}

.brand-mark span {
  position:absolute;
  right:5px;
  bottom:5px;
  font-size:1.2rem;
}

.brand-service {
  display:block;
  font-size:.625rem;
  letter-spacing:.3em;
  font-weight:500;
  line-height:1.6;
}

.nav-caption {
  color:#979da2;
  font-size:.625rem;
  letter-spacing:.13em;
  margin:54px 14px 13px;
}

.nav-item {
  display:flex;
  align-items:center;
  gap:12px;
  background:none;
  color:#b7bec2;
  width:100%;
  border-radius:8px;
  padding:14px 12px;
  font-size:.875rem;
  text-align:left;
  margin-bottom:7px;
}

.nav-item.active {
  background:#33352c;
  color:var(--yellow);
}

.nav-item:hover {
  background:#2b2e30;
}

.nav-item.active:before {
  content:"";
  height:19px;
  width:3px;
  background:var(--yellow);
  border-radius:2px;
  position:absolute;
  margin-left:-12px;
}

.sidebar-bottom {
  margin-top:auto;
  padding-top:80px;
}

.connection-label {
  display:flex;
  align-items:center;
  gap:9px;
  font-size:.75rem;
  color:#d6dbde;
  line-height:1.6;
  padding:15px 6px;
}

.connection-symbol {
  font-size:1.5rem;
  color:#aab1b6;
}

.connection-label small {
  display:block;
  font-size:.625rem;
  color:#9aa3a9;
}

.fleet-link {
  font-size:.8125rem;
  color:#d6dbde;
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:5px 8px 24px;
  text-underline-offset:3px;
}

.fleet-link svg {
  width:14px;
  height:14px;
}

.sidebar-footer {
  font-size:.625rem;
  letter-spacing:.11em;
  color:#929ba1;
  border-top:1px solid #383c3f;
  padding:23px 8px 0;
}

.sidebar-footer small {
  display:block;
  letter-spacing:0;
  font-size:.6875rem;
  margin-top:7px;
  color:#777f85;
}

.main {
  min-width:0;
  flex:1;
  padding:0 36px 22px;
  outline:none;
}

.topbar {
  height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  gap:16px;
}

.breadcrumb {
  font-size:.75rem;
  color:#92989c;
  display:flex;
  gap:12px;
}

.breadcrumb strong {
  font-weight:500;
  color:#626a70;
}

.demo-identity {
  font-size:.75rem;
  color:#626a70;
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}

#account-name {
  max-width:180px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.identity-logout {
  min-width:44px;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--ink);
  text-underline-offset:4px;
}

.demo-avatar {
  width:30px;
  height:30px;
  background:#e6e9eb;
  display:grid;
  place-items:center;
  border:2px solid white;
  border-radius:50%;
  font-size:.625rem;
  font-weight:700;
  flex-shrink:0;
}

.page-heading {
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
  padding:33px 0 25px;
}

.eyebrow {
  font-size:.625rem;
  font-weight:700;
  letter-spacing:.15em;
  color:#8a9298;
  margin-bottom:8px;
}

h1 {
  font-size:2rem;
  letter-spacing:-.045em;
  line-height:1.16;
  margin:0;
  font-weight:720;
}

h2 {
  margin:0;
  font-size:1.35rem;
  letter-spacing:-.035em;
}

.page-heading p {
  font-size:.875rem;
  color:var(--muted);
  margin:11px 0 0;
  line-height:1.5;
}

.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border-radius:7px;
  min-height:42px;
  padding:11px 16px;
  font-size:.8125rem;
  line-height:1.25;
  font-weight:650;
  white-space:nowrap;
}

.button svg {
  width:17px;
  height:17px;
}

.primary {
  color:#212304;
  background:var(--yellow);
  border:1px solid #e7dc00;
  box-shadow:0 1px 2px #17191b0a;
}

.primary:hover {
  background:#eee300;
}

.secondary {
  color:#41494f;
  border:1px solid #dce1e4;
  background:white;
}

.secondary:hover {
  background:#f1f3f5;
}

.view-tabs {
  display:flex;
  gap:4px;
  width:max-content;
  padding:4px;
  background:#e8ecee;
  border-radius:8px;
  margin-bottom:22px;
}

.view-tabs button {
  display:flex;
  align-items:center;
  gap:8px;
  border-radius:5px;
  background:none;
  color:#78828a;
  padding:9px 15px;
  font-size:.8125rem;
  font-weight:600;
}

.view-tabs button[aria-pressed=true] {
  background:white;
  color:#242a2e;
  box-shadow:0 1px 5px #2024260a;
}

.view-tabs svg {
  width:15px;
  height:15px;
}

.metrics {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-bottom:24px;
}

.metric {
  background:white;
  border:1px solid var(--line);
  border-radius:9px;
  padding:17px 19px;
  display:flex;
  align-items:center;
  gap:14px;
}

.metric-icon {
  width:39px;
  height:39px;
  border-radius:9px;
  background:#f3f5f6;
  color:#808d96;
  display:grid;
  place-items:center;
}

.metric-label {
  font-size:.75rem;
  color:#79838a;
  margin-bottom:5px;
}

.metric-number {
  font-size:1.5rem;
  font-weight:700;
  letter-spacing:-.04em;
}

.metric-number small {
  font-size:.6875rem;
  letter-spacing:0;
  font-weight:400;
  color:#879198;
  margin-left:7px;
}

.planner-panel {
  background:white;
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
}

.planner-toolbar {
  padding:18px 19px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  flex-wrap:wrap;
}

.date-controls {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.week-label {
  font-size:1rem;
  font-weight:650;
  letter-spacing:-.02em;
  min-width:164px;
}

.arrow-group {
  display:flex;
  border:1px solid var(--line);
  border-radius:6px;
  overflow:hidden;
}

.icon-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:white;
  color:#687780;
  width:35px;
  height:35px;
  border-radius:6px;
}

.arrow-group .icon-button {
  border-radius:0;
}

.arrow-group .icon-button+button {
  border-left:1px solid var(--line);
}

.icon-button:hover {
  background:#edf1f3;
}

.icon-button svg {
  width:17px;
  height:17px;
}

.today-button {
  font-size:.75rem;
  background:white;
  color:#52616b;
  border:1px solid var(--line);
  border-radius:6px;
  height:36px;
  padding:0 11px;
}

.date-jump {
  max-width:140px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  color:#65717a;
  padding:7px 8px;
  font-size:.75rem;
  min-height:36px;
}

.publish-button {
  background:#24292d;
  color:white;
  border:1px solid #24292d;
}

.publish-button:hover {
  background:#3a4248;
}

.toolbar-bottom {
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  border-top:1px solid #eef1f3;
  padding:12px 19px;
}

.search-wrap {
  display:flex;
  align-items:center;
  gap:8px;
  color:#9aa4ac;
  min-width:150px;
  flex:1;
  max-width:310px;
}

.search-wrap svg {
  width:16px;
  height:16px;
}

.search-wrap input {
  width:100%;
  padding:6px 0;
  background:none;
  border:0;
  font-size:.8125rem;
  color:var(--ink);
}

.search-wrap input::placeholder {
  color:#939da4;
}

.status-filters {
  display:flex;
  gap:6px;
}

.status-filters button {
  padding:7px 11px;
  font-size:.75rem;
  color:#859098;
  background:none;
  border-radius:5px;
}

.status-filters button[aria-pressed=true] {
  background:#eff2f4;
  color:#3c4850;
}

.calendar-scroll {
  overflow-x:auto;
}

.calendar-grid {
  display:grid;
  grid-template-columns:155px repeat(5,minmax(145px,1fr)) repeat(2,minmax(90px,.65fr));
  min-width:1100px;
}

.calendar-grid>div {
  border-top:1px solid var(--line);
  border-right:1px solid var(--line);
}

.calendar-grid>div:nth-child(8n) {
  border-right:0;
}

.day-head {
  padding:12px 8px 11px;
  min-height:67px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  background:#fcfdfd;
}

.day-name {
  font-size:.6875rem;
  color:#99a1a6;
  font-weight:500;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.day-number {
  font-size:1rem;
  font-weight:650;
  color:#61717b;
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:7px;
}

.day-head.today .day-number {
  background:#252b2f;
  color:white;
}

.day-head.today {
  background:#f8f9eb;
}

.corner-cell {
  padding:14px 15px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  font-size:.6875rem;
  color:#7e8991;
  background:#fcfdfd;
  gap:4px;
}

.corner-cell strong {
  font-size:.75rem;
  color:#64717b;
  font-weight:600;
}

.row-heading {
  padding:17px 12px;
  display:flex;
  align-items:flex-start;
  gap:9px;
  min-height:152px;
  background:#fcfdfd;
}

.person-avatar {
  width:30px;
  height:30px;
  border-radius:50%;
  background:#e7edf0;
  color:#657e8c;
  display:grid;
  place-items:center;
  font-size:.625rem;
  font-weight:700;
  flex-shrink:0;
}

.person-avatar.unassigned {
  background:#f0f1e9;
  color:#899078;
}

.person-info {
  min-width:0;
}

.person-info strong {
  display:block;
  font-size:.75rem;
  font-weight:620;
  margin:2px 0 7px;
  line-height:1.4;
}

.person-info small {
  font-size:.6875rem;
  color:#9ba5ac;
}

.calendar-cell {
  padding:7px;
  background:#fff;
  min-height:152px;
}

.calendar-cell.today {
  background:#fdfdf7;
}

.calendar-cell.weekend {
  background:#fafbfc;
}

.row-heading.unassigned,.calendar-cell.unassigned {
  min-height:100px;
}

.job-card {
  width:100%;
  text-align:left;
  border:1px solid #d8e6ed;
  border-left:3px solid var(--blue);
  border-radius:6px;
  background:#eef5f8;
  padding:10px 9px 9px;
  margin-bottom:7px;
  min-height:103px;
  color:var(--ink);
  transition:box-shadow .15s,transform .15s;
  position:relative;
}

.job-card:hover {
  box-shadow:0 4px 11px #2b3e4b15;
  transform:translateY(-1px);
}

.job-card[data-category=Manutenzione] {
  background:#edf6f2;
  border-color:#d3e8de;
  border-left-color:var(--green);
}

.job-card[data-category=Sopralluogo] {
  background:#f5f0f8;
  border-color:#e5d9ed;
  border-left-color:var(--purple);
}

.job-card[data-category=Interno] {
  background:#f9f3e9;
  border-color:#ecdfca;
  border-left-color:var(--orange);
}

.job-card.is-draft {
  background:#fff!important;
  border-style:dashed;
  border-left-style:solid;
}

.job-time {
  display:block;
  font-size:.6875rem;
  font-weight:700;
  color:#455b67;
  margin-bottom:7px;
  letter-spacing:.01em;
}

.job-title {
  font-size:.75rem;
  font-weight:650;
  line-height:1.4;
  display:block;
}

.job-customer {
  font-size:.6875rem;
  line-height:1.4;
  color:#75858e;
  display:block;
  margin-top:4px;
  overflow-wrap:anywhere;
}

.job-card-footer {
  margin-top:12px;
  display:flex;
  gap:4px;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
}

.job-vehicle {
  font-size:.625rem;
  color:#70818a;
  display:flex;
  align-items:center;
  gap:4px;
}

.job-vehicle svg {
  width:12px;
  height:12px;
}

.state-tag {
  font-size:.5625rem;
  letter-spacing:.025em;
  text-transform:uppercase;
  color:#7d8c95;
  background:#ffffff9e;
  border:1px solid #dce4e6;
  border-radius:3px;
  padding:2px 4px;
  white-space:nowrap;
}

.state-tag.draft {
  background:#fff9df;
  border-color:#e9e0b7;
  color:#8c793d;
}

.cell-add {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:33px;
  border:1px dashed transparent;
  color:#b8c1c6;
  background:transparent;
  border-radius:5px;
  opacity:0;
}

.cell-add:focus-visible,.calendar-cell:hover .cell-add {
  opacity:1;
  border-color:#dce2e6;
}

.cell-add svg {
  width:15px;
  height:15px;
}

.legend {
  padding:15px 18px;
  display:flex;
  align-items:center;
  gap:15px;
  flex-wrap:wrap;
  font-size:.6875rem;
  color:#8b959c;
  border-top:1px solid var(--line);
}

.legend-label {
  color:#a0a9af;
  margin-right:4px;
}

.legend-item {
  display:flex;
  align-items:center;
  gap:6px;
}

.legend-swatch {
  width:7px;
  height:7px;
  border-radius:2px;
  background:var(--blue);
}

.legend-swatch.green {
  background:var(--green);
}

.legend-swatch.purple {
  background:var(--purple);
}

.legend-swatch.orange {
  background:var(--orange);
}

.calendar-empty {
  padding:20px;
  color:var(--muted);
  font-size:.875rem;
  background:#fffef5;
  border-top:1px solid var(--line);
}

.page-footer {
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  font-size:.6875rem;
  line-height:1.5;
  color:#9ba3aa;
  padding:21px 2px 2px;
}

.agenda-toolbar {
  display:flex;
  justify-content:space-between;
  gap:15px;
  align-items:center;
  margin:5px 0 25px;
  padding:17px 19px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
}

.agenda-person {
  display:flex;
  align-items:center;
  gap:11px;
}

.agenda-person label {
  font-size:.75rem;
  color:#7d8790;
}

.agenda-person select {
  display:block;
  margin-top:6px;
  font-weight:600;
  color:#39444b;
  border:0;
  background:#fff;
  padding:0 24px 0 0;
  font-size:.875rem;
}

.agenda-intro {
  display:flex;
  gap:8px;
  align-items:center;
  color:#89949a;
  font-size:.75rem;
}

.agenda-intro svg {
  width:16px;
  height:16px;
}

.agenda-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 270px;
  gap:24px;
}

.agenda-day {
  margin-bottom:26px;
}

.agenda-day-heading {
  display:flex;
  gap:10px;
  align-items:center;
  font-size:.875rem;
  color:#89949b;
  margin-bottom:13px;
}

.agenda-day-heading strong {
  color:#34434d;
  font-weight:650;
}

.today-pill {
  background:#eeefb6;
  color:#5d601e;
  padding:4px 8px;
  font-size:.625rem;
  border-radius:4px;
  font-weight:700;
  text-transform:uppercase;
}

.agenda-card {
  background:#fff;
  border:1px solid var(--line);
  border-radius:9px;
  margin-bottom:13px;
  padding:20px 21px;
  display:grid;
  grid-template-columns:76px minmax(0,1fr);
  gap:18px;
  position:relative;
}

.agenda-card:before {
  content:"";
  position:absolute;
  width:3px;
  background:var(--green);
  top:20px;
  bottom:20px;
  left:0;
  border-radius:0 2px 2px 0;
}

.agenda-time {
  font-size:1.1rem;
  font-weight:700;
  letter-spacing:-.035em;
}

.agenda-time small {
  display:block;
  font-size:.75rem;
  font-weight:400;
  color:#8b98a1;
  letter-spacing:0;
  margin-top:7px;
}

.agenda-category {
  font-size:.625rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#779185;
  font-weight:600;
  margin-bottom:7px;
}

.agenda-card h3 {
  font-size:1.05rem;
  letter-spacing:-.025em;
  line-height:1.4;
  margin:0 0 6px;
}

.agenda-customer {
  font-size:.8125rem;
  color:#839098;
  margin-bottom:15px;
}

.agenda-detail {
  font-size:.75rem;
  color:#7c8c96;
  display:flex;
  gap:7px;
  align-items:flex-start;
  line-height:1.6;
  margin-top:7px;
}

.agenda-detail svg {
  width:14px;
  height:14px;
  margin-top:2px;
  flex-shrink:0;
}

.agenda-notes {
  font-size:.8125rem;
  color:#6b7b85;
  line-height:1.65;
  margin:16px 0;
  padding-top:13px;
  border-top:1px solid #edf0f2;
}

.agenda-actions {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:17px;
}

.agenda-actions .button {
  min-height:36px;
  font-size:.75rem;
  padding:8px 12px;
}

.agenda-side-card {
  padding:23px;
  background:#eef0de;
  border:1px solid #e5e7cf;
  border-radius:9px;
  align-self:start;
}

.agenda-side-card h3 {
  font-size:1rem;
  line-height:1.4;
  margin:12px 0 8px;
}

.agenda-side-card p {
  font-size:.8125rem;
  line-height:1.75;
  color:#747962;
}

.agenda-side-card>svg {
  color:#7d825d;
  width:26px;
  height:26px;
}

.side-divider {
  border-top:1px solid #d9ddc2;
  margin:20px 0;
}

.side-label {
  font-size:.625rem;
  letter-spacing:.12em;
  color:#899071;
}

.side-value {
  font-size:1.6rem;
  font-weight:650;
  margin-top:8px;
  letter-spacing:-.04em;
}

.side-value small {
  font-size:.75rem;
  font-weight:400;
  color:#838b71;
  letter-spacing:0;
  margin-left:4px;
}

.empty-state {
  background:white;
  border:1px dashed #d6dde1;
  border-radius:10px;
  text-align:center;
  padding:46px 20px;
  line-height:1.6;
}

.empty-state svg {
  margin:auto;
  color:#a0aeb7;
  width:30px;
  height:30px;
}

.empty-state h3 {
  font-size:1.1rem;
  margin:15px 0 8px;
}

.empty-state p {
  font-size:.875rem;
  color:#7f8d97;
  max-width:380px;
  margin:0 auto 20px;
}

dialog {
  border:1px solid #dce2e6;
  border-radius:14px;
  padding:0;
  width:min(650px,calc(100% - 28px));
  max-height:calc(100vh - 44px);
  color:var(--ink);
  box-shadow:0 20px 90px #1117;
}

dialog::backdrop {
  background:#17232c75;
  backdrop-filter:blur(3px);
}

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

.dialog-header .eyebrow {
  color:#85929a;
}

.dialog-content {
  padding:21px 26px;
}

.form-intro {
  font-size:.8125rem;
  color:#7c8b94;
  line-height:1.6;
  margin:0 0 22px;
}

.field {
  display:flex;
  flex-direction:column;
  min-width:0;
  gap:8px;
  font-size:.8125rem;
  font-weight:600;
  color:#4d5c66;
  margin-bottom:19px;
}

.field input,.field select,.field textarea {
  width:100%;
  min-width:0;
  border:1px solid #d9e0e4;
  border-radius:6px;
  padding:10px 11px;
  background:#fff;
  color:#34434d;
  min-height:42px;
  font-size:.875rem;
  font-weight:400;
}

.field input::placeholder,.field textarea::placeholder {
  color:#a1abb2;
}

.field select,.agenda-person select {
  appearance:none;
  background-position:right 12px center;
  background-repeat:no-repeat;
  padding-right:34px;
}

.field textarea {
  resize:vertical;
  line-height:1.5;
}

.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px;
}

.time-fields {
  display:grid;
  grid-template-columns:1.3fr 1fr 1fr;
  gap:15px;
}

.field-note {
  font-size:.6875rem;
  font-weight:400;
  color:#97a0a6;
}

.staff-field {
  border:0;
  padding:0;
  margin:0 0 19px;
}

.staff-field legend {
  font-size:.8125rem;
  font-weight:600;
  margin-bottom:10px;
  color:#4d5c66;
}

.staff-field legend span {
  font-size:.6875rem;
  font-weight:400;
  color:#919da6;
}

.staff-field>div {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.staff-option {
  display:flex;
  align-items:center;
  gap:6px;
  border:1px solid #dfe5e8;
  border-radius:6px;
  padding:9px 10px;
  font-size:.75rem;
  color:#657680;
  background:#fbfcfd;
}

.staff-option:has(input:checked) {
  background:#f8f9dc;
  border-color:#d6d88b;
  color:#46491e;
}

.staff-option input {
  accent-color:#696b24;
  width:16px;
  height:16px;
  margin:0;
}

.integration-note {
  font-size:.75rem;
  line-height:1.65;
  color:#929da5;
  margin:-8px 0 20px;
}

.integration-note a {
  text-underline-offset:3px;
  color:#687c88;
}

.dialog-footer {
  display:flex;
  gap:10px;
  align-items:center;
  padding:17px 26px;
  border-top:1px solid var(--line);
  background:#fafbfc;
}

.footer-spacer {
  flex:1;
}

.danger-text {
  background:none;
  color:#ac5d52;
  padding-left:0;
}

.form-error,.conflict-warning {
  font-size:.8125rem;
  line-height:1.6;
  padding:13px 15px;
  border-radius:6px;
  margin:0 0 18px;
}

.form-error {
  background:#fcefeb;
  border:1px solid #ecd6cc;
  color:#9b4c39;
}

.conflict-warning {
  background:#fff8e8;
  border:1px solid #efdfb5;
  color:#8a6c33;
}

.conflict-warning strong {
  display:block;
  margin-bottom:3px;
}

.small-dialog {
  max-width:440px;
}

.small-dialog .dialog-content {
  padding:28px;
}

.small-dialog h2 {
  margin:14px 0;
}

.small-dialog p {
  font-size:.875rem;
  line-height:1.7;
  color:#7f8c94;
}

.small-dialog .integration-note {
  font-size:.75rem;
  margin:14px 0 0;
}

.confirmation-icon {
  width:45px;
  height:45px;
  background:#f2f3cb;
  border-radius:10px;
  display:grid;
  place-items:center;
  color:#868b38;
}

.toast {
  position:fixed;
  bottom:25px;
  left:50%;
  transform:translateX(-50%);
  background:#242d32;
  color:#fff;
  padding:14px 20px;
  border-radius:8px;
  font-size:.8125rem;
  box-shadow:0 6px 25px #17232c25;
  z-index:30;
  max-width:calc(100% - 32px);
  text-align:center;
  line-height:1.5;
}

.noscript {
  position:fixed;
  inset:100px 20px auto;
  background:#fff8dd;
  padding:25px;
  border:1px solid #c8b86a;
  z-index:40;
}

[hidden] {
  display:none!important;
}

@media(min-width:1600px) {
  .main {
    padding-left:48px;
    padding-right:48px;
  }
  .calendar-grid {
    grid-template-columns:165px repeat(5,minmax(155px,1fr)) repeat(2,minmax(100px,.65fr));
  }
  .row-heading,.calendar-cell {
    min-height:182px;
  }
  .job-card {
    padding:12px;
    min-height:112px;
  }
}

@media(max-width:1150px) {
  .sidebar {
    width:195px;
    padding-left:14px;
    padding-right:14px;
  }
  .main {
    padding-left:24px;
    padding-right:24px;
  }
  .page-heading p {
    max-width:400px;
  }
  .agenda-layout {
    grid-template-columns:minmax(0,1fr);
  }
  .agenda-side-card {
    display:none;
  }
  .metrics {
    gap:10px;
  }
  .metric {
    padding:15px 13px;
    gap:9px;
  }
  .metric-icon {
    width:32px;
    height:32px;
  }
  .metric-number small {
    display:none;
  }
  .week-label {
    min-width:145px;
  }
  .date-jump {
    display:none;
  }
}

@media(max-width:760px) {
  .preview-banner {
    padding:9px 14px;
    justify-content:flex-start;
    align-items:flex-start;
    gap:8px;
    font-size:.6875rem;
    line-height:1.5;
  }
  .preview-banner strong {
    font-size:.5625rem;
    padding-top:2px;
  }
  .sidebar {
    display:none;
  }
  .main {
    padding:0 18px 18px;
  }
  .topbar {
    height:58px;
  }
  .breadcrumb {
    font-size:.6875rem;
    gap:9px;
  }
  .breadcrumb>strong {
    display:none;
  }
  .demo-identity {
    font-size:.6875rem;
    gap:6px;
  }
  #account-name {
    max-width:100px;
  }
  .breadcrumb {
    min-width:0;
    flex-shrink:0;
  }
  .breadcrumb>span {
    display:none;
  }
  .demo-avatar {
    width:25px;
    height:25px;
    font-size:.5625rem;
  }
  .page-heading {
    padding:25px 0 20px;
    align-items:flex-start;
    gap:14px;
  }
  .page-heading .eyebrow {
    font-size:.5625rem;
  }
  h1 {
    font-size:1.8rem;
  }
  .page-heading p {
    font-size:.8125rem;
    max-width:270px;
    margin-top:9px;
  }
  .page-heading>.button {
    font-size:0;
    width:41px;
    min-height:41px;
    flex-shrink:0;
    padding:0;
    margin-top:15px;
  }
  .page-heading>.button svg {
    width:20px;
    height:20px;
  }
  .view-tabs {
    margin-bottom:20px;
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .view-tabs button {
    justify-content:center;
    font-size:.8125rem;
    padding:10px 8px;
  }
  .metrics {
    gap:8px;
    margin-bottom:18px;
  }
  .metric {
    padding:13px 10px;
    display:block;
  }
  .metric-icon {
    display:none;
  }
  .metric-label {
    font-size:.6875rem;
    line-height:1.5;
  }
  .metric-number {
    font-size:1.4rem;
  }
  .planner-toolbar {
    padding:15px;
    gap:15px;
  }
  .date-controls {
    gap:8px;
    flex:1;
  }
  .week-label {
    font-size:.875rem;
    min-width:auto;
    flex:1;
  }
  .today-button {
    height:34px;
  }
  .arrow-group .icon-button {
    width:30px;
    height:32px;
  }
  .publish-button {
    width:100%;
    min-height:38px;
    font-size:.75rem;
  }
  .toolbar-bottom {
    padding:10px 14px;
    flex-wrap:wrap;
    gap:9px;
  }
  .search-wrap {
    min-width:100%;
    max-width:none;
  }
  .status-filters button {
    font-size:.75rem;
    padding:6px 10px;
  }
  .calendar-grid {
    grid-template-columns:135px repeat(5,150px) repeat(2,95px);
  }
  .corner-cell,.row-heading {
    position:sticky;
    left:0;
    z-index:1;
    box-shadow:3px 0 6px #33300004;
  }
  .corner-cell {
    z-index:2;
  }
  .legend {
    padding:14px;
    gap:12px;
    font-size:.625rem;
  }
  .legend-label {
    display:none;
  }
  .page-footer {
    font-size:.625rem;
    gap:7px;
    padding-top:20px;
  }
  .agenda-toolbar {
    padding:14px 15px;
    margin:4px 0 22px;
    gap:10px;
  }
  .agenda-intro {
    font-size:.625rem;
    max-width:110px;
    line-height:1.5;
  }
  .agenda-person label {
    font-size:.6875rem;
  }
  .agenda-person select {
    font-size:.8125rem;
  }
  .agenda-card {
    padding:17px 15px;
    grid-template-columns:55px minmax(0,1fr);
    gap:13px;
  }
  .agenda-time {
    font-size:1rem;
  }
  .agenda-time small {
    font-size:.6875rem;
  }
  .agenda-card h3 {
    font-size:.9375rem;
  }
  .agenda-customer {
    font-size:.75rem;
  }
  .agenda-detail {
    font-size:.6875rem;
  }
  .agenda-notes {
    font-size:.75rem;
  }
  .agenda-actions .button {
    font-size:.6875rem;
  }
  .agenda-day-heading {
    font-size:.8125rem;
  }
  .dialog-header {
    padding:20px;
  }
  .dialog-content {
    padding:20px;
  }
  .dialog-footer {
    padding:15px 20px;
    gap:8px;
  }
  .dialog-footer .button {
    font-size:.75rem;
    padding:10px 12px;
  }
  .form-grid {
    grid-template-columns:1fr;
    gap:0;
  }
  .time-fields {
    gap:8px;
  }
  .field input,.field select,.field textarea {
    font-size:1rem;
    padding:10px 8px;
  }
  .field select {
    padding-right:26px;
  }
  .staff-field>div {
    gap:6px;
  }
  .staff-option {
    font-size:.6875rem;
    padding:9px;
  }
  .staff-field legend span {
    display:block;
    margin-top:6px;
  }
  .form-intro {
    font-size:.75rem;
  }
  .dialog-footer .danger-text {
    padding-left:0;
    margin-right:0;
  }
  .small-dialog .dialog-content {
    padding:23px;
  }
  .toast {
    bottom:16px;
    width:max-content;
    font-size:.75rem;
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important;
  }
}

/* Keep operational labels readable in the information-dense planner. */
.button,.nav-item,.view-tabs button,.week-label,.search-wrap input,.status-filters button,.field,.staff-field legend,.staff-option,.person-info strong,.job-title,.job-time {
  font-size:.875rem;
}

.job-customer,.job-vehicle,.agenda-detail,.agenda-customer {
  font-size:.8125rem;
}

.field {
  position:relative;
}

.field:has(select)::after {
  content:"";
  position:absolute;
  right:15px;
  bottom:18px;
  width:6px;
  height:6px;
  border-right:1.5px solid #818d95;
  border-bottom:1.5px solid #818d95;
  transform:rotate(45deg);
  pointer-events:none;
}

.agenda-person label {
  position:relative;
}

.agenda-person label::after {
  content:"";
  position:absolute;
  right:8px;
  bottom:5px;
  width:6px;
  height:6px;
  border-right:1.5px solid #818d95;
  border-bottom:1.5px solid #818d95;
  transform:rotate(45deg);
  pointer-events:none;
}

@media(max-width:760px) {
  .page-heading>.button {
    font-size:0;
  }
  .staff-option {
    font-size:.8125rem;
  }
  .job-customer,.job-vehicle,.agenda-detail,.agenda-customer {
    font-size:.8125rem;
  }
  .agenda-actions .button {
    font-size:.8125rem;
  }
  .dialog-footer .button {
    font-size:.8125rem;
  }
  .week-label {
    font-size:.875rem;
  }
  .button:not(.icon-button),.view-tabs button,.today-button {
    min-height:44px;
  }
  .icon-button {
    min-width:36px;
    min-height:36px;
  }
  .date-controls .icon-button {
    min-width:36px;
    min-height:36px;
  }
}

@media(max-width:600px) {
  .time-fields {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 8px;
  }
  .time-fields>.field:first-child {
    grid-column:1 / -1;
  }
  .time-fields input {
    min-width:0;
    max-width:100%;
  }
}

@media(max-width:420px) {
  .dialog-footer {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .dialog-footer .footer-spacer {
    display:none;
  }
  .dialog-footer .button {
    white-space:normal;
    min-width:0;
    line-height:1.4;
  }
  .dialog-footer .danger-text {
    grid-column:1 / -1;
    justify-self:start;
  }
}

.login-page {
  min-height:100vh;
  background:var(--dark);
}

.login-shell {
  min-height:calc(100svh - 40px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:48px 20px 28px;
}

.login-card {
  width:min(100%,460px);
  padding:40px;
  border-radius:18px;
  background:#fff;
  box-shadow:0 20px 60px #0003;
}

.login-card .login-brand {
  margin:0 0 44px;
  color:var(--ink);
}

.login-brand .brand-mark {
  color:var(--ink);
  background:var(--yellow);
}

.login-brand .brand-mark>span {
  color:var(--ink);
}

.login-card h1 {
  margin:8px 0 18px;
  font-size:2rem;
  letter-spacing:-.06em;
}

.login-card p {
  color:var(--muted);
  font-size:.9375rem;
  line-height:1.65;
}

.login-button {
  width:100%;
  justify-content:space-between;
  margin:20px 0 8px;
  padding:15px 18px;
  text-decoration:none;
}

.login-card .login-note {
  font-size:.8125rem;
}

.login-return {
  display:inline-block;
  margin-top:18px;
  color:var(--ink);
  font-size:.8125rem;
  text-underline-offset:4px;
}

.login-footer {
  margin-top:28px;
  color:#b7bec3;
  font-size:.625rem;
  letter-spacing:.15em;
  text-align:center;
}

@media(max-width:420px) {
  .login-shell { padding:28px 16px; }
  .login-card { padding:28px 24px; }
  .login-card h1 { font-size:1.75rem; }
}

.rights-link {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
}

.rights-users {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rights-users li,
.rights-users form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.rights-users li {
  justify-content: space-between;
  border-top: 1px solid #e6e7e9;
  padding: 10px 0;
}

.rights-users select {
  font: inherit;
  min-height: 38px;
  border: 1px solid #c7c9ce;
  border-radius: 6px;
  padding: 4px;
  background: white;
}

@media (max-width: 400px) {
  .demo-identity:has(.rights-link:not([hidden])) #account-name {
    max-width: 65px;
  }
}
