/* ═══════════════════════════════════════════════════════════
 890 linii
   VOXERIS — Design System v2
   Dark luxury. High contrast. Gold on black.
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,300;0,6..96,400;0,6..96,600;1,6..96,300;1,6..96,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --gold:          #C9A84C;
  --gold-bright:   #E8C76A;
  --gold-dim:      #7A6130;
  --gold-glow:     rgba(201,168,76,0.08);
  --gold-border:   rgba(201,168,76,0.16);
  --gold-faint:    rgba(201,168,76,0.06);
  --obsidian:      #060606;
  --surface:       #0E0E0E;
  --surface2:      #161616;
  --surface3:      #1E1E1E;
  --text:          #D4D4D4;
  --text-dim:      #4A4A4A;
  --text-muted:    #7A7A7A;
  --green:         #27AE60;
  --amber:         #E67E22;
  --red:           #C0392B;
  --red-dim:       rgba(192,57,43,0.12);
  --safe-bottom:   env(safe-area-inset-bottom, 0px);
  --safe-top:      env(safe-area-inset-top, 0px);
  --nav-h:         48px;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  background: var(--obsidian);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

input, textarea, button, select { font-family: inherit; font-size: inherit; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
.font-display { font-family: 'Bodoni Moda', serif; }
.font-body    { font-family: 'Inter', sans-serif; }

.wordmark {
  font-family: 'Bodoni Moda', serif;
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 10px;
  color: var(--gold);
  text-transform: uppercase;
  font-optical-sizing: auto;
}

.section-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold-dim);
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}

.rank-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--gold-border);
  color: var(--gold-dim);
  font-family: 'Inter', sans-serif;
}
.rank-badge.obsidian { border-color: rgba(201,168,76,0.5); color: var(--gold); }
.rank-badge.elite    { border-color: var(--gold-border); color: var(--gold-dim); }
.rank-badge.neophyte { border-color: rgba(255,255,255,0.07); color: var(--text-dim); }

/* ── PAGE SHELL ──────────────────────────────────────────── */
/* 
  BUGFIX: padding-bottom accounts for nav bar + safe area
  so content is never hidden behind the bottom nav
*/
.page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
}

.page-content {
  flex: 1;
  padding: 20px 16px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* ── BOTTOM NAV ──────────────────────────────────────────── */
/*
  BUGFIX: fixed positioning + explicit height + safe area padding
  ensures nav never covers content and sits flush with screen bottom
*/
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--surface);
  border-top: 1px solid var(--gold-border);
  display: flex;
  align-items: stretch;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 0;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
}

.nav-item:hover,
.nav-item.active { color: var(--gold); }

.nav-icon {
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s;
}

.nav-item.active .nav-icon { transform: scale(1.1); }

/* ── TOP BAR ─────────────────────────────────────────────── */
.top-bar {
  position: sticky;
  top: 0; z-index: 50;
  padding: calc(var(--safe-top) + 14px) 16px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--gold-faint);
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-title {
  flex: 1;
  font-family: 'Bodoni Moda', serif;
  font-size: 17px;
  font-weight: 300;
  color: var(--text);
  letter-spacing: 2px;
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--gold-faint);
  padding: 20px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 14px;
  font-family: 'Inter', sans-serif;
}

/* ── FORM ELEMENTS ───────────────────────────────────────── */
.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 7px;
  font-family: 'Inter', sans-serif;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--gold-faint);
  color: var(--text);
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  letter-spacing: 0.3px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold-border);
  background: var(--surface3);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--text-dim); font-weight: 300; }
.field select option { background: var(--surface2); color: var(--text); }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s;
  border-radius: 0;
  text-decoration: none;
  width: 100%;
}

