@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #eef2f6;
  --bg-accent: #e0f2f1;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-hover: #14b8a6;
  --primary-light: #ccfbf1;
  --primary-glow: rgba(13, 148, 136, 0.15);
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --info: #2563eb;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
  --radius: 14px;
  --radius-sm: 10px;
  --nav-height: 64px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(13, 148, 136, 0.12), transparent),
    linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 280px);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--primary-dark);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-hover));
  color: white;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  box-shadow: 0 4px 12px var(--primary-glow);
  flex-shrink: 0;
}

.brand span {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
  color: var(--primary-dark);
  background: var(--primary-light);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--primary-dark);
  background: var(--primary-light);
}

.nav-links a.nav-cta {
  background: var(--primary-dark);
  color: white;
}

.nav-links a.nav-cta:hover {
  background: var(--primary-hover);
  color: white;
}

.user-badge {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 600;
  white-space: nowrap;
}

.user-badge strong {
  color: var(--text);
}

/* ── Layout ── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 2.5rem;
  width: 100%;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.page-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.page-header p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card + .card {
  margin-top: 1.25rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.card-header h2,
.card-header h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-section-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-section-title::before {
  content: "";
  width: 4px;
  height: 1.1em;
  background: linear-gradient(180deg, var(--primary-dark), var(--primary-hover));
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--stat-accent, var(--primary-dark));
  border-radius: 4px 0 0 4px;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-card .label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 0.35rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.stat-card--total { --stat-accent: #0f766e; }
.stat-card--assigned { --stat-accent: #2563eb; }
.stat-card--progress { --stat-accent: #d97706; }
.stat-card--pending { --stat-accent: #7c3aed; }
.stat-card--approved { --stat-accent: #16a34a; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--muted);
  color: var(--text);
}

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.btn-danger:hover {
  background: #fecaca;
  color: #7f1d1d;
}

.job-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.inline-delete-form {
  display: inline;
  margin: 0;
}

.source-badge {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.source-badge--sm {
  display: block;
  margin-top: 0.25rem;
}

.source-badge--customer {
  background: #ede9fe;
  color: #6d28d9;
}

.source-badge--office {
  background: #dbeafe;
  color: #1d4ed8;
}

.source-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
}

/* ── Forms ── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full,
.form-group--full {
  grid-column: 1 / -1;
}

.customer-portal-box {
  padding: 0.75rem 0.9rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.detail-dl {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: 0.45rem 1rem;
  margin: 0;
}

.detail-dl dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.detail-dl dd {
  margin: 0;
  font-size: 0.88rem;
}

.credentials-card code {
  font-size: 0.95rem;
  background: #fff7ed;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.credentials-password {
  font-weight: 700;
  letter-spacing: 0.04em;
}

label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
}

input,
select,
textarea {
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fafbfc;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.checkbox-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #fafbfc;
  transition: border-color 0.15s, background 0.15s;
}

.checkbox-item:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.checkbox-item input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--primary-dark);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #fafbfc;
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.15s, background 0.15s;
}

.radio-item:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.radio-item input {
  margin: 0;
  accent-color: var(--primary-dark);
}

.conditional-block {
  margin-top: 0.85rem;
  padding: 1.15rem;
  background: linear-gradient(135deg, #f0fdfa 0%, #f8fafc 100%);
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--primary);
}

.conditional-block.hidden {
  display: none;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.form-delete-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #f8fafc;
}

tbody tr {
  transition: background 0.1s;
}

tbody tr:hover td {
  background: #f0fdfa;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-assigned {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-in_progress {
  background: #fef3c7;
  color: #b45309;
}

.badge-pending_customer {
  background: #ede9fe;
  color: #6d28d9;
}

.badge-approved {
  background: #dcfce7;
  color: #15803d;
}

.badge-rejected {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Media ── */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.media-item {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  border: 1px solid var(--border);
}

.media-item img,
.media-item video {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0f172a;
  max-height: 240px;
  object-fit: contain;
}

.media-caption {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-word;
  padding: 0 0.25rem;
}

/* ── Flash ── */
.flash-messages {
  margin-bottom: 1.25rem;
}

.flash {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid transparent;
}

.flash-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.flash-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.flash-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

/* ── Login ── */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(20, 184, 166, 0.25), transparent),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(15, 118, 110, 0.2), transparent),
    linear-gradient(145deg, #0f766e 0%, #134e4a 50%, #0c4a6e 100%);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  padding: 2.25rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.login-brand .brand-mark {
  width: 48px;
  height: 48px;
  font-size: 0.9rem;
  border-radius: 14px;
}

