/* Transfermarkt-inspired visual system for Football Talent.
 * Palette and information density follow the public Transfermarkt interface;
 * all branding, assets and product behaviour remain Football Talent's own.
 */

:root {
  --tm-navy: #00193f;
  --tm-navy-strong: #000d22;
  --tm-navy-soft: #0b315f;
  --tm-blue: #174f85;
  --tm-link: #145f9b;
  --tm-green: #174f85;
  --tm-green-strong: #0b315f;
  --tm-green-soft: #edf4fa;
  --tm-canvas: #e9e9e9;
  --tm-canvas-soft: #f2f2f2;
  --tm-panel: #fff;
  --tm-row: #f5f5f5;
  --tm-row-alt: #ededed;
  --tm-border: #cfcfcf;
  --tm-border-dark: #b8b8b8;
  --tm-text: #333;
  --tm-muted: #6b6b6b;
  --tm-danger: #b01f16;
  --tm-warning: #d79a19;
  --tm-shadow: 0 1px 3px rgba(0, 0, 0, .12);
  --tm-radius: 4px;
  --ui-gold: var(--tm-warning);
  --ui-orange: var(--tm-warning);
  --ui-purple: var(--tm-blue);
  --ui-red: var(--tm-danger);
  --ui-cyan: var(--tm-blue);
  --purple: var(--tm-blue);
  --coral: var(--tm-danger);
}

html.light {
  --bg: var(--tm-canvas);
  --bg-2: var(--tm-canvas-soft);
  --surface: var(--tm-panel);
  --surface-2: var(--tm-row);
  --surface-strong: var(--tm-panel);
  --text: var(--tm-text);
  --muted: var(--tm-muted);
  --line: var(--tm-border);
  --brand: var(--tm-green);
  --brand-2: var(--tm-navy-soft);
  --accent: var(--tm-link);
  --blue: var(--tm-blue);
  --gold: var(--tm-warning);
  --danger: var(--tm-danger);
  --shadow: var(--tm-shadow);
  --ui-canvas: var(--tm-canvas);
  --ui-canvas-2: var(--tm-canvas-soft);
  --ui-panel: var(--tm-panel);
  --ui-panel-solid: var(--tm-panel);
  --ui-soft: var(--tm-row);
  --ui-elevated: var(--tm-panel);
  --ui-green: var(--tm-green);
  --ui-green-strong: var(--tm-green-strong);
  --ui-blue: var(--tm-blue);
  --ui-shadow-xs: var(--tm-shadow);
  --ui-shadow-sm: var(--tm-shadow);
  --ui-shadow-md: 0 2px 7px rgba(0, 0, 0, .16);
  --ui-radius-xs: 3px;
  --ui-radius-sm: 4px;
  --ui-radius-md: 4px;
  --ui-radius-lg: 5px;
  --ui-radius-xl: 6px;
}

html:not(.light) {
  --bg: #0e1928;
  --bg-2: #121f30;
  --surface: #18283b;
  --surface-2: #20334a;
  --surface-strong: #1b2c41;
  --text: #f1f4f7;
  --muted: #b4c0cd;
  --line: #3a4d63;
  --brand: #4d82b5;
  --brand-2: #5f88af;
  --accent: #75add2;
  --blue: #75add2;
  --gold: #e0ad3f;
  --danger: #e16b6b;
  --shadow: 0 1px 3px rgba(0, 0, 0, .34);
  --ui-canvas: #0e1928;
  --ui-canvas-2: #121f30;
  --ui-panel: #18283b;
  --ui-panel-solid: #18283b;
  --ui-soft: #20334a;
  --ui-elevated: #1b2c41;
  --ui-green: #4d82b5;
  --ui-green-strong: #174f85;
  --ui-blue: #75add2;
  --ui-shadow-xs: var(--shadow);
  --ui-shadow-sm: var(--shadow);
  --ui-shadow-md: 0 2px 7px rgba(0, 0, 0, .42);
  --ui-radius-xs: 3px;
  --ui-radius-sm: 4px;
  --ui-radius-md: 4px;
  --ui-radius-lg: 5px;
  --ui-radius-xl: 6px;
}

html,
body {
  background: var(--bg) !important;
}

body::before {
  background: var(--tm-green) !important;
}

body {
  color: var(--text);
  background-image: none !important;
  font-feature-settings: "tnum" 1;
}

::selection {
  color: #fff;
  background: var(--tm-blue);
}

a {
  color: var(--accent);
}

/* Header and navigation */
.topbar,
.auth-topbar,
.document-brandbar {
  border: 0 !important;
  border-bottom: 3px solid var(--tm-green) !important;
  border-radius: 0 !important;
  color: #fff;
  background: var(--tm-navy) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.topbar,
.auth-topbar {
  min-height: 64px;
  height: 64px;
}

.topbar .brand,
.auth-topbar .auth-brand,
.document-brandbar a {
  color: #fff;
}

.topbar .brand-logo,
.auth-brand-logo,
.document-brand-logo {
  padding: 3px 9px;
  border-radius: 3px;
  background: #fff;
}

html:not(.light) :where(.topbar .brand-logo, .auth-brand-logo, .document-brand-logo) {
  background: transparent !important;
}

.topbar .icon-btn,
.auth-topbar .icon-button,
.document-brandbar .icon-btn {
  border: 1px solid rgba(255, 255, 255, .3) !important;
  border-radius: 3px !important;
  color: #fff !important;
  background: rgba(255, 255, 255, .08) !important;
  box-shadow: none !important;
}

.topbar .icon-btn:hover,
.auth-topbar .icon-button:hover,
.document-brandbar .icon-btn:hover {
  border-color: #fff !important;
  background: rgba(255, 255, 255, .16) !important;
}

@media (min-width: 720px) {
  .bottom-nav {
    border: 0 !important;
    border-inline-start: 1px solid #0e2139 !important;
    border-radius: 0 !important;
    color: #fff;
    background: var(--tm-navy) !important;
    box-shadow: none !important;
  }

  .bottom-nav-brand {
    border-bottom: 1px solid rgba(255, 255, 255, .16) !important;
    border-radius: 0 !important;
    background: #fff !important;
  }

  .bottom-nav button:not(.bottom-nav-brand) {
    border: 0 !important;
    border-inline-start: 4px solid transparent !important;
    border-radius: 0 !important;
    color: #dce5ee !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .bottom-nav button:not(.bottom-nav-brand):hover {
    color: #fff !important;
    background: var(--tm-navy-soft) !important;
  }

  .bottom-nav button.active:not(.bottom-nav-brand) {
    border-inline-start-color: var(--tm-green) !important;
    color: #fff !important;
    background: var(--tm-navy-soft) !important;
  }

  .bottom-nav button svg {
    color: currentColor !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}

@media (max-width: 719px) {
  .bottom-nav {
    border: 0 !important;
    border-top: 3px solid var(--tm-green) !important;
    border-radius: 0 !important;
    color: #fff;
    background: var(--tm-navy) !important;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .2) !important;
  }

  .bottom-nav button {
    border: 0 !important;
    border-radius: 0 !important;
    color: #dce5ee !important;
    background: transparent !important;
  }

  .bottom-nav button.active {
    color: #fff !important;
    background: var(--tm-navy-soft) !important;
    box-shadow: inset 0 3px 0 var(--tm-green) !important;
  }
}

/* Canvas, panels and cards */
.content,
.auth-main,
.legal-shell,
.form-directory-shell {
  background: transparent !important;
}

.surface,
.admin-page,
.admin-command,
.profile-card,
.dossier-command-card,
.legal-page,
.auth-layout,
.form-directory-hero,
.form-directory-section,
.form-directory-note,
.mini-card,
.ad-card,
.ticket-card,
.role-form-card,
.dependent-role-group,
.owner-ad-management-card,
.expert-subscription-card,
.quick-search,
.search-panel,
.upload-slot,
.media-upload-panel,
.home-command-card,
.home-lane,
.live-test-card,
.metric,
.admin-analysis-panel,
.admin-toolbar,
.support-detail-fold,
.detail-sheet,
.app-dialog-panel {
  border: 1px solid var(--line) !important;
  border-radius: var(--tm-radius) !important;
  background: var(--surface) !important;
  box-shadow: var(--tm-shadow) !important;
  backdrop-filter: none !important;
}

.surface:hover,
.admin-page:hover,
.mini-card:hover,
.ad-card:hover,
.role-form-card:hover {
  border-color: var(--tm-border-dark) !important;
}

.section-head,
.admin-command-head,
.dossier-record-head,
.media-panel-head,
.profile-action-head {
  border-radius: 0 !important;
}

.section-kicker,
.support-eyebrow,
.auth-heading > div > p,
.chip,
.status-pill {
  border-radius: 3px !important;
  box-shadow: none !important;
}

.section-kicker,
.support-eyebrow,
.auth-heading > div > p {
  border: 0 !important;
  border-inline-start: 4px solid var(--tm-green) !important;
  color: var(--tm-navy-soft) !important;
  background: var(--tm-row) !important;
}

html:not(.light) .section-kicker,
html:not(.light) .support-eyebrow,
html:not(.light) .auth-heading > div > p {
  color: #dbe9f5 !important;
}

.section-head h2,
.section-head h3,
.admin-command h2,
.surface > h2,
.legal-page h1,
.auth-heading h1 {
  color: var(--text) !important;
  letter-spacing: 0 !important;
}

.title-with-icon > svg,
.title-with-icon > .lucide,
.section-head h2 > svg,
.dossier-section-icon,
.metric-icon,
.lane-icon,
.notification-icon,
.live-test-icon {
  border: 0 !important;
  border-radius: 3px !important;
  color: #fff !important;
  background: var(--tm-navy-soft) !important;
  box-shadow: none !important;
}

.metric {
  border-top: 4px solid var(--tm-navy-soft) !important;
  background: var(--surface) !important;
}

.metric-green {
  border-top-color: var(--tm-green) !important;
}

.metric-blue {
  border-top-color: var(--tm-blue) !important;
}

.metric-gold {
  border-top-color: var(--tm-warning) !important;
}

.metric strong {
  color: var(--tm-navy-soft) !important;
}

html:not(.light) .metric strong {
  color: #8fbbdc !important;
}

.home-lane,
.live-test-card,
.form-link-card,
.dependent-preview-card,
.role-tour-link {
  transition: border-color .15s ease, background-color .15s ease, color .15s ease !important;
}

.home-lane:hover,
.live-test-card:hover,
.form-link-card:hover,
.dependent-preview-card:hover,
.role-tour-link:hover {
  border-color: var(--tm-green) !important;
  background: var(--tm-green-soft) !important;
  transform: none !important;
  box-shadow: var(--tm-shadow) !important;
}

html:not(.light) .home-lane:hover,
html:not(.light) .live-test-card:hover,
html:not(.light) .form-link-card:hover,
html:not(.light) .dependent-preview-card:hover,
html:not(.light) .role-tour-link:hover {
  background: #243b2e !important;
}

/* Section title bars used throughout operational panels */
.admin-command,
.form-directory-hero {
  border-top: 4px solid var(--tm-green) !important;
}

.admin-daily-head,
.subscription-head,
.search-head {
  border-top: 4px solid var(--tm-navy-soft) !important;
}

.form-section-heading,
.review-subtitle,
.media-panel-head,
.admin-analysis-panel > h2,
.admin-analysis-panel > .section-head:first-child,
.support-detail-fold > summary,
.dependent-role-group > header,
.role-form-card > header {
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  color: var(--text) !important;
  background: var(--surface-2) !important;
  box-shadow: none !important;
}

.form-section-heading {
  border-inline-start: 5px solid var(--tm-navy-soft) !important;
}

/* Forms and uploads */
.form-grid,
.filter-grid,
.admin-filter-grid {
  align-items: start;
  gap: 14px !important;
}

input,
select,
textarea,
.vTextField {
  border: 1px solid var(--tm-border-dark) !important;
  border-radius: 3px !important;
  color: var(--text) !important;
  background: var(--surface) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05) !important;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--tm-blue) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--tm-blue) !important;
  outline: 2px solid color-mix(in srgb, var(--tm-blue) 22%, transparent) !important;
  outline-offset: 0 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04) !important;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 80%, transparent) !important;
}

