:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #2b3d4c;
  background: #edf7fa;
  font-synthesis: none;
  font-smooth: always;
  --blue: #286c87;
  --blue-light: #e1f2f6;
  --line: #e1eaee;
  --muted: #7a8a96;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: linear-gradient(135deg, #f3fafc, #e2f1f5); }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-page { width: min(100%, 1440px); min-height: 100vh; margin: auto; padding: 24px clamp(14px, 4vw, 52px) 48px; }
.app-header { position: sticky; top: 12px; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; min-height: 66px; margin-bottom: 30px; padding: 10px 14px; border: 1px solid #ffffff; border-radius: 17px; background: #ffffffd9; box-shadow: 0 8px 25px #286c8712; backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #29475a; text-decoration: none; }
.brand-mark, .logo-mark { display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #62b3c7, #286c87); font-weight: 800; letter-spacing: .4px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 3px 0 #add9e2; font-size: 12px; }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 14px; }
.brand-copy small { max-width: 180px; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 3px; padding: 4px; border: 1px solid #e4edf0; border-radius: 12px; background: #f7fbfc; }
.site-nav a { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 0 16px; border-radius: 9px; color: #647a87; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: .18s ease; }
.site-nav a:hover { color: var(--blue); background: #edf7f9; }
.site-nav a.active { color: #205b74; background: #dff1f5; box-shadow: inset 0 0 0 1px #c8e7ed; }
.logout-button { justify-self: end; min-height: 38px; padding: 0 14px; border: 1px solid #dce7eb; border-radius: 9px; color: #5f7380; background: #fff; font-size: 11px; font-weight: 700; cursor: pointer; }
.logout-button:hover { border-color: #e8d4d1; color: #9c5550; background: #fff8f7; }

.hero-card { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 170px; overflow: hidden; margin-bottom: 20px; padding: 28px clamp(22px, 4vw, 42px); border-radius: 21px; color: #fff; background: linear-gradient(115deg, #286c87, #6bb7c9); box-shadow: 8px 9px 0 #bfdee5, 0 18px 30px #286c871b; }
.hero-card .eyebrow { color: #d8f1f5; }
.hero-card h1 { margin: 8px 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.7px; }
.hero-card p { margin: 0; color: #e4f5f7; font-size: 13px; }
.hero-actions { position: relative; z-index: 1; flex: 0 0 auto; }
.hero-export { min-width: 105px; border-color: #d6eef2; color: #286c87; background: #f5fcfd; }
.hero-export:hover { background: #e5f5f8; }
.eyebrow { margin: 0; color: #668695; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; }
.muted, .page-title p { color: var(--muted); line-height: 1.55; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 auto 20px; }
.summary-card { padding: 18px 20px; border: 1px solid #ffffff; border-radius: 15px; background: #ffffffc7; box-shadow: 5px 6px 0 #d0e4e9; }
.summary-card span, .summary-card strong, .summary-card small { display: block; }
.summary-card span { color: #738792; font-size: 11px; font-weight: 600; }
.summary-card strong { margin: 8px 0 3px; color: var(--blue); font-size: 27px; }
.summary-card small { color: #98a6ae; font-size: 10px; }
.content-grid { display: grid; grid-template-columns: minmax(290px, 370px) minmax(0, 1fr); align-items: start; gap: 18px; }
.panel { min-width: 0; padding: 23px; border: 1px solid #ffffff; border-radius: 17px; background: #ffffffc9; box-shadow: 7px 8px 0 #d0e4e9; }
.panel-heading { margin-bottom: 15px; }
.panel-heading h2, .capacity-panel h2 { margin: 6px 0 0; color: #354b5a; font-size: 18px; }
.panel-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.form-stack { display: grid; gap: 13px; }
label { display: block; color: #536a78; font-size: 11px; font-weight: 700; }
input, select { width: 100%; min-height: 42px; margin-top: 6px; padding: 10px 11px; border: 1px solid #dbe6ea; border-radius: 9px; outline: none; color: #334957; background: #fbfdfe; font-size: 12px; }
input:focus, select:focus { border-color: #83bdcb; box-shadow: 0 0 0 3px #62b3c71d; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field-hint { display: block; margin-top: 5px; color: #82949e; font-size: 9px; font-weight: 500; }
.button { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; padding: 0 14px; border: 0; border-radius: 9px; font-size: 11px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.button-primary { width: 100%; margin-top: 5px; color: #fff; background: linear-gradient(135deg, #5faec4, #286c87); box-shadow: 0 4px 0 #20566d; }
.button-primary:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #20566d; }
.button-secondary { border: 1px solid #d4e7eb; color: #286c87; background: #f3fafb; white-space: nowrap; }
.button-secondary:hover { background: #e6f4f7; }
.order-list { display: grid; gap: 10px; }
.order-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid #e5eef1; border-radius: 12px; background: #ffffffd9; }
.order-details { min-width: 0; }
.order-details strong, .order-details span, .order-details small { display: block; }
.order-details strong { color: #344d5d; font-size: 13px; }
.order-details span, .order-details small { margin-top: 5px; color: #7b8d98; font-size: 10px; }
.pickup-toggle { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: #627b87; font-size: 10px; white-space: nowrap; }
.pickup-toggle input { width: 15px; min-height: auto; margin: 0; accent-color: #3987a0; }
.table-status { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.table-status input { width: 15px; min-height: auto; margin: 0; accent-color: #3987a0; }
.page-title { margin: 6px auto 20px; }
.page-title h1 { margin: 7px 0 4px; color: #2f4655; font-size: 26px; letter-spacing: -.5px; }
.page-title p { margin: 0; font-size: 12px; }
.compact-grid { margin-top: 16px; }
.summary-grid.compact-grid { grid-template-columns: repeat(3, 1fr); }
.table-panel { margin-top: 14px; }
.search-input { width: min(100%, 270px); margin: 0; }
.filter-row { display: flex; gap: 5px; margin: 5px 0 14px; padding: 4px; border-radius: 10px; background: #f1f6f8; }
.filter-button { padding: 8px 12px; border: 0; border-radius: 7px; color: #748791; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.filter-button.active { color: #286c87; background: #fff; box-shadow: 0 1px 4px #286c8718; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 11px; }
.data-table th { padding: 11px 10px; color: #fff; background: #438ea7; text-align: left; white-space: nowrap; }
.data-table th:first-child { border-radius: 8px 0 0 0; }
.data-table th:last-child { border-radius: 0 8px 0 0; }
.data-table td { padding: 11px 10px; border-bottom: 1px solid #e6eef1; color: #536a78; white-space: nowrap; }
.data-table tbody tr:nth-child(even) { background: #f7fbfc; }
.status-pill { display: inline-block; padding: 5px 8px; border-radius: 20px; color: #8b6b37; background: #fbf2df; font-size: 9px; font-weight: 700; }
.status-pill.done { color: #39725b; background: #e2f3eb; }
.empty-message { padding: 24px 10px; color: var(--muted); text-align: center; font-size: 12px; }
.report-grid { grid-template-columns: repeat(4, 1fr); }
.capacity-panel { display: grid; gap: 14px; }
.capacity-panel h2 { font-size: 16px; }
.capacity-track { height: 10px; overflow: hidden; border-radius: 99px; background: #e5eef1; }
.capacity-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #79c5d2, #286c87); transition: width .3s ease; }
.capacity-panel .muted { margin: 0; font-size: 11px; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 15% 10%, #fff, transparent 30%), linear-gradient(135deg, #effafd, #d8eef3); }
.login-card { width: min(100%, 410px); padding: 34px; border: 1px solid #fff; border-radius: 22px; background: #ffffffd9; box-shadow: 12px 15px 35px #286c8724; }
.logo-mark { width: 50px; height: 50px; margin-bottom: 24px; border-radius: 15px; box-shadow: 0 4px 0 #add9e2; font-size: 15px; }
.login-card h1 { margin: 8px 0; color: #304959; font-size: 27px; letter-spacing: -.5px; }
.login-card .muted { margin: 0 0 20px; font-size: 12px; }
.text-button { display: block; margin: 18px auto 0; padding: 5px; border: 0; color: var(--blue); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }

@media (max-width: 980px) {
  .app-header { grid-template-columns: 1fr auto; gap: 10px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; width: 100%; }
  .site-nav a { flex: 1; padding: 0 8px; }
  .brand { grid-column: 1; grid-row: 1; }
  .logout-button { grid-column: 2; grid-row: 1; }
  .report-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .app-page { padding: 14px 12px 30px; }
  .app-header { position: static; margin-bottom: 20px; padding: 9px; }
  .site-nav { gap: 1px; }
  .site-nav a { min-height: 35px; padding: 0 4px; font-size: 10px; }
  .content-grid { grid-template-columns: 1fr; }
  .summary-grid { gap: 9px; }
  .summary-card { padding: 14px; }
  .summary-card strong { font-size: 22px; }
  .hero-card { min-height: 145px; padding: 22px; }
  .hero-export { min-width: auto; padding: 0 9px; }
  .panel { padding: 17px; }
  .panel-heading-row { align-items: flex-start; }
  .report-grid { gap: 9px; }
  .report-grid .summary-card { overflow-wrap: anywhere; }
  .report-grid .summary-card strong { font-size: 18px; }
}

@media (max-width: 430px) {
  .brand-copy small { max-width: 145px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .summary-grid.compact-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid.compact-grid .summary-card:first-child { grid-column: 1 / -1; }
  .filter-button { flex: 1; padding: 8px 4px; }
  .search-input { width: 145px; }
  .login-card { padding: 27px 22px; }
}
