:root {
  --tc-bg: #020617;
  --tc-text: #e5e7eb;
  --tc-text-muted: #9ca3af;
  --tc-accent: #38bdf8;
  --tc-accent-strong: #2563eb;
  --tc-accent-soft-1: rgba(56, 189, 248, 0.3);
  --tc-accent-soft-2: rgba(30, 64, 175, 0.22);
  --tc-border-soft: rgba(148, 163, 184, 0.25);
  --tc-border-strong: rgba(30, 64, 175, 0.7);
  --tc-card-bg: rgba(255, 255, 255, 0.06);
  --tc-card-border: rgba(255, 255, 255, 0.1);
  --tc-hero-bg: rgba(15, 23, 42, 0.98);
  --tc-hero-border: rgba(30, 64, 175, 0.7);
  --tc-panel-bg: rgba(15, 23, 42, 0.98);
  --tc-panel-border: rgba(30, 64, 175, 0.7);
  --tc-radius-card: 1rem;
  --tc-shadow-card: 0 10px 30px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  --tc-radius-small: 6px;
  --tc-radius-medium: 10px;
  --tc-shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.85);
  /* Semantic status colours (traffic lights) */
  --tc-success: #3ddc97;
  --tc-warning: #f5c26b;
  --tc-danger: #ff6b6b;
}

body[class^="tc-theme-"],
body[class*=" tc-theme-"] {
  background-color: #020617;
  background-attachment: fixed;
}

body.tc-theme-default {
  background: radial-gradient(circle at 0 0, #0f172a 0, transparent 55%),
    radial-gradient(circle at 100%0, #020617 0, transparent 55%),
    linear-gradient(135deg, #020617 0, #0b1120 45%, #020617 100%);
}

body.tc-theme-nebula {
  --tc-accent: #a855f7;
  --tc-accent-strong: #7c3aed;
  --tc-accent-soft-1: rgba(167, 139, 250, 0.35);
  --tc-accent-soft-2: rgba(76, 29, 149, 0.45);
  --tc-border-strong: rgba(129, 140, 248, 0.85);
  --tc-card-border: rgba(129, 140, 248, 0.6);
  --tc-hero-border: rgba(129, 140, 248, 0.8);
  --tc-panel-border: rgba(129, 140, 248, 0.7);
  --tc-card-bg: rgba(15, 23, 42, 0.96);
  --tc-hero-bg: rgba(15, 23, 42, 0.98);
  --tc-panel-bg: rgba(15, 23, 42, 0.98);
  background: radial-gradient(circle at 0 0, #2e1065 0, transparent 55%),
    radial-gradient(circle at 100%0, #020617 0, transparent 55%),
    linear-gradient(135deg, #020617 0, #111827 100%);
}

body.tc-theme-sunrise {
  --tc-accent: #fb923c;
  --tc-accent-strong: #f97316;
  --tc-accent-soft-1: rgba(251, 146, 60, 0.35);
  --tc-accent-soft-2: rgba(248, 113, 113, 0.45);
  --tc-border-strong: rgba(248, 181, 121, 0.9);
  --tc-card-border: rgba(248, 181, 121, 0.6);
  --tc-hero-border: rgba(248, 181, 121, 0.85);
  --tc-panel-border: rgba(248, 181, 121, 0.7);
  --tc-card-bg: rgba(15, 23, 42, 0.95);
  --tc-hero-bg: rgba(17, 24, 39, 0.98);
  --tc-panel-bg: rgba(15, 23, 42, 0.98);
  background: radial-gradient(circle at 0 0, #7c2d12 0, transparent 55%),
    radial-gradient(circle at 100%0, #312e81 0, transparent 55%),
    linear-gradient(135deg, #020617 0, #1f2937 40%, #7c2d12 100%);
}

body.tc-theme-aqua {
  --tc-accent: #22d3ee;
  --tc-accent-strong: #0ea5e9;
  --tc-accent-soft-1: rgba(34, 211, 238, 0.35);
  --tc-accent-soft-2: rgba(14, 165, 233, 0.45);
  --tc-border-strong: rgba(56, 189, 248, 0.9);
  --tc-card-border: rgba(56, 189, 248, 0.55);
  --tc-hero-border: rgba(56, 189, 248, 0.8);
  --tc-panel-border: rgba(34, 197, 235, 0.7);
  --tc-card-bg: rgba(8, 25, 43, 0.96);
  --tc-hero-bg: rgba(8, 25, 43, 0.98);
  --tc-panel-bg: rgba(8, 25, 43, 0.98);
  background: radial-gradient(circle at 0 0, #0f766e 0, transparent 55%),
    radial-gradient(circle at 100%0, #0b1120 0, transparent 55%),
    linear-gradient(135deg, #020617 0, #0f172a 45%, #022c22 100%);
}

body.tc-theme-blossom {
  --tc-accent: #f472b6;
  --tc-accent-strong: #ec4899;
  --tc-accent-soft-1: rgba(244, 114, 182, 0.35);
  --tc-accent-soft-2: rgba(192, 132, 252, 0.45);
  --tc-border-strong: rgba(244, 114, 182, 0.9);
  --tc-card-border: rgba(244, 114, 182, 0.55);
  --tc-hero-border: rgba(244, 114, 182, 0.8);
  --tc-panel-border: rgba(192, 132, 252, 0.7);
  --tc-card-bg: rgba(15, 23, 42, 0.95);
  --tc-hero-bg: rgba(17, 24, 39, 0.98);
  --tc-panel-bg: rgba(15, 23, 42, 0.98);
  background: radial-gradient(circle at 0 0, #4c1d95 0, transparent 55%),
    radial-gradient(circle at 100%0, #9d174d 0, transparent 55%),
    linear-gradient(135deg, #020617 0, #111827 40%, #4c1d95 100%);
}

*,
::before,
::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--tc-text);
  background: 0 0;
  overflow-x: hidden;
}

.tc-text-faint {
  color: #64748b !important;
  opacity: 0.85;
}

.tc-shell {
  min-height: 100vh;
  display: flex;
}

.tc-sidebar {
  width: 250px;
  background: 0 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  color: var(--tc-text);
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid var(--tc-panel-border);
}

.tc-sidebar-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--tc-panel-bg);
  backdrop-filter: blur(14px);
}

.tc-sidebar-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 60px;
  padding: 0.3rem 0.9rem 0.8rem;
  border-bottom: 1px solid var(--tc-panel-border);
  margin: 0 0 0.4rem 0;
  background: radial-gradient(
      circle at 0% 0%,
      var(--tc-accent-soft-1),
      transparent 60%
    ),
    0 0;
}

.tc-sidebar-footer {
  flex: 0 0 auto;
  margin: 0;
  min-height: 44px;
  padding: 0 0.9rem;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  color: #6b7280;
  border-top: 1px solid var(--tc-panel-border);
  background: radial-gradient(
      circle at 0% 100%,
      var(--tc-accent-soft-2),
      transparent 60%
    ),
    0 0;
}

.tc-sidebar-inner,
.tc-sidebar-brand,
.tc-sidebar-footer {
  background: 0 0;
}

.tc-logo-mark {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.7));
}

.tc-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.tc-logo-main {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
}

.tc-logo-accent {
  font-size: 0.68rem;
  color: var(--tc-accent);
}

.tc-sidebar-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0.15rem 0.75rem;
}

.tc-nav-section {
  margin-top: 0.45rem;
}

.tc-nav-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.6rem 0.5rem 0.25rem;
}

.tc-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.8rem;
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  transition: background 0.15s ease, color 0.15s ease, transform 0.08s ease,
    box-shadow 0.12s ease;
}

.tc-nav-link i {
  font-size: 0.95rem;
}

.tc-nav-link.active,
.tc-nav-link:hover {
  background: radial-gradient(
    circle at top left,
    var(--tc-accent-soft-2),
    var(--tc-accent-soft-1)
  );
  color: #f9fafb;
  transform: translateY(-0.5px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.45);
}

.tc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tc-header {
  height: 60px;
  background: 0 0;
  border-bottom: 1px solid var(--tc-panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.tc-header-title {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(240, 244, 255, 0.96);
}

.tc-mobile-menu-btn {
  background: rgba(15, 23, 42, 0.98);
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.55);
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tc-text);
}

.tc-main-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.tc-content {
  flex: 1;
  width: 100%;
  margin: 0 auto;
}

.tc-footer {
  border-top: 1px solid var(--tc-panel-border);
  min-height: 44px;
  padding: 0 1.5rem;
  background: 0 0;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--tc-text-muted);
}

.tc-profile {
  display: grid;
  gap: 14px;
}

.tc-profile__hero {
  display: flex;
  gap: 14px;
  align-items: center;
}

.tc-profile__hero-main {
  flex: 1;
  min-width: 0;
}

.tc-profile__name {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}

.tc-profile__meta {
  opacity: 0.85;
  margin-top: 6px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tc-profile__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tc-profile__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tc-profile__stat {
  padding: 12px 14px;
  border-radius: var(--tc-radius-card);
  background: var(--tc-card-bg) !important;
  border: 1px solid var(--tc-card-border) !important;
  box-shadow: var(--tc-shadow-card);
}

.tc-profile__stat-label {
  opacity: 0.8;
  font-size: 0.9rem;
}

.tc-profile__stat-value {
  margin-top: 4px;
  font-size: 1.35rem;
  font-weight: 800;
}

.tc-profile__main {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 14px;
}

.tc-profile__tanklist {
  display: grid;
  gap: 10px;
}

.tc-profile__tankrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--tc-radius-card);
  background: var(--tc-card-bg) !important;
  border: 1px solid var(--tc-card-border) !important;
  box-shadow: var(--tc-shadow-card);
  text-decoration: none;
}

.tc-profile__tankrow:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.tc-profile__tankname {
  font-weight: 700;
}

.tc-profile__tankmeta {
  opacity: 0.8;
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .tc-profile__hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .tc-profile__actions {
    justify-content: flex-start;
  }

  .tc-profile__main {
    grid-template-columns: 1fr;
  }

  .tc-profile__stats {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 992px) {
  html,
  body {
    height: 100%;
  }

  .tc-shell {
    height: 100vh;
    overflow: hidden;
  }

  .tc-main-inner {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .tc-sidebar-scroll {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .tc-main-inner::-webkit-scrollbar,
  .tc-sidebar-scroll::-webkit-scrollbar {
    width: 8px;
  }

  .tc-main-inner::-webkit-scrollbar-track,
  .tc-sidebar-scroll::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.55);
  }

  .tc-main-inner::-webkit-scrollbar-thumb,
  .tc-sidebar-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(
      180deg,
      var(--tc-accent),
      var(--tc-accent-strong)
    );
    border-radius: 10px;
    box-shadow: 0 0 6px var(--tc-accent-soft-1);
  }
}
/* ==================================================
   Compatibility System — CANONICAL STYLES
   Do not duplicate or override above this block
================================================== */

/* ---------- Overall badge ---------- */
.tc-compat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid var(--tc-border-soft);
  margin-left: 6px;      /* space from text */
  padding: 2px 8px;      /* a bit more breathing room inside */
}

.tc-compat__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Compatible */
.tc-compat--green {
  color: var(--tc-success);
  background: rgba(61, 220, 151, 0.15);
}
.tc-compat--green .tc-compat__dot {
  background: var(--tc-success);
}

/* Caution */
.tc-compat--amber {
  color: var(--tc-warning);
  background: rgba(245, 194, 107, 0.18);
}
.tc-compat--amber .tc-compat__dot {
  background: var(--tc-warning);
}

/* High risk */
.tc-compat--red {
  color: var(--tc-danger);
  background: rgba(255, 107, 107, 0.18);
}
.tc-compat--red .tc-compat__dot {
  background: var(--tc-danger);
}

/* ---------- Hub panel ---------- */
.tc-compat-panel {
  padding: 14px;
  border-radius: var(--tc-radius-medium);
  background: var(--tc-panel-bg);
  border: 1px solid var(--tc-panel-border);
  box-shadow: var(--tc-shadow-soft);
}

.tc-compat-panel__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.tc-compat-panel__title {
  font-weight: 700;
}

.tc-compat-panel__sub {
  font-size: 0.9rem;
  color: var(--tc-text-muted);
}

/* Progress */
.tc-compat-panel .progress {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.tc-compat-panel .progress-bar {
  background: var(--tc-accent);
}

/* ---------- Issue list ---------- */
.tc-issue {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tc-issue__sev {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tc-border-soft);
}

.tc-issue__sev--high { background: var(--tc-danger); }
.tc-issue__sev--medium { background: var(--tc-warning); }
.tc-issue__sev--low { background: var(--tc-text-muted); }

.tc-issue__badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--tc-border-soft);
  background: rgba(255,255,255,0.06);
}

.tc-issue__badge--high {
  border-color: var(--tc-danger);
  color: var(--tc-danger);
}

/* ---------- Tip ---------- */
.tc-compat-tip {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--tc-radius-small);
  background: var(--tc-accent-soft-2);
  border-left: 3px solid var(--tc-accent);
  font-size: 0.85rem;
}
.tc-compat-tip2 {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--tc-radius-small);
  background: var(--tc-accent-soft-1);
  border-left: 3px solid var(--tc-accent-soft-1);
  font-size: 0.85rem;
}
/* Mobile menu container */
.tc-mobile-menu {
  position: fixed;
  left: 12px;
  right: 12px;
  top: 70px; /* adjust if your header height differs */
  z-index: 99999;
  display: none;
}

