/* iBrings Platform — Design System */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg:         #0d0f14;
  --surface:    #13161d;
  --surface-2:  #1a1d27;
  --surface-3:  #21253200;
  --border:     #ffffff0f;
  --border-2:   #ffffff18;
  --text:       #e8eaf0;
  --text-2:     #8b90a0;
  --text-3:     #555a6e;
  --accent:     #5b7fff;
  --accent-dim: #5b7fff22;
  --accent-2:   #a78bfa;
  --green:      #34d399;
  --green-dim:  #34d39922;
  --orange:     #fb923c;
  --orange-dim: #fb923c22;
  --red:        #f87171;
  --red-dim:    #f8717122;
  --purple:     #c084fc;
  --purple-dim: #c084fc22;
  --blue:       #60a5fa;
  --blue-dim:   #60a5fa22;
  --radius:     10px;
  --radius-sm:  6px;
  --radius-lg:  16px;
  --shadow:     0 4px 24px #00000040;
  --shadow-sm:  0 2px 8px #00000030;
  --font:       'DM Sans', system-ui, sans-serif;
  --mono:       'DM Mono', monospace;
  --nav-w:      240px;
  --transition: 150ms ease;
}

/* ── Light Mode ──────────────────────────────────── */
:root[data-theme="light"] {
  --bg:         #f4f5f7;
  --surface:    #ffffff;
  --surface-2:  #f0f1f4;
  --surface-3:  #e8e9ed;
  --border:     #e2e4ea;
  --border-2:   #d0d3dc;
  --text:       #0d0f14;
  --text-2:     #4a5068;
  --text-3:     #8b90a0;
  --accent:     #4366e8;
  --accent-dim: #4366e81a;
  --shadow:     0 4px 24px #00000012;
  --shadow-sm:  0 2px 8px #0000000a;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

/* ── LAYOUT ── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--nav-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-logo {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo .logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.sidebar-logo .logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.sidebar-role {
  padding: 10px 20px 16px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.nav-section { padding: 8px 12px; }

.nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 8px;
  margin-bottom: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 450;
  transition: all var(--transition);
  margin-bottom: 2px;
}

.nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
  opacity: 1;
}

.nav-link.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.nav-link .nav-icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.sidebar-user .avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user .user-info { min-width: 0; }
.sidebar-user .user-name { font-size: 0.8rem; font-weight: 600; truncate: ellipsis; }
.sidebar-user .user-role { font-size: 0.7rem; color: var(--text-3); text-transform: capitalize; }

.main-content {
  flex: 1;
  margin-left: var(--nav-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-title { font-size: 1rem; font-weight: 600; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.page-body {
  padding: 28px;
  flex: 1;
}

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition);
}

.card:hover { border-color: var(--border-2); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title { font-size: 1rem; font-weight: 600; }
.card-subtitle { font-size: 0.8rem; color: var(--text-2); margin-top: 2px; }

.card-sm { padding: 16px; border-radius: var(--radius); }

/* ── STATS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.stat-label { font-size: 0.75rem; color: var(--text-2); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.8rem; font-weight: 700; margin-top: 4px; letter-spacing: -0.03em; }
.stat-sub { font-size: 0.75rem; color: var(--text-3); margin-top: 2px; }

/* ── GRID ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #4a6ef0; opacity: 1; }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-secondary:hover { background: var(--surface); opacity: 1; }

.btn-success { background: var(--green); color: #000; }
.btn-success:hover { opacity: 0.9; }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: 0.9; }

.btn-warning { background: var(--orange); color: #000; }
.btn-warning:hover { opacity: 0.9; }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); opacity: 1; }

.btn-sm { padding: 5px 12px; font-size: 0.78rem; }
.btn-xs { padding: 3px 10px; font-size: 0.72rem; }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}

.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--text-3); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}

.form-check input[type=checkbox] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.form-hint { font-size: 0.75rem; color: var(--text-3); margin-top: 4px; }

/* ── TABLES ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-blue   { background: var(--blue-dim);   color: var(--blue);   }
.badge-green  { background: var(--green-dim);  color: var(--green);  }
.badge-red    { background: var(--red-dim);    color: var(--red);    }
.badge-orange { background: var(--orange-dim); color: var(--orange); }
.badge-purple { background: var(--purple-dim); color: var(--purple); }
.badge-gray   { background: #ffffff10;         color: var(--text-3); }

/* ── ALERTS ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 20px;
  border: 1px solid;
}
.alert-success { background: var(--green-dim);  border-color: var(--green);  color: var(--green);  }
.alert-error   { background: var(--red-dim);    border-color: var(--red);    color: var(--red);    }
.alert-warning { background: var(--orange-dim); border-color: var(--orange); color: var(--orange); }
.alert-info    { background: var(--blue-dim);   border-color: var(--blue);   color: var(--blue);   }

/* ── PAGINATION ── */
.pagination { display: flex; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.page-btn {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.8rem;
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── DIVIDERS & UTILS ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.text-muted { color: var(--text-2); }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.72rem; }
.mono { font-family: var(--mono); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.flex-1 { flex: 1; }

/* ── EXPRESS INDICATOR ── */
.express-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: linear-gradient(135deg, var(--orange-dim), #ff6b0020);
  border: 1px solid var(--orange);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.05em;
}

/* ── EMPTY STATES ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state .empty-title { font-size: 1rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty-state .empty-sub { font-size: 0.85rem; }

/* ── CHAT / MESSAGES ── */
.chat-wrap { display: flex; flex-direction: column; gap: 12px; max-height: 400px; overflow-y: auto; padding: 4px; }
.chat-msg { display: flex; gap: 10px; }
.chat-msg.own { flex-direction: row-reverse; }
.chat-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.chat-msg.own .chat-bubble { background: var(--accent-dim); border-color: var(--accent); }
.chat-meta { font-size: 0.7rem; color: var(--text-3); margin-top: 4px; }

/* ── PRODUCT CARD ── */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition), transform var(--transition);
}
.product-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.product-name { font-weight: 600; font-size: 0.95rem; }
.product-desc { font-size: 0.82rem; color: var(--text-2); flex: 1; }
.product-price { font-size: 1.15rem; font-weight: 700; color: var(--accent); }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }

