@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root { font: 14px Inter, system-ui, sans-serif; color: #272640; background: #f4f5f9; --ink: #302953; --accent: #594489; --line: #dedfeb; --muted: #60647b; }
* { box-sizing: border-box; }
body { margin: 0; }
.access-panel { max-width: 470px; margin: 8vh auto; }
.access-panel h1 { font-size: 25px; margin-bottom: 12px; }
.access-panel p { margin-bottom: 14px; line-height: 1.5; }
#access-form { display: grid; gap: 16px; }
[hidden] { display: none !important; }
a { color: var(--accent); }
header { display: flex; min-height: 66px; background: var(--ink); color: white; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 230px; padding: 12px 20px; text-decoration: none; color: white; font-weight: 700; }
.brand b { display: grid; place-items: center; width: 36px; height: 36px; background: #7660a9; border-radius: 6px; }
.brand small { display: block; margin-top: 2px; font-weight: 400; color: #ddd4f3; }
header nav { display: flex; flex-wrap: wrap; }
header nav a { display: flex; align-items: center; padding: 12px 18px; color: #eae5f5; text-decoration: none; border-bottom: 3px solid transparent; }
header nav a[aria-current], header nav a:hover { background: #433663; border-bottom-color: #c1a8f1; }
.workspace { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100dvh - 66px); }
aside { background: #eeedf5; border-right: 1px solid var(--line); padding: 24px 14px; }
aside strong { padding: 0 10px; }
aside nav { display: grid; margin: 14px 0 30px; gap: 4px; }
aside nav a { padding: 10px; text-decoration: none; color: var(--ink); border-radius: 5px; }
aside nav a[aria-current], aside nav a:hover { background: #ded5ef; }
aside .local { padding: 0 10px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
aside button, aside .file { width: 100%; margin-bottom: 6px; font-size: 12px; }
main { padding: 24px clamp(16px, 3vw, 44px) 48px; }
.breadcrumb, .hint, .heading p { color: var(--muted); }
.breadcrumb { margin: 0 0 24px; font-size: 12px; }
.heading, .panel-head, .actions, .form-footer { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.heading, .panel-head { justify-content: space-between; }
.heading { margin-bottom: 24px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(24px, 3vw, 33px); letter-spacing: -.035em; }
h2 { font-size: 16px; }
.heading p, .hint { margin-top: 7px; line-height: 1.5; }
.metrics, .split, .fields { display: grid; gap: 14px; }
.metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
.metrics div, .panel { background: white; border: 1px solid var(--line); border-radius: 8px; }
.metrics div { padding: 16px; border-top: 3px solid #8c76b8; }
.metrics span { color: var(--muted); }
.metrics b { display: block; font-size: 26px; margin-top: 8px; }
.panel { margin-bottom: 16px; }
.panel-head { padding: 14px 16px; }
.form, .result { padding: 18px; }
.form h2, .result h2 { margin-bottom: 16px; }
.fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); margin: 14px 0; }
label:not(.file) { display: grid; gap: 6px; font-weight: 500; }
input, select, button, .file, .primary { font: inherit; border: 1px solid #c9c9da; border-radius: 5px; padding: 8px 10px; background: white; color: var(--ink); }
input, select { min-width: 0; }
button, .file, .primary { cursor: pointer; text-decoration: none; text-align: center; }
.primary { background: var(--accent); color: white; border-color: var(--accent); font-weight: 600; }
button:hover, .file:hover { background: #eeebf6; }
.primary:hover { background: #47346f; }
:focus-visible { outline: 2px solid #7551be; outline-offset: 2px; }
.file { position: relative; display: inline-block; }
.file input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.file:focus-within { outline: 2px solid #7551be; }
.photo-actions { margin-top: 12px; }
#photo-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 14px; margin-top: 14px; padding: 12px; background: #f4f5f9; border: 1px solid var(--line); border-radius: 6px; }
#photo-preview { width: 100%; max-height: 320px; object-fit: contain; }
#photo-status, #photo-text-label { margin-bottom: 10px; }
#photo-text { width: 100%; resize: vertical; font: inherit; padding: 8px; border: 1px solid var(--line); }
.form-footer { justify-content: flex-end; margin-top: 16px; }
.scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
td, th { padding: 10px 12px; border-top: 1px solid var(--line); }
th { background: #eeedf5; font-size: 12px; white-space: nowrap; }
td input { width: 100%; min-width: 85px; }
#invoice-lines td:nth-child(2) input { min-width: 145px; }
.form .scroll { margin-top: 12px; }
.split { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); align-items: start; }
.cost-heading { margin-top: 22px; }
[data-cost-add] { margin-top: 10px; }
#price-form td select { max-width: 220px; }
[data-cost-source] { display: block; margin-top: 4px; color: var(--muted); }
#price-form td label { display: flex; align-items: center; gap: 5px; font-size: 12px; margin-top: 5px; white-space: nowrap; }
#price-form td input[type=checkbox] { width: auto; min-width: 0; }
#job-needs:not(:empty) { margin-top: 18px; }
#work-list { width: 100%; max-width: 680px; font-size: 1rem; }
#work-list option { padding: 6px; }
#work-count { margin-bottom: 10px; }
#work-documentation { padding: 12px 15px; margin-bottom: 12px; background: #f4f5f9; border: 1px solid var(--line); border-radius: 6px; }
#work-documentation p { margin-bottom: 8px; }
.result strong { display: block; color: var(--accent); font-size: 32px; margin: 10px 0; }
.result p { margin-bottom: 12px; line-height: 1.5; }
.empty { padding: 22px 16px; color: var(--muted); }
details { padding: 12px 16px; border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; }
details table { margin-top: 12px; }
#notice { padding: 10px 14px; border-radius: 5px; margin-bottom: 14px; background: #e0f1e9; color: #164a33; }
#notice.error { background: #fae9e7; color: #8b211b; }
@media (max-width: 850px) { .workspace { grid-template-columns: 1fr; } aside { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 12px; } aside nav, aside strong { display: none; } aside button, aside .file { width: auto; margin: 0; } aside .local { margin: 0; } }
@media (max-width: 600px) { header { display: block; } header nav a { padding: 9px 10px; font-size: 12px; } .metrics { gap: 6px; } .metrics div { padding: 8px; font-size: 12px; } }
