:root {
  color-scheme: dark;
  background: #0a1321;
  color: #edf3fc;
}

.shell { max-width: 1320px; padding: 24px; }
.shell > header {
  padding-bottom: 18px;
  border-bottom: 1px solid #27374d;
  margin-bottom: 18px;
}
.brand { line-height: 1.15; margin-bottom: 4px; }
.top h2 { line-height: 1.2; overflow-wrap: anywhere; }
.btn { min-height: 44px; }
.cards { gap: 12px; margin: 0 0 16px; }
.metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  text-align: left;
  color: #c7d5e8;
}
.metric strong { color: #f3f8ff; margin: 0; line-height: 1; }
.metric[aria-pressed="true"] { border-color: #65b6ff; background: #193657; }
.metric:hover, .side button:hover { border-color: #65b6ff; }
.side { padding: 8px; }
.side button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 8px;
}
.side button[aria-pressed="true"] { background: #203d60; color: #fff; }
.stage-count {
  flex: 0 0 auto;
  border-radius: 100px;
  background: #0d1828;
  color: #bcd9ff;
  padding: 3px 7px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
main.panel { padding: 18px; }
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.toolbar input { min-width: 0; }
.toolbar select { max-width: 100%; }
#search, #sort { min-height: 44px; }
td { overflow-wrap: anywhere; }
.customer-name {
  background: none;
  color: #f3f8ff;
  border: 0;
  padding: 0;
  text-align: left;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.customer-name:hover { text-decoration: underline; }
.wa-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #a5edc5;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.wa-link:hover { text-decoration: underline; }
.form-section {
  min-width: 0;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #40536b;
  border-radius: 12px;
}
.form-section legend { color: #9cd1ff; padding: 0 6px; font-weight: 650; }
.dialog .top { margin-bottom: 16px; }
.dialog .top h2 { margin: 0; }
.form-actions { margin-top: 16px; }
:where(button, a):focus-visible { outline: 2px solid #84c7ff; outline-offset: 2px; }

@media (max-width: 850px) {
  .side button { width: auto; }
}
@media (max-width: 760px) {
  .shell { padding: 12px; }
  .shell > header { gap: 10px; padding-bottom: 12px; margin-bottom: 12px; }
  .shell > header .btn { padding-inline: 10px; }
  .cards { gap: 8px; margin-bottom: 12px; }
  .metric { padding: 12px; font-size: 13px; min-height: 76px; }
  main.panel { padding: 12px; }
  .toolbar { grid-template-columns: minmax(0, 1fr); }
  .customer-name { min-height: 30px; }
  .tablewrap .row-actions { grid-column: 1 / -1; border-top: 1px solid #31465f; }
  .row-actions .wa-link { width: 100%; }
  .form-section { padding: 10px; }
  .dialog .top {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #142237;
    padding: 8px 0;
    border-bottom: 1px solid #40536b;
  }
}

#documentsPanel summary {
  cursor: pointer;
  min-height: 44px;
  align-content: center;
  color: #9cd1ff;
  font-weight: 700;
}
.document-file { grid-column: span 2; }
#uploadDocument { margin-top: 12px; }
#documentList { list-style: none; margin: 0; padding: 0; }
#documentList li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 0;
  border-top: 1px solid #40536b;
  overflow-wrap: anywhere;
}
#documentList a { display: inline-flex; align-items: center; text-decoration: none; }
@media (max-width: 850px) {
  .document-file { grid-column: auto; }
}

#comparisonPanel summary {
  cursor: pointer;
  min-height: 44px;
  align-content: center;
  color: #9cd1ff;
  font-weight: 700;
}