.tc-mobile-menu.open {
  display: block;
}

/* The actual dropdown panel */
.tc-mobile-menu-inner {
  background: var(--tc-card-bg);
  border: 1px solid var(--tc-card-border);
  border-radius: 14px;
  box-shadow: var(--tc-shadow-card);
  overflow: hidden;
}

/* Links inside */
.tc-mobile-link {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--tc-text);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.tc-mobile-link:last-child {
  border-bottom: 0;
}

.tc-mobile-link:hover {
  background: var(--tc-accent-soft-1);
  color: var(--tc-text);
}

@media (max-width: 991.98px) {
  .tc-sidebar {
    display: none;
  }

  .tc-shell {
    min-height: 100vh;
  }

  .tc-main-inner {
    padding: 1rem;
  }

  .tc-header {
    padding: 0 0.9rem;
  }

  .tc-footer {
    padding: 0.55rem 0.9rem;
    font-size: 0.72rem;
    flex-direction: column;
    gap: 0.25rem;
  }
}

.tc-card,
.tc-card-large,
.tc-tank-card,
.card {
  background: var(--tc-card-bg) !important;
  border-radius: var(--tc-radius-card);
  border: 1px solid var(--tc-card-border) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--tc-shadow-card);
}

.tc-card-large {
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.08) !important;
  padding: 1.1rem 1.4rem !important;
  margin-top: 0.25rem !important;
}

.tc-tank-card {
  background: rgba(255, 255, 255, 0.07) !important;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out,
    border-color 0.15s ease-out;
}

.tc-tank-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--tc-accent);
  border-color: var(--tc-accent);
}

.tc-table-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.tc-card,
.tc-card-large,
.tc-tank-card,
.tc-table-card {
  color: var(--tc-text);
}

.tc-card .text-muted,
.tc-card-large .text-muted,
.tc-tank-card .text-muted,
.tc-table-card .text-muted {
  color: #cbd5e1 !important;
  opacity: 0.9;
}

.tc-table-card .table-responsive thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background-color: rgba(15, 23, 42, 0.98) !important;
  box-shadow: 0 2px 0 rgba(15, 23, 42, 0.9);
}

.tc-table-card table,
.tc-table-card thead,
.tc-table-card tbody,
.tc-table-card tr,
.tc-table-card th,
.tc-table-card td {
  background-color: transparent !important;
  color: #e5e7eb !important;
}

.tc-table-card thead tr {
  background-color: rgba(15, 23, 42, 0.98) !important;
}

.tc-table-card th {
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35) !important;
  white-space: nowrap;
}

.tc-table-card tbody tr {
  background-color: rgba(15, 23, 42, 0.9) !important;
  border-bottom: 1px solid #0f172a !important;
  transition: background 0.18s ease, transform 0.12s ease;
}

.tc-table-card tbody tr:hover {
  background-color: rgba(15, 23, 42, 0.96) !important;
  transform: translateX(3px);
  box-shadow: 0 0 0 1px var(--tc-accent) inset;
}

.tc-table-card td {
  font-size: 0.85rem;
  padding: 0.85rem 0.9rem;
  vertical-align: middle;
  color: #cbd5e1 !important;
}

.tc-table-card td strong {
  color: #f9fafb !important;
  font-weight: 600;
}

.tc-species-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.9), 0 0 0 1px #0f172a;
  overflow: hidden;
}

.tc-species-card .table-responsive {
  margin-bottom: 0;
}

.tc-species-table {
  width: 100%;
  border-collapse: collapse;
  background-color: transparent;
}

.tc-species-table thead tr {
  background-color: rgba(15, 23, 42, 0.98);
}

.tc-species-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.85rem 1rem;
  white-space: nowrap;
  background-color: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.tc-species-table th {
  color: rgba(241, 245, 249, 0.8);
  font-weight: 600;
}

.tc-species-table td {
  color: rgba(241, 245, 249, 0.72);
}

.tc-species-table tr:hover td {
  color: rgba(241, 245, 249, 0.92);
}

.tc-species-table td strong {
  color: rgba(241, 245, 249, 0.88);
  font-weight: 700;
}

.tc-species-table tbody tr {
  background-color: rgba(15, 23, 42, 0.94) !important;
  border-bottom: 1px solid #0f172a !important;
  transition: background 0.18s ease, transform 0.12s ease;
}

.tc-species-table tbody tr:hover {
  background-color: rgba(15, 23, 42, 0.96) !important;
  transform: translateX(3px);
  box-shadow: 0 0 0 1px var(--tc-accent) inset;
}

.tc-species-table td {
  font-size: 0.86rem;
  padding: 0.75rem 1rem;
  vertical-align: middle;
  color: #cbd5e1;
}

.tc-species-table td:first-child {
  font-weight: 600;
  color: #f9fafb;
}

.tc-species-table td:nth-child(2) {
  font-style: italic;
  color: rgba(148, 163, 184, 0.95);
}

.tc-species-table td:nth-child(3),
.tc-species-table td:nth-child(5) {
  text-align: center;
  white-space: nowrap;
}

.tc-tanks-body {
  padding: 1.25rem 1.4rem 1.35rem;
}

.tc-tanks-hero-header {
  display: grid;
  grid-template-columns: minmax(0, 2fr) auto auto;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.3rem;
  padding: 0.9rem 1.15rem;
  border-radius: 1rem;
  background: radial-gradient(
      circle at 0% 0%,
      var(--tc-accent-soft-1),
      transparent 55%
    ),
    radial-gradient(circle at 100% 0%, var(--tc-accent-soft-2), transparent 55%),
    var(--tc-hero-bg);
  border: 1px solid var(--tc-hero-border);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95), 0 0 0 1px #0f172a;
  position: relative;
  overflow: hidden;
}

.tc-tanks-hero-header::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
      circle at 10% 0%,
      var(--tc-accent-soft-1),
      transparent 60%
    ),
    radial-gradient(circle at 80% 20%, var(--tc-accent-soft-2), transparent 60%);
  opacity: 0.45;
  pointer-events: none;
}

.tc-tanks-hero-title {
  position: relative;
  z-index: 1;
}

.tc-tanks-hero-main {
  margin: 0 0 0.15rem 0;
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e5e7eb;
  font-weight: 600;
}

.tc-tanks-hero-sub {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(148, 163, 184, 0.95);
}

.tc-tanks-hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  justify-content: flex-start;
}

.tc-tanks-hero-pill {
  min-width: 120px;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.45);
  font-size: 0.78rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.9);
  text-align: center;
}

.tc-tanks-hero-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: rgba(148, 163, 184, 0.9);
}

.tc-tanks-hero-value {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.88rem;
  color: rgba(226, 232, 240, 0.98);
  font-weight: 600;
}

.tc-tanks-hero-actions {
  position: relative;
  z-index: 1;
  justify-self: end;
}

.tc-tanks-add-btn {
  font-size: 0.8rem !important;
  padding: 0.4rem 1.1rem !important;
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .tc-tanks-hero-header {
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
  }

  .tc-tanks-hero-actions {
    justify-self: flex-start;
  }
}

.tc-tanks-grid {
  margin-top: 0.3rem;
}

