/* ============================================
   Krylo Proxy — Premium Design System
   ============================================ */

:root {
  --bg-primary: #08090f;
  --bg-secondary: #0d0f18;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  --bg-glass: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --border-gold: rgba(212,164,71,0.3);

  --text-primary: #f0f0f5;
  --text-secondary: #8b8fa3;
  --text-muted: #555770;

  --gold: #D4A447;
  --gold-light: #F0D78C;
  --gold-dark: #9A7730;
  --green: #34D399;
  --green-dim: rgba(52,211,153,0.15);
  --red: #F87171;
  --red-dim: rgba(248,113,113,0.15);
  --blue: #60A5FA;
  --blue-dim: rgba(96,165,250,0.15);
  --purple: #A78BFA;
  --purple-dim: rgba(167,139,250,0.15);
  --cyan: #22D3EE;
  --cyan-dim: rgba(34,211,238,0.15);
  --amber: #FBBF24;
  --amber-dim: rgba(251,191,36,0.15);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'SF Mono', 'Fira Code', monospace;

  --sidebar-w: 220px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ==================== Background Effects ==================== */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}
.bg-glow--1 {
  width: 600px; height: 600px;
  top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(212,164,71,0.15), transparent 70%);
  animation: breathe 8s ease-in-out infinite;
}
.bg-glow--2 {
  width: 500px; height: 500px;
  bottom: -150px; right: -100px;
  background: radial-gradient(circle, rgba(96,165,250,0.1), transparent 70%);
  animation: breathe 10s ease-in-out infinite reverse;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.15); opacity: 0.6; }
}

/* ==================== Layout ==================== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600; font-size: 0.9rem;
  border: none; cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn--gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0a0f;
  box-shadow: 0 0 20px rgba(212,164,71,0.25);
}
.btn--gold:hover {
  box-shadow: 0 0 30px rgba(212,164,71,0.4);
  transform: translateY(-1px);
  color: #0a0a0f;
}
.btn--glass {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.btn--glass:hover { background: var(--bg-card-hover); border-color: var(--border-hover); color: var(--text-primary); }
.btn--sm { padding: 7px 16px; font-size: 0.82rem; }
.btn--full { width: 100%; }
.btn--danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(248,113,113,0.2); }
.btn--danger:hover { background: rgba(248,113,113,0.25); }

/* ==================== Glass Card ==================== */
.glass-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
}

/* ==================== Navigation (Landing) ==================== */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8,9,15,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo__icon { width: 32px; height: 32px; }
.logo__text { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.nav__links { display: flex; align-items: center; gap: 8px; }
.nav__link {
  padding: 6px 14px; font-size: 0.88rem; color: var(--text-secondary);
  border-radius: var(--radius-sm); transition: color 0.2s;
}
.nav__link:hover { color: var(--text-primary); }

/* ==================== Hero ==================== */
.hero {
  padding-top: 140px; padding-bottom: 80px;
  text-align: center;
}
.hero__badge {
  display: inline-block;
  padding: 5px 16px;
  font-size: 0.78rem; font-weight: 600;
  color: var(--gold);
  background: rgba(212,164,71,0.1);
  border: 1px solid rgba(212,164,71,0.2);
  border-radius: 50px;
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.text-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 32px;
  line-height: 1.7;
}
.hero__actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 60px; }

/* Phone mockup */
.hero__visual { display: flex; justify-content: center; }
.phone-mock {
  width: 220px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-hover);
  border-radius: 28px;
  padding: 12px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(212,164,71,0.08);
}
.phone-mock__notch {
  width: 80px; height: 20px;
  background: var(--bg-primary);
  border-radius: 0 0 14px 14px;
  margin: 0 auto 16px;
}
.phone-mock__screen {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 20px 16px 24px;
}
.phone-mock__status {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 600;
  color: var(--green);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s infinite;
}
.dot--green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot--red { background: var(--red); box-shadow: 0 0 8px var(--red); }
.dot--yellow { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.dot--gray { background: var(--text-muted); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.phone-mock__server {
  font-size: 0.82rem; color: var(--text-secondary);
}
.phone-mock__btn {
  padding: 8px 28px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0a0f;
  font-weight: 600; font-size: 0.82rem;
  border-radius: 50px;
}

/* ==================== Sections (Landing) ==================== */
.section { padding: 80px 0; }
.section__title {
  font-size: 2rem; font-weight: 700;
  text-align: center; margin-bottom: 48px;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
}
.feature-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.feature-card__icon { font-size: 2rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* Platforms */
.platforms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.platform-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  transition: all 0.3s ease;
}
.platform-card:hover { border-color: var(--border-gold); transform: translateY(-4px); }
.platform-card__icon { color: var(--gold); margin-bottom: 16px; }
.platform-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.platform-card p { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 12px; }
.platform-card__version {
  display: inline-block;
  padding: 3px 12px;
  font-size: 0.75rem; font-weight: 600;
  color: var(--gold);
  background: rgba(212,164,71,0.1);
  border-radius: 50px;
}

/* Protocols */
.proto-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
}
.proto-chip {
  padding: 10px 24px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.9rem; font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s;
}
.proto-chip:hover { border-color: var(--gold); color: var(--gold); }

/* Stats bar (landing) */
.stats {
  display: flex; justify-content: center; gap: 48px;
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 40px auto;
}
.stats__item { text-align: center; }
.stats__num { display: block; font-size: 2rem; font-weight: 800; color: var(--gold); }
.stats__label { font-size: 0.82rem; color: var(--text-secondary); }

/* Footer */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 0;
}
.footer__left { display: flex; align-items: center; gap: 16px; }
.footer__copy { font-size: 0.82rem; color: var(--text-muted); }

