:root { font-family: system-ui, sans-serif; color-scheme: light; }
body { margin: 0; background: #f5f6f8; color: #17191c; }
a { color: #1859a9; }
header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.5rem; background: white; border-bottom: 1px solid #ddd; }
.brand { color: inherit; font-weight: 700; text-decoration: none; }
.header-actions, .actions, .section-heading, .row-actions { display: flex; gap: .75rem; align-items: center; }
.section-heading { justify-content: space-between; }
main { max-width: 1100px; margin: 2rem auto; padding: 0 1rem; }
.card { background: white; border: 1px solid #ddd; border-radius: 10px; padding: 1.5rem; }
.narrow, .form-card { max-width: 620px; margin-left: auto; margin-right: auto; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.project-card { display: grid; gap: .35rem; padding: 1rem; border: 1px solid #ddd; border-radius: 8px; text-decoration: none; background: #fafafa; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin: 1.5rem 0; }
.metrics div { display: grid; gap: .25rem; padding: 1rem; border: 1px solid #e2e2e2; border-radius: 8px; }
.metrics strong { font-size: 1.5rem; }
.breadcrumbs { margin-bottom: 1rem; }
.button-link { display: inline-block; padding: .65rem 1rem; border: 1px solid #bbb; border-radius: 6px; text-decoration: none; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid #e5e5e5; padding: .7rem .5rem; vertical-align: top; }
label { display: grid; gap: .4rem; margin: 1rem 0; }
input, select, textarea { box-sizing: border-box; width: 100%; padding: .7rem; }
input[type="checkbox"] { width: auto; }
button { padding: .65rem 1rem; cursor: pointer; }
button.danger { border-color: #9b1c1c; color: #9b1c1c; }
.error, .errorlist { color: #9b1c1c; }
.messages { margin-bottom: 1rem; }
.message { padding: .75rem 1rem; border: 1px solid #cfd6df; border-radius: 6px; background: white; }
.message.error { border-color: #d79a9a; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; }
.details dt { font-weight: 700; }
.details dd { margin: 0; }
@media (max-width: 700px) { table { display: block; overflow-x: auto; } .section-heading { align-items: flex-start; flex-direction: column; } }

.preview-toolbar { margin-bottom: 1rem; }
.offer-document { max-width: 820px; margin: 0 auto; padding: 3rem; background: white; border: 1px solid #d7dbe0; box-shadow: 0 10px 30px rgba(0, 0, 0, .06); }
.offer-document-header { display: flex; justify-content: space-between; padding: 0 0 1rem; border-bottom: 2px solid #222; }
.offer-document-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 2rem 0; }
.offer-document-meta address { font-style: normal; line-height: 1.55; }
.offer-document-meta dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
.offer-document-meta dt { font-weight: 700; }
.offer-document-meta dd { margin: 0; }
.offer-document-copy { line-height: 1.55; }
.offer-document-table { margin: 1.5rem 0; }
.offer-document-total { text-align: right; margin: 1rem 0 2rem; }
.offer-document footer { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid #ddd; font-size: .9rem; color: #555; }
@media (max-width: 700px) { .offer-document { padding: 1.25rem; } .offer-document-meta { grid-template-columns: 1fr; } }
