
:root { color-scheme: light; --bg: #f4efe6; --ink: #182018; --muted: #687064; --card: #fffaf0; --line: #d7c9b4; --accent: #285f4d; --accent-ink: #fff; --warn: #fff1c8; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: Georgia, "Times New Roman", serif; background: radial-gradient(circle at top left, #fff7df, transparent 36rem), linear-gradient(135deg, #f7f0df, #e7e1d3); color: var(--ink); }
header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 18px; align-items: center; padding: 22px 28px; background: #18342d; color: #fff; border-bottom: 5px solid #c79b3b; }
h1, h2, p { margin-top: 0; }
header h1 { margin-bottom: 4px; letter-spacing: .03em; }
header p { margin-bottom: 0; color: #d6e2d7; }
nav { display: flex; gap: 8px; flex-wrap: wrap; }
nav a, .button, button { display: inline-block; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 9px 13px; text-decoration: none; cursor: pointer; font: inherit; }
.secondary { background: transparent; color: var(--accent); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.version { display: grid; gap: 2px; text-align: right; color: #d6e2d7; }
main { width: min(1400px, calc(100vw - 32px)); margin: 26px auto; display: grid; gap: 18px; }
.hero, .card, .kpis > div, .login-card { background: color-mix(in srgb, var(--card) 92%, white); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 42px rgb(45 35 20 / 12%); padding: 22px; }
.hero { display: flex; justify-content: space-between; gap: 18px; align-items: start; background: linear-gradient(135deg, #fff9e7, #e8f0df); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 700; font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.kpis strong { display: block; font-size: 30px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.wide { overflow: hidden; }
.directory-list { display: grid; gap: 12px; }
.directory-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 14px; }
.pagination { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin: 12px 0; flex-wrap: wrap; }
.directory-card { display: flex; justify-content: space-between; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fffdf7; }
.directory-card h3 { margin: 0 0 6px; }
.directory-card p { margin-bottom: 4px; }
.card-actions, .section-heading { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.compact-actions { gap: 6px; justify-content: flex-end; }
.compact-actions .button, .compact-actions button { padding: 6px 10px; }
.inline-form { display: inline; }
.danger-button { border-color: #8d2b22; color: #8d2b22; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; background: #fffdf7; color: var(--ink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.map-picker { border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: #fffdf7; }
.map-picker summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.import-panel-button { justify-self: end; }
.import-panel-schedule { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fffdf7; }
.import-panel-schedule h3 { margin: 0 0 10px; font-size: 18px; }
.map-picker-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin: 12px 0; }
.map-picker-map { min-height: 280px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #e9e2d4; }
.source-panel-picker { background: #fffdf7; }
.source-panel-actions { display: flex; justify-content: flex-end; }
.source-panel-results { display: grid; gap: 8px; }
.source-panel-result { width: 100%; display: grid; gap: 3px; text-align: left; border-radius: 12px; background: #fffaf0; color: var(--ink); border-color: var(--line); }
.source-panel-result span { color: var(--muted); font-size: 14px; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
legend { color: var(--accent); font-weight: 700; padding: 0 6px; }
.choice-list { display: grid; gap: 10px; background: #fffdf7; }
.choice-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fffaf0; }
.choice-row input { width: auto; }
.choice-row small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.choice-row.compact-choice { justify-content: center; padding: 8px 10px; }
.amp-choice-list { grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); }
.amp-choice-list legend, .amp-choice-list [data-amp-other-row] { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fffaf0; }
.check input { width: auto; }
.tandem-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; grid-column: 1 / -1; }
.hierarchy-card { grid-column: span 2; }
.hierarchy-section, .property-section { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.hierarchy-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.hierarchy-section h3, .property-section h4 { margin: 0 0 8px; }
.hierarchy-section ul, .property-section ul { display: grid; gap: 8px; margin: 0; padding-left: 20px; }
.hierarchy-section li span, .property-section li span { display: block; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 960px; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 10px; vertical-align: top; }
th { color: var(--accent); }
.schedule-stack { display: grid; gap: 24px; }
.panel-schedule-card { break-inside: avoid; }
.panel-layout-print-card { break-inside: avoid; overflow: visible; }
.panel-schedule-heading { display: flex; justify-content: space-between; gap: 18px; align-items: start; margin-bottom: 14px; }
.panel-schedule-heading h2 { font-size: 28px; margin-bottom: 2px; letter-spacing: .04em; }
.panel-schedule-table { min-width: 0; table-layout: fixed; border: 2px solid #111; background: #fff; font-family: "Times New Roman", Georgia, serif; }
.panel-schedule-table td { border: 1px solid #111; color: #111; padding: 3px 8px; height: 17px; text-align: center; vertical-align: middle; }
.schedule-amp-col { width: 8%; }
.schedule-number-col { width: 7%; }
.schedule-amp { font-weight: 700; background: #ece7dc; color: #111; }
.schedule-amp-15 { background: #2f6fb7; color: #fff; }
.schedule-amp-20 { background: #c82828; color: #fff; }
.schedule-amp-25 { background: #8b8f96; color: #fff; }
.schedule-amp-30 { background: #2f8053; color: #fff; }
.schedule-amp-40 { background: #8b8f96; color: #fff; }
.schedule-amp-50 { background: #202226; color: #fff; }
.schedule-amp-60, .schedule-amp-high { background: #30343b; color: #fff; }
.schedule-amp-unknown { background: #ece7dc; color: #111; }
.schedule-number { font-weight: 700; letter-spacing: .04em; }
.schedule-label { font-weight: 600; }
.schedule-label small { display: block; font-size: 10px; font-weight: 500; margin-top: 1px; }
.schedule-label.schedule-double-pole { background: #f7f0df; }
.schedule-label.schedule-surge-protector { background: #eaf8f2; }
.schedule-amp.schedule-surge-protector { background: #146c5f; color: #fff; }
.schedule-label.schedule-tandem-cell { background: #fffaf0; }
.panel-layout-editor { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr); gap: 18px; align-items: start; }
.panel-layout-table { min-width: 0; table-layout: fixed; border: 2px solid #111; background: #fff; }
.panel-layout-table th { text-align: center; background: #18342d; color: #fff; }
.panel-layout-table td { border: 1px solid #111; text-align: center; vertical-align: middle; padding: 6px; }
.layout-row-number, .panel-layout-table th[data-center-row-marker] { width: 42px; font-weight: 700; background: #f7f0df; }
.marker-toggle { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.marker-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.layout-slot { position: relative; height: 52px; min-height: 52px; background: #fffdf7; transition: outline .12s ease, background .12s ease; }
.layout-space-marker-cell, .panel-layout-table th[data-space-marker-column] { display: none; width: 58px; background: #f7f0df; }
.layout-space-marker-cell { padding: 4px; vertical-align: middle; }
.layout-space-marker { display: inline-flex; align-items: center; justify-content: center; min-width: 2.35rem; min-height: 2rem; padding: 4px 8px; border: 1px solid #111; border-radius: 999px; background: #18342d; color: #fff; font-size: 14px; line-height: 1; font-weight: 900; letter-spacing: .08em; box-shadow: 0 2px 5px rgb(0 0 0 / 20%); }
.panel-layout-table[data-marker-mode="space"] .layout-space-marker-cell, .panel-layout-table[data-marker-mode="space"] th[data-space-marker-column] { display: table-cell; }
.panel-layout-table[data-marker-mode="space"] [data-center-row-marker] { display: none; }
.layout-slot-occupied { background: #fffaf0; }
.layout-slot-double-pole { height: 116px; background: #f7f0df; }
.layout-slot-reserved { color: var(--muted); background: #eee7d8; font-size: 13px; }
.layout-slot-feeder { background: #146c5f; color: #fff; border-color: #ffeb3b; border-width: 4px; outline: 4px solid #ffeb3b; outline-offset: -5px; box-shadow: inset 0 0 0 7px #0b3d36, 0 0 0 1px #0b3d36; font-weight: 700; }
.layout-slot-feeder strong, .layout-slot-feeder span { display: block; }
.layout-slot-feeder span { margin-top: 4px; font-size: 12px; font-weight: 600; color: #fff; }
.layout-slot-drop-active { outline: 3px solid var(--accent); background: #fff4c2; }
.layout-breaker { display: grid; gap: 2px; width: 100%; min-height: 40px; border-radius: 10px; border: 1px solid #111; padding: 6px 8px; color: #fff; cursor: grab; text-align: center; align-content: center; }
.layout-breaker-double-pole { height: 100%; min-height: 98px; }
.layout-breaker.layout-breaker-surge { background: #146c5f; color: #fff; border-color: #ffeb3b; border-width: 4px; box-shadow: inset 0 0 0 2px #0b3d36, 0 0 0 1px #0b3d36; }
.layout-breaker:active { cursor: grabbing; }
.layout-breaker span { font-size: 12px; font-weight: 600; }
.breaker-palette { display: grid; gap: 10px; margin-bottom: 16px; }
.breaker-palette .layout-breaker { min-height: 46px; }
.breaker-palette .layout-breaker-double-pole { height: 98px; min-height: 98px; }
.quick-breaker-editor { position: sticky; top: 14px; }
code { background: #efe4cc; border-radius: 6px; padding: 2px 5px; }
.muted { color: var(--muted); }
.notice { background: var(--warn); border: 1px solid #d5b45d; border-radius: 10px; padding: 10px; }
.login-card { max-width: 460px; margin: 8vh auto; }
@media (max-width: 900px) { header, .hero { display: block; } .grid, .kpis, .panel-layout-editor, .tandem-entry-grid { grid-template-columns: 1fr; } nav { margin-top: 14px; } .version { text-align: left; margin-top: 10px; } .quick-breaker-editor { position: static; } }
@page { margin: 0.25in; }
@media print {
  html, body { margin: 0; padding: 0; }
  body { background: #fff; color: #000; }
  header, .no-print, .hero.no-print { display: none !important; }
  main { box-sizing: border-box; width: 100%; margin: 0; padding: 0.17in; display: block; }
  .schedule-stack { gap: 0.12in; }
  .card { box-shadow: none; border: 0; padding: 0; background: #fff; }
  .panel-schedule-card { page-break-inside: avoid; margin-bottom: 18px; }
  .panel-layout-print-card { page-break-inside: avoid; margin-bottom: 18px; }
  .panel-schedule-heading { margin-bottom: 8px; }
  .panel-schedule-table td { height: 13px; padding: 2px 6px; }
  .panel-layout-table { width: 100%; min-width: 0; }
  .panel-layout-table td { height: 0.32in; padding: 4px; }
  .panel-layout-table .layout-slot > .muted { display: none; }
  .layout-breaker { min-height: 0.27in; padding: 4px 6px; border-radius: 6px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .layout-breaker-double-pole { min-height: 0.68in; }
  .layout-breaker span { font-size: 10px; }
  .layout-space-marker { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