.tc-tank-shell {
  position: relative;
  height: 100%;
  border-radius: 1.35rem;
  padding: 0.9rem 1.05rem 0.85rem;
  background: radial-gradient(
      circle at 10% 0%,
      var(--tc-accent-soft-2),
      transparent 55%
    ),
    radial-gradient(circle at 90% 0%, var(--tc-accent-soft-1), transparent 60%),
    linear-gradient(180deg, #020617 0%, #020617 40%, #020617 100%);
  border: 1px solid rgba(15, 23, 42, 0.98);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.9), 0 0 0 1px #0f172a;
  overflow: hidden;
  cursor: pointer;
  transform: translateY(0);
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out,
    border-color 0.16s ease-out;
  display: flex;
  flex-direction: column;
}

.tc-tank-shell::before,
.tc-tank-shell::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 2px;
  pointer-events: none;
  opacity: 0.55;
}

.tc-tank-shell::before {
  left: 0;
  background: linear-gradient(
    to bottom,
    rgba(248, 250, 252, 0.1),
    rgba(148, 163, 184, 0.05),
    rgba(15, 23, 42, 0)
  );
}

.tc-tank-shell::after {
  right: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0),
    rgba(30, 64, 175, 0.35),
    rgba(15, 23, 42, 0)
  );
}

.tc-tank-glass-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.22) 0,
    rgba(255, 255, 255, 0.1) 18%,
    transparent 40%
  );
  opacity: 0.7;
  mix-blend-mode: screen;
  pointer-events: none;
}

.tc-tank-shell > * {
  position: relative;
  z-index: 1;
}

.tc-tank-shell:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.96), 0 0 0 1px var(--tc-accent);
  border-color: var(--tc-accent);
}

.tc-tank-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.tc-tank-header-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.tc-tank-logo-wrap {
  width: 60px;
  height: 40px;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: 0 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.tc-tank-logo {
  width: 52px;
  height: auto;
  object-fit: contain;
  opacity: 0.98;
  display: block;
}

.tc-tank-title-block {
  min-width: 0;
}

.tc-tank-title-main {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-tank-title-sub {
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.9);
}

.tc-tank-header-right {
  font-size: 0.7rem;
  text-align: right;
}

.tc-tank-stock-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: rgba(226, 232, 240, 0.96);
}

.tc-tank-body {
  flex: 1;
  padding: 0.75rem 0 0.1rem 0;
  position: relative;
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.96);
}

.tc-tank-body-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  padding: 0.18rem 0;
}

.tc-tank-body-label {
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.9);
}

.tc-tank-body-hint {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.9);
  margin-left: 0.2rem;
}

.tc-tank-footer {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(15, 23, 42, 0.95);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem 0.75rem;
  font-size: 0.78rem;
}

.tc-tank-footer-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tc-tank-footer-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: rgba(148, 163, 184, 0.9);
}

.tc-tank-footer-value {
  color: rgba(226, 232, 240, 0.98);
    white-space: nowrap;
}

@media (max-width: 767.98px) {
  .tc-tank-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tc-btn-primary,
.btn.tc-btn-primary {
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 500;
  border: 1px solid var(--tc-accent-strong);
  background: linear-gradient(
    135deg,
    var(--tc-accent),
    var(--tc-accent-strong)
  );
  color: #f9fafb !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9),
    0 0 16px rgba(56, 189, 248, 0.6);
}

.tc-btn-primary:hover,
.btn.tc-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px #0f172a, 0 0 22px rgba(56, 189, 248, 0.9);
  background: linear-gradient(135deg, var(--tc-accent-strong), #1d4ed8);
}

.tc-btn-primary:active,
.btn.tc-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.8), 0 0 12px rgba(56, 189, 248, 0.7);
}

.tc-btn-ghost,
.btn.tc-btn-ghost {
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.9);
  transition: all 0.14s ease-out;
}

.tc-btn-ghost:hover,
.btn.tc-btn-ghost:hover {
  border-color: rgba(56, 189, 248, 0.85);
  color: #f9fafb !important;
  box-shadow: 0 10px 24px #0f172a, 0 0 12px rgba(56, 189, 248, 0.6);
}

.tc-tank-edit-btn {
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(4px);
  color: #e5e7eb !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  white-space: nowrap;
  padding: 0.22rem 0.75rem !important;
  border-radius: 0.55rem !important;
  font-size: 0.75rem !important;
}

.tc-tank-edit-btn:hover {
  border-color: rgba(56, 189, 248, 0.85) !important;
  background: rgba(56, 189, 248, 0.15) !important;
  color: #fff !important;
}

.tc-filter-remove-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: rgba(226, 232, 240, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: all 0.15s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.tc-filter-remove-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.75);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6), 0 0 10px rgba(239, 68, 68, 0.6);
}

.tc-filter-remove-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), 0 0 6px rgba(239, 68, 68, 0.4);
}

.tc-input {
  background-color: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: rgba(241, 245, 249, 0.96);
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  width: 100%;
  transition: all 0.15s ease-in-out;
}

.tc-input::placeholder {
  color: rgba(148, 163, 184, 0.65);
}

.tc-input:focus {
  outline: 0;
  background-color: rgba(15, 23, 42, 0.95);
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.7),
    0 0 20px rgba(37, 99, 235, 0.45);
}

.tc-input-sm {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.tc-selected-filter {
  background: rgba(15, 23, 42, 0.92);
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 0.4rem 0.55rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.9), 0 0 0 1px rgba(15, 23, 42, 0.95);
}

.tc-selected-filter-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: rgba(226, 232, 240, 0.96);
}
/* Turnover indicator (safe standalone) */
.tc-turnover-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.35);
}

.tc-turnover-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.8);
}

.tc-turnover--red .tc-turnover-dot {
  background: #ef4444;
}
.tc-turnover--redorange .tc-turnover-dot {
  background: #f97316;
}
.tc-turnover--orange .tc-turnover-dot {
  background: #f59e0b;
}
.tc-turnover--green .tc-turnover-dot {
  background: #22c55e;
}
.tc-turnover--unknown .tc-turnover-dot {
  background: rgba(148, 163, 184, 0.6);
}

.tc-selected-filter-remove {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.9);
  color: rgba(226, 232, 240, 0.96);
  font-size: 0.8rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.15s ease-out;
}

.tc-selected-filter-remove:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.85);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.7), 0 0 10px rgba(239, 68, 68, 0.6);
}

.tc-selected-filter-remove:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), 0 0 6px rgba(239, 68, 68, 0.4);
}

.tc-filter-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.75rem;
  padding: 0.55rem 0.9rem;
  margin-bottom: 0.65rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.9), 0 0 0 1px rgba(15, 23, 42, 0.8);
}

.tc-filter-box-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.tc-filter-box .row.g-3 {
  --bs-gutter-x: 0.5rem;
  --bs-gutter-y: 0.2rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.tc-filter-box label {
  font-size: 0.72rem;
  margin-bottom: 0.05rem !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8 !important;
}

.tc-filter-box .form-control,
.tc-filter-box .form-select {
  height: 34px !important;
  padding: 0.25rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1.2;
  background-color: rgba(15, 23, 42, 0.98) !important;
  color: #e2e8f0 !important;
  border-radius: 0.45rem !important;
  border: 1px solid rgba(148, 163, 184, 0.4) !important;
}

.tc-filter-box .form-control::placeholder {
  color: #64748b;
}

.tc-filter-box .form-control:focus,
.tc-filter-box .form-select:focus {
  border-color: var(--tc-accent) !important;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45);
}

@media (min-width: 992px) {
  .tc-filter-box .row.g-3 {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.55rem;
    margin: 0;
  }

  .tc-filter-box .row.g-3 > [class^="col-"],
  .tc-filter-box .row.g-3 > [class*=" col-"] {
    flex: 0 1 auto;
    padding: 0;
  }

  .tc-filter-box .row.g-3 > :nth-child(1) {
    flex: 2 1 0;
    min-width: 0;
  }

  .tc-filter-box .row.g-3 > :nth-child(2),
  .tc-filter-box .row.g-3 > :nth-child(3) {
    flex: 1 1 0;
    min-width: 0;
  }

  .tc-filter-box .row.g-3 > :nth-child(n + 4) {
    flex: 0.7 1 0;
    min-width: 0;
  }
}

@media (max-width: 991.98px) {
  .tc-filter-box {
    padding: 0.45rem 0.75rem;
  }

  .tc-filter-box .form-control,
  .tc-filter-box .form-select {
    height: 32px !important;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }
}
.tc-profile-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 0.75rem !important;
  padding: 0.35rem 0.75rem !important;
  color: var(--tc-text) !important;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(15, 23, 42, 0.9);
  transition: all 0.15s ease-out;
}

.tc-profile-btn:hover,
.tc-profile-btn:focus {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(56, 189, 248, 0.5);
}

.tc-profile-btn .profile-text {
  line-height: 1.1;
}

.tc-profile-btn .profile-text div:first-child {
  font-size: 0.8rem;
  color: var(--tc-text);
}

.tc-profile-btn .profile-text div:last-child {
  font-size: 0.7rem;
  color: var(--tc-text-muted);
}

.tc-profile-dropdown {
  min-width: 260px;
  padding: 0;
  margin-top: 0.5rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background-color: rgba(15, 23, 42, 0.98);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.85),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  overflow: hidden;
  color: rgba(241, 245, 249, 0.96);
}

.tc-profile-dropdown__header {
  padding: 0.75rem 0.9rem;
  background: linear-gradient(
    135deg,
    var(--tc-hero-bg),
    var(--tc-accent-soft-2)
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.tc-profile-dropdown__header .fw-semibold {
  color: rgba(248, 250, 252, 0.98);
}

.tc-profile-dropdown__header .text-secondary {
  color: rgba(203, 213, 225, 0.9) !important;
}

.tc-profile-dropdown__avatar {
  width: 40px;
  height: 40px;
  border-radius: 0.8rem;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.8), 0 0 0 1px #0f172a;
}

.tc-profile-dropdown__avatar img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.tc-profile-dropdown .dropdown-divider {
  border-color: rgba(51, 65, 85, 0.9);
  margin-inline: 0.5rem;
}

.tc-profile-dropdown .dropdown-item {
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  color: rgba(241, 245, 249, 0.96);
}

.tc-profile-dropdown .dropdown-item i {
  font-size: 1rem;
}

.tc-profile-dropdown .dropdown-item:hover {
  background: rgba(37, 99, 235, 0.22);
  color: #f8fafc;
}

.tc-profile-avatar,
.tc-avatar-preview {
  width: 52px;
  height: 52px;
  border-radius: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.8), 0 0 0 1px #0f172a;
  padding: 0;
}