/* ── LOGIN PAGE ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
}
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #5b7fff18, transparent);
  pointer-events: none;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow);
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo .logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
}
.auth-logo .logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.auth-logo .logo-sub {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 4px;
}

/* ── TOGGLE SWITCH ── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle {
  position: relative;
  width: 40px; height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  transition: all var(--transition);
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 2px; top: 2px;
  background: var(--text-3);
  border-radius: 50%;
  transition: all var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); background: #fff; }

/* ── CART ── */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-name { flex: 1; font-size: 0.9rem; font-weight: 500; }
.cart-item-price { font-size: 0.9rem; color: var(--text-2); }
.cart-total { display: flex; justify-content: space-between; padding-top: 12px; font-weight: 700; font-size: 1.05rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  :root { --nav-w: 0px; }
  .sidebar { transform: translateX(-240px); width: 240px; transition: transform 0.25s ease; z-index: 200; }
  .sidebar.open { transform: translateX(0) !important; }
  .main-content { margin-left: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-body { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .mobile-menu-btn { display: flex; }
}

@media (min-width: 769px) {
  .mobile-menu-btn { display: none; }
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

/* ── SCROLL ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── SOCIAL EXTENSION v2.0 ───────────────────────────────────────────── */

/* Online indicator */
.online-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Notification badge pulse */
@keyframes pulse-badge {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}
.badge-pulse { animation: pulse-badge 1.5s infinite; }

/* Event card category colors */
.ev-cat-music    { border-top: 3px solid var(--purple); }
.ev-cat-sports   { border-top: 3px solid var(--green); }
.ev-cat-food     { border-top: 3px solid var(--orange); }
.ev-cat-tech     { border-top: 3px solid var(--accent); }
.ev-cat-art      { border-top: 3px solid var(--red); }

/* Profile banner */
.profile-banner {
  width: 100%; height: 200px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Connection status indicators */
.conn-status-accepted  { color: var(--green); }
.conn-status-pending   { color: var(--orange); }
.conn-status-none      { color: var(--text-3); }

/* Message TTL indicator */
.ttl-indicator {
  font-size: .65rem;
  color: var(--orange);
  font-weight: 600;
  letter-spacing: .04em;
}

/* Ghost message */
.ghost-msg {
  opacity: .6;
  font-style: italic;
  font-size: .82rem;
}

/* Notification item unread highlight */
.notif-unread {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* RSVP buttons group */
.rsvp-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* Chat input area */
.chat-input-area {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  background: var(--surface);
}

/* Member card */
.member-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition), transform var(--transition);
}
.member-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

/* ── LANGUAGE SWITCHER ─────────────────────────────────────────────────── */
.lang-switcher { position: relative; }
.lang-btn {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  padding: 5px 10px;
  font-size: .78rem;
  cursor: pointer;
  white-space: nowrap;
}
.lang-btn:hover { border-color: var(--accent); color: var(--text); }
.lang-code { font-weight: 600; }
.lang-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  min-width: 160px;
  box-shadow: var(--shadow);
  z-index: 200;
  overflow: hidden;
}
.lang-menu.open { display: block; }
.lang-item {
  display: block;
  padding: 8px 14px;
  font-size: .82rem;
  color: var(--text-2);
  text-decoration: none;
  transition: background var(--transition);
}
.lang-item:hover { background: var(--surface-2); color: var(--text); opacity: 1; }
.lang-item-active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.lang-switcher-inline { display: flex; gap: 4px; flex-wrap: wrap; }
.lang-pill {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .78rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  text-decoration: none;
  transition: all var(--transition);
}
.lang-pill:hover { border-color: var(--accent); color: var(--text); opacity: 1; }
.lang-active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ── DRONE SIMULATION ──────────────────────────────────────────────────── */
#drone-map { background: var(--surface-2); }
.drone-status-loading  { color: var(--orange); }
.drone-status-flight   { color: var(--accent); }
.drone-status-landing  { color: var(--purple); }
.drone-status-delivered{ color: var(--green); }

/* RTL support */
[dir="rtl"] .sidebar { left: auto; right: 0; border-right: none; border-left: 1px solid var(--border); }
[dir="rtl"] .main-content { margin-left: 0; margin-right: var(--nav-w); }
[dir="rtl"] .lang-menu { left: auto; right: 0; }

/* ── LANGUAGE SWITCHER v2 ──────────────────────────────────────────────── */
.lang-switcher { position: relative; display: inline-block; }
.lang-btn {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  padding: 5px 10px;
  font-size: .78rem;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font);
  transition: all var(--transition);
}
.lang-btn:hover { border-color: var(--accent); color: var(--text); }
.lang-code { font-weight: 600; }
.lang-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  min-width: 160px;
  box-shadow: 0 8px 32px #00000060;
  z-index: 999;
  overflow: hidden;
}
.lang-menu.open { display: block; }
.lang-item {
  display: block;
  padding: 9px 14px;
  font-size: .82rem;
  color: var(--text-2);
  text-decoration: none;
  transition: background var(--transition);
}
.lang-item:hover { background: var(--surface-2); color: var(--text); opacity: 1; }
.lang-item-active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.lang-switcher-inline { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.lang-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .82rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  text-decoration: none;
  transition: all var(--transition);
}
.lang-pill:hover { border-color: var(--accent); color: var(--text); opacity: 1; }
.lang-active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* RTL */
[dir="rtl"] .sidebar { left: auto; right: 0; border-right: none; border-left: 1px solid var(--border); }
[dir="rtl"] .main-content { margin-left: 0; margin-right: var(--nav-w); }
[dir="rtl"] .lang-menu { left: auto; right: 0; }

