body { margin: 0; font-family: Arial, sans-serif; display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; background: #eef4fb; color: #031b36; }
[hidden] { display: none !important; }
aside { background: #0f5f9d; color: white; padding: 22px 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: inset -1px 0 rgba(255,255,255,.15); }
aside strong { font-size: 18px; }
aside span { color: #d9edff; margin-bottom: 20px; }
button { min-height: 38px; border: 0; border-radius: 5px; padding: 0 14px; font-weight: 700; cursor: pointer; background: #0b70c9; color: white; }
aside button { background: transparent; color: white; text-align: left; }
aside button:hover, aside button.active { background: rgba(255,255,255,.15); }
main { padding: 28px 34px; overflow: auto; }
h1 { margin: 0 0 20px; font-size: 32px; }
h2 { margin: 0; font-size: 21px; }
.view { display: none; }
.view.active, .panel.active { display: block; }
.panel { display: none; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
article, form, table, .filters, .access-card, .estimate-card { background: white; border: 1px solid #d9e2ec; border-radius: 8px; padding: 18px; box-shadow: 0 8px 24px rgba(15, 38, 64, .05); }
article.online p { color: #128044; font-weight: 700; }
article.offline p { color: #b00020; font-weight: 700; }
input, select, textarea { min-height: 40px; padding: 7px 10px; border: 1px solid #bdc9d6; border-radius: 5px; font: inherit; background: white; box-sizing: border-box; }
textarea { min-height: 90px; resize: vertical; }
label { display: grid; grid-template-columns: 190px minmax(220px, 520px); align-items: center; gap: 16px; font-size: 18px; }
label.required::before { content: "*"; color: #d0021b; justify-self: end; margin-right: -8px; }
label.required { grid-template-columns: 10px 174px minmax(220px, 520px); }
label.required input { grid-column: 3; }
.wide textarea { min-width: 520px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; align-items: end; margin-bottom: 18px; }
.form-grid h2, .form-grid textarea, .form-grid .notice { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: 14px; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid #d9e2ec; }
.tab { background: #e3ebf4; color: #031b36; border-radius: 5px 5px 0 0; }
.tab.active { background: #0b70c9; color: white; }
.filters { display: flex; gap: 10px; margin-bottom: 14px; }
.filters input { flex: 1; }
table { width: 100%; border-collapse: collapse; padding: 0; overflow: hidden; margin-bottom: 18px; }
th, td { border-bottom: 1px solid #e2e8ef; text-align: left; padding: 12px 14px; vertical-align: top; }
th { background: #f5f8fb; }
.empty, .notice { color: #52606d; }
small { color: #52606d; display: block; margin-top: 8px; line-height: 1.35; }
.estimate-shell { display: grid; gap: 22px; max-width: 1620px; }
.estimate-card { padding: 0; overflow: hidden; }
.card-title { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid #e2e8ef; }
.card-title span { font-size: 18px; }
.card-title strong { color: #d0021b; }
.estimate-grid { padding: 24px; display: grid; gap: 16px; max-width: 980px; }
.form-actions { padding: 20px 24px 26px 404px; display: flex; gap: 20px; align-items: center; }
.primary { background: white; color: #0066bd; border: 1px solid #bdc9d6; min-height: 50px; font-size: 20px; padding: 0 26px; }
.link-button { background: transparent; color: #0066bd; font-size: 20px; }
.compact-card { padding-bottom: 18px; }
.line-grid { padding: 18px 24px 4px; display: grid; grid-template-columns: 220px minmax(260px, 1fr) 120px 140px 140px 180px 170px auto; gap: 10px; align-items: center; }
.inline-import { display: grid; grid-template-columns: auto 1fr minmax(260px, 420px) auto auto; gap: 12px; align-items: center; margin-bottom: 18px; }
.inline-import h2, .inline-import p { margin: 0; }
.inline-import p { color: #52606d; }
.estimate-preview-card { display: grid; justify-items: center; gap: 24px; }
.status-rail { background: white; border: 1px solid #d9e2ec; border-radius: 7px; box-shadow: 0 4px 12px rgba(0,0,0,.14); display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); min-width: 920px; overflow: hidden; }
.status-rail strong, .status-rail em { padding: 18px 26px; font-size: 24px; font-style: normal; color: #7b8a99; border-right: 1px solid #d9e2ec; }
.status-rail strong { color: #111; }
.status-rail span { display: none; }
.active-dot::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 12px; border-radius: 50%; border: 4px solid #62bd4f; vertical-align: middle; }
.estimate-paper { width: min(100%, 980px); min-height: 1120px; background: white; border-top: 5px solid #4398e8; box-shadow: 0 2px 9px rgba(0,0,0,.22); padding: 56px 64px; position: relative; }
.paper-head, .paper-meta { display: grid; grid-template-columns: 1.2fr .9fr; gap: 70px; }
.paper-logo strong { font-size: 48px; color: #348abb; text-shadow: 0 3px 6px rgba(0,0,0,.25); }
.paper-logo span { font-size: 48px; color: #348abb; }
.paper-logo small { display: block; color: #777; font-size: 24px; margin-left: 24px; }
.paper-company { font-size: 19px; line-height: 1.28; }
.paper-meta { margin-top: 90px; border-top: 1px solid #4398e8; padding-top: 24px; }
.paper-meta h2 { font-size: 29px; text-transform: uppercase; margin-bottom: 24px; }
.estimate-lines { margin-top: 70px; box-shadow: none; border-radius: 0; border: 0; }
.estimate-lines th { background: #4398e8; color: white; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; }
.estimate-lines td { background: white; }
.success { background: #70c963; color: #052b00; min-height: 48px; font-size: 20px; }
.paper-totals { margin-left: auto; width: 360px; display: grid; grid-template-columns: 1fr auto; row-gap: 22px; font-size: 21px; }
.paper-totals span:last-of-type, .paper-totals strong:last-child { font-size: 30px; font-weight: 800; }
.paper-note { position: absolute; bottom: 54px; left: 64px; right: 64px; font-size: 18px; color: #52606d; font-weight: 700; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.42); display: grid; place-items: start center; padding-top: 28px; z-index: 50; }
.modal-card { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 56px); overflow: auto; position: relative; padding: 28px; border-radius: 8px; }
.modal-card h2 { font-size: 30px; margin-bottom: 22px; }
.modal-close { position: absolute; right: 22px; top: 18px; background: transparent; color: #26323d; font-size: 34px; min-height: auto; padding: 0; }
.autofill-button { background: white; color: #0066bd; border: 1px solid #bdc9d6; font-size: 20px; }
.muted { color: #66788a; font-size: 18px; margin: 10px 0 18px; }
.modal-card hr { border: 0; border-top: 1px solid #d9e2ec; margin-bottom: 24px; }
.modal-card label { display: block; grid-template-columns: none; margin-bottom: 16px; font-size: 21px; }
.modal-card label strong { color: #d0021b; }
.modal-card input, .modal-card select, .modal-card textarea { width: 100%; margin-top: 5px; font-size: 20px; }
.modal-grid.two { display: grid; grid-template-columns: 170px 150px; gap: 12px; }
.money-field { display: flex; align-items: stretch; max-width: 190px; }
.money-field span { margin-top: 5px; display: grid; place-items: center; min-width: 38px; border: 1px solid #bdc9d6; border-right: 0; border-radius: 5px 0 0 5px; background: #f5f8fb; font-size: 20px; }
.money-field input { border-radius: 0 5px 5px 0; }
.checkbox-line { display: flex !important; align-items: center; gap: 14px; }
.checkbox-line input { width: 24px; height: 24px; margin: 0; }
.modal-actions { display: flex; gap: 10px; align-items: center; margin-top: 26px; }
.small-link { min-height: auto; padding: 0; font-size: 16px; margin: -8px 0 16px; }
.product-picker { border: 1px solid #d9e2ec; border-radius: 8px; padding: 12px; margin-top: 10px; display: grid; gap: 10px; background: #f8fbff; }
#itemProductResults { max-height: 320px; overflow: auto; display: grid; gap: 8px; align-items: start; }
#itemProductResults button { background: white; color: #031b36; border: 1px solid #d9e2ec; text-align: left; display: grid; grid-template-rows: auto auto auto; gap: 5px; min-height: auto; height: auto; padding: 10px 12px; line-height: 1.28; white-space: normal; align-items: start; }
#itemProductResults strong, #itemProductResults span, #itemProductResults em { display: block; overflow-wrap: anywhere; }
#itemProductResults span, #itemProductResults em { color: #52606d; font-style: normal; }
.access-card { margin-bottom: 24px; padding: 26px; }
.access-card h2 { margin-bottom: 24px; font-size: 30px; }
.access-card label { display: block; margin-bottom: 16px; font-size: 18px; }
.access-card label input, .access-card label select { width: 100%; margin-top: 8px; }
.danger { background: #d60000; box-shadow: 0 6px 12px rgba(214,0,0,.2); min-height: 48px; font-size: 17px; }
.dark { background: #333; color: white; border-radius: 9px; box-shadow: 0 4px 10px rgba(0,0,0,.18); }
.action { margin: 3px; }
code { background: #f0f4f8; padding: 5px 8px; border-radius: 6px; white-space: nowrap; }