.tc-profile-avatar img,
.tc-avatar-preview img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.tc-header-avatar {
  width: 28px;
  height: 28px;
  border-radius: 0.55rem;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.85), 0 0 0 1px #0f172a;
}

.tc-header-avatar img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.tc-avatar-remove-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.85);
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.9);
  transition: all 0.14s ease-out;
  padding: 0;
}

.tc-avatar-remove-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.9);
  color: #fee2e2;
  transform: translateY(-1px);
}

.tc-avatar-remove-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.9);
}

.tc-logo-default-avatar {
  width: 52px;
  height: auto;
  opacity: 0.95;
  display: block;
}

.tc-logo-default-avatar-sm {
  width: 28px;
  height: auto;
  opacity: 0.95;
  display: block;
}

.tc-pill {
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
}

.tc-badge-low,
.tc-badge-medium,
.tc-badge-high,
.tc-badge-unknown {
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.7rem;
  border-width: 1px;
  border-style: solid;
}

.tc-badge-low {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.85);
  color: rgba(220, 252, 231, 0.96);
}

.tc-badge-medium {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.85);
  color: rgba(254, 243, 199, 0.96);
}

.tc-badge-high {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.85);
  color: rgba(254, 226, 226, 0.97);
}

.tc-badge-unknown {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.7);
  color: rgba(229, 231, 235, 0.95);
}

.tc-tanks-panel {
  border-radius: 1.25rem;
  background: radial-gradient(
      circle at top left,
      var(--tc-accent-soft-1),
      transparent 55%
    ),
    var(--tc-panel-bg);
  border: 1px solid var(--tc-panel-border);
}

.tc-tanks-panel .card-body {
  padding: 1.1rem 1.5rem 1.2rem;
}

.tc-tanks-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.9);
}

.tc-tanks-meta-item {
  display: flex;
  flex-direction: column;
}

.tc-tanks-meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.9);
}

.tc-tanks-meta-value {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.98);
}

.tc-tank-stock-label {
  font-size: 0.7rem;
}

.tc-stocking-hero {
  background: radial-gradient(
      circle at top left,
      var(--tc-accent-soft-1),
      transparent 55%
    ),
    linear-gradient(135deg, var(--tc-hero-bg), var(--tc-accent-soft-2));
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--tc-hero-border);
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
}

.tc-hero-left {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  min-width: 0;
}

.tc-hero-logo-wrap {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--tc-accent-strong);
  background: radial-gradient(circle at 30% 20%, var(--tc-accent), #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tc-hero-logo {
  max-width: 28px;
  max-height: 28px;
}

.tc-hero-right {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 220px;
}

.tc-hero-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.tc-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 0.65rem;
  font-size: 0.8rem;
}

.tc-hero-metrics-heading {
  grid-column: 1 / span 2;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.9);
}

.tc-hero-metric-label {
  color: rgba(209, 213, 219, 0.95);
}

.tc-hero-metric-value {
  text-align: right;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.97);
}

@media (max-width: 767.98px) {
  .tc-stocking-hero {
    flex-direction: column;
    align-items: stretch;
  }
}
/* Stocking typeahead: allow dropdown to escape on desktop (avoid scroll clipping) */
@media (min-width: 992px) {
  .tc-stocking-table-wrap {
    overflow: visible; /* overrides bootstrap's overflow clipping */
  }

  .tc-stocking-table-wrap td,
  .tc-stocking-table-wrap th {
    overflow: visible;
  }
}

/* Ensure suggestions list sits above cards/table */
.tc-typeahead-list {
  z-index: 9999;
}

.tc-guide-card {
  position: relative;
  overflow: hidden;
}

.tc-guide-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
      circle at 0 0,
      rgba(56, 189, 248, 0.1),
      transparent 55%
    ),
    radial-gradient(circle at 100%0, rgba(37, 99, 235, 0.12), transparent 55%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.tc-guide-inner {
  position: relative;
  z-index: 1;
}

.tc-setup-hero,
.tc-water-hero {
  position: relative;
  border-radius: 1.25rem;
  padding: 1.25rem 1.4rem;
  background: radial-gradient(
      circle at top left,
      var(--tc-accent-soft-1),
      transparent 55%
    ),
    linear-gradient(135deg, var(--tc-hero-bg), var(--tc-accent-soft-2));
  border: 1px solid var(--tc-hero-border);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9), 0 0 0 1px #0f172a;
}

.tc-guide-section-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tc-accent);
  margin-bottom: 0.25rem;
}

.tc-guide-subtext {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.95);
}

.tc-guide-subcard {
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.tc-guide-subcard h5 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.tc-guide-list {
  padding-left: 1.1rem;
  font-size: 0.9rem;
}

.tc-quicklink {
  border-radius: 0.9rem;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.98),
    var(--tc-accent-soft-1),
    rgba(15, 23, 42, 0.96)
  );
  border: 1px solid var(--tc-accent);
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tc-quicklink small {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bfdbfe;
}

.tc-water-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--tc-accent);
  padding: 0.13rem 0.65rem;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.96);
  background: rgba(15, 23, 42, 0.95);
}

.tc-water-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--tc-accent);
}

@media (max-width: 991.98px) {
  .tc-water-hero {
    margin-top: 1.25rem;
  }
}

.tc-auth-shell {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.tc-auth-card {
  position: relative;
  z-index: 2;
  max-width: 420px;
  width: 100%;
  border-radius: 1rem;
  background: radial-gradient(
      circle at top left,
      var(--tc-accent-soft-1),
      transparent 55%
    ),
    var(--tc-hero-bg);
  border: 1px solid var(--tc-hero-border);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.9), 0 0 0 1px #0f172a;
  padding: 1.5rem 1.6rem 1.4rem;
}

/* Auth split layout (intro + form) */
.tc-auth-wrap {
  position: relative;
  z-index: 2;
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 420px;
  gap: 1.25rem;
  align-items: start;
}

.tc-auth-intro {
  border-radius: 1rem;
  padding: 1.5rem 1.6rem;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 55%),
    rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(30, 64, 175, 0.65);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.9), 0 0 0 1px #0f172a;
}

.tc-auth-intro-top {
  margin-bottom: 1.1rem;
}

.tc-auth-intro-logo {
  width: 86px;
  height: 86px;
  margin-bottom: 0.6rem;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
}

.tc-auth-intro-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tc-auth-intro-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  color: #f1f5f9;
}

.tc-auth-intro-subtitle {
  margin-top: 0.5rem;
  max-width: 52ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(203, 213, 225, 0.92);
}

.tc-auth-intro-badges {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tc-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(226, 232, 240, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.5);
  background: rgba(2, 132, 199, 0.18);
}

.tc-auth-badge-muted {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.5);
  color: rgba(203, 213, 225, 0.9);
}

.tc-auth-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.tc-auth-feature {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0.9rem;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(30, 64, 175, 0.35);
}

.tc-auth-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: rgba(125, 211, 252, 0.95);
}

.tc-auth-feature-icon svg {
  width: 22px;
  height: 22px;
}

.tc-auth-feature-title {
  font-size: 0.92rem;
  font-weight: 650;
  color: rgba(241, 245, 249, 0.95);
}

.tc-auth-feature-text {
  margin-top: 0.1rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.95);
}

.tc-auth-intro-foot {
  margin-top: 1rem;
}

.tc-auth-intro-note {
  padding: 0.8rem 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.55);
  color: rgba(203, 213, 225, 0.92);
  font-size: 0.86rem;
}

.tc-auth-intro-note strong {
  color: #e2e8f0;
}

@media (max-width: 991.98px) {
  .tc-auth-wrap {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .tc-auth-intro {
    order: 2;
  }

  .tc-auth-card {
    order: 1;
    max-width: 520px;
    margin: 0 auto;
  }
}

.tc-auth-logo,
.tc-auth-logo img {
  display: block;
  width: 110px;
  height: 110px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
  padding: 0;
}

.tc-auth-logo img {
  object-fit: contain;
}

.tc-auth-shell svg {
  width: 96px;
  height: 96px;
  margin-bottom: 1rem;
}

.tc-auth-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.tc-auth-subtitle {
  font-size: 0.86rem;
  color: rgba(148, 163, 184, 0.95);
}

.tc-auth-footer {
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.9);
  margin-top: 0.7rem;
}

.tc-auth-card label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.95);
}

.tc-auth-shell .tc-input {
  background-color: rgba(15, 23, 42, 0.96);
  border-radius: 0.6rem;
  border: 1px solid var(--tc-hero-border);
  box-shadow: 0 0 0 1px #0f172a, 0 10px 22px rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  transition: all 0.16s ease-out;
}

.tc-auth-shell .tc-input::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

.tc-auth-shell .tc-input:focus {
  outline: 0;
  border-color: var(--tc-accent-strong);
  box-shadow: 0 0 0 1px var(--tc-accent-strong), 0 14px 30px #0f172a;
  background-color: rgba(15, 23, 42, 0.98);
}

.tc-auth-shell input:-webkit-autofill,
.tc-auth-shell input:-webkit-autofill:hover,
.tc-auth-shell input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.96) inset;
  -webkit-text-fill-color: #e5e7eb;
  border-radius: 0.6rem;
}

.tc-auth-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  font-family: ui-monospace, Menlo, Monaco, Consolas, monospace;
  opacity: 0.28;
}

.tc-bg-row {
  position: absolute;
  white-space: nowrap;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--tc-accent-soft-2);
  animation: tc-bg-scroll 10s linear infinite;
}

.tc-bg-row:nth-child(2),
.tc-bg-row:nth-child(3),
.tc-bg-row:nth-child(4),
.tc-bg-row:nth-child(5),
.tc-bg-row:nth-child(6) {
  animation-duration: 14s;
  animation-direction: reverse;
}

.tc-bg-keyword {
  position: absolute;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tc-accent);
  opacity: 0.9;
}

