/* ========================================
   Crystal Lux — Premium Dark Stylesheet
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

/* ── Reset & Base ────────────────────── */

* {
  font-family: 'Roboto', sans-serif;
  box-sizing: border-box;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background: var(--bg-gradient-dark);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
  background: none;
}

a {
  text-decoration: none;
  color: var(--accent-gold);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-gold-light);
}

::selection {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

/* ── Logo ────────────────────────────── */

.logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* ── Header ──────────────────────────── */

header {
  background: rgba(7, 23, 66, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  height: var(--header-height);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition-slow);
  z-index: 1040;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

header a,
footer a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition-fast);
}

header a:hover,
footer a:hover {
  color: var(--accent-gold);
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.sidebar-toggle svg rect {
  fill: currentColor;
  transition: fill var(--transition-fast);
}

/* ── Footer ──────────────────────────── */

footer {
  background: rgba(13, 31, 82, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-border);
  padding: 24px 0;
}

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

.sidebar {
  overflow-y: auto;
  overflow-x: hidden;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  z-index: 1038;
  padding: 16px;
  bottom: 0;
  left: 0;
  position: fixed;
  top: var(--header-height);
  background: rgba(13, 31, 82, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--glass-border);
  transition: width var(--transition-slow), padding var(--transition-slow);
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* Sidebar profile */
.sidebar .profile-img {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: var(--radius-lg);
  transition: background var(--transition-fast);
  border: none;
}

.sidebar .profile-img img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.name {
  color: var(--text-primary);
}

.profile-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}

.profile-login {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
}

.user_avatar {
  background: var(--bg-elevated) !important;
}

/* Sidebar profile link */
.sidebar-my-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.sidebar-my-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Sidebar text hide transition */
.sidebar .hide {
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  opacity: 1;
  visibility: visible;
}

/* Sidebar navigation links */
.links,
.hides {
  margin-bottom: 24px;
}

.links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  background: transparent;
  border-left: 3px solid transparent;
}

.links a:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.links a.active,
.links a[aria-current="page"] {
  background: var(--accent-gold-subtle);
  color: var(--accent-gold);
  border-left-color: var(--accent-gold);
  font-weight: 600;
}

.links a i,
.links a svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
}

.links a:hover i,
.links a:hover svg,
.links a.active i,
.links a.active svg {
  opacity: 1;
}

.links a span {
  color: inherit !important;
}

/* Sidebar separator */
.sidebar-separator {
  border-top: 1px solid var(--glass-border);
  margin: 12px 0;
}

/* Sidebar logout button */
.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px;
  position: relative;
}

.sidebar-logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--destructive);
}

/* Tooltip for logout in collapsed state */
body.profile.collapse-side .sidebar-logout-btn {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
}

body.profile.collapse-side .sidebar-logout-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--glass-border);
  z-index: 1060;
}

body.profile.collapse-side .sidebar-logout-btn:hover::after {
  opacity: 1;
}

/* ── Profile body layout ─────────────── */

body.profile header,
body.profile .main-content {
  transition: padding-left var(--transition-slow);
  padding-left: var(--sidebar-width);
}

body.profile.collapse-side header,
body.profile.collapse-side .main-content {
  transition: padding-left var(--transition-slow);
  padding-left: var(--sidebar-collapsed);
}

body.profile.collapse-side .sidebar {
  width: var(--sidebar-collapsed);
  padding: 12px 10px;
}


body.profile.collapse-side .hide {
  opacity: 0;
  visibility: hidden;
  width: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

body.profile.collapse-side .links a > span {
  display: none;
}

body.profile.collapse-side .links a {
  justify-content: center;
  padding: 10px 0;
  border-left: none;
  gap: 0;
  position: relative;
}

body.profile.collapse-side .links a.active {
  background: var(--accent-gold-subtle);
  border-radius: var(--radius-md);
}

/* Tooltip on hover for collapsed sidebar */
body.profile.collapse-side .links a::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--glass-border);
  z-index: 1060;
}

