/* TankLease — 21st.dev inspired design system */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --background: #fafafa;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --accent: #f59e0b;
  --accent-foreground: #18181b;
  --accent-muted: #fffbeb;
  --ring: #a1a1aa;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --success: #16a34a;
  --success-muted: #f0fdf4;
  --info: #2563eb;
  --info-muted: #eff6ff;
  --header-blur: rgba(250, 250, 250, 0.8);
  --hero-overlay: linear-gradient(180deg, rgba(9,9,11,0.55) 0%, rgba(9,9,11,0.85) 100%);
  --tl-header-h: 64px;
  --tl-subheader-h: 44px;
  --tl-gutter-x: 32px;
}
@media (max-width: 640px) {
  :root {
    --tl-gutter-x: 16px;
  }
}
@media (max-width: 380px) {
  :root {
    --tl-gutter-x: 12px;
  }
}

[data-theme="dark"] {
  --background: #09090b;
  --foreground: #fafafa;
  --card: #18181b;
  --card-foreground: #fafafa;
  --muted: #27272a;
  --muted-foreground: #a1a1aa;
  --border: #27272a;
  --input: #27272a;
  --primary: #fafafa;
  --primary-foreground: #18181b;
  --accent: #fbbf24;
  --accent-foreground: #18181b;
  --accent-muted: rgba(251, 191, 36, 0.1);
  --ring: #52525b;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
  --success: #4ade80;
  --success-muted: rgba(74, 222, 128, 0.1);
  --info: #60a5fa;
  --info-muted: rgba(96, 165, 250, 0.1);
  --header-blur: rgba(9, 9, 11, 0.85);
  --hero-overlay: linear-gradient(180deg, rgba(9,9,11,0.7) 0%, rgba(9,9,11,0.95) 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--tl-header-h);
}

body.tl {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}

/* Layout — boxed shell 1440px (header, main, footer inner) */
.tl-container,
.tl-container-wide {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--tl-gutter-x);
  padding-right: var(--tl-gutter-x);
  box-sizing: border-box;
}
/* Page chrome — vertical rhythm only (never padding shorthand on same node as .tl-container) */
.tl-breadcrumb {
  padding-top: 12px;
  padding-bottom: 8px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.tl-breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.tl-page-main {
  padding-top: 16px;
  padding-bottom: 64px;
}
.tl-terminal-main,
.tl-customer-main {
  width: 100%;
  min-height: 50vh;
}
.tl-customer-dash {
  position: relative;
  z-index: 2;
  margin-top: 0;
  padding-top: 28px;
  padding-bottom: 64px;
}
/* Trader pages: sub-header + hero — no negative overlap (was -56px for terminal-style) */
.tl-subheader + .tl-hero-compact + .tl-customer-main .tl-customer-dash {
  margin-top: 0;
  padding-top: 28px;
}
.tl-bento > [class*="tl-span-"] {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.tl-hero-customer .tl-hero-bg::after {
  background: linear-gradient(105deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 58, 138, 0.55) 100%);
}
.tl-band {
  width: 100%;
  border-bottom: 1px solid var(--border);
}
.tl-band-muted {
  width: 100%;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}
.tl-hero-terminal .tl-stats {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
@media (min-width: 1100px) {
  .tl-hero-terminal .tl-stats {
    grid-template-columns: repeat(5, 1fr);
  }
}
/* Block spacing — padding-block only (shorthand padding: X 0 kills .tl-container gutters) */
.tl-section {
  padding-block: 64px;
}
.tl-section-sm {
  padding-block: 40px;
}
.tl-band,
.tl-band-muted {
  padding-block: 0;
}

/* Section header — 21st pattern */
.tl-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.tl-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}
.tl-section-head .tl-label { margin-bottom: 6px; }
.tl-section-head h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
/* Muted inset panel (regions, featured blocks) — stays inside .tl-container width */
.tl-region-panel {
  background: var(--muted);
  border-radius: 24px;
  padding-block: 32px;
  padding-inline: 24px;
}
.tl-region-panel .tl-section-head {
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .tl-region-panel {
    padding-block: 40px;
    padding-inline: 32px;
  }
}

.tl-section-head p {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-top: 4px;
}

/* Header */
.tl-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--header-blur);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tl-header-inner {
  min-height: var(--tl-header-h);
  height: var(--tl-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
/* Space below sticky header so page content does not slide under it */
.tl-header + .tl-hero,
.tl-header + .tl-search-bar,
.tl-header + .tl-subheader,
.tl-header + main,
.tl-header + .tl-account-main {
  scroll-margin-top: var(--tl-header-h);
}
.tl-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--foreground);
}
.tl-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--foreground);
  color: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tl-logo-icon svg { width: 18px; height: 18px; }
.tl-logo-name { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.tl-logo-tag { font-size: 11px; color: var(--muted-foreground); font-weight: 500; }

.tl-nav { display: flex; gap: 4px; }
.tl-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: all 0.15s;
}
.tl-nav a:hover { color: var(--foreground); background: var(--muted); }
.tl-nav a.active { color: var(--foreground); background: var(--muted); }

.tl-header-actions { display: flex; align-items: center; gap: 8px; }
.tl-header-user {
  text-align: right;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.tl-header-user strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.tl-header-user span {
  font-size: 11px;
  color: var(--muted-foreground);
}
.tl-nav-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 6px;
  align-self: center;
}

/* Customer account — public-style layout (no sidebar app shell) */
.tl-account-bar {
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.tl-account-bar-inner {
  display: flex;
  gap: 8px;
  padding-block: 12px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tl-account-bar-inner::-webkit-scrollbar { display: none; }
.tl-account-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tl-account-tab:hover {
  color: var(--foreground);
  background: var(--muted);
}
.tl-account-tab.active {
  background: var(--foreground);
  color: var(--primary-foreground);
  border-color: var(--foreground);
}
.tl-account-tab-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Trader portal — secondary links below main header */
.tl-subheader {
  position: sticky;
  top: var(--tl-header-h);
  z-index: 49;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}
.tl-subheader-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding-block: 8px;
}
.tl-subheader-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.tl-subheader-nav a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.tl-subheader-nav a:hover {
  color: var(--foreground);
  background: var(--card);
}
.tl-subheader-nav a.active {
  color: var(--foreground);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.tl-subnav-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 4px;
}
.tl-subheader-meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  white-space: nowrap;
}
@media (max-width: 768px) {
  :root {
    --tl-subheader-h: 56px;
  }
  .tl-subheader-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-block: 10px;
  }
  .tl-subheader-meta { display: none; }
}

.tl-account-tab.active .tl-account-tab-badge {
  background: var(--accent);
  color: var(--accent-foreground);
}
.tl-account-main {
  padding-block: 32px 48px;
  min-height: 50vh;
}
.tl-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.tl-pipeline-step {
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--muted);
  color: var(--muted-foreground);
  font-weight: 500;
}
.tl-pipeline-step.active {
  background: var(--info-muted);
  color: var(--info);
  font-weight: 600;
  border: 1px solid rgba(37, 99, 235, 0.25);
}
.tl-pipeline-step.done {
  background: var(--success-muted);
  color: var(--success);
  font-weight: 600;
}
.tl-pipeline-arrow { color: var(--muted-foreground); font-size: 11px; }
.tl-thread { display: flex; flex-direction: column; gap: 16px; }
.tl-thread-msg {
  display: flex;
  gap: 12px;
}
.tl-thread-msg.terminal { flex-direction: row-reverse; }
.tl-thread-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--muted);
  color: var(--foreground);
}
.tl-thread-avatar.terminal {
  background: var(--foreground);
  color: var(--primary-foreground);
}
.tl-thread-bubble {
  flex: 1;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--muted);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.55;
}
.tl-thread-msg.terminal .tl-thread-bubble {
  background: var(--info-muted);
  border-color: rgba(37, 99, 235, 0.2);
  text-align: right;
}
.tl-thread-meta {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-bottom: 6px;
}