@keyframes tc-bg-scroll {
  0% {
    transform: translateX(0);
  }

  to {
    transform: translateX(-70%);
  }
}

.tc-auth-hero {
  text-align: center;
  margin-bottom: 1.4rem;
}

.tc-auth-hero-logo {
  width: 125px;
  height: 125px;
  margin: 0 auto 0.75rem auto;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.55));
}

.tc-auth-hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tc-auth-hero-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
}

.tc-auth-hero-main {
  color: #f1f5f9;
}

.tc-auth-hero-accent {
  color: var(--tc-accent);
}

.tc-auth-hero-subtitle {
  font-size: 0.9rem;
  margin-top: 0.35rem;
  color: rgba(148, 163, 184, 0.95);
}

.tc-quicklink a {
  color: #e5e7eb;
  text-decoration: underline;
}

.tc-quicklink a:hover {
  text-decoration: none;
}

.tc-messages-page {
  max-width: 1100px;
  margin: 0 auto;
}

.tc-messages-page .tc-card-large {
  padding: 1.1rem 1.4rem !important;
}

.tc-messages-page h1,
.tc-messages-page h2,
.tc-messages-page h3 {
  margin-bottom: 0.4rem;
}

.tc-messages-page .tc-messages-intro {
  font-size: 0.86rem;
  color: rgba(148, 163, 184, 0.95);
  margin-bottom: 0.9rem;
}

.tc-messages-page .tc-messages-compose {
  border-radius: 1rem;
  padding: 0.8rem 0.9rem 0.9rem;
  background: radial-gradient(
    circle at top left,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.99)
  );
  border: 1px solid rgba(30, 64, 175, 0.7);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.9), 0 0 0 1px #0f172a;
  margin-bottom: 0.9rem;
}

.tc-messages-page .tc-messages-compose label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.95);
  margin-bottom: 0.15rem;
}

.tc-messages-page .tc-messages-compose .form-control {
  font-size: 0.86rem;
  padding: 0.4rem 0.6rem;
}

.tc-messages-page .tc-messages-compose textarea.form-control {
  min-height: 110px;
  max-height: 220px;
  resize: vertical;
  font-size: 0.86rem;
}

.tc-messages-page .tc-messages-compose .tc-messages-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.55rem;
}

.tc-messages-page .tc-messages-threads {
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(30, 64, 175, 0.65);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.95), 0 0 0 1px #0f172a;
  overflow: hidden;
}

.tc-messages-page .tc-message-thread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.84rem;
  text-decoration: none;
  color: rgba(226, 232, 240, 0.96);
  border-bottom: 1px solid #0f172a;
  background: radial-gradient(circle at left, #0f172a, rgba(15, 23, 42, 0.98));
  transition: background 0.14s ease-out, transform 0.1s ease-out;
}

.tc-messages-page .tc-message-thread:last-child {
  border-bottom: none;
}

.tc-messages-page .tc-message-thread:hover {
  background: radial-gradient(
    circle at left,
    rgba(37, 99, 235, 0.42),
    rgba(15, 23, 42, 0.98)
  );
  transform: translateX(2px);
}

.tc-messages-page .tc-message-thread-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  overflow: hidden;
}

.tc-messages-page .tc-message-thread-name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-messages-page .tc-message-thread-snippet {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.98);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-messages-page .tc-message-thread-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  margin-left: 0.5rem;
}

.tc-messages-page .tc-message-thread-time {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.96);
}

.tc-messages-page .tc-message-unread {
  min-width: 20px;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--tc-accent-strong);
  color: #e0f2fe;
  box-shadow: 0 0 10px var(--tc-accent-soft-1);
}

.tc-messages-page .tc-messages-empty {
  font-size: 0.84rem;
  color: rgba(148, 163, 184, 0.95);
  padding: 0.65rem 0.85rem;
}

@media (max-width: 767.98px) {
  .tc-messages-page .tc-messages-compose {
    padding: 0.75rem 0.8rem 0.85rem;
  }

  .tc-messages-page .tc-messages-compose textarea.form-control {
    min-height: 90px;
  }

  .tc-messages-page .tc-message-thread {
    padding-inline: 0.7rem;
  }
}

.tc-messages-page .tc-input,
.tc-messages-page textarea,
.tc-messages-page input[type="text"] {
  color: #f0f4ff !important;
}

.tc-messages-page .tc-input:focus,
.tc-messages-page textarea:focus,
.tc-messages-page input[type="text"]:focus {
  color: #fff !important;
  background-color: rgba(15, 23, 42, 0.93);
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.7),
    0 0 12px rgba(37, 99, 235, 0.45);
}

.tc-forum {
  width: 100%;
  max-width: 100%;
  margin-top: 0.75rem;
  padding-bottom: 1.5rem;
}

.tc-forum-bar {
  padding: 0.75rem 0.1rem;
}

.tc-forum-description {
  color: rgba(209, 213, 219, 0.85);
  font-size: 0.9rem;
}

.tc-forum-topics-card {
  background: rgba(15, 23, 42, 0.98);
  border-radius: 0;
  border: 1px solid var(--tc-panel-border);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.9);
  margin-top: 0.5rem;
  overflow: hidden;
}

.tc-forum-topics-card .table,
.tc-forum-topics-card .table > :not(caption) > * {
  background-color: transparent !important;
  border-color: rgba(15, 23, 42, 0.9);
}

.tc-forum-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
  color: rgba(226, 232, 240, 0.95);
  background-color: transparent;
}

.tc-forum-table thead th {
  background-color: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid var(--tc-panel-border);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(148, 163, 184, 0.95);
  padding: 0.55rem 1.1rem;
}

.tc-forum-table thead th:first-child {
  width: 58%;
  text-align: left;
}

.tc-forum-table thead th:nth-child(2),
.tc-forum-table thead th:nth-child(3),
.tc-forum-table thead th:nth-child(4) {
  width: 14%;
  white-space: nowrap;
}

.tc-forum-table tbody tr {
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  transition: background-color 120ms ease;
  background-color: rgba(15, 23, 42, 0.98);
}

.tc-forum-table tbody tr:nth-child(even),
.tc-forum-table tbody tr:nth-child(odd) {
  background-color: rgba(15, 23, 42, 0.98) !important;
}

.tc-forum-table tbody td {
  background-color: transparent;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.94);
  padding: 0.6rem 1.1rem;
}

.tc-forum-table tbody tr:last-child td {
  border-bottom: 0;
}

.tc-forum-topic-row td:first-child {
  padding-left: 1.4rem;
  position: relative;
}

.tc-forum-topic-row td:nth-child(2) {
  text-align: center;
}

.tc-forum-topic-row td:nth-child(3) {
  text-align: left;
  white-space: nowrap;
  color: rgba(191, 219, 254, 0.95);
  font-size: 0.86rem;
}

.tc-forum-topic-row td:nth-child(4) {
  text-align: left;
  white-space: nowrap;
}

.tc-forum-topic-row:hover {
  background-color: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 1px var(--tc-accent) inset;
}

.tc-forum-topic-row:hover td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(56, 189, 248, 0.3),
    rgba(59, 130, 246, 0.7)
  );
}

.tc-forum-topic-link {
  color: rgba(226, 239, 255, 0.98);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  text-transform: capitalize;
  letter-spacing: 0.01em;
}

.tc-forum-topic-link:hover {
  color: var(--tc-accent);
  text-decoration: underline;
}

.tc-forum-replies-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--tc-accent-strong);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(219, 234, 254, 0.98);
}

.tc-forum-badge-pinned,
.tc-forum-badge-locked {
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.tc-forum-badge-pinned {
  background-color: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.tc-forum-badge-locked {
  background-color: rgba(148, 163, 184, 0.15);
  color: #e5e7eb;
}

.tc-forum-table-empty td {
  padding: 2.75rem 1.5rem;
  text-align: center;
  background-color: transparent;
}

.tc-forum-empty-text {
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.92rem;
}

.tc-forum-pagination {
  background: 0 0;
  border-top: 1px solid var(--tc-panel-border);
  margin-top: 0.75rem;
}

.tc-forum-locked,
.tc-forum-login-hint {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.tc-forum-post {
  background: rgba(15, 23, 42, 0.98);
  border-radius: 6px;
  border: 1px solid var(--tc-panel-border);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.85);
  margin-bottom: 0.6rem;
}

.tc-forum-post--topic {
  border-color: var(--tc-accent-strong);
}

.tc-forum-post .card-body {
  padding: 0.75rem 1.1rem 0.85rem;
}

.tc-forum-post-avatar-col {
  flex: 0 0 40px;
  margin-right: 0.7rem;
}

.tc-forum-post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(59, 130, 246, 0.65);
}

.tc-forum-post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tc-forum-post-usercol {
  flex: 0 0 150px;
  margin-right: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tc-forum-post-user-meta {
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.9);
}

.tc-forum-post-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.98);
  margin-bottom: 0.15rem;
}

.tc-forum-post-user-stats {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.tc-forum-post-user-stats span {
  display: block;
  line-height: 1.2;
}

.tc-forum-post-meta {
  margin-bottom: 0.15rem;
  padding-bottom: 0.2rem;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(30, 64, 175, 0.5);
}

.tc-forum-post-author {
  color: rgba(226, 232, 240, 0.98);
  font-weight: 600;
  margin-right: 0.4rem;
}

.tc-forum-post-op-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.06rem 0.45rem;
  border-radius: 999px;
  background-color: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 0.45rem;
}

.tc-forum-post-time,
.tc-forum-post-index {
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.8rem;
}

.tc-forum-post-body {
  color: rgba(226, 232, 240, 0.96);
  line-height: 1.6;
  font-size: 0.95rem;
  white-space: pre-wrap;
  text-align: left;
  padding-top: 0.2rem;
}

.tc-forum-post-body p {
  margin-bottom: 0.4rem;
}

.tc-forum-post-body p:last-child {
  margin-bottom: 0;
}

.tc-forum-post-body strong {
  font-weight: 700;
  color: rgba(248, 250, 252, 0.98);
}

.tc-forum-post-body em {
  font-style: italic;
  color: rgba(226, 232, 240, 0.96);
}

.tc-forum-post-body a {
  color: var(--tc-accent);
  text-decoration: underline;
}

.tc-forum-post-body ul,
.tc-forum-post-body ol {
  padding-left: 1.4rem;
  margin: 0.3rem 0 0.4rem;
}