body.profile.collapse-side .links a:hover::after {
  opacity: 1;
}

/* Collapsed sidebar profile — show only avatar centered */
body.profile.collapse-side .sidebar-my-link {
  justify-content: center;
  padding: 8px 0;
  gap: 0;
}

body.profile section {
  padding: 32px 0;
}

body.profile section.main-content {
  padding-top: var(--header-height);
}

body.profile header .col-12 > div {
  height: var(--header-height);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-height);
  background: rgba(0, 0, 0, 0.5);
  z-index: 1037;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

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

.main-content {
  padding-top: var(--header-height);
  padding-bottom: 0;
  background: none;
}

.hi-sec {
  padding: 32px 0;
}

/* ── Typography ──────────────────────── */

.main-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--text-primary);
}

.section-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.middle-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.small-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.tiny-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.mont {
  font-weight: 600;
}

.noto {
  font-weight: 700;
}

.fw-bold {
  font-weight: 700;
}

.text-white {
  color: var(--text-primary) !important;
}

.text-dark {
  color: var(--text-secondary) !important;
}

.blue-text {
  color: var(--accent-gold) !important;
}

.grey-text {
  color: var(--text-muted) !important;
}

/* ── Gold gradient text ──────────────── */

.text-gradient-gold {
  background: var(--accent-gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
}

/* ── Buttons — Crystal-Lux Gold Gradient */

.btn {
  transition: all var(--transition-fast);
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #03153b;
  background: linear-gradient(-60deg, #b58d3d, #c6ae72, #fbe6b1);
  background-size: 200% 200%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius-3xl);
  min-height: 44px;
  padding: 10px 28px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn:hover {
  background: linear-gradient(-60deg, #fff, #c0a25f, #fff5e0);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold-strong);
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-gold-light);
  outline-offset: 2px;
}

.btn:disabled {
  background: #a9a9a9;
  cursor: not-allowed;
  box-shadow: none;
}

.btn:disabled::after {
  display: none;
}

.btn.small {
  width: max-content;
  min-height: 36px;
  font-size: 13px;
  padding: 6px 20px;
}

.btn-primary {
  background: linear-gradient(-60deg, #b58d3d, #c6ae72, #fbe6b1) !important;
  color: #03153b !important;
  border: none !important;
}

.btn-primary:hover {
  background: linear-gradient(-60deg, #fff, #c0a25f, #fff5e0) !important;
}

.btn-primary:focus {
  background: linear-gradient(-60deg, #b58d3d, #c6ae72, #fbe6b1) !important;
}

.btn-secondary {
  background: transparent !important;
  color: var(--accent-gold-light) !important;
  border: 1px solid var(--accent-gold) !important;
  box-shadow: none;
}

.btn-secondary::after {
  display: none;
}

.btn-secondary:hover {
  background: var(--accent-gold-subtle) !important;
  box-shadow: var(--shadow-gold);
}

.btn.gradient {
  background: var(--accent-gold-gradient);
  border: none !important;
  color: #03153b;
}

.btn.gradient:hover {
  color: white !important;
}

/* ── Forms & Inputs ──────────────────── */

input:not([type="radio"]):not([type="checkbox"]),
textarea {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  resize: none;
  width: 100%;
  background: var(--bg-input);
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 400;
  padding: 12px 16px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:not([type="radio"]):not([type="checkbox"]) {
  height: 44px;
}

input:not([type="radio"]):not([type="checkbox"]):focus,
textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-subtle);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

.input__register__item {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  padding: 12px 16px;
  height: 44px;
}

select {
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  text-align: center;
  align-items: center;
  width: 100%;
  min-height: 44px;
  font-weight: 500;
  font-size: 15px;
  padding: 8px 16px;
}

.show-password {
  position: absolute;
  right: 15px;
  top: 50%;
  background: transparent;
  border: none;
  transform: translateY(-50%);
  cursor: pointer;
}

.show-password svg path {
  fill: var(--text-muted);
  transition: fill var(--transition-fast);
}

.show-password:hover svg path {
  fill: var(--text-primary);
}

/* ── Gradient border input (auth forms) ─ */

.gradient-border-input {
  position: relative;
  background: white;
  border-radius: var(--radius-3xl);
  padding: 0;
}

.gradient-border-input::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  background: var(--accent-gold-gradient);
  border-radius: var(--radius-3xl);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.gradient-border-input input,
.gradient-border-input input[type="text"],
.gradient-border-input input[type="password"],
.gradient-border-input input[type="email"],
.gradient-border-input input[type="tel"],
.gradient-border-input input:not([type="radio"]):not([type="checkbox"]) {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: var(--radius-3xl);
  padding: 12px 20px;
  height: 48px;
  color: var(--text-on-light) !important;
  font-size: 15px;
  width: 100%;
  box-shadow: none !important;
}

.gradient-border-input input::placeholder {
  color: var(--text-on-light-secondary) !important;
}

.gradient-border-input input:focus,
.gradient-border-input input:active {
  box-shadow: none !important;
  border: none !important;
  outline: none;
  background: transparent !important;
  background-color: transparent !important;
}

.gradient-border-input input:-webkit-autofill,
.gradient-border-input input:-webkit-autofill:hover,
.gradient-border-input input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px white inset !important;
  -webkit-text-fill-color: var(--text-on-light) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.login-form-container .gradient-border-input input {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--text-on-light) !important;
}

/* ── Login form container (light surface) */

.login-form-container {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  background: var(--surface-light);
  border-radius: var(--radius-3xl);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 2rem;
}

.login-form-container .section-title,
.login-form-container h3 {
  color: var(--text-on-light) !important;
}

.login-form-container label {
  color: var(--text-on-light-secondary) !important;
  font-size: 13px;
  font-weight: 500;
}

.login-form-container a {
  color: var(--accent-gold);
}

.login-form-container a:hover {
  color: var(--accent-gold-hover);
}

.login-form-container .btn {
  border-radius: var(--radius-3xl);
}

.login-form-container .alert {
  border-radius: var(--radius-lg);
}

.login-form-container .alert-danger {
  background: rgba(239, 68, 68, 0.08);
  color: var(--destructive);
  border-color: rgba(239, 68, 68, 0.2);
}

.login-form-container .text-white {
  color: var(--text-on-light) !important;
}

@media (min-width: 768px) {
  .login-form-container {
    padding: 3rem;
  }
}

@media (max-width: 400px) {
  .login-form-container {
    border-radius: 20px;
    padding: 1.25rem;
  }
}

/* ── Form buffer (dashboard glassmorphism) */

.form-buffer {
  padding: 40px;
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xl);
}

.form-buffer a {
  color: var(--accent-gold);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.form-buffer a:hover {
  color: var(--accent-gold-light);
}

.form-buffer label {
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
  color: var(--text-secondary);
}

.bg-prim {
  background-color: var(--bg-secondary);
}

/* ── Gold shimmer border ─────────────── */

.b-gradient-gold {
  position: relative;
}

.b-gradient-gold::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #b58d3d, #c6ae72, #fbe6b1, #d4c085, #b58d3d);
  background-size: 300% 300%;
  border-radius: inherit;
  z-index: 0;
  animation: border-shimmer 3s ease-in-out infinite;
}

.b-gradient-gold::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: var(--bg-primary);
  border-radius: inherit;
  z-index: 1;
}

.b-gradient-gold > * {
  position: relative;
  z-index: 2;
}

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

.card {
  height: 100%;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  padding: 20px;
}

.item-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.item-card img {
  border-radius: var(--radius-md);
}

/* ── Node cards — glassmorphism ─────── */

.referal-card.node-card-glass {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.referal-card.node-card-glass:hover {
  border-color: var(--accent-gold) !important;
  box-shadow: var(--shadow-gold);
}

.referal-card.node-card-glass.node-card--expired {
  border-color: var(--destructive) !important;
  opacity: 0.7;
}

.referal-card.node-card-glass.node-card--frozen {
  opacity: 0.45;
}

.referal-card.node-card-glass .text-body {
  color: var(--text-primary) !important;
}

.referal-card.node-card-glass .text-body.text-muted-node {
  color: var(--text-secondary) !important;
}

.referal-card.node-card-glass .blue-text {
  color: var(--accent-gold-hover) !important;
}

.referal-card.node-card-glass .badge.bg-primary {
  background: var(--accent-gold-gradient) !important;
  color: var(--bg-primary) !important;
}

.new-node-card.node-card-glass {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.new-node-card.node-card-glass:hover {
  border-color: var(--accent-gold) !important;
  box-shadow: var(--shadow-gold);
}

.new-node-card.node-card-glass .text-body,
.new-node-card.node-card-glass .blue-text {
  color: var(--text-primary) !important;
}

/* ── New-node dropdown fix ─────────── */

.new-node-card-wrapper {
  position: relative;
  z-index: 20;
  overflow: visible;
}

.new-node-card-wrapper:has(.dropdown-menu.show) {
  z-index: 1060;
}

.new-node-card.node-card-glass {
  overflow: visible;
}

.new-node-card.node-card-glass .dropdown-menu.item-pos {
  z-index: 1050;
  position: absolute;
}

/* ── New-node buttons styling ────────── */

.submit-new-node-btn {
  color: var(--bg-primary) !important;
  background: var(--accent-gold-gradient) !important;
  border-radius: var(--radius-md) !important;
  font-weight: 600 !important;
  transition: opacity var(--transition-fast);
}

.submit-new-node-btn:hover {
  opacity: 0.9;
}

.submit-new-node-btn.bg-danger {
  background: var(--destructive) !important;
  color: #fff !important;
}

.page__block.marketing__structure,
.marketing__structure {
  overflow: visible !important;
}

.marketing__structure_body {
  overflow-x: auto;
  overflow-y: visible;
}

.levels-layout__main {
  overflow: visible;
}

/* ── Level tab statuses ────────────── */

.level-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 60px;
  padding: 12px 20px;
  width: 100%;
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-xl) !important;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--text-primary) !important;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.level-tab:hover {
  background: var(--accent-gold-subtle) !important;
  border-color: var(--accent-gold) !important;
  box-shadow: var(--shadow-gold);
  color: var(--text-primary) !important;
}

.level-tab--current {
  background: linear-gradient(140deg, rgba(34, 197, 94, 0.35), rgba(34, 197, 94, 0.15)) !important;
  border-color: var(--success) !important;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.2);
}

.level-tab--unclosed {
  background: linear-gradient(140deg, rgba(239, 68, 68, 0.35), rgba(239, 68, 68, 0.15)) !important;
  border-color: var(--destructive) !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

.level-tab--closed {
  background: var(--glass-bg) !important;
  border-color: var(--border-light) !important;
  opacity: 0.65;
}

.level-tab--locked {
  background: var(--glass-bg) !important;
  border-color: var(--border) !important;
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

.level-tab .level-tab__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Progress bar for active places ── */

.place-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.place-progress:hover {
  border-color: var(--border-light);
}

.place-progress__title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-secondary);
}

.place-progress__bar {
  flex-grow: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.place-progress__fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-gold-gradient);
  transition: width var(--transition-slow);
}