/* Theme toggle */
.tl-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.tl-icon-btn:hover { background: var(--muted); color: var(--foreground); }
.tl-icon-btn svg { width: 16px; height: 16px; }
.tl-icon-btn .icon-sun, .tl-icon-btn .icon-moon { display: none; }
[data-theme="light"] .tl-icon-btn .icon-moon,
:root:not([data-theme="dark"]) .tl-icon-btn .icon-moon { display: block; }
[data-theme="dark"] .tl-icon-btn .icon-sun { display: block; }

/* Buttons */
.tl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.tl-btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-sm);
}
.tl-btn-primary:hover { opacity: 0.9; }
.tl-btn-outline {
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
}
.tl-btn-outline:hover { background: var(--muted); }
.tl-btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
}
.tl-btn-ghost:hover { background: var(--muted); color: var(--foreground); }
.tl-btn-lg { height: 44px; padding: 0 20px; font-size: 14px; }

/* Hero */
.tl-hero-compact {
  min-height: 300px;
  padding-block: 40px 36px;
}
.tl-subheader + .tl-hero.tl-hero-compact {
  min-height: 240px;
  padding-block: 32px 40px;
}
.tl-hero-compact h1 {
  font-size: clamp(26px, 4vw, 36px);
  margin-bottom: 10px;
}
.tl-hero-compact .tl-hero-desc {
  font-size: 14px;
  margin-bottom: 20px;
}
.tl-hero-compact .tl-stats {
  margin-top: 8px;
}
.tl-nav .tl-nav-count {
  display: inline-flex;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-foreground);
  vertical-align: middle;
}
.tl-nav a.active .tl-nav-count {
  background: var(--accent);
  color: var(--accent-foreground);
}

.tl-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 48px;
  overflow: hidden;
}
.tl-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.tl-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}
.tl-hero-content { position: relative; z-index: 1; width: 100%; }

.tl-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}
.tl-hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}
.tl-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  max-width: 640px;
  margin-bottom: 16px;
}
.tl-hero-desc {
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  max-width: 520px;
  margin-bottom: 32px;
  line-height: 1.6;
}

/* Search card — unified, not scattered */
.tl-search-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  max-width: 960px;
}
.tl-search-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
@media (min-width: 768px) {
  .tl-search-grid {
    grid-template-columns: 1.5fr 1fr 0.8fr 1fr 1fr auto;
    align-items: stretch;
  }
}
.tl-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--muted);
  transition: background 0.15s;
}
.tl-field:focus-within {
  background: var(--card);
  box-shadow: 0 0 0 2px var(--ring);
}
.tl-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tl-field label svg { width: 12px; height: 12px; opacity: 0.6; }
.tl-field input,
.tl-field select {
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  outline: none;
  width: 100%;
}
.tl-search-submit {
  height: 100%;
  min-height: 64px;
  padding: 0 24px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s;
}
.tl-search-submit:hover { opacity: 0.9; }
.tl-search-submit svg { width: 18px; height: 18px; }

/* Stats row */
.tl-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
  max-width: 640px;
}
@media (min-width: 640px) {
  .tl-stats { grid-template-columns: repeat(4, 1fr); }
}
.tl-stat-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(8px);
}
.tl-stat-card .value {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.tl-stat-card .label {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
  font-weight: 500;
}

/* Cards */
.tl-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.tl-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--ring);
}
.tl-card.featured {
  border-color: var(--foreground);
  box-shadow: var(--shadow-md);
}
.tl-card-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--muted);
}
.tl-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.tl-card:hover .tl-card-media img { transform: scale(1.03); }
.tl-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 12px; }

/* Badges */
.tl-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}
.tl-badge-default { background: var(--muted); color: var(--muted-foreground); }
.tl-badge-ai { background: var(--info-muted); color: var(--info); border: 1px solid rgba(37,99,235,0.2); }
[data-theme="dark"] .tl-badge-ai { color: var(--info); }
.tl-badge-success { background: var(--success-muted); color: var(--success); }
.tl-badge-accent { background: var(--accent-muted); color: var(--accent); }
.tl-badge-absolute { position: absolute; top: 12px; left: 12px; z-index: 2; }

/* Facility pills — organized row */
.tl-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: var(--muted);
  color: var(--muted-foreground);
  border: 1px solid transparent;
}
.tl-pill svg { width: 12px; height: 12px; flex-shrink: 0; }

/* Progress animations — @property for smooth ring draw (modern browsers) */
@property --ring-deg {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes tl-meter-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes tl-meter-shimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(220%); }
}
@keyframes tl-ring-draw {
  to { --ring-deg: calc(var(--p) * 3.6deg); }
}
@keyframes tl-match-ring-pop {
  0% { opacity: 0; transform: scale(0.82); }
  70% { transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes tl-match-ring-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.12); }
}
@keyframes tl-score-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
@keyframes tl-tank-viz-rise {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
@keyframes tl-chart-bar-rise {
  from { transform: scaleY(0); opacity: 0.5; }
  to { transform: scaleY(1); opacity: 1; }
}

/* Capacity meter */
.tl-meter { width: 100%; }
.tl-meter-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted-foreground);
  margin-bottom: 6px;
  font-weight: 500;
}
.tl-meter-track {
  height: 6px;
  background: var(--muted);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.06);
}
[data-theme="dark"] .tl-meter-track {
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.25);
}
.tl-meter-fill {
  position: relative;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--foreground) 0%, var(--accent) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  animation: tl-meter-grow 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  overflow: hidden;
  box-shadow: 0 0 12px rgb(245 158 11 / 0.2);
}
.tl-meter-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 60%,
    transparent 100%
  );
  animation: tl-meter-shimmer 2.8s ease-in-out infinite;
  animation-delay: 0.9s;
}
.tl-score-row:nth-child(1) .tl-meter-fill { animation-delay: 0.15s; }
.tl-score-row:nth-child(2) .tl-meter-fill { animation-delay: 0.22s; }
.tl-score-row:nth-child(3) .tl-meter-fill { animation-delay: 0.29s; }
.tl-score-row:nth-child(4) .tl-meter-fill { animation-delay: 0.36s; }
.tl-score-row:nth-child(5) .tl-meter-fill { animation-delay: 0.43s; }
.tl-score-row .tl-meter-fill {
  background: linear-gradient(90deg, var(--info) 0%, #6366f1 55%, var(--accent) 100%);
  box-shadow: 0 0 10px rgb(37 99 235 / 0.25);
}
.tl-score-row .tl-meter-fill::after {
  animation-delay: 1.1s;
}
.tl-card .tl-meter-fill { animation-delay: 0.2s; }
.tl-listing:nth-of-type(1) .tl-meter-fill { animation-delay: 0.12s; }
.tl-listing:nth-of-type(2) .tl-meter-fill { animation-delay: 0.2s; }
.tl-listing:nth-of-type(3) .tl-meter-fill { animation-delay: 0.28s; }
.tl-grid-3 > .tl-card:nth-child(1) .tl-meter-fill { animation-delay: 0.18s; }
.tl-grid-3 > .tl-card:nth-child(2) .tl-meter-fill { animation-delay: 0.26s; }
.tl-grid-3 > .tl-card:nth-child(3) .tl-meter-fill { animation-delay: 0.34s; }
.tl-listing-aside .tl-match-ring { animation-delay: 0.08s; }
.tl-listing-aside .tl-match-ring::before { animation-delay: 0.15s; }

/* Quote-only CTA — pricing hidden until terminal sends quotation */
.tl-quote-cta {
  margin-top: auto;
  padding-top: 8px;
}
.tl-quote-cta-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
}
.tl-quote-cta-hint {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-top: 4px;
  line-height: 1.4;
}
.tl-quote-cta-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--info);
}
[data-theme="dark"] .tl-quote-cta-icon { color: var(--info); }

