:root {
  color-scheme: light;
  --ink: #183144;
  --muted: #6b7b88;
  --line: #e4ebf0;
  --brand: #176b87;
  --brand-dark: #104c62;
}

body {
  min-height: 100vh;
  background: #f3f6f8;
  color: var(--ink);
  font-family: Inter, "Segoe UI", sans-serif;
}

.app-header {
  padding: .5rem .25rem;
}

.eyebrow {
  color: var(--brand);
  font-size: .73rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.live-pill {
  align-items: center;
  background: #e5f5ec;
  border-radius: 999px;
  color: #26734b;
  display: inline-flex;
  font-size: .83rem;
  font-weight: 650;
  gap: .45rem;
  padding: .45rem .75rem;
}

.live-dot {
  background: #36a66b;
  border-radius: 50%;
  height: .5rem;
  width: .5rem;
}

.account-pill {
  color: var(--muted);
  font-size: .83rem;
}

.account-pill strong {
  color: var(--ink);
}

.board-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 8px 26px rgb(23 53 73 / 6%);
}

.board-summary-wrap {
  background: #f7f9fa;
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: .8rem 1rem;
}

.summary-label {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .07em;
  margin-bottom: .55rem;
  text-transform: uppercase;
}

.board-summary {
  display: grid;
  gap: .45rem;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.board-summary-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .55rem;
  display: flex;
  font-size: .82rem;
  gap: .55rem;
  justify-content: space-between;
  padding: .5rem .65rem;
}

.board-summary-item strong {
  color: var(--ink);
}

.order-search {
  max-width: 620px;
}

.order-search label {
  color: var(--ink);
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.order-search .form-control,
.order-search .btn {
  min-height: 2.7rem;
}

.search-result-board {
  color: var(--brand-dark);
  font-weight: 750;
}

.search-result-open {
  white-space: nowrap;
}

.summary-count {
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 700;
  padding: .15rem .4rem;
}

.summary-orange {
  background: #fff0d3;
  color: #885708;
}

.summary-red {
  background: #ffe0df;
  color: #a42f2b;
}

.confirm-dialog {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 18px 60px rgb(23 53 73 / 24%);
  max-width: min(440px, calc(100vw - 2rem));
  padding: 1.5rem;
  width: 100%;
}

.confirm-dialog::backdrop {
  background: rgb(16 34 47 / 52%);
  backdrop-filter: blur(2px);
}

.confirm-icon {
  align-items: center;
  background: #fff0d3;
  border-radius: 50%;
  color: #9a6207;
  display: flex;
  font-size: 1.15rem;
  font-weight: 800;
  height: 2.5rem;
  justify-content: center;
  margin-bottom: 1rem;
  width: 2.5rem;
}

.confirm-message {
  color: var(--muted);
  margin: .5rem 0 1.5rem;
}

.board-card .card-body {
  padding: clamp(1rem, 3vw, 1.75rem);
}

.board-tabs {
  border-bottom-color: var(--line);
  gap: .35rem;
}

.board-tabs .nav-link {
  border: 0;
  border-radius: .65rem .65rem 0 0;
  color: var(--muted);
  font-weight: 700;
  min-width: 4.5rem;
  padding: .7rem 1rem;
}

.board-tabs .nav-link.active {
  background: #eaf3f7;
  box-shadow: inset 0 -3px var(--brand);
  color: var(--brand-dark);
}

.history-count {
  background: #e9edf0;
  border-radius: 1rem;
  font-size: .72rem;
  margin-left: .2rem;
  padding: .13rem .4rem;
}

.planning-table {
  min-width: 680px;
}

.planning-table thead th {
  background: #f5f8fa;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .055em;
  padding: .8rem 1rem;
  text-transform: uppercase;
}

.planning-table tbody td {
  border-color: var(--line);
  padding: .65rem 1rem;
}

.planning-table tbody tr:hover {
  background: #f8fbfc;
}

.planning-table .form-control {
  border-color: #dce5eb;
  min-height: 2.65rem;
}

.planning-table .form-control:focus {
  border-color: #70aabc;
  box-shadow: 0 0 0 .2rem rgb(23 107 135 / 12%);
}

.planning-table input[type="datetime-local"] {
  min-width: 235px;
}

.start-inputs {
  display: flex;
  gap: .45rem;
  min-width: 245px;
}

.start-inputs .start-date {
  flex: 1 1 auto;
  min-width: 145px;
}

.start-inputs .start-time {
  flex: 0 0 88px;
  text-align: center;
}

.planning-table .start-warning {
  background-color: #fff0d3;
  border-color: #edac39;
}

.planning-table .start-inputs.start-warning .form-control {
  background-color: #fff0d3;
  border-color: #edac39;
}

.planning-table .start-critical {
  background-color: #ffe0df;
  border-color: #df5b55;
}

.planning-table .start-inputs.start-critical .form-control {
  background-color: #ffe0df;
  border-color: #df5b55;
}

.entry-name-wrap {
  align-items: center;
  display: flex;
  gap: .6rem;
}

.delete-entry {
  flex: 0 0 auto;
}

.typing-indicator {
  background: #e9f4f8;
  border-radius: 999px;
  color: var(--brand-dark);
  display: inline-block;
  font-size: .72rem;
  margin-top: .35rem;
  padding: .18rem .5rem;
}

.typing-row {
  background: #f1f8fb;
}

.empty-state {
  color: var(--muted);
  padding: 2rem !important;
  text-align: center;
}

.history-person {
  font-weight: 650;
}

@media (max-width: 600px) {
  .board-toolbar {
    align-items: flex-start !important;
  }

  .board-tabs .nav-link {
    min-width: auto;
    padding: .6rem .65rem;
  }

  .board-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
