:root {
  --rx-bg-dark: #060d18;
  --rx-bg: #0a1628;
  --rx-bg-card: #0f1f35;
  --rx-bg-card-hover: #152a45;
  --rx-cyan: #00c8ff;
  --rx-cyan-glow: rgba(0, 200, 255, 0.35);
  --rx-blue: #1a4a7a;
  --rx-text: #f4f8ff;
  --rx-text-muted: #c5d4ea;
  --rx-text-soft: #a8bdd8;
  --rx-border: rgba(0, 200, 255, 0.15);
  --rx-gradient: linear-gradient(135deg, #0a1628 0%, #0d2137 50%, #060d18 100%);
  --rx-scrollbar-size: 8px;
  --rx-scrollbar-track: #0a1628;
  --rx-scrollbar-thumb: rgba(0, 200, 255, 0.38);
  --rx-scrollbar-thumb-hover: rgba(0, 200, 255, 0.62);
  --rx-scrollbar-border: rgba(0, 200, 255, 0.12);
}

/* Custom scrollbars — Firefox + WebKit */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--rx-scrollbar-thumb) var(--rx-scrollbar-track);
}

*::-webkit-scrollbar {
  width: var(--rx-scrollbar-size);
  height: var(--rx-scrollbar-size);
}

*::-webkit-scrollbar-track {
  background: var(--rx-scrollbar-track);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 200, 255, 0.55) 0%, rgba(0, 200, 255, 0.28) 100%);
  border-radius: 999px;
  border: 2px solid var(--rx-scrollbar-track);
  box-shadow: inset 0 0 6px rgba(0, 200, 255, 0.15);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--rx-scrollbar-thumb-hover) 0%, rgba(0, 200, 255, 0.45) 100%);
}

*::-webkit-scrollbar-thumb:active {
  background: var(--rx-cyan);
}

*::-webkit-scrollbar-corner {
  background: var(--rx-scrollbar-track);
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--rx-gradient);
  color: var(--rx-text);
  min-height: 100vh;
  margin: 0;
  line-height: 1.6;
}

/* Bootstrap overrides for dark theme */
.text-muted { color: var(--rx-text-muted) !important; }
.text-body-secondary { color: var(--rx-text-muted) !important; }
.form-label { color: var(--rx-text) !important; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--rx-text); }
p { color: var(--rx-text); }
small, .small { color: var(--rx-text-soft); }
.modal-rx .modal-title { color: var(--rx-text); }

.modal-rx {
  z-index: 1090;
}

.modal-backdrop.show {
  z-index: 1085;
}

