/* Nexus Premium Dark UI v2.2.0
   Presentation-only layer loaded after every page's legacy styles. */
:root {
  --nexus-bg: #050814;
  --nexus-bg-2: #080d1b;
  --nexus-panel: rgba(12, 19, 35, .86);
  --nexus-panel-strong: rgba(15, 24, 43, .96);
  --nexus-panel-soft: rgba(19, 30, 52, .72);
  --nexus-text: #f7f9ff;
  --nexus-text-soft: #c9d2e8;
  --nexus-muted: #7f8ba8;
  --nexus-line: rgba(137, 161, 210, .14);
  --nexus-line-strong: rgba(111, 149, 232, .27);
  --nexus-blue: #4d8dff;
  --nexus-blue-bright: #6aa5ff;
  --nexus-cyan: #26d9e8;
  --nexus-purple: #8a6cff;
  --nexus-amber: #ffca58;
  --nexus-success: #29d17d;
  --nexus-danger: #ff647c;
  --nexus-shadow: 0 26px 80px rgba(0, 0, 0, .42);
  --nexus-soft-shadow: 0 14px 42px rgba(0, 0, 0, .26);
  --nexus-glow: 0 0 0 1px rgba(88, 138, 255, .08), 0 18px 50px rgba(10, 63, 166, .16);
}

html {
  background: var(--nexus-bg) !important;
  color-scheme: dark;
}

body.nexus-app {
  background:
    radial-gradient(circle at 9% 10%, rgba(225, 43, 84, .12), transparent 25rem),
    radial-gradient(circle at 92% 13%, rgba(25, 197, 221, .12), transparent 27rem),
    radial-gradient(circle at 50% 100%, rgba(61, 98, 255, .13), transparent 32rem),
    linear-gradient(180deg, #050814 0%, #060a15 47%, #040711 100%) !important;
  color: var(--nexus-text) !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body.nexus-app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .46;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.35) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(92,139,255,.3) 0 1px, transparent 1.4px);
  background-position: 0 0, 37px 51px;
  background-size: 92px 92px, 137px 137px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.82), transparent 82%);
}

