:root{color-scheme:light dark;--bg: #f5f5f4;--surface: #ffffff;--text: #1c1917;--muted: #78716c;--border: #e7e5e4;--primary: #0f766e;--primary-contrast: #ffffff;--secondary: #2563eb;--secondary-contrast: #ffffff;--danger: #b91c1c;font-family:system-ui,-apple-system,Segoe UI,sans-serif}@media(prefers-color-scheme:dark){:root{--bg: #1c1917;--surface: #292524;--text: #f5f5f4;--muted: #a8a29e;--border: #44403c}}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button{cursor:pointer;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:8px;padding:.5rem .9rem;font-size:.95rem}button.active,button[type=submit]{background:var(--primary);color:var(--primary-contrast);border-color:var(--primary)}input:not([type=range]),select{border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:8px;padding:.5rem .6rem;font-size:1rem}a{color:var(--primary)}.muted{color:var(--muted);font-size:.85rem}.form-error{color:var(--danger)}.auth-page{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:1rem}.auth-form{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:1.5rem;width:100%;max-width:360px;display:flex;flex-direction:column;gap:.9rem}.auth-form label{display:flex;flex-direction:column;gap:.3rem;font-size:.9rem}.app-shell{min-height:100vh}.app-header{display:flex;align-items:center;gap:1.75rem;padding:.7rem 1.25rem;background:var(--surface);border-bottom:1px solid var(--border);flex-wrap:wrap}.brand{font-weight:800;font-size:1.05rem;letter-spacing:-.01em;color:var(--text);text-decoration:none;flex-shrink:0}.app-menu{position:relative}.app-menu-toggle{display:flex;align-items:center;justify-content:center;padding:0;border:1px solid var(--border);background:var(--bg);color:var(--text);border-radius:8px;width:2.25rem;height:2.25rem;font-size:1.1rem;line-height:1;cursor:pointer}.app-nav-dropdown{position:absolute;top:calc(100% + .4rem);left:0;display:flex;flex-direction:column;min-width:200px;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:0 8px 24px #0000002e;padding:.4rem;z-index:30}.app-nav-dropdown a{text-decoration:none;color:var(--text);font-size:.95rem;font-weight:600;padding:.55rem .7rem;border-radius:8px;transition:background-color .15s ease,color .15s ease}.app-nav-dropdown a:hover{background:var(--bg)}.app-nav-dropdown a.active{color:var(--primary-contrast);background:var(--primary)}.app-nav-section-label{margin:.5rem .3rem .15rem;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}.brand{margin:0 auto 0 .25rem}.app-header-actions{margin-left:auto;display:flex;align-items:center;gap:.5rem}.app-header-user{position:relative}.app-refresh-toggle{display:flex;align-items:center;justify-content:center;padding:0;border:1px solid var(--border);background:var(--bg);color:var(--text);border-radius:8px;width:2.25rem;height:2.25rem;font-size:1.2rem;line-height:1;cursor:pointer}.app-refresh-toggle:disabled{cursor:default;opacity:.6}.app-refresh-toggle.spinning{animation:app-refresh-spin .6s linear infinite}@keyframes app-refresh-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.app-profile-toggle{display:flex;align-items:center;justify-content:center;padding:0;border:1px solid var(--border);background:var(--primary);color:var(--primary-contrast);border-radius:50%;width:2.25rem;height:2.25rem;font-size:.95rem;font-weight:700;cursor:pointer}.app-profile-dropdown{position:absolute;top:calc(100% + .4rem);right:0;display:flex;flex-direction:column;gap:.3rem;min-width:200px;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:0 8px 24px #0000002e;padding:.75rem;z-index:30}.app-profile-name{font-weight:700}.app-profile-email{font-size:.85rem;color:var(--muted);margin-bottom:.3rem;word-break:break-all}.app-main{max-width:900px;margin:0 auto;padding:1rem}.page-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.back-link{display:inline-block;margin-bottom:.75rem;color:var(--muted);text-decoration:none;font-size:.9rem;font-weight:600}.back-link:hover{color:var(--text)}.button-link{display:inline-block;cursor:pointer;border:1px solid var(--primary);background:var(--primary);color:var(--primary-contrast)!important;border-radius:8px;padding:.5rem .9rem;font-size:.95rem;text-decoration:none;white-space:nowrap}.toolbar{display:flex;flex-wrap:wrap;gap:.6rem;margin-bottom:1rem}.toolbar input[type=search]{flex:1;min-width:160px}.segmented{display:flex;border:1px solid var(--border);border-radius:8px;overflow:hidden}.segmented button{border:none;border-radius:0}.item-group-header{display:flex;align-items:center;gap:.5rem;width:100%;background:none;border:none;border-bottom:1px solid var(--border);padding:0 0 .3rem;margin:0;cursor:pointer;text-align:left}.item-group-header h2{margin:0}.item-group h2{font-size:1rem;color:var(--muted)}.chevron{display:inline-block;color:var(--muted);transition:transform .15s ease}.chevron-collapsed{transform:rotate(-90deg)}.item-group-weight{margin-left:auto;font-size:.85rem}.fab{position:fixed;right:1.25rem;bottom:1.25rem;width:56px;height:56px;border:none;border-radius:50%;background:var(--primary);color:var(--primary-contrast);display:flex;align-items:center;justify-content:center;padding:0;font-size:1.8rem;line-height:1;text-decoration:none;cursor:pointer;box-shadow:0 4px 12px #00000040;z-index:20}.swipeable-row{position:relative;overflow:hidden}.swipeable-actions{position:absolute;top:0;bottom:0;display:flex}.swipeable-actions-right{right:0}.swipeable-actions-left{left:0}.swipeable-action-button{flex:1;border:none;border-radius:0;color:var(--primary-contrast);font-weight:600;font-size:.95rem}.swipeable-edit-button{background:var(--primary)}.swipeable-move-button{background:var(--secondary);color:var(--secondary-contrast)}.swipeable-content{position:relative;background:var(--bg);touch-action:pan-y;-webkit-user-select:none;user-select:none}.swipeable-close-catcher{position:absolute;top:0;right:0;bottom:0;left:0;border:none;background:transparent;padding:0;cursor:pointer}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:center;justify-content:center;padding:1rem;z-index:100}.modal{background:var(--surface);border-radius:12px;padding:1.25rem;max-width:480px;width:100%;max-height:90vh;overflow-y:auto}.modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}.modal-header h2{margin:0}.modal-close{border:none;background:none;font-size:1.5rem;line-height:1;padding:0;color:var(--muted)}.modal .item-form{background:none;border:none;padding:0;margin:0}.item-list{list-style:none;padding:0;margin:0 0 1.5rem}.item-row,.trip-item-row{display:flex;align-items:center;gap:.8rem;padding:.6rem 0;border-bottom:1px solid var(--border);flex-wrap:wrap}.item-row-main{display:flex;flex-direction:column;flex:1;min-width:140px}.item-row-meta{display:flex;align-items:center;gap:.4rem}.trip-item-row .item-row-meta{padding-right:.6rem}.item-row-actions{display:flex;gap:.4rem}.badge{background:var(--border);border-radius:999px;padding:.1rem .5rem;font-size:.75rem}.trip-item-row.is-excluded{opacity:.5}.inline-form,.item-form{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:1rem;margin-bottom:1.5rem}.inline-form label,.item-form label{display:flex;flex-direction:column;gap:.2rem;font-size:.85rem;margin-bottom:.6rem}.item-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:0 1rem}.checkbox-label{flex-direction:row!important;align-items:center;gap:.5rem!important}.item-form-actions{display:flex;gap:.5rem}.toggle{position:relative;display:inline-block;width:48px;height:28px;flex-shrink:0}.toggle input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--border);border-radius:999px;transition:.15s}.toggle-slider:before{content:"";position:absolute;height:22px;width:22px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.15s}.toggle input:checked+.toggle-slider{background:var(--primary)}.toggle input:checked+.toggle-slider:before{transform:translate(20px)}.toggle-required .toggle-slider{background:repeating-linear-gradient(45deg,var(--danger),var(--danger) 6px,white 6px,white 12px)}.consumable-slider{display:flex;align-items:center;gap:.6rem;margin-top:.3rem}.consumable-slider input[type=range]{flex:0 0 45%;max-width:200px;margin:0;padding:0;height:1.75rem;background:transparent;touch-action:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.consumable-slider input[type=range]::-webkit-slider-runnable-track{height:6px;border-radius:999px;background:var(--border)}.consumable-slider input[type=range]::-moz-range-track{height:6px;border-radius:999px;background:var(--border)}.consumable-slider input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:22px;height:22px;margin-top:-8px;border-radius:50%;background:var(--primary);border:none}.consumable-slider input[type=range]::-moz-range-thumb{width:22px;height:22px;border-radius:50%;background:var(--primary);border:none}.quantity-stepper{display:flex;align-items:center;gap:.5rem;margin-top:.3rem}.quantity-stepper button{width:2.2rem;height:2.2rem;padding:0;line-height:1;font-size:1.25rem;border-radius:999px}.quantity-stepper-value{min-width:3.5rem;text-align:center;font-size:.9rem}.trip-summary{position:sticky;top:0;z-index:10;background:var(--bg);padding-top:1rem;margin:0 -1rem 1rem;padding-left:1rem;padding-right:1rem;border-bottom:1px solid var(--border)}.trip-summary-stats{display:flex;gap:2rem;margin-bottom:1rem}.car-summary{margin-bottom:1.25rem;padding-bottom:1rem;border-bottom:1px solid var(--border)}.trip-checklists{margin-bottom:1.25rem;padding-bottom:.75rem;border-bottom:1px solid var(--border)}.trip-checklists-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.4rem}.trip-checklists-header h3{margin:0;font-size:.95rem;color:var(--muted)}.trip-checklists-header button{font-size:.85rem;padding:.35rem .7rem}.car-summary-heading{margin:0 0 .5rem;font-size:.95rem;color:var(--muted)}.stat{display:flex;flex-direction:column}.stat-value{font-size:1.8rem;font-weight:700}.stat-danger .stat-value{color:var(--danger)}.stat-label{color:var(--muted);font-size:.85rem}.weight-bar{margin-bottom:1.25rem}.weight-bar-track{position:relative;display:flex;height:1.25rem;border-radius:999px;background:var(--border);overflow:hidden}.weight-bar-segment{height:100%}.weight-bar-miro{background:var(--muted)}.weight-bar-required{background:var(--primary)}.weight-bar-optional{background:#7dd3c0}.weight-bar-limit{position:absolute;top:-2px;bottom:-2px;width:2px;background:var(--text)}.weight-bar-break{position:absolute;top:0;width:10px;height:100%;transform:translate(-50%);overflow:visible}.weight-bar-break polyline{fill:none;stroke:var(--bg);stroke-width:2;vector-effect:non-scaling-stroke}.weight-bar-legend{display:flex;flex-wrap:wrap;gap:.9rem;margin-top:.5rem;font-size:.85rem;color:var(--muted);align-items:center}.weight-bar-dot{display:inline-block;width:.6rem;height:.6rem;border-radius:50%;margin-right:.3rem}.weight-bar-dot-miro{background:var(--muted)}.weight-bar-dot-required{background:var(--primary)}.weight-bar-dot-optional{background:#7dd3c0}.weight-bar-over{color:var(--danger);font-weight:600}.space-details p{margin:.4rem 0}.danger-link{margin-top:1rem;border:none;background:none;color:var(--danger);padding:0;text-decoration:underline}.caravan-list,.trip-list{list-style:none;padding:0}.caravan-list li,.trip-list li{padding:.5rem 0;border-bottom:1px solid var(--border)}@media(max-width:480px){.app-header{gap:.75rem}.app-header-actions{margin-left:0}.item-row,.trip-item-row{padding:.9rem 0;gap:1rem}.consumable-slider,.quantity-stepper{margin-top:.5rem}}.sortable-row{display:flex;align-items:flex-start;gap:.5rem;background:var(--surface, var(--bg));border:1px solid var(--border);border-radius:8px;padding:.75rem;margin-bottom:.75rem}.drag-handle{cursor:grab;background:none;border:none;color:var(--muted);font-size:1.1rem;line-height:1;padding:.25rem .4rem;touch-action:none}.sortable-row-content{flex:1;min-width:0}.checklist-category-header,.checklist-subcategory-header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.5rem}.checklist-category-header h2,.checklist-subcategory-header h3{margin:0;cursor:text}.checklist-subcategory-row{margin-left:1.5rem;background:transparent}.checklist-item-row{display:flex;align-items:center}.checklist-item-row .sortable-row-content{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.checklist-item-name{flex:1;min-width:8rem}.checklist-item-name-editable{cursor:text}.checklist-item-name.crit-important{font-weight:600}.checklist-item-name.crit-critical{font-weight:700;color:var(--danger)}.checklist-add-form,.checklist-rename-form{display:flex;gap:.5rem;margin-top:.5rem}.checklist-add-form input,.checklist-rename-form input{flex:1}.checklist-category-footer{display:flex;flex-direction:column;gap:.5rem;margin-top:.75rem}.checklist-progress{display:flex;align-items:center;gap:.5rem}.checklist-progress-bar{flex:1;height:8px;border-radius:999px;background:var(--border);overflow:hidden}.checklist-progress-bar-fill{height:100%;background:var(--primary)}.trip-checklist-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.6rem 0;border-bottom:1px solid var(--border);color:inherit;text-decoration:none}.trip-checklist-row:last-child{border-bottom:none}.checklist-tick-item{display:flex;align-items:center;gap:.75rem;width:100%;padding:.85rem .5rem;border:none;border-bottom:1px solid var(--border);background:none;text-align:left;font-size:1rem;cursor:pointer;-webkit-tap-highlight-color:transparent}.checklist-tick-item:last-child{border-bottom:none}.checklist-tick-box{flex-shrink:0;width:1.6rem;height:1.6rem;border-radius:6px;border:2px solid var(--border);display:flex;align-items:center;justify-content:center;color:var(--primary-contrast);font-weight:700}.checklist-tick-item.checked .checklist-tick-box{background:var(--primary);border-color:var(--primary)}.checklist-tick-item.checked .checklist-item-name{color:var(--muted);text-decoration:line-through}.toolbar button.active{background:var(--primary);color:var(--primary-contrast);border-color:var(--primary)}