.upload-slot {
  border-style: dashed !important;
  background: var(--surface-2) !important;
}

.upload-slot:hover,
.upload-slot:focus-within {
  border-color: var(--tm-blue) !important;
}

.upload-slot.uploaded {
  border-color: var(--tm-green) !important;
  background: var(--tm-green-soft) !important;
}

.file-input::file-selector-button,
input[type="file"]::file-selector-button {
  border: 1px solid var(--tm-navy-soft);
  border-radius: 3px;
  color: #fff;
  background: var(--tm-navy-soft);
}

.form-completion-notice,
.ad-eligibility-notice,
.profile-phone-pending,
.inactive-account-notice {
  border: 1px solid var(--line) !important;
  border-inline-start: 5px solid var(--tm-blue) !important;
  border-radius: 3px !important;
  color: var(--text) !important;
  background: var(--surface-2) !important;
  box-shadow: none !important;
}

/* Buttons: blue secondary, green primary, simple rectangular controls */
.primary-btn,
.primary-button,
.kickoff-button,
button[type="submit"].primary-btn {
  border: 1px solid var(--tm-green-strong) !important;
  border-radius: 3px !important;
  color: #fff !important;
  background: var(--tm-green) !important;
  background-image: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2) !important;
}

.primary-btn:hover,
.primary-button:hover,
.kickoff-button:hover {
  border-color: #3f7a1b !important;
  background: var(--tm-green-strong) !important;
  transform: none !important;
}