.login-card h1 {
  margin: 0;
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.login-card .subtitle {
  color: var(--muted);
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

/* ── Detail grid ── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem 1.5rem;
}

.detail-item {
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.detail-item .label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.detail-item .value {
  font-weight: 700;
  margin-top: 0.25rem;
  font-size: 0.95rem;
  color: var(--text);
}

.detail-item .value a {
  font-weight: 700;
}

/* ── Timeline ── */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.timeline li:last-child {
  border-bottom: none;
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.filter-bar input,
.filter-bar select {
  min-width: 180px;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

/* ── Demo credentials ── */
.demo-credentials {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
}

.demo-credentials strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.35rem;
}

.demo-credentials code {
  background: white;
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--primary-dark);
}

/* ── Page actions ── */
.page-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Container slots ── */
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.progress-bar {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-hover));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.badge-slot-done {
  background: #dcfce7;
  color: #15803d;
}

.badge-slot-pending {
  background: #f1f5f9;
  color: #64748b;
}

/* ── Job list container tracker ── */
.job-list-table td {
  vertical-align: top;
}

.job-list-main {
  min-width: 10rem;
}

.job-booking {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.job-customer {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.job-meta {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.job-meta-sep {
  margin: 0 0.25rem;
}

.job-customer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
  align-items: center;
}

.card--approval {
  border-color: #c4b5fd;
  background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
}

.approval-pending-banner {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.9rem;
}

.job-approval-actions--compact {
  display: inline-flex;
}

.approval-form--compact .approval-form-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.approval-form-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.job-row-actions .job-approval-actions {
  width: 100%;
  margin-bottom: 0.15rem;
}

/* ── Reports ── */
.report-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.report-subnav-link {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.report-subnav-link--active {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}

.report-bar-fill--customer {
  background: linear-gradient(90deg, #1d4ed8, #60a5fa);
}

.report-bar-fill--lashing {
  background: linear-gradient(90deg, #ea580c, #f97316);
}

.report-bar-fill--pesticide {
  background: linear-gradient(90deg, #b45309, #fbbf24);
}

.report-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.report-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.report-period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.report-period-tab {
  display: inline-block;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.report-period-tab--active {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.report-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.report-filter-row label {
  font-size: 0.85rem;
  color: var(--muted);
}

.report-kpi-grid .table-hint {
  margin-top: 0.25rem;
  font-size: 0.72rem;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.report-table th,
.report-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.report-table--compact th,
.report-table--compact td {
  padding: 0.45rem 0.5rem;
}

.report-bar-cell {
  min-width: 8rem;
}

.report-bar {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.2rem;
}

.report-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  border-radius: 999px;
}

.report-bar-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.report-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.report-suggestions {
  background: #f8fafc;
}

.report-suggestion-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.report-suggestion-list li {
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .report-two-col {
    grid-template-columns: 1fr;
  }

  .report-filter-row input,
  .report-filter-row .btn {
    width: 100%;
  }
}

.job-list-track {
  min-width: 14rem;
}

.job-list-status {
  white-space: nowrap;
}

.job-list-actions {
  white-space: nowrap;
}

.data-source-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.data-source-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.data-source-item strong {
  color: var(--text);
  font-size: 0.95rem;
}

.source-badge--neutral {
  background: #f1f5f9;
  color: #64748b;
}

.container-tracker-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.container-tracker-summary--secondary {
  margin-top: 0.15rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border);
}

.tracker-stat strong {
  color: var(--text);
}

.tracker-stat--office strong {
  color: #1d4ed8;
}

.tracker-stat--field strong {
  color: #15803d;
}

.container-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.container-chip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  min-width: 8.5rem;
  max-width: 10rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  font-size: 0.72rem;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.chip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.chip-details {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.chip-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  line-height: 1.2;
}

.chip-detail-label {
  color: var(--muted);
  font-size: 0.62rem;
  flex-shrink: 0;
}

.chip-detail-value {
  font-size: 0.65rem;
  font-weight: 600;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 5.5rem;
}

.container-chip--progress-0 {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.container-chip--progress-1 {
  background: #fffbeb;
  border-color: #fde68a;
}

.container-chip--progress-2 {
  background: #eff6ff;
  border-color: #93c5fd;
}

.container-chip--progress-3 {
  background: #f5f3ff;
  border-color: #c4b5fd;
}

.container-chip--progress-4 {
  background: #fdf4ff;
  border-color: #e879f9;
}

.container-chip--progress-5 {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.container-chip--progress-6 {
  background: #dcfce7;
  border-color: #22c55e;
}

.container-chip--progress-7 {
  background: #fef2f2;
  border-color: #fca5a5;
}

.tracker-stat--approval strong {
  color: #7c3aed;
}

.chip-approval--done {
  background: #dcfce7;
  color: #15803d;
}

.chip-approval--rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.legend-swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 3px;
  margin-right: 0.2rem;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.legend-swatch--p0 { background: #f8fafc; }
.legend-swatch--p2 { background: #eff6ff; }
.legend-swatch--p5 { background: #ecfdf5; }
.legend-swatch--p6 { background: #dcfce7; }

a.container-chip:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.container-chip--office {
  border-color: #bfdbfe;
}

.container-chip--customer {
  border-color: #ddd6fe;
}

.chip-entered {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
}

.chip-entered--office {
  background: #dbeafe;
  color: #1d4ed8;
}

.chip-entered--customer {
  background: #ede9fe;
  color: #6d28d9;
}

.chip-entered--legend {
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.15rem;
  vertical-align: middle;
}

.container-chip--placeholder {
  opacity: 0.65;
}

.chip-no {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text);
}

.chip-status-row {
  display: flex;
  gap: 0.2rem;
}

.chip-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

.chip-label {
  max-width: 4.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.65rem;
}

.chip-office--done,
.chip-field--done {
  background: #dcfce7;
  color: #15803d;
}

.chip-office--partial,
.chip-field--partial {
  background: #fef3c7;
  color: #b45309;
}

.chip-field--media-wait,
.chip-field--media-partial {
  background: #ede9fe;
  color: #6d28d9;
}

.chip-office--empty,
.chip-field--empty {
  background: #f1f5f9;
  color: #94a3b8;
}

.container-tracker-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.45rem;
  font-size: 0.68rem;
  color: var(--muted);
}

.legend-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  margin-right: 0.2rem;
  vertical-align: middle;
}

.legend-dot--done {
  background: #86efac;
}

.legend-dot--partial {
  background: #fcd34d;
}

.legend-dot--empty {
  background: #cbd5e1;
}

.legend-hint {
  margin-left: auto;
}

.table-hint {
  color: var(--muted);
  margin: 0 0 1rem;
  font-size: 0.88rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container-office-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.container-office-card {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  overflow: hidden;
}

.container-office-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  background: #f0fdfa;
  border-bottom: 1px solid var(--primary-light);
}

.container-office-slot {
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary-dark);
}

.container-office-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.55rem 0.65rem;
  padding: 0.75rem;
  max-width: 52rem;
}

.container-office-grid .office-field {
  min-width: 0;
}

.container-office-grid .office-field--wide {
  grid-column: 1 / -1;
}

.container-office-grid .office-field--narrow {
  max-width: 7rem;
}

.office-pesticide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.5rem 0.65rem;
  margin-top: 0.25rem;
  width: 100%;
}

.table-input--readonly {
  background: var(--bg);
  color: var(--text);
  cursor: default;
}

.focused-office-entry-wrap .container-office-grid {
  max-width: none;
}

.container-entry-wrap {
  margin-bottom: 1rem;
}

.container-entry-table {
  font-size: 0.82rem;
}

.container-entry-table th,
.container-entry-table td {
  padding: 0.45rem 0.35rem;
  vertical-align: top;
}

.container-entry-table thead th {
  font-size: 0.72rem;
  white-space: nowrap;
}

.container-entry-row--primary td {
  background: #f8fafc;
  border-bottom: none;
}

.container-entry-row--secondary td {
  background: #fafbfc;
  padding-bottom: 0.55rem;
}

.container-entry-group {
  border-bottom: 3px solid var(--primary-light);
}

.container-entry-group .col-num {
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary-dark);
  text-align: center;
  vertical-align: middle;
  background: #f0fdfa;
  border-right: 2px solid var(--primary-light);
}

.mini-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.compact-checks {
  gap: 0.3rem !important;
}

.checkbox-item--sm {
  padding: 0.3rem 0.5rem;
  font-size: 0.78rem;
}

.checkbox-item--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.checkbox-item--disabled input {
  cursor: not-allowed;
}

.pesticide-inline.hidden {
  display: none;
}

/* ── Field merged view (office + field side by side) ── */
.field-merged-wrap {
  overflow-x: auto;
}

.field-merged-table .split-office {
  width: 42%;
  min-width: 200px;
  background: #f0fdfa;
  border-right: 2px dashed var(--primary-light);
  vertical-align: top;
}

.field-merged-table .split-field {
  width: 48%;
  min-width: 220px;
  background: #fff;
  vertical-align: top;
}

.field-merged-table .col-status {
  width: 4rem;
  text-align: center;
  vertical-align: middle;
}

.panel-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.45rem;
}

.panel-tag--office {
  background: #dbeafe;
  color: #1d4ed8;
}

.panel-tag--customer {
  background: #ede9fe;
  color: #6d28d9;
}

.panel-tag--field {
  background: #dbeafe;
  color: #1d4ed8;
}

.office-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.office-readonly-item small {
  color: var(--muted);
  font-size: 0.78rem;
}

.container-number-cell {
  grid-column: 1 / -1;
}

.container-number-field {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.container-number-field .table-input {
  flex: 1;
  min-width: 0;
}

.ocr-scan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  padding: 0 0.45rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--primary);
  font-size: 1.05rem;
  cursor: pointer;
  flex-shrink: 0;
}

.ocr-scan-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.ocr-scan-btn input[type="file"] {
  display: none;
}

.ocr-status {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.74rem;
  color: var(--muted);
  min-height: 1rem;
}

.ocr-status--ok {
  color: var(--success);
}

.ocr-status--err {
  color: var(--danger);
}

.container-number-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--muted);
  min-height: 0.9rem;
}

.container-number-hint--warn {
  color: var(--danger);
  font-weight: 600;
}

.container-number-hint--ok {
  color: var(--success);
}

.table-input--warn {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15);
}

.ocr-badge {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
}

.ocr-badge--verified {
  background: #dcfce7;
  color: #166534;
}

.ocr-badge--read {
  background: #e0f2fe;
  color: #075985;
}

.ocr-badge--mismatch {
  background: #fee2e2;
  color: #991b1b;
}

.ocr-badge--unreadable {
  background: #f3f4f6;
  color: #4b5563;
}

.field-input-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem 0.65rem;
}

.field-input-grid .field-save-cell {
  grid-column: 1 / -1;
}

.field-media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.field-merged-row--2 td {
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border);
}