.tl-secret-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--muted);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-foreground);
  line-height: 1.5;
}
.tl-secret-note strong { color: var(--foreground); font-weight: 600; }

/* Match ring — animated AI score dial */
.tl-match-ring {
  --ring-thick: 4px;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: tl-match-ring-pop 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) both,
    tl-match-ring-pulse 3s ease-in-out 1.2s infinite;
}
.tl-match-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  --ring-deg: 0deg;
  background: conic-gradient(
    from -90deg,
    var(--accent) 0deg,
    var(--info) var(--ring-deg),
    var(--muted) var(--ring-deg)
  );
  animation: tl-ring-draw 1.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  filter: drop-shadow(0 2px 6px rgb(37 99 235 / 0.2));
}
.tl-match-ring::after {
  content: '';
  position: absolute;
  inset: var(--ring-thick);
  border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--border);
}
.tl-match-ring span {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--foreground) 30%, var(--info) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="dark"] .tl-match-ring span {
  background: linear-gradient(135deg, var(--foreground) 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Location cards */
.tl-loc-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
  text-decoration: none;
}
.tl-loc-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.tl-loc-card:hover img { transform: scale(1.05); }
.tl-loc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}
.tl-loc-overlay h3 { color: #fff; font-size: 16px; font-weight: 700; }
.tl-loc-overlay span { color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 500; margin-top: 2px; }

/* Product chips scroll */
.tl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tl-chip {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
  transition: all 0.15s;
}
.tl-chip:hover { background: var(--muted); border-color: var(--ring); }

/* CTA bento */
.tl-cta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) {
  .tl-cta { grid-template-columns: 1fr auto; align-items: center; }
}
.tl-cta h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.tl-cta p { font-size: 14px; color: var(--muted-foreground); margin-top: 8px; max-width: 480px; line-height: 1.6; }

/* Listing row — search results */
.tl-listing {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 0;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.tl-listing:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--ring);
}
@media (max-width: 900px) {
  .tl-listing { grid-template-columns: 1fr; }
}
.tl-listing-img {
  position: relative;
  min-height: 200px;
  background: var(--muted);
}
.tl-listing-img img { width: 100%; height: 100%; object-fit: cover; min-height: 200px; }
.tl-listing-main {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
@media (max-width: 900px) {
  .tl-listing-main { border: none; border-top: 1px solid var(--border); }
}
.tl-listing-aside {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  background: var(--muted);
  min-height: 100%;
}
.tl-listing-aside-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.tl-listing-aside-head .tl-aside-score-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}
.tl-listing-aside-pricing {
  text-align: center;
}
.tl-listing-aside-pricing strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}
.tl-listing-aside-pricing p {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 6px;
  line-height: 1.5;
}
.tl-listing-aside-notes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted-foreground);
  line-height: 1.45;
  margin-top: auto;
}
.tl-listing-aside .tl-btn {
  width: 100%;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .tl-listing-aside { border-top: 1px solid var(--border); }
}
.tl-listing-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  text-decoration: none;
  line-height: 1.3;
}
.tl-listing-title:hover { text-decoration: underline; }
.tl-listing-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-foreground);
}

/* Search filters column (not app nav — do not use .tl-app-sidebar here) */
.tl-filters {
  position: sticky;
  top: 80px;
  width: 280px;
  flex-shrink: 0;
}
.tl-search-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding-bottom: 64px;
}
.tl-search-results {
  flex: 1;
  min-width: 0;
}
/* Compact listing row — secondary search results */
.tl-listing--compact .tl-listing-img { min-height: 160px; }
.tl-listing--compact { grid-template-columns: 200px 1fr 168px; }
.tl-listing--compact .tl-listing-main { gap: 10px; padding: 16px 20px; }
.tl-listing--compact .tl-listing-aside { padding: 16px; justify-content: flex-start; gap: 12px; }
@media (max-width: 900px) {
  .tl-listing--compact { grid-template-columns: 1fr; }
}
.tl-filter-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.tl-filter-group h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--foreground);
}
.tl-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--muted-foreground);
  cursor: pointer;
}
.tl-check:hover { color: var(--foreground); }
.tl-check input { width: 16px; height: 16px; accent-color: var(--foreground); }

/* Alert banner */
.tl-alert {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--info-muted);
  border: 1px solid rgba(37,99,235,0.15);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.tl-alert strong { color: var(--info); }
[data-theme="dark"] .tl-alert strong { color: var(--info); }
.tl-alert a { color: var(--info); font-weight: 600; }

/* Gallery */
.tl-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 400px;
}
.tl-gallery > div:first-child { grid-row: span 2; }
.tl-gallery img { width: 100%; height: 100%; object-fit: cover; }

/* Inquiry panel */
.tl-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 80px;
}
.tl-panel-divider { height: 1px; background: var(--border); margin: 16px 0; }
.tl-line-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  color: var(--muted-foreground);
}
.tl-line-item.total {
  font-weight: 700;
  font-size: 15px;
  color: var(--foreground);
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

/* Tabs */
.tl-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tl-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.tl-tab.active, .tl-tab:hover { color: var(--foreground); border-bottom-color: var(--foreground); }

/* Spec table */
.tl-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tl-spec-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.tl-spec-row:nth-child(odd) { background: var(--muted); }
.tl-spec-row span:first-child { color: var(--muted-foreground); }
.tl-spec-row span:last-child { font-weight: 600; }

/* Facility grid */
.tl-facility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.tl-facility {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 12px;
  font-weight: 500;
}
.tl-facility.on svg { color: var(--success); }
.tl-facility.off { opacity: 0.4; }

/* Footer */
.tl-footer {
  border-top: 1px solid var(--border);
  padding-block: 48px 32px;
  margin-top: 64px;
  background: var(--card);
}

/* Enterprise footer */
.tl-footer-pro {
  margin-top: 64px;
  padding: 0;
  background: var(--background);
  border-top: 1px solid var(--border);
}
.tl-footer-pro.tl-footer-compact {
  margin-top: 0;
}
.tl-footer-cta {
  background: linear-gradient(135deg, var(--foreground) 0%, #1e3a5f 45%, #2563eb 100%);
  color: #fff;
  padding-block: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tl-footer-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.tl-footer-cta-copy .tl-label {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 8px;
}
.tl-footer-cta-copy h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  max-width: 520px;
}
.tl-footer-cta-copy p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 10px;
  max-width: 560px;
  line-height: 1.55;
}
.tl-footer-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}
.tl-footer-cta .tl-btn-outline {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.tl-footer-cta .tl-btn-outline:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
}
.tl-footer-pro .tl-container {
  padding-top: 48px;
  padding-bottom: 28px;
}
.tl-footer-compact .tl-container {
  padding-top: 32px;
  padding-bottom: 24px;
}
.tl-footer-main {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(0, 2fr);
  gap: 48px 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) {
  .tl-footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
.tl-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 16px;
}
.tl-footer-brand:hover .tl-logo-name {
  color: var(--info);
}
.tl-footer-tagline {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-foreground);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}
.tl-footer-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted-foreground);
  max-width: 360px;
  margin-bottom: 20px;
}
.tl-footer-social {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.tl-footer-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--foreground);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.tl-footer-social-btn:hover {
  background: var(--muted);
  border-color: var(--ring);
}
.tl-footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tl-footer-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--muted);
  color: var(--muted-foreground);
}
.tl-footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 20px;
}
@media (max-width: 768px) {
  .tl-footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}