/* ==================== LOGIN ==================== */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.login-card {
  width: 380px; padding: 40px;
  text-align: center;
}
.login-card__logo { margin-bottom: 16px; }
.login-card h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.login-card__sub { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 28px; }
.input-group { margin-bottom: 16px; text-align: left; }
.input-group label {
  display: block;
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.input-group input, .text-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font); font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}
.input-group input:focus, .text-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,164,71,0.1);
}
.login-error {
  padding: 8px 12px;
  background: var(--red-dim);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 0.82rem;
  margin-bottom: 12px;
}
.login-card .btn { margin-top: 8px; }

/* ==================== ADMIN DASHBOARD ==================== */
.admin-body { overflow: hidden; }
.admin-dashboard {
  display: flex;
  height: 100vh;
  position: relative; z-index: 1;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: rgba(8,9,15,0.95);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 20px 12px;
  backdrop-filter: blur(20px);
}
.sidebar__logo {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 20px;
  font-weight: 700; font-size: 1.05rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.sidebar__nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sidebar__btn {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: none;
  border: none; border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.88rem; font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%; text-align: left;
}
.sidebar__btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.sidebar__btn.active {
  background: rgba(212,164,71,0.1);
  color: var(--gold);
}
.sidebar__btn--danger { color: var(--red); }
.sidebar__btn--danger:hover { background: var(--red-dim); }
.sidebar__footer { border-top: 1px solid var(--border); padding-top: 12px; }

/* Main */
.admin-main {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.admin-header h1 { font-size: 1.6rem; font-weight: 700; }
.admin-header__right { display: flex; align-items: center; gap: 12px; }
.admin-header__time { font-size: 0.82rem; color: var(--text-muted); font-family: var(--mono); }

/* Badges */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  font-size: 0.72rem; font-weight: 600;
  border-radius: 50px;
}
.badge--green { background: var(--green-dim); color: var(--green); }
.badge--gold { background: rgba(212,164,71,0.15); color: var(--gold); }
.badge--red { background: var(--red-dim); color: var(--red); }
.badge--blue { background: var(--blue-dim); color: var(--blue); }

/* Tabs */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  display: flex; align-items: center; gap: 14px;
  padding: 20px;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-hover); }
.stat-card__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.stat-card__icon--blue { background: var(--blue-dim); color: var(--blue); }
.stat-card__icon--green { background: var(--green-dim); color: var(--green); }
.stat-card__icon--gold { background: rgba(212,164,71,0.15); color: var(--gold); }
.stat-card__icon--purple { background: var(--purple-dim); color: var(--purple); }
.stat-card__icon--cyan { background: var(--cyan-dim); color: var(--cyan); }
.stat-card__icon--amber { background: var(--amber-dim); color: var(--amber); }
.stat-card__num { display: block; font-size: 1.5rem; font-weight: 700; }
.stat-card__label { font-size: 0.78rem; color: var(--text-secondary); }

/* Section header */
.section-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.section-header h2 { font-size: 1.1rem; font-weight: 600; }

/* Table */
.table-wrap {
  overflow-x: auto;
  padding: 4px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.data-table th {
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
  white-space: nowrap;
}
.data-table tbody tr {
  transition: background 0.15s;
}
.data-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

/* Status dots in table */
.status-cell { display: flex; align-items: center; gap: 8px; }

/* Device name */
.device-name { font-weight: 600; }

/* Platform badge */
.platform-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem; font-weight: 600;
}
.platform-badge--ios { background: var(--purple-dim); color: var(--purple); }
.platform-badge--macos { background: var(--cyan-dim); color: var(--cyan); }