.ghost-btn,
.text-btn,
.text-button,
.icon-btn,
.icon-button,
.role-form-actions a,
.role-tour-link,
.auth-links a {
  border: 1px solid var(--tm-border-dark) !important;
  border-radius: 3px !important;
  color: var(--tm-link) !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

.ghost-btn:hover,
.text-btn:hover,
.text-button:hover,
.role-form-actions a:hover,
.role-tour-link:hover,
.auth-links a:hover {
  border-color: var(--tm-blue) !important;
  color: var(--tm-navy-soft) !important;
  background: var(--surface-2) !important;
  transform: none !important;
}

.danger,
.ghost-btn.danger,
.danger-btn {
  border-color: color-mix(in srgb, var(--danger) 60%, var(--line)) !important;
  color: var(--danger) !important;
}

button:disabled,
.primary-btn:disabled,
.ghost-btn:disabled {
  opacity: .56;
  filter: grayscale(.25);
}

/* Tabs, filters and status labels */
.segmented,
.panel-tabs,
.auth-tabs,
.category-tabs {
  gap: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 3px !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

.segmented button,
.panel-tabs button,
.auth-tabs button,
.category-tabs button {
  border: 0 !important;
  border-inline-end: 1px solid var(--line) !important;
  border-radius: 0 !important;
  color: var(--text) !important;
  background: var(--surface-2) !important;
  box-shadow: none !important;
}

.segmented button:last-child,
.panel-tabs button:last-child,
.auth-tabs button:last-child,
.category-tabs button:last-child {
  border-inline-end: 0 !important;
}

.segmented button.active,
.panel-tabs button.active,
.auth-tabs button.active,
.category-tabs button.active {
  color: #fff !important;
  background: var(--tm-navy-soft) !important;
  box-shadow: inset 0 -3px 0 var(--tm-green) !important;
}

.chip,
.status-pill {
  border: 1px solid var(--line) !important;
  color: var(--tm-navy-soft) !important;
  background: var(--surface-2) !important;
}

html:not(.light) .chip,
html:not(.light) .status-pill {
  color: #d7e6f4 !important;
}

[data-status="published"],
[data-status="approved"],
[data-status="completed"],
.status-success,
.is-done {
  border-color: color-mix(in srgb, var(--tm-green) 55%, var(--line)) !important;
}

[data-status="rejected"],
[data-status="failed"],
[data-status="taken_by_gm"],
.status-danger {
  border-color: color-mix(in srgb, var(--danger) 58%, var(--line)) !important;
}

/* Tables and dense operational data */
.table-wrap,
.admin-table-wrap {
  border: 1px solid var(--line) !important;
  border-radius: 3px !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

table {
  border-collapse: collapse !important;
  background: var(--surface) !important;
}

thead,
thead tr,
th {
  color: #fff !important;
  background: var(--tm-navy-soft) !important;
}

th,
td {
  border: 1px solid var(--line) !important;
  border-width: 0 0 1px 1px !important;
}

tbody tr:nth-child(even) td {
  background: var(--surface-2) !important;
}

tbody tr:hover td {
  background: color-mix(in srgb, var(--tm-green) 9%, var(--surface)) !important;
}

.admin-bars > div,
.progress-track,
.upload-progress-track {
  border-radius: 2px !important;
  background: var(--tm-row-alt) !important;
}

.admin-bars i,
.progress-fill,
.upload-progress-fill {
  border-radius: 2px !important;
  background: var(--tm-green) !important;
}

/* Home and talent cards */
.hero {
  border: 1px solid var(--line) !important;
  border-radius: 4px !important;
  background: var(--surface) !important;
  box-shadow: var(--tm-shadow) !important;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(255,255,255,.12), rgba(255,255,255,.90) 66%, rgba(255,255,255,.96)) !important;
}

html:not(.light) .hero-shade {
  background:
    linear-gradient(90deg, rgba(10,22,38,.12), rgba(10,22,38,.86) 66%, rgba(10,22,38,.96)) !important;
}

.hero-content h1 {
  color: var(--tm-navy) !important;
}

html:not(.light) .hero-content h1 {
  color: #fff !important;
}

.hero .eyebrow {
  padding: 5px 10px;
  border-inline-start: 4px solid var(--tm-green);
  border-radius: 0;
  color: var(--tm-navy) !important;
  background: rgba(255,255,255,.88);
}

.kickoff-cta {
  border: 1px solid var(--tm-navy) !important;
  border-radius: 4px !important;
  box-shadow: var(--tm-shadow) !important;
}

.kickoff-copy > strong {
  color: #fff !important;
  background: var(--tm-navy) !important;
  border-inline-start: 5px solid var(--tm-green);
  border-radius: 2px !important;
}

.ad-card,
.owner-ad-management-card,
.expert-subscription-card,
.ticket-card,
.notification-card {
  border-inline-start: 4px solid var(--tm-navy-soft) !important;
}

.ad-card:hover,
.owner-ad-management-card:hover,
.expert-subscription-card:hover,
.ticket-card:hover,
.notification-card:hover {
  border-inline-start-color: var(--tm-green) !important;
}

/* Auth, documents and preview directory */
.auth-main,
.site-document-page,
.form-directory-page {
  background: var(--tm-canvas) !important;
}

html:not(.light) .auth-main,
html:not(.light) .site-document-page,
html:not(.light) .form-directory-page {
  background: var(--bg) !important;
}

.auth-layout,
.legal-page,
.form-directory-hero,
.form-directory-section {
  border-top: 4px solid var(--tm-navy-soft) !important;
}

.auth-heading {
  border-bottom: 1px solid var(--line);
}

.auth-heading-icon {
  border-radius: 3px !important;
  color: #fff !important;
  background: var(--tm-navy-soft) !important;
  box-shadow: none !important;
}

.debug-otp {
  border: 2px dashed var(--tm-green) !important;
  border-radius: 3px !important;
  color: var(--tm-green-strong) !important;
  background: var(--tm-green-soft) !important;
}

.form-directory-hero {
  color: #fff !important;
  background: var(--tm-navy) !important;
}

.form-directory-hero h1,
.form-directory-hero p,
.form-directory-hero .section-kicker {
  color: #fff !important;
}

.form-directory-hero .section-kicker {
  background: rgba(255,255,255,.1) !important;
}

.about-value-card,
.admin-decision-box,
.expert-review-result {
  border: 1px solid var(--line) !important;
  border-radius: 3px !important;
  background: var(--surface-2) !important;
  box-shadow: none !important;
}

/* Dialogs, messages and footer */
.app-dialog-backdrop,
.detail-sheet-backdrop {
  background: rgba(8, 20, 36, .68) !important;
  backdrop-filter: none !important;
}

.toast,
.auth-toast {
  border: 1px solid var(--tm-border-dark) !important;
  border-inline-start: 5px solid var(--tm-green) !important;
  border-radius: 3px !important;
  color: var(--text) !important;
  background: var(--surface) !important;
  box-shadow: 0 3px 12px rgba(0,0,0,.22) !important;
}

.site-footer {
  border: 0 !important;
  border-top: 4px solid var(--tm-green) !important;
  color: #c9d3dd !important;
  background: var(--tm-navy) !important;
}

.site-footer a,
.site-footer-links a,
.site-footer-copy a {
  color: #fff !important;
}

.site-footer-links a {
  border: 1px solid rgba(255,255,255,.24) !important;
  border-radius: 3px !important;
  background: rgba(255,255,255,.06) !important;
}

.site-footer-copy {
  border-top-color: rgba(255,255,255,.18) !important;
  color: #c9d3dd !important;
}

/* Keep dense data readable on narrow screens. */
@media (max-width: 719px) {
  .topbar,
  .auth-topbar {
    min-height: 58px;
    height: 58px;
  }

  .surface,
  .admin-page,
  .profile-card,
  .dossier-command-card,
  .auth-layout,
  .legal-page,
  .form-directory-section {
    border-radius: 3px !important;
  }

  .metric-row {
    gap: 8px !important;
  }

  .metric {
    min-height: 72px !important;
  }

  .hero,
  .kickoff-cta {
    border-radius: 3px !important;
  }

  .panel-tabs button,
  .segmented button {
    min-width: 118px;
  }

  .table-wrap,
  .admin-table-wrap {
    border-inline: 0 !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .primary-btn,
  .primary-button,
  .ghost-btn,
  .text-btn,
  .home-lane,
  .ad-card,
  .mini-card {
    transition-duration: .15s !important;
  }
}

/* --------------------------------------------------------------------------
 * Transfermarkt-style full interface redesign
 * --------------------------------------------------------------------------
 * This layer intentionally changes composition and information density, not
 * only colour. Product flows, permissions and element identifiers stay intact.
 */

:root {
  --tm-content: 1180px;
  --tm-column-gap: 14px;
  --tm-section-space: 14px;
  --tm-control-height: 42px;
  --tm-header-height: 64px;
  --tm-nav-height: 48px;
}

body {
  font-size: 14px;
  line-height: 1.65;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 36px !important;
  overflow: visible !important;
}

.topbar {
  width: 100% !important;
  padding: 0 !important;
}

.topbar-inner {
  width: min(calc(100% - 28px), var(--tm-content));
  min-width: 0;
  min-height: var(--tm-header-height);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.topbar {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  background: linear-gradient(105deg, var(--tm-navy-strong), var(--tm-navy) 58%, #0b315f) !important;
  box-shadow: 0 2px 10px rgba(8, 22, 39, .2) !important;
}

.topbar .brand {
  min-width: 154px;
  margin: 0 !important;
  justify-self: start;
  justify-content: flex-start;
}

.topbar .brand-logo {
  width: 150px;
  height: 52px;
  padding: 2px 8px;
}

.topbar-actions {
  display: flex;
  justify-self: end;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.topbar-account {
  min-height: 40px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, .3) !important;
  border-radius: 999px !important;
  color: #fff;
  background: transparent !important;
  font-weight: 700;
}

.topbar .icon-btn {
  border-radius: 50% !important;
}

.topbar-account:hover {
  border-color: #fff !important;
  background: rgba(255, 255, 255, .1) !important;
}

.topbar-account svg {
  width: 19px;
  height: 19px;
}

.hero,
.content,
.user-journey-status {
  width: min(calc(100% - 28px), var(--tm-content)) !important;
  margin-inline: auto !important;
}

.content {
  padding: 0 !important;
  margin-block: var(--tm-section-space) !important;
}

.content > * + * {
  margin-top: var(--tm-section-space) !important;
}

.user-journey-status {
  margin-top: 12px !important;
  min-height: 58px;
  border-radius: 3px !important;
  box-shadow: var(--tm-shadow) !important;
}

/* The public landing page follows the compact portal composition: one lead
   story, quick figures and small navigation modules. */
.hero {
  min-height: 330px !important;
  max-height: 390px;
  margin-top: 14px !important;
  overflow: hidden;
  isolation: isolate;
}

.hero-img {
  object-position: center 55% !important;
}

.hero-shade {
  background: linear-gradient(90deg, rgba(255,255,255,.03) 0 42%, rgba(255,255,255,.86) 66%, rgba(255,255,255,.98) 100%) !important;
}

html:not(.light) .hero-shade {
  background: linear-gradient(90deg, rgba(9,20,35,.1) 0 42%, rgba(9,20,35,.84) 68%, rgba(9,20,35,.97) 100%) !important;
}

.hero-content {
  width: min(49%, 540px) !important;
  min-height: 100%;
  margin-inline-start: auto !important;
  padding: clamp(28px, 4vw, 54px) !important;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: center;
  text-align: right !important;
}

.hero-content h1 {
  margin: 10px 0 8px !important;
  font-size: clamp(2.3rem, 5vw, 4.25rem) !important;
  line-height: 1.16;
  font-weight: 900;
  overflow: visible;
}

.hero-copy {
  max-width: 520px;
  margin: 0 !important;
  color: var(--text) !important;
  font-size: clamp(.95rem, 1.35vw, 1.12rem) !important;
  font-weight: 600;
  line-height: 2;
}

.hero-actions {
  margin-top: 20px !important;
}

.hero-actions .ghost-btn {
  border-color: var(--tm-navy-soft) !important;
  color: #fff !important;
  background: var(--tm-navy-soft) !important;
}

[data-view="home"].content {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: start;
  gap: var(--tm-column-gap);
}

[data-view="home"].content > * {
  min-width: 0;
  margin-top: 0 !important;
}

[data-view="home"].content:has(> .home-quick-actions.hidden) {
  grid-template-columns: minmax(0, 1fr) !important;
}

[data-view="home"].content:has(> .home-quick-actions.hidden) > .metric-row,
[data-view="home"].content:has(> .home-quick-actions.hidden) > .home-live-tests {
  grid-column: 1 !important;
  grid-row: auto !important;
}

[data-view="home"].content:has(> .home-quick-actions.hidden) > .metric-row {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.home-command {
  grid-column: 1 / -1;
}

[data-view="home"] .home-quick-actions {
  grid-column: 1;
}

[data-view="home"] .metric-row {
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: 1fr !important;
}

[data-view="home"] .home-live-tests {
  grid-column: 2;
  border: 1px solid var(--line);
  border-top: 4px solid var(--tm-navy-soft);
  border-radius: 3px;
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--tm-shadow);
}

.home-command-card,
.kickoff-cta {
  min-height: 270px;
}

.home-lanes {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.home-quick-actions {
  border: 1px solid var(--line);
  border-top: 4px solid var(--tm-navy-soft);
  border-radius: 3px;
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--tm-shadow);
}

.home-lane,
.live-test-card {
  min-height: 76px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 2px !important;
  background: var(--surface-2) !important;
  box-shadow: none !important;
}

.home-lane .lane-icon,
.live-test-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 2px !important;
  color: #fff !important;
  background: var(--tm-navy-soft) !important;
}

/* A Transfermarkt page is built from small, named data modules. */
.surface,
.admin-page,
.profile-card,
.dossier-command-card,
.search-workbench,
.admin-command,
.admin-analysis-panel {
  overflow: hidden;
}

.section-head,
.search-head,
.admin-command,
.admin-command-head,
.profile-action-head,
.dossier-record-head,
.media-panel-head {
  min-height: 54px;
  padding: 10px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-inline-start: 5px solid var(--tm-green) !important;
  background: var(--surface-2) !important;
  box-shadow: none !important;
}

.section-head.compact {
  min-height: 48px;
}

.section-head h2,
.section-head h3,
.search-head h2,
.admin-command h2,
.dossier-record-head h2 {
  margin: 0 !important;
  font-size: clamp(1rem, 1.6vw, 1.25rem) !important;
  line-height: 1.45;
}

.section-head p,
.search-head p,
.admin-command p,
.dossier-record-head p {
  margin: 2px 0 0 !important;
}

.section-kicker {
  width: max-content;
  margin: 0 0 4px !important;
  padding: 2px 7px !important;
  font-size: 10px !important;
  font-weight: 800;
}

.surface > .section-head:first-child,
.surface > h2:first-child {
  margin: -1px -1px 14px !important;
}

.stack {
  gap: 10px !important;
}

.mini-card,
.admin-record-card,
.notification-card,
.ticket-card,
.owner-ad-management-card,
.expert-subscription-card {
  padding: 12px !important;
  border-radius: 2px !important;
  box-shadow: none !important;
}

.mini-card:hover,
.admin-record-card:hover,
.notification-card:hover,
.ticket-card:hover,
.owner-ad-management-card:hover,
.expert-subscription-card:hover {
  border-color: var(--tm-blue) !important;
  transform: none !important;
}

.metric-row {
  gap: 8px !important;
}

.metric {
  min-height: 82px !important;
  padding: 12px !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px !important;
}

.metric-icon {
  width: 40px !important;
  height: 40px !important;
}

.metric strong {
  font-size: 1.5rem !important;
  line-height: 1.2;
}

.metric span {
  font-size: 12px;
}

/* Search behaves like a football database: category rail, compact filters,
   then a dense responsive player grid. */
.search-workbench {
  border: 1px solid var(--line);
  border-top: 4px solid var(--tm-navy-soft);
  border-radius: 3px;
  background: var(--surface);
  box-shadow: var(--tm-shadow);
}

.search-head {
  margin: 0 !important;
}

.category-grid {
  padding: 12px !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  border-bottom: 1px solid var(--line);
}

.category-tile {
  min-height: 94px !important;
  padding: 10px !important;
  border: 1px solid var(--line) !important;
  border-radius: 2px !important;
  background: var(--surface-2) !important;
  box-shadow: none !important;
}

.category-tile.active {
  border-color: var(--tm-navy-soft) !important;
  color: #fff !important;
  background: var(--tm-navy-soft) !important;
  box-shadow: inset 0 -4px 0 var(--tm-green) !important;
}

.category-tile.active span,
.category-tile.active strong,
.category-tile.active svg {
  color: #fff !important;
}

.search-panel {
  margin: 12px !important;
  padding: 14px !important;
  border-radius: 2px !important;
  box-shadow: none !important;
}

.search-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 230px) !important;
  gap: 8px !important;
}

.filter-section {
  margin-top: 12px !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--line) !important;
}

.filter-title {
  margin-bottom: 8px !important;
  color: var(--tm-navy-soft) !important;
  font-weight: 900;
}

.filter-grid {
  gap: 8px !important;
}

.advanced-filters {
  margin-block: 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 2px !important;
  background: var(--surface) !important;
}

.advanced-filters > summary {
  min-height: 46px;
  padding: 8px 12px !important;
  background: var(--surface-2) !important;
}

.ad-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px !important;
}