.tl-footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--foreground);
  margin-bottom: 14px;
}
.tl-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tl-footer-col a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.15s;
}
.tl-footer-col a:hover {
  color: var(--foreground);
}
.tl-footer-regions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.tl-footer-regions-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
  margin-right: 4px;
}
.tl-footer-regions a {
  color: var(--foreground);
  font-weight: 600;
  text-decoration: none;
}
.tl-footer-regions a:hover {
  color: var(--info);
}
.tl-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.tl-footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.tl-footer-legal a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 500;
}
.tl-footer-legal a:hover {
  color: var(--foreground);
}
.tl-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.tl-footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--success);
}
.tl-footer-status .live-dot {
  width: 7px;
  height: 7px;
  background: var(--success);
}
.tl-footer-locale {
  font-weight: 600;
  color: var(--muted-foreground);
}
.tl-footer-mock-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px dashed var(--border);
}
.tl-footer-mock-link:hover {
  color: var(--foreground);
  border-color: var(--ring);
  background: var(--muted);
}

/* Mini search bar */
.tl-search-bar {
  border-bottom: 1px solid var(--border);
  background: var(--card);
  padding-block: 12px;
}
.tl-search-bar .tl-search-card {
  box-shadow: var(--shadow-sm);
  margin: 0 auto;
}
.tl-search-bar .tl-search-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) auto; }
.tl-search-bar .tl-search-submit { min-height: 52px; }

/* Grid layouts */
.tl-grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .tl-grid-3 { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
@media (min-width: 1024px) { .tl-grid-3 { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.tl-grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .tl-grid-4 { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.tl-grid-2 { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 1024px) { .tl-grid-2 { grid-template-columns: 1fr 360px; } }

/* Card header row */
.tl-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.tl-card-top h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.tl-card-sub { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }

/* Satellite map mock (Hamriyah tank farm — assets/image.png) */
.tl-map {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  height: var(--tl-map-h, 320px);
  background: var(--muted);
}
.tl-map-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}
.tl-map-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, transparent 28%, transparent 72%, rgba(0,0,0,0.2) 100%);
}
.tl-map-chrome {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  z-index: 2;
}
.tl-map-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .tl-map-badge {
  background: rgba(24,24,27,0.9);
}
.tl-map-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}
.tl-map-zoom {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .tl-map-zoom { background: rgba(24,24,27,0.9); }
.tl-map-zoom button {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  cursor: default;
}
.tl-map-zoom button + button { border-top: 1px solid var(--border); }
.tl-map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  z-index: 3;
  text-decoration: none;
  color: inherit;
}
.tl-map-pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--foreground);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  margin: 0 auto;
}
.tl-map-pin.active .tl-map-pin-dot {
  width: 18px;
  height: 18px;
  background: var(--info);
}
.tl-map-pin-card {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 160px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 11px;
  line-height: 1.35;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  pointer-events: none;
  white-space: nowrap;
}
.tl-map-pin:hover .tl-map-pin-card,
.tl-map-pin.active .tl-map-pin-card,
.tl-map-pin:focus-visible .tl-map-pin-card {
  opacity: 1;
  visibility: visible;
}
.tl-map-pin-card strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 2px;
}
.tl-map-pin-card span { color: var(--muted-foreground); }
.tl-map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}
.tl-map-legend span {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
}
[data-theme="dark"] .tl-map-legend span { background: rgba(24,24,27,0.88); }
.tl-map-legend .on-map { color: var(--info); border-color: var(--info); }

.tl-view-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--muted);
  gap: 2px;
}
.tl-view-toggle button {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tl-view-toggle button.active {
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}
.tl-search-map-panel { display: none; margin-bottom: 24px; }
.tl-search-map-panel.is-visible { display: block; }
.tl-search-list-panel.is-hidden { display: none; }

.tl-logo-sub { font-size: 11px; color: var(--muted-foreground); font-weight: 500; }

/* ——— App dashboard shell (customer / terminal / admin) ——— */
.tl-app {
  display: flex;
  min-height: 100vh;
}
.tl-app-sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--card);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
}
.tl-app-sidebar-brand {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.tl-app-sidebar-brand .tl-logo { margin-bottom: 0; }
.tl-app-sidebar-portal {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
  margin-top: 10px;
}
.tl-app-sidebar-terminal {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 4px;
}
.tl-app-sidebar-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}
.tl-app-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}
.tl-app-sidebar-link svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
.tl-app-sidebar-link:hover { background: var(--muted); color: var(--foreground); }
.tl-app-sidebar-link.active {
  background: var(--muted);
  color: var(--foreground);
  font-weight: 600;
}
.tl-app-sidebar-link.active svg { opacity: 1; }
.tl-app-sidebar-link .tl-nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent-muted);
  color: var(--accent);
}
.tl-app-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.tl-app-sidebar-footer a {
  font-size: 12px;
  color: var(--muted-foreground);
  text-decoration: none;
}
.tl-app-sidebar-footer a:hover { color: var(--foreground); }

.tl-app-main {
  flex: 1;
  margin-left: 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.tl-topbar {
  height: 64px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--header-blur);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.tl-topbar-title { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.tl-topbar-actions { display: flex; align-items: center; gap: 12px; }
.tl-topbar-user { text-align: right; }
.tl-topbar-user strong { display: block; font-size: 13px; font-weight: 600; }
.tl-topbar-user span { font-size: 11px; color: var(--muted-foreground); }
.tl-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--foreground);
  color: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.tl-notify-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid var(--card);
}