.place-progress__count {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ── Active places section ─────────── */

.active-places-section {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: 20px;
  margin-bottom: 40px;
  max-height: 450px;
  overflow-y: auto;
}

.active-places-section::-webkit-scrollbar {
  width: 4px;
}

.active-places-section::-webkit-scrollbar-track {
  background: transparent;
}

.active-places-section::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-full);
}

.active-places-section h3 {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ── Tree structure ────────────────── */

.tree-container {
  display: flex;
  align-items: start;
  justify-content: center;
  margin-top: 8px;
  border-radius: var(--radius-lg);
}

.tree-node {
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.tree-children {
  display: flex;
  flex-direction: row-reverse;
  overflow: visible;
}

/* ── Info card (glassmorphism alert) ── */

.info-card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: 24px;
  color: var(--text-primary);
}

.info-card-glass h4 {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.info-card-glass p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.info-card-glass hr {
  border-color: var(--border);
  opacity: 0.5;
  margin: 16px 0;
}

.info-card-glass .list-group {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.info-card-glass .list-group-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--text-primary);
}

.info-card-glass .text-muted {
  color: var(--text-muted) !important;
}

/* ── Compact button (for modals, forms) ── */

.btn-compact {
  min-height: auto;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: var(--radius-full);
}

.btn-compact.btn-primary {
  background: var(--accent-gold-gradient);
  border: none;
  color: var(--bg-primary);
}

.btn-compact.btn-primary:hover {
  box-shadow: var(--shadow-gold);
}

.btn-compact.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.btn-compact.btn-secondary:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

/* ── Badge glass ──────────────────── */

.badge-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
}