.ad-card {
  display: grid !important;
  grid-template-columns: 150px minmax(0, 1fr) !important;
  min-height: 250px;
  overflow: hidden;
  border-inline-start: 0 !important;
  border-top: 4px solid var(--tm-navy-soft) !important;
  border-radius: 3px !important;
}

.ad-card-visual {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  min-height: 0 !important;
  align-self: start !important;
  border-radius: 0 !important;
  background: linear-gradient(180deg, var(--tm-navy-soft), var(--tm-navy)) !important;
}

.ad-card-avatar {
  border: 3px solid #fff !important;
  border-radius: 2px !important;
}

.ad-card-content {
  padding: 12px !important;
}

.ad-card-heading {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.ad-card-facts {
  gap: 4px !important;
}

.ad-card-fact {
  padding: 6px !important;
  border: 1px solid var(--line);
  border-radius: 2px !important;
  background: var(--surface-2) !important;
}

.ad-card-bottom,
.ad-card-actions {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* Forms are arranged as data-entry sheets, with explicit section bars and
   aligned controls instead of floating promotional cards. */
[data-view="post"] > .surface,
#profileDetailsBox,
#documentsBox,
.profile-action-surface,
[data-view="support"] > .surface,
[data-view="orders"] > .surface,
[data-view="notifications"] > .surface,
[data-view="expert-subscription"] > .surface {
  border-top: 4px solid var(--tm-navy-soft) !important;
}

.form-grid {
  padding: 14px !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px 12px !important;
}

.form-grid > label,
.filter-field,
.admin-edit-field,
.auth-field {
  min-width: 0;
  align-content: start;
  gap: 5px !important;
}

.form-grid > label > span:first-child,
.filter-field > span:first-child,
.admin-edit-field > span:first-child,
.auth-field > span:first-child {
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

:where(.form-grid, .filter-grid, .admin-filter-grid, .admin-user-filters, .admin-user-edit, .auth-form)
  :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-height: var(--tm-control-height) !important;
  padding: 8px 10px !important;
  border-radius: 2px !important;
}

.form-section-heading {
  min-height: 54px !important;
  margin: 8px -14px 2px !important;
  padding: 9px 14px !important;
  border-inline-start: 5px solid var(--tm-green) !important;
}

.form-section-heading > span {
  width: 34px !important;
  height: 34px !important;
  border-radius: 2px !important;
  color: #fff !important;
  background: var(--tm-navy-soft) !important;
}

.form-completion-notice {
  margin: 0 0 4px !important;
}

.upload-slot,
.media-upload-panel {
  min-height: 116px;
  padding: 12px !important;
  border-radius: 2px !important;
  background: var(--surface-2) !important;
}

.upload-head {
  min-height: 42px;
}

.upload-icon {
  border-radius: 2px !important;
  color: #fff !important;
  background: var(--tm-navy-soft) !important;
}

.file-input::file-selector-button,
input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-inline-end: 8px;
  padding: 4px 10px;
}

/* Profile pages mirror a data profile: navy identity header and white fact
   modules beneath it. */
.profile-card {
  min-height: 132px;
  padding: 18px !important;
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px !important;
  border: 0 !important;
  border-bottom: 5px solid var(--tm-green) !important;
  color: #fff !important;
  background: linear-gradient(115deg, var(--tm-navy), var(--tm-navy-soft)) !important;
  box-shadow: var(--tm-shadow) !important;
}

.profile-card h2,
.profile-card p,
.profile-card span,
.profile-card strong {
  color: #fff !important;
}

.profile-card .avatar {
  border: 4px solid #fff !important;
  border-radius: 2px !important;
  background: var(--tm-panel) !important;
}

.profile-primary {
  display: grid !important;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) !important;
  align-items: start;
  gap: var(--tm-column-gap) !important;
}

.profile-primary > #profileAvatarBox {
  grid-column: 1;
  grid-row: 1;
}

.profile-primary > #profileDetailsBox {
  grid-column: 2;
  grid-row: 1 / span 3;
}

.profile-primary > #documentsBox {
  grid-column: 1;
  grid-row: 2;
}

.profile-primary > .profile-review-actions {
  grid-column: 1;
  grid-row: 3;
}

#documentsBox .documents-upload-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

#documentsBox .documents-upload-grid .upload-slot-wide {
  grid-column: auto !important;
}

#documentsBox .media-upload-panel {
  padding: 10px !important;
}

#documentsBox .media-panel-head {
  margin: -10px -10px 10px !important;
}

#documentsBox .upload-slot {
  min-height: 132px;
}

#documentsBox .upload-head > div {
  min-width: 0;
}

#documentsBox .upload-head strong,
#documentsBox .upload-head span,
#documentsBox .upload-slot small {
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.approved-profile-fields,
.detail-grid,
.detail-stats {
  gap: 0 !important;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.approved-profile-fields > *,
.detail-grid > *,
.detail-stats > * {
  min-height: 58px;
  padding: 9px 10px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-inline-end: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: var(--surface) !important;
}

.approved-profile-fields > *:nth-child(even),
.detail-grid > *:nth-child(even),
.detail-stats > *:nth-child(even) {
  background: var(--surface-2) !important;
}

/* Management consoles use a compact tab rail and database-like result boxes. */
.admin-workspace {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: 10px !important;
}

.admin-workspace > .admin-command,
.admin-workspace > .admin-metrics {
  grid-column: 1 / -1;
}

.admin-workspace > .panel-tabs {
  grid-column: 1;
  grid-row: 3 / span 2;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-auto-flow: row !important;
  grid-auto-columns: auto !important;
  position: sticky;
  top: calc(var(--tm-header-height) + var(--tm-nav-height) + 12px);
  align-self: start;
  overflow: hidden !important;
}

.admin-workspace > .panel-tabs button {
  min-width: 0 !important;
  min-height: 62px !important;
  padding: 8px 10px !important;
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) !important;
  grid-template-rows: auto auto;
  gap: 1px 8px !important;
  text-align: right;
  border-inline-end: 0 !important;
  border-bottom: 1px solid var(--line) !important;
}

