
/* =========================================================
   Buckley Pianos Ops
   Cleaned stylesheet
   - removed repeated overrides
   - prioritised readable van dashboard
   ========================================================= */

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

:root {
  --bg: #e9eef4;
  --surface: #ffffff;
  --surface-soft: #f4f7fb;
  --surface-active: #eef5ff;
  --text: #102741;
  --text-soft: #3a556f;
  --text-muted: #667b91;
  --border: #d4deea;

  --navy-950: #0c1a30;
  --navy-900: #142b49;
  --navy-800: #24486e;

  --blue: #3f6f9f;
  --blue-deep: #2f5b86;
  --blue-soft: #dfeafb;
  --blue-text: #204d79;

  --green: #5a8a74;
  --green-deep: #466e5d;
  --green-soft: #e9f4ee;
  --green-text: #1e5c43;

  --red: #c54a55;
  --red-deep: #a53a44;
  --red-soft: #fff0f1;
  --red-text: #8c2d35;

  --collection-bg: #dde9f6;
  --collection-text: #355f8b;
  --delivery-bg: #e6f2df;
  --delivery-text: #486a34;

  --shadow-card: 0 10px 24px rgba(16, 39, 66, 0.08);
  --shadow-card-strong: 0 16px 34px rgba(33, 76, 120, 0.14);
  --shadow-btn: 0 6px 14px rgba(16, 39, 66, 0.12);

  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --container-max: 1360px;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #f5f8fb 0px, var(--bg) 360px);
  color: var(--text);
}

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px;
}

.stack > * + * {
  margin-top: 22px;
}

