/* ═══════════════════════════════════════════════════════
   tShaper-style Dark Theme
   Dense, professional, operational dashboard aesthetic
   Works on top of Bootstrap 5.3 data-bs-theme="dark"
   ═══════════════════════════════════════════════════════ */

:root {
  --bg:        #0a0c10;
  --surface:   #111318;
  --surface2:  #181b22;
  --border:    #1e2230;
  --accent:    #00e5a0;
  --accent2:   #0066ff;
  --accent3:   #ff4d6d;
  --accent4:   #ffc300;
  --text:      #e8eaf0;
  --text2:     #6b7280;
  --text3:     #9ca3af;
}

/* ── Base ───────────────────────────────────────────── */

body {
  background: var(--bg) !important;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { color: #3388ff; }

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── Scrollbar ─────────────────────────────────────── */

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #2a2f3d; }

/* ── Selection ─────────────────────────────────────── */

::selection { background: rgba(0, 229, 160, 0.2); }

/* ── Monospace data ────────────────────────────────── */

.font-monospace, code, td code, .mono {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.8em;
  color: var(--text);
}
code {
  background: var(--surface2);
  padding: 0.15em 0.45em;
  border-radius: 3px;
  font-size: 0.8em;
}

/* ── Sidebar layout ────────────────────────────────── */

.ts-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.ts-sidebar .ts-logo {
  padding: 22px 20px 6px;
  text-decoration: none;
}
.ts-sidebar .ts-logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.ts-sidebar .ts-logo-text .ts-logo-accent { color: var(--accent); }
.ts-sidebar .ts-logo-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text2);
  text-transform: uppercase;
  margin-top: 2px;
}

.ts-sidebar .ts-nav-section {
  padding: 18px 20px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text2);
}

.ts-sidebar .ts-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  color: var(--text3);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.ts-sidebar .ts-nav-link:hover {
  background: var(--surface2);
  color: var(--text);
}
.ts-sidebar .ts-nav-link.active {
  border-left-color: var(--accent);
  background: rgba(0, 229, 160, 0.05);
  color: var(--accent);
  font-weight: 600;
}
.ts-sidebar .ts-nav-link .ts-nav-icon {
  font-size: 18px;
  width: 20px;
  text-align: center;
  font-style: normal;
  line-height: 1;
  opacity: 0.7;
}
.ts-sidebar .ts-nav-link.active .ts-nav-icon {
  opacity: 1;
}
.ts-sidebar .ts-nav-link .ts-badge {
  margin-left: auto;
  background: var(--accent3);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.2;
}

.ts-sidebar .ts-sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.ts-sidebar .ts-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}
.ts-sidebar .ts-user-name {
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ts-sidebar .ts-user-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text2);
  text-transform: uppercase;
}

/* ── Main content area ─────────────────────────────── */

.ts-main {
  margin-left: 220px;
  min-height: 100vh;
}

/* ── Topbar ─────────────────────────────────────────── */

.ts-topbar {
  position: sticky; top: 0;
  height: 56px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 50;
}
.ts-topbar-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.ts-topbar-right {
  display: flex; align-items: center; gap: 14px;
}

/* Pulsing dot */
.ts-pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 5px var(--accent);
  animation: tsPulse 2s infinite;
}
@keyframes tsPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.ts-status-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--text2);
  text-transform: uppercase;
}

/* ── Content padding ───────────────────────────────── */

.ts-content {
  padding: 24px 28px;
}

/* ── Page title (used in admin) ────────────────────── */

.ts-page-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

/* ── Cards ──────────────────────────────────────────── */

.card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: #282d3a !important;
}
.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 14px 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
}
.card-body {
  color: var(--text);
  padding: 20px;
}
.card-footer {
  background: transparent !important;
  border-top: 1px solid var(--border) !important;
}

/* Card with colored top strip */
.ts-card-strip {
  position: relative;
  overflow: hidden;
}
.ts-card-strip::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
}
.ts-card-strip.strip-blue::before { background: var(--accent2); }
.ts-card-strip.strip-red::before { background: var(--accent3); }
.ts-card-strip.strip-yellow::before { background: var(--accent4); }

/* Hoverable server cards */
.ts-server-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent) !important;
}