/* ── Button group glass ──────────── */

.btn-group-glass .btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  min-height: auto;
  padding: 6px 14px;
  font-size: 13px;
  transition: all var(--transition-fast);
}

.btn-group-glass .btn:hover,
.btn-group-glass .btn.active,
.btn-group-glass .btn-primary {
  background: var(--accent-gold-subtle);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.grey-buffer {
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

.section__programs-block-shadow {
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.prim-buffer {
  height: 100%;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-weight: 600;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.pop-number {
  display: flex;
  justify-content: center;
  padding: 8px 20px;
  width: max-content;
  margin-top: 12px;
  color: var(--accent-gold);
  font-size: 18px;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
}

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

.table {
  color: var(--text-primary);
  border-color: var(--border);
}

.table thead th {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}

.table tbody td,
.table tbody th {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

.table tbody tr:hover td,
.table tbody tr:hover th {
  background: var(--bg-elevated);
}

/* ── Modals ──────────────────────────── */

.modal-content {
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, var(--bg-secondary) 0%, var(--bg-elevated) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  padding: 32px;
  box-shadow: var(--shadow-xl);
}

.modal-content * {
  color: var(--text-primary);
}

.modal-header {
  border-bottom: 1px solid var(--border);
}

.modal-footer {
  border-top: 1px solid var(--border);
}

.modal-backdrop {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content .close {
  position: absolute;
  top: 16px;
  right: 16px;
}

/* ── Dropdowns ────────────────────────── */

.dropdown-menu {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  padding: 6px;
}

.dropdown-menu .dropdown-item,
.dropdown-menu .btn-link.dropdown-item {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  width: 100%;
  height: auto;
  background: transparent;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .btn-link.dropdown-item:hover {
  background: var(--bg-elevated);
  color: var(--accent-gold);
}

.dropdown-divider {
  border-color: var(--glass-border);
}

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

.alert {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 16px 20px;
}

.alert-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--destructive);
  border-color: rgba(239, 68, 68, 0.3);
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.3);
}

.alert-heading {
  color: var(--text-primary) !important;
}

/* ── Badges ──────────────────────────── */

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge.text-bg-primary,
.text-bg-primary {
  background: var(--accent-gold-subtle) !important;
  color: var(--accent-gold) !important;
}

.text-success {
  color: var(--success) !important;
}

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

.nav-tabs {
  border-bottom: none;
}

.nav-tabs .nav-link {
  border: none;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
  transition: all var(--transition-fast);
}

.nav-tabs .nav-link:hover {
  color: var(--text-primary) !important;
  background: var(--bg-elevated);
}

.nav-tabs .nav-link.active {
  border-radius: var(--radius-md);
  color: #03153b !important;
  background: linear-gradient(-60deg, #b58d3d, #c6ae72, #fbe6b1);
  box-shadow: var(--shadow-gold);
}

.nav-tabs .nav-link.active:hover {
  color: #03153b !important;
}

/* ── Pagination ──────────────────────── */

.pagination {
  display: flex;
  gap: 4px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 4px;
  overflow: hidden;
  font-weight: 600;
}

.pagination .page-item .page-link,
.pagination a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: transparent;
}

.pagination .page-item.active .page-link,
.pagination a.active {
  color: #03153b;
  background: linear-gradient(-60deg, #b58d3d, #c6ae72, #fbe6b1);
}

.pagination a:hover,
.pagination .page-item .page-link:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.pagination .page-item:first-child,
.pagination .page-item:last-child {
  display: none;
}

/* ── Search input ────────────────────── */

.srch-input {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-input);
  padding: 8px 16px;
  transition: border-color var(--transition-fast);
}

.srch-input:focus-within {
  border-color: var(--accent-gold);
}

.srch-input input {
  border: none;
  padding: 0;
  height: auto;
  background: transparent;
  color: var(--text-primary);
}

.srch-input input:focus {
  box-shadow: none;
  border: none;
}

/* ── More links ──────────────────────── */

.more {
  transition: color var(--transition-fast);
  color: var(--text-secondary);
  text-align: center;
  position: relative;
  font-size: 14px;
  font-weight: 500;
}

.more:hover {
  color: var(--accent-gold);
}

.more-1 {
  position: relative;
}

.more-1::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  border-bottom: 1px solid var(--accent-gold);
  width: 100%;
}

.more-1::after {
  content: '';
  position: absolute;
  bottom: -7px;
  right: -8px;
  border: 4px solid transparent;
  border-left: 4px solid var(--accent-gold);
}

.more-1 a {
  font-weight: 400;
  font-size: 0.875em;
  color: var(--accent-gold);
}

.more::after {
  position: absolute;
  content: url(../img/arrow.svg);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

/* ── Total sum label ─────────────────── */

.total-sum {
  color: #03153b;
  background: linear-gradient(-60deg, #b58d3d, #c6ae72, #fbe6b1);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
}

/* ── Structure form ──────────────────── */

.structure-form {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* ── Help & feedback blocks ──────────── */

.help-block {
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  padding: 16px 8px;
  border: 1px solid var(--border);
}

.help-form {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.help-form input:not([type="radio"]),
.help-form textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.help-form textarea {
  border-radius: var(--radius-lg);
}

.help-form input:not([type="radio"]) {
  margin-top: 4px;
  height: 44px;
}

.feedback {
  height: 100%;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.feedback .profile-img {
  transform: translateY(-14px);
  width: max-content;
  height: max-content;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
}

/* ── Level colors ────────────────────── */

.level.l2 { background-color: #f19d9d; }
.level.l3 { background-color: var(--text-muted); }
.level.l4 { background-color: var(--info); }
.level.l5 { background-color: var(--success); }

/* ── Program family ──────────────────── */

.program-family,
.program-family *,
.referal-card,
.referal-card *,
.new-node-card,
.new-node-card *,
.clones-cards,
.clones-cards * {
  font-family: 'Roboto', sans-serif !important;
}

.referal-card * {
  font-size: 14px;
}

/* ── Date display ────────────────────── */

.date {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Get code button ─────────────────── */

.getCodeButton {
  position: absolute;
  top: 8px;
  right: 16px;
  font-size: 14px;
  font-weight: 600;
  width: 200px;
  min-height: 36px;
  padding: 0;
}

/* ── Input profile link ──────────────── */

.input-profile-link {
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-input);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

/* ── Logout button ───────────────────── */

.logout__btn {
  background: transparent;
  height: fit-content;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.logout__btn:hover {
  border-color: var(--destructive);
  color: var(--destructive);
}

/* ── First section (landing) ─────────── */

.first-section {
  height: 100vh;
  background-size: cover;
  background-repeat: no-repeat;
}

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

.grecaptcha-badge {
  width: 256px;
  height: 60px;
  display: block;
  position: fixed;
  bottom: 14px;
  right: -186px;
  opacity: 0;
}

/* ── Utility overrides ───────────────── */

.p-0 {
  padding: 8px !important;
}

.bg-crystal {
  background: var(--bg-elevated) !important;
}

section {
  padding: 48px 0;
}

/* ── Swiper / Slider overrides ───────── */

.swiper-button-prev,
.swiper-button-next {
  color: var(--accent-gold) !important;
}

.swiper-pagination {
  color: var(--text-secondary);
}

/* ── Team buffers ────────────────────── */

.team-buffer {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.help-wrapper-buffer::-webkit-scrollbar {
  display: none;
}

.team-item a {
  color: var(--text-primary);
}

/* ── Game-Box (Programs promo) ───────── */

.logo-game-box {
  font-weight: 700;
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 16px;
  background: var(--accent-gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-game-box {
  background: linear-gradient(145deg, var(--bg-secondary) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.card-header-game-box {
  background: linear-gradient(-60deg, #b58d3d, #c6ae72, #fbe6b1);
  padding: 12px 20px;
  text-align: center;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  color: #03153b;
}

.card-body-game-box {
  padding: 24px;
}

.card-body-game-box h3,
.card-body-game-box h5 {
  color: var(--text-primary);
}

.card-body-game-box p,
.card-body-game-box .lead {
  color: var(--text-secondary);
}

.highlight-game-box {
  color: var(--accent-gold-light);
  font-weight: 700;
}

.feature-item-game-box {
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent-gold);
}

.cta-button {
  width: 100%;
  background: linear-gradient(-60deg, #b58d3d, #c6ae72, #fbe6b1);
  color: #03153b;
  border: none;
  border-radius: var(--radius-3xl);
  padding: 12px 28px;
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 16px;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

.cta-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.cta-button:hover::after {
  transform: translateX(100%);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold-strong);
  color: #03153b;
}

.hashtag {
  text-align: center;
  background: var(--accent-gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
  margin-top: 16px;
  font-size: 1rem;
}

/* ── Logo header ─────────────────────── */

.logo-header {
  width: 100px !important;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1200px) {
  .team-buffer-wrapper {
    overflow-x: scroll;
  }

  .team-buffer {
    display: flex;
    flex-wrap: nowrap;
    width: 1200px !important;
  }
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-slow), width var(--transition-slow), padding var(--transition-slow);
    width: var(--sidebar-width);
    z-index: 1050;
    background: rgba(13, 31, 82, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  body.profile header,
  body.profile .main-content {
    transition: padding-left var(--transition-slow);
    padding-left: 0;
    margin: 0;
  }

  body.profile.collapse-side .sidebar {
    transform: translateX(0%);
    width: var(--sidebar-width);
    padding: 16px;
  }

  body.profile.collapse-side .hide {
    opacity: 1;
    visibility: visible;
    width: auto;
    overflow: visible;
    pointer-events: auto;
  }

  body.profile.collapse-side .links a > span {
    display: inline;
  }

  body.profile.collapse-side .links a {
    justify-content: flex-start;
    padding: 10px 12px;
    border-left: 3px solid transparent;
    gap: 12px;
  }

  body.profile.collapse-side .links a.active {
    border-left-color: var(--accent-gold);
    background: var(--accent-gold-subtle);
  }

  body.profile.collapse-side .links a::after {
    display: none;
  }

  body.profile.collapse-side .sidebar-logout-btn {
    justify-content: flex-start;
    padding: 10px 12px;
    gap: 12px;
  }

  body.profile.collapse-side .sidebar-logout-btn::after {
    display: none;
  }

  body.profile.collapse-side .sidebar-my-link {
    justify-content: flex-start;
    padding: 12px;
    gap: 12px;
  }

  body.profile.collapse-side header {
    padding: 0 16px;
  }

  body.profile.collapse-side .main-content {
    padding-left: 0;
    margin: 0;
  }

  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }

  body.profile header {
    z-index: 1060;
    padding: 0 16px;
  }

  header {
    z-index: 1060;
  }

  .form-buffer {
    padding: 32px 20px;
  }

  .btn {
    width: 100%;
  }

  .btn.small {
    width: 100%;
  }

  section {
    padding: 32px 0;
  }

  .first-section {
    padding: 64px 0;
    height: auto;
  }

  .main-title {
    font-size: 28px;
  }

  .middle-text {
    font-size: 20px;
  }

  .small-text {
    font-size: 14px;
  }

  .mont {
    font-size: 12px;
  }

  .getCodeButton {
    font-size: 12px;
    width: 140px;
  }

  /* Mobile menu */
  .bars {
    z-index: 1070;
    width: 28px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
  }

  .bars span {
    border-radius: 2px;
    transition: all var(--transition-slow);
    width: 100%;
    height: 3px;
    background: var(--text-secondary);
    content: '';
  }

  .mob-menu {
    z-index: 1050;
    left: 0;
    opacity: 0;
    width: 100%;
    background: rgba(13, 31, 82, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px;
    top: 0;
    transition: all var(--transition-slow);
    transform: translateY(-100%);
  }

  body.show-menu .mob-menu {
    opacity: 1;
    transition: all var(--transition-slow);
    transform: translateY(0%);
    top: var(--header-height);
  }

  body.show-menu .bars span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
  }

  body.show-menu .bars span:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
  }

  body.show-menu .bars span:nth-child(3) {
    width: 0;
  }

  footer {
    padding: 32px 0;
  }

  .help-wrapper-buffer {
    overflow-y: scroll;
  }

  .help-block {
    width: auto;
    flex-wrap: nowrap;
    border-radius: var(--radius-md);
  }

  .feedback .circle-buffer {
    width: 80px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    overflow: hidden;
  }
}

@media (max-width: 750px) {
  .btn.small {
    padding: 6px 40px;
    margin-right: 0;
  }
}

@media (max-width: 380px) {
  .mont {
    font-size: 10px;
  }

  .btn.small {
    font-size: 12px;
    padding: 6px 24px;
  }
}

/* ========================================
   UX/UI Rules — Accessibility & Animation
   ======================================== */

/* ── Focus-visible ───────────────────── */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.links a:focus-visible {
  outline-offset: -2px;
}

/* ── Touch targets minimum 44px ──────── */

.links a,
.links button {
  min-height: 44px;
}

.nav-tabs .nav-link {
  min-height: 44px;
}

/* ── Border shimmer animation ────────── */

@keyframes border-shimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ── Shimmer loading animation ───────── */

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--bg-elevated) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

/* ── Gold glow for accent elements ───── */

.btn:hover,
.btn:focus-visible {
  box-shadow: var(--shadow-gold-strong);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: var(--shadow-gold-strong) !important;
}

/* ── Data change flash animation ─────── */

@keyframes data-flash {
  0% { box-shadow: 0 0 0 0 rgba(181, 141, 61, 0.4); }
  50% { box-shadow: 0 0 12px 4px rgba(181, 141, 61, 0.2); }
  100% { box-shadow: 0 0 0 0 rgba(181, 141, 61, 0); }
}

.data-updated {
  animation: data-flash 600ms ease-out;
}

/* ── Screen reader only ──────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── No horizontal scroll on mobile ──── */

html, body {
  overflow-x: hidden;
}

/* ── prefers-reduced-motion ──────────── */

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

  .shimmer {
    animation: none;
    background: var(--bg-secondary);
  }

  .btn:hover {
    transform: none;
  }

  .btn:active {
    transform: none;
  }

  .btn::after {
    display: none;
  }

  .cta-button::after {
    display: none;
  }
}
