/* Operational components layered on top of app.css. */

/* Shared forms, filters and pagination */
.entity-form,
.form-card {
  max-width: 1120px;
  margin-inline: auto;
  padding: 28px;
}
.form-card form,
.stacked-form,
.task-status-form,
.report-response-form {
  display: grid;
  gap: 14px;
}
.form-card form p,
.stacked-form p,
.task-comment-form p,
.report-response-form p {
  margin: 0;
}
.form-card label,
.stacked-form label,
.task-comment-form label,
.report-response-form label {
  display: block;
  margin-bottom: 6px;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
}
.form-card input:not([type="checkbox"]),
.form-card select,
.form-card textarea,
.stacked-form input:not([type="checkbox"]),
.stacked-form select,
.stacked-form textarea,
.task-comment-form input:not([type="checkbox"]),
.task-comment-form textarea,
.report-response-form input:not([type="checkbox"]),
.report-response-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d8dee9;
  border-radius: 9px;
  background: #fff;
  color: #172033;
  outline: none;
}
.field ul {
  max-height: 280px;
  margin: 0;
  padding: 8px;
  overflow: auto;
  list-style: none;
  border: 1px solid #d9dee7;
  border-radius: 9px;
  background: #fff;
}
.field ul li { padding: 8px; border-bottom: 1px solid #eef1f5; }
.field ul li:last-child { border: 0; }
.field ul label { display: flex; align-items: center; gap: 9px; margin: 0; font-weight: 600; }
.field input[type="file"] {
  width: 100%;
  padding: 15px;
  border: 1px dashed #93a4bb;
  border-radius: 9px;
  background: #f8fafc;
}
.filters { flex-wrap: wrap; align-items: center; }
.filters input,
.filters select {
  min-height: 39px;
}
.audit-filters input,
.audit-filters select {
  padding: 9px 11px;
  border: 1px solid #e7eaf0;
  border-radius: 8px;
  background: #fff;
}
.audit-integrity-ok { width: fit-content; margin: -8px 0 15px; padding: 7px 10px; border-radius: 7px; background: #ecfdf3; color: #15803d; font-size: 10px; font-weight: 800; }
.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 13px 16px;
  border: 1px solid #e7eaf0;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .04);
}
.pagination a { color: #1d4ed8; font-size: 12px; font-weight: 800; }
.pagination a:last-child { text-align: right; }
.pagination strong { color: #667085; font-size: 11px; }
.btn.danger { background: #dc2626; color: #fff; }
.confirm-card { max-width: 640px; padding: 28px; }
.confirm-card form { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* Push permission and bell */
.notification-bell {
  position: relative;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 9px;
  background: #f5f7fa;
}
.notification-bell b {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
}
.push-permission[hidden] { display: none; }
.push-permission {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 23, 41, .54);
  backdrop-filter: blur(5px);
}
.push-permission-card {
  width: min(560px, 100%);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(3, 12, 28, .25);
}
.push-permission-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 15px;
  background: #eff6ff;
  font-size: 24px;
}
.push-permission h2 { margin: 0 0 8px; font-size: 22px; }
.push-permission p { margin: 0; color: #667085; line-height: 1.65; }
.push-permission p.error { color: #b42318; }
.push-permission-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* Notification center */
.notification-list-card { overflow: hidden; }
.notification-item {
  position: relative;
  display: block;
  margin: 0;
  border-bottom: 1px solid #edf0f5;
  background: #fff;
}
.notification-item:last-child { border-bottom: 0; }
.notification-item.notification-unread { background: linear-gradient(90deg, #f4f8ff, #fff 60%); }
.notification-item.notification-unread::before {
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: 4px;
  background: #2563eb;
  content: "";
}
.notification-row {
  display: grid;
  width: 100%;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 17px 20px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease;
}
.notification-row:hover { background: #f8fafc; }
.notification-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 17px;
  font-style: normal;
  font-weight: 900;
}
.category-task { background: #eefbf3; color: #15803d; }
.category-train { background: #eef2ff; color: #4338ca; }
.category-exception { background: #fff1f2; color: #dc2626; }
.category-report { background: #f5f3ff; color: #7c3aed; }
.category-finance { background: #fffbeb; color: #b45309; }
.notification-copy { display: grid; min-width: 0; gap: 4px; }
.notification-copy b { overflow: hidden; color: #172033; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.notification-copy small { color: #5d6878; font-size: 12px; line-height: 1.45; }
.notification-copy time { color: #98a2b3; font-size: 10px; }
.notification-row > i {
  padding: 4px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}
.severity-urgent .notification-icon { background: #fff1f2; color: #dc2626; }
.severity-warning .notification-icon { background: #fffbeb; color: #b45309; }

/* Warehouse */
.expected-cargo-card { margin-bottom: 18px; padding: 20px; }
.expected-cargo-grid { display: grid; gap: 0; }
.expected-cargo-grid article {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(120px, 1fr) minmax(140px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 4px;
  border-top: 1px solid #edf0f5;
}
.expected-cargo-grid article:first-child { border-top: 0; }
.expected-cargo-grid span { min-width: 0; }
.expected-cargo-grid b,
.expected-cargo-grid strong,
.expected-cargo-grid small { display: block; }
.expected-cargo-grid small { margin-top: 4px; color: #667085; font-size: 10px; }
.warehouse-receipts-card { overflow: hidden; }
.warehouse-receipts-card > .card-head { padding: 20px 20px 0; }
.warehouse-table td { min-width: 140px; padding-block: 15px; }
.warehouse-table td:first-child { min-width: 185px; }
.warehouse-table td:nth-child(2) { min-width: 230px; }
.warehouse-table td:last-child { min-width: 76px; }
.discrepancy-label,
.ok-label {
  display: block;
  width: fit-content;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 800;
}
.discrepancy-label { color: #dc2626; }
.ok-label { color: #15803d; }
.receipt-thumbs { display: flex; gap: 6px; }
.receipt-thumbs a { flex: 0 0 auto; }
.receipt-thumbs img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.receipt-thumbs img:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16, 24, 40, .16); }
.receipt-photo-panel { margin-bottom: 18px; padding: 20px; }
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 14px; }
.photo-gallery a { display: block; }
.photo-gallery img { display: block; width: 100%; height: 120px; object-fit: cover; border-radius: 10px; }
.photo-gallery small { display: block; margin-top: 5px; color: #667085; }

/* Container search highlighting */
.container-result-summary { display: flex; align-items: center; gap: 10px; margin: -4px 0 14px; color: #667085; font-size: 11px; }
.active-filter-badge,
.search-match-label { border-radius: 999px; background: #eaf2ff; color: #1d4ed8; font-size: 9px; font-weight: 900; }
.active-filter-badge { padding: 5px 9px; }
.search-match-label { width: fit-content; margin: -4px 0 13px; padding: 5px 8px; }
.container-card { scroll-margin-top: 95px; }
.container-card.container-highlight { border: 2px solid #3b82f6; box-shadow: 0 0 0 5px rgba(59, 130, 246, .12), 0 16px 38px rgba(37, 99, 235, .14); }
.container-card.is-highlighted { animation: searched-container-pulse 1.6s ease-in-out 2; }
.container-card-actions { display: grid; grid-template-columns: auto 1fr; gap: 7px; }
.qr-mini { display: inline-flex; margin-left: 6px; padding: 3px 5px; border-radius: 5px; background: #0b1729; color: #fff; font-size: 8px; font-weight: 900; }
@keyframes searched-container-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); box-shadow: 0 0 0 9px rgba(59, 130, 246, .08), 0 18px 42px rgba(37, 99, 235, .20); }
}

/* Task board and detail */
.task-team { display: flex; min-height: 36px; align-items: center; padding: 3px 0 2px 7px; }
.task-member-avatar {
  display: grid;
  width: 33px;
  height: 33px;
  margin-left: -7px;
  place-items: center;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 2px 7px rgba(16, 24, 40, .14);
}
.task-member-avatar.status-done { box-shadow: 0 0 0 2px #22c55e, 0 2px 7px rgba(16, 24, 40, .14); }
.task-member-avatar.status-doing { box-shadow: 0 0 0 2px #f59e0b, 0 2px 7px rgba(16, 24, 40, .14); }
.task-member-avatar.status-open { box-shadow: 0 0 0 2px #94a3b8, 0 2px 7px rgba(16, 24, 40, .14); }
.task-progress > div { height: 6px; overflow: hidden; border-radius: 999px; background: #edf1f6; }
.task-progress > div span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3b82f6, #22c55e); }
.task-progress small { display: block; margin-top: 6px; color: #667085; font-size: 10px; text-align: right; }
.task-page-head form { margin: 0; }
.task-detail-layout,
.report-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(300px, .9fr);
  align-items: start;
  gap: 18px;
}
.task-main-column,
.task-side-column,
.report-main-column,
.report-side-column { display: grid; min-width: 0; gap: 18px; }
.task-detail-layout .card,
.report-detail-layout .card { padding: 20px; }
.task-description { color: #344054; line-height: 1.72; }
.task-description-card .case-chip { display: inline-flex; margin-top: 16px; }
.task-status-form { margin-top: 14px; }
.task-status-form select { width: 100%; padding: 10px; border: 1px solid #d8dee9; border-radius: 8px; background: #fff; }
.task-checklist { display: grid; gap: 8px; }
.task-checklist form { display: flex; align-items: flex-start; gap: 10px; padding: 11px; border: 1px solid #edf0f5; border-radius: 9px; background: #fbfcfe; }
.task-checklist form.done { background: #f0fdf4; }
.check-toggle { flex: 0 0 auto; width: 26px; height: 26px; border: 0; border-radius: 7px; background: #eaf2ff; color: #2563eb; font-weight: 900; cursor: pointer; }
.task-checklist form.done .check-toggle { background: #dcfce7; color: #15803d; }
.task-checklist b,
.task-checklist small { display: block; }
.task-checklist small { margin-top: 4px; color: #667085; font-size: 10px; }
.task-members-list { display: grid; gap: 6px; }
.task-members-list > div { display: grid; grid-template-columns: 39px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px; border-radius: 9px; background: #f8fafc; }
.task-members-list i,
.task-comment > i,
.report-responses article > i { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: #fff; font-style: normal; font-weight: 900; }
.task-members-list b,
.task-members-list small { display: block; }
.task-members-list small { margin-top: 3px; color: #667085; font-size: 9px; }
.task-members-list time { grid-column: 2 / -1; color: #98a2b3; font-size: 9px; }
.watcher-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #edf0f5; }
.watcher-list > small { width: 100%; color: #667085; }
.watcher-list span,
.report-tags span,
.file-chip { padding: 5px 8px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 9px; font-weight: 800; }
.task-chat-card { min-height: 420px; }
.task-comments,
.report-responses { display: grid; gap: 13px; max-height: 520px; overflow: auto; padding-right: 5px; }
.task-comment,
.report-responses article { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: 11px; }
.task-comment > div,
.report-responses article > div { min-width: 0; padding: 11px 13px; border-radius: 4px 12px 12px; background: #f5f7fa; }
.task-comment header,
.report-responses header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.task-comment header time,
.report-responses header time { margin-left: auto; color: #98a2b3; font-size: 9px; }
.task-comment p,
.report-responses p { margin: 7px 0; color: #344054; font-size: 12px; line-height: 1.6; }
.task-comment-form,
.report-response-form { margin-top: 18px; padding-top: 17px; border-top: 1px solid #edf0f5; }
.file-list { display: grid; gap: 7px; }
.file-list > a { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px; border: 1px solid #edf0f5; border-radius: 9px; }
.file-list > a > span { color: #2563eb; font-size: 20px; }
.file-list b,
.file-list small { display: block; }
.file-list small { margin-top: 3px; color: #667085; font-size: 9px; }
.activity-list { display: grid; }
.activity-list > div { position: relative; display: grid; grid-template-columns: 14px 1fr; gap: 9px; padding-bottom: 15px; }
.activity-list > div > span { z-index: 1; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: #3b82f6; }
.activity-list > div::before { position: absolute; top: 12px; bottom: 0; left: 4px; width: 1px; background: #dbe2ea; content: ""; }
.activity-list > div:last-child::before { display: none; }
.activity-list p { margin: 0; }
.activity-list b,
.activity-list small { display: block; font-size: 10px; }
.activity-list small { margin-top: 4px; color: #98a2b3; font-size: 9px; }

/* Reports */
.report-unread-row { background: #f5f8ff; }
.report-unread-row td:first-child { box-shadow: inset 3px 0 #2563eb; }
.report-status-unread { background: #eff6ff; color: #1d4ed8; }
.report-status-read { background: #f1f5f9; color: #475569; }
.report-status-under_review { background: #fff7ed; color: #c2410c; }
.report-status-action_required { background: #fff1f2; color: #be123c; }
.report-status-closed { background: #ecfdf3; color: #15803d; }
.status-awaiting_approval { background: #fff7ed; color: #c2410c; }
.report-body { min-height: 150px; padding: 16px; border: 1px solid #e4e9f0; border-radius: 10px; background: #f8fafc; color: #344054; line-height: 1.75; }
.report-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.report-attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 12px; }
.report-attachment { display: grid; gap: 10px; padding: 11px; border: 1px solid #e7eaf0; border-radius: 11px; background: #fff; }
.report-image-preview { overflow: hidden; border-radius: 8px; background: #f1f5f9; }
.report-image-preview img { display: block; width: 100%; height: 125px; object-fit: cover; transition: transform .2s ease; }
.report-image-preview:hover img { transform: scale(1.03); }
.report-file-icon { display: grid; height: 125px; place-items: center; border-radius: 8px; background: #eef2ff; color: #4338ca; font-size: 18px; font-weight: 900; }
.report-file-info { min-width: 0; }
.report-file-info b,
.report-file-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-file-info small { margin-top: 4px; color: #667085; font-size: 10px; }

/* Train exceptions */
.assignment-row { flex-wrap: wrap; }
.inline-remove-form { display: flex; flex: 1 1 260px; justify-content: flex-end; gap: 7px; }
.inline-remove-form input,
.exception-resolution-form input,
.exception-resolution-form textarea { padding: 8px 10px; border: 1px solid #d8dee9; border-radius: 8px; background: #fff; }
.exception-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 9px; }
.exception-meta small { width: 100%; }
.exception-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.exception-files a { padding: 5px 8px; border-radius: 6px; background: #fff1f2; color: #be123c; font-size: 9px; font-weight: 800; }
.exception-resolution-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.exception-resolution-form textarea,
.exception-resolution-form button { grid-column: 1 / -1; }
.resolution-note { padding: 9px; border-radius: 8px; background: #ecfdf3; color: #166534 !important; }
.tracking-link-box { display: flex; gap: 8px; }
.tracking-link-box input { min-width: 0; flex: 1; padding: 10px; border: 1px solid #d8dee9; border-radius: 8px; background: #f8fafc; }
.tracking-public-body { min-height: 100vh; background: #f1f5f9; }
.tracking-public-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 36px; }
.tracking-public-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-radius: 15px 15px 0 0; background: #0b1729; }
.tracking-public-header .brand small { color: #7591b8; }
.tracking-hero { padding: 38px 32px; border-radius: 0 0 15px 15px; background: linear-gradient(130deg, #fff, #eef5ff); box-shadow: 0 16px 40px rgba(16, 24, 40, .08); }
.tracking-hero h1 { margin: 5px 0; font-size: clamp(28px, 5vw, 44px); }
.tracking-hero > p:last-of-type { color: #667085; font-size: 16px; }
.tracking-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.tracking-meta span { padding: 13px; border: 1px solid #e3e9f2; border-radius: 10px; background: rgba(255,255,255,.72); }
.tracking-meta small,.tracking-meta b { display: block; }
.tracking-meta small { margin-bottom: 6px; color: #667085; font-size: 10px; }
.tracking-public-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.tracking-public-grid > .card,.public-pod { padding: 20px; }
.public-container-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.public-container-list span { padding: 7px 9px; border-radius: 7px; background: #eff6ff; color: #1d4ed8; font-size: 10px; font-weight: 800; }
.public-pod { margin-top: 18px; }
.tracking-public-footer { padding: 22px; color: #667085; font-size: 10px; text-align: center; }
.crm-doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.crm-doc-grid h3 { margin: 0 0 10px; font-size: 12px; color: #475467; }
.finance-summary-wide { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1100px) {
  .task-detail-layout,
  .report-detail-layout { grid-template-columns: 1fr; }
  .task-side-column,
  .report-side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .entity-form,
  .form-card { padding: 18px; }
  .filters > *,
  .filters .filter-search { width: 100%; min-width: 0; }
  .filters .btn { flex: 1; width: auto; }
  .pagination { grid-template-columns: auto 1fr auto; padding: 12px; }
  .pagination a { font-size: 0; }
  .pagination a:first-child::after { content: "←"; font-size: 18px; }
  .pagination a:last-child::after { content: "→"; font-size: 18px; }
  .notification-row { grid-template-columns: 39px minmax(0, 1fr); gap: 11px; padding: 14px; }
  .notification-icon { width: 38px; height: 38px; }
  .notification-row > i { grid-column: 2; width: fit-content; }
  .push-permission-card { padding: 22px; }
  .push-permission-actions { flex-direction: column; }
  .expected-cargo-grid article { grid-template-columns: 1fr 1fr; gap: 12px; }
  .expected-cargo-grid article > span:first-child { grid-column: 1 / -1; }
  .task-side-column,
  .report-side-column { grid-template-columns: 1fr; }
  .task-members-list > div { grid-template-columns: 36px minmax(0, 1fr); }
  .task-members-list .badge { grid-column: 2; width: fit-content; }
  .task-comment,
  .report-responses article { grid-template-columns: 31px minmax(0, 1fr); }
  .task-members-list i,
  .task-comment > i,
  .report-responses article > i { width: 31px; height: 31px; font-size: 10px; }
  .report-attachment-grid { grid-template-columns: 1fr 1fr; }
  .exception-resolution-form { grid-template-columns: 1fr; }
  .exception-resolution-form textarea,
  .exception-resolution-form button { grid-column: auto; }
  .inline-remove-form { width: 100%; justify-content: stretch; }
  .inline-remove-form input { min-width: 0; flex: 1; }
  .tracking-public-grid { grid-template-columns: 1fr; }
  .tracking-meta { grid-template-columns: 1fr 1fr; }
  .tracking-link-box { flex-direction: column; }
  .crm-doc-grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .report-attachment-grid { grid-template-columns: 1fr; }
  .expected-cargo-grid article { grid-template-columns: 1fr; }
  .expected-cargo-grid article > span:first-child { grid-column: auto; }
  .top-actions { gap: 5px; }
  .top-actions select { max-width: 88px; }
}

/* Quick Shipper / Consignee creation */

.quick-select-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.quick-select-row select {
    width: 100%;
    min-width: 0;
}

.quick-add-party {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #cbd8ec;
    background: #eff6ff;
    color: #175cd3;
    white-space: nowrap;
}

.quick-add-party:hover {
    border-color: #2563eb;
    background: #dbeafe;
}

.quick-party-modal[hidden] {
    display: none;
}

.quick-party-modal {
    position: fixed;
    z-index: 1400;
    inset: 0;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: 24px;
    background: rgba(8, 20, 38, 0.65);
    backdrop-filter: blur(6px);
}

.quick-party-dialog {
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 30px 90px rgba(2, 12, 27, 0.3);
}

.quick-party-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5eaf2;
}

.quick-party-head h2 {
    margin: 3px 0 0;
    color: #101828;
    font-size: 22px;
}

.quick-party-close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: #f2f4f7;
    color: #344054;
    font-size: 25px;
    cursor: pointer;
}

.quick-party-close:hover {
    background: #fee4e2;
    color: #d92d20;
}

.quick-party-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.quick-party-grid .span-2 {
    grid-column: span 2;
}

.quick-party-grid input,
.quick-party-grid textarea {
    width: 100%;
}

.quick-party-errors {
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid #fecdca;
    border-radius: 10px;
    background: #fef3f2;
    color: #b42318;
}

.quick-party-errors ul {
    margin: 0;
    padding-inline-start: 20px;
}

.quick-party-errors li + li {
    margin-top: 5px;
}

.quick-party-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e5eaf2;
}

@media (max-width: 680px) {
    .quick-party-modal {
        align-items: end;
        padding: 0;
    }

    .quick-party-dialog {
        width: 100%;
        max-height: 92vh;
        padding: 20px;
        border-radius: 20px 20px 0 0;
    }

    .quick-party-grid {
        grid-template-columns: 1fr;
    }

    .quick-party-grid .span-2 {
        grid-column: auto;
    }

    .quick-select-row {
        grid-template-columns: 1fr;
    }

    .quick-add-party {
        width: 100%;
    }

    .quick-party-actions {
        position: sticky;
        bottom: -20px;
        margin-inline: -20px;
        padding: 14px 20px 20px;
        background: #ffffff;
    }
}
.public-train-map-card {
    margin-top: 20px;
    overflow: hidden;
}

.public-train-map {
    position: relative;
    width: 100%;
    height: 440px;
    min-height: 440px;
    overflow: hidden;
    border: 1px solid #dce5f0;
    border-radius: 18px;
    background: #edf3f9;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.public-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    color: #166534;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
    background: #dcfce7;
}

.public-live-indicator i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, .14);
}

.public-map-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 14px;
    color: #475569;
    border-radius: 12px;
    background: #f8fafc;
}

.public-map-notice span {
    color: #2563eb;
    font-weight: 900;
}

.public-map-notice p {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
}

.public-map-empty {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background:
        radial-gradient(
            circle at center,
            rgba(37, 99, 235, .08),
            transparent 55%
        ),
        #f8fafc;
}

.public-map-empty > span {
    color: #2563eb;
    font-size: 34px;
}

.public-map-empty b {
    color: #0f172a;
    font-size: 16px;
}

.public-map-empty p {
    margin: 0;
}

.public-train-row {
    align-items: flex-start !important;
}

.public-train-location {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 10px;
    padding: 9px 11px;
    color: #334155;
    border-radius: 11px;
    background: #eff6ff;
}

.public-train-location > i {
    color: #2563eb;
    font-style: normal;
    font-size: 17px;
}

.public-train-location b,
.public-train-location small {
    display: block;
}

.public-train-location b {
    color: #1e40af;
    font-size: 13px;
}

.public-train-location small {
    margin-top: 2px;
    color: #64748b;
}

.public-train-location.no-location {
    background: #f8fafc;
}

.public-train-location.no-location > i {
    color: #94a3b8;
}

.public-map-popup {
    min-width: 170px;
}

.public-map-popup b,
.public-map-popup span,
.public-map-popup small {
    display: block;
}

.public-map-popup b {
    margin-bottom: 5px;
    color: #0f172a;
    font-size: 14px;
}

.public-map-popup span {
    color: #1d4ed8;
    font-weight: 700;
}

.public-map-popup small {
    margin-top: 4px;
    color: #64748b;
}

@media (max-width: 700px) {
    .public-train-map {
        height: 330px;
        min-height: 330px;
        border-radius: 14px;
    }

    .public-live-indicator {
        margin-top: 10px;
    }
}