/* VPN state badge */
.vpn-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem; font-weight: 600;
}
.vpn-badge--connected { background: var(--green-dim); color: var(--green); }
.vpn-badge--connecting { background: var(--amber-dim); color: var(--amber); }
.vpn-badge--disconnected { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* Log level badge */
.log-level {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--mono);
  text-transform: uppercase;
}
.log-level--info { background: var(--blue-dim); color: var(--blue); }
.log-level--warn { background: var(--amber-dim); color: var(--amber); }
.log-level--error { background: var(--red-dim); color: var(--red); }
.log-level--debug { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* Toolbar */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.toolbar__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar__count { font-size: 0.82rem; color: var(--text-muted); }
.select-input {
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.84rem;
  outline: none;
  cursor: pointer;
}
.select-input:focus { border-color: var(--gold); }

/* Empty state */
.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Config editor */
.config-panel { padding: 24px; }
.config-panel h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.config-panel__hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 16px; }
.config-editor {
  width: 100%;
  min-height: 400px;
  padding: 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--gold-light);
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}
.config-editor:focus { border-color: var(--gold); }
.config-panel__actions {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px;
}
.config-status { font-size: 0.82rem; color: var(--green); }

/* Revoke button */
.btn-revoke {
  padding: 4px 10px;
  font-size: 0.72rem;
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.15);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  transition: background 0.15s;
}
.btn-revoke:hover { background: rgba(248,113,113,0.25); }

/* IP / version text */
.text-mono { font-family: var(--mono); font-size: 0.8rem; color: var(--text-secondary); }
.text-dim { color: var(--text-muted); font-size: 0.8rem; }
.text-ellipsis { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  .nav__links { gap: 4px; }
  .nav__link { display: none; }
  .hero__title { font-size: 2rem; }
  .hero__actions { flex-direction: column; align-items: center; }
  .stats { flex-direction: column; gap: 20px; align-items: center; }
  .footer { flex-direction: column; gap: 16px; text-align: center; }

  .sidebar { display: none; }
  .admin-main { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ==================== Animations ==================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero__badge, .hero__title, .hero__sub, .hero__actions, .hero__visual {
  animation: fadeInUp 0.7s ease backwards;
}
.hero__title { animation-delay: 0.1s; }
.hero__sub { animation-delay: 0.2s; }
.hero__actions { animation-delay: 0.3s; }
.hero__visual { animation-delay: 0.4s; }

.feature-card, .platform-card { animation: fadeInUp 0.5s ease backwards; }
.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.15s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.25s; }
.feature-card:nth-child(5) { animation-delay: 0.3s; }
.feature-card:nth-child(6) { animation-delay: 0.35s; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }


/* ==================== Support Chat ==================== */
.support-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  height: calc(100vh - 120px);
}

.support-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.support-sidebar__header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.support-sidebar__header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.support-online-toggle {
  display: flex;
  align-items: center;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 36px;
  height: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  transition: background 0.2s;
}

.toggle-slider::after {
  content: ;
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.2s;
}

.toggle-label input:checked + .toggle-slider {
  background: var(--green-dim);
}

.toggle-label input:checked + .toggle-slider::after {
  left: 18px;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.toggle-text {
  font-weight: 600;
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
}

.conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  cursor: pointer;
  transition: background 0.15s;
}

.conv-item:hover {
  background: var(--bg-card-hover);
}

.conv-item.active {
  background: rgba(212,164,71,0.08);
  border-left: 3px solid var(--gold);
}

.conv-item__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.conv-item__icon--ios {
  background: var(--purple-dim);
  color: var(--purple);
}

.conv-item__icon--macos {
  background: var(--cyan-dim);
  color: var(--cyan);
}

.conv-item__info {
  flex: 1;
  min-width: 0;
}

.conv-item__device {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-item__preview {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.conv-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.conv-item__time {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.conv-item__unread {
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--gold);
  color: #0a0a0f;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* Chat area */
.support-chat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.support-chat__header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-device {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--mono);
}

.chat-header-platform {
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
}

.support-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  max-width: 75%;
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-msg--user {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-msg--operator {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(212,164,71,0.2), rgba(154,119,48,0.15));
  border: 1px solid rgba(212,164,71,0.2);
  color: var(--text-primary);
  border-bottom-right-radius: 4px;
}

.chat-msg__sender {
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.chat-msg--user .chat-msg__sender {
  color: var(--blue);
}

.chat-msg--operator .chat-msg__sender {
  color: var(--gold);
}

.chat-msg__time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: var(--mono);
}

.support-chat__input {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.support-chat__input .text-input {
  flex: 1;
}

@media (max-width: 900px) {
  .support-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 250px 1fr;
  }
}


/* Sidebar unread badge */
.sidebar-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--gold);
  color: #0a0a0f;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  animation: fadeInUp 0.3s ease;
}

.conv-icon-platform {
  font-size: 0.55rem;
  letter-spacing: -0.02em;
}