a { color: var(--rx-cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }

/* ── Header / Hero ── */
.site-header {
  position: relative;
  overflow: hidden;
  padding: 2rem 0 0;
  background: var(--rx-gradient);
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0, 200, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 100, 200, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.network-bg {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 10% 20%, var(--rx-cyan) 1px, transparent 1px),
    radial-gradient(circle at 90% 80%, var(--rx-cyan) 1px, transparent 1px),
    linear-gradient(45deg, transparent 48%, rgba(0,200,255,0.1) 49%, rgba(0,200,255,0.1) 51%, transparent 52%);
  background-size: 120px 120px, 80px 80px, 60px 60px;
  pointer-events: none;
}

.navbar-rx {
  background: transparent !important;
  padding: 0.75rem 0;
  position: relative;
  z-index: 10;
}

.navbar-rx .nav-link {
  color: var(--rx-text-muted) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: all 0.2s;
}

.navbar-rx .nav-link:hover,
.navbar-rx .nav-link.active {
  color: #fff !important;
  background: rgba(0, 200, 255, 0.08);
}

.logo-text {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.logo-text .raid { color: #fff; }
.logo-text .x { color: var(--rx-cyan); text-shadow: 0 0 20px var(--rx-cyan-glow); }

.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.logo-brand {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  line-height: 0;
}

.logo-brand--lg .logo-img {
  width: 64px;
  height: 64px;
}

.logo-cap {
  position: absolute;
  top: -0.45rem;
  right: -0.55rem;
  font-size: 1.15rem;
  color: var(--rx-cyan);
  transform: rotate(22deg);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
  pointer-events: none;
  z-index: 1;
}

.logo-brand--lg .logo-cap {
  font-size: 1.65rem;
  top: -0.55rem;
  right: -0.65rem;
}

.tagline {
  color: var(--rx-text-muted);
  font-size: 1.05rem;
  margin-top: 0.25rem;
}

.hero-title .raid { color: #fff; }

/* Hero section */
.hero-section {
  padding: 3rem 0 2rem;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.hero-title .x { color: var(--rx-cyan); }

.service-icons {
  display: flex;
  gap: 2rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.service-icon-item {
  text-align: center;
  animation: fadeInUp 0.6s ease both;
}

.service-icon-item:nth-child(2) { animation-delay: 0.15s; }
.service-icon-item:nth-child(3) { animation-delay: 0.3s; }

.service-circle {
  width: 80px;
  height: 80px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 1.75rem;
  color: #fff;
  transition: all 0.3s;
  background: rgba(255,255,255,0.03);
}

.service-circle:hover {
  border-color: var(--rx-cyan);
  box-shadow: 0 0 25px var(--rx-cyan-glow);
  transform: translateY(-4px);
}

.service-label {
  font-size: 0.85rem;
  color: var(--rx-text-muted);
  font-weight: 500;
}

/* Features bar */
.features-bar {
  border-top: 1px solid var(--rx-border);
  padding: 1.25rem 0;
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--rx-text);
}

.feature-dot {
  width: 6px;
  height: 6px;
  background: var(--rx-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--rx-cyan-glow);
}

.feature-icon {
  color: var(--rx-cyan);
  font-size: 1.1rem;
}

/* ── Content sections ── */
.main-content {
  padding: 3rem 0 4rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.section-subtitle {
  color: var(--rx-text-muted);
  margin-bottom: 2.5rem;
}

.card-rx {
  background: var(--rx-bg-card);
  border: 1px solid var(--rx-border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.3s;
  height: 100%;
  color: var(--rx-text);
}

.card-rx-table {
  height: auto;
  padding: 0;
}

/* Единый блок: панель поиска + таблица + пагинация */
.admin-list-card {
  height: auto !important;
  padding: 0;
  overflow: hidden;
}

.admin-list-card .admin-list-toolbar {
  border-bottom: 1px solid var(--rx-border);
  background: rgba(255, 255, 255, 0.03);
}

.admin-list-card .admin-list-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-list-card .admin-table {
  width: 100%;
  margin-bottom: 0;
}

.admin-list-card .admin-table th:first-child,
.admin-list-card .admin-table td:first-child,
.card-rx-table .admin-table th:first-child,
.card-rx-table .admin-table td:first-child {
  padding-left: 1.25rem;
}

.admin-list-card .admin-table th:last-child,
.admin-list-card .admin-table td:last-child,
.card-rx-table .admin-table th:last-child,
.card-rx-table .admin-table td:last-child {
  padding-right: 1.25rem;
}

.admin-list-card .admin-list-pagination:empty {
  display: none;
}

.admin-list-card .admin-list-pagination:not(:empty) {
  border-top: 1px solid var(--rx-border);
  padding-top: 0.75rem;
  display: flex;
  justify-content: center;
}

.row-cards-equal > [class*="col-"] {
  display: flex;
}

.card-rx-flex {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.card-rx-flex .card-rx-grow {
  flex: 1 1 auto;
}

.card-rx-flex .card-rx-actions {
  margin-top: auto;
  padding-top: 1rem;
}

.card-rx h4, .card-rx h5 { color: #fff; }
.card-rx p { color: var(--rx-text-muted); }

.card-rx:hover {
  background: var(--rx-bg-card-hover);
  border-color: rgba(0, 200, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card-rx .price-tag {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rx-cyan);
}

.card-rx .duration {
  color: var(--rx-text-muted);
  font-size: 0.875rem;
}

.btn-rx {
  background: linear-gradient(135deg, var(--rx-cyan), #0099cc);
  color: #060d18 !important;
  border: none;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  transition: all 0.3s;
}

.btn-rx:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--rx-cyan-glow);
  color: #060d18 !important;
}

.btn-rx-outline {
  background: transparent;
  color: var(--rx-cyan) !important;
  border: 1px solid var(--rx-cyan);
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  transition: all 0.3s;
}

.btn-rx-outline:hover {
  background: rgba(0, 200, 255, 0.1);
  box-shadow: 0 0 20px var(--rx-cyan-glow);
}

/* About blocks */
.about-block {
  padding: 2rem;
  border-left: 3px solid var(--rx-cyan);
  background: rgba(0, 200, 255, 0.04);
  border-radius: 0 12px 12px 0;
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.about-block h3 {
  color: var(--rx-cyan);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.about-block p {
  color: var(--rx-text-muted);
  flex: 1 1 auto;
}

/* News cards */
.news-card {
  background: var(--rx-bg-card);
  border: 1px solid var(--rx-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 0;
  transition: all 0.3s;
  color: var(--rx-text);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-card h5 { color: #fff; }
.news-card p {
  color: var(--rx-text-muted);
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card:hover {
  border-color: rgba(0, 200, 255, 0.3);
}

.news-card-preview {
  word-break: break-word;
  white-space: pre-wrap;
}

.admin-main .news-card {
  max-width: 100%;
}

.news-date {
  font-size: 0.8rem;
  color: var(--rx-text-muted);
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-tab {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  border: 1px solid var(--rx-border);
  color: var(--rx-text-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-size: 0.9rem;
}

.filter-tab:hover,
.filter-tab.active {
  border-color: var(--rx-cyan);
  color: #fff;
  background: rgba(0, 200, 255, 0.08);
}

/* Search */
.search-box {
  background: var(--rx-bg-card);
  border: 1px solid var(--rx-border);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  color: var(--rx-text);
  width: 100%;
  max-width: 400px;
}

.search-box:focus {
  outline: none;
  border-color: var(--rx-cyan);
  box-shadow: 0 0 0 3px var(--rx-cyan-glow);
}

.search-box::placeholder { color: var(--rx-text-muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rx-border);
  padding: 2rem 0 1.5rem;
  color: var(--rx-text-muted);
  font-size: 0.9rem;
}

.footer-legal {
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid var(--rx-border);
}

.footer-policy-link {
  color: var(--rx-text-muted);
  text-decoration: none;
}

.footer-policy-link:hover {
  color: var(--rx-accent);
  text-decoration: underline;
}

.footer-bottom-sep {
  margin: 0 0.5rem;
  opacity: 0.5;
}

.cookie-consent-link {
  color: var(--rx-accent);
  text-decoration: underline;
}

.legal-document {
  max-width: 900px;
  margin: 0 auto;
}

.legal-document h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-document h2:first-child {
  margin-top: 0;
}

.legal-document p,
.legal-document li {
  color: var(--rx-text-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal-document ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.legal-document a {
  color: var(--rx-accent);
  text-decoration: underline;
}

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1080;
  padding: 1rem;
  background: rgba(6, 13, 24, 0.96);
  border-top: 1px solid var(--rx-border);
  backdrop-filter: blur(8px);
}

.cookie-consent-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-consent-text {
  flex: 1 1 auto;
  min-width: 0;
}

.cookie-consent-text strong {
  color: #fff;
  display: block;
  margin-bottom: 0.25rem;
}

/* Modal */
.modal-rx .modal-content {
  background: var(--rx-bg-card);
  border: 1px solid var(--rx-border);
  border-radius: 16px;
  color: var(--rx-text);
}

.modal-rx .modal-header { border-bottom-color: var(--rx-border); }
.modal-rx .modal-footer { border-top-color: var(--rx-border); }

.modal-rx .modal-dialog.modal-dialog-scrollable {
  max-height: calc(100vh - 1rem);
  margin: 0.5rem auto;
}

.modal-rx .modal-dialog.modal-dialog-scrollable .modal-content {
  max-height: calc(100vh - 1rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-rx .modal-dialog.modal-dialog-scrollable .modal-content > form,
.modal-rx .modal-form-scroll {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 1rem);
  overflow: hidden;
}

.modal-rx .modal-dialog.modal-dialog-scrollable .modal-header,
.modal-rx .modal-dialog.modal-dialog-scrollable .modal-footer {
  flex-shrink: 0;
}

.modal-rx .modal-dialog.modal-dialog-scrollable .modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.form-control-rx {
  background: var(--rx-bg);
  border: 1px solid var(--rx-border);
  color: var(--rx-text);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.form-control-rx:focus {
  background: var(--rx-bg);
  border-color: var(--rx-cyan);
  color: var(--rx-text);
  box-shadow: 0 0 0 3px var(--rx-cyan-glow);
}

.form-control-rx:disabled,
.form-control-rx[readonly] {
  background: var(--rx-bg-card);
  border-color: var(--rx-border);
  color: var(--rx-text);
  opacity: 1;
  -webkit-text-fill-color: var(--rx-text);
  cursor: default;
}

.profile-info-box {
  background: rgba(0, 200, 255, 0.06);
  border: 1px solid rgba(0, 200, 255, 0.22);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.profile-info-title {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.profile-info-subtitle {
  color: var(--rx-text);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.profile-info-lead {
  color: var(--rx-text-muted);
  margin-bottom: 0;
}

.profile-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-info-list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--rx-text-muted);
  font-size: 0.925rem;
  line-height: 1.45;
}

.profile-info-list li i {
  flex-shrink: 0;
  margin-top: 0.15rem;
  font-size: 1rem;
}

.profile-info-list li strong {
  color: var(--rx-text);
}

.profile-info-bullets {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--rx-text-muted);
  font-size: 0.925rem;
  line-height: 1.5;
}

.profile-info-bullets li {
  margin-bottom: 0.5rem;
}

.profile-info-bullets li:last-child {
  margin-bottom: 0;
}

.profile-info-bullets strong {
  color: var(--rx-text);
}

.link-rx {
  color: var(--rx-cyan);
  text-decoration: none;
}

.link-rx:hover {
  color: #fff;
  text-decoration: underline;
}

/* Admin panel */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--rx-bg-card);
  border-right: 1px solid var(--rx-border);
  padding: 1.5rem 0;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
}

.admin-main {
  margin-left: 260px;
  flex: 1;
  padding: 2rem;
  min-height: 100vh;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--rx-text-muted);
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.admin-nav-link:hover,
.admin-nav-link.active {
  color: #fff;
  background: rgba(0, 200, 255, 0.06);
  border-left-color: var(--rx-cyan);
}

.balance-badge {
  background: rgba(0, 200, 255, 0.12);
  border: 1px solid var(--rx-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1rem 1.5rem;
  text-align: center;
}

.balance-badge .amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rx-cyan);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--rx-border);
  text-align: left;
}

.admin-table th {
  color: var(--rx-text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  color: var(--rx-text);
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-new { background: rgba(0, 200, 255, 0.15); color: var(--rx-cyan); }
.status-open { background: rgba(0, 200, 255, 0.15); color: var(--rx-cyan); }
.status-in_progress { background: rgba(255, 193, 7, 0.15); color: #ffc107; }
.status-awaiting_payment { background: rgba(255, 126, 0, 0.15); color: #ff9f43; }
.status-completed { background: rgba(40, 167, 69, 0.15); color: #28a745; }
.status-closed { background: rgba(108, 117, 125, 0.15); color: #adb5bd; }
.status-assigned { background: rgba(255, 193, 7, 0.15); color: #ffc107; }

.order-room-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  min-width: min(100%, 280px);
}

.order-room-status-compact {
  align-items: flex-start;
}

.order-status-edit {
  width: 100%;
}

.dashboard-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rx-border);
}

.dashboard-list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dashboard-list-item--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.dashboard-list-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.dashboard-list-title,
.dashboard-list-link {
  flex: 1 1 auto;
  min-width: 0;
  color: #fff;
}

.dashboard-list-item .status-badge {
  flex-shrink: 0;
  margin-left: auto;
  white-space: nowrap;
}

.dashboard-list-link:hover strong {
  color: var(--rx-cyan);
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--rx-bg-card);
  border: 1px solid var(--rx-border);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.6s ease both;
}

.animate-in-delay-1 { animation-delay: 0.1s; }

.verified-badge {
  display: inline-flex;
  align-items: center;
  color: var(--rx-cyan);
  cursor: help;
  line-height: 1;
}

.verified-badge i {
  font-size: 1rem;
}

.profile-private-block {
  padding: 1rem;
  border: 1px solid rgba(255, 193, 7, 0.25);
  border-radius: 12px;
  background: rgba(255, 193, 7, 0.05);
}

/* Staff chat */
.chat-layout {
  min-height: calc(100vh - 11rem);
  max-height: calc(100vh - 7rem);
  overflow: hidden;
}

.chat-room-header,
.chat-rooms-tabs {
  flex-shrink: 0;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--rx-border);
  background: rgba(0, 200, 255, 0.04);
}

.chat-room-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--rx-text);
}

.chat-rooms-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chat-room-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--rx-border);
  color: var(--rx-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.chat-room-tab:hover {
  color: #fff;
  border-color: rgba(0, 200, 255, 0.35);
  background: rgba(0, 200, 255, 0.08);
}

.chat-room-tab.active {
  color: #fff;
  border-color: rgba(0, 200, 255, 0.5);
  background: rgba(0, 200, 255, 0.15);
}

.chat-messages {
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
}

.chat-message {
  max-width: min(85%, 640px);
  align-self: flex-start;
}

.chat-message-own {
  align-self: flex-end;
}

.chat-message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
}

.chat-message-own .chat-message-meta {
  justify-content: flex-end;
}

.chat-message-author {
  font-weight: 600;
  color: var(--rx-text);
}

.chat-message-role {
  color: var(--rx-cyan);
  opacity: 0.85;
}

.chat-message-time {
  color: var(--rx-text-soft);
}

.chat-message-body {
  height: auto;
  min-height: 0;
  padding: 0.65rem 0.9rem;
  border-radius: 14px 14px 14px 4px;
  background: var(--rx-bg);
  border: 1px solid var(--rx-border);
  color: var(--rx-text);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.chat-message-own .chat-message-body {
  border-radius: 14px 14px 4px 14px;
  background: rgba(0, 200, 255, 0.12);
  border-color: rgba(0, 200, 255, 0.25);
}

.chat-compose {
  flex-shrink: 0;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--rx-border);
  background: rgba(0, 0, 0, 0.12);
}

.chat-compose textarea {
  resize: none;
  min-height: 42px;
  max-height: 200px;
  overflow-y: auto;
  field-sizing: content;
}

.chat-send-btn {
  align-self: stretch;
  min-width: 52px;
  border-radius: 0 10px 10px 0 !important;
}

.chat-empty {
  margin: auto;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: none;
  background: transparent;
  color: var(--rx-text);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--rx-cyan);
}

.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--rx-cyan);
  transition: transform 0.2s;
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--rx-text-muted);
  line-height: 1.65;
  white-space: pre-wrap;
}

.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }

@media (max-width: 768px) {
  .service-icons { justify-content: center; margin-top: 2rem; }
  .hero-title { font-size: 2.5rem; }
  .section-title { font-size: 1.65rem; }
  .main-content { padding-left: 0; padding-right: 0; }
  .filter-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .filter-tab {
    flex: 1 1 auto;
    text-align: center;
    min-width: calc(50% - 0.5rem);
  }
  .admin-sidebar { width: 100%; position: relative; max-height: none; }
  .admin-main { margin-left: 0; padding: 1rem; }
  .admin-layout { flex-direction: column; }
  .admin-list-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-list-card .admin-table {
    white-space: nowrap;
  }
  .dashboard-list-main {
    flex-wrap: wrap;
  }
  .dashboard-list-item .status-badge {
    margin-left: 0;
  }
  .card-rx {
    padding: 1.25rem;
  }
  .cookie-consent-inner {
    flex-direction: column;
    align-items: stretch;
  }
}

.nav-tabs-rx .nav-link {
  color: var(--rx-text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
}

.nav-tabs-rx .nav-link.active {
  color: var(--rx-cyan);
  border-bottom-color: var(--rx-cyan);
  background: transparent;
}

.course-lesson-body {
  line-height: 1.7;
  color: var(--rx-text);
}

.course-lesson-body p,
.course-lesson-body li,
.course-lesson-body strong {
  color: var(--rx-text);
}

.course-lesson-body ul,
.course-lesson-body ol {
  padding-left: 1.25rem;
}

#lessonPanel h4,
#lessonPanel .quiz-question .fw-semibold {
  color: var(--rx-text);
}

#lessonPanel .quiz-form .form-check-label {
  color: var(--rx-text) !important;
  cursor: pointer;
}

#lessonPanel .quiz-form .form-check {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  transition: background 0.15s;
}

#lessonPanel .quiz-form .form-check:hover {
  background: rgba(0, 200, 255, 0.06);
}

#lessonPanel .quiz-form .form-check-input {
  border-color: rgba(0, 200, 255, 0.45);
  background-color: var(--rx-bg);
}

#lessonPanel .quiz-form .form-check-input:checked {
  background-color: var(--rx-cyan);
  border-color: var(--rx-cyan);
}

#lessonPanel .quiz-form .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 200, 255, 0.25);
}

.course-lesson-list .list-group-item {
  color: var(--rx-text-muted);
}

.course-lesson-list .list-group-item.lesson-done {
  color: var(--rx-text-soft);
}

.lesson-nav-item.active {
  background: rgba(0, 200, 255, 0.08) !important;
  color: #fff;
}

.lesson-nav-item.lesson-done {
  opacity: 0.85;
}

.difficulty-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.difficulty-easy { color: #4ade80; background: rgba(74, 222, 128, 0.1); }
.difficulty-medium { color: #fbbf24; background: rgba(251, 191, 36, 0.1); }
.difficulty-hard { color: #fb923c; background: rgba(251, 146, 60, 0.12); }
.difficulty-expert { color: #f472b6; background: rgba(244, 114, 182, 0.12); }
.difficulty-master { color: #c084fc; background: rgba(192, 132, 252, 0.15); }

.theory-card:hover {
  border-color: var(--rx-cyan);
  transform: translateY(-2px);
  transition: all 0.2s;
}

.course-theory-article {
  line-height: 1.75;
  color: var(--rx-text);
}

.laer-steps {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.laer-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  background: rgba(0, 200, 255, 0.06);
  border-radius: 10px;
  border: 1px solid var(--rx-border);
}

.laer-letter {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--rx-cyan);
  background: rgba(0, 200, 255, 0.15);
  border-radius: 8px;
  flex-shrink: 0;
}

.scenario-bubble {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--rx-border);
  border-radius: 16px 16px 16px 4px;
  max-width: 100%;
}

.scenario-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 200, 255, 0.15);
  color: var(--rx-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.scenario-text {
  color: var(--rx-text);
  line-height: 1.6;
}

.scenario-option {
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.scenario-option:hover {
  background: rgba(0, 200, 255, 0.06);
  border-color: var(--rx-border);
}

.training-context {
  padding: 0.75rem 1rem;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.25);
  border-radius: 10px;
  color: var(--rx-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.sort-item-trap {
  opacity: 0.85;
  border-style: dashed;
}

.sort-item-trap .sort-num {
  background: rgba(255, 255, 255, 0.08);
  color: var(--rx-text-muted);
}

.sort-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sort-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--rx-border);
  border-radius: 10px;
  color: var(--rx-text);
}

.sort-num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(0, 200, 255, 0.15);
  color: var(--rx-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.match-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: center;
}

.match-left {
  color: var(--rx-text);
  font-weight: 500;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border-left: 3px solid var(--rx-cyan);
}

@media (max-width: 768px) {
  .match-row {
    grid-template-columns: 1fr;
  }
}

.customers-pd-banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  margin-bottom: 0;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.35);
  border-radius: 10px;
  color: var(--rx-text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.customers-pd-banner i {
  color: #ff6b7a;
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.customer-detail-list {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
}

.customer-detail-list dt {
  color: var(--rx-text-muted);
  font-weight: 500;
  margin: 0;
}

.customer-detail-list dd {
  margin: 0;
  color: var(--rx-text);
  word-break: break-word;
}

@media (max-width: 576px) {
  .customer-detail-list {
    grid-template-columns: 1fr;
  }
}

.list-toolbar {
  background: rgba(255, 255, 255, 0.03);
}

.admin-table th[data-list-sort] {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.admin-table th[data-list-sort]:hover {
  color: var(--rx-cyan);
}

.pagination .page-link {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--rx-border);
  color: var(--rx-text);
}

.pagination .page-item.active .page-link {
  background: var(--rx-cyan);
  border-color: var(--rx-cyan);
  color: #0a0e17;
}

.pagination .page-link:hover {
  background: rgba(0, 200, 255, 0.15);
  color: var(--rx-cyan);
}

/* Customer cabinet */
.cabinet-body {
  background: var(--rx-bg);
  min-height: 100vh;
  color: var(--rx-text);
}

.cabinet-nav {
  border-bottom: 1px solid var(--rx-border);
  background: rgba(10, 22, 40, 0.96);
  position: sticky;
  top: 0;
  z-index: 100;
}

.cabinet-main {
  max-width: 920px;
}

.cabinet-page-head {
  margin-bottom: 1rem;
}

.cabinet-card {
  height: auto !important;
  padding: 1rem 1.15rem;
}

.cabinet-card.admin-list-card {
  padding: 0;
}

.cabinet-orders-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  color: var(--rx-text);
}

.cabinet-orders-table td,
.cabinet-orders-table th {
  vertical-align: middle;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--rx-border);
  color: var(--rx-text);
}

.cabinet-orders-table th {
  color: var(--rx-text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cabinet-orders-table td.text-muted,
.cabinet-orders-table th.text-muted {
  color: var(--rx-text-muted) !important;
}

.cabinet-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem 1rem;
}

.cabinet-order-details summary {
  cursor: pointer;
  user-select: none;
}

.cabinet-chat {
  min-height: 380px;
  max-height: min(520px, calc(100vh - 13rem));
}

.admin-order-chat {
  min-height: 420px;
  max-height: min(640px, calc(100vh - 10rem));
}

.order-room-status-compact {
  align-items: flex-start;
}

.order-room-status-compact .order-status-edit {
  max-width: 280px;
}

/* Compact application detail */
.application-detail-page .app-detail-card {
  height: auto !important;
  padding: 1rem 1.15rem;
}

.application-detail-page .app-detail-section {
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--rx-border);
}

.application-detail-page .app-detail-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.application-detail-page .app-detail-label {
  color: var(--rx-text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.application-detail-page .app-cabinet-bar {
  height: auto !important;
  padding: 0.65rem 1rem;
  background: rgba(0, 200, 255, 0.06);
  border-color: rgba(0, 200, 255, 0.2);
}

.application-detail-page .app-progress-list {
  max-height: 220px;
  overflow-y: auto;
}

.application-detail-page .app-progress-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.application-detail-page .app-progress-item:last-child {
  border-bottom: 0;
}

.chat-compose-row {
  align-items: stretch;
}

.chat-attach-btn {
  border-color: var(--rx-border);
  color: var(--rx-text-muted);
  flex-shrink: 0;
}

.chat-attach-btn:hover {
  color: var(--rx-cyan);
  border-color: rgba(0, 200, 255, 0.35);
}

.chat-file-preview {
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  background: rgba(0, 200, 255, 0.08);
  border: 1px solid rgba(0, 200, 255, 0.15);
}

.chat-message-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-message-attachment {
  max-width: 100%;
}

.chat-attachment-image {
  display: block;
  max-width: min(280px, 100%);
  max-height: 220px;
  border-radius: 10px;
  border: 1px solid var(--rx-border);
  object-fit: cover;
}

.chat-attachment-file {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--rx-border);
  color: var(--rx-cyan);
  text-decoration: none;
  font-size: 0.85rem;
  max-width: 100%;
}

.chat-attachment-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment-file:hover {
  background: rgba(0, 200, 255, 0.1);
  color: #fff;
}

.chat-message-own .chat-attachment-file {
  background: rgba(0, 0, 0, 0.15);
}