.day-stack {
  padding-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Buttons ---------- */

.btn,
button {
  appearance: none;
  border: 0;
  background: var(--navy-900);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.15s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover,
button:hover {
  transform: translateY(-1px);
  background: var(--navy-800);
}

.btn-nav {
  min-width: 88px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: none;
}

.btn-nav:hover,
.btn-nav.is-active {
  background: rgba(255, 255, 255, 0.30);
}

.btn-light,
.btn-secondary,
.btn-eta,
.btn-success {
  box-shadow: none;
}

.btn-light {
  background: #eef3f8;
  color: var(--blue-text);
  border: 1px solid var(--border);
}

.btn-light:hover {
  background: #e2eaf3;
}

.btn-secondary {
  background: #475569;
  color: #fff;
  border: 1px solid #5f7184;
}

.btn-secondary:hover {
  background: #334155;
}

.btn-nav-action {
  background: var(--blue);
}

.btn-nav-action:hover {
  background: var(--blue-deep);
}

.btn-action-primary {
  background: var(--green);
}

.btn-action-primary:hover {
  background: var(--green-deep);
}

.btn-action-secondary {
  background: #55687b;
}

.btn-action-secondary:hover {
  background: #415163;
}

.btn-success {
  background: var(--blue-soft);
  color: var(--blue-text);
  border: 1px solid #c7d8ef;
}

.btn-success:hover {
  background: #d2e1f5;
}

.btn-eta {
  background: #e8eef6;
  color: var(--blue-text);
  border: 1px solid #cfdae8;
}

.btn-eta:hover {
  background: #dde6f1;
}

.btn.active {
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

/* ---------- Van header ---------- */

.van-header {
  max-width: var(--container-max);
  margin: 16px auto 18px;
  background: linear-gradient(135deg, #173357 0%, #224a72 58%, #2d5c88 100%);
  color: #fff;
  border-radius: 24px;
  padding: 20px 22px 18px;
  box-shadow: 0 14px 32px rgba(15, 39, 66, 0.22);
}

.van-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.van-header-left {
  min-width: 0;
  flex: 1 1 auto;
}

.van-date-viewing {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.van-date-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
}

.van-date-value {
  font-size: 30px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: #fff;
}

.van-day-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.van-header-right {
  flex: 0 0 auto;
}

.van-header-logo {
  display: block;
  width: 100%;
  max-width: 210px;
  height: auto;
}

.van-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.van-action-btn {
  min-height: 50px;
  border-radius: 16px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: none;
}

.van-action-btn:hover {
  background: rgba(255,255,255,0.25);
}

.van-action-btn-secondary {
  background: rgba(255,255,255,0.12);
}

.van-shift-line {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 22px;
}

.van-shift-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #a7b5c6;
}

.van-shift-line.live .van-shift-dot {
  background: #86efac;
  box-shadow: 0 0 0 6px rgba(134, 239, 172, 0.15);
}

.van-shift-line.off .van-shift-dot {
  background: #cbd5e1;
}

.van-shift-text {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

/* ---------- Van day cards ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.empty-state {
  background: rgba(255,255,255,0.84);
  border: 1px dashed rgba(102,123,145,0.35);
  border-radius: 24px;
  padding: 28px;
  text-align: center;
}

.empty-state-title {
  font-size: 22px;
  font-weight: 800;
}

.empty-state-text {
  margin-top: 6px;
  color: var(--text-muted);
}

.stop-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-left: 8px solid #d4deea;
  background: rgba(255,255,255,0.98);
}

.stop-card.active-stop,
.stop-card.next-stop {
  background: var(--surface-active);
  border-left-color: var(--blue);
  box-shadow: var(--shadow-card-strong);
}

.stop-card.completed {
  background: var(--surface-soft);
  border-left-color: #b9c7d6;
  box-shadow: 0 8px 18px rgba(16, 39, 66, 0.05);
}

.stop-card.on-time:not(.active-stop):not(.next-stop) {
  border-left-color: var(--green);
}

.stop-card.off-time:not(.active-stop):not(.next-stop) {
  border-left-color: var(--red);
}

.stop-card-toggle {
  display: block;
  width: 100%;
  background: transparent;
  color: inherit;
  border: 0;
  padding: 22px 24px;
  min-width: 0;
  min-height: 0;
  box-shadow: none;
  text-align: left;
}

.stop-card-toggle:hover {
  background: transparent;
  transform: none;
}

.stop-card-grid {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 220px;
  gap: 20px;
  align-items: center;
}

.stop-time-col {
  padding-right: 18px;
  border-right: 1px solid var(--border);
}

.time {
  margin: 0;
  font-size: 46px;
  line-height: 0.94;
  letter-spacing: -1.2px;
  font-weight: 900;
  color: #173b61;
}

.stop-card.active-stop .time,
.stop-card.next-stop .time {
  color: #295688;
}

.eta-chip {
  margin-top: 10px;
  display: inline-flex;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  background: #e2ebf6;
  color: #28517d;
  border: 1px solid #ccd8e6;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.stop-main-col {
  min-width: 0;
}

.stop-header {
  margin-bottom: 10px;
}

.job-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge.collection {
  background: var(--collection-bg);
  color: var(--collection-text);
}

.badge.delivery {
  background: var(--delivery-bg);
  color: var(--delivery-text);
}

.next-badge {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
}

.completed-badge {
  background: var(--green);
  color: #fff;
}

.timing-badge.on-time {
  background: var(--green-soft);
  color: var(--green-text);
}

.timing-badge.off-time {
  background: var(--red-soft);
  color: var(--red-text);
}

.title,
.customer-name,
.completed-summary-title {
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: -0.5px;
  font-weight: 900;
  color: #14385d;
  margin: 0;
}

.subtitle,
.customer-address {
  margin-top: 8px;
  font-size: 17px;
  line-height: 1.45;
  color: #425d79;
  word-break: break-word;
}

.small,
.customer-meta,
.customer-notes {
  color: #5a7087;
  font-size: 14px;
  line-height: 1.45;
}

.small {
  margin-top: 6px;
}

.customer-meta {
  margin-top: 8px;
  font-weight: 700;
}

.compact-details .title {
  font-size: 28px;
  margin-bottom: 0;
}

.completed-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.stop-summary-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 5px;
  padding-right: 28px;
}

.summary-stat-label,
.eta-panel-label,
.customer-label,
.toggle-hint {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.summary-stat-value,
.eta-panel-value {
  font-size: 18px;
  font-weight: 900;
  color: #173457;
}

.card-chevron {
  position: absolute;
  top: 50%;
  right: 0;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
}

.card-chevron::before {
  content: "⌄";
  display: block;
  line-height: 18px;
  font-size: 26px;
  color: #3a6592;
  font-weight: 700;
}

.stop-card-toggle[aria-expanded="true"] .card-chevron::before {
  content: "⌃";
}

.toggle-hint {
  margin-top: 2px;
}

.stop-card.completed .toggle-hint {
  display: none;
}

.stop-card-body {
  display: none;
  padding: 0 24px 22px;
}

.stop-card-body.is-open {
  display: block;
}

.expanded-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 16px;
  margin-bottom: 16px;
}

.customer-panel,
.stats-panel {
  background: #fbfdff;
  border: 1px solid #d7e0ea;
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
}

.customer-panel {
  padding: 18px;
}

.customer-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.customer-pills {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.phone-pill,
.mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
}

.phone-pill {
  gap: 8px;
  background: #dce8f4;
  color: #1f476f;
  border: 1px solid #c7d5e4;
}

.phone-pill::before {
  content: "";
  width: 16px;
  height: 16px;
  display: inline-block;
  flex: 0 0 16px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231d436c' d='M6.62 10.79a15.05 15.05 0 0 0 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1C10.61 21 3 13.39 3 4c0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.24.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2Z'/%3E%3C/svg%3E");
}

.details-plus {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f3f7fb 100%);
  border: 1px solid #cfdae7;
  box-shadow: 0 6px 14px rgba(16, 35, 63, 0.10);
  text-decoration: none;
  font-size: 0;
}

.details-plus::before,
.details-plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: #173457;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.details-plus::before {
  width: 16px;
  height: 3px;
}

.details-plus::after {
  width: 3px;
  height: 16px;
}

.stats-panel {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.eta-panel {
  background: #fff;
  border: 1px solid #d8e2ec;
  border-radius: 18px;
  padding: 14px 16px;
}

.eta-panel-value {
  font-size: 28px;
  letter-spacing: -0.6px;
}

.eta-panel-on-time {
  background: var(--green-soft);
  border-color: #d1e7da;
}

.eta-panel-off-time {
  background: var(--red-soft);
  border-color: #f0d6d9;
}

.stop-actions-col {
  width: 100%;
  border-top: 1px solid #d9e3ed;
  padding-top: 16px;
}

.job-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.job-actions.has-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.job-actions form,
.job-actions .btn,
.job-actions button {
  width: 100%;
  margin: 0;
}

/* ---------- Admin / shared ---------- */

.container-narrow {
  max-width: 1360px;
}

.page-subtitle {
  margin-top: 6px;
  color: rgba(255,255,255,0.84);
  font-size: 16px;
  font-weight: 600;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-pad {
  padding: 28px;
}

.form-card,
.job-panel {
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(216,225,236,0.95);
}

.form-section + .form-section {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid #dbe4ef;
}

.form-header,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  color: #143559;
}

.section-copy {
  margin-top: 6px;
  color: #677d97;
  font-size: 15px;
  line-height: 1.45;
}

.form-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.field,
.info-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.field-label,
.info-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #60758f;
}

.input {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #d8e1ec;
  background: #fff;
  color: #143559;
  font: inherit;
  font-size: 16px;
}

textarea.input {
  min-height: 132px;
  resize: vertical;
}

.input:focus {
  outline: none;
  border-color: #7fa6cf;
  box-shadow: 0 0 0 4px rgba(74, 120, 170, 0.12);
}

.field-span-12 { grid-column: span 12; }
.field-span-8 { grid-column: span 8; }
.field-span-6 { grid-column: span 6; }
.field-span-4 { grid-column: span 4; }
.field-span-3 { grid-column: span 3; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
}

.job-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 20px;
}

.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge.other,
.pending-badge {
  background: #dce8f5;
  color: #3b628e;
}

.info-item {
  grid-column: span 6;
  padding: 18px 18px 16px;
  border: 1px solid #dce4ee;
  background: #fbfdff;
  border-radius: 18px;
}

.info-value {
  color: #173457;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  word-break: break-word;
}

.job-stops-list {
  display: grid;
  gap: 18px;
}

.job-stop {
  border: 1px solid #d8e1ec;
  border-radius: 22px;
  background: #fbfdff;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(16,35,63,0.05);
}

.job-stop.completed {
  background: #f5f8fb;
}

.job-stop-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.job-stop-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  color: #143559;
}

.job-stop-subtitle {
  margin-top: 6px;
  color: #5d728d;
  font-size: 15px;
  font-weight: 600;
}

.job-stop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: #f3f4f6;
}