::selection { background: rgba(77, 141, 255, .42); color: #fff; }
* { -webkit-tap-highlight-color: transparent; }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-track { background: transparent !important; }
*::-webkit-scrollbar-thumb { background: rgba(122, 145, 191, .28) !important; border-radius: 99px !important; }

/* Shared app chrome */
.nexus-topbar {
  height: calc(76px + env(safe-area-inset-top)) !important;
  background: rgba(4, 8, 19, .76) !important;
  border-bottom: 1px solid rgba(128, 151, 205, .10) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .22) !important;
  backdrop-filter: blur(25px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(25px) saturate(150%) !important;
}
.nexus-topbar-inner { height: 76px !important; }
.nexus-brand { color: var(--nexus-text) !important; }
.nexus-brand-mark {
  border: 1px solid rgba(124, 161, 255, .23) !important;
  border-radius: 15px !important;
  background: linear-gradient(145deg, #17233b, #080d18) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.38), 0 0 24px rgba(67,126,255,.12), inset 0 1px 0 rgba(255,255,255,.12) !important;
}
.nexus-brand-copy strong {
  color: #fff !important;
  font-family: Sora, Manrope, sans-serif !important;
  font-size: 15px !important;
  letter-spacing: -.35px !important;
}
.nexus-brand-copy small { color: #7785a3 !important; }
.nexus-brand-copy small span { color: var(--nexus-blue-bright) !important; }
.nexus-icon-button,
.nexus-profile-menu summary {
  color: var(--nexus-text-soft) !important;
  background: rgba(16, 25, 44, .86) !important;
  border-color: var(--nexus-line) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.04) !important;
}
.nexus-icon-button:hover { color: #fff !important; background: rgba(23, 36, 62, .96) !important; }
.nexus-avatar {
  background: linear-gradient(145deg, var(--nexus-blue), var(--nexus-purple)) !important;
  box-shadow: 0 0 22px rgba(77,141,255,.25) !important;
}
.nexus-profile-name { color: #e8edfa !important; }
.nexus-profile-menu summary > i { color: #72809d !important; }
.nexus-profile-dropdown {
  background: rgba(10, 16, 29, .97) !important;
  border-color: var(--nexus-line-strong) !important;
  box-shadow: var(--nexus-shadow) !important;
}
.nexus-profile-dropdown a,
.nexus-profile-dropdown button { color: var(--nexus-text-soft) !important; }
.nexus-profile-dropdown a:hover,
.nexus-profile-dropdown button:hover { background: rgba(77,141,255,.10) !important; color: #fff !important; }
.nexus-profile-dropdown .danger { color: var(--nexus-danger) !important; }
.nexus-login-pill,
.nexus-primary-action {
  color: #fff !important;
  background: linear-gradient(135deg, #2b71f0, #5a94ff 62%, #7066ff) !important;
  box-shadow: 0 15px 38px rgba(32, 105, 245, .32), inset 0 1px 0 rgba(255,255,255,.25) !important;
}

.nexus-main { min-height: calc(100vh - 150px) !important; }
.nexus-shell { max-width: 1180px !important; padding: 34px 24px 54px !important; }

/* Global legacy-page conversion. Keeps routes and business logic untouched. */
.nexus-main .text-gray-900,
.nexus-main .text-slate-900,
.nexus-main .text-gray-800,
.nexus-main .text-slate-800,
.nexus-main .text-gray-700,
.nexus-main .text-slate-700 { color: var(--nexus-text) !important; }
.nexus-main .text-gray-600,
.nexus-main .text-slate-600,
.nexus-main .text-gray-500,
.nexus-main .text-slate-500 { color: var(--nexus-text-soft) !important; }
.nexus-main .text-gray-400,
.nexus-main .text-slate-400 { color: var(--nexus-muted) !important; }
.nexus-main .text-blue-500,
.nexus-main .text-blue-600,
.nexus-main .text-blue-700 { color: var(--nexus-blue-bright) !important; }
.nexus-main .text-green-600,
.nexus-main .text-green-700,
.nexus-main .text-\[\#16a34a\] { color: var(--nexus-success) !important; }
.nexus-main .text-red-500,
.nexus-main .text-red-600,
.nexus-main .text-red-700,
.nexus-main .text-\[\#dc2626\] { color: var(--nexus-danger) !important; }
.nexus-main .text-yellow-600,
.nexus-main .text-\[\#eab308\] { color: var(--nexus-amber) !important; }

.nexus-main .bg-white,
.nexus-main .bg-gray-50,
.nexus-main .bg-gray-100,
.nexus-main .bg-slate-50,
.nexus-main [class*="bg-[#f9f9f9]"] {
  color: var(--nexus-text) !important;
  background: var(--nexus-panel) !important;
  border-color: var(--nexus-line) !important;
  backdrop-filter: blur(18px) saturate(125%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(125%) !important;
}
.nexus-main [class*="border-[#dddddd]"],
.nexus-main .border-gray-100,
.nexus-main .border-gray-200,
.nexus-main .border-gray-300,
.nexus-main .border-slate-200 { border-color: var(--nexus-line) !important; }
.nexus-main [class*="rounded-[2px]"] { border-radius: 21px !important; }
.nexus-main .shadow-sm,
.nexus-main .shadow-md,
.nexus-main .shadow-lg { box-shadow: var(--nexus-soft-shadow) !important; }

.nexus-main > div[class*="max-w-3xl"],
.nexus-main > div[class*="max-w-[480px]"],
.nexus-main > div[class*="max-w-lg"] { padding-top: 34px !important; }

.nexus-main h1,
.nexus-main h2,
.nexus-main h3,
.nexus-main .font-display {
  color: var(--nexus-text) !important;
  font-family: Sora, Manrope, Inter, sans-serif !important;
  letter-spacing: -.025em;
}
.nexus-main > div[class*="max-w-3xl"] > div.flex.items-center.justify-between.mb-4 h1,
.nexus-main > div[class*="max-w-3xl"] > h1 {
  font-size: clamp(24px, 5vw, 34px) !important;
  font-weight: 800 !important;
}
.nexus-main label { color: #bcc7de !important; font-weight: 650 !important; }
.nexus-main p { line-height: 1.6; }
.nexus-main code { color: #9cc1ff; }

/* Cards */
.nexus-main .bg-white[class*="border"],
.nexus-main [class*="bg-[#f9f9f9]"][class*="border"],
.nexus-main div[class*="bg-white"][class*="rounded"],
.nexus-main div[class*="bg-[#f9f9f9]"][class*="rounded"] {
  box-shadow: var(--nexus-glow) !important;
}
.nexus-main form > div.bg-white,
.nexus-main form > div[class*="bg-white"] { background: var(--nexus-panel) !important; }

/* Form controls */
.nexus-main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.nexus-main select,
.nexus-main textarea {
  min-height: 49px !important;
  color: #edf2ff !important;
  caret-color: var(--nexus-blue-bright) !important;
  background: rgba(5, 10, 20, .72) !important;
  border: 1px solid rgba(128, 153, 209, .17) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025) !important;
}
.nexus-main input::placeholder,
.nexus-main textarea::placeholder { color: #596783 !important; }
.nexus-main input:focus,
.nexus-main select:focus,
.nexus-main textarea:focus,
.nexus-main div:focus-within > input {
  color: #fff !important;
  background: rgba(8, 16, 31, .94) !important;
  border-color: rgba(84, 145, 255, .72) !important;
  box-shadow: 0 0 0 4px rgba(58, 124, 255, .13), 0 0 28px rgba(35, 107, 255, .10) !important;
  outline: none !important;
}
.nexus-main select option { color: #e9eeff; background: #0c1425; }
.nexus-main input[readonly],
.nexus-main input:disabled,
.nexus-main textarea:disabled { color: #8996af !important; background: rgba(6, 11, 21, .7) !important; cursor: not-allowed; }

/* Buttons and tactile interaction */
.nexus-main button,
.nexus-main a[class*="bg-"],
.nexus-main .nexus-soft-action,
.nexus-bottom-nav a,
.nexus-icon-button,
.nexus-login-pill,
.nexus-support-bubble,
.nexus-profile-menu summary {
  position: relative;
  overflow: hidden;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease !important;
}
.nexus-main button:active,
.nexus-main a[class*="bg-"]:active,
.nexus-icon-button:active,
.nexus-login-pill:active,
.nexus-support-bubble:active,
.nexus-profile-menu summary:active { transform: scale(.965) !important; }
.nexus-main button.nexus-pressed,
.nexus-main a.nexus-pressed,
.nexus-bottom-nav a.nexus-pressed,
.nexus-icon-button.nexus-pressed { transform: scale(.95) !important; }
.nexus-ripple {
  position: absolute;
  z-index: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255,255,255,.34);
  transform: translate(-50%, -50%) scale(0);
  animation: nexus-ripple .55s ease-out forwards;
}
@keyframes nexus-ripple { to { opacity: 0; transform: translate(-50%, -50%) scale(18); } }

.nexus-main .bg-blue-500,
.nexus-main .bg-finance-blue,
.nexus-main button[class*="bg-blue-500"],
.nexus-main a[class*="bg-blue-500"] {
  color: #fff !important;
  border-color: rgba(133,174,255,.26) !important;
  background: linear-gradient(135deg, #286fef, #5595ff 62%, #6d65ff) !important;
  box-shadow: 0 12px 30px rgba(39, 105, 230, .26), inset 0 1px 0 rgba(255,255,255,.22) !important;
  font-weight: 750 !important;
}
.nexus-main .bg-blue-500:hover,
.nexus-main .hover\:bg-blue-600:hover,
.nexus-main .bg-finance-blue:hover {
  background: linear-gradient(135deg, #347cff, #69a3ff 62%, #7a71ff) !important;
  box-shadow: 0 16px 38px rgba(39,105,230,.34), 0 0 24px rgba(56,125,255,.12) !important;
}
.nexus-main .bg-red-500,
.nexus-main .bg-\[\#dc2626\] {
  color: #fff !important;
  background: linear-gradient(135deg, #e44560, #ff687d) !important;
  border-color: rgba(255,118,141,.25) !important;
  box-shadow: 0 12px 28px rgba(213,55,80,.2) !important;
}
.nexus-main .bg-red-50,
.nexus-main .bg-red-100,
.nexus-main [class*="bg-[#fef2f2]"] {
  color: #ff98a8 !important;
  background: rgba(255, 77, 105, .095) !important;
  border-color: rgba(255, 100, 124, .23) !important;
}
.nexus-main .bg-green-50,
.nexus-main .bg-green-100,
.nexus-main [class*="bg-[#f0fdf4]"] {
  color: #68e4a5 !important;
  background: rgba(41, 209, 125, .095) !important;
  border-color: rgba(41, 209, 125, .22) !important;
}
.nexus-main .bg-yellow-50,
.nexus-main .bg-amber-50 { color: #ffd980 !important; background: rgba(255,202,88,.09) !important; border-color: rgba(255,202,88,.22) !important; }
.nexus-main button.bg-transparent,
.nexus-main button[class*="bg-transparent"] { background: transparent !important; box-shadow: none !important; }
.nexus-main button:disabled { opacity: .58 !important; cursor: wait !important; transform: none !important; }

/* Tables, lists and dropdowns */
.nexus-main table {
  color: var(--nexus-text-soft) !important;
  overflow: hidden;
  border-color: var(--nexus-line) !important;
  background: rgba(8, 14, 27, .42) !important;
  border-radius: 20px !important;
}
.nexus-main thead { background: rgba(25, 37, 63, .72) !important; }
.nexus-main th { color: #aab7d0 !important; border-color: var(--nexus-line) !important; font-weight: 700 !important; }
.nexus-main td { color: #d6def0 !important; border-color: var(--nexus-line) !important; }
.nexus-main tbody tr { background: rgba(8,14,26,.28) !important; }
.nexus-main tbody tr:nth-child(even) { background: rgba(17,26,45,.28) !important; }
.nexus-main tbody tr:hover { background: rgba(65,119,231,.10) !important; }
.nexus-main #filterMenu,
.nexus-main [id$="Dropdown"],
.nexus-main [class*="absolute"][class*="shadow-sm"][class*="bg-white"] {
  background: rgba(9, 15, 28, .98) !important;
  border-color: var(--nexus-line-strong) !important;
  box-shadow: var(--nexus-shadow) !important;
}
.nexus-main .filter-option:hover { background: rgba(77,141,255,.11) !important; }

/* Modal / iOS bottom-sheet feel */
.nexus-main [class*="fixed inset-0"] > .absolute.inset-0 { background: rgba(0, 3, 10, .74) !important; backdrop-filter: blur(10px) !important; }
.nexus-main [class*="fixed inset-0"] > [class*="bg-white"] {
  color: var(--nexus-text) !important;
  background: rgba(11, 18, 32, .98) !important;
  border-color: rgba(105, 142, 219, .22) !important;
  border-radius: 28px !important;
  box-shadow: 0 32px 100px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.055) !important;
}
.nexus-main [class*="fixed inset-0"] > [class*="bg-white"]::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin: 8px auto -2px;
  border-radius: 99px;
  background: rgba(134,151,185,.26);
}

/* Page header patterns */
.nexus-page-intro { margin-bottom: 26px !important; }
.nexus-page-intro > div > span,
.nexus-section-heading > span,
.nexus-eyebrow {
  color: #7da9ff !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .13em !important;
  text-transform: uppercase !important;
}
.nexus-page-intro h1 {
  margin-top: 9px !important;
  color: #fff !important;
  font-family: Sora, Manrope, sans-serif !important;
  font-size: clamp(31px, 5vw, 46px) !important;
  line-height: 1.1 !important;
  letter-spacing: -.052em !important;
  text-shadow: 0 7px 26px rgba(0,0,0,.34) !important;
}
.nexus-page-intro p { color: #8592ab !important; font-size: 13px !important; }
.nexus-soft-action {
  color: #d9e3f8 !important;
  background: rgba(15,25,44,.86) !important;
  border-color: var(--nexus-line) !important;
  box-shadow: var(--nexus-soft-shadow) !important;
}

/* Dashboard */
.nexus-dashboard-shell { position: relative; }
.nexus-balance-card {
  min-height: 250px;
  padding: 31px !important;
  border: 1px solid rgba(102,158,255,.22) !important;
  border-radius: 30px !important;
  background:
    linear-gradient(135deg, rgba(20,31,53,.98), rgba(7,15,29,.98) 60%),
    #0b1425 !important;
  box-shadow: 0 28px 70px rgba(0,0,0,.42), 0 0 58px rgba(37,111,255,.12), inset 0 1px 0 rgba(255,255,255,.055) !important;
}
.nexus-balance-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 46%;
  height: 2px;
  background: linear-gradient(90deg, var(--nexus-cyan), transparent);
}
.nexus-balance-card::after { background: radial-gradient(circle, rgba(41,216,232,.18), transparent 65%) !important; }
.nexus-balance-top span { color: #8d99b5 !important; font-size: 12px !important; letter-spacing: .08em; text-transform: uppercase; }
.nexus-balance-top button { color: var(--nexus-cyan) !important; background: rgba(38,217,232,.075) !important; border: 1px solid rgba(38,217,232,.13) !important; }
.nexus-balance-value {
  color: #fff !important;
  font-family: Sora, Manrope, sans-serif !important;
  font-size: clamp(36px, 7vw, 56px) !important;
  text-shadow: 0 9px 38px rgba(52,116,255,.18) !important;
}
.nexus-balance-actions a {
  min-height: 72px !important;
  color: #e8efff !important;
  background: rgba(26, 40, 67, .67) !important;
  border-color: rgba(120,153,220,.13) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04) !important;
}
.nexus-balance-actions a:hover { background: rgba(42, 65, 108, .73) !important; border-color: rgba(93,151,255,.28) !important; transform: translateY(-2px); }
.nexus-balance-actions a i { color: #7caaff !important; }
.nexus-summary-grid { gap: 16px !important; }
.nexus-summary-grid article,
.nexus-metric-grid article {
  position: relative;
  overflow: hidden;
  padding: 23px !important;
  border: 1px solid var(--nexus-line) !important;
  border-radius: 25px !important;
  color: var(--nexus-text) !important;
  background: linear-gradient(145deg, rgba(17,27,47,.9), rgba(8,14,27,.92)) !important;
  box-shadow: var(--nexus-soft-shadow), inset 0 1px 0 rgba(255,255,255,.04) !important;
}
.nexus-summary-grid article:nth-child(1)::before,
.nexus-metric-grid article:nth-child(1)::before { background: linear-gradient(90deg, var(--nexus-cyan), transparent); }
.nexus-summary-grid article:nth-child(2)::before,
.nexus-metric-grid article:nth-child(2)::before { background: linear-gradient(90deg, var(--nexus-danger), transparent); }
.nexus-summary-grid article:nth-child(3)::before,
.nexus-metric-grid article:nth-child(3)::before { background: linear-gradient(90deg, var(--nexus-amber), transparent); }
.nexus-summary-grid article:nth-child(4)::before { background: linear-gradient(90deg, var(--nexus-success), transparent); }
.nexus-summary-grid article::before,
.nexus-metric-grid article::before { content: ""; position: absolute; top: 0; left: 0; width: 55%; height: 2px; }
.nexus-summary-grid article span,
.nexus-metric-grid article span { color: #73809c !important; font-size: 11px !important; font-weight: 750 !important; letter-spacing: .08em !important; text-transform: uppercase; }
.nexus-summary-grid article strong,
.nexus-metric-grid article strong { color: #fff !important; font: 800 clamp(21px,3vw,30px) Sora, sans-serif !important; }
.nexus-summary-grid article > i,
.nexus-metric-grid article > i {
  color: #7ba8ff !important;
  background: rgba(61,124,255,.08) !important;
  border: 1px solid rgba(91,146,255,.13);
  border-radius: 16px !important;
}
.nexus-list-card {
  border-color: var(--nexus-line) !important;
  background: linear-gradient(145deg, rgba(15,24,42,.92), rgba(7,13,25,.94)) !important;
  box-shadow: var(--nexus-soft-shadow), inset 0 1px 0 rgba(255,255,255,.035) !important;
}
.nexus-card-heading { border-color: var(--nexus-line) !important; }
.nexus-card-heading span { color: #71809d !important; }
.nexus-card-heading h2 { color: #fff !important; font-family: Sora, sans-serif !important; font-size: 22px !important; }
.nexus-card-heading a { color: #7eacff !important; }
.nexus-activity-list > a { color: var(--nexus-text-soft) !important; border-color: var(--nexus-line) !important; }
.nexus-activity-list > a:hover { padding-left: 8px; padding-right: 8px; background: rgba(77,141,255,.06); border-radius: 15px; }
.nexus-activity-icon { color: var(--nexus-cyan) !important; background: rgba(38,217,232,.075) !important; }
.nexus-activity-copy strong,
.nexus-activity-value strong { color: #eef3ff !important; }
.nexus-activity-copy small,
.nexus-activity-value small { color: #73809b !important; }
.nexus-empty-state h3 { color: #fff !important; }
.nexus-empty-state p { color: var(--nexus-muted) !important; }

/* Landing page */
.nexus-hero-card {
  border-color: rgba(107,145,225,.16) !important;
  background:
    radial-gradient(circle at 78% 18%, rgba(43,206,221,.10), transparent 20rem),
    radial-gradient(circle at 20% 80%, rgba(231,61,99,.09), transparent 21rem),
    linear-gradient(145deg, rgba(15,24,43,.96), rgba(5,10,20,.98)) !important;
  box-shadow: var(--nexus-shadow), inset 0 1px 0 rgba(255,255,255,.045) !important;
}
.nexus-hero-copy h1 { color: #fff !important; font-family: Sora, sans-serif !important; font-weight: 800 !important; letter-spacing: -.055em !important; }
.nexus-hero-copy h1 span { color: #ff536d !important; text-shadow: 0 0 30px rgba(255,83,109,.18); }
.nexus-hero-copy p,
.nexus-section-heading p { color: #8a96ae !important; }
.nexus-secondary-action {
  color: #d9e4f8 !important;
  background: rgba(24,36,60,.72) !important;
  border-color: var(--nexus-line) !important;
}
.nexus-trust-row span { color: #99a6bf !important; }
.nexus-trust-row i { color: var(--nexus-success) !important; }
.nexus-phone-preview {
  color: #eaf0ff !important;
  background: linear-gradient(180deg, rgba(19,30,52,.98), rgba(5,10,20,.99)) !important;
  border-color: rgba(134,163,225,.18) !important;
  box-shadow: 0 30px 80px rgba(0,0,0,.54), 0 0 55px rgba(42,118,255,.11) !important;
}
.nexus-phone-notch { background: #02040a !important; }
.nexus-preview-balance { background: linear-gradient(135deg, #1e69e8, #586eff) !important; }
.nexus-preview-list > div { background: rgba(25,37,62,.7) !important; border-color: var(--nexus-line) !important; }
.nexus-section-heading h2 { color: #fff !important; }
.nexus-feature-grid article {
  border-color: var(--nexus-line) !important;
  background: linear-gradient(145deg, rgba(16,25,44,.9), rgba(7,13,25,.91)) !important;
  box-shadow: var(--nexus-soft-shadow), inset 0 1px 0 rgba(255,255,255,.035) !important;
}
.nexus-feature-grid article > div { color: var(--nexus-cyan) !important; background: rgba(38,217,232,.07) !important; border: 1px solid rgba(38,217,232,.12); }
.nexus-feature-grid h3 { color: #fff !important; }
.nexus-feature-grid p { color: #8592ab !important; }
.nexus-final-cta {
  border: 1px solid rgba(119,153,226,.18) !important;
  background: linear-gradient(135deg, #111c33, #07101f) !important;
  box-shadow: var(--nexus-shadow), 0 0 50px rgba(42,111,236,.10) !important;
}
.nexus-final-cta a { color: #07101f !important; background: #f4f7ff !important; }

/* Admin dashboard */
.nexus-admin-hero {
  border: 1px solid rgba(111,150,230,.18) !important;
  background: linear-gradient(135deg, #151f37, #070d1a) !important;
  box-shadow: var(--nexus-shadow), 0 0 52px rgba(75,128,255,.10) !important;
}
.nexus-admin-hero strong { color: #fff !important; font-family: Sora, sans-serif !important; }
.nexus-admin-hero span,
.nexus-admin-hero small { color: #8794ad !important; }
.nexus-admin-hero > i { color: rgba(88,150,255,.16) !important; }
.nexus-quick-admin a {
  color: var(--nexus-text-soft) !important;
  border-color: var(--nexus-line) !important;
  background: linear-gradient(145deg, rgba(16,25,44,.9), rgba(7,13,25,.92)) !important;
  box-shadow: var(--nexus-soft-shadow) !important;
}
.nexus-quick-admin a:hover { transform: translateY(-2px); border-color: var(--nexus-line-strong) !important; }
.nexus-quick-admin a > i:first-child { color: var(--nexus-blue-bright) !important; background: rgba(77,141,255,.08) !important; }
.nexus-quick-admin strong { color: #eef3ff !important; }
.nexus-quick-admin small,
.nexus-quick-admin a > i:last-child { color: #73809b !important; }

/* Authentication pages */
body[data-route="/login"] .nexus-main,
body[data-route="/register"] .nexus-main,
body[data-route="/forgot-password"] .nexus-main,
body[data-route^="/reset-password"] .nexus-main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 150px) !important;
  padding: 24px 0;
}
body[data-route="/login"] .nexus-main > div,
body[data-route="/register"] .nexus-main > div,
body[data-route="/forgot-password"] .nexus-main > div,
body[data-route^="/reset-password"] .nexus-main > div {
  position: relative;
  overflow: hidden;
  width: min(560px, calc(100% - 28px)) !important;
  min-height: auto !important;
  margin: 0 auto !important;
  padding: 46px 34px !important;
  border: 1px solid rgba(110,151,235,.19) !important;
  border-radius: 32px !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(236,65,99,.11), transparent 18rem),
    radial-gradient(circle at 100% 12%, rgba(32,205,220,.10), transparent 19rem),
    linear-gradient(145deg, rgba(15,24,42,.97), rgba(6,11,22,.98)) !important;
  box-shadow: var(--nexus-shadow), inset 0 1px 0 rgba(255,255,255,.05) !important;
}
body[data-route="/login"] .nexus-main > div::before,
body[data-route="/register"] .nexus-main > div::before,
body[data-route="/forgot-password"] .nexus-main > div::before,
body[data-route^="/reset-password"] .nexus-main > div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--nexus-cyan), var(--nexus-blue), transparent);
}
body[data-route="/login"] .nexus-main h2,
body[data-route="/register"] .nexus-main h2,
body[data-route="/forgot-password"] .nexus-main h2,
body[data-route^="/reset-password"] .nexus-main h2 {
  color: #fff !important;
  font: 800 clamp(25px,5vw,34px) Sora, sans-serif !important;
  letter-spacing: -.045em !important;
}
body[data-route="/login"] .nexus-main img,
body[data-route="/register"] .nexus-main img,
body[data-route="/forgot-password"] .nexus-main img,
body[data-route^="/reset-password"] .nexus-main img { border-radius: 18px !important; border-color: var(--nexus-line-strong) !important; box-shadow: 0 15px 38px rgba(0,0,0,.3); }
body[data-route="/login"] .nexus-main form,
body[data-route="/register"] .nexus-main form,
body[data-route="/forgot-password"] .nexus-main form,
body[data-route^="/reset-password"] .nexus-main form { gap: 18px !important; }
body[data-route="/login"] .nexus-main button[type="submit"],
body[data-route="/register"] .nexus-main button[type="submit"],
body[data-route="/forgot-password"] .nexus-main button[type="submit"],
body[data-route^="/reset-password"] .nexus-main button[type="submit"] { min-height: 53px !important; border-radius: 17px !important; font-size: 13px !important; }

/* Profile */
body[data-route="/profile"] #avatarContainer {
  width: 92px !important;
  height: 92px !important;
  border: 2px solid rgba(103,154,255,.36) !important;
  box-shadow: 0 0 0 7px rgba(77,141,255,.06), 0 18px 42px rgba(0,0,0,.34), 0 0 34px rgba(77,141,255,.14) !important;
}
body[data-route="/profile"] label[for="profileImageInput"] {
  width: 34px !important;
  height: 34px !important;
  border: 3px solid #0d1628 !important;
  box-shadow: 0 8px 22px rgba(30,101,230,.35) !important;
}
body[data-route="/profile"] #uploadStatus { font-size: 11px !important; }
body[data-route="/profile"] .detail-table td:first-child { color: #8d9ab4 !important; }
body[data-route="/profile"] .detail-table td:last-child { color: #edf2ff !important; font-weight: 650 !important; }

/* Docs */
body[data-route="/docs"] .nexus-main > div {
  color: var(--nexus-text-soft) !important;
  background: transparent !important;
}
body[data-route="/docs"] pre,
body[data-route="/docs"] code[class*="language"],
body[data-route="/docs"] div[class*="bg-gray-900"] {
  color: #c9ddff !important;
  background: #030711 !important;
  border: 1px solid rgba(95,130,203,.17) !important;
  border-radius: 19px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025) !important;
}

/* Error */
.nexus-error-card {
  border-color: var(--nexus-line) !important;
  background: linear-gradient(145deg, rgba(16,25,44,.94), rgba(7,13,25,.96)) !important;
  box-shadow: var(--nexus-shadow) !important;
}
.nexus-error-card h1 { color: #fff !important; font-family: Sora, sans-serif !important; }
.nexus-error-card p { color: #8996ae !important; }
.nexus-error-card button { color: #d9e2f4 !important; background: rgba(24,36,60,.82) !important; }

/* Footer and floating navigation */
.nexus-footer { color: #69758e !important; }
.nexus-footer strong { color: #d4dced !important; }
.nexus-footer a { color: #69b6ee !important; }
.nexus-bottom-nav {
  border-color: rgba(126,157,220,.18) !important;
  background: rgba(9, 15, 28, .86) !important;
  box-shadow: 0 22px 68px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.055) !important;
  backdrop-filter: blur(28px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(145%) !important;
}
.nexus-bottom-nav a { color: #69758f !important; }
.nexus-bottom-nav a i { font-size: 17px !important; }
.nexus-bottom-nav a span { font-size: 9.5px !important; }
.nexus-bottom-nav a.active {
  color: #7daaff !important;
  background: linear-gradient(145deg, rgba(53,111,229,.18), rgba(77,141,255,.07)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 0 24px rgba(50,113,240,.08);
}
.nexus-bottom-nav a.active::after { background: var(--nexus-blue-bright) !important; box-shadow: 0 0 9px var(--nexus-blue); }
.nexus-support-bubble {
  color: #fff !important;
  background: linear-gradient(135deg, #168ec9, #2aade1) !important;
  box-shadow: 0 16px 42px rgba(27,152,207,.31), inset 0 1px 0 rgba(255,255,255,.23) !important;
}
.nexus-toast {
  color: #eaf0ff !important;
  background: rgba(10,17,31,.97) !important;
  border-color: var(--nexus-line-strong) !important;
  box-shadow: var(--nexus-shadow) !important;
}

/* Standalone chat */
body[data-nexus-chat] {
  color: var(--nexus-text) !important;
  background:
    radial-gradient(circle at 15% 0%, rgba(231,62,99,.10), transparent 22rem),
    radial-gradient(circle at 90% 15%, rgba(38,217,232,.09), transparent 22rem),
    #050814 !important;
  font-family: Inter, sans-serif !important;
}
body[data-nexus-chat] > div.fixed {
  background: rgba(8,14,27,.96) !important;
  border-color: var(--nexus-line) !important;
  box-shadow: 0 0 60px rgba(0,0,0,.4);
}
body[data-nexus-chat] > div.fixed > div:first-child {
  background: rgba(10,17,31,.96) !important;
  border-bottom: 1px solid var(--nexus-line) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
body[data-nexus-chat] #chatMessages {
  background: linear-gradient(180deg, rgba(6,11,22,.98), rgba(4,8,17,.98)) !important;
}
body[data-nexus-chat] .chat-bubble-mine {
  background: linear-gradient(135deg, #286fef, #5a8eff) !important;
  border-radius: 20px 20px 5px 20px !important;
  box-shadow: 0 10px 28px rgba(39,105,230,.2);
}
body[data-nexus-chat] .chat-bubble-other {
  color: #eaf0ff !important;
  background: #111b2f !important;
  border: 1px solid var(--nexus-line) !important;
  border-radius: 20px 20px 20px 5px !important;
}
body[data-nexus-chat] #chatMessages + div,
body[data-nexus-chat] .bg-white { background: rgba(9,15,28,.98) !important; border-color: var(--nexus-line) !important; }
body[data-nexus-chat] input {
  color: #eef3ff !important;
  background: rgba(4,9,18,.86) !important;
  border-color: var(--nexus-line) !important;
  border-radius: 18px !important;
}
body[data-nexus-chat] input::placeholder { color: #60708e !important; }
body[data-nexus-chat] button,
body[data-nexus-chat] label { border-radius: 15px !important; transition: transform .18s ease, background .18s ease !important; }
body[data-nexus-chat] button:active,
body[data-nexus-chat] label:active { transform: scale(.95); }
body[data-nexus-chat] .chat-image { border-radius: 14px !important; }

@media (max-width: 700px) {
  body.nexus-app { padding-top: calc(72px + env(safe-area-inset-top)) !important; }
  .nexus-topbar { height: calc(70px + env(safe-area-inset-top)) !important; }
  .nexus-topbar-inner { height: 70px !important; padding: 0 16px !important; }
  .nexus-brand-copy strong { font-size: 14px !important; }
  .nexus-profile-name { display: none; }
  .nexus-profile-menu summary { padding-right: 5px !important; }
  .nexus-profile-menu summary > i { display: none; }
  .nexus-shell { padding: 28px 16px 42px !important; }
  .nexus-page-intro { align-items: flex-start !important; }
  .nexus-page-intro h1 { font-size: 34px !important; }
  .nexus-page-intro p { max-width: 300px; }
  .nexus-balance-card { min-height: 235px; padding: 25px !important; }
  .nexus-balance-value { font-size: 38px !important; margin-bottom: 27px !important; }
  .nexus-balance-actions a { min-height: 66px !important; border-radius: 18px !important; }
  .nexus-summary-grid article { min-height: 132px; }
  .nexus-list-card { padding: 20px !important; }
  .nexus-footer { display: none !important; }
  .nexus-support-bubble span { display: none; }
  .nexus-support-bubble { width: 48px; min-width: 48px; padding: 0 !important; justify-content: center; }
  body[data-route="/login"] .nexus-main > div,
  body[data-route="/register"] .nexus-main > div,
  body[data-route="/forgot-password"] .nexus-main > div,
  body[data-route^="/reset-password"] .nexus-main > div { padding: 38px 22px !important; border-radius: 28px !important; }
  .nexus-main > div[class*="max-w-3xl"],
  .nexus-main > div[class*="max-w-[480px]"] { padding-left: 16px !important; padding-right: 16px !important; }
  .nexus-main [class*="fixed inset-0"] { align-items: flex-end !important; padding: 12px !important; }
  .nexus-main [class*="fixed inset-0"] > [class*="bg-white"] { max-width: 100% !important; max-height: 88vh; overflow-y: auto; border-radius: 29px 29px 23px 23px !important; }
  .nexus-bottom-nav { bottom: calc(10px + env(safe-area-inset-bottom)) !important; width: calc(100% - 18px) !important; min-height: 72px !important; border-radius: 26px !important; }
}

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

/* Dashboard reference refinements */
.nexus-user-accent {
  color: #ff536d;
  font-style: normal;
  text-shadow: 0 0 30px rgba(255, 83, 109, .20);
}
.nexus-dashboard-summary { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
@media (max-width: 850px) {
  .nexus-dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 420px) {
  .nexus-dashboard-summary { gap: 12px !important; }
  .nexus-dashboard-summary article { min-height: 126px; padding: 18px !important; }
  .nexus-dashboard-summary article strong { font-size: 19px !important; }
  .nexus-dashboard-summary article > i { right: 14px; bottom: 14px; width: 38px; height: 38px; }
}


/* Nexus V2.2 Telegram + navigation layout */
.nexus-brand-mark img { object-fit: contain !important; padding: 3px; }
.nexus-topbar { z-index: 40 !important; }
.nexus-profile-menu { z-index: 50; }
.nexus-profile-dropdown { z-index: 55; }
.nexus-toast-container { z-index: 100 !important; }
body.nexus-modal-open { overflow: hidden !important; overscroll-behavior: none; }

.nexus-desktop-nav {
  display: none;
  flex: 1 1 auto;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.nexus-desktop-nav a {
  min-height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 13px;
  color: #7f8da9;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.nexus-desktop-nav a:hover { color: #eaf0ff; background: rgba(77,141,255,.08); }
.nexus-desktop-nav a.active {
  color: #dce8ff;
  background: linear-gradient(145deg, rgba(53,111,229,.18), rgba(77,141,255,.07));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.nexus-desktop-nav a.active i { color: #7daaff; }
.nexus-desktop-nav a:active { transform: scale(.97); }
.nexus-bottom-nav { z-index: 35 !important; }
.nexus-support-bubble { z-index: 30 !important; }

.nexus-auth-heading { width: 100%; max-width: 448px; margin: 0 auto 28px; text-align: center; }
.nexus-auth-heading h2 { margin: 0; color: #f4f7ff; font: 700 22px/1.25 Sora, Manrope, sans-serif; letter-spacing: -.03em; }
.nexus-auth-heading p { margin: 8px 0 0; color: #7e8ba5; font-size: 11px; line-height: 1.6; }
body[data-route="/login"] .nexus-main > div,
body[data-route="/register"] .nexus-main > div,
body[data-route="/forgot-password"] .nexus-main > div,
body[data-route^="/reset-password"] .nexus-main > div {
  max-width: 620px;
  min-height: min(690px, calc(100vh - 126px));
  margin-left: auto !important;
  margin-right: auto !important;
}

.nexus-balance-actions { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.nexus-balance-actions a { flex-direction: row !important; min-height: 58px !important; font-size: 10px !important; }
.nexus-balance-actions a i { font-size: 14px !important; }

.nexus-telegram-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(126,157,220,.14);
  border-radius: 999px;
  color: #7d89a1;
  background: rgba(13,21,38,.72);
  font-size: 9px;
  font-weight: 700;
}
.nexus-telegram-state.is-connected { color: #64d99b; border-color: rgba(58,199,126,.22); background: rgba(28,116,76,.12); }
.nexus-telegram-status-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.nexus-telegram-status-grid > div {
  min-width: 0;
  padding: 12px;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(126,157,220,.10);
  border-radius: 14px;
  background: rgba(8,14,26,.42);
}
.nexus-telegram-status-grid span { color: #71809c; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.nexus-telegram-status-grid strong { color: #dfe7f6; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Cross-document navigation transition. Back/forward keeps the same animation via pageshow/bfcache. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: nexus-page-out .13s ease both; }
::view-transition-new(root) { animation: nexus-page-in .18s ease both; }
@keyframes nexus-page-out { to { opacity: .72; transform: translateY(3px); } }
@keyframes nexus-page-in { from { opacity: .45; transform: translateY(5px); } to { opacity: 1; transform: none; } }

@media (min-width: 900px) {
  body.has-bottom-nav { padding-bottom: 0 !important; }
  .nexus-desktop-nav { display: flex; }
  .nexus-bottom-nav { display: none !important; }
  .nexus-footer { padding-bottom: 40px !important; }
}
@media (max-width: 1050px) and (min-width: 900px) {
  .nexus-brand-copy small { display: none; }
  .nexus-desktop-nav a { padding: 0 9px; gap: 5px; }
  .nexus-desktop-nav a span { font-size: 9px; }
  .nexus-profile-name { display: none; }
}
@media (max-width: 899px) {
  body.has-bottom-nav { padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important; }
  .nexus-bottom-nav { display: grid !important; }
}
@media (max-width: 520px) {
  .nexus-telegram-status-grid { grid-template-columns: 1fr; }
  .nexus-auth-heading h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

/* Nexus V2.2 theme switch + public Telegram position fix.
   Layout/business logic remains unchanged; this block only controls presentation. */
.nexus-brand-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 0 1 auto;
}
.nexus-theme-toggle {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(126,157,220,.16);
  border-radius: 14px;
  color: #8fb7ff;
  background: linear-gradient(145deg, rgba(18,29,50,.94), rgba(9,15,28,.94));
  box-shadow: 0 8px 24px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.045);
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), color .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.nexus-theme-toggle:hover {
  color: #fff;
  border-color: rgba(106,165,255,.34);
  background: linear-gradient(145deg, rgba(25,40,68,.98), rgba(11,19,35,.98));
  box-shadow: 0 11px 30px rgba(0,0,0,.27), 0 0 24px rgba(77,141,255,.10), inset 0 1px 0 rgba(255,255,255,.06);
}
.nexus-theme-toggle:active { transform: scale(.94); }
.nexus-theme-toggle:focus-visible { outline: 3px solid rgba(77,141,255,.24); outline-offset: 3px; }
.nexus-theme-toggle i { font-size: 15px; pointer-events: none; }

/* Keep the public Telegram control fully inside the viewport on every screen size. */
.nexus-support-bubble {
  left: max(18px, calc(env(safe-area-inset-left) + 12px)) !important;
  right: auto !important;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px)) !important;
}

/* Premium light theme. The dark theme above stays the default and is not modified. */
html[data-theme="light"] {
  --nexus-bg: #f4f8ff;
  --nexus-bg-2: #edf4ff;
  --nexus-panel: rgba(255,255,255,.88);
  --nexus-panel-strong: rgba(255,255,255,.97);
  --nexus-panel-soft: rgba(244,248,255,.86);
  --nexus-card: rgba(255,255,255,.90);
  --nexus-text: #10203b;
  --nexus-text-soft: #40516d;
  --nexus-muted: #71819b;
  --nexus-line: rgba(54,91,151,.12);
  --nexus-line-strong: rgba(43,102,203,.22);
  --nexus-blue: #347cf4;
  --nexus-blue-bright: #256fe9;
  --nexus-cyan: #079db9;
  --nexus-purple: #7460e8;
  --nexus-amber: #b97700;
  --nexus-success: #14975a;
  --nexus-danger: #d9435c;
  --nexus-shadow: 0 28px 74px rgba(42,73,126,.14);
  --nexus-soft-shadow: 0 14px 38px rgba(42,73,126,.10);
  --nexus-glow: 0 0 0 1px rgba(65,112,191,.07), 0 18px 48px rgba(43,98,190,.09);
  background: var(--nexus-bg) !important;
  color-scheme: light;
}
html[data-theme="light"] body.nexus-app {
  background:
    radial-gradient(circle at 8% 9%, rgba(255,92,126,.09), transparent 25rem),
    radial-gradient(circle at 92% 13%, rgba(21,179,211,.11), transparent 28rem),
    radial-gradient(circle at 50% 100%, rgba(61,113,255,.10), transparent 34rem),
    linear-gradient(180deg, #f8fbff 0%, #f2f7ff 48%, #edf4ff 100%) !important;
  color: var(--nexus-text) !important;
}
html[data-theme="light"] body.nexus-app::before {
  opacity: .46;
  background-image:
    radial-gradient(circle, rgba(54,105,190,.16) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(91,130,204,.12) 0 1px, transparent 1.4px);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.52), transparent 82%);
}
html[data-theme="light"] ::selection { background: rgba(52,124,244,.24); color: #0b1d3a; }
html[data-theme="light"] *::-webkit-scrollbar-thumb { background: rgba(64,94,143,.22) !important; }

html[data-theme="light"] .nexus-topbar {
  background: rgba(248,251,255,.80) !important;
  border-bottom-color: rgba(53,91,151,.10) !important;
  box-shadow: 0 12px 34px rgba(42,73,126,.09) !important;
}
html[data-theme="light"] .nexus-brand { color: var(--nexus-text) !important; }
html[data-theme="light"] .nexus-brand-mark {
  border-color: rgba(52,124,244,.20) !important;
  background: linear-gradient(145deg, #ffffff, #e8f1ff) !important;
  box-shadow: 0 9px 24px rgba(49,90,160,.13), 0 0 22px rgba(52,124,244,.08), inset 0 1px 0 rgba(255,255,255,.9) !important;
}
html[data-theme="light"] .nexus-brand-copy strong { color: #10203b !important; }
html[data-theme="light"] .nexus-brand-copy small { color: #73829a !important; }
html[data-theme="light"] .nexus-theme-toggle {
  color: #315fae;
  border-color: rgba(50,99,180,.14);
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(236,244,255,.96));
  box-shadow: 0 8px 24px rgba(42,73,126,.10), inset 0 1px 0 rgba(255,255,255,.95);
}
html[data-theme="light"] .nexus-theme-toggle:hover {
  color: #194fba;
  border-color: rgba(52,124,244,.27);
  background: linear-gradient(145deg, #fff, #e8f2ff);
  box-shadow: 0 11px 30px rgba(42,73,126,.13), 0 0 20px rgba(52,124,244,.08), inset 0 1px 0 #fff;
}
html[data-theme="light"] .nexus-icon-button,
html[data-theme="light"] .nexus-profile-menu summary {
  color: #40516d !important;
  background: rgba(255,255,255,.88) !important;
  border-color: var(--nexus-line) !important;
  box-shadow: 0 8px 23px rgba(42,73,126,.09), inset 0 1px 0 rgba(255,255,255,.95) !important;
}
html[data-theme="light"] .nexus-icon-button:hover { color: #174eaf !important; background: #fff !important; }
html[data-theme="light"] .nexus-profile-name { color: #243753 !important; }
html[data-theme="light"] .nexus-profile-menu summary > i { color: #7d8ba1 !important; }
html[data-theme="light"] .nexus-profile-dropdown {
  background: rgba(255,255,255,.98) !important;
  border-color: var(--nexus-line-strong) !important;
  box-shadow: var(--nexus-shadow) !important;
}
html[data-theme="light"] .nexus-profile-dropdown a,
html[data-theme="light"] .nexus-profile-dropdown button { color: #40516d !important; }
html[data-theme="light"] .nexus-profile-dropdown a:hover,
html[data-theme="light"] .nexus-profile-dropdown button:hover { color: #153d80 !important; background: rgba(52,124,244,.08) !important; }

html[data-theme="light"] .nexus-main .text-gray-900,
html[data-theme="light"] .nexus-main .text-slate-900,
html[data-theme="light"] .nexus-main .text-gray-800,
html[data-theme="light"] .nexus-main .text-slate-800,
html[data-theme="light"] .nexus-main .text-gray-700,
html[data-theme="light"] .nexus-main .text-slate-700 { color: #152641 !important; }
html[data-theme="light"] .nexus-main .text-gray-600,
html[data-theme="light"] .nexus-main .text-slate-600,
html[data-theme="light"] .nexus-main .text-gray-500,
html[data-theme="light"] .nexus-main .text-slate-500 { color: #52647f !important; }
html[data-theme="light"] .nexus-main .text-gray-400,
html[data-theme="light"] .nexus-main .text-slate-400 { color: #7b899f !important; }
html[data-theme="light"] .nexus-main .text-blue-500,
html[data-theme="light"] .nexus-main .text-blue-600,
html[data-theme="light"] .nexus-main .text-blue-700 { color: #246bd6 !important; }
html[data-theme="light"] .nexus-main .text-green-600,
html[data-theme="light"] .nexus-main .text-green-700,
html[data-theme="light"] .nexus-main .text-\[\#16a34a\] { color: #11854f !important; }
html[data-theme="light"] .nexus-main .text-red-500,
html[data-theme="light"] .nexus-main .text-red-600,
html[data-theme="light"] .nexus-main .text-red-700,
html[data-theme="light"] .nexus-main .text-\[\#dc2626\] { color: #c83b52 !important; }
html[data-theme="light"] .nexus-main .text-yellow-600,
html[data-theme="light"] .nexus-main .text-\[\#eab308\] { color: #a96700 !important; }
html[data-theme="light"] .nexus-main .bg-white,
html[data-theme="light"] .nexus-main .bg-gray-50,
html[data-theme="light"] .nexus-main .bg-gray-100,
html[data-theme="light"] .nexus-main .bg-slate-50,
html[data-theme="light"] .nexus-main [class*="bg-[#f9f9f9]"] {
  color: var(--nexus-text) !important;
  background: var(--nexus-panel) !important;
  border-color: var(--nexus-line) !important;
}
html[data-theme="light"] .nexus-main h1,
html[data-theme="light"] .nexus-main h2,
html[data-theme="light"] .nexus-main h3,
html[data-theme="light"] .nexus-main .font-display { color: #10203b !important; }
html[data-theme="light"] .nexus-main label { color: #40516d !important; }
html[data-theme="light"] .nexus-main code { color: #205ebd; }

html[data-theme="light"] .nexus-main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html[data-theme="light"] .nexus-main select,
html[data-theme="light"] .nexus-main textarea {
  color: #182b49 !important;
  caret-color: #246bd6 !important;
  background: rgba(248,251,255,.96) !important;
  border-color: rgba(53,91,151,.15) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9) !important;
}
html[data-theme="light"] .nexus-main input::placeholder,
html[data-theme="light"] .nexus-main textarea::placeholder { color: #8a98ad !important; }
html[data-theme="light"] .nexus-main input:focus,
html[data-theme="light"] .nexus-main select:focus,
html[data-theme="light"] .nexus-main textarea:focus,
html[data-theme="light"] .nexus-main div:focus-within > input {
  color: #10203b !important;
  background: #fff !important;
  border-color: rgba(52,124,244,.55) !important;
  box-shadow: 0 0 0 4px rgba(52,124,244,.10), 0 0 26px rgba(52,124,244,.07) !important;
}
html[data-theme="light"] .nexus-main select option { color: #182b49; background: #fff; }
html[data-theme="light"] .nexus-main input[readonly],
html[data-theme="light"] .nexus-main input:disabled,
html[data-theme="light"] .nexus-main textarea:disabled { color: #77859a !important; background: rgba(234,240,249,.78) !important; }

html[data-theme="light"] .nexus-main .bg-red-50,
html[data-theme="light"] .nexus-main .bg-red-100,
html[data-theme="light"] .nexus-main [class*="bg-[#fef2f2]"] { color: #b9364d !important; background: rgba(239,68,91,.075) !important; border-color: rgba(217,67,92,.17) !important; }
html[data-theme="light"] .nexus-main .bg-green-50,
html[data-theme="light"] .nexus-main .bg-green-100,
html[data-theme="light"] .nexus-main [class*="bg-[#f0fdf4]"] { color: #107944 !important; background: rgba(20,151,90,.075) !important; border-color: rgba(20,151,90,.16) !important; }
html[data-theme="light"] .nexus-main .bg-yellow-50,
html[data-theme="light"] .nexus-main .bg-amber-50 { color: #946000 !important; background: rgba(245,178,41,.11) !important; border-color: rgba(185,119,0,.16) !important; }

html[data-theme="light"] .nexus-main table {
  color: #40516d !important;
  background: rgba(255,255,255,.72) !important;
  border-color: var(--nexus-line) !important;
}
html[data-theme="light"] .nexus-main thead { background: rgba(229,238,252,.78) !important; }
html[data-theme="light"] .nexus-main th { color: #52647f !important; border-color: var(--nexus-line) !important; }
html[data-theme="light"] .nexus-main td { color: #293d5a !important; border-color: var(--nexus-line) !important; }
html[data-theme="light"] .nexus-main tbody tr { background: rgba(255,255,255,.42) !important; }
html[data-theme="light"] .nexus-main tbody tr:nth-child(even) { background: rgba(240,246,255,.52) !important; }
html[data-theme="light"] .nexus-main tbody tr:hover { background: rgba(52,124,244,.065) !important; }
html[data-theme="light"] .nexus-main #filterMenu,
html[data-theme="light"] .nexus-main [id$="Dropdown"],
html[data-theme="light"] .nexus-main [class*="absolute"][class*="shadow-sm"][class*="bg-white"] {
  background: rgba(255,255,255,.98) !important;
  border-color: var(--nexus-line-strong) !important;
  box-shadow: var(--nexus-shadow) !important;
}
html[data-theme="light"] .nexus-main .filter-option:hover { background: rgba(52,124,244,.07) !important; }

html[data-theme="light"] .nexus-main [class*="fixed inset-0"] > .absolute.inset-0 { background: rgba(13,28,55,.38) !important; }
html[data-theme="light"] .nexus-main [class*="fixed inset-0"] > [class*="bg-white"] {
  color: #10203b !important;
  background: rgba(255,255,255,.99) !important;
  border-color: rgba(52,96,171,.16) !important;
  box-shadow: 0 32px 90px rgba(42,73,126,.20), inset 0 1px 0 rgba(255,255,255,.96) !important;
}
html[data-theme="light"] .nexus-main [class*="fixed inset-0"] > [class*="bg-white"]::before { background: rgba(81,104,143,.20); }

html[data-theme="light"] .nexus-page-intro > div > span,
html[data-theme="light"] .nexus-section-heading > span,
html[data-theme="light"] .nexus-eyebrow { color: #246bd6 !important; }
html[data-theme="light"] .nexus-page-intro h1 {
  color: #10203b !important;
  text-shadow: 0 7px 24px rgba(52,86,143,.08) !important;
}
html[data-theme="light"] .nexus-page-intro p { color: #667792 !important; }
html[data-theme="light"] .nexus-soft-action {
  color: #314765 !important;
  background: rgba(255,255,255,.82) !important;
  border-color: var(--nexus-line) !important;
  box-shadow: var(--nexus-soft-shadow) !important;
}

html[data-theme="light"] .nexus-balance-card {
  border-color: rgba(52,124,244,.18) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(34,180,211,.10), transparent 18rem),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(235,244,255,.98) 68%) !important;
  box-shadow: 0 26px 66px rgba(42,73,126,.14), 0 0 45px rgba(52,124,244,.08), inset 0 1px 0 #fff !important;
}
html[data-theme="light"] .nexus-balance-card::after { background: radial-gradient(circle, rgba(34,180,211,.11), transparent 65%) !important; }
html[data-theme="light"] .nexus-balance-top span { color: #667792 !important; }
html[data-theme="light"] .nexus-balance-top button { color: #087f98 !important; background: rgba(7,157,185,.075) !important; border-color: rgba(7,157,185,.14) !important; }
html[data-theme="light"] .nexus-balance-value { color: #10203b !important; text-shadow: 0 8px 28px rgba(52,124,244,.10) !important; }
html[data-theme="light"] .nexus-balance-actions a {
  color: #294260 !important;
  background: rgba(255,255,255,.70) !important;
  border-color: rgba(58,95,157,.12) !important;
  box-shadow: inset 0 1px 0 #fff !important;
}
html[data-theme="light"] .nexus-balance-actions a:hover { background: #fff !important; border-color: rgba(52,124,244,.22) !important; }
html[data-theme="light"] .nexus-balance-actions a i { color: #246bd6 !important; }
html[data-theme="light"] .nexus-summary-grid article,
html[data-theme="light"] .nexus-metric-grid article {
  color: #10203b !important;
  border-color: var(--nexus-line) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,246,255,.92)) !important;
  box-shadow: var(--nexus-soft-shadow), inset 0 1px 0 #fff !important;
}
html[data-theme="light"] .nexus-summary-grid article span,
html[data-theme="light"] .nexus-metric-grid article span { color: #687a95 !important; }
html[data-theme="light"] .nexus-summary-grid article strong,
html[data-theme="light"] .nexus-metric-grid article strong { color: #10203b !important; }
html[data-theme="light"] .nexus-summary-grid article > i,
html[data-theme="light"] .nexus-metric-grid article > i { color: #246bd6 !important; background: rgba(52,124,244,.07) !important; border-color: rgba(52,124,244,.12); }
html[data-theme="light"] .nexus-list-card {
  border-color: var(--nexus-line) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,246,255,.94)) !important;
  box-shadow: var(--nexus-soft-shadow), inset 0 1px 0 #fff !important;
}
html[data-theme="light"] .nexus-card-heading span { color: #6d7e98 !important; }
html[data-theme="light"] .nexus-card-heading h2 { color: #10203b !important; }
html[data-theme="light"] .nexus-card-heading a { color: #246bd6 !important; }
html[data-theme="light"] .nexus-activity-list > a { color: #40516d !important; }
html[data-theme="light"] .nexus-activity-list > a:hover { background: rgba(52,124,244,.055); }
html[data-theme="light"] .nexus-activity-copy strong,
html[data-theme="light"] .nexus-activity-value strong { color: #203653 !important; }
html[data-theme="light"] .nexus-activity-copy small,
html[data-theme="light"] .nexus-activity-value small { color: #71819b !important; }
html[data-theme="light"] .nexus-empty-state h3 { color: #10203b !important; }

html[data-theme="light"] .nexus-hero-card {
  border-color: rgba(52,96,171,.13) !important;
  background:
    radial-gradient(circle at 78% 18%, rgba(25,183,210,.10), transparent 20rem),
    radial-gradient(circle at 20% 80%, rgba(255,83,109,.075), transparent 21rem),
    linear-gradient(145deg, rgba(255,255,255,.97), rgba(237,245,255,.98)) !important;
  box-shadow: var(--nexus-shadow), inset 0 1px 0 #fff !important;
}
html[data-theme="light"] .nexus-hero-copy h1 { color: #10203b !important; }
html[data-theme="light"] .nexus-hero-copy h1 span { color: #e64160 !important; text-shadow: 0 0 26px rgba(230,65,96,.11); }
html[data-theme="light"] .nexus-hero-copy p,
html[data-theme="light"] .nexus-section-heading p { color: #60718c !important; }
html[data-theme="light"] .nexus-secondary-action { color: #314765 !important; background: rgba(255,255,255,.74) !important; border-color: var(--nexus-line) !important; }
html[data-theme="light"] .nexus-trust-row span { color: #5d6f8a !important; }
html[data-theme="light"] .nexus-phone-preview {
  color: #203653 !important;
  background: linear-gradient(180deg, #fdfefe, #e8f2ff) !important;
  border-color: rgba(52,96,171,.15) !important;
  box-shadow: 0 28px 70px rgba(42,73,126,.18), 0 0 42px rgba(52,124,244,.07) !important;
}
html[data-theme="light"] .nexus-phone-notch { background: #12213a !important; }
html[data-theme="light"] .nexus-preview-list > div { background: rgba(255,255,255,.76) !important; border-color: var(--nexus-line) !important; }
html[data-theme="light"] .nexus-section-heading h2 { color: #10203b !important; }
html[data-theme="light"] .nexus-feature-grid article {
  border-color: var(--nexus-line) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,246,255,.93)) !important;
  box-shadow: var(--nexus-soft-shadow), inset 0 1px 0 #fff !important;
}
html[data-theme="light"] .nexus-feature-grid article > div { color: #078fa9 !important; background: rgba(7,157,185,.07) !important; border-color: rgba(7,157,185,.13); }
html[data-theme="light"] .nexus-feature-grid h3 { color: #10203b !important; }
html[data-theme="light"] .nexus-feature-grid p { color: #657690 !important; }
html[data-theme="light"] .nexus-final-cta {
  border-color: rgba(52,96,171,.15) !important;
  background: linear-gradient(135deg, #eaf3ff, #ffffff) !important;
  box-shadow: var(--nexus-shadow), 0 0 42px rgba(52,124,244,.07) !important;
}
html[data-theme="light"] .nexus-final-cta h2 { color: #10203b !important; }
html[data-theme="light"] .nexus-final-cta a { color: #fff !important; background: linear-gradient(135deg, #286fef, #5a94ff) !important; box-shadow: 0 12px 28px rgba(39,105,230,.20) !important; }

html[data-theme="light"] .nexus-admin-hero {
  border-color: rgba(52,96,171,.15) !important;
  background: linear-gradient(135deg, #edf5ff, #ffffff) !important;
  box-shadow: var(--nexus-shadow), 0 0 42px rgba(52,124,244,.07) !important;
}
html[data-theme="light"] .nexus-admin-hero strong { color: #10203b !important; }
html[data-theme="light"] .nexus-admin-hero span,
html[data-theme="light"] .nexus-admin-hero small { color: #667792 !important; }
html[data-theme="light"] .nexus-admin-hero > i { color: rgba(52,124,244,.12) !important; }
html[data-theme="light"] .nexus-quick-admin a {
  color: #40516d !important;
  border-color: var(--nexus-line) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,246,255,.93)) !important;
  box-shadow: var(--nexus-soft-shadow) !important;
}
html[data-theme="light"] .nexus-quick-admin strong { color: #203653 !important; }
html[data-theme="light"] .nexus-quick-admin small,
html[data-theme="light"] .nexus-quick-admin a > i:last-child { color: #71819b !important; }

html[data-theme="light"] body[data-route="/login"] .nexus-main > div,
html[data-theme="light"] body[data-route="/register"] .nexus-main > div,
html[data-theme="light"] body[data-route="/forgot-password"] .nexus-main > div,
html[data-theme="light"] body[data-route^="/reset-password"] .nexus-main > div {
  border-color: rgba(52,96,171,.15) !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,83,109,.075), transparent 18rem),
    radial-gradient(circle at 100% 12%, rgba(25,183,210,.09), transparent 19rem),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(239,246,255,.98)) !important;
  box-shadow: var(--nexus-shadow), inset 0 1px 0 #fff !important;
}
html[data-theme="light"] body[data-route="/login"] .nexus-main h2,
html[data-theme="light"] body[data-route="/register"] .nexus-main h2,
html[data-theme="light"] body[data-route="/forgot-password"] .nexus-main h2,
html[data-theme="light"] body[data-route^="/reset-password"] .nexus-main h2 { color: #10203b !important; }
html[data-theme="light"] body[data-route="/login"] .nexus-main img,
html[data-theme="light"] body[data-route="/register"] .nexus-main img,
html[data-theme="light"] body[data-route="/forgot-password"] .nexus-main img,
html[data-theme="light"] body[data-route^="/reset-password"] .nexus-main img { box-shadow: 0 14px 34px rgba(42,73,126,.13); }
html[data-theme="light"] .nexus-auth-heading h2 { color: #10203b !important; }
html[data-theme="light"] .nexus-auth-heading p { color: #657690; }

html[data-theme="light"] body[data-route="/profile"] label[for="profileImageInput"] { border-color: #f4f8ff !important; }
html[data-theme="light"] body[data-route="/profile"] .detail-table td:first-child { color: #687a95 !important; }
html[data-theme="light"] body[data-route="/profile"] .detail-table td:last-child { color: #203653 !important; }
html[data-theme="light"] body[data-route="/docs"] .nexus-main > div { color: #40516d !important; }
html[data-theme="light"] .nexus-error-card {
  border-color: var(--nexus-line) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(239,246,255,.95)) !important;
  box-shadow: var(--nexus-shadow) !important;
}
html[data-theme="light"] .nexus-error-card h1 { color: #10203b !important; }
html[data-theme="light"] .nexus-error-card p { color: #657690 !important; }
html[data-theme="light"] .nexus-error-card button { color: #314765 !important; background: rgba(232,241,254,.82) !important; }

html[data-theme="light"] .nexus-footer { color: #72829a !important; }
html[data-theme="light"] .nexus-footer strong { color: #263a57 !important; }
html[data-theme="light"] .nexus-footer a { color: #168bc5 !important; }
html[data-theme="light"] .nexus-bottom-nav {
  border-color: rgba(52,96,171,.14) !important;
  background: rgba(250,252,255,.88) !important;
  box-shadow: 0 20px 55px rgba(42,73,126,.17), inset 0 1px 0 #fff !important;
}
html[data-theme="light"] .nexus-bottom-nav a { color: #75859d !important; }
html[data-theme="light"] .nexus-bottom-nav a.active {
  color: #246bd6 !important;
  background: linear-gradient(145deg, rgba(52,124,244,.12), rgba(52,124,244,.055)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 0 20px rgba(52,124,244,.06);
}
html[data-theme="light"] .nexus-toast {
  color: #29405f !important;
  background: rgba(255,255,255,.98) !important;
  border-color: var(--nexus-line-strong) !important;
  box-shadow: var(--nexus-shadow) !important;
}

html[data-theme="light"] .nexus-desktop-nav a { color: #667792; }
html[data-theme="light"] .nexus-desktop-nav a:hover { color: #174eaf; background: rgba(52,124,244,.065); }
html[data-theme="light"] .nexus-desktop-nav a.active {
  color: #174eaf;
  background: linear-gradient(145deg, rgba(52,124,244,.12), rgba(52,124,244,.05));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
html[data-theme="light"] .nexus-desktop-nav a.active i { color: #246bd6; }
html[data-theme="light"] .nexus-telegram-state { color: #687a95; border-color: rgba(52,96,171,.13); background: rgba(235,243,255,.76); }
html[data-theme="light"] .nexus-telegram-state.is-connected { color: #11814b; border-color: rgba(20,151,90,.17); background: rgba(20,151,90,.075); }
html[data-theme="light"] .nexus-telegram-status-grid > div { border-color: rgba(52,96,171,.10); background: rgba(241,247,255,.78); }
html[data-theme="light"] .nexus-telegram-status-grid span { color: #71819b; }
html[data-theme="light"] .nexus-telegram-status-grid strong { color: #29405f; }

@media (max-width: 700px) {
  .nexus-brand-zone { gap: 8px; }
  .nexus-theme-toggle { width: 36px; height: 36px; min-width: 36px; border-radius: 12px; }
  .nexus-theme-toggle i { font-size: 14px; }
  .nexus-support-bubble {
    left: max(16px, calc(env(safe-area-inset-left) + 10px)) !important;
    right: auto !important;
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 14px)) !important;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
}

@media (max-width: 430px) {
  .nexus-topbar-inner { gap: 10px !important; }
  .nexus-brand-zone { gap: 7px; }
  .nexus-theme-toggle { width: 34px; height: 34px; min-width: 34px; }
  .nexus-brand { gap: 8px; }
  .nexus-brand-mark { width: 34px !important; height: 34px !important; }
  .nexus-brand-copy strong { font-size: 13px !important; }
  .nexus-brand-copy small { font-size: 7px !important; letter-spacing: .065em; }
  .nexus-login-pill { min-height: 38px; padding: 0 13px; }
}
