* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Calibri, Arial, sans-serif; color: #262626; background: #F2F5F9; font-size: 14px; }
.brand { background: #0F2A4A; color: #fff; padding: 22px 26px 18px; }
.brand-name { font-size: 24px; font-weight: 700; }
.brand-name span { color: #7FB0E6; }
.brand-sub { color: #C9D8EA; margin-top: 3px; max-width: 760px; }
main { max-width: 1060px; margin: 0 auto; padding: 18px 16px 30px; }
.card { background: #fff; border: 1px solid #D8E2EE; border-radius: 8px; padding: 20px 22px; }
.card.drag { border-color: #0F2A4A; box-shadow: 0 0 0 3px #B9C9DC inset; }
.dz-title { font-size: 16px; margin-bottom: 12px; }
.btn { font: inherit; cursor: pointer; border-radius: 5px; padding: 8px 14px; border: 1px solid #0F2A4A; }
.btn.primary { background: #0F2A4A; color: #fff; font-weight: 600; }
.btn.primary:disabled { background: #8A97A5; border-color: #8A97A5; cursor: not-allowed; }
.btn.ghost { background: #fff; color: #0F2A4A; border-color: #B9C9DC; }
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.file-btn { display: inline-block; }
.hint { color: #5A6B7E; font-size: 12.5px; line-height: 1.55; }
code { font-family: Consolas, monospace; background: #F2F5F9; padding: 0 4px; border-radius: 3px; }
.fi-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fi-name { font-weight: 700; font-size: 16px; }
.fi-meta { color: #5A6B7E; margin-top: 2px; }
.badge { margin-top: 8px; background: #EAF3E6; border: 1px solid #9DC48D; color: #2E5A1E; border-radius: 5px; padding: 6px 10px; font-size: 12.5px; display: inline-block; }
#workspace { margin-top: 16px; background: #fff; border: 1px solid #D8E2EE; border-radius: 8px; padding: 16px 18px; }
.ws-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.status { background: #F2F5F9; border: 1px solid #D8E2EE; border-radius: 5px; padding: 7px 11px; flex: 1; min-width: 240px; }
.ws-actions { display: flex; gap: 8px; }
.srow { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-bottom: 1px solid #EDF1F6; font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.srow.err { background: #FDF0EF; }
.chip { font-family: "Segoe UI", sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .5px; padding: 2px 6px; border-radius: 8px; flex: 0 0 46px; text-align: center; }
.chip.input { background: #E3ECF6; color: #0F2A4A; }
.chip.calc { background: #0F2A4A; color: #fff; }
.sname { font-weight: 700; color: #0F2A4A; min-width: 74px; }
.assign, .seq { color: #8A97A5; }
.sexpr { flex: 1; min-width: 120px; font: inherit; border: 1px solid transparent; border-radius: 4px; padding: 4px 6px; background: transparent; }
.sexpr:hover, .sexpr:focus { border-color: #B9C9DC; background: #fff; outline: none; }
.sresult { font-weight: 700; min-width: 130px; }
.sflag { font-family: "Segoe UI", sans-serif; font-size: 11px; font-weight: 700; min-width: 86px; }
.sflag.ok { color: #1D7A3A; }
.sflag.bad { color: #B3271E; }
.sflag.warnflag { color: #A86A00; }
footer { max-width: 1060px; margin: 0 auto; padding: 0 16px 26px; color: #8A97A5; font-size: 12px; }
.print-only { display: none; }
@media print {
  .no-print, header.brand, #dropCard, #workspace, footer { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; }
  #printSheet h1 { font-size: 20px; color: #0F2A4A; }
  #printSheet table { width: 100%; border-collapse: collapse; font-size: 12px; }
  #printSheet th, #printSheet td { border: 1px solid #9DB1C7; padding: 5px 8px; text-align: left; font-family: Consolas, monospace; }
  #printSheet th { background: #0F2A4A; color: #fff; font-family: "Segoe UI", sans-serif; }
}
@media (max-width: 720px) {
  .srow { flex-wrap: wrap; }
  .sresult { min-width: 0; }
}
