*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  -webkit-font-smoothing: antialiased;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: #1e3a5f;
  color: #fff;
  padding: 1rem;
  flex-shrink: 0;
}

.brand {
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.nav-link {
  display: block;
  color: #cbd5e1;
  text-decoration: none;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  min-height: 48px;
  line-height: 1.4;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.more-nav summary {
  cursor: pointer;
  padding: 0.75rem 0.5rem;
  color: #94a3b8;
}

.more-nav .nav-link {
  padding-left: 1rem;
  font-size: 0.95rem;
}

.content {
  flex: 1;
  padding: 1.25rem 1.5rem;
  max-width: 520px;
}

.content-today {
  max-width: 820px;
}

/* ── Today page (job board style) ── */

.today-page {
  width: 100%;
}

.today-header {
  margin-bottom: 1.25rem;
}

.status-pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.status-pill--green {
  background: #e6f4ea;
  color: #137333;
}

.status-pill--amber {
  background: #fef7e0;
  color: #b06000;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5f6368;
  margin: 0 0 0.75rem;
}

.today-summary {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: #5f6368;
}

.section-note {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.85rem;
  color: #80868b;
}

.today-section--alert .section-label {
  color: #b06000;
}

.queue-min {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #80868b;
}

.job-board-card {
  background: #fff;
  border: 1px solid #e0e4ea;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
}

.job-board-card--active {
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.12);
}

.job-board-card--empty {
  text-align: center;
  color: #5f6368;
  padding: 2.5rem 1.5rem;
}

.job-board-card--queue {
  padding: 0.875rem 1.25rem;
  opacity: 0.92;
}

.job-board-head {
  margin-bottom: 1.25rem;
}

.job-board-title h2 {
  margin: 0.35rem 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  color: #202124;
}

.job-board-sub {
  margin: 0;
  font-size: 0.875rem;
  color: #5f6368;
}

.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.badge-urgent {
  background: #fce8e6;
  color: #c5221f;
}

.badge-soft {
  background: #e8f0fe;
  color: #1967d2;
}

.job-board-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #f1f3f4;
  border-bottom: 1px solid #f1f3f4;
  margin-bottom: 1.25rem;
}

.job-board-col .col-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #80868b;
  margin-bottom: 0.25rem;
}

.job-board-col .col-place {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #202124;
}

.job-board-col .col-sub {
  display: block;
  font-size: 0.8125rem;
  color: #5f6368;
  margin-top: 0.15rem;
}

.job-board-prices {
  text-align: right;
}

.price-line {
  margin-bottom: 0.35rem;
}

.price-line .col-label {
  display: inline;
  margin-right: 0.5rem;
  font-size: 0.75rem;
}

.price-big {
  font-size: 1.75rem;
  font-weight: 700;
  color: #202124;
  line-height: 1.1;
}

.price-min {
  font-size: 1.125rem;
  font-weight: 600;
  color: #5f6368;
}

.job-board-actions {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.job-board-actions .done-form {
  flex: 1;
  margin: 0;
}

.btn-claim {
  flex: 1;
  min-height: 48px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f4fd;
  color: #1565c0;
  border: 1px solid #bbdefb;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1rem;
  width: auto;
}

.btn-claim:hover {
  background: #d2ebfc;
}

.job-board-actions .btn-done {
  margin-top: 0;
  border-radius: 8px;
  font-size: 0.9375rem;
}

.job-board-hint {
  margin: 0.875rem 0 0;
  font-size: 0.8125rem;
  color: #80868b;
  text-align: center;
}

.queue-section {
  margin-top: 1.75rem;
}

.queue-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #5f6368;
  margin: 0 0 0.625rem;
}

.queue-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.queue-main strong {
  display: block;
  font-size: 0.9375rem;
  color: #3c4043;
  font-weight: 600;
}

.queue-route {
  font-size: 0.8125rem;
  color: #80868b;
}

.queue-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: #5f6368;
  white-space: nowrap;
}

.deposit-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fef7e0;
  border: 1px solid #f9e076;
  border-radius: 10px;
  padding: 0.875rem 1.25rem;
  margin-top: 1.5rem;
}

.deposit-strip p {
  margin: 0;
  font-weight: 600;
  color: #b06000;
}

.btn-sm {
  width: auto;
  min-height: 40px;
  line-height: 40px;
  font-size: 0.875rem;
  padding: 0 1.25rem;
}

@media (max-width: 640px) {
  .content-today {
    max-width: 100%;
    padding: 1rem;
  }

  .job-board-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
  }

  .job-board-prices {
    grid-column: 1 / -1;
    text-align: left;
    display: flex;
    gap: 2rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #e8eaed;
  }

  .job-board-actions {
    flex-direction: column;
  }

  .btn-claim,
  .job-board-actions .btn-done {
    width: 100%;
  }
}

.banner {
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.banner-green { background: #dcfce7; color: #166534; }
.banner-amber { background: #fef3c7; color: #92400e; }
.banner-red { background: #fee2e2; color: #991b1b; }

.section h2 {
  font-size: 1rem;
  margin: 1.5rem 0 0.75rem;
}

.job-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn {
  display: block;
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  line-height: 48px;
  padding: 0 1rem;
}

.btn-shiply {
  background: #16a34a;
  color: #fff;
  margin-bottom: 1rem;
}

.btn-done {
  background: #1e3a5f;
  color: #fff;
  margin-top: 1rem;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-secondary {
  background: #e2e8f0;
  color: #334155;
}

.btn-copy {
  background: #f1f5f9;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.bid-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.bid-row strong {
  font-size: 28px;
  color: #1e3a5f;
}

.job-card-focus {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.empty {
  color: #64748b;
  padding: 2rem 0;
  text-align: center;
}

.deposit-banner {
  background: #fef3c7;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-box {
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.login-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 1rem;
  margin: 1rem 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
}

.error { color: #dc2626; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.stat-card {
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
}

.stat-card strong {
  display: block;
  font-size: 1.5rem;
  margin-top: 0.25rem;
}

.mgr-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.mgr-table th,
.mgr-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

.content:has(.mgr-table) {
  max-width: 960px;
}

.route-card {
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.fill-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.fill-bar .fill {
  height: 100%;
  background: #16a34a;
}

.settings-form label {
  display: block;
  margin-bottom: 1rem;
}

.settings-form input {
  width: 100%;
  min-height: 40px;
  margin-top: 0.25rem;
  padding: 0 0.5rem;
}

.meta {
  color: #64748b;
  font-size: 0.9rem;
}

.refresh-form {
  margin-top: 2rem;
}

.done-flash {
  opacity: 0.5;
}

.route-map {
  height: 280px;
  border-radius: 12px;
  margin-top: 1rem;
}

.leg-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
}

.link-btn {
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.85rem;
  padding: 0 0.25rem;
}

@media (max-width: 640px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .brand { width: 100%; }
  .more-nav { width: 100%; }
}
