/* TMS typography & components — source of truth: AMARK Freight Claims (:8542) — synced from tariff_web */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap");

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #f4f7fb;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1540px;
  margin: 0 auto;
  padding: 14px 18px 22px;
}

.tms-top-nav-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 12px;
}

.tms-main-shortcuts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  grid-column: 2;
  justify-self: center;
}

.tms-universal-search {
  position: relative;
  grid-column: 3;
  justify-self: end;
}
.tms-universal-search-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.tms-universal-search-toggle:hover {
  background: #dbeafe;
}
.tms-universal-search-icon {
  flex-shrink: 0;
}
.tms-universal-search-label {
  white-space: nowrap;
}
.tms-universal-search-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 320px;
  max-width: 420px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  padding: 12px 14px;
}
.tms-universal-search-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.tms-universal-search-scope {
  margin: 0 0 10px;
  padding: 0 0 0 16px;
  font-size: 11px;
  line-height: 1.4;
  color: #64748b;
}
.tms-universal-search-scope li {
  margin: 0 0 4px;
}
.ld-universal-search-scope {
  font-size: 12px;
  color: #64748b;
}
.tms-universal-search-form {
  display: grid;
  gap: 8px;
}
.tms-universal-search-form--compact {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}
.tms-universal-search-form--compact .tms-universal-search-q {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.tms-universal-search-form--compact input[type="search"] {
  width: 100%;
  min-width: 180px;
}
.tms-universal-search-form--compact .btn-search {
  flex-shrink: 0;
}
.tms-universal-search-form label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}
.tms-universal-search-form select,
.tms-universal-search-form input[type="search"] {
  font: inherit;
  padding: 7px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}
.tms-universal-search-form .btn-search {
  justify-self: end;
  font: inherit;
  font-weight: 700;
  padding: 7px 14px;
  border: 1px solid #1e40af;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
}
.tms-universal-search-form .btn-search:hover {
  background: #1d4ed8;
}
.tms-main-shortcuts a,
.tms-main-shortcuts span.active,
.tms-main-shortcuts .shortcut-soon {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid #dbe3ee;
  background: #fff;
  color: #0f172a;
  padding: 8px 16px;
  border-radius: 999px;
}
.tms-main-shortcuts a:hover { background: #e2e8f0; }
.tms-main-shortcuts a.active,
.tms-main-shortcuts span.active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
  cursor: default;
}
.tms-main-shortcuts .shortcut-soon {
  opacity: 0.45;
  font-style: italic;
  cursor: default;
}

.tms-portal-preview-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 8px 4px 12px;
  border: 1px solid #c4b5fd;
  border-radius: 999px;
  background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
  color: #5b21b6;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.tms-portal-preview-pill select {
  max-width: 190px;
  min-width: 120px;
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 600;
  padding: 4px 8px;
}
.tms-portal-preview-pill button {
  border: 1px solid #7c3aed;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  font: inherit;
  font-weight: 800;
  padding: 4px 10px;
  cursor: pointer;
}
.tms-portal-preview-pill button:hover {
  background: #6d28d9;
}

.tms-app-header {
  background: linear-gradient(135deg, #0f172a 0%, #1f3b63 70%, #0f766e 100%);
  color: #fff;
  text-align: center;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
  margin: 0 0 14px;
}
.tms-app-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: #fff;
}

.panel-title, .tms-page-title, h2.tms-page-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}
.panel-head-row .panel-title, .panel-head-row .tms-page-title { margin: 0; }
.tms-section-title { margin: 0 0 10px; font-size: 18px; font-weight: 800; color: #0f172a; }
.section-label { margin: 14px 0 8px; font-size: 14px; font-weight: 800; color: #b91c1c; }
.muted { color: #64748b; font-size: 14px; }
.tms-list-hint, .log-table-hint { margin: 0 0 12px; color: #64748b; font-size: 14px; line-height: 1.45; }
.tms-hub { width: 100%; }

.tms-module-tabs, .tms-form-tabs, .tariff-form-tabs, .cct-tabs, .top-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.tms-module-tabs a, .tms-form-tabs a, .tariff-form-tabs a, .tariff-form-tabs span,
.cct-tabs a, .cct-tabs .cct-tab-link, .top-nav a {
  display: inline-block;
  text-decoration: none;
  color: #0f172a;
  background: #fff;
  border: 1px solid #dbe3ee;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.tms-module-tabs a:hover, .tms-form-tabs a:hover, .tariff-form-tabs a:hover,
.cct-tabs a:hover, .cct-tabs .cct-tab-link:hover, .top-nav a:hover { background: #e2e8f0; }
.tms-module-tabs a.active, .tms-form-tabs a.active, .tariff-form-tabs a.active,
.tariff-form-tabs span.active, .cct-tabs a.active, .cct-tabs .cct-tab-link.active,
.top-nav a.active { background: #0f172a; color: #fff; border-color: #0f172a; }

.panel-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.panel { background: #fff; border: 1px solid #dfe7f2; border-radius: 15px; padding: 14px 16px; margin: 12px 0; }
.banner-ok { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; padding: 10px 14px; border-radius: 10px; margin: 0 0 12px; font-weight: 700; font-size: 14px; }
.banner-warn { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; padding: 10px 14px; border-radius: 10px; margin: 0 0 12px; font-weight: 700; font-size: 14px; }
.btn-primary { background: #0f766e; color: #fff; border: 0; padding: 8px 16px; border-radius: 10px; font-weight: 800; font-size: 14px; cursor: pointer; font-family: inherit; }
.btn-secondary { background: #1e3a5f; color: #fff; border: 0; padding: 8px 16px; border-radius: 10px; font-weight: 800; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block; font-family: inherit; }
.btn-danger { background: #b91c1c; color: #fff; border: 0; padding: 8px 12px; border-radius: 10px; font-weight: 800; font-size: 13px; cursor: pointer; font-family: inherit; }
.form-actions { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e2e8f0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.center { text-align: center; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.data-table th, .data-table td { border: 1px solid #e2e8f0; padding: 8px 10px; text-align: left; vertical-align: top; }
.data-table th { background: #f1f5f9; font-weight: 800; color: #334155; }
.data-table tr:nth-child(even) { background: #fafbfc; }
.table-wrap { overflow-x: auto; }