.hidden { display: none !important; }



/* ══════════════════════════════════════════════════════
   iBrings Theme System
   Themes: dark (default) | neon | midnight | warm | amoled
   ══════════════════════════════════════════════════════ */

/* ── Theme: Dark Neon (Cyberpunk) ── */
:root[data-theme="neon"] {
  --bg:         #050810;
  --surface:    #0a0e1a;
  --surface-2:  #0f1425;
  --surface-3:  #141b30;
  --border:     #00ff9911;
  --border-2:   #00ff9922;
  --text:       #e0ffe8;
  --text-2:     #7aff9a66;
  --text-2:     #89d4a0;
  --text-3:     #3a6b4a;
  --accent:     #00ff99;
  --accent-dim: #00ff9918;
  --accent-2:   #bf00ff;
  --green:      #00ff99;
  --green-dim:  #00ff9920;
  --orange:     #ff6b00;
  --orange-dim: #ff6b0020;
  --red:        #ff3366;
  --red-dim:    #ff336620;
  --purple:     #bf00ff;
  --purple-dim: #bf00ff20;
  --shadow:     0 4px 24px #00ff9910;
  --shadow-sm:  0 2px 8px #00000050;
}

/* ── Theme: Midnight Purple ── */
:root[data-theme="midnight"] {
  --bg:         #08060f;
  --surface:    #100d1c;
  --surface-2:  #171228;
  --surface-3:  #1e1834;
  --border:     #7c3aed18;
  --border-2:   #7c3aed28;
  --text:       #ede8ff;
  --text-2:     #9d8fcc;
  --text-3:     #5a4d80;
  --accent:     #a855f7;
  --accent-dim: #a855f720;
  --accent-2:   #ec4899;
  --green:      #34d399;
  --green-dim:  #34d39920;
  --orange:     #fb923c;
  --orange-dim: #fb923c20;
  --red:        #f43f5e;
  --red-dim:    #f43f5e20;
  --purple:     #a855f7;
  --purple-dim: #a855f720;
  --shadow:     0 4px 24px #a855f715;
  --shadow-sm:  0 2px 8px #00000040;
}

