/* Страница «Авто»: сервисная книга с разворотом и таблицами.
   Общие кнопки, формы и закладки используются из tasks.css. */
/* Машины — колонка слева от картинки: узкая, прокручивается, если машин много */
/* Машины — колонка слева от картинки: узкая, прокручивается, если машин много.
   Селекторы с .chips.week — чтобы перебить общее правило «день во всю высоту» из app.css. */
.auto-cars.chips.week {width:86.8px;max-height:259px;overflow-y:auto;gap:6px;scrollbar-width:thin}
.auto-cars.chips.week .chip {display:flex;flex:0 0 auto;min-width:0;min-height:48px;padding:7px 9px;flex-direction:column;align-items:flex-start;justify-content:center;gap:1px;text-align:left;line-height:1.2;font-size:.78rem}
.auto-cars.chips.week .chip-add {justify-content:center;align-items:center;min-height:38px;border-style:dashed;color:var(--vein);font-size:.74rem}
.auto-car-name {display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.auto-cars.chips.week .chip small {max-width:100%;font-size:.66rem;opacity:.75;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.auto-cars.chips.week .chip[aria-pressed=true] {background:var(--vein);border-color:var(--vein);color:var(--on-vein)}
.auto .task-book-heading h2 {font-size:2.3rem}

.auto-text {white-space:pre-wrap;overflow-wrap:anywhere}
.auto-cost {display:grid;grid-template-columns:1fr auto;gap:2px 12px;margin:10px 0 0;font:400 1.15rem 'Caveat',var(--body);color:var(--ink)}
.auto-cost dt {color:var(--ink-2)}
.auto-cost dd {margin:0;text-align:right;font-variant-numeric:tabular-nums}
.auto-next {margin:10px 0 0;font:400 1.1rem/1.35 'Caveat',var(--body);color:#547e78}

.auto-card {display:grid;gap:0;margin-top:6px}
.auto-line {display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px 14px;min-height:36px;padding:0 2px}
.auto-line span {font-size:.78rem;color:var(--ink-2)}
.auto-line b {font:600 1.4rem/36px 'Caveat',var(--body);overflow-wrap:anywhere;text-align:right}

.auto-form {margin-bottom:20px}
.auto-form h2 {margin:0;font-size:1.1rem}
.auto-form .field {min-width:0}
.auto-form input,.auto-form select,.auto-form textarea {min-width:0;width:100%;max-width:100%;box-sizing:border-box}
.auto-form textarea {min-height:88px;resize:vertical}
.auto-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}

/* Помощник живёт на своей странице блокнота — без второй рамки поверх бумаги */
.auto-assistant .auto-chat {margin:0;padding:0;background:transparent;border:0;border-radius:0;max-width:none}
.auto-assistant .auto-chat h2 {font:600 1.7rem/1.1 'Caveat',var(--body);margin:0}
.auto-assistant .auto-chat-message {background:#f1efe2}
.auto-assistant .auto-chat-message.mine {background:#e3ece3}

@media(max-width:480px) {
  .auto-grid {grid-template-columns:1fr}
  .auto-line b {font-size:1.25rem}
}

/* Сервисная книга: печатные таблицы, записи чернилами и сгиб разворота. */
.auto .service-book {width:100%;max-width:1180px;margin:0 auto;padding:0 3px 12px;min-width:0}
.auto .task-tabs {padding-left:28px}
.service-cover {padding:7px 7px 13px;background:#364e4d;border-radius:7px 10px 12px 7px;box-shadow:0 18px 34px -20px #162f4980,0 3px 6px #1d3a3926}
.auto .service-paper {--ink:#303d43;--ink-2:#64716e;--vein:#34596f;--surface:#faf9f1;min-height:600px;padding:0;border:1px solid #d0cdbf;border-radius:3px 5px 9px 3px;background:#faf9f1;box-shadow:0 3px 0 -1px #e9e5d8,0 6px 0 -1px #ceccbd,0 8px 0 -1px #efeee3}
.auto .service-paper::before {display:none}
.service-title {display:flex;justify-content:space-between;align-items:center;gap:16px;padding:26px 28px 20px;border-bottom:2px solid #485c5a}
.service-kicker {font:500 .62rem var(--body);letter-spacing:.13em;color:#6c7872}
.service-title h2 {margin:5px 0 0;font:700 clamp(1.6rem,3vw,2.2rem)/1.1 var(--display);letter-spacing:-.045em;color:#293e40}
.service-edition {border:1px solid #81958c;padding:7px 12px;text-align:center;color:#546e64;font:600 .9rem var(--body);line-height:1.1;transform:rotate(-4deg)}
.service-edition small {font-size:.62rem;font-weight:400;letter-spacing:.18em}
.service-toolbar {display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 28px;font-size:.75rem;color:#5c6e68;border-bottom:1px solid #c5ccbf;overflow-wrap:anywhere}
.service-spread {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;background:linear-gradient(90deg,transparent calc(50% - 22px),#d6d4c329 calc(50% - 8px),#9b9e8e40 calc(50% - 1px),#90988865 50%,#d6d4c326 calc(50% + 12px),transparent calc(50% + 24px))}
.service-leaf {min-width:0;padding:24px 25px 18px;position:relative;display:flex;flex-direction:column}
.service-leaf-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:38px;margin-bottom:18px}
.service-leaf-heading>span {font:500 .6rem var(--body);letter-spacing:.1em;color:#7c867d}
.auto .service-paper .btn.secondary {background:#faf9f1;border:1px solid #b9c6b9;border-radius:5px;min-height:36px;padding:6px 10px;font-size:.72rem;color:#3d615c}
.service-section-title {font:700 1.02rem/1.25 var(--body);text-align:center;margin:18px 0 8px;color:#374744}
.service-passport h2.service-section-title {font-size:1.17rem;margin-top:0;text-align:left;text-transform:uppercase;letter-spacing:-.025em}
.auto .auto-card {margin:0;display:block;border-top:1px solid #aab7aa}
.auto .auto-line {display:grid;grid-template-columns:minmax(0,38%) minmax(0,62%);gap:0;min-height:33px;padding:0;border-bottom:1px solid #b5c0b3}
.auto .auto-line>span {display:flex;align-items:center;padding:5px 8px 5px 0;font:500 .75rem/1.25 var(--body);color:#53635c;border-right:1px solid #b5c0b3}
.auto .auto-line>b {padding:3px 0 3px 10px;min-width:0;text-align:left;font:400 1.25rem/1.15 'Caveat',var(--body);color:#395d8a;align-self:center;overflow-wrap:anywhere}
.service-unfilled {color:#a7afa2;font:400 .9rem var(--body)}
.service-materials .auto-line {min-height:30px}
.service-materials .auto-line>span {font-size:.7rem}
.service-label {font:400 .7rem/1.4 var(--body);color:#67736b;margin:9px 0 0;display:block}
.service-year-title {margin:0 0 14px;font:500 .7rem var(--body);letter-spacing:.15em;color:#7c887c;text-align:right}
.service-entry {margin-bottom:28px;min-width:0}
.service-entry h3 {margin:0 0 20px;text-align:center;font:700 1.05rem/1.3 var(--body);color:#3b4d47}
.service-entry-meta {display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;border-bottom:1px solid #aab7aa;font:400 .69rem var(--body);color:#647366}
.service-entry-meta b {font:400 1.25rem 'Caveat',var(--body);color:#395d8a;white-space:nowrap}
.service-work {min-height:145px;margin:0;padding:0 2px;font:400 1.35rem/29px 'Caveat',var(--body);color:#395d8a;white-space:pre-wrap;overflow-wrap:anywhere;background:repeating-linear-gradient(transparent 0,transparent 28px,#b5c0b3 28px,#b5c0b3 29px)}
.service-work.service-empty {color:#8b9485;font-size:1.2rem;min-height:290px}
.service-entry details {padding:9px 0 0}
.service-entry summary {cursor:pointer;font-size:.7rem;line-height:1.5;color:#5d7065}
.service-entry summary>span {float:right;margin-left:6px;font-variant-numeric:tabular-nums}
.service-entry .task-body {background:transparent;padding:8px 0}
.service-entry .task-actions {margin-top:10px}
.service-page-number {margin-top:auto;padding-top:22px;text-align:center;color:#8a9386;font:500 .6rem var(--body);letter-spacing:.1em}
.service-footer {padding:16px 26px;border-top:1px solid #c9cfc1;display:flex;justify-content:space-between;gap:12px;color:#84907e;font:400 .65rem var(--body)}
.service-footer span:last-child {font-size:.55rem;letter-spacing:.1em;white-space:nowrap}
.service-single {max-width:700px;margin:auto}
.auto .service-paper [data-auto-error]:empty {display:none}
.auto .service-paper>[data-auto-error]:not(:empty) {margin:16px 26px}
.auto .service-paper .auto-form {margin:20px;box-shadow:none;background:#fffdf5;border-color:#c5ccbf}
.auto-form fieldset {border:0;border-top:1px solid #c5ccbf;padding:16px 0 0;min-width:0;margin:0}
.auto-form legend {padding:0 10px 0 0;font-weight:600;color:#405e57}
.auto-form fieldset .muted {margin:0 0 12px}
.auto .service-paper button:focus-visible,.auto .service-paper summary:focus-visible {outline:2px solid #34596f;outline-offset:3px}
@media(max-width:760px) {
 .service-spread {grid-template-columns:minmax(0,1fr);background:none}
 .service-passport {border-bottom:1px solid #b8bca9;box-shadow:0 4px 0 -1px #e3e1d3,0 7px 0 -2px #babfab;margin-bottom:12px}
 .service-title {padding:22px 18px 18px}
 .service-toolbar {padding:12px 18px}
 .service-leaf {padding:22px 18px 18px}
 .auto .task-tabs {padding-left:14px;gap:5px}
 .auto .task-tab {padding-left:16px;padding-right:16px}
 .service-footer {padding:16px;flex-wrap:wrap}
 .service-kicker {font-size:.52rem;letter-spacing:.08em}
 .service-edition {padding:6px 8px}
 .service-leaf-heading {margin-bottom:14px}
 .auto .service-paper .auto-form {margin:12px}
}
@media(prefers-reduced-motion:reduce) {.auto * {scroll-behavior:auto!important}}
/* Развороту нужны две полноценные страницы, а не две узкие колонки телефона. */
@media(min-width:761px) {
 .app:has(#auto) {max-width:1120px}
 .app:has(#auto) .tabs {max-width:1120px}
 .auto>.menuhead {width:100%;max-width:600px;align-self:center;margin:0 auto}
}
.auto .auto-line>span {overflow-wrap:anywhere}
@media(max-width:380px) {
 .auto .task-tabs {padding-left:8px;gap:4px}
 .auto .task-tab {padding-left:10px;padding-right:10px;font-size:.78rem}
 .service-leaf {padding-left:12px;padding-right:12px}
 .service-title {padding-left:12px;padding-right:12px}
 .service-title h2 {font-size:1.5rem}
 .service-leaf-heading>span {font-size:.53rem}
 .auto .service-paper .btn.secondary {padding-left:7px;padding-right:7px;font-size:.68rem}
}

/* Пять самостоятельных разделов сервисной книги. */
.auto .auto-book-tabs {display:grid;grid-template-columns:.95fr 1.35fr .4fr 1.4fr 1.05fr;gap:4px;padding:0 10px;align-items:end;max-width:820px;margin:0 auto}
.auto .auto-book-tabs .task-tab {display:flex;justify-content:center;align-items:center;padding:7px 5px;min-width:0;height:42px;min-height:0;border:1px solid #aeb6a3;border-bottom:0;border-radius:6px 6px 0 0;background:linear-gradient(#f3f0df,#e3dfcb);color:#53624f;font:500 .78rem/1.15 var(--body);text-align:center;transform:none;top:0;box-shadow:inset 0 2px 0 #ffffff85;overflow-wrap:normal;transition:background .15s,color .15s}
.auto .auto-book-tabs .task-tab[aria-pressed=true] {height:44px;min-height:0;padding:7px 5px;background:#faf9f1;color:#294c43;border-color:#829782;font-weight:600;box-shadow:inset 0 3px 0 #607a65}
.auto .auto-book-tabs .task-tab[aria-pressed=true]::after {display:none}
.auto-tab-materials {background:#eadfbf}
.auto-tab-maintenance {background:#d6e4ed}
.auto-tab-reminders {background:#eedbd0}
.auto .service-single {max-width:820px;min-height:410px}
.auto .service-single .service-passport {border-bottom:0;box-shadow:none;margin:0}
.service-hint {font-size:.75rem;color:#6c7d70;margin:0 0 16px}
.service-record {border-top:1px solid #b8c3b4}
.service-record:last-child {border-bottom:1px solid #b8c3b4}
.service-record>summary {list-style:none;display:grid;grid-template-columns:1fr 1fr auto 15px;align-items:center;gap:10px;min-height:62px;padding:10px 0;cursor:pointer;color:#395d8a}
.service-record>summary::-webkit-details-marker {display:none}
.service-record>summary time {font:600 1.45rem 'Caveat',var(--body)}
.service-record>summary>span:not(.service-expand) {font-size:.73rem;color:#758174}
.service-record>summary>b {font:500 .83rem var(--body);text-align:right;white-space:nowrap}
.service-expand {font-size:1rem;transition:transform .15s}
.service-record[open] .service-expand {transform:rotate(180deg)}
.service-record-body {padding:4px 0 22px}
.service-invoice {margin-bottom:20px}
.service-invoice h3,.service-contacts h3,.reminder-group h3 {font:600 .93rem var(--body);color:#455d50;margin:8px 0 10px}
.service-invoice dl {margin:0}
.service-invoice dl>div {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;padding:6px 0;border-bottom:1px solid #c5ccbf}
.service-invoice dt {font:400 1.3rem/1.2 'Caveat',var(--body);color:#395d8a;overflow-wrap:anywhere;white-space:pre-wrap}
.service-invoice dd {margin:0;white-space:nowrap;font-size:.82rem;align-self:center;font-variant-numeric:tabular-nums}
.service-subtotal,.service-grand-total {display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;padding:10px 0;font-size:.8rem;color:#556850}
.service-grand-total {border-top:2px solid #869884;border-bottom:1px solid #b7c4b2;margin:8px 0 18px;font-size:.95rem;font-weight:600}
.service-contacts dl {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:6px 12px;font-size:.8rem}
.service-contacts dt {color:#70806f}
.service-contacts dd {margin:0;overflow-wrap:anywhere;white-space:pre-wrap}
.service-contacts a {color:#345d83;text-underline-offset:3px}
.invoice-edit-row {display:grid;grid-template-columns:minmax(0,1fr) 120px 36px;align-items:end;gap:8px;margin-bottom:12px}
.auto .invoice-edit-row>.btn {padding:0;min-height:42px;font-size:1.4rem}
.auto .invoice-edit-row .field {margin:0}
.reminder-group {margin:22px 0 8px}
.auto-reminder {display:grid;grid-template-columns:24px minmax(0,1fr);gap:10px;padding:14px 0;border-bottom:1px solid #c5ccbf}
.reminder-check {padding-top:4px;cursor:pointer}
.reminder-check input {width:20px;height:20px;margin:0;accent-color:#4c7664}
.auto-reminder h4 {margin:0;font:600 1.4rem/1.2 'Caveat',var(--body);color:#395d8a;overflow-wrap:anywhere}
.auto-reminder p {font-size:.8rem;margin:6px 0;color:#68786b}
.auto-reminder.is-done h4 {text-decoration:line-through;color:#929b8d}
.auto-reminder .reminder-due {font-size:.7rem}
.auto-reminder .reminder-due.is-due {color:#97601c;font-weight:600}
.auto .service-reminders .task-show {font-size:.75rem;color:#748170}
@media(max-width:600px) {
 .auto .auto-book-tabs {gap:3px;padding:0 3px}
 .auto .auto-book-tabs .task-tab,.auto .auto-book-tabs .task-tab[aria-pressed=true] {padding:5px 2px;font-size:clamp(9px,2.65vw,12px)}
 .invoice-edit-row {grid-template-columns:minmax(0,1fr) 82px 30px;gap:5px}
 .auto .invoice-edit-row input {padding:8px 6px;font-size:.82rem}
 .auto .invoice-edit-row .field span {font-size:.7rem}
 .service-record>summary {grid-template-columns:1fr auto 12px;gap:6px}
 .service-record>summary>span:not(.service-expand) {display:none}
 .service-record>summary time {font-size:1.35rem}
 .service-record>summary>b {font-size:.75rem}
 .service-invoice dd {font-size:.73rem}
 .service-invoice dt {font-size:1.2rem}
 .service-contacts dl {font-size:.74rem}
}
