/* TelephonAI shared design system (clean + minimal).
   Loaded on all pages to keep theme + light-mode overrides consistent. */

:root {
  /* Dark by default; theme.js toggles `.light-mode` on `html` + `body`. */
  color-scheme: dark;

  /* Base palette (dark) */
  --tp-bg: #0b1220;
  --tp-surface: #0f172a;
  --tp-surface-2: #111c32;
  --tp-border: rgba(148, 163, 184, 0.16);
  --tp-text: #e5e7eb;
  --tp-muted: #94a3b8;

  /* Brand (v4): Teal + Ember */
  --tp-primary: #14b8a6;
  --tp-primary-600: #0d9488;
  --tp-primary-700: #0f766e;
  --tp-secondary: #f97316;
  --tp-secondary-600: #ea580c;

  /* Interaction */
  --tp-focus: rgba(20, 184, 166, 0.55);
  --tp-glow-1: rgba(20, 184, 166, 0.16);
  --tp-glow-2: rgba(249, 115, 22, 0.14);
}

html,
body {
  height: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

::selection {
  background: rgba(20, 184, 166, 0.24);
}

/* Consistent focus ring across the platform (Tailwind pages already add rings to inputs). */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--tp-focus);
  outline-offset: 2px;
}

/* Subtle scrollbars (works in Chromium + Firefox). */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.32);
}

/* Light mode support (the platform uses a 'light-mode' class toggled by static/js/theme.js). */
.light-mode {
  color-scheme: light;

  /* Base palette (light) */
  --tp-bg: #f8fafc;
  --tp-surface: #ffffff;
  --tp-surface-2: #f1f5f9;
  --tp-border: #e2e8f0;
  --tp-text: #0f172a;
  --tp-muted: #475569;

  background: var(--tp-bg) !important;
  color: var(--tp-text) !important;
}

.light-mode body {
  background: radial-gradient(900px 520px at 16% 8%, var(--tp-glow-1), transparent 62%),
    radial-gradient(860px 520px at 84% 12%, var(--tp-glow-2), transparent 60%),
    var(--tp-bg) !important;
}

.light-mode .bg-slate-950 {
  background: var(--tp-bg) !important;
}
.light-mode .bg-slate-900 {
  background: var(--tp-surface) !important;
}
.light-mode .bg-slate-900\/80 {
  background: rgba(255, 255, 255, 0.92) !important;
}
.light-mode .bg-slate-900\/95 {
  background: rgba(255, 255, 255, 0.94) !important;
}
.light-mode .bg-slate-900\/70 {
  background: rgba(255, 255, 255, 0.88) !important;
}
.light-mode .bg-slate-900\/60 {
  background: rgba(255, 255, 255, 0.86) !important;
}
.light-mode .bg-slate-900\/50 {
  background: rgba(255, 255, 255, 0.86) !important;
}
.light-mode .bg-slate-900\/40 {
  background: rgba(255, 255, 255, 0.82) !important;
}
.light-mode .bg-slate-800 {
  background: var(--tp-surface-2) !important;
}
.light-mode .bg-slate-800\/50,
.light-mode .bg-slate-800\/30 {
  background: rgba(241, 245, 249, 0.82) !important;
}
.light-mode .bg-slate-800\/70 {
  background: rgba(241, 245, 249, 0.92) !important;
}
.light-mode .bg-slate-800\/60 {
  background: rgba(241, 245, 249, 0.9) !important;
}
.light-mode .bg-slate-800\/80 {
  background: rgba(241, 245, 249, 0.96) !important;
}
.light-mode .bg-slate-950\/95 {
  background: rgba(255, 255, 255, 0.96) !important;
}
.light-mode .bg-slate-950\/80 {
  background: rgba(246, 247, 251, 0.88) !important;
}
.light-mode .bg-slate-950\/70 {
  background: rgba(255, 255, 255, 0.88) !important;
}
.light-mode .bg-slate-950\/60 {
  background: rgba(255, 255, 255, 0.86) !important;
}
.light-mode .bg-slate-950\/50 {
  background: rgba(255, 255, 255, 0.84) !important;
}
.light-mode .bg-slate-950\/40 {
  background: rgba(241, 245, 249, 0.9) !important;
}
.light-mode .bg-slate-950\/30 {
  background: rgba(241, 245, 249, 0.82) !important;
}
.light-mode .bg-slate-950\/20 {
  background: rgba(241, 245, 249, 0.74) !important;
}
.light-mode .bg-slate-700 {
  background: #e2e8f0 !important;
}
.light-mode .bg-slate-700\/60 {
  background: rgba(226, 232, 240, 0.82) !important;
}
.light-mode .bg-slate-700\/50 {
  background: rgba(226, 232, 240, 0.72) !important;
}
.light-mode .bg-slate-700\/40 {
  background: rgba(226, 232, 240, 0.6) !important;
}
.light-mode .border-slate-800,
.light-mode .border-slate-700 {
  border-color: var(--tp-border) !important;
}
.light-mode .border-slate-600 {
  border-color: #cbd5e1 !important;
}
.light-mode .border-slate-800\/70 {
  border-color: rgba(226, 232, 240, 0.72) !important;
}
.light-mode .border-slate-800\/80 {
  border-color: rgba(226, 232, 240, 0.78) !important;
}
.light-mode .border-slate-700\/70 {
  border-color: rgba(226, 232, 240, 0.72) !important;
}
.light-mode .border-slate-700\/60 {
  border-color: rgba(226, 232, 240, 0.62) !important;
}
.light-mode .border-slate-700\/50 {
  border-color: rgba(226, 232, 240, 0.54) !important;
}
.light-mode .border-slate-700\/40 {
  border-color: rgba(226, 232, 240, 0.46) !important;
}
.light-mode .border-slate-600\/70 {
  border-color: rgba(203, 213, 225, 0.78) !important;
}