.btn-primary {
  background: var(--gold);
  color: var(--obsidian);
  border-color: var(--gold);
}
.btn-primary:hover:not(:disabled) {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.btn-ghost {
  background: transparent;
  color: var(--gold-dim);
  border-color: var(--gold-border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--gold-glow);
  color: var(--gold);
  border-color: var(--gold);
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: rgba(192,57,43,0.25);
}
.btn-danger:hover:not(:disabled) { background: var(--red-dim); }

.btn:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-sm {
  padding: 7px 14px;
  font-size: 9px;
  width: auto;
}

/* ── ALERTS ──────────────────────────────────────────────── */
.alert {
  padding: 11px 14px;
  font-size: 11px;
  letter-spacing: 0.3px;
  margin-bottom: 16px;
  border-left: 2px solid;
  line-height: 1.5;
  font-family: 'Inter', sans-serif;
}
.alert-error   { background: var(--red-dim); border-color: var(--red); color: #e57373; }
.alert-success { background: rgba(39,174,96,0.08); border-color: var(--green); color: #81c784; }
.alert-info    { background: var(--gold-glow); border-color: var(--gold-dim); color: var(--gold-dim); }

/* ── DIVIDER ─────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--gold-faint); margin: 20px 0; }

/* ── STAT BLOCK ──────────────────────────────────────────── */
.stat-value {
  font-family: 'Bodoni Moda', serif;
  font-size: 52px;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -1px;
  font-optical-sizing: auto;
}

.stat-value.pulsing { animation: goldPulse 2.5s ease-in-out infinite; }

@keyframes goldPulse {
  0%, 100% { opacity: 0.8; }
  50%       { opacity: 1; text-shadow: 0 0 30px rgba(201,168,76,0.3); }
}

.stat-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold-dim);
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}

/* ── STATUS DOT ──────────────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}
.status-dot.online  { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-dot.error   { background: var(--red); }
.status-dot.pending { background: var(--amber); }

/* ── SYSTEM MSG ──────────────────────────────────────────── */
.sys-msg {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  padding: 8px 0;
  font-family: 'Inter', sans-serif;
}

/* ── DATA TABLE ──────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }

.data-table th {
  text-align: left;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding: 8px 10px;
  border-bottom: 1px solid var(--gold-faint);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.data-table td {
  padding: 10px;
  border-bottom: 1px solid var(--gold-faint);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:hover td { background: var(--gold-glow); }

/* ── SPINNER ─────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 1.5px solid var(--gold-faint);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── POWER PENTAGON ──────────────────────────────────────── */
.pentagon-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--gold-border);
  background: var(--surface2);
  cursor: pointer;
  transition: border-color 0.2s;
}
.pentagon-inner:hover { border-color: var(--gold); }

.power-value {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
}

.trend-arrow { font-size: 10px; }
.trend-arrow.up   { color: var(--green); }
.trend-arrow.down { color: var(--red); }

/* ── CLAIM BUTTON ────────────────────────────────────────── */
.claim-btn {
  background: none;
  border: none;
  cursor: pointer;
  text-align: center;
  padding: 24px 0;
  width: 100%;
}

.claim-text {
  font-family: 'Bodoni Moda', serif;
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 8px;
  color: var(--gold-bright);
  text-transform: uppercase;
  display: block;
  font-optical-sizing: auto;
  transition: color 0.2s, letter-spacing 0.2s;
}
.claim-text:hover { color: var(--gold); letter-spacing: 10px; }

.claim-countdown {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: 1px;
  display: block;
  margin-top: 6px;
  font-family: 'Inter', sans-serif;
}

/* ── CONTACT / CIRCLE ITEMS ──────────────────────────────── */
.contact-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--gold-faint);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.contact-item:hover,
.contact-item.active { background: var(--gold-glow); }

.contact-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--gold);
}

.contact-item.spectrum::before {
  background: var(--gold-bright);
  box-shadow: 0 0 10px var(--gold-bright);
  animation: specPulse 3s ease-in-out infinite;
}
@keyframes specPulse { 0%,100%{opacity:0.4} 50%{opacity:1} }

.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bodoni Moda', serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--gold);
  flex-shrink: 0;
  position: relative;
  font-optical-sizing: auto;
}