/* ── Tables ─────────────────────────────────────────── */

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border);
  --bs-table-hover-bg: var(--surface2);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.01);
  color: var(--text);
  margin-bottom: 0;
}
.table thead {
  border-bottom: 1px solid var(--border);
}
.table thead th {
  background: transparent !important;
  color: var(--text2) !important;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 14px;
  border-bottom: none !important;
}
.table-light { --bs-table-bg: transparent !important; }
.table > :not(caption) > * > * {
  border-bottom-color: var(--border) !important;
  padding: 10px 14px;
}
.table-hover > tbody > tr:hover > * {
  background-color: var(--surface2) !important;
}
.table td {
  font-size: 0.85rem;
  vertical-align: middle;
}
.table .text-muted { color: var(--text2) !important; }
.table .fw-semibold a { color: var(--text); }
.table .fw-semibold a:hover { color: var(--accent); }

/* ── Status tags ───────────────────────────────────── */

.badge {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  border: none;
}
.badge.bg-success {
  background: rgba(0, 229, 160, 0.1) !important;
  color: var(--accent) !important;
}
.badge.bg-danger {
  background: rgba(255, 77, 109, 0.1) !important;
  color: var(--accent3) !important;
}
.badge.bg-warning {
  background: rgba(255, 195, 0, 0.1) !important;
  color: var(--accent4) !important;
}
.badge.bg-info {
  background: rgba(0, 102, 255, 0.1) !important;
  color: var(--accent2) !important;
}
.badge.bg-secondary {
  background: rgba(107, 114, 128, 0.1) !important;
  color: var(--text3) !important;
}
.badge.bg-primary {
  background: rgba(0, 102, 255, 0.1) !important;
  color: var(--accent2) !important;
}
.badge.bg-light {
  background: var(--surface2) !important;
  color: var(--text3) !important;
}

/* Status dot indicator */
.ts-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ts-dot-online  { background: var(--accent);  box-shadow: 0 0 5px var(--accent); }
.ts-dot-offline { background: var(--accent3); }
.ts-dot-warning { background: var(--accent4); }

/* ── Buttons ────────────────────────────────────────── */

.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 8px;
  padding: 8px 18px;
  transition: all 0.15s;
}

.btn-outline-secondary {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text3) !important;
}
.btn-outline-secondary:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: var(--surface2) !important;
}

.btn-primary {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #000 !important;
  font-weight: 700;
}
.btn-primary:hover {
  background: #00cc8e !important;
  border-color: #00cc8e !important;
}

.btn-outline-primary {
  color: var(--accent) !important;
  border-color: rgba(0, 229, 160, 0.3) !important;
  background: transparent !important;
}
.btn-outline-primary:hover {
  background: rgba(0, 229, 160, 0.08) !important;
  border-color: var(--accent) !important;
}
.btn-check + .btn-outline-primary {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text3) !important;
}
.btn-check:checked + .btn-outline-primary {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #000 !important;
  font-weight: 700;
}

.btn-danger {
  background: var(--accent3) !important;
  border-color: var(--accent3) !important;
  color: #fff !important;
}
.btn-outline-danger {
  color: var(--accent3) !important;
  border-color: rgba(255, 77, 109, 0.3) !important;
  background: transparent !important;
}
.btn-outline-danger:hover {
  background: rgba(255, 77, 109, 0.08) !important;
  border-color: var(--accent3) !important;
}

.btn-warning {
  background: var(--accent4) !important;
  border-color: var(--accent4) !important;
  color: #000 !important;
  font-weight: 700;
}

.btn-success {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #000 !important;
  font-weight: 700;
}
.btn-outline-success {
  color: var(--accent) !important;
  border-color: rgba(0, 229, 160, 0.3) !important;
  background: transparent !important;
}
.btn-outline-success:hover {
  background: rgba(0, 229, 160, 0.08) !important;
}

.btn-outline-light {
  color: var(--text3) !important;
  border-color: var(--border) !important;
}
.btn-outline-light:hover {
  background: var(--surface2) !important;
  color: var(--text) !important;
}