.tl-dash {
  padding: 28px 32px 48px;
  max-width: 1440px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.tl-dash-welcome {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.tl-dash-welcome h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 4px;
}
.tl-dash-welcome .tl-greeting {
  font-size: 13px;
  color: var(--muted-foreground);
}
.tl-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media (min-width: 768px) { .tl-kpi-grid { grid-template-columns: repeat(4, 1fr); } }
.tl-kpi-grid.cols-5 { }
@media (min-width: 1024px) { .tl-kpi-grid.cols-5 { grid-template-columns: repeat(5, 1fr); } }
.tl-kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.tl-kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}
.tl-kpi-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 6px;
  line-height: 1.1;
}
.tl-kpi-hint {
  font-size: 12px;
  margin-top: 6px;
  color: var(--muted-foreground);
}
.tl-kpi-hint.success { color: var(--success); }
.tl-kpi-hint.warn { color: var(--accent); }
.tl-kpi-hint.info { color: var(--info); }
.tl-kpi.danger {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.04);
}
.tl-kpi.danger .tl-kpi-value { color: #dc2626; }
[data-theme="dark"] .tl-kpi.danger .tl-kpi-value { color: #f87171; }

.tl-dash-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 28px;
}
@media (min-width: 1024px) {
  .tl-dash-grid.split-2-1 { grid-template-columns: 2fr 1fr; }
  .tl-dash-grid.split-1-1 { grid-template-columns: 1fr 1fr; }
}
.tl-dash-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.tl-dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.tl-dash-card-head h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.tl-dash-card.featured {
  background: linear-gradient(135deg, var(--info-muted) 0%, var(--card) 55%);
  border-color: rgba(37, 99, 235, 0.2);
}
[data-theme="dark"] .tl-dash-card.featured {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, var(--card) 60%);
}
.tl-dash-card.accent-violet {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border: none;
  color: #fff;
}
.tl-dash-card.accent-violet h3,
.tl-dash-card.accent-violet p { color: rgba(255,255,255,0.9); }
.tl-dash-card.accent-violet .tl-btn-outline {
  border-color: rgba(255,255,255,0.35);
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.tl-dash-card.accent-violet .tl-btn-outline:hover { background: rgba(255,255,255,0.2); }

.tl-activity { display: flex; flex-direction: column; gap: 16px; }
.tl-activity-item {
  display: flex;
  gap: 12px;
  font-size: 13px;
}
.tl-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.tl-activity-dot.success { background: var(--success); }
.tl-activity-dot.warn { background: var(--accent); }
.tl-activity-dot.info { background: var(--info); }
.tl-activity-item strong { font-weight: 600; display: block; }
.tl-activity-item span { font-size: 12px; color: var(--muted-foreground); }

.tl-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-sm);
}
.tl-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.tl-table-head h3 { font-size: 15px; font-weight: 700; }
.tl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tl-table th {
  text-align: left;
  padding: 12px 24px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  background: var(--muted);
}
.tl-table td {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
}
.tl-table tbody tr:hover td { background: var(--muted); }
.tl-table .mono { font-weight: 600; font-variant-numeric: tabular-nums; }

.tl-status {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.tl-status.success { background: var(--success-muted); color: var(--success); }
.tl-status.info { background: var(--info-muted); color: var(--info); }
.tl-status.warn { background: var(--accent-muted); color: var(--accent); }
.tl-status.muted { background: var(--muted); color: var(--muted-foreground); }

.tl-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 180px;
  padding-top: 8px;
}
.tl-chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
}
.tl-chart-bar {
  width: 100%;
  max-width: 56px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--muted-foreground) 0%, var(--foreground) 100%);
  margin-top: auto;
  transform: scaleY(0);
  transform-origin: bottom center;
  animation: tl-chart-bar-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.tl-chart-bar-col:nth-child(1) .tl-chart-bar { animation-delay: 0.08s; }
.tl-chart-bar-col:nth-child(2) .tl-chart-bar { animation-delay: 0.16s; }
.tl-chart-bar-col:nth-child(3) .tl-chart-bar { animation-delay: 0.24s; }
.tl-chart-bar-col:nth-child(4) .tl-chart-bar { animation-delay: 0.32s; }
.tl-chart-bar.highlight {
  background: linear-gradient(180deg, var(--accent) 0%, #d97706 100%);
  box-shadow: 0 4px 14px rgb(245 158 11 / 0.35);
}
.tl-chart-bar-col span { font-size: 11px; color: var(--muted-foreground); }
.tl-chart-bar-col strong { font-size: 11px; font-weight: 700; }

.tl-dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-dash-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.tl-dash-row:last-child { border-bottom: none; }
.tl-alert-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-muted);
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.tl-verify-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--muted);
  margin-bottom: 10px;
}
.tl-verify-item.warn { background: var(--accent-muted); border-color: rgba(245, 158, 11, 0.25); }
.tl-verify-item strong { font-size: 13px; display: block; }
.tl-verify-item span { font-size: 11px; color: var(--muted-foreground); }

.tl-match-featured {
  border: 2px solid rgba(22, 163, 74, 0.35);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}
.tl-match-featured-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: linear-gradient(90deg, #15803d, #16a34a);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.tl-match-featured-body { padding: 24px; }
.tl-match-score-box {
  position: relative;
  text-align: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--success-muted) 0%, var(--info-muted) 100%);
  border: 1px solid rgba(22, 163, 74, 0.2);
  overflow: hidden;
  animation: tl-score-pulse 4s ease-in-out infinite;
}
.tl-match-score-box::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(
    from 0deg,
    transparent,
    var(--accent),
    var(--info),
    transparent
  );
  animation: tl-match-score-glow 6s linear infinite;
  opacity: 0.35;
}
@keyframes tl-match-score-glow {
  to { transform: rotate(360deg); }
}
.tl-match-score-box > * {
  position: relative;
  z-index: 1;
}
.tl-match-score-box .score {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--success) 0%, var(--info) 70%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tl-score-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 8px;
}
.tl-score-row span:first-child { width: 112px; color: var(--muted-foreground); flex-shrink: 0; }
.tl-score-row .tl-meter { flex: 1; }
.tl-check-list { display: grid; gap: 8px; font-size: 13px; }
@media (min-width: 640px) { .tl-check-list { grid-template-columns: 1fr 1fr; } }
.tl-check-list li { display: flex; gap: 8px; color: var(--foreground); }
.tl-check-list li::before { content: '✓'; color: var(--success); font-weight: 700; }

/* Terminal portal — tank viz, calendar, campaigns */
.tl-tank-viz {
  height: 160px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--muted);
  position: relative;
  overflow: hidden;
}
.tl-tank-viz-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--info) 0%, var(--foreground) 85%, var(--accent) 100%);
  transform: scaleY(0);
  transform-origin: bottom center;
  animation: tl-tank-viz-rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  overflow: hidden;
}
.tl-tank-viz-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.15) 0%,
    transparent 40%,
    rgba(0, 0, 0, 0.08) 100%
  );
  pointer-events: none;
}
.tl-grid-3 > .tl-dash-card:nth-child(1) .tl-tank-viz-fill { animation-delay: 0.1s; }
.tl-grid-3 > .tl-dash-card:nth-child(2) .tl-tank-viz-fill { animation-delay: 0.2s; }
.tl-grid-3 > .tl-dash-card:nth-child(3) .tl-tank-viz-fill { animation-delay: 0.3s; }
.tl-tank-viz-label {
  position: absolute;
  z-index: 1;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
}
[data-theme="dark"] .tl-tank-viz-label { background: rgba(24,24,27,0.92); }
.tl-tank-viz-label.bottom { bottom: 8px; left: 8px; color: #fff; background: rgba(0,0,0,0.45); border: none; }
.tl-tank-viz-label.top { top: 8px; right: 8px; }

.tl-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  font-size: 12px;
  text-align: center;
}
.tl-calendar-grid .head { color: var(--muted-foreground); font-weight: 600; padding: 8px 0; }
.tl-calendar-grid .day {
  padding: 10px 4px;
  border-radius: 8px;
  background: var(--muted);
  color: var(--muted-foreground);
}
.tl-calendar-grid .day.avail { background: var(--success-muted); color: var(--success); font-weight: 600; }
.tl-calendar-grid .day.avail-strong { background: var(--success-muted); color: var(--success); font-weight: 700; box-shadow: 0 0 0 2px var(--success); }
.tl-calendar-grid .day.inquiry { background: var(--accent-muted); color: var(--accent); font-weight: 600; }