.tc-forum-post-body li {
  margin-bottom: 0.15rem;
}

.tc-forum-post-body blockquote {
  margin: 0.45rem 0 0.4rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--tc-accent-strong);
  color: rgba(191, 219, 254, 0.95);
  font-style: italic;
}

.tc-forum-post-footer {
  border-top: 1px solid var(--tc-panel-border);
  margin-top: 0.75rem;
  padding-top: 0.3rem;
}

.tc-forum-post-actions,
.tc-forum-topic-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.tc-forum-post-action-link {
  background: 0 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 0.82rem;
  color: rgba(148, 163, 184, 0.95);
  text-decoration: none;
}

.tc-forum-post-action-link:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.tc-forum-post-action-delete:hover {
  color: #f97373;
}

.tc-forum-edit-context {
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.9);
  margin-top: -0.2rem;
  margin-bottom: 0.6rem;
}

.tc-forum-edit-context a {
  color: rgba(191, 219, 254, 0.95);
  text-decoration: none;
  border-bottom: 1px dotted rgba(191, 219, 254, 0.6);
  padding-bottom: 1px;
  transition: 120ms ease;
}

.tc-forum-edit-context a:hover {
  color: #e0f2fe;
  border-bottom-style: solid;
  border-bottom-color: #e0f2fe;
}

.tc-forum-new-topic-card,
.tc-forum-reply-card {
  background: rgba(15, 23, 42, 0.98);
  border-radius: 6px;
  border: 1px solid var(--tc-panel-border);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.85);
  padding: 1.4rem 1.6rem;
  margin-top: 1.25rem;
}

.tc-forum-new-topic-card .form-label,
.tc-forum-reply-card .form-label {
  color: rgba(203, 213, 225, 0.85);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.tc-forum-input,
.tc-forum-textarea {
  background: rgba(3, 7, 18, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: rgba(241, 245, 249, 0.96);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  transition: all 150ms ease;
  font-size: 0.95rem;
}

.tc-forum-input,
.tc-forum-input:focus {
  color: rgba(241, 245, 249, 0.98) !important;
  -webkit-text-fill-color: rgba(241, 245, 249, 0.98) !important;
}

.tc-forum-input::placeholder,
.tc-forum-textarea::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.tc-forum-input:focus,
.tc-forum-textarea:focus {
  border-color: var(--tc-accent-strong);
  box-shadow: 0 0 0 2px var(--tc-accent-soft-1);
  background: rgba(3, 7, 18, 0.75);
  outline: 0;
}

.tc-forum-textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.55;
}

.tc-forum-hint {
  opacity: 0.55;
  font-size: 0.8rem;
}

.tc-forum-new-topic-card button.btn-primary,
.tc-forum-reply-card button.btn-primary {
  margin-top: 0.75rem;
  padding: 0.55rem 1.25rem;
  font-weight: 500;
  border-radius: 10px;
}

.tc-forum-editor {
  background: rgba(6, 11, 25, 0.95);
  border-radius: 12px;
  border: 1px solid rgba(51, 65, 85, 0.8);
  padding: 0.6rem 0.7rem 0.7rem;
}

.tc-forum-toolbar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding-bottom: 0.4rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--tc-panel-border);
}

.tc-forum-toolbar-spacer {
  flex: 1;
}

.tc-forum-btn {
  border: 0;
  background: 0 0;
  color: rgba(226, 232, 240, 0.85);
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, transform 80ms ease;
}

.tc-forum-btn i {
  font-size: 0.9rem;
}

.tc-forum-btn:hover {
  background-color: var(--tc-accent-soft-2);
  color: #e0f2fe;
}

.tc-forum-btn:active {
  transform: translateY(1px);
}

.tc-forum-editor .tc-forum-textarea {
  background-color: rgba(3, 7, 18, 0.92);
  border-radius: 10px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  padding: 0.6rem 0.75rem;
  color: rgba(226, 232, 240, 0.98);
}