/* Hover utility overrides (Tailwind uses escaped class names in CSS). */
.light-mode .hover\:bg-slate-700:hover {
  background: rgba(226, 232, 240, 0.8) !important;
}
.light-mode .hover\:bg-slate-800:hover {
  background: rgba(241, 245, 249, 0.92) !important;
}
.light-mode .hover\:bg-slate-800\/70:hover {
  background: rgba(241, 245, 249, 0.92) !important;
}
.light-mode .hover\:bg-slate-800\/60:hover {
  background: rgba(241, 245, 249, 0.9) !important;
}
.light-mode .hover\:bg-slate-800\/80:hover {
  background: rgba(241, 245, 249, 0.96) !important;
}
.light-mode .hover\:bg-slate-700\/50:hover {
  background: rgba(226, 232, 240, 0.74) !important;
}
.light-mode .text-white {
  color: var(--tp-text) !important;
}
.light-mode :is(
    .bg-blue-600,
    .bg-blue-500,
    .bg-indigo-600,
    .bg-indigo-500,
    .bg-purple-600,
    .bg-purple-500,
    .bg-emerald-600,
    .bg-green-600,
    .bg-red-600,
    .bg-amber-500
  ).text-white {
  color: #ffffff !important;
}
.light-mode :is(
    .bg-blue-600,
    .bg-blue-500,
    .bg-indigo-600,
    .bg-indigo-500,
    .bg-purple-600,
    .bg-purple-500,
    .bg-emerald-600,
    .bg-green-600,
    .bg-red-600,
    .bg-amber-500
  )
  .text-white {
  color: #ffffff !important;
}
.light-mode .text-slate-200 {
  color: #1f2937 !important;
}
.light-mode .text-slate-300,
.light-mode .text-slate-400 {
  color: #475569 !important;
}
.light-mode .text-slate-500 {
  color: #64748b !important;
}
.light-mode .text-slate-600 {
  color: #475569 !important;
}

.light-mode .shadow-blue-600\/20,
.light-mode .shadow-blue-600\/40 {
  box-shadow: 0 18px 45px rgba(14, 165, 233, 0.16) !important;
}
.light-mode .shadow-indigo-500\/20 {
  box-shadow: 0 18px 45px rgba(14, 165, 233, 0.16) !important;
}

.light-mode .hover\:shadow-\[0_18px_40px_rgba\(59\,130\,246\,0\.25\)\]:hover {
  box-shadow: 0 18px 45px rgba(14, 165, 233, 0.18) !important;
}

.light-mode input:not([type="checkbox"]):not([type="radio"]),
.light-mode textarea,
.light-mode select {
  color: var(--tp-text) !important;
  background-color: var(--tp-surface) !important;
  border-color: var(--tp-border) !important;
}

.light-mode input::placeholder,
.light-mode textarea::placeholder {
  color: #94a3b8 !important;
}

/* Brand remap for Tailwind utilities used across templates. */
.light-mode .text-blue-200,
.light-mode .text-blue-300,
.light-mode .text-blue-400,
.light-mode .text-sky-300,
.light-mode .text-sky-400 {
  color: var(--tp-primary-700) !important;
}
.light-mode .text-indigo-200,
.light-mode .text-indigo-300,
.light-mode .text-indigo-400,
.light-mode .text-indigo-500 {
  color: var(--tp-primary-700) !important;
}
.light-mode .text-purple-200,
.light-mode .text-purple-300,
.light-mode .text-purple-400,
.light-mode .text-violet-300,
.light-mode .text-violet-400 {
  color: var(--tp-secondary) !important;
}
.light-mode .bg-blue-600,
.light-mode .bg-blue-500 {
  background-color: var(--tp-primary-600) !important;
}
.light-mode .bg-indigo-600,
.light-mode .bg-indigo-500 {
  background-color: var(--tp-primary-600) !important;
}
.light-mode .bg-indigo-600\/80 {
  background-color: rgba(3, 105, 161, 0.9) !important;
}
.light-mode .hover\:bg-blue-700:hover,
.light-mode .hover\:bg-blue-600:hover {
  background-color: var(--tp-primary-700) !important;
}
.light-mode .hover\:bg-indigo-500:hover,
.light-mode .hover\:bg-indigo-600:hover {
  background-color: var(--tp-primary-700) !important;
}
.light-mode .bg-purple-600,
.light-mode .bg-purple-500 {
  background-color: var(--tp-secondary) !important;
}
.light-mode .hover\:bg-purple-700:hover,
.light-mode .hover\:bg-purple-600:hover {
  background-color: var(--tp-secondary-600) !important;
}
.light-mode .border-blue-500\/20,
.light-mode .border-blue-500\/30,
.light-mode .border-blue-500\/60,
.light-mode .border-blue-500 {
  border-color: rgba(14, 165, 233, 0.32) !important;
}
.light-mode .border-indigo-500,
.light-mode .border-indigo-500\/60 {
  border-color: rgba(14, 165, 233, 0.34) !important;
}
.light-mode .hover\:border-indigo-400:hover,
.light-mode .hover\:border-indigo-500\/60:hover {
  border-color: rgba(14, 165, 233, 0.5) !important;
}
.light-mode .border-purple-500\/20,
.light-mode .border-purple-500\/30,
.light-mode .border-purple-500 {
  border-color: rgba(99, 102, 241, 0.28) !important;
}
.light-mode .bg-blue-500\/10,
.light-mode .bg-blue-500\/20,
.light-mode .bg-blue-500\/30 {
  background-color: rgba(14, 165, 233, 0.1) !important;
}
.light-mode .bg-indigo-500\/10,
.light-mode .bg-indigo-500\/15,
.light-mode .bg-indigo-500\/20,
.light-mode .bg-indigo-500\/30 {
  background-color: rgba(14, 165, 233, 0.12) !important;
}
.light-mode .bg-purple-500\/10,
.light-mode .bg-purple-500\/20 {
  background-color: rgba(99, 102, 241, 0.1) !important;
}
.light-mode .focus\:border-blue-500:focus {
  border-color: rgba(14, 165, 233, 0.6) !important;
}
.light-mode .focus\:ring-blue-500\/20:focus {
  --tw-ring-color: rgba(14, 165, 233, 0.22) !important;
}