.avatar .rank-dot {
  position: absolute;
  bottom: -1px; right: -1px;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1px solid var(--surface);
}
.rank-dot.obsidian { background: #111; border-color: var(--gold); }
.rank-dot.elite    { background: var(--gold); }
.rank-dot.neophyte { background: var(--text-dim); }

.contact-info { flex: 1; min-width: 0; }

.contact-name {
  font-family: 'Bodoni Moda', serif;
  font-size: 15px;
  font-weight: 300;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-optical-sizing: auto;
}
.contact-name.spectrum { color: var(--gold-bright); }

.contact-sub {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
  font-family: 'Inter', sans-serif;
}

.unread-badge {
  background: var(--gold);
  color: var(--obsidian);
  font-size: 8px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
}

/* ── MESSAGE BUBBLES ─────────────────────────────────────── */
.msg-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  animation: msgIn 0.16s ease-out;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg-row.sent  { align-items: flex-end; }
.msg-row.recv  { align-items: flex-start; }

.msg-meta {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 4px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Inter', sans-serif;
}
.msg-meta .meta-rank { color: var(--gold-dim); text-transform: uppercase; }

.bubble {
  max-width: 78%;
  padding: 11px 14px;
  position: relative;
}

.msg-row.sent .bubble {
  background: var(--surface2);
  border-right: 2px solid var(--gold-dim);
  border-top: 1px solid var(--gold-faint);
  border-bottom: 1px solid var(--gold-faint);
  border-left: 1px solid var(--gold-faint);
}

.msg-row.recv .bubble {
  background: var(--surface);
  border: 1px solid var(--gold-faint);
}

.bubble-content {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
  font-family: 'Inter', sans-serif;
}

.srm-prefix {
  display: block;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
  font-family: 'Inter', sans-serif;
}

.bubble-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.badge {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid;
  font-family: 'Inter', sans-serif;
}
.badge-srm { color: var(--gold-dim); border-color: var(--gold-border); }
.badge-sfo { color: var(--amber); border-color: rgba(230,126,34,0.3); cursor: pointer; }

.sfo-original {
  display: none;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--gold-faint);
  font-size: 11px;
  font-weight: 300;
  color: var(--text-dim);
  font-style: italic;
  font-family: 'Inter', sans-serif;
}
.sfo-original.visible { display: block; }

.bubble-time {
  display: block;
  font-size: 9px;
  font-weight: 300;
  color: var(--text-dim);
  margin-top: 7px;
  text-align: right;
  font-family: 'Inter', sans-serif;
}

/* ── SLIDE-UP PANEL ──────────────────────────────────────── */
.panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.75);
  align-items: flex-end;
}
.panel-overlay.open { display: flex; }

.slide-panel {
  width: 100%;
  background: var(--surface);
  border-top: 1px solid var(--gold-border);
  padding: 28px 20px calc(20px + var(--safe-bottom));
  animation: slideUp 0.28s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.panel-title {
  font-family: 'Bodoni Moda', serif;
  font-size: 20px;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 3px;
  margin-bottom: 4px;
  font-optical-sizing: auto;
}

.panel-sub {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 22px;
  font-family: 'Inter', sans-serif;
}

/* ── DIALOG ──────────────────────────────────────────────── */
.dialog-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dialog-overlay.open { display: flex; }

.dialog {
  background: var(--surface);
  border: 1px solid var(--gold-border);
  padding: 26px 22px;
  width: 100%;
  max-width: 380px;
}

.dialog-sys {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: 'Inter', sans-serif;
}

.dialog-msg {
  font-size: 13px;
  font-weight: 300;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 22px;
  font-family: 'Inter', sans-serif;
}

.dialog-actions { display: flex; gap: 10px; }

/* ── SKELETON ────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--surface2) 25%,
    var(--surface3) 50%,
    var(--surface2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  height: 14px;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 2px; height: 2px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gold-dim); }

/* ── UTILITY ─────────────────────────────────────────────── */
.hidden      { display: none !important; }
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.mt-8        { margin-top: 8px; }
.mt-16       { margin-top: 16px; }
.mt-20       { margin-top: 20px; }
.w-full      { width: 100%; }
.text-center { text-align: center; }
.text-gold   { color: var(--gold); }
.text-dim    { color: var(--text-dim); }
.text-red    { color: var(--red); }
.text-green  { color: var(--green); 

/* ── NAV BADGE ───────────────────────────────────────────── */
.nav-item { position: relative; }

.nav-badge {
  position: absolute;
  top: 6px; right: 12px;
  background: var(--red);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1px solid var(--obsidian);
  pointer-events: none;
}
/* ── ONLINE DOT ON NETWORK NODE ─────────────────────────── */
.user-node { position: relative; }

.online-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  border: 1px solid var(--obsidian);
}
/* ── NAV BADGE ───────────────────────────────────────────── */
.nav-item { position: relative; }

.nav-badge {
  position: absolute;
  top: 5px; right: 8px;
  background: var(--red);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1px solid var(--obsidian);
  pointer-events: none;
  z-index: 10;
}
/* ── ONLINE DOT ON NETWORK NODE ─────────────────────────── */
.user-node { position: relative; }

.online-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  border: 1px solid var(--obsidian);
  animation: onlinePulse 2.5s ease-in-out infinite;
}

@keyframes onlinePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
/* ── PASSWORD FIELD WITH EYE ─────────────────────────────── */
.field-password {
  position: relative;
}

.field-password input {
  padding-right: 44px;
}

.eye-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 16px;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}