@media (max-width: 768px) {
  .field-merged-table .split-office,
  .field-merged-table .split-field {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .field-merged-table tr.field-merged-row--1 .split-office,
  .field-merged-table tr.field-merged-row--2 .split-office {
    border-right: none;
    border-bottom: 2px dashed var(--primary-light);
  }

  .field-merged-table .col-num {
    display: table-cell;
  }
}

.container-table-wrap {
  max-height: none;
}

.container-table {
  font-size: 0.85rem;
}

.container-table th,
.container-table td {
  padding: 0.5rem 0.45rem;
  vertical-align: middle;
  white-space: nowrap;
}

.container-table .col-num {
  width: 2rem;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
}

.container-table .col-datetime {
  min-width: 8.5rem;
}

.container-table .table-input {
  width: 100%;
  min-width: 5.5rem;
  padding: 0.4rem 0.5rem;
  font-size: 0.82rem;
  min-height: 34px;
  border-radius: 6px;
}

.container-table .table-input-date,
.container-table .table-input-time {
  display: block;
  width: 100%;
  min-width: 0;
}

.container-table .table-input-time {
  margin-top: 0.25rem;
}

.container-table--edit tbody tr {
  scroll-margin-top: 5rem;
}

.container-table--edit tbody tr.row-complete {
  background: #f0fdf4;
}

.container-table--edit tbody tr.row-complete:hover td {
  background: #ecfdf5;
}

.media-cell {
  text-align: center;
  white-space: nowrap;
  min-width: 5rem;
}

.media-cell .check-ok {
  display: block;
  margin-bottom: 0.2rem;
}

.upload-actions {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
  justify-content: center;
}

.check-ok {
  color: var(--success);
  font-weight: 700;
}

.inline-upload {
  display: inline-block;
  margin: 0;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s, border-color 0.15s;
}

.upload-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.upload-btn input[type="file"] {
  display: none;
}

.media-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  border-radius: 6px;
  transition: background 0.15s, transform 0.1s;
}