.admin-workspace > .panel-tabs button svg {
  grid-row: 1 / 3;
  align-self: center;
}

.admin-workspace > .panel-tabs button span,
.admin-workspace > .panel-tabs button small {
  text-align: right !important;
}

.admin-workspace > .panel-tabs button.active {
  border-inline-start: 5px solid var(--tm-green) !important;
  box-shadow: none !important;
}

.admin-workspace > #adminQueues,
.admin-workspace > #adminList {
  grid-column: 2;
  min-width: 0;
}

.admin-workspace > .admin-command {
  grid-row: 1;
}

.admin-workspace > .admin-metrics {
  grid-row: 2;
}

.admin-workspace > #adminQueues {
  grid-row: 3;
}

.admin-workspace > #adminList {
  grid-row: 4;
}

.admin-workspace > #adminList {
  margin-top: 0 !important;
}

.admin-command {
  min-height: 98px;
  padding: 16px !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  border-top: 5px solid var(--tm-green) !important;
  border-inline-start: 0 !important;
  background: var(--tm-navy) !important;
}

.admin-command h2,
.admin-command p,
.admin-command .section-kicker {
  color: #fff !important;
}

.admin-command .section-kicker {
  border-inline-start-color: var(--tm-green) !important;
  background: rgba(255,255,255,.1) !important;
}

.admin-command-actions {
  align-items: center;
}

.admin-role-chip {
  border-color: rgba(255,255,255,.3) !important;
  color: #fff !important;
  background: rgba(255,255,255,.09) !important;
}

.admin-command .text-btn {
  border-color: rgba(255,255,255,.3) !important;
  color: #fff !important;
  background: rgba(255,255,255,.08) !important;
}

.admin-page,
.admin-analysis-panel,
.admin-hub-card,
.dossier-command-card {
  border-radius: 2px !important;
  box-shadow: none !important;
}

.admin-hub-grid,
.admin-record-list,
.admin-detail-columns {
  gap: 8px !important;
}

.admin-hub-card {
  min-height: 118px;
  padding: 12px !important;
  border: 1px solid var(--line) !important;
  border-top: 4px solid var(--tm-navy-soft) !important;
  background: var(--surface) !important;
}

.admin-hub-card:hover {
  border-top-color: var(--tm-green) !important;
  transform: none !important;
}

.admin-toolbar,
.admin-user-filters,
.admin-filter-grid {
  padding: 10px !important;
  border-radius: 2px !important;
  background: var(--surface-2) !important;
}

/* Tables closely match football database tables: navy headers, zebra rows,
   fixed borders and compact controls. */
.table-wrap,
.admin-table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  font-size: 12px;
}

th {
  height: 38px;
  padding: 7px 9px !important;
  font-weight: 800 !important;
  white-space: nowrap;
}

td {
  min-height: 42px;
  padding: 8px 9px !important;
  vertical-align: middle !important;
}

td .primary-btn,
td .ghost-btn,
td .text-btn {
  min-height: 34px !important;
  padding: 4px 8px !important;
}

/* Authentication and document pages use the same portal shell. */
.auth-topbar,
.document-brandbar {
  min-height: var(--tm-header-height) !important;
}

.auth-brand,
.document-brandbar .brand {
  width: min(calc(100% - 28px), var(--tm-content));
  margin-inline: auto;
}

.auth-topbar {
  padding-inline: max(14px, calc((100% - var(--tm-content)) / 2)) !important;
}

.auth-topbar .auth-brand {
  width: auto;
  margin: 0;
}

.auth-main {
  width: min(calc(100% - 28px), 940px) !important;
  margin-inline: auto !important;
  padding-block: 28px !important;
}

.auth-layout {
  min-height: 520px;
  border-top: 5px solid var(--tm-navy-soft) !important;
}

.auth-form-side {
  max-width: 620px;
  margin-inline: auto;
  padding: clamp(22px, 4vw, 42px) !important;
}

.auth-heading {
  padding-bottom: 16px !important;
  margin-bottom: 18px !important;
}

.auth-heading-icon {
  width: 52px !important;
  height: 52px !important;
}

.auth-form {
  gap: 12px !important;
}

.legal-shell,
.form-directory-shell {
  width: min(calc(100% - 28px), var(--tm-content)) !important;
  margin-inline: auto !important;
}

.legal-page,
.form-directory-section,
.form-directory-hero {
  border-radius: 3px !important;
}

.legal-page,
.form-directory-section {
  border-top: 4px solid var(--tm-navy-soft) !important;
}

.role-form-grid,
.form-link-grid,
.dependent-preview-grid {
  gap: 8px !important;
}

.role-form-card,
.form-link-card,
.dependent-preview-card {
  border-radius: 2px !important;
  box-shadow: none !important;
}

.site-footer {
  margin-top: 34px !important;
}

.site-footer-main,
.site-footer-copy {
  width: min(calc(100% - 28px), var(--tm-content));
  margin-inline: auto;
}

/* Desktop navigation becomes the compact horizontal topic bar used by a
   modern football portal. It stays visible while the data area scrolls. */