.btn-dark {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-link {
  padding: 8px 18px;
  color: var(--text3) !important;
  text-decoration: none !important;
}
.btn-link:hover {
  color: var(--text) !important;
}

/* ── Forms ──────────────────────────────────────────── */

.form-control, .form-select {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  border-radius: 8px;
  transition: border-color 0.2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(0, 229, 160, 0.1) !important;
}
.form-control::placeholder { color: var(--text2) !important; }
.form-label {
  color: var(--text3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 6px;
}
.form-text { color: var(--text2) !important; font-size: 0.75rem; }
.input-group-text {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text2) !important;
  font-size: 0.85rem;
}

/* ── Nav tabs ───────────────────────────────────────── */

.nav-tabs {
  border-bottom: 1px solid var(--border) !important;
  gap: 0;
}
.nav-tabs .nav-link {
  color: var(--text2) !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  padding: 10px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 0;
  margin-bottom: -1px;
}
.nav-tabs .nav-link:hover {
  color: var(--text) !important;
  border-bottom-color: var(--border) !important;
  background: transparent !important;
}
.nav-tabs .nav-link.active {
  background: transparent !important;
  color: var(--accent) !important;
  border-bottom: 2px solid var(--accent) !important;
}

/* Nav pills */
.nav-pills .nav-link {
  color: var(--text3);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
}
.nav-pills .nav-link.active {
  background: rgba(0, 229, 160, 0.08) !important;
  color: var(--accent) !important;
}

/* ── Alerts ─────────────────────────────────────────── */

.alert-warning {
  background: rgba(255, 195, 0, 0.06) !important;
  color: var(--accent4) !important;
  border-color: rgba(255, 195, 0, 0.15) !important;
}
.alert-danger {
  background: rgba(255, 77, 109, 0.06) !important;
  color: var(--accent3) !important;
  border-color: rgba(255, 77, 109, 0.15) !important;
}
.alert-info {
  background: rgba(0, 102, 255, 0.06) !important;
  color: var(--accent2) !important;
  border-color: rgba(0, 102, 255, 0.15) !important;
}
.alert-success {
  background: rgba(0, 229, 160, 0.06) !important;
  color: var(--accent) !important;
  border-color: rgba(0, 229, 160, 0.15) !important;
}

/* ── Toasts ─────────────────────────────────────────── */

.toast { border-radius: 8px; border: 1px solid var(--border); }
.toast.text-bg-success {
  background: var(--surface) !important;
  border-left: 3px solid var(--accent) !important;
}
.toast.text-bg-success .toast-body { color: var(--accent); }
.toast.text-bg-danger {
  background: var(--surface) !important;
  border-left: 3px solid var(--accent3) !important;
}
.toast.text-bg-danger .toast-body { color: var(--accent3); }

/* ── Progress bars ──────────────────────────────────── */

.progress {
  background: var(--border);
  border-radius: 2px;
  height: 4px;
}
.progress-bar { background: var(--accent); border-radius: 2px; }

/* ── Definition lists ──────────────────────────────── */

dt {
  color: var(--text2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 400;
}
dd { color: var(--text); font-size: 0.85rem; }

/* ── Misc bootstrap overrides ──────────────────────── */

.text-muted { color: var(--text2) !important; }
.text-success { color: var(--accent) !important; }
.text-danger { color: var(--accent3) !important; }
.text-warning { color: var(--accent4) !important; }
.bg-light { background: var(--surface) !important; }
.bg-white { background: var(--surface) !important; }
.border-bottom { border-bottom-color: var(--border) !important; }
.border-top { border-top-color: var(--border) !important; }
.border { border-color: var(--border) !important; }
hr { border-color: var(--border); opacity: 0.5; }
.shadow-sm { box-shadow: none !important; }

.list-group-item {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.list-group-item:hover { background: var(--surface2); }

/* Dropdown */
.dropdown-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.dropdown-item { color: var(--text); font-size: 0.85rem; }
.dropdown-item:hover { background: var(--surface2); color: var(--text); }

/* Modal */
.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.modal-header { border-bottom-color: var(--border); }
.modal-footer { border-top-color: var(--border); }
.btn-close { filter: invert(1) grayscale(100%) brightness(0.7); }

/* Accordion */
.accordion-item { background: var(--surface); border-color: var(--border); }
.accordion-button { background: var(--surface); color: var(--text); }
.accordion-button:not(.collapsed) {
  background: var(--surface2);
  color: var(--accent);
  box-shadow: none;
}
.accordion-button::after { filter: invert(1) brightness(0.6); }

/* Pagination */
.page-link {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}
.page-link:hover { background: var(--surface2); color: var(--text); border-color: var(--border); }
.page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}
.page-item.disabled .page-link {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text2);
}

/* ── KPI cards ──────────────────────────────────────── */

.ts-kpi-value {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ts-kpi-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text2);
  margin-top: 6px;
}
.ts-kpi-change {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}
.ts-kpi-change.up { color: var(--accent); }
.ts-kpi-change.down { color: var(--accent3); }