.tl-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 640px) { .tl-mini-stats { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .tl-mini-stats.cols-9 { grid-template-columns: repeat(9, 1fr); } }
.tl-mini-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
  font-size: 11px;
  color: var(--muted-foreground);
}
.tl-mini-stat strong { display: block; font-size: 16px; font-weight: 700; color: var(--foreground); margin-bottom: 2px; }

.tl-campaign-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.tl-campaign-header p { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.tl-campaign-stats { display: flex; gap: 24px; text-align: center; }
.tl-campaign-stats strong { display: block; font-size: 22px; font-weight: 700; }
.tl-campaign-stats span { font-size: 11px; opacity: 0.8; }

.tl-log-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--muted);
  font-size: 13px;
}
.tl-log-row strong { font-weight: 600; }
.tl-log-row span { font-size: 11px; color: var(--muted-foreground); }

.tl-ai-callout {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--info-muted);
  border: 1px solid rgba(37, 99, 235, 0.2);
}
.tl-ai-callout h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.tl-ai-callout p { font-size: 13px; color: var(--muted-foreground); line-height: 1.6; }

.tl-pricing-hero { text-align: center; padding: 8px 0 24px; }
.tl-pricing-hero .rate {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-top: 8px;
}
.tl-pricing-hero .rate span { color: var(--accent); }
.tl-pricing-hero .unit { font-size: 15px; color: var(--muted-foreground); margin-top: 4px; }

.tl-rate-lines { font-size: 13px; }
.tl-rate-lines .tl-dash-row span:last-child { font-weight: 600; }
.tl-rate-lines .plus { color: var(--success); }
.tl-rate-lines .minus { color: #dc2626; }
[data-theme="dark"] .tl-rate-lines .minus { color: #f87171; }

.tl-script-step {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 8px;
}
.tl-script-step .num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--info-muted);
  color: var(--info);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: tl-pulse 2s ease-in-out infinite;
}
@keyframes tl-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.15); }
}

/* Terminal command center — advanced bento dashboard */
.tl-terminal-dash {
  position: relative;
  z-index: 2;
  margin-top: -56px;
  padding-top: 8px;
  padding-bottom: 64px;
}
@media (max-width: 767px) {
  .tl-terminal-dash {
    margin-top: 0;
    padding-top: 20px;
  }
}
.tl-cmd-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}
.tl-cmd-bar-left,
.tl-cmd-bar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.tl-cmd-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--muted);
  color: var(--foreground);
}
.tl-cmd-pill.active {
  background: var(--foreground);
  color: var(--primary-foreground);
  border-color: var(--foreground);
}
.tl-cmd-pill .live-dot { width: 6px; height: 6px; margin: 0; }
.tl-ai-insight-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: linear-gradient(135deg, var(--info-muted) 0%, var(--card) 70%);
  margin-bottom: 20px;
}
.tl-ai-insight-bar strong { font-size: 13px; }
.tl-ai-insight-bar p {
  font-size: 12px;
  color: var(--muted-foreground);
  line-height: 1.55;
  flex: 1;
  min-width: 200px;
}
.tl-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.tl-bento > * { min-width: 0; }
.tl-span-3 { grid-column: span 3; }
.tl-span-4 { grid-column: span 4; }
.tl-span-5 { grid-column: span 5; }
.tl-span-6 { grid-column: span 6; }
.tl-span-7 { grid-column: span 7; }
.tl-span-8 { grid-column: span 8; }
.tl-span-12 { grid-column: span 12; }
@media (max-width: 1200px) {
  .tl-span-3, .tl-span-4, .tl-span-5, .tl-span-6, .tl-span-7, .tl-span-8 {
    grid-column: span 6;
  }
}
@media (max-width: 768px) {
  .tl-span-3, .tl-span-4, .tl-span-5, .tl-span-6, .tl-span-7, .tl-span-8, .tl-span-12 {
    grid-column: span 12;
  }
}
.tl-metric-pro {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.tl-metric-pro:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--ring);
}
.tl-metric-pro-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.tl-metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
  color: var(--foreground);
  flex-shrink: 0;
}
.tl-metric-icon.info { background: var(--info-muted); color: var(--info); }
.tl-metric-icon.success { background: var(--success-muted); color: var(--success); }
.tl-metric-icon.warn { background: var(--accent-muted); color: var(--accent); }
.tl-metric-icon.danger { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.tl-metric-pro .tl-kpi-label { margin: 0; }
.tl-metric-pro .tl-kpi-value { font-size: 26px; margin-top: 2px; }
.tl-metric-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.tl-delta {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.tl-delta.up { background: var(--success-muted); color: var(--success); }
.tl-delta.down { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.tl-delta.neutral { background: var(--muted); color: var(--muted-foreground); }
.tl-sparkline {
  width: 88px;
  height: 32px;
  flex-shrink: 0;
  opacity: 0.85;
}
.tl-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.tl-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.tl-panel-head h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.tl-occ-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.tl-occ-stat {
  padding: 12px;
  border-radius: var(--radius);
  background: var(--muted);
  font-size: 12px;
}
.tl-occ-stat strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.tl-ring-chart {
  width: 140px;
  height: 140px;
  margin: 0 auto;
  position: relative;
}
.tl-ring-chart svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tl-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.tl-ring-center strong { font-size: 28px; letter-spacing: -0.03em; }
.tl-ring-center span { font-size: 11px; color: var(--muted-foreground); }
.tl-pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  .tl-pipeline { grid-template-columns: repeat(2, 1fr); }
}
.tl-pipeline-col {
  background: var(--muted);
  border-radius: var(--radius-lg);
  padding: 14px;
  min-height: 200px;
  border: 1px solid var(--border);
}
.tl-pipeline-col h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}
.tl-pipeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
}
.tl-pipeline-card:hover { border-color: var(--ring); }
.tl-pipeline-card strong { display: block; font-size: 12px; margin-bottom: 4px; }
.tl-pipeline-card span { color: var(--muted-foreground); font-size: 11px; }
.tl-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 320px;
  overflow-y: auto;
}
.tl-feed-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.tl-feed-item:last-child { border-bottom: none; }
.tl-feed-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.tl-feed-icon.info { background: var(--info-muted); color: var(--info); }
.tl-feed-icon.success { background: var(--success-muted); color: var(--success); }
.tl-feed-icon.warn { background: var(--accent-muted); color: var(--accent); }
.tl-feed-body strong { display: block; font-weight: 600; margin-bottom: 2px; }
.tl-feed-body span { color: var(--muted-foreground); }
.tl-feed-time {
  font-size: 10px;
  color: var(--muted-foreground);
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}
.tl-benchmark-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.tl-benchmark-row:last-child { border-bottom: none; }
.tl-benchmark-row .tl-meter { flex: 1; }
.tl-fleet-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.tl-fleet-mini {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.15s;
}
.tl-fleet-mini:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tl-fleet-mini img { width: 100%; height: 88px; object-fit: cover; display: block; }
.tl-fleet-mini-body { padding: 12px; }
.tl-fleet-mini-body h4 { font-size: 13px; font-weight: 700; }
.tl-fleet-mini-body p { font-size: 11px; color: var(--muted-foreground); margin-top: 2px; }
.tl-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.tl-table-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tl-filter-chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  cursor: default;
}
.tl-filter-chip.active {
  background: var(--foreground);
  color: var(--primary-foreground);
  border-color: var(--foreground);
}
.tl-priority {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
}
.tl-priority.high { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.tl-priority.med { background: var(--accent-muted); color: var(--accent); }
.tl-priority.low { background: var(--muted); color: var(--muted-foreground); }
.tl-table tbody tr:hover { background: var(--muted); }
.tl-heat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.tl-heat-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--border);
}