@media (min-width: 720px) {
  body.has-app-nav .app-shell,
  body.has-app-nav .site-footer {
    padding-inline: 0 !important;
  }

  .topbar {
    position: sticky !important;
    top: 0;
    z-index: 50;
  }

  .bottom-nav {
    position: sticky !important;
    inset: auto !important;
    top: var(--tm-header-height) !important;
    z-index: 45;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    min-height: var(--tm-nav-height) !important;
    padding: 0 max(14px, calc((100% - var(--tm-content)) / 2)) !important;
    display: flex !important;
    align-items: stretch;
    gap: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #0e2139 !important;
    background: var(--tm-navy-soft) !important;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .bottom-nav-brand {
    display: none !important;
  }

  .bottom-nav button:not(.bottom-nav-brand) {
    width: auto !important;
    min-width: max-content !important;
    min-height: var(--tm-nav-height) !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    grid-template: none !important;
    align-items: center;
    justify-content: center;
    gap: 7px !important;
    border: 0 !important;
    border-inline-start: 1px solid rgba(255,255,255,.1) !important;
    border-radius: 0 !important;
  }

  .bottom-nav button:last-child {
    border-inline-end: 1px solid rgba(255,255,255,.1) !important;
  }

  .bottom-nav button svg {
    width: 17px !important;
    height: 17px !important;
  }

  .bottom-nav button small {
    font-size: 12px !important;
    font-weight: 700;
    white-space: nowrap;
  }

  .bottom-nav button.active:not(.bottom-nav-brand) {
    border-inline-start-color: rgba(255,255,255,.1) !important;
    background: var(--tm-navy) !important;
    box-shadow: inset 0 -4px 0 var(--tm-green) !important;
  }
}

@media (min-width: 720px) and (max-width: 1023px) {
  .topbar-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .topbar-account span {
    display: none;
  }

  .topbar-account {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

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

  .ad-list {
    grid-template-columns: 1fr;
  }

  .admin-workspace {
    grid-template-columns: 190px minmax(0, 1fr);
  }
}

@media (max-width: 719px) {
  :root {
    --tm-header-height: 58px;
  }

  .app-shell {
    padding-bottom: calc(82px + env(safe-area-inset-bottom)) !important;
  }

  .topbar-inner {
    width: calc(100% - 16px);
    min-height: var(--tm-header-height);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .topbar .brand {
    min-width: 0;
  }

  .topbar .brand-logo {
    width: 128px;
    height: 48px;
  }

  .topbar-account {
    display: none !important;
  }

  .hero,
  .content,
  .user-journey-status,
  .legal-shell,
  .form-directory-shell {
    width: calc(100% - 16px) !important;
  }

  .hero {
    min-height: 340px !important;
    max-height: none;
    margin-top: 8px !important;
  }

  .hero-img {
    object-position: 32% center !important;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.72) 52%, rgba(255,255,255,.98) 100%) !important;
  }

  html:not(.light) .hero-shade {
    background: linear-gradient(180deg, rgba(9,20,35,.06), rgba(9,20,35,.64) 52%, rgba(9,20,35,.97) 100%) !important;
  }

  .hero-content {
    width: 100% !important;
    min-height: 340px;
    padding: 20px !important;
    justify-content: flex-end;
  }

  .hero-content h1 {
    font-size: clamp(2.15rem, 13vw, 3.25rem) !important;
  }

  .hero-copy {
    max-width: 100%;
    font-size: .92rem !important;
  }

  [data-view="home"].content,
  .admin-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  [data-view="home"].content > *,
  .admin-workspace > * {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  [data-view="home"] .metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .metric {
    min-height: 78px !important;
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 9px !important;
  }

  .metric-icon {
    width: 34px !important;
    height: 34px !important;
  }

  .metric strong {
    font-size: 1.25rem !important;
  }

  .home-lanes,
  .category-grid,
  .ad-list,
  .form-grid,
  .profile-primary,
  .search-toolbar {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .home-quick-actions,
  [data-view="home"] .home-live-tests {
    padding: 10px;
  }

  .home-command-card,
  .kickoff-cta {
    min-height: 250px;
  }

  .category-grid {
    padding: 8px !important;
  }

  .category-tile {
    min-height: 68px !important;
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    grid-template-rows: auto auto;
    text-align: right !important;
  }

  .category-icon {
    grid-row: 1 / 3;
  }

  .search-panel {
    margin: 8px !important;
    padding: 10px !important;
  }

  .ad-card {
    grid-template-columns: 108px minmax(0, 1fr) !important;
    min-height: 230px;
  }

  .ad-card-visual {
    min-width: 0;
  }

  .form-grid {
    padding: 10px !important;
  }

  .form-section-heading {
    margin-inline: -10px !important;
  }

  .profile-card {
    min-height: 112px;
    padding: 12px !important;
    grid-template-columns: 68px minmax(0, 1fr) !important;
  }

  .profile-primary > #profileAvatarBox,
  .profile-primary > #profileDetailsBox,
  .profile-primary > #documentsBox,
  .profile-primary > .profile-review-actions {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .profile-card .avatar {
    width: 68px !important;
    height: 68px !important;
  }

  .admin-workspace > .panel-tabs {
    position: static;
    display: flex !important;
    overflow-x: auto !important;
  }

  .admin-workspace > .panel-tabs button {
    min-width: 132px !important;
    border-inline-start: 0 !important;
  }

  .admin-workspace > .panel-tabs button.active {
    border-inline-start: 0 !important;
    box-shadow: inset 0 -4px 0 var(--tm-green) !important;
  }

  .admin-command {
    align-items: flex-start;
  }

  .admin-command-actions {
    width: 100%;
    justify-content: space-between;
  }

  .bottom-nav {
    right: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 66px;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom)) !important;
    display: flex !important;
    grid-template-columns: none !important;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .bottom-nav-brand {
    display: none !important;
  }

  .bottom-nav button:not(.bottom-nav-brand) {
    flex: 0 0 72px;
    min-width: 72px !important;
    min-height: 58px !important;
    padding: 5px 4px !important;
    display: grid !important;
    place-items: center;
    gap: 2px !important;
  }

  .bottom-nav button svg {
    width: 20px !important;
    height: 20px !important;
  }

  .bottom-nav button small {
    font-size: 10px !important;
    white-space: nowrap;
  }

  .auth-main {
    width: calc(100% - 16px) !important;
    padding-block: 14px !important;
  }

  .auth-form-side {
    padding: 18px 14px !important;
  }

  .auth-heading {
    grid-template-columns: 46px minmax(0, 1fr) !important;
  }

  .auth-heading-icon {
    width: 46px !important;
    height: 46px !important;
  }

  .site-footer-main,
  .site-footer-copy {
    width: calc(100% - 28px);
  }
}

@media (max-width: 389px) {
  .ad-card {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  [data-view="home"] .metric-row {
    grid-template-columns: 1fr !important;
  }

  .topbar .brand-logo {
    width: 116px;
  }
}

/* --------------------------------------------------------------------------
 * Responsive layout stabilisation
 * --------------------------------------------------------------------------
 * Earlier interface layers deliberately default every form child to column
 * one for phones.  Once the database layout grows to two columns that rule
 * must be released, otherwise desktop forms occupy only their right half.
 */

:where(.surface, .admin-page, .search-workbench, .profile-card, .auth-layout,
  .legal-page, .form-directory-section) {
  min-width: 0;
}

:where(.section-head, .search-head, .admin-command-head, .profile-action-head,
  .media-panel-head) > * {
  min-width: 0;
}

:where(.section-head, .search-head, .admin-command-head, .profile-action-head,
  .media-panel-head) :where(h1, h2, h3, p, span, strong, small) {
  overflow-wrap: break-word;
}

.action-row,
.admin-command-actions,
.profile-action-buttons {
  flex-wrap: wrap;
}

.action-row > *,
.admin-command-actions > *,
.profile-action-buttons > * {
  min-width: 0;
}

.kickoff-cta:not(.is-ready):not(.is-fallback) .kickoff-copy {
  visibility: hidden;
  opacity: 0;
}

@media (min-width: 720px) {
  .form-grid {
    grid-auto-flow: row !important;
  }

  :where(.form-grid, .filter-grid, .admin-filter-grid, .admin-user-filters,
    .admin-user-edit, .dialog-form) > *:not(.wide) {
    grid-column: auto !important;
  }

  :where(.form-grid, .filter-grid, .admin-filter-grid, .admin-user-filters,
    .admin-user-edit, .dialog-form) > .wide,
  .form-grid > [type="submit"].wide {
    grid-column: 1 / -1 !important;
  }
}

@media (min-width: 720px) and (max-width: 1023px) {
  .hero {
    min-height: 340px !important;
  }

  .hero-shade {
    background: linear-gradient(90deg, rgba(255,255,255,.1) 0 25%, rgba(255,255,255,.9) 56%, rgba(255,255,255,.99) 100%) !important;
  }

  html:not(.light) .hero-shade {
    background: linear-gradient(90deg, rgba(9,20,35,.16) 0 25%, rgba(9,20,35,.9) 58%, rgba(9,20,35,.99) 100%) !important;
  }

  .hero-content {
    width: 60% !important;
    padding: 30px !important;
  }

  .hero-content h1 {
    font-size: clamp(2.55rem, 7vw, 3.6rem) !important;
  }

  .hero-copy {
    padding: 4px 8px;
    border-inline-start: 3px solid var(--tm-green);
    border-radius: 2px;
    background: rgba(255,255,255,.72);
    font-size: 1rem !important;
    line-height: 1.9;
  }

  html:not(.light) .hero-copy {
    background: rgba(9,20,35,.74);
  }

  .profile-primary {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .profile-primary > #profileAvatarBox,
  .profile-primary > #profileDetailsBox,
  .profile-primary > #documentsBox,
  .profile-primary > .profile-review-actions {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  #documentsBox .documents-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #documentsBox .documents-upload-grid .upload-slot-wide {
    grid-column: 1 / -1 !important;
  }

  .kickoff-cta {
    min-height: 360px !important;
  }
}

@media (max-width: 719px) {
  .hero-content h1 {
    margin-block: 8px 6px !important;
    font-size: clamp(2.2rem, 12vw, 2.9rem) !important;
    line-height: 1.2;
    overflow: visible;
  }

  .hero .eyebrow {
    max-width: 100%;
    font-size: .76rem;
    line-height: 1.75;
  }

  .hero-copy {
    line-height: 1.85;
  }

  .kickoff-cta,
  .home-command-card {
    min-height: 390px !important;
  }

  .kickoff-copy {
    width: 100% !important;
    min-height: 100%;
    padding: 20px 18px 24px !important;
    justify-content: flex-end;
    align-items: stretch;
  }

  .kickoff-kicker {
    align-self: flex-start;
  }

  .kickoff-button {
    width: 100% !important;
    min-width: 0 !important;
  }

  .ad-card,
  .ad-list .ad-card {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0;
  }

  .ad-card-visual {
    min-height: 148px !important;
    height: 148px;
  }

  .ad-card-content {
    padding: 12px !important;
  }

  .ad-card h2 {
    font-size: 1.08rem;
  }

  .ad-card-bottom {
    align-items: center;
    flex-wrap: wrap;
  }

  .ad-card-price {
    flex: 1 0 100%;
  }

  .ad-card-bottom time {
    flex: 1 1 120px;
  }

  .ad-card-actions .action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .ad-card-actions .action-row > * {
    width: 100%;
  }

  .surface,
  .search-workbench,
  .admin-page,
  .admin-analysis-panel {
    border-radius: 3px !important;
  }

  .section-head,
  .search-head,
  .profile-action-head,
  .media-panel-head {
    align-items: flex-start !important;
  }

  .section-head .action-row,
  .search-head .action-row,
  .profile-action-buttons {
    width: 100%;
  }

  .profile-action-buttons > :not(.account-logout-icon) {
    flex: 1 1 132px;
  }

  .form-preview-banner {
    width: calc(100% - 16px) !important;
    margin-inline: auto !important;
  }

  :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select, textarea) {
    font-size: 16px !important;
  }

  .file-picker {
    min-height: 44px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
  }
}

/* Brand motion, legibility and interaction states. Motion is deliberately
   short and GPU-friendly so it adds polish without slowing navigation. */
@keyframes ft-header-enter {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ft-nav-enter {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ft-field-error {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(3px); }
  70% { transform: translateX(-3px); }
}

@keyframes ft-hero-image-enter {
  from { opacity: .72; transform: scale(1.035); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes ft-hero-copy-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.topbar-inner {
  animation: ft-header-enter .38s cubic-bezier(.2, .8, .2, 1) both;
}

.topbar .brand,
.topbar .icon-btn,
.topbar-account {
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease !important;
}

.topbar .brand:hover {
  transform: translateY(-1px) scale(1.015);
}

.topbar .icon-btn:hover,
.topbar-account:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18) !important;
}

.bottom-nav > :not(.hidden) {
  animation: ft-nav-enter .32s cubic-bezier(.2, .8, .2, 1) both;
}

.bottom-nav > :nth-child(2) { animation-delay: .025s; }
.bottom-nav > :nth-child(3) { animation-delay: .05s; }
.bottom-nav > :nth-child(4) { animation-delay: .075s; }
.bottom-nav > :nth-child(5) { animation-delay: .1s; }
.bottom-nav > :nth-child(6) { animation-delay: .125s; }
.bottom-nav > :nth-child(7) { animation-delay: .15s; }
.bottom-nav > :nth-child(8) { animation-delay: .175s; }
.bottom-nav > :nth-child(9) { animation-delay: .2s; }
.bottom-nav > :nth-child(10) { animation-delay: .225s; }
.bottom-nav > :nth-child(11) { animation-delay: .25s; }
.bottom-nav > :nth-child(12) { animation-delay: .275s; }

.bottom-nav > button:not(.bottom-nav-brand),
.bottom-nav > .guest-nav-link {
  position: relative;
  isolation: isolate;
  transition: color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease !important;
}

.bottom-nav > button:not(.bottom-nav-brand) svg,
.bottom-nav > .guest-nav-link svg {
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), color .2s ease !important;
}

.bottom-nav > button:not(.bottom-nav-brand):hover,
.bottom-nav > .guest-nav-link:hover {
  transform: translateY(-1px);
}

.bottom-nav > button:not(.bottom-nav-brand):hover svg,
.bottom-nav > .guest-nav-link:hover svg,
.bottom-nav > button.active:not(.bottom-nav-brand) svg {
  transform: translateY(-1px) scale(1.1);
}

.bottom-nav > button:focus-visible,
.bottom-nav > .guest-nav-link:focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: -4px;
}

.bottom-nav {
  color: #fff !important;
  background: #00193f !important;
}

.bottom-nav > button:not(.bottom-nav-brand),
.bottom-nav > .guest-nav-link,
.bottom-nav > .guest-nav-register {
  color: #fff !important;
  background: transparent !important;
}

.bottom-nav > button:not(.bottom-nav-brand):hover,
.bottom-nav > .guest-nav-link:hover,
.bottom-nav > button.active:not(.bottom-nav-brand) {
  color: #fff !important;
  background: rgba(255, 255, 255, .1) !important;
}

.bottom-nav > button.active:not(.bottom-nav-brand) {
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .94) !important;
}

html.light {
  --bg: #f2f5f8;
  --bg-2: #f7f9fb;
  --surface-2: #f7f9fb;
  --line: #d7dee8;
  --shadow: 0 8px 24px rgba(0, 25, 63, .075);
  --ui-shadow-xs: 0 4px 14px rgba(0, 25, 63, .055);
  --ui-shadow-sm: 0 8px 24px rgba(0, 25, 63, .075);
}

:where(.surface, .admin-page, .admin-command, .profile-card, .dossier-command-card,
  .legal-page, .auth-layout, .form-directory-hero, .form-directory-section,
  .form-directory-note, .search-workbench, .admin-analysis-panel, .home-quick-actions) {
  border-color: color-mix(in srgb, var(--line) 88%, #00193f) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow) !important;
}

:where(.metric, .home-lane, .live-test-card, .mini-card, .ad-card, .ticket-card,
  .notification-card, .owner-ad-management-card, .expert-subscription-card) {
  border-radius: 10px !important;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background-color .2s ease !important;
}

:where(.metric, .home-lane, .live-test-card, .mini-card, .ad-card, .ticket-card,
  .notification-card, .owner-ad-management-card, .expert-subscription-card):hover {
  transform: translateY(-2px) !important;
  border-color: color-mix(in srgb, var(--tm-blue) 42%, var(--line)) !important;
  box-shadow: 0 12px 28px rgba(0, 25, 63, .1) !important;
}

:where(.section-head, .search-head, .admin-command-head, .profile-action-head,
  .dossier-record-head, .media-panel-head) {
  border-inline-start-width: 3px !important;
  background: linear-gradient(110deg, var(--surface-2), var(--surface)) !important;
}

:where(.primary-btn, .primary-button, button[type="submit"]:not(.text-btn)) {
  border-radius: 8px !important;
  box-shadow: 0 5px 14px rgba(0, 25, 63, .12) !important;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
}

:where(.primary-btn, .primary-button, button[type="submit"]:not(.text-btn)):not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(0, 25, 63, .17) !important;
  filter: brightness(1.04);
}

.hero {
  border-radius: 12px !important;
  box-shadow: 0 16px 36px rgba(0, 25, 63, .14) !important;
}

.hero-img {
  animation: ft-hero-image-enter .9s cubic-bezier(.2, .8, .2, 1) both;
}

.hero-shade,
html:not(.light) .hero-shade {
  background: linear-gradient(90deg, rgba(0,25,63,.05) 0 34%, rgba(0,25,63,.62) 64%, rgba(0,13,34,.94) 100%) !important;
}

.hero-content {
  border: 0 !important;
  color: #fff !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.hero-content > * {
  animation: ft-hero-copy-enter .55s cubic-bezier(.2, .8, .2, 1) both;
}

.hero-content > :nth-child(2) { animation-delay: .07s; }
.hero-content > :nth-child(3) { animation-delay: .14s; }
.hero-content > :nth-child(4) { animation-delay: .21s; }

.hero .eyebrow {
  padding: 0 10px 0 0 !important;
  border: 0 !important;
  border-inline-start: 2px solid rgba(255, 255, 255, .7) !important;
  border-radius: 0 !important;
  color: rgba(255, 255, 255, .9) !important;
  background: transparent !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .28) !important;
}

.hero-content h1 {
  color: #fff !important;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .3) !important;
}

.hero-copy {
  color: rgba(255, 255, 255, .94) !important;
  background: transparent !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .3) !important;
}