/* Tailwind gradients: blue->purple becomes teal->violet. */
.light-mode .from-blue-500 {
  --tw-gradient-from: var(--tp-primary) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(14, 165, 233, 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
.light-mode .from-blue-600 {
  --tw-gradient-from: var(--tp-primary-600) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(2, 132, 199, 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
.light-mode .to-purple-600,
.light-mode .to-purple-700 {
  --tw-gradient-to: var(--tp-secondary) var(--tw-gradient-to-position) !important;
}
.light-mode .to-purple-500 {
  --tw-gradient-to: rgba(99, 102, 241, 0.9) var(--tw-gradient-to-position) !important;
}
.light-mode .via-purple-500 {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(99, 102, 241, 0.82) var(--tw-gradient-via-position),
    var(--tw-gradient-to) !important;
}

.light-mode .from-blue-700,
.light-mode .hover\:from-blue-700:hover {
  --tw-gradient-from: var(--tp-primary-700) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(3, 105, 161, 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
.light-mode .hover\:from-indigo-500:hover,
.light-mode .from-indigo-500 {
  --tw-gradient-from: var(--tp-primary) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(14, 165, 233, 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
.light-mode .from-indigo-600 {
  --tw-gradient-from: var(--tp-primary-600) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(2, 132, 199, 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
.light-mode .hover\:from-indigo-500:hover,
.light-mode .hover\:from-indigo-600:hover {
  --tw-gradient-from: var(--tp-primary-600) var(--tw-gradient-from-position) !important;
}
.light-mode .hover\:to-purple-700:hover,
.light-mode .hover\:to-purple-600:hover,
.light-mode .hover\:to-purple-500:hover {
  --tw-gradient-to: var(--tp-secondary) var(--tw-gradient-to-position) !important;
}

/* App shell v4: sidebar navigation + mobile drawer + glass content frame. */
body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", "Inter", sans-serif;
  background: radial-gradient(980px 620px at 12% -8%, rgba(20, 184, 166, 0.2), transparent 60%),
    radial-gradient(860px 540px at 88% -12%, rgba(249, 115, 22, 0.18), transparent 62%), var(--tp-bg);
  color: var(--tp-text);
}

.tp-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
  flex: 1 1 auto;
}

.tp-content-shell {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.5rem 0.8rem 1rem;
  overflow-x: hidden;
}

.tp-main {
  min-height: calc(100vh - 5.75rem);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.5));
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}

body.tp-auth-page,
body.workspace-page-body {
  /* Override the dual teal+orange radial gradients of `body` : on
     these pages they appeared as colored stripes at the bottom edge
     that the user did not like. Pure uniform dark background. */
  background: var(--tp-bg);
}

body.tp-auth-page .tp-shell {
  display: flex;
  grid-template-columns: none !important;
}

body.tp-auth-page .tp-content-shell {
  padding: 0.95rem 1rem 1.15rem;
}

body.tp-auth-page .tp-main {
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-shell {
  min-height: calc(100vh - 2.1rem);
  display: grid;
  gap: 0.75rem;
}

.auth-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(4, 11, 26, 0.82);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.24);
  backdrop-filter: blur(14px);
}

.auth-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  color: var(--tp-text);
  text-decoration: none;
}

.auth-topbar-mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.82rem;
  overflow: hidden;
  flex: 0 0 auto;
  box-shadow: 0 10px 22px rgba(20, 184, 166, 0.16);
}

.auth-topbar-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.auth-topbar-copy {
  display: grid;
  gap: 0.08rem;
}

.auth-topbar-copy strong {
  color: var(--tp-text);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-topbar-copy small {
  color: var(--tp-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.auth-topbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.auth-topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.38);
  color: var(--tp-text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.auth-topbar-link:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 166, 0.34);
  background: rgba(15, 23, 42, 0.58);
}

.auth-icon-btn,
.auth-topbar #lang-toggle {
  min-height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.38);
  color: var(--tp-text);
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.auth-icon-btn {
  width: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-icon-btn:hover,
.auth-topbar #lang-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 166, 0.34);
  background: rgba(15, 23, 42, 0.58);
}

.auth-topbar #lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.7rem;
}

.auth-topbar #lang-current {
  display: inline-flex;
  align-items: center;
}

.site-lang-current {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.site-lang-current-chip {
  min-width: 1.95rem;
  min-height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--tp-text);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.site-lang-current-name {
  color: var(--tp-text);
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-topbar #lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  z-index: 80;
  /* Auto-fit longest label (e.g. NL 'Niederländisch') instead of clipping
     a fixed width. Min keeps short labels from collapsing. */
  width: max-content;
  min-width: 10rem;
  max-width: 16rem;
  padding: 0.38rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(8, 15, 28, 0.94);
  box-shadow: 0 18px 38px rgba(2, 8, 23, 0.34);
  backdrop-filter: blur(16px);
}

.auth-lang-option {
  width: 100%;
  display: inline-flex;
  align-items: center;
  /* Tighter spacing so chip + flag + name read as one unit. */
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--tp-text);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.auth-lang-option:hover {
  background: rgba(30, 41, 59, 0.72);
}

/* Auth flag badges — uniform 16x11 ratio for visual parity across all 4. */
.auth-flag {
  display: inline-block;
  width: 1.1rem;
  height: 0.78rem;
  border-radius: 2px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
.auth-flag--gb { background-image: url('/static/flags/united-kingdom.svg?v=20260315'); background-color: #012169; }
.auth-flag--fr { background-image: url('/static/flags/france.svg?v=20260519'); background-color: #FFFFFF; }
.auth-flag--de { background-image: url('/static/flags/germany.svg?v=20260519'); background-color: #000000; }
.auth-flag--nl { background-image: url('/static/flags/netherlands.svg?v=20260519'); background-color: #FFFFFF; }

.auth-lang-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--tp-text);
  font-size: 0.58rem;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.auth-stage {
  display: flex;
  flex: 1 1 auto;
}

.auth-surface {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  padding: 0;
  align-items: center;
}

.auth-kicker,
.auth-form-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 1.55rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-story-title {
  margin: 0;
  color: var(--tp-text);
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.auth-story-title .accent,
.auth-story-accent {
  display: inline;
  background: linear-gradient(135deg, #67e8f9, #38bdf8 42%, #14b8a6 76%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-story-lead {
  margin: 0;
  max-width: 42rem;
  color: var(--tp-muted);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.7;
}

.auth-feature-list {
  display: grid;
  gap: 0.9rem;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(8, 15, 28, 0.48);
}

.auth-feature-icon {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-feature-icon.is-aqua {
  color: #67e8f9;
  background: rgba(14, 165, 233, 0.14);
}

.auth-feature-icon.is-indigo {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.14);
}

.auth-feature-icon.is-mint {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
}

.auth-feature strong {
  display: block;
  color: var(--tp-text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-feature p {
  margin: 0.22rem 0 0;
  color: var(--tp-muted);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.55;
}

.auth-story-switch,
.auth-form-switch {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  color: var(--tp-muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.auth-story-switch a,
.auth-form-switch a {
  color: #7dd3fc;
  font-weight: 700;
  text-decoration: none;
}

.auth-story-switch a:hover,
.auth-form-switch a:hover {
  color: #38bdf8;
}

.auth-form-panel {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: 2rem 2.5rem;
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-form-panel h2 {
  margin: 0;
  color: var(--tp-text);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.auth-form-copy {
  margin: -0.2rem 0 0;
  color: var(--tp-muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.55;
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(248, 113, 113, 0.26);
  background: rgba(127, 29, 29, 0.14);
  color: #fca5a5;
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-form {
  display: grid;
  gap: 0.85rem;
}

.auth-field {
  display: grid;
  gap: 0.42rem;
}

.auth-field label {
  color: var(--tp-text);
  font-size: 0.8rem;
  font-weight: 600;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.92rem;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.7rem 0.9rem 0.7rem 2.7rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.44);
  color: var(--tp-text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.auth-input::placeholder {
  color: #64748b;
}

.auth-input:hover {
  border-color: rgba(148, 163, 184, 0.28);
}

.auth-input:focus {
  border-color: rgba(20, 184, 166, 0.42);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
  background: rgba(15, 23, 42, 0.6);
  outline: none;
}

.auth-field-note,
.auth-legal {
  color: var(--tp-muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.5;
}

.auth-submit {
  width: 100%;
  min-height: 2.9rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb 56%, #14b8a6 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  filter: saturate(1.04);
  box-shadow: 0 22px 38px rgba(37, 99, 235, 0.28);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit i {
  margin-right: 0.48rem;
}

.auth-form-footer {
  display: grid;
  gap: 0.5rem;
}

.auth-illustration {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  border: none;
  border-radius: 24px;
  background:
    radial-gradient(260px 210px at 18% 18%, rgba(14, 165, 233, 0.08), transparent 70%),
    radial-gradient(240px 190px at 82% 20%, rgba(20, 184, 166, 0.08), transparent 70%);
  overflow: hidden;
}

.auth-illustration::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(148, 163, 184, 0.14) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.2;
  pointer-events: none;
}

.auth-illustration-art {
  width: min(100%, 420px);
  height: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 24px 40px rgba(2, 6, 23, 0.45));
}

.auth-illustration .auth-ill-card {
  fill: rgba(10, 18, 32, 0.88);
  stroke: rgba(148, 163, 184, 0.28);
  stroke-width: 1.2;
}

.auth-illustration .auth-ill-orb {
  fill: rgba(14, 165, 233, 0.5);
}

.auth-illustration .auth-ill-orb-soft {
  fill: rgba(20, 184, 166, 0.42);
}

.auth-illustration .auth-ill-head {
  fill: #f1f5f9;
}

.auth-illustration .auth-ill-body {
  fill: rgba(14, 165, 233, 0.42);
}

.auth-illustration .auth-ill-arm,
.auth-illustration .auth-ill-line {
  fill: none;
  stroke: rgba(148, 163, 184, 0.65);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.auth-illustration .auth-ill-screen {
  fill: rgba(12, 20, 36, 0.96);
  stroke: rgba(148, 163, 184, 0.32);
  stroke-width: 1.2;
}

.auth-illustration .auth-ill-check {
  fill: rgba(20, 184, 166, 0.5);
}

.auth-illustration .auth-ill-checkmark {
  fill: none;
  stroke: rgba(20, 184, 166, 0.9);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-illustration .auth-ill-accent {
  fill: rgba(56, 189, 248, 0.5);
}

.auth-illustration .auth-ill-signal {
  fill: none;
  stroke: rgba(56, 189, 248, 0.7);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.auth-illustration .auth-ill-badge {
  fill: rgba(249, 115, 22, 0.32);
  stroke: rgba(249, 115, 22, 0.55);
  stroke-width: 1.2;
}

.auth-illustration .auth-ill-plus {
  fill: none;
  stroke: rgba(249, 115, 22, 0.95);
  stroke-width: 2.6;
  stroke-linecap: round;
}

.auth-illustration.is-login {
  background:
    radial-gradient(260px 210px at 18% 18%, rgba(56, 189, 248, 0.22), transparent 70%),
    radial-gradient(240px 190px at 82% 20%, rgba(20, 184, 166, 0.2), transparent 70%),
    linear-gradient(165deg, rgba(10, 18, 34, 0.94), rgba(6, 12, 24, 0.98));
}

.auth-illustration.is-signup {
  background:
    radial-gradient(260px 210px at 18% 18%, rgba(249, 115, 22, 0.22), transparent 70%),
    radial-gradient(240px 190px at 82% 20%, rgba(34, 197, 94, 0.2), transparent 70%),
    linear-gradient(165deg, rgba(12, 18, 32, 0.94), rgba(6, 12, 24, 0.98));
}

@media (max-width: 1024px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-form-panel {
    order: 1;
    max-width: 100%;
  }

  .auth-illustration {
    order: 2;
    min-height: 320px;
  }
}

@media (max-width: 767px) {
  body.tp-auth-page .tp-content-shell {
    padding: 0.75rem;
  }

  .auth-shell {
    min-height: calc(100vh - 1.5rem);
  }

  .auth-topbar {
    padding: 0.58rem 0.75rem;
    border-radius: 18px;
  }

  .auth-topbar-copy small,
  .auth-topbar-link span {
    display: none;
  }

  .auth-surface {
    border-radius: 24px;
  }

  .auth-grid {
    padding: 0.85rem;
  }

  .auth-form-panel,
  .auth-illustration {
    padding: 1rem;
    border-radius: 20px;
  }

  .auth-topbar-actions {
    gap: 0.45rem;
  }

  .auth-topbar #lang-toggle {
    padding: 0.42rem 0.6rem;
  }

  .auth-topbar #lang-menu {
    width: 10.5rem;
  }
}

.tp-mobile-bar {
  position: sticky;
  top: 0;
  z-index: 70;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--tp-border);
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(14px);
}

.tp-mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--tp-text);
  text-decoration: none;
}

.tp-mobile-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tp-mobile-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.tp-mobile-title {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.tp-mobile-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.tp-mobile-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--tp-text);
  background: rgba(30, 41, 59, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.tp-mobile-icon:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 166, 0.42);
  background: rgba(15, 118, 110, 0.25);
}

.tp-mobile-actions details {
  position: relative;
}

.tp-mobile-actions summary {
  list-style: none;
}

.tp-mobile-actions summary::-webkit-details-marker {
  display: none;
}

.tp-mobile-menu {
  display: none;
  position: absolute;
  right: 0;
  margin-top: 0.55rem;
  width: min(20.5rem, calc(100vw - 1rem));
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 1rem;
  padding: 0.45rem;
  background: rgba(15, 23, 42, 0.97);
  box-shadow: 0 24px 44px rgba(2, 6, 23, 0.48);
  backdrop-filter: blur(16px);
  z-index: 90;
}

.tp-mobile-actions details[open] .tp-mobile-menu {
  display: block;
  animation: tpMenuIn 0.2s ease;
}

.tp-mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 0.72rem;
  padding: 0.65rem 0.7rem;
  color: var(--tp-text);
  text-decoration: none;
  font-size: 0.9rem;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tp-mobile-menu-item:hover {
  border-color: rgba(20, 184, 166, 0.28);
  background: rgba(20, 184, 166, 0.12);
}

.tp-mobile-menu-item.is-active {
  color: #ffffff;
  border-color: rgba(20, 184, 166, 0.4);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.3), rgba(249, 115, 22, 0.2));
}

.tp-mobile-divider {
  height: 1px;
  margin: 0.45rem 0;
  background: rgba(148, 163, 184, 0.2);
}

.tp-mobile-lang {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 0.35rem 0.62rem;
  margin: 0.2rem 0.2rem 0.25rem 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tp-text);
  background: rgba(30, 41, 59, 0.76);
  cursor: pointer;
}

.tp-mobile-lang:hover {
  border-color: rgba(20, 184, 166, 0.44);
  background: rgba(20, 184, 166, 0.18);
}

.tp-sidebar {
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(8, 15, 30, 0.92);
  backdrop-filter: blur(20px);
  padding: 1.25rem 0.9rem;
  overflow-y: auto;
}

.tp-sidebar-top,
.tp-sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.tp-brand-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.25rem;
}

.tp-brand {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  text-decoration: none;
  color: var(--tp-text);
}

.tp-sidebar-toggle {
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 auto;
  border: none;
  border-radius: 0.55rem;
  color: rgba(148, 163, 184, 0.7);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.72rem;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.tp-sidebar-toggle:hover {
  color: var(--tp-text);
  background: rgba(148, 163, 184, 0.1);
}

.tp-brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tp-brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.tp-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.06rem;
}

.tp-brand-copy strong {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.tp-nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tp-nav-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.45);
  padding-left: 0.75rem;
}

.tp-create-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px dashed rgba(20, 184, 166, 0.35);
  border-radius: 0.75rem;
  color: rgba(20, 184, 166, 0.9);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(20, 184, 166, 0.06);
  transition: all 0.2s ease;
}

.tp-create-btn:hover {
  border-color: rgba(20, 184, 166, 0.55);
  color: #14b8a6;
  background: rgba(20, 184, 166, 0.12);
}

.tp-tab-nav {
  display: grid;
  gap: 0.15rem;
}

.tp-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  border: none;
  border-radius: 0.65rem;
  padding: 0.6rem 0.75rem;
  color: rgba(148, 163, 184, 0.85);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  background: transparent;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.tp-tab-indicator {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, #14b8a6, #0ea5e9);
  transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tp-tab i {
  width: 1.1rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.5);
  transition: color 0.18s ease;
}

.tp-tab:hover {
  color: var(--tp-text);
  background: rgba(148, 163, 184, 0.08);
}

.tp-tab:hover i {
  color: rgba(148, 163, 184, 0.75);
}

.tp-tab.is-active {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.1);
}

.tp-tab.is-active .tp-tab-indicator {
  height: 1.2rem;
}

.tp-tab.is-active i {
  color: #14b8a6;
}

.tp-sidebar-tools {
  display: flex;
  gap: 0.4rem;
}

.tp-sidebar-tools #lang-dropdown {
  flex: 1 1 auto;
}

.tp-tool-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0.6rem;
  padding: 0.45rem 0.6rem;
  color: rgba(148, 163, 184, 0.7);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(15, 23, 42, 0.4);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.tp-tool-btn:hover {
  color: var(--tp-text);
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(148, 163, 184, 0.08);
}

.tp-tool-icon {
  width: auto !important;
  justify-content: center !important;
  aspect-ratio: 1;
  padding: 0.45rem !important;
}

#lang-current {
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.tp-lang-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.45rem);
  min-width: 11rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0.75rem;
  padding: 0.35rem;
  background: rgba(12, 20, 38, 0.98);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  z-index: 110;
  display: grid;
  gap: 0.15rem;
}

.tp-lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: none;
  border-radius: 0.5rem;
  padding: 0.45rem 0.54rem;
  color: rgba(148, 163, 184, 0.85);
  background: transparent;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tp-lang-option:hover {
  color: var(--tp-text);
  background: rgba(148, 163, 184, 0.1);
}

.tp-lang-chip {
  min-width: 2rem;
  height: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 0.35rem;
  padding: 0 0.4rem;
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.5);
}

.tp-profile {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 0.85rem;
  padding: 0.65rem 0.7rem;
  background: rgba(15, 23, 42, 0.5);
  overflow: hidden;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tp-profile::before {
  content: none;
}

.tp-profile:hover {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.65);
}

.tp-avatar {
  position: relative;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  border: none;
  background: linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%);
  flex-shrink: 0;
}

.tp-avatar::after {
  content: none;
}

.tp-profile-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.tp-profile-copy strong {
  color: var(--tp-text);
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-profile-copy small {
  display: block;
  color: rgba(148, 163, 184, 0.6);
  font-size: 0.68rem;
  line-height: 1.2;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-logout {
  position: relative;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.5rem;
  color: rgba(148, 163, 184, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.8rem;
  background: transparent;
  flex-shrink: 0;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.tp-logout:hover {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.1);
}

@media (min-width: 768px) {
  .tp-shell {
    display: grid;
    grid-template-columns: 16.8rem minmax(0, 1fr);
  }

  .tp-content-shell {
    padding: 1.15rem 1.35rem 1.25rem;
    grid-column: 2;
  }

  .tp-main {
    min-height: calc(100vh - 2.4rem);
  }

  .tp-sidebar {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 16.8rem;
    z-index: 40;
  }

  body.tp-sidebar-collapsed .tp-shell {
    grid-template-columns: 5.25rem minmax(0, 1fr);
  }

  body.tp-sidebar-collapsed .tp-sidebar {
    padding: 1rem 0.5rem;
    width: 5.25rem;
  }

  body.tp-sidebar-collapsed .tp-sidebar::after,
  body.tp-sidebar-collapsed .tp-sidebar::before {
    content: none;
  }

  body.tp-sidebar-collapsed .tp-brand {
    justify-content: center;
  }

  body.tp-sidebar-collapsed .tp-brand-copy,
  body.tp-sidebar-collapsed .tp-create-btn span,
  body.tp-sidebar-collapsed .tp-tab span,
  body.tp-sidebar-collapsed .tp-profile-copy,
  body.tp-sidebar-collapsed .tp-nav-label,
  body.tp-sidebar-collapsed #lang-current {
    display: none;
  }

  body.tp-sidebar-collapsed .tp-sidebar-top,
  body.tp-sidebar-collapsed .tp-sidebar-bottom {
    align-items: center;
  }

  body.tp-sidebar-collapsed .tp-brand-row {
    flex-direction: column;
    width: 100%;
    gap: 0.42rem;
  }

  body.tp-sidebar-collapsed .tp-tab-nav {
    width: 100%;
  }

  body.tp-sidebar-collapsed .tp-tab {
    justify-content: center;
    padding: 0.6rem;
  }

  body.tp-sidebar-collapsed .tp-tab i {
    width: auto;
  }

  body.tp-sidebar-collapsed .tp-tab-indicator {
    left: 0;
    width: 2.5px;
  }

  body.tp-sidebar-collapsed .tp-create-btn {
    width: 100%;
    padding: 0.6rem;
  }

  body.tp-sidebar-collapsed .tp-sidebar-tools {
    flex-direction: column;
    width: 100%;
  }

  body.tp-sidebar-collapsed .tp-sidebar-tools #lang-dropdown {
    width: 100%;
  }

  body.tp-sidebar-collapsed .tp-tool-btn {
    justify-content: center;
    padding: 0.5rem;
  }

  body.tp-sidebar-collapsed .tp-tool-icon {
    padding: 0.5rem !important;
  }

  body.tp-sidebar-collapsed .tp-profile {
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0.55rem 0.4rem;
    gap: 0.35rem;
  }

  body.tp-sidebar-collapsed .tp-avatar {
    width: 1.8rem;
    height: 1.8rem;
    font-size: 0.72rem;
  }

  body.tp-sidebar-collapsed .tp-logout {
    width: 1.8rem;
    height: 1.8rem;
  }

  body.tp-sidebar-collapsed .tp-lang-menu {
    right: -8.55rem;
  }
}

@media (min-width: 1280px) {
  .tp-shell {
    grid-template-columns: 17.8rem minmax(0, 1fr);
  }

  .tp-sidebar {
    width: 17.8rem;
  }

  body.tp-sidebar-collapsed .tp-sidebar {
    width: 5.25rem;
  }
}

@media (max-width: 767px) {
  .tp-main {
    min-height: calc(100vh - 4.9rem);
    border-radius: 1.05rem;
  }
}

.light-mode body {
  background: radial-gradient(860px 520px at 8% -5%, rgba(20, 184, 166, 0.16), transparent 58%),
    radial-gradient(840px 500px at 90% 0%, rgba(249, 115, 22, 0.14), transparent 60%), var(--tp-bg) !important;
}

.light-mode .tp-mobile-bar,
.light-mode .tp-sidebar {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(148, 163, 184, 0.15);
}

.light-mode .tp-sidebar-toggle {
  color: #64748b;
}

.light-mode .tp-sidebar-toggle:hover {
  color: #0f172a;
  background: rgba(148, 163, 184, 0.12);
}

.light-mode .tp-nav-label {
  color: rgba(100, 116, 139, 0.6);
}

.light-mode .tp-main {
  border-color: rgba(203, 213, 225, 0.78);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.95));
  box-shadow: 0 18px 38px rgba(148, 163, 184, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.light-mode :is(.tp-mobile-icon, .tp-mobile-lang) {
  border-color: rgba(203, 213, 225, 0.9);
  background: rgba(248, 250, 252, 0.9);
  color: #0f172a;
}

.light-mode .tp-tab {
  color: #64748b;
}

.light-mode .tp-tab i {
  color: #94a3b8;
}

.light-mode .tp-tab:hover {
  color: #0f172a;
  background: rgba(148, 163, 184, 0.08);
}

.light-mode .tp-tab:hover i {
  color: #64748b;
}

.light-mode .tp-tool-btn {
  border-color: rgba(203, 213, 225, 0.5);
  background: rgba(248, 250, 252, 0.8);
  color: #64748b;
}

.light-mode .tp-tool-btn:hover {
  color: #0f172a;
  border-color: rgba(203, 213, 225, 0.7);
  background: rgba(248, 250, 252, 0.95);
}

.light-mode .tp-create-btn {
  border-color: rgba(20, 184, 166, 0.3);
  color: #0d9488;
  background: rgba(20, 184, 166, 0.05);
}

.light-mode .tp-create-btn:hover {
  border-color: rgba(20, 184, 166, 0.5);
  color: #0f766e;
  background: rgba(20, 184, 166, 0.1);
}

.light-mode .tp-lang-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(203, 213, 225, 0.5);
  box-shadow: 0 16px 32px rgba(148, 163, 184, 0.2);
}

.light-mode .tp-lang-option {
  color: #64748b;
}

.light-mode .tp-lang-option:hover {
  color: #0f172a;
  background: rgba(148, 163, 184, 0.08);
}

.light-mode .tp-lang-chip {
  border-color: rgba(203, 213, 225, 0.6);
  background: rgba(248, 250, 252, 0.9);
  color: #64748b;
}

.light-mode .tp-profile-copy small {
  color: #94a3b8;
}

.light-mode .tp-profile {
  border-color: rgba(203, 213, 225, 0.5);
  background: rgba(248, 250, 252, 0.7);
}

.light-mode .tp-profile:hover {
  border-color: rgba(203, 213, 225, 0.7);
  background: rgba(248, 250, 252, 0.9);
}

.light-mode .tp-profile-copy strong {
  color: #0f172a;
}

.light-mode .tp-avatar {
  border: none;
}

.light-mode .tp-logout {
  color: #94a3b8;
  background: transparent;
}

.light-mode .tp-logout:hover {
  color: #e11d48;
  background: rgba(225, 29, 72, 0.08);
}

.light-mode :is(.tp-mobile-menu, .tp-lang-menu) {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(203, 213, 225, 0.9);
  box-shadow: 0 16px 32px rgba(148, 163, 184, 0.28);
}

.light-mode :is(.tp-mobile-menu-item, .tp-lang-option) {
  color: #0f172a;
}

.light-mode .tp-tab.is-active {
  color: #0f766e;
  background: rgba(20, 184, 166, 0.08);
}

.light-mode .tp-tab.is-active i {
  color: #14b8a6;
}

.light-mode .tp-tab.is-active .tp-tab-indicator {
  background: linear-gradient(180deg, #14b8a6, #0ea5e9);
}

.light-mode .tp-mobile-menu-item.is-active {
  color: #042f2e;
  border-color: rgba(20, 184, 166, 0.5);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(249, 115, 22, 0.14));
}

.light-mode .auth-topbar {
  border-color: rgba(203, 213, 225, 0.9);
  background: rgba(248, 250, 252, 0.92);
  box-shadow: 0 14px 28px rgba(148, 163, 184, 0.22);
}

.light-mode .auth-surface {
  border: none;
  background: transparent;
  box-shadow: none;
}

.light-mode .auth-form-panel {
  border: none;
  background: transparent;
  box-shadow: none;
}

.light-mode .auth-illustration {
  border: none;
  background:
    radial-gradient(240px 200px at 20% 18%, rgba(14, 165, 233, 0.08), transparent 70%),
    radial-gradient(220px 180px at 82% 22%, rgba(20, 184, 166, 0.08), transparent 70%);
}

.light-mode .auth-kicker,
.light-mode .auth-form-eyebrow {
  border-color: rgba(203, 213, 225, 0.88);
  background: rgba(248, 250, 252, 0.94);
  color: #64748b;
}

.light-mode .auth-topbar-link,
.light-mode .auth-icon-btn,
.light-mode .auth-topbar #lang-toggle,
.light-mode .auth-lang-chip,
.light-mode .site-lang-current-chip {
  border-color: rgba(203, 213, 225, 0.88);
  background: rgba(248, 250, 252, 0.94);
  color: #0f172a;
}

.light-mode .auth-topbar #lang-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(203, 213, 225, 0.9);
  box-shadow: 0 16px 32px rgba(148, 163, 184, 0.24);
}

.light-mode .auth-lang-option,
.light-mode .site-lang-current-name,
.light-mode .auth-topbar-copy strong,
.light-mode .auth-form-panel h2,
.light-mode .auth-field label,
.light-mode .auth-feature strong {
  color: #0f172a;
}

.light-mode .auth-lang-option:hover {
  background: rgba(241, 245, 249, 0.92);
}

.light-mode .auth-topbar-copy small,
.light-mode .auth-form-copy,
.light-mode .auth-feature p,
.light-mode .auth-form-switch,
.light-mode .auth-field-note,
.light-mode .auth-legal {
  color: #475569;
}

.light-mode .auth-feature {
  border-color: rgba(203, 213, 225, 0.86);
  background: rgba(255, 255, 255, 0.76);
}

.light-mode .auth-illustration .auth-ill-card {
  fill: rgba(255, 255, 255, 0.94);
  stroke: rgba(203, 213, 225, 0.9);
}

.light-mode .auth-illustration .auth-ill-orb {
  fill: rgba(14, 165, 233, 0.18);
}

.light-mode .auth-illustration .auth-ill-orb-soft {
  fill: rgba(20, 184, 166, 0.16);
}

.light-mode .auth-illustration .auth-ill-head {
  fill: #0f172a;
}

.light-mode .auth-illustration .auth-ill-body {
  fill: rgba(14, 165, 233, 0.28);
}

.light-mode .auth-illustration .auth-ill-arm,
.light-mode .auth-illustration .auth-ill-line {
  stroke: rgba(100, 116, 139, 0.7);
}

.light-mode .auth-illustration .auth-ill-screen {
  fill: rgba(248, 250, 252, 0.95);
  stroke: rgba(203, 213, 225, 0.9);
}

.light-mode .auth-illustration .auth-ill-check {
  fill: rgba(20, 184, 166, 0.3);
}

.light-mode .auth-illustration .auth-ill-checkmark {
  stroke: rgba(20, 184, 166, 0.86);
}

.light-mode .auth-illustration .auth-ill-accent {
  fill: rgba(14, 165, 233, 0.3);
}

.light-mode .auth-illustration .auth-ill-signal {
  stroke: rgba(14, 165, 233, 0.65);
}

.light-mode .auth-illustration .auth-ill-badge {
  fill: rgba(249, 115, 22, 0.2);
  stroke: rgba(249, 115, 22, 0.6);
}

.light-mode .auth-illustration .auth-ill-plus {
  stroke: rgba(249, 115, 22, 0.9);
}

.light-mode .auth-illustration.is-login {
  background:
    radial-gradient(240px 200px at 20% 18%, rgba(14, 165, 233, 0.2), transparent 70%),
    radial-gradient(220px 180px at 82% 22%, rgba(20, 184, 166, 0.2), transparent 70%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.97));
}

.light-mode .auth-illustration.is-signup {
  background:
    radial-gradient(240px 200px at 20% 18%, rgba(249, 115, 22, 0.2), transparent 70%),
    radial-gradient(220px 180px at 82% 22%, rgba(34, 197, 94, 0.2), transparent 70%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.97));
}

.light-mode .auth-input {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(203, 213, 225, 0.9);
  color: #0f172a;
}

.light-mode .auth-input::placeholder,
.light-mode .auth-input-wrap i {
  color: #94a3b8;
}

.light-mode .auth-input:focus {
  border-color: rgba(14, 165, 233, 0.42);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
  background: #ffffff;
}

.light-mode .auth-alert {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(254, 242, 242, 0.94);
  color: #b91c1c;
}

@keyframes tpMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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