.media-view-btn:hover {
  background: #dcfce7;
  transform: scale(1.1);
}

.media-view-btn:active {
  transform: scale(0.95);
}

/* ── Media modal ── */
.media-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.media-modal[hidden] {
  display: none !important;
}

.media-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.media-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.media-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.media-modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.media-modal-close {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: var(--bg);
  border-radius: 8px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.media-modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.media-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-media-item img,
.modal-media-item video {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #0f172a;
  border: 1px solid var(--border);
}

.modal-media-item p {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-word;
}

.photo-thumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.photo-thumb-item {
  position: relative;
  width: 3rem;
  height: 3rem;
}

.photo-thumb-btn {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.photo-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-delete-form {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
}

.photo-delete-btn {
  width: 1.1rem;
  height: 1.1rem;
  border: none;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
}

.media-limit-hint {
  font-size: 0.72rem;
  color: var(--muted);
}

.delegation-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.delegation-type-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  background: #fafbfc;
}

.delegation-type-title {
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.delegation-type-current {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.container-approval-actions {
  margin-top: 0.5rem;
}

.container-approval-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.container-approval-buttons {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.chip-approval-badge {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  text-align: center;
}

.chip-approval-badge--pending {
  background: #fef3c7;
  color: #92400e;
}

.container-status-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.container-submit-approval-form {
  margin: 0;
}

.container-submit-approval-btn {
  width: 100%;
}

.chip-approval-badge--approved {
  background: #dcfce7;
  color: #15803d;
}

.chip-approval-badge--rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  min-height: auto;
}

.table-input--sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.4rem;
}

.container-tracker--lashing .container-chip {
  min-width: 9rem;
}

.container-chip--lashing-1 {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.container-chip--lashing-2 {
  background: #fff7ed;
  border-color: #fdba74;
}

.container-chip--lashing-3 {
  background: #fff7ed;
  border-color: #fdba74;
}

.container-chip--lashing-4 {
  background: #fef3c7;
  border-color: #fbbf24;
}

.container-chip--lashing-5 {
  background: #ecfdf5;
  border-color: #34d399;
}

.chip-lashing--done {
  background: #dcfce7;
  color: #15803d;
}

.chip-lashing--ready {
  background: #fef9c3;
  color: #a16207;
}

.chip-lashing--pending {
  background: #ffedd5;
  color: #c2410c;
}

.chip-lashing--media-wait,
.chip-lashing--media-partial {
  background: #ede9fe;
  color: #6d28d9;
}

.chip-lashing--empty {
  background: #f1f5f9;
  color: #94a3b8;
}

.lashing-requirements {
  margin-top: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border);
}

.lashing-requirements-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  font-size: 0.68rem;
}

.lashing-req {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.lashing-req--done {
  color: var(--success);
  font-weight: 600;
}

.lashing-req-icon {
  width: 0.85rem;
  text-align: center;
  flex-shrink: 0;
}

/* ── Progress dashboard panel ── */
.progress-panel-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.progress-panel-job {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: var(--bg);
}

.progress-panel-job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.progress-panel-job-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  flex: 1 1 12rem;
}

.progress-panel-booking {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.progress-panel-sep {
  color: var(--muted);
  font-weight: 400;
}

.progress-panel-customer {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.progress-panel-job-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.progress-panel-counts {
  font-size: 0.75rem;
  color: var(--muted);
}

.progress-panel-job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}

.progress-panel-containers,
.progress-panel-empty-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .progress-container-card--actionable {
    grid-column: span 2;
  }

  .progress-panel-containers {
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  }
}

.progress-container-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
}

.progress-container-card--done {
  opacity: 0.85;
  border-color: #86efac;
  background: #f0fdf4;
}

.progress-reopen-actions {
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
}

.progress-reopen-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.progress-reopen-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.progress-reopen-form {
  margin: 0;
}

.progress-reopen-btn {
  white-space: nowrap;
}

.progress-container-card--placeholder {
  border-style: dashed;
  background: #f8fafc;
}

.progress-container-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.5rem;
}

.progress-container-slot {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--text);
}

.progress-container-no {
  font-weight: 700;
  font-size: 0.78rem;
  color: #c2410c;
}

.progress-container-meta {
  font-size: 0.68rem;
  color: var(--muted);
}

.progress-container-meta--lashing {
  color: #c2410c;
}

.progress-container-meta--spraying {
  color: var(--primary-dark);
}

.progress-container-card .workflow-stepper {
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.progress-container-card .workflow-step {
  min-width: 4.5rem;
  max-width: 5.5rem;
}

.progress-container-card .workflow-step-marker {
  width: 1.45rem;
  height: 1.45rem;
  font-size: 0.65rem;
}

.progress-container-card .workflow-step-label {
  font-size: 0.62rem;
}

.progress-container-card .workflow-step-detail,
.progress-container-card .workflow-step-assignee {
  font-size: 0.58rem;
  line-height: 1.2;
}

.progress-container-card .workflow-connector {
  min-width: 0.5rem;
  margin-top: 0.7rem;
}

.progress-container-card-actions,
.workflow-container-approval-actions,
.compact-progress-line--approval {
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--border);
}