html:not(.light) .hero-content {
  color: #fff !important;
  background: transparent !important;
  box-shadow: none !important;
}

html:not(.light) .hero-content h1,
html:not(.light) .hero-copy {
  color: #fff !important;
}

:where(.form-grid, .filter-grid, .admin-toolbar, .dialog-form, .auth-form)
  :where(input, select, textarea):focus-visible {
  border-color: var(--tm-blue) !important;
  outline: 0 !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tm-blue) 20%, transparent) !important;
}

body :is(input, select, textarea).field-invalid,
body :is(input, select, textarea)[aria-invalid="true"],
body :is(input, select, textarea):user-invalid,
body #authBox :is(input, select, textarea)[aria-invalid="true"],
body #authBox :is(input, select, textarea):user-invalid {
  border-color: var(--tm-danger) !important;
  background: color-mix(in srgb, var(--tm-danger) 5%, var(--surface)) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tm-danger) 16%, transparent) !important;
  animation: ft-field-error .22s ease both;
}

:where(.form-field, .unit-field, .admin-edit-field, .filter-field):has(
  :where(.field-invalid, [aria-invalid="true"], :user-invalid)
) > span:first-child {
  color: var(--tm-danger) !important;
}

:where(.auth-field-error, .auth-form-error, .dialog-error, .field-error, .profile-readiness[data-state="error"]) {
  color: var(--tm-danger) !important;
  font-weight: 700;
}

@media (max-width: 719px) {
  .hero {
    border-radius: 10px !important;
  }

  .hero-shade,
  html:not(.light) .hero-shade {
    background: linear-gradient(180deg, rgba(0,25,63,.02) 0 30%, rgba(0,25,63,.58) 58%, rgba(0,13,34,.96) 100%) !important;
  }

  .hero-content {
    border: 0 !important;
    color: #fff !important;
    background: transparent !important;
  }
}

/* Guest navigation is intentionally limited to home and one combined account
   entry. Signed-in navigation continues to be filtered by tabAllowed(). */
.bottom-nav > .guest-nav-link {
  color: #dce5ee;
  text-decoration: none;
}

.bottom-nav > .guest-nav-link:hover,
.bottom-nav > .guest-nav-link:focus-visible {
  color: #fff;
  background: var(--tm-navy-soft);
  outline: 0;
}

.bottom-nav > .guest-nav-register {
  color: #fff;
  background: transparent;
}

@media (min-width: 720px) {
  .bottom-nav > .guest-nav-link {
    width: auto;
    min-width: max-content;
    min-height: var(--tm-nav-height);
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-inline-start: 1px solid rgba(255,255,255,.1);
  }

  .bottom-nav > .guest-nav-link svg {
    width: 17px;
    height: 17px;
  }

  .bottom-nav > .guest-nav-link small {
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
  }

  body.is-guest .bottom-nav {
    justify-content: center;
  }
}

@media (max-width: 719px) {
  .bottom-nav > .guest-nav-link {
    min-width: 0;
    min-height: 58px;
    padding: 5px 8px;
    display: grid;
    flex: 1 1 0;
    place-items: center;
    gap: 2px;
  }

  .bottom-nav > .guest-nav-link svg {
    width: 20px;
    height: 20px;
  }

  .bottom-nav > .guest-nav-link small {
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
  }

  body.is-guest .bottom-nav > button[data-tab="home"] {
    flex: 1 1 0;
    min-width: 0 !important;
  }
}

