:root {
  --deep: #006A91;
  --teal: #51C3CA;
  --yellow: #F9B401;
  --blue: #0086AC;
  --gray: #A6A6A6;
  --black: #000000;
  --white: #FFFFFF;
  --ink: #16252d;
  --muted: #64737b;
  --line: #dce7ea;
  --bg: #f4f8f9;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 6px;
  padding: 11px 16px;
  background: var(--deep);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
}
button:hover { background: var(--blue); }
button:disabled { opacity: .55; cursor: wait; }
a { color: var(--deep); font-weight: 700; }
.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: 6px;
  padding: 10px 14px;
  background: #eaf5f7;
  color: var(--deep);
  text-decoration: none;
}
.button-link:hover { background: #d7eef2; }
.hidden { display: none !important; }
.error { color: #b42318; min-height: 20px; }
.muted { color: var(--muted); line-height: 1.5; }
.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--deep), var(--teal));
  padding: 24px;
}
.login-card {
  width: min(420px, 100%);
  background: var(--white);
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
}
.login-card img { width: 150px; margin-bottom: 20px; }
.login-card h1 { margin: 0 0 24px; font-size: 30px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: var(--white);
  color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
form { display: grid; gap: 16px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar {
  background: var(--deep);
  color: var(--white);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar img { width: 150px; margin-bottom: 28px; }
.nav-button, .ghost {
  background: rgba(255,255,255,.12);
  color: var(--white);
  text-align: left;
}
.nav-button.active, .nav-button:hover { background: var(--teal); color: var(--black); }
.ghost { margin-top: auto; }
.ghost.small { margin: 0 0 18px; color: var(--deep); background: transparent; padding-left: 0; }
main { padding: 32px; overflow: auto; }
.topbar, .section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.topbar h1, .section-title h2 { margin: 0; }
.topbar h1 { font-size: 34px; }
.section-title h2 { font-size: 26px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.operation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  gap: 24px;
  align-items: start;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 18px;
}
.panel h3, .panel h2 { margin: 0 0 14px; }
.operation-panel h3 { margin-bottom: 12px; }
.primary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.choice-button {
  min-height: 86px;
  display: grid;
  gap: 7px;
  place-items: center;
  background: var(--deep);
  color: var(--white);
  text-align: center;
  line-height: 1.2;
}
.choice-button span { font-size: 16px; }
.choice-button small {
  display: block;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.accent { background: var(--yellow); color: var(--black); margin-top: 14px; }
.status {
  margin-top: 16px;
  border-left: 4px solid var(--teal);
  padding-left: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.warning-list {
  margin-top: 12px;
  border-left: 4px solid var(--yellow);
  padding: 10px 12px;
  background: #fff8e1;
  color: #5f4600;
  line-height: 1.45;
}
.field-list, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.field-list span, .chips span, .recommendations button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: #f8fbfc;
  font-size: 13px;
}
.recommendations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.recommendations button {
  color: var(--deep);
  font-weight: 700;
  cursor: pointer;
}
.recommendations button:hover {
  border-color: var(--teal);
  background: #eaf8fa;
}
.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.technical-panel summary {
  cursor: pointer;
  color: var(--deep);
  font-weight: 800;
}
.technical-content {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}
.technical-content h3 {
  font-size: 16px;
  margin-bottom: 10px;
}
.technical-content .grid.two {
  align-items: start;
}
.chips span strong { color: var(--deep); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; font-size: 13px; }
th { color: var(--deep); background: #f5fafb; }
.report-list { display: grid; gap: 12px; }
.report-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.report-card h3 { margin: 0 0 6px; }
.report-card p { margin: 0; color: var(--muted); }
.report-meta { line-height: 1.45; }
.report-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.report-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #f8fbfc;
  color: var(--muted);
  font-size: 13px;
}
.detail-tags { margin-top: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.library-controls {
  display: flex;
  align-items: end;
  gap: 12px;
}
.library-controls label {
  min-width: 220px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.full { grid-column: 1 / -1; }
.report-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.report-hero div {
  background: var(--deep);
  color: var(--white);
  padding: 16px;
  border-radius: 8px;
}
.report-hero span { display: block; opacity: .8; font-size: 12px; margin-bottom: 8px; }
.report-hero strong { font-size: 22px; }
.public-report {
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 24px;
  background: var(--white);
  min-height: 100vh;
}
.print-logo { width: 150px; }
.print-page { background: var(--white); }
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .grid.two, .form-grid, .report-hero, .operation-grid, .primary-actions { grid-template-columns: 1fr; }
  .topbar, .section-title, .report-card { display: block; }
  .library-controls { align-items: stretch; margin-top: 14px; }
  .actions { justify-content: flex-start; margin-top: 14px; }
  main { padding: 20px; }
}
@media print {
  .public-report { padding: 24px; }
  button { display: none; }
}