.tc-forum-emoji-panel {
  margin-top: 0.5rem;
  padding: 0.35rem 0.4rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(51, 65, 85, 0.9);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tc-forum-emoji-btn {
  border: 0;
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  border-radius: 999px;
  padding: 0.12rem 0.35rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 120ms ease, transform 80ms ease;
}

.tc-forum-emoji-btn:hover {
  background: var(--tc-accent-strong);
  transform: translateY(-1px);
}

body[class^="tc-theme-"],
body[class*=" tc-theme-"] {
  --tc-chat-bg: var(--tc-bg, #020617);
  --tc-chat-bg-soft: var(--tc-bg-soft, #02081a);
  --tc-chat-panel: var(--tc-card-bg, #020b1f);
  --tc-chat-panel-soft: var(--tc-card-bg, #020d25);
  --tc-chat-panel-alt: var(--tc-card-bg-alt, #02101f);
  --tc-chat-border-subtle: var(--tc-border-soft, rgba(30, 64, 175, 0.35));
  --tc-chat-border-strong: var(--tc-border-strong, rgba(56, 189, 248, 0.6));
  --tc-chat-accent: var(--tc-accent, #38bdf8);
  --tc-chat-accent-soft: var(--tc-accent-soft-1, rgba(56, 189, 248, 0.18));
  --tc-chat-accent-strong: var(--tc-accent-strong, #0ea5e9);
  --tc-chat-text: var(--tc-text, #e5e7eb);
  --tc-chat-text-soft: var(--tc-text-soft, #cbd5f5);
  --tc-chat-text-muted: var(--tc-text-muted, #64748b);
}

.tc-page-chat .tc-main-inner {
  padding: 0;
  overflow: hidden;
}

.tc-page-chat .tc-content {
  max-width: none;
  margin: 0;
  height: 100%;
  display: flex;
  min-height: 0;
}

.tc-page-chat .tc-chat-page {
  flex: 1;
  height: 100%;
  min-height: 0;
  padding: 12px;
  box-sizing: border-box;
}

.tc-page-chat .tc-chat-page {
  width: 100%;
}

.tc-page-chat #tc-chat-root {
  width: 100%;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.tc-page-chat #tc-chat-root.tc-chat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px !important;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
/* Chat: stack panels on mobile (main on top, sidebar below) */
@media (max-width: 991.98px) {
  .tc-page-chat #tc-chat-root.tc-chat-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .tc-page-chat .tc-chat-main {
    grid-column: 1;
    grid-row: 1;
  }

  .tc-page-chat .tc-chat-sidebar {
    grid-column: 1;
    grid-row: 2;
  }
}

.tc-app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.95);
  background: radial-gradient(
      circle at top left,
      rgba(56, 189, 248, 0.22),
      transparent 55%
    ),
    linear-gradient(
      to right,
      var(--tc-chat-bg, #020617),
      var(--tc-chat-bg-soft, #02081b)
    );
  color: var(--tc-chat-text-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.tc-app-header h1 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.tc-app-header span {
  font-size: 0.8rem;
  color: var(--tc-chat-accent);
}

.tc-chat-page {
  height: calc(100vh - 160px);
  padding: 12px;
  box-sizing: border-box;
}

.tc-chat-page .tc-chat-shell {
  height: 100%;
  min-height: 0;
}

.tc-chat-page .tc-chat-grid {
  height: 100%;
  min-height: 0;
  width: 100%;
}

.tc-chat-page .container,
.tc-chat-page .container-lg,
.tc-chat-page .container-xl,
.tc-chat-page .container-xxl {
  max-width: none !important;
  width: 100% !important;
}

.tc-chat-main {
  background-color: var(--tc-chat-panel, rgba(2, 10, 28, 0.98));
  border-radius: var(--tc-radius-medium);
  border: 1px solid var(--tc-chat-border-subtle, rgba(15, 23, 42, 0.95));
  box-shadow: var(--tc-shadow-soft), 0 0 0 1px rgba(15, 23, 42, 0.7),
    0 0 30px rgba(56, 189, 248, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tc-chat-sidebar {
  width: auto;
  background: linear-gradient(
    180deg,
    rgba(8, 20, 40, 0.95),
    rgba(3, 7, 18, 0.96)
  );
  border-radius: var(--tc-radius-medium);
  border: 1px solid var(--tc-chat-border-subtle, rgba(15, 23, 42, 0.95));
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.9), 0 0 0 1px rgba(15, 23, 42, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tc-chat-tab__icon {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-right: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tc-chat-tab--active .tc-chat-tab__icon {
  opacity: 1;
}

.tc-chat-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  padding: 0.35rem 0.9rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.95);
  background: linear-gradient(
    to right,
    var(--tc-chat-panel-soft, #02081a),
    var(--tc-chat-panel, #020b22)
  );
}

.tc-chat-tab {
  position: relative;
  border: 0;
  background: rgba(15, 23, 42, 0.65);
  color: var(--tc-chat-text-muted);
  font-size: 0.86rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--tc-radius-small) var(--tc-radius-small) 0 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}

.tc-chat-tab:hover {
  color: var(--tc-chat-text-soft);
  background: rgba(15, 23, 42, 0.9);
}

.tc-chat-tab--active {
  color: var(--tc-chat-accent);
  background: radial-gradient(
      circle at 0 0,
      rgba(56, 189, 248, 0.08),
      transparent 55%
    ),
    #020b1f;
  border-bottom-color: var(--tc-chat-accent);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.75), 0 0 6px rgba(56, 189, 248, 0.15);
}

.tc-chat-tab__badge {
  min-width: 1.1rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  font-size: 0.7rem;
  line-height: 1.15;
  text-align: center;
  background: var(--tc-chat-accent);
  color: #020617;
}

.tc-chat-tab__close {
  font-size: 0.7rem;
  opacity: 0.55;
  cursor: pointer;
  padding-left: 0.25rem;
  padding-right: 0.05rem;
}

.tc-chat-tab__close:hover {
  opacity: 0.92;
}

.tc-chat-tab--pm {
  background: linear-gradient(
    to right,
    rgba(99, 102, 241, 0.18),
    rgba(56, 189, 248, 0.1)
  );
  border-bottom-color: rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
}

.tc-chat-tab--pm.tc-chat-tab--active {
  background: linear-gradient(
    to right,
    rgba(99, 102, 241, 0.3),
    rgba(56, 189, 248, 0.2)
  );
  color: var(--tc-chat-accent);
  border-bottom-color: var(--tc-chat-accent);
}

.tc-chat-tab--pm::before {
  content: "👤";
  font-size: 0.78rem;
  opacity: 0.85;
  margin-right: 4px;
}

@keyframes pmAttention {
  0% {
    background-color: rgba(99, 102, 241, 0.28);
  }

  50% {
    background-color: rgba(56, 189, 248, 0.28);
  }

  to {
    background-color: rgba(99, 102, 241, 0.28);
  }
}

.tc-chat-tab--pm.tc-chat-tab--attention {
  animation: pmAttention 1.5s ease-in-out infinite;
  color: #e0ecff;
}

.tc-chat-tab--attention {
  animation: tc-tab-pulse 1.15s ease-in-out infinite;
}

@keyframes tc-tab-pulse {
  0% {
    background-color: #020b1f;
    color: var(--tc-chat-accent);
  }

  50% {
    background-color: rgba(15, 23, 42, 0.98);
    color: #e0f2fe;
  }

  to {
    background-color: #020b1f;
    color: var(--tc-chat-accent);
  }
}

.tc-chat-topic {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.9rem 0.35rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.95);
  background: radial-gradient(
      circle at top left,
      rgba(15, 23, 42, 0.85),
      transparent 60%
    ),
    var(--tc-chat-panel-soft, #02081a);
  font-size: 0.8rem;
  min-height: 1.9rem;
}

.tc-chat-topic__channel {
  font-weight: 600;
  color: var(--tc-chat-accent-soft);
  padding-right: 0.6rem;
  border-right: 1px solid rgba(30, 64, 175, 0.7);
  white-space: nowrap;
}

.tc-chat-topic__text {
  flex: 1;
  min-width: 0;
  color: var(--tc-chat-text-muted);
  opacity: 0.96;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-chat-message--action .tc-chat-message__text {
  font-style: italic;
  color: #60a5fa;
  text-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
}

.tc-chat-message--action {
  padding-left: 0.75rem;
  border-left: 3px solid rgba(59, 130, 246, 0.75);
  background: linear-gradient(
    90deg,
    rgba(59, 130, 246, 0.15),
    rgba(59, 130, 246, 0.03) 60%
  );
  border-radius: 4px;
}

.tc-chat-message--action .tc-chat-message__nick {
  display: none;
}

.tc-chat-messages {
  flex: 1;
  padding: 0.5rem 0.9rem 1.1rem;
  background: radial-gradient(
      circle at top left,
      rgba(15, 23, 42, 0.9),
      transparent 62%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(15, 23, 42, 0.9),
      transparent 65%
    ),
    var(--tc-chat-panel, #020b1f);
  overflow-y: auto;
  font-size: 0.96rem;
  line-height: 1.5;
}

.tc-chat-message {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 2px 0;
  color: var(--tc-chat-text);
  font-size: 0.96rem;
}

.tc-chat-message__time {
  width: 3.6rem;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--tc-chat-text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
  margin-right: 0.5rem;
}

.tc-chat-message__body {
  flex: 1;
  min-width: 0;
}

.tc-chat-message__header {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-right: 0.25rem;
  color: var(--tc-chat-accent-strong);
}

.tc-chat-message__meta {
  color: var(--tc-chat-text-soft);
  font-size: 0.78rem;
  margin-right: 0.25rem;
}

.tc-chat-message__nick {
  color: var(--tc-chat-accent);
}

.tc-chat-message__text {
  display: inline;
  color: var(--tc-chat-text);
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.tc-chat-message--system .tc-chat-message__header,
.tc-chat-message--system .tc-chat-message__nick,
.tc-chat-message--system .tc-chat-message__meta {
  display: none;
}

.tc-chat-message--system .tc-chat-message__text {
  color: var(--tc-chat-text-muted);
  font-size: 0.86rem;
}

.tc-chat-message--private {
  background: linear-gradient(to right, rgba(30, 64, 175, 0.12), transparent);
  border-radius: 4px;
  padding: 2px 0.35rem;
}

.tc-chat-message--private.tc-chat-message--incoming .tc-chat-message__nick {
  color: #fbbf24;
}

.tc-chat-message--private.tc-chat-message--outgoing .tc-chat-message__nick {
  color: #22c55e;
}

.tc-chat-message--self .tc-chat-message__nick {
  color: #22c55e;
}

.tc-chat-messages::-webkit-scrollbar {
  width: 10px;
}

.tc-chat-messages::-webkit-scrollbar-track {
  background: rgba(2, 10, 25, 0.35);
  border-radius: 10px;
}

.tc-chat-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    var(--tc-chat-accent-strong),
    var(--tc-chat-accent)
  );
  border-radius: 10px;
  border: 2px solid rgba(2, 10, 25, 0.55);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.45);
}

.tc-chat-messages::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    var(--tc-chat-accent),
    var(--tc-chat-accent-soft)
  );
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.tc-chat-typing {
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(148, 163, 184, 0.9);
  transition: opacity 0.15s ease-in-out;
}

.tc-chat-input {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem 0.45rem;
  border-top: 1px solid rgba(15, 23, 42, 0.7);
  background: rgba(2, 8, 20, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: none;
}

.tc-chat-input input[type="text"] {
  flex: 1;
  min-height: 2.5rem;
  border-radius: 8px;
  border: 1px solid rgba(30, 64, 175, 0.9);
  background-color: rgba(15, 23, 42, 0.95);
  color: var(--tc-chat-text);
  font-size: 0.96rem;
  padding: 0.58rem 0.75rem;
  outline: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.tc-chat-input input[type="text"]::placeholder {
  color: rgba(148, 163, 184, 0.76);
  font-size: 0.88rem;
}

.tc-chat-input input[type="text"]:focus {
  border-color: var(--tc-chat-accent-strong);
  background-color: #02091c;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.65);
}

.tc-chat-input-btn {
  min-height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--tc-chat-border-subtle);
  background: #0b1220;
  box-shadow: none;
  color: var(--tc-chat-text-soft);
  font-size: 0.86rem;
  padding: 0 0.9rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: background 0.12s ease, border-color 0.12s ease,
    transform 0.06s ease;
}

.tc-chat-input-btn:hover {
  background: #111827;
  border-color: var(--tc-chat-accent-soft);
  transform: translateY(-1px);
}

.tc-chat-input-btn:active {
  transform: translateY(0);
}

.tc-chat-input-btn--emoji {
  width: 2.5rem;
  padding: 0;
  font-size: 1.1rem;
  background: var(--tc-chat-bg, #020617);
}

.tc-chat-input-btn--send {
  background: linear-gradient(to right, #0b3a57, #0e4a72);
  border-color: rgba(30, 64, 175, 0.7);
  color: #e5f2ff;
  border-radius: 8px !important;
  padding: 0 1.1rem;
}

.tc-chat-input-btn--send:hover {
  background: linear-gradient(to right, #38bdf8, #2563eb);
  border-color: var(--tc-chat-accent-strong);
}

.tc-chat-sidebar-header {
  position: relative;
  padding: 0.65rem 0.85rem 0.5rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.95);
  background: linear-gradient(
    to right,
    var(--tc-chat-panel, #020b1c),
    var(--tc-chat-panel-soft, #020a18)
  );
}

.tc-chat-sidebar-header h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--tc-chat-text-soft);
}

.tc-chat-status {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tc-chat-accent-soft);
}

.tc-chat-sidebar-header::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  background: url(/native-chat/img/tc-logo.svg) no-repeat center;
  background-size: contain;
  opacity: 0.35;
  pointer-events: none;
}

.tc-chat-users {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.55rem 0.55rem;
  overflow-y: auto;
  font-size: 0.96rem;
  background: radial-gradient(
      circle at top,
      rgba(15, 23, 42, 0.9),
      transparent 60%
    ),
    var(--tc-chat-panel-alt, #02081a);
}

.tc-chat-users__title {
  padding: 0 0.35rem 0.55rem;
  margin: 0;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tc-chat-text-muted);
}

.tc-chat-users__item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 4px 0.55rem;
  padding-left: 1.35rem;
  border-radius: 999px;
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.06s ease;
  margin-bottom: 2px;
}

.tc-chat-users__item::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: radial-gradient(circle at 40% 40%, #4ade80, #16a34a);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.9);
}

.tc-chat-users__item--away::before {
  background: radial-gradient(
    circle at 30%0,
    rgba(249, 115, 22, 0.9),
    transparent 60%
  );
  box-shadow: 0 0 4px rgba(249, 115, 22, 0.8);
}

.tc-chat-users__item--away .tc-chat-users__name,
.tc-chat-users__name--away {
  opacity: 0.75;
  font-style: italic;
}

.tc-chat-users__item:hover {
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.95);
  transform: translateY(-1px);
}

.tc-chat-users__name {
  order: 1;
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 6px;
}

.tc-chat-users__role {
  order: 2;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 24px;
  margin-left: 8px;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.75);
  flex-shrink: 0;
}

.tc-chat-users__item--owner .tc-chat-users__name {
  color: #f97316;
}

.tc-chat-users__item--admin .tc-chat-users__name {
  color: #a855f7;
}

.tc-chat-users__item--halfop .tc-chat-users__name {
  color: #22c55e;
}

.tc-chat-users__item--voice .tc-chat-users__name {
  color: #e5e7eb;
}

.tc-chat-users__item--owner {
  position: relative;
  display: flex;
  align-items: center;
  padding: 6px 0.6rem 6px 1.4rem;
  margin-bottom: 4px;
  border-radius: 6px;
  background: linear-gradient(
    135deg,
    rgba(20, 10, 40, 0.95),
    rgba(12, 5, 28, 0.92)
  );
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.35), inset 0 0 5px rgba(0, 0, 0, 0.4);
}

.tc-chat-users__item--owner .tc-chat-users__name {
  font-weight: 700;
  color: #c084fc !important;
  letter-spacing: 0.3px;
  padding-left: 6px;
}

.tc-chat-users__item--owner .tc-chat-users__role {
  position: relative;
  width: 80px;
  height: 30px;
  margin-left: auto;
  background: 0 0 !important;
  border: 0 !important;
  color: transparent !important;
}

.tc-chat-users__item--owner .tc-chat-users__role::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(/native-chat/img/tc-logo.svg) no-repeat center;
  background-size: 55%auto;
  opacity: 0.75;
  pointer-events: none;
}

.tc-chat-users__item--admin {
  position: relative;
  display: flex;
  align-items: center;
  padding: 6px 0.6rem 6px 1.4rem;
  margin-bottom: 4px;
  border-radius: 6px;
  background: linear-gradient(
    135deg,
    rgba(10, 20, 40, 0.95),
    rgba(5, 12, 28, 0.92)
  );
  border: 1px solid rgba(248, 113, 113, 0.35);
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.25),
    inset 0 0 4px rgba(0, 0, 0, 0.35);
}

.tc-chat-users__item--admin .tc-chat-users__name {
  font-weight: 600;
  color: #fb923c !important;
  letter-spacing: 0.2px;
  padding-left: 6px;
}

.tc-chat-users__item--halfop {
  position: relative;
  display: flex;
  align-items: center;
  padding: 6px 0.6rem 6px 1.4rem;
  margin-bottom: 4px;
  border-radius: 6px;
  background: linear-gradient(
    135deg,
    rgba(10, 20, 40, 0.95),
    rgba(5, 12, 28, 0.92)
  );
  border: 1px solid rgba(74, 222, 128, 0.3);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.22),
    inset 0 0 4px rgba(0, 0, 0, 0.35);
}

.tc-chat-users__item--halfop .tc-chat-users__name {
  font-weight: 600;
  color: #bbf7d0 !important;
  letter-spacing: 0.2px;
  padding-left: 6px;
}

.tc-chat-users__item--admin .tc-chat-users__role,
.tc-chat-users__item--halfop .tc-chat-users__role {
  position: relative;
  width: 80px;
  height: 30px;
  margin-left: auto;
  margin-right: 2px;
  background: 0 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  color: transparent !important;
  overflow: hidden;
}

.tc-chat-users__item--admin .tc-chat-users__role::before,
.tc-chat-users__item--halfop .tc-chat-users__role::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(/native-chat/img/tc-logo.svg) no-repeat center;
  background-size: 50%auto;
  opacity: 0.55;
  pointer-events: none;
}

.tc-chat-users__item--admin .tc-chat-users__role::after,
.tc-chat-users__item--halfop .tc-chat-users__role::after {
  content: none;
}

.tc-chat-users__item--op {
  position: relative;
  display: flex;
  align-items: center;
  padding: 6px 0.6rem 6px 1.4rem;
  margin-bottom: 4px;
  border-radius: 6px;
  background: linear-gradient(
    135deg,
    rgba(10, 20, 40, 0.95),
    rgba(5, 12, 28, 0.92)
  );
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.25),
    inset 0 0 4px rgba(0, 0, 0, 0.35);
}

.tc-chat-users__item--op .tc-chat-users__name {
  font-weight: 600;
  color: #38bdf8 !important;
  letter-spacing: 0.2px;
  padding-left: 6px;
}

.tc-chat-users__item--op .tc-chat-users__role {
  position: relative;
  width: 80px;
  height: 30px;
  margin-left: auto;
  margin-right: 2px;
  background: 0 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  color: transparent !important;
  overflow: hidden;
}

.tc-chat-users__item--op .tc-chat-users__role::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(/native-chat/img/tc-logo.svg) no-repeat center;
  background-size: 50%auto;
  opacity: 0.55;
  pointer-events: none;
}

.tc-chat-users__item--op .tc-chat-users__role::after {
  content: none;
}

.tc-chat-users__role--op {
  color: transparent !important;
}

.tc-emoji-picker {
  position: fixed;
  z-index: 9999;
  width: 300px;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.4rem 0.4rem 0.3rem;
  background: var(--tc-chat-panel, #020617);
  border-radius: 10px;
  border: 1px solid var(--tc-chat-border-subtle, rgba(30, 64, 175, 0.9));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95),
    0 0 18px rgba(56, 189, 248, 0.3);
}

.tc-emoji-picker__grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.25rem;
}

.tc-emoji-picker__item {
  font-size: 1.1rem;
  padding: 0.15rem;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: background 0.1s ease, transform 0.05s ease;
}

.tc-emoji-picker__item:hover {
  background: #111827;
  transform: translateY(-1px);
}

.tc-chat-footer {
  max-width: 1360px;
  margin: 0 auto 0.8rem;
  padding: 0.3rem 1.6rem 0.4rem;
  font-size: 0.78rem;
  color: var(--tc-chat-text-muted);
  text-align: right;
  opacity: 0.8;
}

.tc-page-chat .tc-chat-context {
  position: fixed;
  z-index: 99999;
  min-width: 240px;
  width: 320px;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.96)
  );
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.85);
  padding: 10px;
}