.admin-sidebar {
  background: #111827;
  color: #ffffff;
  padding: 24px 18px;
}

.admin-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
  padding: 14px 12px 18px;
  text-decoration: none;
}

.admin-brand-logo {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.admin-nav a {
  color: #e5e7eb;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.admin-main {
  padding: 24px;
}

.admin-grid {
  display: grid;
  gap: 18px;
}

.cards-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cards-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cards-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dashboard-actions.fixed-five {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0d1730;
}

.quick-action-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 14px;
  font-weight: 700;
}

.dashboard-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.dashboard-card {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer;
}

.dashboard-card-link:hover .dashboard-card {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

.dashboard-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dashboard-card-head h3 {
  margin: 0;
}

.dashboard-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(11, 24, 48, 0.08);
  color: #0b1830;
}

.dashboard-card-icon svg {
  width: 22px;
  height: 22px;
}

.dashboard-card-icon-text {
  font-size: 22px;
  font-weight: 700;
}

.dashboard-lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dashboard-reminders-card {
  padding: 18px;
}

.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.mini-calendar-head {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.7;
  padding-bottom: 4px;
}

.mini-calendar-cell {
  min-height: 42px;
  border-radius: 12px;
  background: rgba(11, 24, 48, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mini-calendar-cell.muted {
  opacity: 0.35;
}

.mini-calendar-cell.today {
  box-shadow: inset 0 0 0 2px rgba(11, 24, 48, 0.18);
}

.mini-calendar-day {
  font-size: 13px;
}

.mini-calendar-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #0b1830;
  margin-top: 5px;
}

.reminder-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 10px;
  margin-bottom: 14px;
}