/* ── Event feed ─────────────────────────────────────── */

.ts-event-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.ts-event-icon.green { background: rgba(0, 229, 160, 0.1); color: var(--accent); }
.ts-event-icon.red   { background: rgba(255, 77, 109, 0.1); color: var(--accent3); }
.ts-event-icon.blue  { background: rgba(0, 102, 255, 0.1);  color: var(--accent2); }
.ts-event-icon.yellow { background: rgba(255, 195, 0, 0.1); color: var(--accent4); }

.ts-event-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text2);
}

/* ── Sparkline (div bars) ──────────────────────────── */

.ts-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 32px;
}
.ts-sparkline-bar {
  flex: 1;
  background: var(--accent);
  border-radius: 1px;
  min-height: 2px;
  opacity: 0.7;
}

/* ── FadeUp animation ──────────────────────────────── */

@keyframes tsFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ts-fade-up {
  animation: tsFadeUp 0.25s ease forwards;
}

/* ── Navbar (client legacy, if still used) ─────────── */

.navbar {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border);
  box-shadow: none !important;
  padding: 0.5rem 1rem;
}
.navbar-brand {
  color: var(--text) !important;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}
.navbar .nav-link {
  color: var(--text3) !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  padding: 0.5rem 0.75rem !important;
}
.navbar .nav-link:hover { color: var(--text) !important; }
.navbar .nav-link.text-warning { color: var(--accent4) !important; }
.navbar .text-white-50 { color: var(--text2) !important; }

/* ── Admin compat aliases ──────────────────────────── */

.admin-page-title { color: var(--text) !important; }

/* ── Featured card (billing) ───────────────────────── */

.ts-featured {
  border-color: var(--accent2) !important;
  background: linear-gradient(180deg, rgba(0, 102, 255, 0.08) 0%, var(--surface) 100%) !important;
}
.ts-featured::before { background: var(--accent2); }

/* ── Ticket active ──────────────────────────────────── */

.ts-ticket-active {
  border-left: 3px solid var(--accent) !important;
}

/* ── Smooth transitions ────────────────────────────── */

.card, .btn, .form-control, .form-select, .nav-link, .badge, .table > tbody > tr {
  transition: all 0.15s ease;
}

/* ── Inline icons (non-selectable, non-draggable) ──── */

.ts-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  vertical-align: middle;
  line-height: 1;
}
.ts-icon.lg { font-size: 32px; }
.ts-icon.xl { font-size: 48px; }
.ts-icon.green { color: var(--accent); }
.ts-icon.blue  { color: var(--accent2); }
.ts-icon.red   { color: var(--accent3); }
.ts-icon.yellow { color: var(--accent4); }
.ts-icon.muted { color: var(--text2); }

/* ── Sub-account bar ───────────────────────────────── */

.ts-subaccount-bar {
  margin-left: 220px;
  background: rgba(255, 195, 0, 0.08);
  border-bottom: 1px solid rgba(255, 195, 0, 0.2);
  color: var(--accent4);
  text-align: center;
  padding: 8px;
  font-size: 0.8rem;
}

/* ── Finance tabs ────────────────────────────────── */

.nav-tabs {
  border-bottom: 1px solid var(--border);
}
.nav-tabs .nav-link {
  color: var(--text2);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s, border-color 0.2s;
}
.nav-tabs .nav-link:hover {
  color: var(--text);
  border-bottom-color: var(--text2);
}
.nav-tabs .nav-link.active {
  color: var(--accent);
  background: transparent;
  border-bottom-color: var(--accent);
}
.nav-tabs .nav-link .ts-icon {
  font-size: 14px;
  vertical-align: -1px;
  margin-right: 4px;
}