.tc-page-chat .tc-chat-context__hero {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 0 0 10px 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tc-page-chat .tc-chat-context__avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tc-page-chat .tc-chat-context__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tc-page-chat .tc-chat-context__info {
  flex: 1;
  min-width: 0;
}

.tc-page-chat .tc-chat-context__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tc-page-chat .tc-chat-context__name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-page-chat .tc-chat-context__badge {
  font-size: 12px;
  opacity: 0.85;
  white-space: nowrap;
}

.tc-page-chat .tc-chat-context__subline {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 2px;
}

.tc-page-chat .tc-chat-context__subline--away {
  opacity: 0.85;
}

.tc-page-chat .tc-chat-context__profilebtn {
  border: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
  font-size: 12px;
  white-space: nowrap;
}

.tc-page-chat .tc-chat-context__profilebtn:hover {
  background: rgba(255, 255, 255, 0.11);
}

.tc-page-chat .tc-chat-context__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 0 10px;
}

.tc-page-chat .tc-chat-context__item {
  width: 100%;
  border: 0;
  background: 0 0;
  color: var(--tc-chat-text-soft);
  font-size: 0.9rem;
  line-height: 1.2;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  border-radius: 10px;
}

.tc-page-chat .tc-chat-context__item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.tc-page-chat .tc-chat-context__item:active {
  background: rgba(255, 255, 255, 0.11);
}

body.tc-embedded {
  background: 0 0;
}

.tc-embedded .tc-app-header,
.tc-embedded .tc-chat-footer {
  display: none;
}

.tc-embedded .tc-chat-main,
.tc-embedded .tc-chat-sidebar {
  box-shadow: none;
  border: 0;
  border-radius: 0;
  background: 0 0;
}

.tc-embedded .tc-chat-messages {
  background: radial-gradient(
      circle at top left,
      rgba(15, 23, 42, 0.9),
      transparent 62%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(15, 23, 42, 0.9),
      transparent 65%
    ),
    var(--tc-chat-panel, #020b1f);
}

.tc-embedded .tc-chat-sidebar {
  background: var(--tc-chat-panel-alt, #020b1c);
}

.tc-rooms {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.tc-rooms__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.tc-rooms__title-main {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--tc-chat-text-soft);
}

.tc-rooms__title-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--tc-chat-text-muted);
}

.tc-rooms__refresh-btn {
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.85);
  background: linear-gradient(to right, #0ea5e9, #2563eb);
  color: #e5f2ff;
  font-size: 0.8rem;
  padding: 0.25rem 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
  transition: background 0.12s ease, transform 0.06s ease, box-shadow 0.12s ease;
}

.tc-rooms__refresh-btn:hover {
  background: linear-gradient(to right, #38bdf8, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.tc-rooms__list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tc-rooms__empty {
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px dashed rgba(37, 99, 235, 0.7);
  color: var(--tc-chat-text-soft);
  font-size: 0.84rem;
}

.tc-rooms__item {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) auto;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  row-gap: 0.1rem;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border-radius: 0.7rem;
  background: radial-gradient(
      circle at top left,
      rgba(56, 189, 248, 0.16),
      transparent 70%
    ),
    var(--tc-chat-bg, #020617);
  border: 1px solid rgba(30, 64, 175, 0.8);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease,
    transform 0.06s ease, box-shadow 0.12s ease;
}

.tc-rooms__item:hover {
  background: radial-gradient(
      circle at top left,
      rgba(56, 189, 248, 0.28),
      transparent 70%
    ),
    #020617;
  border-color: var(--tc-chat-accent);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.tc-rooms__item-name {
  grid-column: 1/2;
  grid-row: 1/2;
  font-weight: 600;
  color: var(--tc-chat-accent-soft);
}

.tc-rooms__item-meta {
  grid-column: 2/3;
  grid-row: 1/2;
  justify-self: flex-end;
  font-size: 0.8rem;
  color: var(--tc-chat-text-muted);
}

.tc-rooms__item-topic {
  grid-column: 1/3;
  grid-row: 2/3;
  font-size: 0.79rem;
  color: var(--tc-chat-text-soft);
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .tc-chat-main {
    order: 1;
    border-radius: 10px;
  }

  .tc-chat-sidebar {
    order: 2;
    width: 100%;
    border-radius: 10px;
  }

  .tc-chat-messages {
    padding: 0.4rem 0.6rem 0.8rem;
    font-size: 0.9rem;
  }

  .tc-chat-input {
    padding: 0.4rem 0.6rem 0.45rem;
  }

  .tc-chat-input input[type="text"] {
    font-size: 0.9rem;
    padding: 0.5rem 0.6rem;
  }

  .tc-chat-users {
    font-size: 0.9rem;
    padding: 0.45rem 0.55rem 0.55rem;
  }

  .tc-chat-footer {
    max-width: 100%;
    margin: 0.1rem auto 0.6rem;
    padding: 0.2rem 1rem 0.3rem;
    font-size: 0.72rem;
    text-align: center;
  }
}

.tc-chat-main,
.tc-chat-sidebar {
  border-bottom: none !important;
}

#tc-chat-users,
#tc-chat-users .tc-chat-users__item,
#tc-chat-users .tc-chat-users__name,
#tc-chat-users .tc-chat-users__role {
  font-family: inherit !important;
  font-size: 0.95rem !important;
  line-height: 1.2 !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#tc-chat-users .tc-chat-users__item--owner .tc-chat-users__name,
#tc-chat-users .tc-chat-users__item--admin .tc-chat-users__name,
#tc-chat-users .tc-chat-users__item--op .tc-chat-users__name,
#tc-chat-users .tc-chat-users__item--halfop .tc-chat-users__name,
#tc-chat-users .tc-chat-users__item--voice .tc-chat-users__name {
  font-weight: 600 !important;
}
