.m2-directory {
  margin-top: 22px;
}
.m2-message {
  position: fixed;
  z-index: 30;
  inset: 20% 10% auto;
  background: #fff;
  border: 2px solid #087f80;
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 15px 80px #102b3b88;
  overflow-wrap: anywhere;
}
#m2-editor {
  box-shadow: -30px 0 100px #122c3b55;
}
.sidebar {
  overflow-y: auto;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #183344;
  background: #f3f6f8;
  font-size: 16px;
  font-synthesis: none;
  --ink: #122c3b;
  --muted: #607482;
  --line: #dce4e9;
  --accent: #087f80;
  --red: #ad3543;
  --amber: #916014;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 7px;
  padding: 10px 14px;
  font-weight: 600;
  min-height: 42px;
}
button:hover {
  background: #edf4f5;
  border-color: #a3bdc6;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
button.danger {
  color: var(--red);
}
a {
  color: #087376;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 1.9rem;
  letter-spacing: -0.04em;
  margin-bottom: 7px;
}
h2 {
  font-size: 1.1rem;
}
h3 {
  font-size: 1rem;
}
small,
.muted {
  color: var(--muted);
  font-size: 0.875rem;
}
.loading {
  padding: 40px;
}
.shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--ink);
  color: #e5edf0;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font-size: 1.9rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  padding: 0 12px 32px;
}
.brand span {
  color: #48cfbd;
}
.brand small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a9c0ca;
  margin-top: 8px;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.nav {
  border: 0;
  text-align: left;
  background: transparent;
  color: #bfd1d9;
  font-weight: 500;
  display: flex;
  gap: 12px;
}
.nav.active {
  background: #254858;
  color: white;
  box-shadow: inset 3px 0 #48cfbd;
}
.nav:hover {
  background: #254858;
}
.nav .symbol {
  width: 20px;
  text-align: center;
}
.side-bottom {
  margin-top: auto;
  padding: 25px 12px 0;
  font-size: 0.875rem;
  color: #bed0d8;
  line-height: 1.6;
}
.side-bottom strong {
  display: block;
  color: white;
}
.side-bottom button {
  margin-top: 15px;
  background: transparent;
  color: white;
  border-color: #45606e;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 70px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  background: white;
  font-size: 0.875rem;
  gap: 12px;
}
.topbar .tag {
  color: var(--accent);
  background: #e6f4f2;
  padding: 7px 10px;
  border-radius: 5px;
}
.main {
  padding: 32px 36px 60px;
  max-width: 1700px;
  margin: auto;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
  gap: 16px;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
  font-weight: 650;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 25px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 20px;
  border-top: 3px solid #afc6d1;
}
.stat strong {
  display: block;
  font-size: 2rem;
  margin: 10px 0 4px;
  font-weight: 650;
}
.stat.warn {
  border-top-color: #dcaa44;
}
.stat.alert {
  border-top-color: #d45e6c;
}
.stat.good {
  border-top-color: var(--accent);
}
.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.panel-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head h2 {
  margin: 0;
}
.panel-body {
  padding: 20px 22px;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar input[type="search"] {
  flex: 1;
  min-width: 180px;
}
.toolbar input,
.toolbar select {
  width: auto;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
}
th {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 13px 20px;
  background: #fafcfd;
}
td {
  padding: 18px 20px;
  border-top: 1px solid #edf1f4;
  vertical-align: top;
}
td strong {
  display: block;
  margin-bottom: 5px;
}
td .sub {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
  margin-top: 5px;
}
.ride-link {
  padding: 0;
  background: none;
  border: 0;
  min-height: 0;
  text-align: left;
  line-height: 1.5;
  color: var(--ink);
}
.ride-link:hover {
  background: none;
  color: var(--accent);
}
.badge {
  display: inline-block;
  padding: 5px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  background: #edf1f4;
  color: #4a5f6c;
  white-space: nowrap;
}
.badge.confirmed,
.badge.assigned {
  color: #1e657c;
  background: #e9f3f8;
}
.badge.accepted,
.badge.completed,
.badge.enroute,
.badge.IDEALE,
.badge.COMPATIBILE {
  color: #086a5d;
  background: #e6f4ee;
}
.badge.RISCHIOSO,
.badge.draft {
  color: #875808;
  background: #fff3d8;
}
.badge.cancelled,
.badge.NON {
  color: #a43243;
  background: #fdebef;
}
.alert-box {
  border-left: 3px solid #cf6975;
  background: #fff7f7;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.alert-box button {
  font-size: 0.8125rem;
  margin-top: 8px;
}
.resource {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #edf1f4;
  gap: 10px;
}
.resource:last-child {
  border-bottom: 0;
}
.resource strong {
  display: block;
  font-size: 0.875rem;
}
.avatar {
  height: 36px;
  width: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #edf3f7;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 600;
}
.resource-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  line-height: 1.6;
}
.directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.directory .panel {
  margin: 0;
}
.directory h2 {
  font-size: 1.05rem;
}
.detail-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #edf1f4;
  font-size: 0.875rem;
}
.detail-line span:first-child {
  color: var(--muted);
}
.notice {
  padding: 12px 16px;
  border: 1px solid #d4e6eb;
  background: #edf7f8;
  color: #375f6b;
  font-size: 0.875rem;
  border-radius: 6px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.calendar-day {
  margin-bottom: 24px;
}
.calendar-day h2 {
  text-transform: capitalize;
  padding: 0 5px;
}
.calendar-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 15px;
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 16px;
  margin: 8px 0;
  align-items: center;
}
.calendar-item small {
  display: block;
  margin-top: 6px;
}
.calendar-group {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 15px 0 8px;
}
.rides-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 18px;
}
.rides-nav-dates {
  display: flex;
  gap: 6px;
}
.rides-nav-dates button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.rides-nav-label {
  font-size: 0.9375rem;
}
.rides-nav-controls {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}
.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.segmented button {
  border: 0;
  border-radius: 0;
  min-height: 40px;
}
.segmented button + button {
  border-left: 1px solid var(--line);
}
.segmented button.active {
  background: var(--accent);
  color: white;
}
.day-group-head {
  padding: 14px 22px 8px;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 8px;
}
.day-group-head.alert {
  color: #a43243;
}
.day-group-head .counts {
  font-size: 0.8125rem;
}
details > summary.day-group-head {
  cursor: pointer;
  list-style: none;
}
details > summary.day-group-head::-webkit-details-marker {
  display: none;
}
details > summary.day-group-head::before {
  content: "▸ ";
}
details[open] > summary.day-group-head::before {
  content: "▾ ";
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: #102b3b55;
  z-index: 5;
}
.drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(740px, 100%);
  background: #f7f9fa;
  z-index: 6;
  box-shadow: -15px 0 60px #152b3b30;
  overflow-y: auto;
}
.drawer-header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-header h2 {
  margin: 0;
}
.drawer-content {
  padding: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.full {
  grid-column: 1/-1;
}
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #385261;
}
input,
select,
textarea {
  display: block;
  margin-top: 7px;
  border: 1px solid #c8d5dd;
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  background: white;
  color: var(--ink);
  min-height: 43px;
}
textarea {
  resize: vertical;
  min-height: 78px;
}
.section-label {
  grid-column: 1/-1;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
  margin-top: 8px;
  color: var(--muted);
}
.form-grid > details {
  grid-column: 1/-1;
  margin-top: 8px;
}
.form-grid > details > summary {
  cursor: pointer;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 650;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  list-style: none;
}
.form-grid > details > summary::-webkit-details-marker {
  display: none;
}
.form-grid > details > summary::before {
  content: "▸ ";
}
.form-grid > details[open] > summary::before {
  content: "▾ ";
}
.form-grid > details > .form-grid {
  margin-top: 14px;
}
.form-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.error {
  color: #a72c3e;
  background: #fff0f2;
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 0.875rem;
}
.error:empty {
  display: none;
}
.candidate {
  padding: 15px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  margin: 10px 0;
}
.candidate-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.candidate p {
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 10px 0;
}
.candidate button {
  font-size: 0.875rem;
}
.audit {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
  line-height: 1.6;
}
.audit small {
  display: block;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  background: var(--ink);
  color: white;
  padding: 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-story .brand {
  padding: 0 0 70px;
}
.login-story h1 {
  font-size: 3.4rem;
  line-height: 1.08;
  max-width: 490px;
  margin-bottom: 25px;
}
.login-story p {
  line-height: 1.7;
  color: #bfd1d9;
  max-width: 400px;
}
.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 30px;
}
.login-form {
  max-width: 370px;
  width: 100%;
}
.login-form label {
  margin: 20px 0;
}
.login-form button {
  width: 100%;
  margin: 10px 0 20px;
}
.login-form h1 {
  font-size: 1.7rem;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 13px 20px;
  border-radius: 8px;
  z-index: 20;
  max-width: 90vw;
  box-shadow: 0 6px 25px #0003;
}
#toast:empty {
  display: none;
}
.status-actions {
  margin: 15px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.driver-card {
  background: white;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 15px 0;
}
.driver-card h2 {
  font-size: 1.2rem;
}
.driver-card p {
  line-height: 1.6;
}
.mini-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.counts {
  font-size: 0.875rem;
  color: var(--muted);
}
@media (min-width: 1450px) {
  .grid-main {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .main {
    padding: 25px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .grid-main {
    grid-template-columns: 1fr;
  }
  .directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .grid-main aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}
@media (max-width: 720px) {
  .table-wrap table,
  .table-wrap tbody {
    display: block;
    width: 100%;
  }
  .table-wrap thead {
    display: none;
  }
  .table-wrap tbody tr {
    display: grid;
    grid-template-columns: 85px minmax(0, 1fr);
    padding: 15px;
    gap: 7px 12px;
    border-bottom: 1px solid var(--line);
  }
  .table-wrap tbody td {
    display: block;
    padding: 0 !important;
    border: 0;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .table-wrap tbody td:first-child {
    grid-column: 1;
    grid-row: 1/4;
    font-variant-numeric: tabular-nums;
  }
  .table-wrap tbody td:not(:first-child) {
    grid-column: 2;
  }
  .table-wrap tbody td:first-child .sub {
    font-size: 0.75rem;
  }
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 15px;
  }
  .sidebar .brand {
    font-size: 1.5rem;
    padding: 0 5px 13px;
  }
  .brand small {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 5px;
  }
  .nav {
    white-space: nowrap;
    font-size: 0.875rem;
    padding: 9px;
  }
  .nav .symbol {
    display: none;
  }
  .side-bottom {
    display: none;
  }
  .topbar {
    height: auto;
    min-height: 55px;
    padding: 10px 16px;
    flex-wrap: wrap;
  }
  .main {
    padding: 23px 15px 40px;
  }
  .heading {
    flex-direction: column;
    gap: 12px;
  }
  h1 {
    font-size: 1.6rem;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat strong {
    font-size: 1.7rem;
  }
  .grid-main aside {
    display: block;
  }
  .directory {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .full,
  .section-label {
    grid-column: auto;
  }
  .drawer-content {
    padding: 18px;
  }
  .calendar-item {
    grid-template-columns: 70px minmax(0, 1fr);
  }
  .calendar-item > button {
    grid-column: 2;
  }
  .login-wrap {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 30px;
  }
  .login-story .brand {
    padding: 0 0 20px;
  }
  .login-story h1 {
    font-size: 2rem;
    margin: 0;
  }
  .login-story p {
    display: none;
  }
  .login-form-wrap {
    padding: 30px 25px;
  }
  .toolbar > * {
    flex: 1;
  }
  .toolbar input[type="date"] {
    min-width: 150px;
  }
  .rides-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .rides-nav-dates {
    justify-content: space-between;
  }
  .rides-nav-dates button {
    flex: 1;
    font-size: 0.8125rem;
    padding: 9px 6px;
  }
  .rides-nav-label {
    text-align: center;
  }
  .rides-nav-controls {
    margin-left: 0;
    justify-content: space-between;
  }
  .segmented {
    flex: 1;
  }
  .segmented button {
    flex: 1;
  }
  .candidate-top {
    align-items: flex-start;
    flex-direction: column;
  }
  .table-wrap td,
  .table-wrap th {
    padding: 14px;
  }
  .grid-main .table-wrap th:nth-child(3),
  .grid-main .table-wrap td:nth-child(3) {
    display: none;
  }
}
.wedding-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check-item input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
}
.check-item input[data-label] {
  flex: 1;
  min-width: 0;
}
.wedding-timeline {
  padding-left: 22px;
}
.wedding-timeline li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line, #ddd);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.wedding-timeline li div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.occupancy {
  margin-bottom: 20px;
}
.occupancy p {
  font-size: 1.1rem;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
fieldset[disabled] {
  opacity: 0.8;
}
.print-preview {
  position: fixed;
  inset: 20px;
  z-index: 1000;
  background: white;
  color: #111;
  padding: 32px;
  overflow: auto;
  box-shadow: 0 0 0 30px #0008;
}
.print-preview dt {
  font-weight: 700;
  margin-top: 12px;
}
.print-preview dd {
  margin-left: 0;
  white-space: pre-wrap;
}
.sign-name {
  text-align: center;
  font-size: 64px;
  margin-top: 20vh;
}
.wedding-timeline button {
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .wedding-timeline li {
    display: block;
  }
  .wedding-timeline button {
    margin-top: 8px;
  }
  .print-preview {
    inset: 8px;
    padding: 16px;
  }
  .sign-name {
    font-size: 40px;
  }
}
@media print {
  body:has(#wedding-print) > * {
    display: none !important;
  }
  body > #wedding-print {
    display: block !important;
    position: static;
    inset: auto;
    padding: 0;
    box-shadow: none;
    overflow: visible;
  }
  .no-print {
    display: none !important;
  }
  .print-preview li {
    break-inside: avoid;
  }
  .sign-name {
    font-size: 64pt;
    margin-top: 30vh;
  }
}