/* ── reCAPTCHA v2 ────────────────────────────────── */

.recaptcha-wrap {
  display: inline-flex;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #222;
  box-shadow: 0 0 0 1px var(--border), 0 2px 8px rgba(0,0,0,0.35);
}
/* Overlay that covers the white internal border of the reCAPTCHA iframe */
.recaptcha-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px #222;
  pointer-events: none;
  z-index: 10;
}
.recaptcha-wrap .g-recaptcha {
  display: block;
  line-height: 0;
}

/* ── Deposit provider cards ──────────────────────── */

.deposit-provider {
  background: var(--surface);
  border-color: var(--border) !important;
  transition: border-color 0.2s, background 0.2s;
}
.deposit-provider:hover {
  border-color: var(--text2) !important;
  background: var(--surface2);
}
.deposit-provider.selected {
  border-color: var(--accent) !important;
  background: rgba(0, 229, 160, 0.05);
}

/* ── Settings inner sidebar ───────────────────────── */

.ts-settings-sidebar { width: 220px; }

/* ── Mobile hamburger button ──────────────────────── */

.ts-mobile-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}

/* ── Mobile sidebar overlay backdrop ──────────────── */

.ts-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  -webkit-tap-highlight-color: transparent;
}
.ts-sidebar-backdrop.show { display: block; }

/* ── Responsive: Tablet & Mobile (< 992px) ───────── */

@media (max-width: 991.98px) {
  .ts-mobile-toggle { display: flex; }

  .ts-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 150;
  }
  .ts-sidebar.open {
    transform: translateX(0);
  }

  .ts-main {
    margin-left: 0 !important;
  }
  .ts-subaccount-bar {
    margin-left: 0 !important;
  }

  .ts-topbar {
    padding: 0 16px 0 56px;
  }

  .ts-content {
    padding: 16px;
    padding-top: 60px;
  }
  /* Admin topbar takes care of spacing, so reset */
  .ts-topbar + .ts-content,
  .ts-topbar ~ main.ts-content {
    padding-top: 16px;
  }

  /* Tables: horizontal scroll */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }

  /* Nav tabs: scrollable */
  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .nav-tabs .nav-link {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* KPI values smaller */
  .ts-kpi-value { font-size: 22px; }

  /* Cards: reduce inner padding */
  .card-body { padding: 14px; }
  .card-header { padding: 12px 14px; }

  /* Page title */
  .ts-page-title { font-size: 1.1rem; }

  /* Settings inner sidebar → horizontal on mobile */
  .ts-settings-sidebar {
    width: 100% !important;
  }
  .ts-settings-sidebar .card-body {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ts-settings-sidebar .card-body::-webkit-scrollbar { display: none; }
  .ts-settings-sidebar .card-body > a {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ── Responsive: Small phones (< 576px) ──────────── */

@media (max-width: 575.98px) {
  .ts-content {
    padding: 12px;
    padding-top: 56px;
  }
  .ts-topbar + .ts-content,
  .ts-topbar ~ main.ts-content {
    padding-top: 12px;
  }

  .ts-topbar {
    height: 48px;
    padding: 0 12px 0 52px;
  }
  .ts-topbar-title { font-size: 13px; }
  .ts-topbar-right { gap: 8px; }
  .ts-status-label { display: none; }

  /* Buttons: ensure touch-friendly sizing */
  .btn { padding: 8px 14px; font-size: 0.8rem; }
  .btn-sm { padding: 6px 10px; font-size: 11px; }

  /* KPI cards stacking */
  .ts-kpi-value { font-size: 20px; }

  /* Forms */
  .card-body { padding: 12px; }

  /* Definition lists */
  dl.row > dt, dl.row > dd { font-size: 0.8rem; }

  /* Modal: full-width on small screens */
  .modal-dialog {
    margin: 8px;
  }

  /* Toast positioning */
  .toast-container {
    left: 8px !important;
    right: 8px !important;
    padding: 8px !important;
  }
  .toast-container .toast {
    width: 100%;
  }

  /* Badge smaller */
  .badge { font-size: 8px; padding: 2px 6px; }

  /* Hide long texts */
  .d-none-mobile { display: none !important; }
}