/* Unified navigation icon system: every destination uses the same optical
   size, stroke weight and active treatment on desktop and mobile. */
.bottom-nav > button:not(.bottom-nav-brand)::after,
.bottom-nav > .guest-nav-link::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: #fff;
  opacity: 0;
  transform: translateX(50%);
  transition: width .22s ease, opacity .22s ease;
}

.bottom-nav > button.active:not(.bottom-nav-brand)::after,
.bottom-nav > .guest-nav-link:focus-visible::after {
  width: 28px;
  opacity: 1;
}

.bottom-nav > button:not(.bottom-nav-brand) > svg,
.bottom-nav > .guest-nav-link > svg {
  box-sizing: border-box;
  width: 30px !important;
  height: 30px !important;
  padding: 6px;
  flex: 0 0 30px;
  border: 1px solid rgba(255, 255, 255, .16) !important;
  border-radius: 9px !important;
  color: rgba(255, 255, 255, .9) !important;
  background: rgba(255, 255, 255, .07) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05) !important;
  stroke-width: 1.9;
}

.bottom-nav > button:not(.bottom-nav-brand):hover > svg,
.bottom-nav > .guest-nav-link:hover > svg {
  border-color: rgba(255, 255, 255, .3) !important;
  color: #fff !important;
  background: rgba(255, 255, 255, .14) !important;
}

.bottom-nav > button.active:not(.bottom-nav-brand) > svg {
  border-color: #fff !important;
  color: #00193f !important;
  background: #fff !important;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .22) !important;
}

.bottom-nav > button:not(.bottom-nav-brand) > small,
.bottom-nav > .guest-nav-link > small {
  color: inherit;
  font-weight: 720 !important;
  letter-spacing: 0;
}

@media (min-width: 720px) {
  :root {
    --tm-nav-height: 58px;
  }

  .bottom-nav > button:not(.bottom-nav-brand),
  .bottom-nav > .guest-nav-link {
    min-height: var(--tm-nav-height) !important;
    padding-inline: 13px !important;
    gap: 8px !important;
  }

  .bottom-nav > button:not(.bottom-nav-brand) > small,
  .bottom-nav > .guest-nav-link > small {
    font-size: 12px !important;
  }
}

@media (max-width: 719px) {
  .bottom-nav {
    min-height: 72px !important;
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom)) !important;
    border-top: 1px solid rgba(255, 255, 255, .16) !important;
    background: rgba(0, 25, 63, .98) !important;
    box-shadow: 0 -10px 28px rgba(0, 13, 34, .22) !important;
    backdrop-filter: blur(14px) saturate(125%);
  }

  .bottom-nav > button:not(.bottom-nav-brand),
  .bottom-nav > .guest-nav-link {
    flex: 0 0 78px;
    min-width: 78px !important;
    min-height: 62px !important;
    padding: 4px !important;
    gap: 3px !important;
    border-radius: 10px !important;
  }

  .bottom-nav > button.active:not(.bottom-nav-brand) {
    background: transparent !important;
    box-shadow: none !important;
  }

  body.is-guest .bottom-nav > button[data-tab="home"],
  body.is-guest .bottom-nav > .guest-nav-link {
    flex: 1 1 0;
    min-width: 0 !important;
  }

  .bottom-nav > button:not(.bottom-nav-brand) > svg,
  .bottom-nav > .guest-nav-link > svg {
    width: 34px !important;
    height: 34px !important;
    padding: 7px;
    flex-basis: 34px;
    border-radius: 10px !important;
  }

  .bottom-nav > button:not(.bottom-nav-brand) > small,
  .bottom-nav > .guest-nav-link > small {
    font-size: 10px !important;
    line-height: 1.4;
  }

  .notification-badge {
    top: 2px;
    inset-inline-start: 5px;
  }
}

/* Shared icon language for content and operational panels. Status icons are
   intentionally excluded so success/warning/error semantics remain intact. */
:where(.title-with-icon > svg, .section-head h2 > svg, .dossier-section-icon,
  .metric-icon, .lane-icon, .live-test-icon, .notification-icon) {
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 10px !important;
  color: #fff !important;
  background: linear-gradient(145deg, #174f85, #00193f) !important;
  box-shadow: 0 6px 14px rgba(0, 25, 63, .16) !important;
}

/* Home metrics keep the icon inside its own grid cell. Earlier theme layers
   also target `.metric > span`, so make the icon container geometry explicit
   here instead of relying on inherited span/svg sizing. */
.content[data-view="home"] > .metric-row > .metric {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
}

.content[data-view="home"] > .metric-row > .metric > .metric-icon {
  position: static !important;
  inset: auto !important;
  display: grid !important;
  place-items: center !important;
  box-sizing: border-box !important;
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  margin: 0 !important;
  padding: 11px !important;
  align-self: center !important;
  justify-self: center !important;
  overflow: hidden !important;
}

.content[data-view="home"] > .metric-row > .metric > .metric-icon > svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  stroke-width: 2 !important;
}

.content[data-view="home"] > .metric-row > .metric > div {
  min-width: 0 !important;
}

/* Sport-aware showcase example: the poster is cheap to render and the MP4 is
   intentionally `preload=none`, so visiting the form never downloads a sample
   until the user explicitly presses play. */
.showcase-example-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 18px;
  margin-block: 14px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--tm-blue) 28%, var(--line));
  border-inline-start: 4px solid var(--tm-green);
  border-radius: 10px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--tm-blue) 7%, var(--surface)), var(--surface));
  box-shadow: 0 10px 24px rgba(0, 25, 63, .08);
}

.showcase-example-copy {
  min-width: 0;
}

.showcase-example-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--tm-navy-soft);
  font-size: 12px;
  font-weight: 850;
}

.showcase-example-badge svg {
  width: 17px;
  height: 17px;
}

.showcase-example-copy h4 {
  margin: 12px 0 5px;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
}

.showcase-example-copy > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.showcase-example-copy ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.showcase-example-copy li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;
}

.showcase-example-copy li svg {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  color: var(--tm-green-strong);
}

.showcase-example-video-frame {
  position: relative;
  width: min(100%, 190px);
  justify-self: center;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 12px;
  background: #001127;
  box-shadow: 0 12px 28px rgba(0, 25, 63, .24);
}

.showcase-example-video-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #001127;
}

.showcase-example-play-hint {
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: 50%;
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 25, 63, .9);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .24);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transform: translate(50%, -50%);
  transition: opacity .18s ease, transform .18s ease;
}

.showcase-example-play-hint:hover,
.showcase-example-play-hint:focus-visible {
  border-color: #fff;
  background: var(--tm-navy-soft);
  outline: 3px solid rgba(255, 255, 255, .28);
  outline-offset: 2px;
}

.showcase-example-play-hint svg {
  width: 15px;
  height: 15px;
}

.showcase-example-card.is-playing .showcase-example-play-hint {
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, calc(-50% - 5px));
}

html:not(.light) .showcase-example-card {
  border-color: rgba(87, 153, 214, .28);
  background: linear-gradient(135deg, rgba(23, 79, 133, .13), var(--surface));
}

@media (max-width: 719px) {
  .content[data-view="home"] > .metric-row > .metric {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 9px !important;
  }

  .content[data-view="home"] > .metric-row > .metric > .metric-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    padding: 9px !important;
  }

  .showcase-example-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 13px;
  }

  .showcase-example-video-frame {
    width: min(100%, 230px);
    grid-row: 1;
  }
}

.panel-tabs > button > svg,
.segmented.panel-tabs > button > svg {
  box-sizing: border-box;
  width: 32px !important;
  height: 32px !important;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--tm-blue) 24%, var(--line)) !important;
  border-radius: 10px !important;
  color: var(--tm-navy-soft) !important;
  background: color-mix(in srgb, var(--tm-blue) 7%, var(--surface)) !important;
  box-shadow: none !important;
  stroke-width: 1.9;
}

.panel-tabs > button.active > svg,
.segmented.panel-tabs > button.active > svg {
  border-color: transparent !important;
  color: #fff !important;
  background: linear-gradient(145deg, #174f85, #00193f) !important;
  box-shadow: 0 6px 14px rgba(0, 25, 63, .18) !important;
}

html:not(.light) .panel-tabs > button > svg,
html:not(.light) .segmented.panel-tabs > button > svg {
  border-color: rgba(255, 255, 255, .14) !important;
  color: #dce9f6 !important;
  background: rgba(255, 255, 255, .06) !important;
}

html:not(.light) .panel-tabs > button.active > svg,
html:not(.light) .segmented.panel-tabs > button.active > svg {
  color: #00193f !important;
  background: #fff !important;
}

nav.bottom-nav > button.hidden,
nav.bottom-nav > a.hidden {
  display: none !important;
}

/* Keep access-controlled management tabs genuinely hidden. Several responsive
   layouts above intentionally use !important for their grid/flex mode, so the
   generic .hidden utility alone is not specific enough here. */
.admin-workspace[data-view="admin"] > .panel-tabs.hidden,
.admin-workspace[data-view="admin"] > .panel-tabs > button.hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