.reminder-input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(11, 24, 48, 0.10);
  border-radius: 12px;
  background: #fff;
}

.reminder-add-btn,
.reminder-delete-btn {
  cursor: pointer;
}

.reminders-list {
  display: grid;
  gap: 8px;
}

.reminder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 0 6px 0 10px;
  border-radius: 10px;
  background: rgba(11, 24, 48, 0.04);
}

.reminder-text {
  font-size: 13px;
  line-height: 1.25;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #e5e7eb;
}

.table th {
  font-size: 13px;
  color: #6b7280;
  font-weight: 700;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.planner-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.planner-controls {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.planner-job-card,
.week-job-card,
.month-cell,
.week-column {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}

.planner-week-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
}

.week-column {
  background: #f9fafb;
  padding: 12px;
  min-height: 220px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.month-cell {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #f9fafb;
  padding: 14px;
  min-height: 100px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .stop-card-grid {
    grid-template-columns: 118px minmax(0, 1fr) 190px;
  }

  .expanded-layout,
  .job-layout {
    grid-template-columns: 1fr;
  }

  .week-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .month-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .container {
    padding: 16px;
  }

  .van-header {
    margin: 12px 16px 16px;
    padding: 18px 18px 16px;
  }

  .van-header-top {
    flex-direction: column;
    align-items: stretch;
  }

  .van-header-right {
    align-self: flex-start;
  }

  .stop-card-toggle {
    padding: 20px 18px;
  }

  .stop-card-grid {
    grid-template-columns: 110px minmax(0, 1fr);
    align-items: start;
  }

  .stop-summary-col {
    grid-column: 1 / -1;
    align-items: flex-start;
    text-align: left;
    padding-right: 26px;
  }

  .stop-card-body {
    padding: 0 18px 18px;
  }

  .job-actions,
  .job-actions.has-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-span-6,
  .field-span-4,
  .field-span-3,
  .info-item {
    grid-column: span 12;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .planner-week-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 14px;
  }

  .van-header {
    margin: 10px 14px 14px;
    border-radius: 20px;
    padding: 16px;
  }

  .van-date-value {
    font-size: 24px;
  }

  .btn,
  button {
    min-width: 88px;
    min-height: 48px;
    font-size: 14px;
    border-radius: 14px;
    padding: 10px 14px;
  }

  .stop-card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .stop-time-col {
    border-right: 0;
    padding-right: 0;
    padding-bottom: 6px;
  }

  .stop-summary-col {
    padding-right: 24px;
  }

  .time {
    font-size: 38px;
  }

  .title,
  .customer-name,
  .completed-summary-title {
    font-size: 21px;
  }

  .subtitle,
  .customer-address {
    font-size: 15px;
  }

  .stop-card-body {
    padding: 0 16px 16px;
  }

  .customer-panel,
  .stats-panel {
    border-radius: 18px;
  }

  .details-plus {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .job-actions,
  .job-actions.has-four,
  .completed-actions,
  .job-stop-actions {
    grid-template-columns: 1fr;
  }

  .phone-pill {
    width: 100%;
  }

  .cards-5,
  .dashboard-actions.fixed-five,
  .week-grid,
  .month-grid {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .toolbar,
  .job-stop-head {
    flex-direction: column;
    align-items: stretch;
  }
}