/* Tank inventory listing cards */
.tl-inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.tl-inv-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}
.tl-inv-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--ring);
  transform: translateY(-2px);
}
.tl-inv-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.tl-inv-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tl-inv-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tl-inv-card-body {
  padding: 16px;
}
.tl-inv-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.tl-inv-card-head h4 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.tl-inv-card-meta {
  font-size: 11px;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin-bottom: 12px;
}
.tl-inv-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.tl-inv-stat {
  padding: 8px;
  border-radius: var(--radius);
  background: var(--muted);
  font-size: 10px;
}
.tl-inv-stat strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
}
.tl-inv-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ========== Mobile & tablet responsive ========== */

/* Tailwind-like utilities used in HTML (tl-nav hidden lg:flex) */
.hidden { display: none !important; }
@media (min-width: 640px) {
  .sm\:inline-flex { display: inline-flex !important; }
}
@media (min-width: 768px) {
  .md\:flex { display: flex !important; }
}
@media (min-width: 1024px) {
  .lg\:flex { display: flex !important; }
  .tl-nav.hidden.lg\:flex,
  .tl-nav.hidden.lg-flex { display: flex !important; }
}

/* —— Tablet (≤1023px) —— */
@media (max-width: 1023px) {
  :root {
    --tl-header-h: 72px;
  }
  .tl-header-inner {
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 10px 0;
  }
  .tl-logo-sub {
    display: none;
  }
  .tl-nav.hidden.lg\:flex,
  .tl-nav.hidden.lg-flex,
  .tl-nav.tl-nav--always {
    display: flex !important;
    order: 3;
    width: 100%;
    flex: 1 1 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding: 2px 0 4px;
    mask-image: linear-gradient(90deg, #000 92%, transparent);
  }
  .tl-nav.hidden.lg\:flex::-webkit-scrollbar,
  .tl-nav.hidden.lg-flex::-webkit-scrollbar { display: none; }
  .tl-nav a {
    flex-shrink: 0;
    font-size: 12px;
    padding: 8px 11px;
  }
  /* Two-row header when nav row is visible (terminal tablet) */
  .tl-header-inner:has(.tl-nav.hidden.lg\:flex),
  .tl-header-inner:has(.tl-nav.hidden.lg-flex),
  .tl-header-inner:has(.tl-nav.tl-nav--always) {
    padding-bottom: 12px;
  }
  html:has(.tl-header-inner .tl-nav.hidden.lg\:flex),
  html:has(.tl-header-inner .tl-nav.hidden.lg-flex),
  html:has(.tl-header-inner .tl-nav.tl-nav--always) {
    --tl-header-h: 112px;
    scroll-padding-top: var(--tl-header-h);
  }
  .tl-header-actions {
    margin-left: auto;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .tl-header-user {
    display: none;
  }
  .tl-alert-banner {
    display: none !important;
  }
  .tl-btn.tl-btn-primary,
  .tl-btn.tl-btn-outline,
  .tl-btn.tl-btn-ghost {
    font-size: 12px;
    padding: 0 12px;
    height: 34px;
  }
  .tl-header-actions .tl-btn-primary {
    padding: 0 10px;
    font-size: 11px;
  }
  .tl-search-layout {
    flex-direction: column;
    gap: 20px;
    padding-bottom: 40px;
  }
  .tl-filters {
    position: static;
    width: 100%;
  }
  .tl-footer-cta {
    padding-block: 28px;
  }
  .tl-footer-cta-copy h3 {
    font-size: 18px;
  }
  .tl-footer-cta-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .tl-footer-cta-actions {
    width: 100%;
  }
  .tl-footer-cta-actions .tl-btn {
    flex: 1;
    justify-content: center;
  }
  .tl-footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 20px;
  }
  .tl-terminal-dash {
    margin-top: 0;
  }
}

/* —— Mobile (≤767px) —— */
@media (max-width: 767px) {
  :root {
    --tl-header-h: 64px;
  }
  /* Customer/terminal: second nav row under logo (lg:flex nav forced visible ≤1023px) */
  html:has(.tl-header-inner .tl-nav.hidden.lg\:flex),
  html:has(.tl-header-inner .tl-nav.hidden.lg-flex) {
    --tl-header-h: 108px;
  }
  html {
    scroll-padding-top: var(--tl-header-h);
  }
  html:has(.tl-subheader) {
    scroll-padding-top: calc(var(--tl-header-h) + var(--tl-subheader-h));
  }
  body.tl {
    font-size: 13px;
  }
  .tl-header-inner {
    min-height: 56px;
    height: auto;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .tl-header-inner:has(.tl-nav.hidden.lg\:flex),
  .tl-header-inner:has(.tl-nav.hidden.lg-flex) {
    min-height: 100px;
    padding-bottom: 10px;
  }
  .tl-header + .tl-hero {
    padding-top: 4px;
  }
  .tl-header + .tl-search-bar {
    padding-top: 14px;
    padding-bottom: 10px;
  }
  .tl-header + main,
  .tl-header + .tl-terminal-main,
  .tl-header + .tl-customer-main {
    padding-top: 16px;
  }
  .tl-subheader + .tl-hero.tl-hero-compact,
  .tl-subheader + main,
  .tl-subheader + .tl-customer-main {
    scroll-margin-top: calc(var(--tl-header-h) + var(--tl-subheader-h));
  }
  .tl-search-bar {
    padding-block: 10px;
  }
  .tl-search-bar .tl-search-grid {
    grid-template-columns: 1fr !important;
  }
  .tl-search-bar .tl-search-submit {
    min-height: 44px;
    width: 100%;
  }
  .tl-listing--compact .tl-listing-img {
    min-height: 140px;
  }
  .tl-loc-card {
    min-height: 140px;
  }
  .tl-section {
    padding-block: 36px;
  }
  .tl-section-sm {
    padding-block: 28px;
  }
  .tl-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }
  .tl-section-head h2 {
    font-size: 20px;
  }
  .tl-region-panel {
    padding-block: 24px;
    padding-inline: 16px;
    border-radius: 20px;
  }
  .tl-hero {
    min-height: auto;
    padding-block: 32px 24px;
    align-items: flex-end;
  }
  .tl-hero-content {
    padding-top: 4px;
  }
  .tl-hero-compact,
  .tl-subheader + .tl-hero.tl-hero-compact {
    min-height: auto;
    padding-block: 24px 28px;
  }
  .tl-hero h1 {
    font-size: 26px;
    max-width: 100%;
    margin-bottom: 12px;
  }
  .tl-hero-desc {
    font-size: 14px;
    margin-bottom: 20px;
    max-width: 100%;
  }
  .tl-hero-badge {
    font-size: 11px;
    margin-bottom: 14px;
    max-width: 100%;
  }
  .tl-search-card {
    padding: 6px;
    max-width: 100%;
  }
  .tl-search-submit {
    min-height: 48px;
    width: 100%;
  }
  .tl-stats {
    max-width: 100%;
    gap: 8px;
    margin-top: 16px;
  }
  .tl-stat-card {
    padding: 12px;
  }
  .tl-stat-card .value {
    font-size: 17px;
  }
  .tl-customer-dash,
  .tl-terminal-dash {
    margin-top: 0;
    padding-top: 16px;
    padding-bottom: 40px;
  }
  .tl-filters,
  .tl-panel {
    top: calc(var(--tl-header-h) + 12px);
  }
  .tl-cmd-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 10px;
    margin-bottom: 14px;
  }
  .tl-cmd-bar-left,
  .tl-cmd-bar-right {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .tl-cmd-bar-left::-webkit-scrollbar,
  .tl-cmd-bar-right::-webkit-scrollbar {
    display: none;
  }
  .tl-cmd-pill {
    flex-shrink: 0;
    font-size: 11px;
    padding: 6px 10px;
  }
  .tl-cmd-bar-right .tl-btn {
    flex-shrink: 0;
  }
  .tl-ai-insight-bar {
    flex-direction: column;
    padding: 14px 16px;
    gap: 12px;
    margin-bottom: 14px;
  }
  .tl-ai-insight-bar .tl-btn {
    width: 100%;
    justify-content: center;
  }
  .tl-ai-insight-bar p {
    min-width: 0;
  }
  .tl-panel {
    padding: 16px;
  }
  .tl-panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
  }
  .tl-metric-pro {
    padding: 16px;
    gap: 10px;
  }
  .tl-metric-pro .tl-kpi-value {
    font-size: 22px;
  }
  .tl-bento {
    gap: 12px;
  }
  .tl-occ-summary {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .tl-occ-stat {
    padding: 10px;
  }
  .tl-occ-stat strong {
    font-size: 16px;
  }
  .tl-chart-bars {
    height: 160px !important;
    gap: 6px;
  }
  .tl-chart-bar-col span,
  .tl-chart-bar-col strong {
    font-size: 9px;
  }
  .tl-pipeline {
    grid-template-columns: 1fr;
  }
  .tl-pipeline-col {
    min-height: auto;
  }
  .tl-table-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .tl-table-filters {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .tl-table {
    min-width: 560px;
    font-size: 12px;
  }
  .tl-table th,
  .tl-table td {
    padding: 10px 8px;
  }
  .tl-inv-grid {
    grid-template-columns: 1fr;
  }
  .tl-inv-card-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .tl-fleet-scroll,
  .tl-fleet-mini {
    min-width: 0;
  }
  .tl-match-featured-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .tl-match-featured-body {
    padding: 16px !important;
  }
  .tl-match-featured-body .tl-occ-summary {
    grid-template-columns: 1fr 1fr;
  }
  .tl-card-top {
    flex-wrap: wrap;
    gap: 10px;
  }
  .tl-match-ring {
    width: 48px !important;
    height: 48px !important;
  }
  .tl-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 20px;
  }
  .tl-cta .tl-btn-lg {
    width: 100%;
    justify-content: center;
  }
  .tl-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .tl-map-wrap {
    min-height: 220px;
  }
  .tl-footer {
    margin-top: 40px;
    padding-block: 32px 24px;
  }
  .tl-footer-pro {
    margin-top: 40px;
  }
  .tl-footer-pro .tl-container {
    padding-top: 32px;
    padding-bottom: 20px;
  }
  .tl-footer-main {
    gap: 28px;
  }
  .tl-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .tl-footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .tl-thread-msg {
    flex-direction: column;
    gap: 8px;
  }
  .tl-thread-msg.terminal {
    flex-direction: column;
  }
  .tl-thread-bubble {
    max-width: 100%;
  }
  .tl-search-grid[style*="repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  .tl-dash-grid.split-1-1,
  .tl-dash-grid.split-2-1 {
    display: flex !important;
    flex-direction: column;
    gap: 16px;
  }
  /* Inline featured row cards → stack on mobile */
  .tl-card.featured[style*="grid-template-columns"],
  a.tl-card.featured[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
  }
  .tl-card.featured .tl-card-media,
  a.tl-card.featured .tl-card-media {
    min-height: 180px !important;
    aspect-ratio: 16 / 10;
  }
  .tl-panel[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
  }
  .tl-panel[style*="grid-template-columns"] img {
    min-height: 200px !important;
    width: 100% !important;
  }
}

/* —— Small phones (≤480px) —— */
@media (max-width: 480px) {
  .tl-logo-name {
    font-size: 14px;
  }
  .tl-logo-icon {
    width: 32px;
    height: 32px;
  }
  .tl-header-actions .tl-btn-ghost,
  .tl-header-actions .tl-btn-outline {
    display: none !important;
  }
  .tl-stats {
    grid-template-columns: 1fr 1fr;
  }
  .tl-footer-links {
    grid-template-columns: 1fr;
  }
  .tl-inv-card-stats {
    grid-template-columns: 1fr 1fr;
  }
  .tl-sparkline {
    display: none;
  }
  .tl-metric-foot {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl-match-ring,
  .tl-match-ring::before,
  .tl-meter-fill,
  .tl-meter-fill::after,
  .tl-tank-viz-fill,
  .tl-chart-bar,
  .tl-match-score-box,
  .tl-match-score-box::before {
    animation: none !important;
    transform: none !important;
  }
  .tl-match-ring::before {
    --ring-deg: calc(var(--p) * 3.6deg);
  }
  .tl-meter-fill {
    transform: scaleX(1);
  }
  .tl-tank-viz-fill,
  .tl-chart-bar {
    transform: scaleY(1);
  }
}

@media (max-width: 1023px) {
  .tl-app-sidebar { display: none; }
  .tl-app-main { margin-left: 0; }
}

/* ========== Layout gutter guard (all pages / sections / direct containers) ========== */
body.tl .tl-container,
body.tl .tl-container-wide,
body.tl .tl-footer .tl-container,
body.tl .tl-footer-pro .tl-container {
  padding-left: var(--tl-gutter-x);
  padding-right: var(--tl-gutter-x);
}
/* Block-spacing utilities must not zero horizontal padding on combined nodes */
body.tl .tl-section.tl-container,
body.tl .tl-section-sm.tl-container,
body.tl .tl-container.tl-breadcrumb,
body.tl .tl-container.tl-page-main,
body.tl .tl-container.tl-search-layout,
body.tl .tl-container.tl-customer-dash,
body.tl .tl-container.tl-terminal-dash,
body.tl main .tl-container,
body.tl .tl-container.tl-subheader-inner,
body.tl .tl-container.tl-header-inner,
body.tl .tl-container.tl-hero-content {
  padding-left: var(--tl-gutter-x);
  padding-right: var(--tl-gutter-x);
}