.progress-container-card-actions .container-submit-approval-form,
.workflow-container-approval-actions .container-submit-approval-form,
.compact-progress-line--approval .container-submit-approval-form {
  margin: 0;
}

.progress-container-card--actionable {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-glow);
}

.workflow-step--clickable {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-radius: 0.35rem;
  padding: 0.15rem 0.2rem 0.25rem;
  margin: -0.15rem -0.2rem -0.25rem;
  transition: background 0.15s ease, transform 0.1s ease;
}

.workflow-step--clickable:hover {
  background: var(--primary-glow);
}

.workflow-step--clickable:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.workflow-step--clickable:hover .workflow-step-label {
  color: var(--primary-dark);
}

[id^="container-slot-"]:target,
[id^="slot-"]:target,
[id^="lashing-slot-"]:target {
  scroll-margin-top: 5rem;
  animation: workflow-target-flash 1.5s ease;
}

@keyframes workflow-target-flash {
  0%, 100% { background-color: transparent; }
  15%, 45% { background-color: var(--primary-glow); }
}

.progress-panel-go-links {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.focused-entry-page .focused-entry-hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--primary-dark);
  font-weight: 600;
}

.focused-entry-card {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-glow);
}

.focused-entry-page .container-tracker--lashing .container-chips {
  display: block;
}

.focused-entry-page .container-chip--lashing {
  max-width: 28rem;
  width: 100%;
}

.progress-filter-card {
  margin-bottom: 1rem;
}

.progress-filter-card .progress-filter-bar {
  margin: 0;
}

.progress-filter-row {
  align-items: center;
  flex-wrap: wrap;
}

.progress-filter-check {
  margin-right: 0.5rem;
  font-weight: 600;
  white-space: nowrap;
}

.progress-filter-hint,
.progress-filter-active,
.progress-filter-notice {
  margin: 0.65rem 0 0;
}

.progress-filter-notice {
  margin-bottom: 0;
}

.focused-office-entry-wrap {
  overflow-x: auto;
}

.focused-approval-summary {
  margin-bottom: 0.5rem;
}

.focused-approval-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.progress-go-btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}

.progress-go-btn--lashing {
  background: #ea580c;
  border-color: #ea580c;
}

.progress-go-btn--lashing:hover {
  background: #c2410c;
  border-color: #c2410c;
}

.progress-go-btn--spraying {
  background: var(--primary);
  border-color: var(--primary);
}

.progress-go-btn--approval {
  background: var(--info);
  border-color: var(--info);
}

.progress-wait-hint {
  margin: 0.5rem 0 0;
  font-size: 0.68rem;
}

.lashing-team-badge {
  font-size: 0.82rem;
  color: #c2410c;
}

.lashing-complete-form {
  margin-top: 0.35rem;
}

.lashing-done-badge {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #15803d;
  text-align: center;
}

.progress-bar-fill--lashing {
  background: linear-gradient(90deg, #fb923c, #22c55e);
}

.lashing-inline,
.spraying-inline {
  margin-top: 0.45rem;
}

.container-tracker--lashing .container-chip {
  min-width: 11rem;
  max-width: 13rem;
}

.chip-detail-value--container {
  color: #c2410c;
  font-weight: 800;
  max-width: 7rem;
}

.container-number-field--compact {
  margin-top: 0;
}

.container-number-field--compact .ocr-scan-btn {
  min-width: 2rem;
  padding: 0 0.35rem;
  font-size: 0.95rem;
}

.lashing-number-form .ocr-status {
  margin-top: 0.15rem;
  font-size: 0.68rem;
  min-height: 0.85rem;
}

.lashing-number-form {
  margin-top: 0.35rem;
}

.lashing-media-section {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.lashing-media-block {
  border-top: 1px dashed var(--border);
  padding-top: 0.35rem;
}

.lashing-readonly-no {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  text-align: center;
}

/* ── Mobile field actions ── */
.field-actions {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
    min-height: auto;
  }

  .brand {
    justify-content: center;
    font-size: 1.05rem;
  }

  .brand span {
    display: none;
  }

  .nav-links {
    justify-content: center;
    gap: 0.25rem 0.5rem;
  }

  .nav-links a,
  .btn {
    min-height: 44px;
    padding: 0.65rem 1rem;
  }

  .user-badge {
    display: none;
  }

  .container {
    padding: 1.15rem 1rem 5rem;
  }

  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
  }

  .page-header h1 {
    font-size: 1.4rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card .value {
    font-size: 1.6rem;
  }

  .filter-bar input,
  .filter-bar select,
  .filter-bar .btn {
    width: 100%;
    min-width: 0;
  }

  input,
  select,
  textarea {
    font-size: 16px;
    min-height: 44px;
  }

  .radio-item,
  .checkbox-item {
    min-height: 44px;
  }

  .form-actions .btn {
    flex: 1 1 100%;
  }

  .media-grid {
    grid-template-columns: 1fr;
  }

  .field-actions-desktop {
    display: none !important;
  }

  .field-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 0.75rem 1rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.1);
    display: flex;
    gap: 0.5rem;
  }

  .field-actions .btn {
    flex: 1;
  }

  .container-table .table-input {
    min-width: 4.5rem;
    font-size: 16px;
    min-height: 40px;
  }

  .container-table th,
  .container-table td {
    padding: 0.45rem 0.35rem;
  }

  .progress-bar-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .job-list-table thead {
    display: none;
  }

  .job-list-table tr {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
  }

  .job-list-table td {
    display: block;
    padding: 0.25rem 0;
    border: none;
  }

  .job-list-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .container-tracker-legend .legend-hint {
    margin-left: 0;
    width: 100%;
  }

  .workflow-stepper {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .workflow-step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    min-width: 0;
    max-width: none;
  }

  .workflow-connector {
    width: 3px;
    height: 1.25rem;
    margin: 0.15rem auto 0.15rem 1.15rem;
    min-width: 3px;
    flex: none;
  }
}