/* ── Theme: Dark Warm (Amber) ── */
:root[data-theme="warm"] {
  --bg:         #0f0c08;
  --surface:    #1a1510;
  --surface-2:  #231d15;
  --surface-3:  #2c251a;
  --border:     #f59e0b12;
  --border-2:   #f59e0b22;
  --text:       #fef3e2;
  --text-2:     #c9a96e;
  --text-3:     #7a6040;
  --accent:     #f59e0b;
  --accent-dim: #f59e0b20;
  --accent-2:   #ef4444;
  --green:      #84cc16;
  --green-dim:  #84cc1620;
  --orange:     #f97316;
  --orange-dim: #f9731620;
  --red:        #ef4444;
  --red-dim:    #ef444420;
  --purple:     #d946ef;
  --purple-dim: #d946ef20;
  --shadow:     0 4px 24px #f59e0b10;
  --shadow-sm:  0 2px 8px #00000050;
}

/* ── Theme: AMOLED Black ── */
:root[data-theme="amoled"] {
  --bg:         #000000;
  --surface:    #0a0a0a;
  --surface-2:  #141414;
  --surface-3:  #1e1e1e;
  --border:     #ffffff0a;
  --border-2:   #ffffff14;
  --text:       #ffffff;
  --text-2:     #a0a0a0;
  --text-3:     #505050;
  --accent:     #ffffff;
  --accent-dim: #ffffff15;
  --accent-2:   #e0e0e0;
  --green:      #00e676;
  --green-dim:  #00e67620;
  --orange:     #ff9100;
  --orange-dim: #ff910020;
  --red:        #ff1744;
  --red-dim:    #ff174420;
  --purple:     #e040fb;
  --purple-dim: #e040fb20;
  --shadow:     0 4px 24px #00000080;
  --shadow-sm:  0 2px 8px #00000060;
}

/* ── Theme: Ocean Blue ── */
:root[data-theme="ocean"] {
  --bg:         #060d18;
  --surface:    #0a1628;
  --surface-2:  #0f1e36;
  --surface-3:  #142644;
  --border:     #0ea5e912;
  --border-2:   #0ea5e922;
  --text:       #e0f2fe;
  --text-2:     #7eb8d4;
  --text-3:     #3a6880;
  --accent:     #0ea5e9;
  --accent-dim: #0ea5e920;
  --accent-2:   #06b6d4;
  --green:      #10b981;
  --green-dim:  #10b98120;
  --orange:     #f97316;
  --orange-dim: #f9731620;
  --red:        #f43f5e;
  --red-dim:    #f43f5e20;
  --purple:     #8b5cf6;
  --purple-dim: #8b5cf620;
  --shadow:     0 4px 24px #0ea5e910;
  --shadow-sm:  0 2px 8px #00000050;
}
