:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #15364d;
  background: #eef5f7;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    linear-gradient(115deg, #0b5272, #168d91) top/100% 214px no-repeat,
    linear-gradient(155deg, #d9eff2 0, #eef5f7 320px, #f5f8fb 100%);
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
}
main {
  max-width: 900px;
  margin: auto;
  padding: 18px 14px 115px;
}
.top,
.month-head,
.summary,
.section-title,
.trip,
.dialog-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px #083c5266;
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  grid-area: 1/1;
}
.brand-logo img:not([hidden]) + .brand-fallback {
  display: none;
}
.brand-fallback {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0b5272;
  letter-spacing: -0.12em;
  grid-area: 1/1;
  padding-right: 5px;
}
.brand-fallback span {
  color: #168d91;
}
.brand-fallback b {
  color: #ecab3e;
  font-size: 0.85rem;
  letter-spacing: 0;
}
.cabinet {
  font-size: 0.84rem;
  color: #b9f3ed;
  font-weight: 700;
  line-height: 1.2;
}
.brand {
  font-size: 1.23rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: white;
  line-height: 1.2;
}
.sub,
.hint,
small {
  color: #5c7080;
}
.top .sub {
  color: #d3f0f1;
}
.sub {
  font-size: 0.85rem;
}
.month-head {
  margin: 27px 0 12px;
}
.month-head h1 {
  color: white;
  text-shadow: 0 1px 2px #0b526344;
}
.month-head h1 {
  font-size: 1.5rem;
  margin: 0;
  text-transform: capitalize;
  text-align: center;
}
.icon {
  border: 1px solid #cbd8e1;
  background: white;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  color: #123e5a;
  font-size: 1.4rem;
}
.panel {
  background: white;
  border: 1px solid #d5e0e8;
  border-radius: 18px;
  box-shadow: 0 8px 28px #12304a0a;
}
.summary {
  padding: 18px 20px;
  background: linear-gradient(110deg, #123e5a, #176e86);
  color: white;
  border: 0;
  box-shadow: 0 11px 28px #175f7b33;
}
.summary small {
  color: #c7ebec;
}
.summary strong {
  font-size: 1.6rem;
}
.calendar {
  padding: 9px;
  margin-top: 12px;
  border-top: 4px solid #29aaa4;
}
.grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.weekday {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #637687;
  padding: 8px 0;
}
.day {
  height: 70px;
  border: 1px solid transparent;
  background: #f6f8fa;
  border-radius: 11px;
  color: #183047;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px;
  text-align: left;
}
.day.active {
  background: linear-gradient(145deg, #c9f1ea, #dceafc);
  border-color: #75c9bd;
  color: #075d66;
}
.day.selected {
  outline: 3px solid #eead3a;
  outline-offset: -2px;
}
.amount {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.blank {
  visibility: hidden;
}
.section-title {
  margin: 24px 0 11px;
}
.section-title h2 {
  font-size: 1.13rem;
  margin: 0;
}
.section-title span {
  color: #617384;
}
.trip {
  padding: 15px 16px;
  margin-bottom: 9px;
  border-left: 5px solid #20a59d;
}
.trip strong {
  display: block;
  margin: 5px 0;
}
.trip small {
  font-size: 0.85rem;
}
.trip .buttons {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.trip button {
  border: 0;
  background: #edf3f6;
  color: #16445b;
  border-radius: 10px;
  padding: 8px;
}
.empty {
  padding: 27px;
  text-align: center;
  color: #647686;
}
.primary {
  border: 0;
  background: linear-gradient(115deg, #0d667d, #118f91);
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  padding: 13px 17px;
  min-height: 48px;
}
.outline {
  border: 1px solid #83b9c4;
  background: #fff;
  color: #123e5a;
  font-weight: 700;
  border-radius: 12px;
  padding: 12px 16px;
  min-height: 46px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  background: #ffffffed;
  border-top: 1px solid #d8e1e7;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px max(12px, env(safe-area-inset-bottom));
}
.bottom button {
  width: min(48%, 270px);
}
dialog {
  border: 0;
  border-radius: 19px;
  width: min(94vw, 530px);
  max-height: 90vh;
  padding: 0;
  box-shadow: 0 25px 80px #122c4455;
}
dialog::backdrop {
  background: #102b46aa;
}
.dialog-body {
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
}
.dialog-body h2 {
  margin: 0 0 16px;
}
.dialog-body label:not(.file-button) {
  display: flex;
  flex-direction: column;
  font-weight: 650;
  gap: 6px;
  margin: 12px 0;
}
.dialog-body input:not([type="checkbox"]) {
  width: 100%;
  min-height: 46px;
  padding: 11px;
  border: 1px solid #bdced9;
  border-radius: 10px;
  background: white;
}
.dialog-body .checkbox {
  flex-direction: row !important;
  align-items: center;
}
.checkbox input {
  width: 22px;
  height: 22px;
}
.hint {
  font-size: 0.88rem;
  line-height: 1.45;
}
.dialog-actions {
  justify-content: flex-end;
  margin-top: 20px;
}
.error {
  color: #a52b32;
  min-height: 20px;
}
.range {
  display: flex;
  gap: 10px;
}
.range label {
  flex: 1;
  min-width: 0;
}
.tool-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.file-button {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.report {
  display: none;
}
@media (max-width: 600px) {
  .day {
    height: 58px;
    padding: 6px;
  }
  .amount {
    font-size: 0.68rem;
  }
  .summary strong {
    font-size: 1.35rem;
  }
  .month-head h1 {
    font-size: 1.38rem;
  }
}
@media print {
  body {
    background: white;
  }
  main,
  dialog {
    display: none !important;
  }
  .report {
    display: block;
    padding: 9mm;
    color: #111;
    font: 11pt Arial;
  }
  .report h1 {
    font-size: 20pt;
  }
  .report .report-brand {
    color: #0d6177;
    font-weight: bold;
    margin: 0 0 4mm;
  }
  table {
    border-collapse: collapse;
    width: 100%;
    font-size: 9pt;
  }
  th,
  td {
    padding: 7px;
    border-bottom: 1px solid #bbb;
    text-align: left;
    vertical-align: top;
    page-break-inside: avoid;
  }
}

@media (max-width: 410px) {
  .cabinet {
    font-size: 0.72rem;
  }
  .brand {
    font-size: 1.07rem;
  }
  .brand-logo {
    width: 48px;
    height: 48px;
  }
  .top .outline {
    padding: 9px 11px;
    font-size: 0.88rem;
  }
  .identity {
    gap: 8px;
  }
}

.dialog-body select {
  width: 100%;
  min-height: 46px;
  padding: 11px;
  border: 1px solid #bdced9;
  border-radius: 10px;
  background: white;
  font: inherit;
}
.export-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}
.vehicle-row {
  padding: 13px 14px;
  margin: 9px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.vehicle-row strong {
  display: block;
}
.vehicle-row small {
  display: block;
}
.vehicle-row .buttons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.vehicle-row button {
  border: 1px solid #bbced8;
  border-radius: 8px;
  background: white;
  color: #0d667d;
  padding: 8px;
}
.vehicle-row.default {
  border-left: 5px solid #e9aa35;
}
@media (max-width: 480px) {
  .vehicle-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .export-actions button {
    flex: 1;
  }
}

.vehicle-thumb {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
  background: #deecf0;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
}
.vehicle-row .vehicle-info {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.trip .vehicle-thumb {
  width: 46px;
  height: 46px;
}
.photo-preview {
  min-height: 60px;
  border: 1px dashed #8bb8c2;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5c7080;
  font-size: 0.88rem;
}
.photo-preview img {
  width: 66px;
  height: 66px;
  border-radius: 10px;
  object-fit: cover;
}
.vehicle-row .file-button {
  padding: 8px;
  border-radius: 8px;
  min-height: 0;
  font-size: 0.88rem;
}
.ik-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(110deg, #123e5a, #176e86);
  border-radius: 14px;
  color: white;
  padding: 16px;
  margin: 12px 0;
}
.ik-summary strong {
  font-size: 1.5rem;
}
.ik-line {
  padding: 12px;
  margin: 6px 0;
  display: flex;
  justify-content: space-between;
  gap: 9px;
}
.ik-line strong {
  white-space: nowrap;
}
.ik-management {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.ik-reconcile {
  padding: 14px;
  margin-top: 14px;
  line-height: 1.55;
}
.ik-reconcile h3 {
  margin: 0 0 8px;
}
.ik-rate-row {
  display: grid;
  grid-template-columns: 58px repeat(4, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
  margin: 6px 0;
}
.ik-rate-row input {
  min-width: 0;
  padding: 8px !important;
}
.ik-rate-labels {
  font-size: 0.72rem;
  color: #536b7a;
}
.ik-rate-row span {
  font-size: 0.8rem;
}
.ik-warning {
  color: #a35d05;
}
.ik-positive {
  color: #187b53;
}
.ik-negative {
  color: #a52b32;
}
@media (max-width: 500px) {
  .ik-rate-row {
    grid-template-columns: 46px repeat(4, minmax(0, 1fr));
  }
  .ik-rate-row input {
    font-size: 0.78rem;
    padding: 6px !important;
  }
}
@media print {
  .report .report-meta {
    font-weight: bold;
    color: #22475b;
  }
  .report .report-note {
    font-size: 9pt;
    color: #444;
  }
}

.ik-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 11px;
}
.ik-tile {
  background: #fff;
  border: 1px solid #b7dce0;
  border-radius: 15px;
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ik-tile:first-child {
  border-top: 4px solid #2ca6a0;
}
.ik-tile:last-child {
  border-top: 4px solid #e7aa35;
}
.ik-tile span {
  font-size: 0.85rem;
  color: #516979;
}
.ik-tile strong {
  font-size: 1.35rem;
  color: #0d6177;
}
.ik-calendar-note {
  font-size: 0.82rem;
  color: #4e6878;
  margin: 8px 3px 12px;
  line-height: 1.35;
}
@media (max-width: 390px) {
  .ik-tile {
    padding: 12px;
  }
  .ik-tile strong {
    font-size: 1.18rem;
  }
}

.quick-setup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 14px;
  flex-wrap: wrap;
}
.quick-setup button {
  background: #e7f5f4;
  border-color: #0d8c8c;
  color: #075e65;
}

.default-checkbox {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 7px;
  font-size: 0.87rem;
  font-weight: 650;
  color: #0b6873;
  margin: 6px 0 0 !important;
}
.default-checkbox input {
  width: 19px;
  height: 19px;
  accent-color: #0d8c8c;
}

.ik-shortcuts {
  padding: 14px 16px;
  margin: 0 0 14px;
  border-left: 4px solid #e7aa35;
}
.ik-shortcuts label {
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ik-shortcuts input {
  width: 100px;
  min-height: 42px;
  border: 1px solid #a9c8ce;
  border-radius: 9px;
  padding: 8px;
  font: inherit;
}
.ik-shortcut-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.ik-shortcut-buttons button {
  flex: 1;
  min-width: 170px;
}
.ik-shortcuts p {
  margin: 10px 0 0;
  color: #536b7a;
  font-size: 0.85rem;
}
/* Mobile workspace refresh */
:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: #173149;
  background: #f5f8fa;
}
body {
  background:
    radial-gradient(circle at 15% -5%, #1a8a90 0, #123e5a 36%, transparent 36%)
      top/100% 205px no-repeat,
    #f5f8fa;
  min-height: 100dvh;
}
main {
  max-width: 760px;
  padding: 19px 16px 122px;
}
.top {
  align-items: center;
}
.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: 0 7px 20px #082d3b33;
}
.cabinet {
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #bce9e9;
}
.brand {
  font-size: 1.28rem;
  font-weight: 780;
  letter-spacing: -0.035em;
}
.top .sub {
  font-size: 0.79rem;
  opacity: 0.84;
}
.top #open-tools {
  border-color: #ffffff80;
  background: #ffffff1a;
  color: white;
  padding: 9px 12px;
  min-height: 40px;
  font-size: 0.85rem;
}
.month-head {
  margin: 30px 0 14px;
}
.month-head h1 {
  font-size: 1.52rem;
  font-weight: 750;
  letter-spacing: -0.035em;
}
.icon {
  border: 0;
  background: #ffffff25;
  color: white;
  border-radius: 14px;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  transition:
    transform 0.16s,
    background 0.16s;
}
.icon:active {
  transform: scale(0.93);
  background: #ffffff55;
}
.quick-setup {
  margin: 0 0 11px;
}
.vehicle-quick {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  border: 1px solid #dbe8e9;
  background: #fff;
  text-align: left;
  box-shadow: 0 8px 22px #143e4b0d;
}
.default-avatar {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: #e8f4f2;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 1.55rem;
  overflow: hidden;
}
.default-avatar > * {
  grid-area: 1/1;
}
.default-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vehicle-quick-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.vehicle-quick-copy strong {
  font-size: 0.89rem;
  color: #0c5f6b;
}
.vehicle-quick-copy small {
  font-size: 0.87rem;
  color: #39576a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vehicle-quick-chevron {
  margin-left: auto;
  font-size: 1.55rem;
  color: #1a8a90;
}
.panel {
  border: 1px solid #dde7ea;
  border-radius: 20px;
  box-shadow: 0 8px 26px #143e4b0a;
}
.summary {
  padding: 16px 18px;
  background: #fff;
  color: #173149;
  box-shadow: 0 8px 26px #143e4b0a;
}
.summary span {
  font-weight: 650;
  color: #456278;
}
.summary small {
  color: #697f8e;
}
.summary strong {
  color: #0e7480;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}
.ik-overview {
  gap: 9px;
  margin-top: 9px;
}
.ik-tile {
  background: #fff;
  border: 1px solid #dce7e9;
  border-radius: 18px;
  padding: 13px 14px;
  min-height: 86px;
  box-shadow: 0 8px 25px #143e4b08;
}
.ik-tile:first-child,
.ik-tile:last-child {
  border-top: 1px solid #dce7e9;
}
.ik-tile:first-child {
  border-left: 4px solid #17a69c;
}
.ik-tile:last-child {
  border-left: 4px solid #efb34d;
}
.ik-tile span {
  font-size: 0.85rem;
  line-height: 1.22;
  color: #516a79;
}
.ik-tile strong {
  font-size: 1.46rem;
  letter-spacing: -0.035em;
}
.ik-calendar-note {
  font-size: 0.84rem;
  line-height: 1.45;
  margin: 9px 3px 12px;
  color: #526c7d;
}
.ik-shortcuts {
  padding: 13px 15px;
  margin: 0 0 14px;
  border: 1px solid #dce7e9;
  border-left: 4px solid #efb34d;
}
.ik-shortcuts label {
  font-size: 0.9rem;
}
.ik-shortcut-buttons {
  margin-top: 10px;
}
.ik-shortcut-buttons button {
  font-size: 0.87rem;
  min-width: 130px;
  min-height: 44px;
  padding: 10px;
}
.ik-shortcuts p {
  font-size: 0.84rem;
  line-height: 1.45;
}
.calendar {
  padding: 10px;
  border-top: 1px solid #dce7e9;
}
.grid {
  gap: 5px;
}
.weekday {
  font-size: 0.8rem;
  color: #667e8c;
}
.day {
  height: 67px;
  background: #f3f7f8;
  border: 1px solid #edf1f2;
  border-radius: 12px;
  padding: 7px;
  color: #284455;
  transition:
    transform 0.13s,
    background 0.13s;
}
.day:active {
  transform: scale(0.95);
}
.day.active {
  background: #e0f3ef;
  border-color: #97d6cc;
}
.day.selected {
  outline: 2px solid #dd9c37;
  outline-offset: -2px;
}
.amount {
  font-size: 0.76rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.section-title {
  margin: 22px 1px 10px;
}
.section-title h2 {
  font-size: 1.13rem;
}
.trip {
  border-left: 4px solid #17a69c;
  border-radius: 16px;
}
.empty {
  padding: 23px;
  color: #61798a;
}
.actions {
  margin: 17px 0;
  gap: 8px;
}
.actions button {
  flex: 1;
  min-width: 145px;
  font-size: 0.88rem;
}
.primary {
  background: #0d7782;
  border-radius: 13px;
  box-shadow: 0 6px 15px #0d77822a;
  transition:
    transform 0.15s,
    filter 0.15s;
}
.primary:active {
  transform: scale(0.97);
}
.outline {
  border-color: #c8dfe2;
  border-radius: 13px;
  color: #125266;
}
.bottom {
  gap: 10px;
  padding: 9px 12px max(10px, env(safe-area-inset-bottom));
  background: #fffffff2;
  border-top: 1px solid #dce7e9;
  box-shadow: 0 -7px 25px #183a4a10;
  backdrop-filter: blur(14px);
}
.bottom button {
  width: auto;
}
.bottom #new-trip {
  flex: 1;
  max-width: 320px;
  white-space: nowrap;
}
.bottom-side {
  border: 0;
  background: transparent;
  color: #365869;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  gap: 2px;
  min-width: 70px;
}
.bottom-side span {
  font-size: 1.25rem;
  line-height: 1;
}
dialog {
  border-radius: 22px;
  box-shadow: 0 25px 80px #0b2f4560;
}
.dialog-body {
  padding: 24px;
}
.dialog-body h2 {
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}
.dialog-body label:not(.file-button) {
  font-size: 0.92rem;
}
.dialog-body input:not([type="checkbox"]),
.dialog-body select {
  border-radius: 11px;
  border-color: #c6d9de;
  font-size: 1rem;
}
.dialog-body input:focus,
.dialog-body select:focus {
  outline: 2px solid #39a9a0;
  outline-offset: 1px;
}
.vehicle-row {
  box-shadow: none;
}
.ik-summary {
  background: #0d6073;
}
.ik-rate-labels {
  font-size: 0.8rem;
}
.ik-rate-row span {
  font-size: 0.84rem;
}
@media (max-width: 600px) {
  main {
    padding: 16px 12px 108px;
  }
  .day {
    height: 60px;
    padding: 5px;
  }
  .amount {
    font-size: 0.7rem;
  }
  .summary strong {
    font-size: 1.5rem;
  }
  .ik-tile strong {
    font-size: 1.25rem;
  }
  dialog {
    width: 100vw;
    max-width: none;
    max-height: min(94dvh, 900px);
    margin: auto 0 0;
    border-radius: 23px 23px 0 0;
  }
  .dialog-body {
    max-height: min(94dvh, 900px);
    padding: 22px 18px 24px;
  }
  .bottom-side {
    min-width: 58px;
  }
  .bottom #new-trip {
    font-size: 0.92rem;
    padding: 10px 12px;
  }
  .top .outline {
    font-size: 0.8rem;
  }
}
@media (max-width: 380px) {
  .brand {
    font-size: 1.02rem;
  }
  .cabinet {
    font-size: 0.66rem;
  }
  .brand-logo {
    width: 42px;
    height: 42px;
  }
  .month-head h1 {
    font-size: 1.32rem;
  }
  .ik-shortcut-buttons {
    flex-direction: column;
  }
  .ik-shortcut-buttons button {
    width: 100%;
  }
  .day {
    height: 56px;
  }
  .amount {
    font-size: 0.64rem;
  }
  .bottom-side {
    min-width: 52px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .icon,
  .day,
  .primary {
    transition: none;
  }
}
/* Full-width header keeps the month title legible at every viewport width. */
body {
  background:
    linear-gradient(120deg, #0e6679, #123e5a) top/100% 205px no-repeat,
    #f5f8fa;
}
/* Keep the right edge visually continuous and the vehicle image compact. */
html {
  overflow-x: clip;
  scrollbar-width: thin;
  scrollbar-color: #aec4ca #f5f8fa;
}
body {
  overflow-x: clip;
}
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f5f8fa;
}
::-webkit-scrollbar-thumb {
  background: #aec4ca;
  border-radius: 8px;
}
.quick-setup .default-avatar {
  flex: 0 0 48px;
  min-width: 48px;
  width: 48px;
  height: 48px;
}
.quick-setup .vehicle-quick-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.quick-setup .vehicle-quick-chevron {
  flex: 0 0 auto;
  min-width: 0;
}

/* Justificatifs de frais */
.day-expenses {
  margin-top: 22px;
}
.day-expenses > .section-title {
  margin-top: 0;
}
.day-expenses > #add-expense {
  width: 100%;
  min-height: 48px;
  margin-bottom: 10px;
  font-weight: 700;
}
.expense-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 9px;
  border-left: 4px solid #e5a93e;
}
.expense-thumb {
  width: 72px;
  height: 82px;
  object-fit: cover;
  border-radius: 10px;
  background: #eaf0f2;
}
.expense-info {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.expense-info strong {
  color: #244354;
}
.expense-info small {
  color: #566f7e;
  line-height: 1.4;
}
.expense-card .buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.expense-card button {
  font-size: 0.83rem;
  padding: 8px 10px;
}
.expense-calendar-mark {
  color: #8a641b;
}
.expense-preview {
  display: grid;
  place-items: center;
  min-height: 90px;
  max-height: 260px;
  overflow: hidden;
  background: #f2f6f7;
  border: 1px dashed #c6d9de;
  border-radius: 12px;
  color: #657d89;
}
.expense-preview-image {
  display: block;
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
}
.expense-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.expense-fields label {
  min-width: 0;
}
.expense-fields input {
  width: 100%;
}
@media (max-width: 520px) {
  .expense-card {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 9px;
  }
  .expense-thumb {
    width: 62px;
    height: 72px;
  }
  .expense-card .buttons {
    grid-column: 1/-1;
    flex-direction: row;
  }
  .expense-card .buttons button {
    flex: 1;
  }
  .expense-fields {
    grid-template-columns: 1fr;
  }
}

/* Saisie des natures et commentaires de frais */
.dialog-body select,
.dialog-body textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px;
  border: 1px solid #bdced9;
  border-radius: 10px;
  background: white;
  color: #15364d;
  font: inherit;
}
.dialog-body textarea {
  resize: vertical;
  line-height: 1.4;
}
.expense-category {
  font-weight: 700;
  color: #0d667d;
}
.expense-comment {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.expense-card .buttons {
  max-width: 160px;
}
#expense-report-attachments {
  width: 22px;
  height: 22px;
}
.report .expense-statement-table {
  font-size: 8pt;
  table-layout: fixed;
}
.report .expense-statement-table th:first-child {
  width: 14%;
}
.report .expense-statement-table th:nth-child(2) {
  width: 11%;
}
.report .expense-statement-table th:nth-child(3) {
  width: 10%;
}
.report .expense-statement-table th:nth-child(4),
.report .expense-statement-table th:nth-child(5),
.report .expense-statement-table th:nth-child(6) {
  width: 12%;
}
.report .expense-statement-table th:last-child {
  width: 29%;
}
.report .expense-statement-table td {
  overflow-wrap: anywhere;
  padding: 5px 4px;
}
.report .expense-statement-table tfoot {
  font-weight: bold;
  border-top: 2px solid #333;
}
.report .expense-category-summary {
  margin-top: 9mm;
  break-inside: avoid;
}
.report .expense-category-summary h2 {
  font-size: 14pt;
}
.report .expense-totals-table {
  font-size: 9pt;
}
.report .receipt-appendix-heading {
  break-before: page;
  font-size: 18pt;
}
.report .receipt-sheet {
  height: 270mm;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3mm;
  break-after: page;
  page-break-after: always;
  break-inside: avoid;
}
.report .receipt-sheet:last-child {
  break-after: auto;
  page-break-after: auto;
}
.report .receipt-item {
  border: 1px solid #aeb8bf;
  padding: 2mm;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  break-inside: avoid;
}
.report .receipt-item-head {
  display: flex;
  justify-content: space-between;
  gap: 2mm;
  align-items: baseline;
  font-size: 8pt;
  margin-bottom: 1mm;
}
.report .receipt-item-head span {
  font-size: 7pt;
  text-align: right;
}
.report .receipt-item-image {
  width: 100%;
  height: calc(100% - 12mm);
  object-fit: contain;
  min-height: 0;
}
.report .receipt-item-comment {
  font-size: 7pt;
  margin: 1mm 0 0;
  overflow-wrap: anywhere;
}
@media (max-width: 520px) {
  .expense-card .buttons {
    max-width: none;
  }
}
@media print {
  @page {
    size: A4;
    margin: 10mm;
  }
  .report .receipt-sheet {
    height: 250mm;
    margin: 0 -9mm;
    padding: 0 9mm;
  }
  .report .receipt-item-image {
    max-height: 110mm;
  }
}

/* Saisie par date et états regroupés */
#open-synthesis {
  width: min(68%, 320px);
  white-space: nowrap;
}
.day-action-buttons,
.synthesis-group {
  display: grid;
  gap: 9px;
}
.day-action-buttons {
  margin: 16px 0 6px;
}
.synthesis-group {
  padding: 15px;
  margin: 12px 0;
  border: 1px solid #dce7e9;
  border-radius: 16px;
  background: #f8fbfc;
}
.synthesis-group h3 {
  margin: 0 0 3px;
  color: #0d6177;
}
.synthesis-group button {
  width: 100%;
  text-align: left;
}
.synthesis-rates {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #dce7e9;
}
.expense-calculator {
  margin: 4px 0 16px;
  padding: 12px;
  border-radius: 14px;
  background: #f3f8f9;
  border: 1px solid #dce7e9;
}
.expense-calculator > label {
  margin-top: 0 !important;
}
.expense-calculate-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.expense-calculate-buttons button {
  flex: 1;
  min-width: 150px;
  font-size: 0.88rem;
}
.expense-calculator .hint {
  margin: 8px 0 0;
}
@media (max-width: 380px) {
  #open-synthesis {
    font-size: 0.8rem;
    padding-inline: 7px;
  }
}

/* Version access and OCR invoice-date confirmation */
.bottom {
  padding-left: max(64px, calc(env(safe-area-inset-left) + 56px));
}
.bottom #open-synthesis {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 320px;
  white-space: nowrap;
}
.bottom #open-version-info {
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid #c8dfe2;
  border-radius: 50%;
  background: #fff;
  color: #125266;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 3px 10px #143e4b18;
}
.bottom #open-version-info:focus-visible {
  outline: 3px solid #39a9a0;
  outline-offset: 2px;
}
@media (max-width: 380px) {
  .bottom {
    gap: 6px;
    padding-right: 8px;
  }
  .bottom #open-synthesis {
    font-size: 0.76rem;
    padding-inline: 7px;
  }
  .bottom #open-vehicles-bottom {
    min-width: 52px;
    font-size: 0.7rem;
  }
}