/* ── Workflow / progress tracker ── */
.card--workflow-summary {
  margin-bottom: 1rem;
}

.workflow-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.workflow-summary-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  text-align: center;
}

.workflow-summary-item--lashing {
  border-color: #fdba74;
  background: #fff7ed;
}

.workflow-summary-item--spraying {
  border-color: #5eead4;
  background: #f0fdfa;
}

.workflow-summary-item--approval {
  border-color: #93c5fd;
  background: #eff6ff;
}

.workflow-summary-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.workflow-summary-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}

.workflow-summary-hint {
  margin: 0;
}

.workflow-container-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.card--workflow-container {
  padding-top: 1rem;
}

.workflow-container-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.workflow-container-title {
  margin: 0;
  font-size: 1rem;
}

.workflow-container-no {
  color: #c2410c;
  font-weight: 800;
  margin-left: 0.35rem;
}

.workflow-container-meta {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.workflow-meta-sep {
  margin: 0 0.2rem;
}

.workflow-container-badges {
  flex-shrink: 0;
}

.workflow-stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 6.5rem;
  max-width: 8rem;
  flex: 1;
}

.workflow-step-marker {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  flex-shrink: 0;
}

.workflow-step--done .workflow-step-marker {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.workflow-step--done-warn .workflow-step-marker {
  background: var(--warning);
  border-color: var(--warning);
  color: #fff;
}

.workflow-step--active .workflow-step-marker {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.workflow-step--rejected .workflow-step-marker {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.workflow-step-body {
  margin-top: 0.45rem;
  width: 100%;
}

.workflow-step-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.workflow-step-detail {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.15rem;
  line-height: 1.3;
}

.workflow-step-assignee {
  font-size: 0.65rem;
  color: var(--primary-dark);
  font-weight: 600;
  margin-top: 0.2rem;
}

.workflow-connector {
  flex: 1;
  min-width: 1rem;
  height: 3px;
  background: var(--border);
  margin-top: 0.95rem;
  border-radius: 2px;
}

.workflow-connector--done {
  background: var(--success);
}

.workflow-connector--done-warn {
  background: var(--warning);
}

.workflow-connector--active {
  background: linear-gradient(90deg, var(--success), var(--primary));
}

/* Help page */
.help-page {
  max-width: 52rem;
}

.help-hero {
  margin-bottom: 1.5rem;
}

.help-hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.help-lead {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.help-section {
  margin-bottom: 1.25rem;
}

.help-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.help-steps {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.7;
}

.help-steps li + li {
  margin-top: 0.5rem;
}

.help-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.65;
}

.help-list li + li {
  margin-top: 0.35rem;
}

.help-roles {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .help-roles {
    grid-template-columns: repeat(3, 1fr);
  }
}

.help-role-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--primary);
}

.help-faq {
  margin: 0;
}

.help-faq dt {
  font-weight: 600;
  margin-top: 0.75rem;
}

.help-faq dt:first-child {
  margin-top: 0;
}

.help-faq dd {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.help-video-placeholder {
  border-style: dashed;
  opacity: 0.9;
}

.help-guest-wrap {
  min-height: 100vh;
  padding: 1.5rem;
  background: var(--bg);
}

.help-guest-top {
  max-width: 52rem;
  margin: 0 auto 1rem;
}

.login-help-link {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.login-help-link a {
  color: var(--primary);
  text-decoration: none;
}

.login-help-link a:hover {
  text-decoration: underline;
}

/* Compact progress panel (mobile-friendly) */
.page-header--compact-progress {
  margin-bottom: 0.75rem;
}

.compact-progress-lead {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.compact-progress-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.compact-progress-stats-sep {
  opacity: 0.5;
}

.compact-progress-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.compact-progress-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem 0.6rem;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.compact-progress-row--stripe-a {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.compact-progress-row--stripe-b {
  background: #eef6ff;
  border-color: #cfe3f8;
}

.compact-progress-row--done {
  opacity: 0.72;
}

.compact-progress-row--placeholder {
  opacity: 0.55;
}

.compact-progress-line--info {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.2rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.72rem;
  line-height: 1.25;
}

.compact-progress-line--steps {
  width: 100%;
  min-width: 0;
}

.compact-progress-booking {
  font-weight: 800;
  flex-shrink: 0;
}

.compact-progress-sep {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.55;
}

.compact-progress-slot {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--text-muted);
}

.compact-progress-container {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  color: #c2410c;
}

.compact-progress-container--muted {
  font-weight: 500;
  color: var(--text-muted);
}

.compact-progress-meta {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

.compact-progress-meta--customer {
  color: var(--text);
  font-weight: 600;
  max-width: 6.5rem;
}

.compact-progress-meta--country {
  max-width: 15ch;
  flex-shrink: 0;
}

.compact-progress-meta--desiccant {
  color: #7c3aed;
  font-weight: 600;
  flex-shrink: 0;
}

.excel-tools-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.excel-tools-actions {
  flex-shrink: 0;
}

.excel-import-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.excel-import-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.compact-progress-meta--pesticide {
  color: #0f766e;
  font-weight: 600;
}

.compact-stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
}

.compact-workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 2.1rem;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}

.compact-workflow-step-marker {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  border: 2px solid var(--border-strong, var(--border));
  background: var(--surface, #fff);
  color: var(--text-muted);
  flex-shrink: 0;
}

.compact-workflow-step--done .compact-workflow-step-marker {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.compact-workflow-step--done-warn .compact-workflow-step-marker {
  background: var(--warning);
  border-color: var(--warning);
  color: #fff;
}

.compact-workflow-step--active .compact-workflow-step-marker {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 2px var(--primary-glow, rgba(37, 99, 235, 0.2));
}

.compact-workflow-step--rejected .compact-workflow-step-marker {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.compact-workflow-step-label {
  margin-top: 0.2rem;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.compact-workflow-step-abbr {
  font-weight: 800;
}

.compact-workflow-step-initials {
  margin-left: 0.05rem;
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--primary-dark, #1d4ed8);
}

.compact-workflow-step--pending .compact-workflow-step-label {
  color: var(--text-muted);
}

.compact-workflow-connector {
  flex: 1 1 auto;
  min-width: 0.35rem;
  height: 2px;
  background: var(--border);
  margin-top: 0.62rem;
  border-radius: 1px;
}

.compact-workflow-connector--done {
  background: var(--success);
}

.compact-workflow-connector--done-warn {
  background: var(--warning);
}

.compact-workflow-connector--active {
  background: linear-gradient(90deg, var(--success), var(--primary));
}

a.compact-workflow-step--clickable:active {
  opacity: 0.85;
}

.empty-state--compact {
  padding: 2rem 1rem;
}

@media (max-width: 380px) {
  .compact-progress-line--info {
    font-size: 0.68rem;
  }

  .compact-workflow-step {
    min-width: 1.85rem;
  }

  .compact-workflow-step-label {
    font-size: 0.54rem;
  }

  .compact-workflow-step-marker {
    width: 1.2rem;
    height: 1.2rem;
    font-size: 0.58rem;
  }

  .compact-workflow-connector {
    margin-top: 0.55rem;
  }
}

/* Certificate print panel */
.page-header--cert-print {
  margin-bottom: 0.75rem;
}

.cert-print-lead {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cert-print-search-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--surface-elevated, #fff);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.cert-print-search-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cert-print-search-input {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.88rem;
}

.cert-print-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cert-print-stats-sep {
  opacity: 0.5;
}

.cert-print-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cert-print-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.72rem;
  line-height: 1.25;
  overflow: hidden;
  white-space: nowrap;
}

.cert-print-row--issued {
  border-color: rgba(34, 139, 34, 0.35);
  background: linear-gradient(90deg, rgba(34, 139, 34, 0.04), transparent 40%);
}

.cert-print-booking {
  font-weight: 800;
  flex-shrink: 0;
}

.cert-print-sep {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.55;
}

.cert-print-slot {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--text-muted);
}

.cert-print-container {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.cert-print-meta {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

.cert-print-meta--customer {
  max-width: 9rem;
}

.cert-print-meta--date {
  flex-shrink: 0;
}

.cert-print-meta--date strong {
  color: var(--text);
  font-weight: 700;
}

.cert-print-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  flex-shrink: 0;
  padding-left: 0.35rem;
}

.cert-print-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #22a06b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.cert-print-btn {
  white-space: nowrap;
}

.cert-print-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 720px) {
  .cert-print-row {
    flex-wrap: wrap;
    white-space: normal;
    row-gap: 0.35rem;
  }

  .cert-print-actions {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    justify-content: flex-end;
  }
}

/* Bulk assignment panel */
.bulk-assign-lead {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.bulk-assign-card {
  margin-bottom: 1rem;
}

.bulk-assign-filter-row {
  align-items: flex-end;
}

.bulk-assign-filter-row .form-group {
  min-width: 10rem;
}

.bulk-assign-filter-row select,
.bulk-assign-filter-row input[type="search"] {
  min-width: 11rem;
}

.bulk-assign-check {
  margin-bottom: 0.35rem;
  white-space: nowrap;
}

.bulk-assign-hint {
  margin: 0.75rem 0 0;
}

.bulk-assign-preview-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.bulk-assign-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.bulk-assign-count--empty {
  color: var(--warning, #b45309);
}

.bulk-assign-apply-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

  .bulk-assign-apply-hint {
  margin-top: 1rem;
}

.bulk-assign-matrix-card {
  margin-bottom: 1rem;
}

.bulk-assign-matrix-wrap {
  overflow: auto;
  max-height: min(70vh, 52rem);
  -webkit-overflow-scrolling: touch;
}

.bulk-assign-matrix {
  min-width: 48rem;
  border-collapse: separate;
  border-spacing: 0;
}

.bulk-assign-matrix th,
.bulk-assign-matrix td {
  border-bottom: 1px solid var(--border, #e2e8f0);
}

/* Başlık satırı — dikey kaydırmada sabit */
.bulk-assign-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface, #fff);
  box-shadow: 0 1px 0 var(--border);
}

/* Excel “bölmeleri dondur” — sol panel yatay kaydırmada sabit */
.bulk-assign-freeze {
  position: sticky;
  z-index: 3;
  background: var(--surface, #fff);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-assign-matrix thead .bulk-assign-freeze {
  z-index: 5;
}

.bulk-assign-data-row--grouped td[rowspan].bulk-assign-freeze {
  background: var(--surface-muted, #f8fafc);
  z-index: 4;
}

.bulk-assign-freeze--liman {
  left: 0;
  width: 8.5rem;
  min-width: 8.5rem;
  max-width: 8.5rem;
}

.bulk-assign-freeze--customer {
  left: 8.5rem;
  width: 9rem;
  min-width: 9rem;
  max-width: 9rem;
}

.bulk-assign-freeze--booking {
  left: 17.5rem;
  width: 6.5rem;
  min-width: 6.5rem;
  max-width: 6.5rem;
}

.bulk-assign-freeze--container {
  left: 24rem;
  width: 7rem;
  min-width: 7rem;
  max-width: 7rem;
}

.bulk-assign-freeze--kind {
  left: 31rem;
  width: 6.5rem;
  min-width: 6.5rem;
  max-width: 6.5rem;
}

.bulk-assign-freeze--edge {
  box-shadow: 4px 0 8px -2px rgba(15, 23, 42, 0.14);
}

.bulk-assign-col-liman {
  min-width: 8.5rem;
}

.bulk-assign-col-customer {
  min-width: 9rem;
}

.bulk-assign-col-booking {
  min-width: 6.5rem;
}

.bulk-assign-col-container {
  min-width: 7rem;
  font-weight: 600;
}

.bulk-assign-col-kind {
  min-width: 6.5rem;
}

.bulk-assign-user-col {
  width: 2.75rem;
  min-width: 2.75rem;
  text-align: center;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.bulk-assign-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--primary-muted, #e0f2fe);
  color: var(--primary, #0369a1);
}

.bulk-assign-kind {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.bulk-assign-kind--lashing {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.bulk-assign-kind--spraying {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.bulk-assign-data-row--grouped.bulk-assign-data-row--continued td.bulk-assign-col-kind {
  border-top: 1px dashed var(--border);
}

.bulk-assign-data-row--grouped td[rowspan] {
  vertical-align: top;
  background: var(--surface-muted, #f8fafc);
}

.bulk-assign-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
}

.bulk-assign-pick-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.bulk-assign-pick-box {
  display: inline-block;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--border-strong, #94a3b8);
  border-radius: 3px;
  background: #fff;
  transition: background 0.12s, border-color 0.12s;
}

.bulk-assign-pick-input:checked + .bulk-assign-pick-box {
  background: var(--primary, #0369a1);
  border-color: var(--primary, #0369a1);
  box-shadow: inset 0 0 0 2px #fff;
}

.bulk-assign-pick-input:focus-visible + .bulk-assign-pick-box {
  outline: 2px solid var(--primary, #0369a1);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.daily-summary-pesticide-cell {
  min-width: 10rem;
}

.daily-summary-pesticide-chip {
  display: inline-block;
  margin: 0.1rem 0.25rem 0.1rem 0;
  padding: 0.12rem 0.4rem;
  font-size: 0.78rem;
  background: var(--surface-muted, #f1f5f9);
  border-radius: 4px;
  white-space: nowrap;
}

.company-switch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.45rem 1rem;
  background: var(--surface-elevated, #fff);
  border-bottom: 1px solid var(--border);
}

.company-switch-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.company-switch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.company-switch-form {
  margin: 0;
}

.company-switch-btn {
  border: 1px solid var(--border);
  background: var(--surface, #f8fafc);
  color: var(--text);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.company-switch-btn--active {
  background: var(--primary, #0f766e);
  border-color: var(--primary, #0f766e);
  color: #fff;
  font-weight: 600;
}

.company-switch-current {
  font-size: 0.85rem;
  font-weight: 600;
}

.login-company-badge {
  display: inline-block;
  margin: 0.5rem 0 0;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary, #0f766e);
  font-size: 0.82rem;
  font-weight: 600;
}

.other-company-alerts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.other-company-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.85rem;
}

.other-company-alert-text strong {
  font-weight: 700;
}

.other-company-alert-form {
  margin: 0;
}

/* Genel veri girişi */
.settings-hub-lead {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.settings-tab {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface, #fff);
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.settings-tab:hover {
  border-color: var(--primary, #0369a1);
  color: var(--primary, #0369a1);
}

.settings-tab--active {
  background: var(--primary, #0369a1);
  border-color: var(--primary, #0369a1);
  color: #fff;
}

.settings-section-card {
  margin-bottom: 1rem;
}

.settings-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.settings-section-hint {
  margin: 0.35rem 0 0;
}

.settings-subsection-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-top: 0.25rem;
}

.settings-company-form {
  margin-top: 0.5rem;
}

.company-context-banner {
  margin-bottom: 1rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary, #0369a1);
  border-radius: 6px;
  background: #f8fafc;
}

.company-context-banner-main {
  font-size: 0.95rem;
  font-weight: 600;
}

.company-context-banner-name {
  color: var(--primary, #0369a1);
}

.company-context-banner-legal {
  font-weight: 500;
  color: var(--text);
}

.company-context-banner-meta {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.customer-context-banner-sep {
  margin: 0 0.25rem;
  opacity: 0.6;
}

/* Müşteri arama seçici (yeni iş) */
.customer-org-picker {
  position: relative;
  max-width: 32rem;
  z-index: 1;
}

.customer-org-picker:focus-within {
  z-index: 30;
}

.customer-org-picker-search {
  width: 100%;
}

.customer-org-picker-selected[hidden],
.customer-org-picker-search[hidden],
.customer-org-picker-list[hidden] {
  display: none !important;
}

.customer-org-picker-selected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
}

.customer-org-picker-selected-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
}

.customer-org-picker-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.2rem);
  z-index: 40;
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface, #fff);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.customer-org-picker-list.is-open {
  display: block;
}

.customer-org-picker-hint {
  padding: 0.45rem 0.7rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.customer-org-picker-option {
  display: block;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.customer-org-picker-option:hover,
.customer-org-picker-option:focus {
  background: #eff6ff;
  outline: none;
}

.customer-org-picker-option strong {
  display: block;
  font-size: 0.88rem;
}

.customer-org-picker-option span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.customer-org-picker-empty,
.customer-org-picker-more {
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cert-blocked-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
}
