:root {
  --blue: #1874a5; --dark: #243746; --light: #f3f6f9; --line: #d8e0e7; --text: #243746;
  --muted: #6b7b88; --green: #2e8b57; --warn: #b7791f;
  font-family: "Segoe UI", "Noto Sans", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--light); color: var(--text); font-size: 14px; }

.top { display: flex; align-items: center; gap: 24px; padding: 12px 24px; background: #fff; border-bottom: 3px solid var(--blue); }
.logo { height: 44px; }
.title { font-size: 18px; font-weight: 600; flex: 1; }
.contacts { color: var(--muted); font-size: 13px; text-align: right; line-height: 1.5; }
.contacts a { color: var(--blue); text-decoration: none; }

.layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; padding: 16px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.results { display: grid; gap: 16px; min-width: 0; }

.form h2 { margin: 0 0 12px; font-size: 16px; color: var(--blue); }
.form label { display: block; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.form input:not([type=checkbox]), .form select {
  display: block; width: 100%; margin-top: 3px; padding: 7px 9px; font: inherit; color: var(--text);
  border: 1px solid var(--line); border-radius: 5px; background: #fff;
}
.form input:focus, .form select:focus { outline: 2px solid #1874a533; border-color: var(--blue); }
.form label.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.form label.check.low { margin-top: 22px; }
fieldset { border: 0; padding: 0; margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
details { border-top: 1px solid var(--line); padding: 8px 0 2px; margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.series { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; }
.series label { margin: 0; }
.foot { margin-top: 10px; color: var(--muted); font-size: 12px; text-align: center; }

button { font: inherit; cursor: pointer; }
.primary { background: var(--blue); color: #fff; border: 0; border-radius: 5px; padding: 9px 18px; font-weight: 600; }
.primary:hover { background: #135f88; }
.form .primary { width: 100%; margin-top: 6px; padding: 11px; }

.hint { color: var(--muted); margin-bottom: 10px; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; white-space: nowrap; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 2px solid var(--line); }
td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #eef5fa; }
tbody tr.sel { background: #dcebf5; }
td.model { font-weight: 600; }
.badge { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 10px; background: var(--blue); color: #fff; }
.badge.b1 { background: var(--green); }
.badge.b2 { background: var(--warn); }

.dhead { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.dname { font-size: 18px; font-weight: 600; }
.dcode { color: var(--blue); font-weight: 600; margin-top: 2px; }
.actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.opts { display: flex; gap: 10px; }
.opts label { display: flex; gap: 4px; align-items: center; font-size: 13px; }
.tabs { display: flex; gap: 4px; margin: 14px 0 10px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 8px 14px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.tab img { width: 100%; height: auto; display: block; }

.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px 24px; }
.spec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: #fff; background: var(--dark); margin: 0; padding: 6px 10px; border-radius: 4px 4px 0 0; }
.spec table { white-space: normal; }
.spec td { padding: 5px 10px; font-size: 13px; }
.spec td:first-child { color: var(--muted); width: 58%; }
.note { color: var(--muted); font-size: 12px; margin-top: 6px; }
.warn { margin-top: 14px; padding: 10px 12px; background: #fff7e6; border-left: 4px solid var(--warn); border-radius: 4px; }
.warn div { margin: 2px 0; }
.error { color: #b42318; }

.busy { position: fixed; inset: 0; background: #ffffff88; display: grid; place-items: center; z-index: 10; }
.spinner { width: 42px; height: 42px; border: 4px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; gap: 8px; }
  .contacts { text-align: left; }
}
