:root {
    --black: #07070d;
    --deep: #0a0a0f;
    --surface: #0f0f17;
    --surface2: #141420;
    --border: rgba(255,255,255,0.06);
    --border-focus: color-mix(in srgb, var(--accent) 40%, transparent);
    --accent: #00e676;
    --accent-dim: color-mix(in srgb, var(--accent) 8%, transparent);
    --accent2: color-mix(in srgb, var(--accent) 15%, transparent);
    --text: #e8e8f0;
    --muted: #5a5a72;
    --white: #ffffff;
    --error: #ff4d4d;
    --warning: #f0b429;
    --success: #00e676;
    --sidebar-w: 264px;
    --glass-tint:        rgba(255,255,255,0.02);
    --glass-tint-md:     rgba(255,255,255,0.04);
    --glass-tint-strong: rgba(255,255,255,0.07);
    --card-bg:           color-mix(in srgb, var(--surface2) 90%, transparent);
  }

  /* ── Global UI animations & polish ── */

  /* Smooth focus rings */
  input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--border-focus, color-mix(in srgb, var(--accent) 45%, transparent)) !important;
    box-shadow: 0 0 0 2px var(--accent-dim, color-mix(in srgb, var(--accent) 8%, transparent));
    transition: border-color 0.15s, box-shadow 0.15s;
  }

  /* Nav item hover — liquid glass */
  .nav-item { transition: color 0.2s; }
  .nav-item:hover:not(.active) { color: var(--text) !important; background: color-mix(in srgb, var(--accent) 7%, transparent) !important; }
  .nav-item.active { position: relative; z-index: 1; color: var(--accent) !important; background: transparent !important; }
  .nav-item.active::before { display: none !important; }

  /* Stat cards hover lift — main styles defined in stat-card section below */
  .stat-card { transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }

  /* Table row fade-in and hover */
  .history-table tbody tr { transition: background 0.12s; animation: rowFadeIn 0.2s ease both; }
  @keyframes rowFadeIn { from { opacity:0; } to { opacity:1; } }
  .history-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 3%, transparent); }

  /* Badge pop-in */
  .badge { transition: background 0.2s, color 0.2s; }

  /* Toast slide-up */
  .toast {
    transform: translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .toast.show { opacity:1; transform:translateY(0); }

  /* Modal backdrop */
  .modal-overlay { transition: opacity 0.2s ease; }
  .modal-overlay.active { animation: modalIn 0.22s ease both; }
  @keyframes modalIn {
    from { opacity:0; }
    to   { opacity:1; }
  }
  .modal-overlay .modal { animation: modalSlideIn 0.22s cubic-bezier(0.34,1.2,0.64,1) both; }
  @keyframes modalSlideIn {
    from { opacity:0; transform: scale(0.96) translateY(12px); }
    to   { opacity:1; transform: scale(1) translateY(0); }
  }

  /* Minute calculator result flash */
  @keyframes calcFlash {
    0%   { opacity: 0; transform: scale(0.92) translateY(6px); }
    60%  { opacity: 1; transform: scale(1.03) translateY(-1px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
  }
  .calc-flash { animation: calcFlash 0.35s cubic-bezier(0.34,1.2,0.64,1) both; }

  /* Copy button flash */
  .copy-btn { transition: background 0.15s, color 0.15s, border-color 0.15s; }
  .copy-btn.copied { background: var(--accent-dim) !important; color: var(--accent) !important; border-color: var(--border-focus, color-mix(in srgb, var(--accent) 40%, transparent)) !important; }

  /* Sidebar collapse animation */
  .sidebar { transition: transform 0.22s cubic-bezier(0.4,0,0.2,1); }

  /* Balance counter animation */
  @keyframes balancePop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.04); color: var(--accent); }
    100% { transform: scale(1); }
  }
  .balance-pop { animation: balancePop 0.4s ease; }

  /* ── DID page animations ── */
  @keyframes didRowIn {
    from { opacity:0; transform:translateX(-8px); }
    to   { opacity:1; transform:translateX(0); }
  }
  @keyframes didPulse {
    0%,100% { box-shadow:0 0 6px var(--accent); }
    50%      { box-shadow:0 0 14px var(--accent), 0 0 24px color-mix(in srgb, var(--accent) 30%, transparent); }
  }
  .did-spinner {
    width:14px;height:14px;border:2px solid var(--border);border-top-color:var(--accent);
    border-radius:50%;animation:spin 0.7s linear infinite;flex-shrink:0;
  }
  @keyframes spin { to { transform:rotate(360deg); } }
  #didSearchCountry:focus { border-color:var(--border-focus, color-mix(in srgb, var(--accent) 50%, transparent)); outline:none; }
  .did-result-row { transition:background 0.12s; }
  .did-result-row:hover { background:color-mix(in srgb, var(--accent) 4%, transparent); }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }

  body {
    background: var(--black);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }


  /* ── AMBIENT ORB ANIMATIONS ── */
  @keyframes orbDrift1 {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(70px, 40px) scale(1.06); }
    50%  { transform: translate(120px, -20px) scale(1.02); }
    75%  { transform: translate(40px, 60px) scale(0.96); }
    100% { transform: translate(0, 0) scale(1); }
  }
  @keyframes orbDrift2 {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(-80px, -30px) scale(0.95); }
    50%  { transform: translate(-130px, 40px) scale(1.04); }
    75%  { transform: translate(-50px, -50px) scale(1.02); }
    100% { transform: translate(0, 0) scale(1); }
  }
  @keyframes orbDrift3 {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(90px, -60px) scale(1.08); }
    66%  { transform: translate(-60px, 80px) scale(0.93); }
    100% { transform: translate(0, 0) scale(1); }
  }

  /* AMBIENT GLOW BG */
  body::before {
    content: '';
    position: fixed;
    width: 800px; height: 800px;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 7%, transparent) 0%, transparent 65%);
    top: -120px; left: -80px;
    pointer-events: none;
    z-index: 0;
    animation: orbDrift1 32s ease-in-out infinite;
  }
  body::after {
    content: '';
    position: fixed;
    width: 650px; height: 650px;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 5%, transparent) 0%, transparent 65%);
    bottom: -60px; right: -60px;
    pointer-events: none;
    z-index: 0;
    animation: orbDrift2 40s ease-in-out infinite;
  }

  /* ─── SIDEBAR — LIQUID GLASS ─── */
  .sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: color-mix(in srgb, var(--surface) 55%, transparent);
    backdrop-filter: blur(40px) saturate(1.8);
    -webkit-backdrop-filter: blur(40px) saturate(1.8);
    border-right: 1px solid rgba(255,255,255,0.07);
    box-shadow: 4px 0 32px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    flex-shrink: 0;
  }

    .sidebar-logo {
    padding: 18px 22px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
  }
  .logo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 0.14em;
    color: var(--white);
  }
  .logo-text .logo-cc { color: var(--accent) !important; }

  .sidebar-nav {
    flex: 1;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    min-height: 0;
    position: relative;
  }

  /* Sliding glass pill — moves to active nav item */
  #nav-glide-pill {
    position: absolute;
    left: 10px; right: 10px;
    top: 0;
    height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 13%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 30%, transparent));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.38s cubic-bezier(0.34, 1.4, 0.64, 1),
                height 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 18px;
    margin: 1px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s, background 0.18s;
    cursor: pointer;
    border: none;
    background: none;
    width: calc(100% - 20px);
    text-align: left;
    position: relative;
    z-index: 1;
    border-radius: 10px;
  }
  .nav-item:hover:not(.active) {
    color: var(--text);
    background: color-mix(in srgb, var(--accent) 7%, transparent);
  }
  .nav-item.active {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, rgba(255,255,255,0.04));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 0 16px color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  }
  .nav-item.active::before { display: none; }

  .nav-new-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.08em;
    color: #000;
    background: var(--accent);
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: auto;
    flex-shrink: 0;
    text-transform: uppercase;
  }
  .nav-icon {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    font-size: 12px;
  }

  .nav-section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0.4;
    padding: 12px 20px 4px;
    margin: 0 10px;
  }

  /* ── Nav group (collapsible subcategory) ── */
  .nav-group { display: flex; flex-direction: column; }
  .nav-group-trigger { justify-content: space-between !important; }
  .nav-group-chevron {
    font-size: 14px;
    color: var(--muted);
    transition: transform 0.25s ease;
    margin-left: auto;
    flex-shrink: 0;
    line-height: 1;
  }
  .nav-group.open .nav-group-chevron { transform: rotate(90deg); }
  .nav-sub-items {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    opacity: 0;
  }
  .nav-group.open .nav-sub-items { max-height: 200px; opacity: 1; }
  .nav-sub-item {
    padding-left: 44px !important;
    font-size: 10px !important;
    letter-spacing: 0.08em !important;
    color: var(--muted) !important;
  }
  .nav-sub-item:hover:not(.active) { background: color-mix(in srgb, var(--accent) 5%, transparent); }
  .nav-sub-item.active { color: var(--accent) !important; }

  /* Mobile nav group */
  .mnav-group-trigger { justify-content: space-between !important; }
  .mnav-sub-items {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    opacity: 0;
  }
  .mnav-group.open .mnav-sub-items { max-height: 200px; opacity: 1; }
  .mnav-group.open .nav-group-chevron { transform: rotate(90deg); }
  .mnav-sub-item { padding-left: 36px !important; font-size: 12px !important; color: var(--muted) !important; }

  .sidebar-bottom {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
  }

  .user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
  }
  .user-avatar {
    width: 32px; height: 32px;
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
  }
  .user-info { min-width: 0; overflow: visible; }
  .user-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.05em;
  }
  .user-plan {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.7;
  }

  .btn-logout {
    width: 100%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 9px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  }
  .btn-logout:hover {
    color: #ff8080;
    border-color: rgba(255,77,77,0.35);
    background: rgba(255,77,77,0.06);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 0 16px rgba(255,77,77,0.08);
  }

  /* ─── MAIN CONTENT ─── */
  .main {
    margin-left: var(--sidebar-w);
    flex: 1;
    position: relative;
    z-index: 1;
    min-height: 100vh;
  }

  /* Top bar */
  .topbar {
    padding: 20px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--glass-tint);
    backdrop-filter: blur(12px) saturate(1.6);
    -webkit-backdrop-filter: blur(12px) saturate(1.6);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08), inset 0 1px 0 rgba(255,255,255,0.12);
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .topbar-greeting {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
  }
  .topbar-greeting span { color: var(--accent); }
  .topbar-greeting .greeting-prefix { color: var(--text); font-weight: 400; }

  .topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  /* Mobile nav dropdown removed — sidebar handles all navigation on mobile */
  .mobile-nav-btn, .mobile-nav-dropdown { display: none !important; }

  @media (max-width: 768px) {
    .mobile-menu-btn:hover, .mobile-menu-btn:active { background: color-mix(in srgb, var(--accent) 20%, transparent); }
  }

  .status-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 5px 12px;
    border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, rgba(255,255,255,0.02));
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 0 14px color-mix(in srgb, var(--accent) 15%, transparent);
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
  }
  .status-pill.offline {
    border-color: rgba(255,77,77,0.4);
    color: #ff4d4d;
    background: color-mix(in srgb, #ff4d4d 10%, rgba(255,255,255,0.02));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 14px rgba(255,77,77,0.12);
  }
  .status-pill::before {
    content: '';
    width: 5px; height: 5px;
    background: currentColor;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
  }
  @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

  /* Sections (pages) */
  .page { display: none; padding: 40px 48px 80px; }
  .page.active { display: block; animation: pageIn 0.25s ease both; }
  .page#page-noplan.active { display: flex; animation: pageIn 0.25s ease both; }
  @keyframes pageIn {
    from { opacity:0; transform:translateY(12px); }
    to   { opacity:1; transform:translateY(0); }
  }

  /* ── Global entrance animations ──────────────────────────── */
  @keyframes fadeInUp {
    from { opacity:0; transform:translateY(16px); }
    to   { opacity:1; transform:translateY(0); }
  }
  @keyframes fadeInScale {
    from { opacity:0; transform:scale(0.96); }
    to   { opacity:1; transform:scale(1); }
  }
  @keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
  }
  @keyframes livePulse {
    0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); }
    50%     { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); }
  }
  @keyframes countUp {
    from { opacity:0; transform:translateY(8px); }
    to   { opacity:1; transform:translateY(0); }
  }

  /* Cards animate in on page load */
  .page.active .card { animation: fadeInUp 0.3s ease both; }
  .page.active .card:nth-child(2) { animation-delay: 0.04s; }
  .page.active .card:nth-child(3) { animation-delay: 0.08s; }
  .page.active .card:nth-child(4) { animation-delay: 0.12s; }
  .page.active .stat-card { animation: fadeInScale 0.28s ease both; }
  .page.active .stat-card:nth-child(2) { animation-delay: 0.05s; }
  .page.active .stat-card:nth-child(3) { animation-delay: 0.10s; }
  .page.active .stat-card:nth-child(4) { animation-delay: 0.15s; }

  /* Stat numbers pop in */
  .stat-num { animation: countUp 0.4s ease both; animation-delay: 0.15s; }

  /* Live call rows pulse */
  .live-call-row { animation: fadeInUp 0.25s ease both; }
  .live-call-row:nth-child(2) { animation-delay: 0.05s; }
  .live-call-row:nth-child(3) { animation-delay: 0.10s; }

  /* Monitor buttons glow on hover */
  #page-teams button[onclick*="monitorCall"] { transition: box-shadow 0.2s, transform 0.15s; }
  #page-teams button[onclick*="monitorCall"]:hover { transform: translateY(-1px); }

  /* Queue card fade in */
  #callQueueSection { animation: fadeInUp 0.3s ease both; animation-delay: 0.1s; }

  /* Settings sections stagger */
  #page-settings .card { animation: fadeInUp 0.3s ease both; }
  #page-settings .card:nth-child(1) { animation-delay: 0.0s; }
  #page-settings .card:nth-child(2) { animation-delay: 0.06s; }
  #page-settings .card:nth-child(3) { animation-delay: 0.12s; }

  /* Dial ☎ button pop */
  button[onclick*="dialFromHistory"] { transition: transform 0.15s, box-shadow 0.15s; }
  button[onclick*="dialFromHistory"]:hover { transform: scale(1.15); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 40%, transparent); }

  /* Page header */
  .page-header {
    margin-bottom: 40px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
  }
  .page-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
    display: block;
  }
  .page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
  }
  .page-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px;
    font-family: 'JetBrains Mono', monospace;
  }

  /* ─── ROUNDED BUTTONS ─── */
  button, .btn, input[type="button"], input[type="submit"] {
    border-radius: 8px !important;
  }
  .btn-sm { border-radius: 6px !important; }
  .dial-btn { border-radius: 0 !important; }

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

  /* ─── CARDS ─── */
  .card {
    background: color-mix(in srgb, var(--surface) 60%, transparent);
    backdrop-filter: blur(4px) saturate(1.4);
    -webkit-backdrop-filter: blur(4px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    padding: 28px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(255,255,255,0.04), 0 6px 28px rgba(0,0,0,0.35);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.18s;
  }
  .card.accent-top::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
  }

  .card-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
    display: block;
  }
  .card-value {
    font-family: 'Orbitron', monospace;
    font-size: 26px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    margin-bottom: 6px;
  }
  .card-value.accent { color: var(--accent); }
  .card-value.large { font-size: 36px; }
  .card-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.08em;
  }


  /* ─── STAT PANEL (connected overview bar) ─── */
  .stat-panel {
    display: flex;
    background: var(--card-bg);
    backdrop-filter: blur(4px) saturate(1.4);
    -webkit-backdrop-filter: blur(4px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(255,255,255,0.04), 0 6px 24px rgba(0,0,0,0.3);
    overflow: hidden;
  }
  .stat-panel-item {
    flex: 1;
    padding: 24px 28px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background 0.2s;
  }
  .stat-panel-item:last-child { border-right: none; }
  .stat-panel-item:hover { background: rgba(255,255,255,0.02); }
  /* Animate panel items on page load */
  .page.active .stat-panel { animation: fadeInScale 0.28s ease both; }
  @media (max-width: 768px) {
    .stat-panel { flex-wrap: wrap; }
    .stat-panel-item { flex: 1 1 50%; border-bottom: 1px solid rgba(255,255,255,0.07); }
    .stat-panel-item:nth-child(2) { border-right: none; }
    .stat-panel-item:nth-last-child(-n+2) { border-bottom: none; }
  }
  @media (max-width: 480px) {
    .stat-panel-item { flex: 1 1 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); }
    .stat-panel-item:last-child { border-bottom: none; }
  }

  /* ─── OVERVIEW STAT CARD ANIMATIONS ─── */
  @keyframes statReveal { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
  #page-overview .stat-card { animation: statReveal 0.4s ease both; }
  #page-overview .stat-card:nth-child(1) { animation-delay: 0.05s; }
  #page-overview .stat-card:nth-child(2) { animation-delay: 0.1s; }
  #page-overview .stat-card:nth-child(3) { animation-delay: 0.15s; }
  #page-overview .stat-card:nth-child(4) { animation-delay: 0.2s; }

  /* ─── STAT CARDS (overview) ─── */
  .stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(4px) saturate(1.4);
    -webkit-backdrop-filter: blur(4px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;
    padding: 28px 28px 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 110px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(255,255,255,0.04), 0 6px 24px rgba(0,0,0,0.35);
  }
  .stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.4;
  }
  .stat-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 20%, transparent);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  }
  .stat-card:hover { border-color: var(--accent-dim, color-mix(in srgb, var(--accent) 15%, transparent)); }
  .stat-num {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    margin-bottom: 6px;
  }
  .stat-num.green { color: var(--accent); }
  .stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
  }

  /* ─── WALLET ─── */
  .wallet-card {
    background: color-mix(in srgb, var(--accent) 4%, rgba(255,255,255,0.025));
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid color-mix(in srgb, var(--accent) 15%, rgba(255,255,255,0.06));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 32px rgba(0,0,0,0.3);
    border-radius: 16px;
    padding: 36px;
    position: relative;
    overflow: hidden;
  }
  .wallet-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
  }
  .wallet-balance-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
    display: block;
  }
  .wallet-balance {
    font-family: 'Orbitron', monospace;
    font-size: 48px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    margin-bottom: 6px;
  }
  .wallet-balance sup { font-size: 0.4em; color: var(--accent); vertical-align: top; margin-top: 0.4em; }
  .wallet-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.1em;
    margin-bottom: 32px;
  }

  .wallet-disclaimer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--warning);
    letter-spacing: 0.05em;
    line-height: 1.6;
    padding: 12px 16px;
    border: 1px solid rgba(240,180,41,0.2);
    background: rgba(240,180,41,0.04);
    margin-bottom: 24px;
    border-radius: 10px;
  }
  .wallet-disclaimer strong { font-weight: 500; }

  .btn-topup {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--accent) 18%, var(--glass-tint));
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    color: var(--accent);
    border: none;
    box-shadow: 4px 4px 4px rgba(0,0,0,0.05), inset 0 1px 1px rgba(255,255,255,0.15), 0 0 20px color-mix(in srgb, var(--accent) 25%, transparent);
    padding: 13px 32px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    position: relative;
    overflow: hidden;
  }
  .btn-topup::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(180deg,
      rgba(255,255,255,0.18) 0%,
      rgba(255,255,255,0.06) 20%,
      rgba(255,255,255,0)    40%,
      rgba(255,255,255,0)    60%,
      rgba(255,255,255,0.06) 80%,
      rgba(255,255,255,0.18) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
  }
  .btn-topup:hover {
    background: color-mix(in srgb, var(--accent) 28%, var(--glass-tint-md));
    transform: translateY(-1px);
    color: var(--accent);
    box-shadow: 4px 4px 4px rgba(0,0,0,0.05), inset 0 1px 1px rgba(255,255,255,0.15), 0 8px 30px color-mix(in srgb, var(--accent) 35%, transparent);
  }

  /* ─── CALLER ID SECTION ─── */
  .callerid-current {
    background: var(--card-bg);
    backdrop-filter: blur(4px) saturate(1.4);
    -webkit-backdrop-filter: blur(4px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(255,255,255,0.04), 0 6px 28px rgba(0,0,0,0.35);
    border-radius: 16px;
    padding: 28px;
    position: relative;
    overflow: hidden;
  }
  .callerid-current::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
  }

  .callerid-display {
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.05em;
    margin: 12px 0 6px;
    min-height: 40px;
  }
  .callerid-display.none { color: var(--muted); font-size: 20px; }

  .field-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-top: 24px;
  }
  .field-col { flex: 1; display: flex; flex-direction: column; gap: 8px; }

  .field-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .field-input {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    letter-spacing: 0.04em;
    border-radius: 10px;
  }
  .field-input::placeholder { color: var(--muted); opacity: 0.4; }
  .field-input:focus { border-color: var(--border-focus); }

  .btn-action {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: var(--glass-tint-md);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    color: var(--text);
    border: none;
    box-shadow: 4px 4px 4px rgba(0,0,0,0.05), inset 0 1px 1px rgba(255,255,255,0.15);
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
  }
  .btn-action::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(180deg,
      rgba(255,255,255,0.18) 0%,
      rgba(255,255,255,0.06) 20%,
      rgba(255,255,255,0)    40%,
      rgba(255,255,255,0)    60%,
      rgba(255,255,255,0.06) 80%,
      rgba(255,255,255,0.18) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
  }
  .btn-action:hover { border-color: var(--border-focus, color-mix(in srgb, var(--accent) 30%, transparent)); color: var(--accent); }
  .btn-action:active { transform: scale(0.97); opacity: 0.85; }
  .btn-action.primary {
    background: color-mix(in srgb, var(--accent) 18%, var(--glass-tint));
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    color: var(--accent);
    border: none;
    box-shadow: 4px 4px 4px rgba(0,0,0,0.05), inset 0 1px 1px rgba(255,255,255,0.15), 0 0 20px color-mix(in srgb, var(--accent) 25%, transparent);
  }
  .btn-action.primary::before {
    background: linear-gradient(180deg,
      rgba(255,255,255,0.18) 0%,
      rgba(255,255,255,0.06) 20%,
      rgba(255,255,255,0)    40%,
      rgba(255,255,255,0)    60%,
      rgba(255,255,255,0.06) 80%,
      rgba(255,255,255,0.18) 100%);
  }
  .btn-action.primary:hover {
    background: color-mix(in srgb, var(--accent) 28%, var(--glass-tint-md));
    transform: translateY(-1px);
    color: var(--accent);
    box-shadow: 4px 4px 4px rgba(0,0,0,0.05), inset 0 1px 1px rgba(255,255,255,0.15), 0 8px 30px color-mix(in srgb, var(--accent) 35%, transparent);
  }

  /* ─── SIP CREDENTIALS ─── */
  .cred-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }
  .cred-row:last-child { border-bottom: none; }
  .cred-key {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    min-width: 140px;
  }
  .cred-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text);
    letter-spacing: 0.04em;
    flex: 1;
  }
  .cred-val.blurred {
    filter: blur(4px);
    transition: filter 0.3s;
    cursor: pointer;
  }
  .cred-val.blurred:hover { filter: blur(0); }
  .copy-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    background: none;
    border: 1px solid var(--border);
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    border-radius: 6px;
  }
  .copy-btn:hover { color: var(--accent); border-color: var(--border-focus, color-mix(in srgb, var(--accent) 30%, transparent)); }
  .copy-btn.copied { color: var(--accent); }

  /* ─── HISTORY TABLE ─── */
  .history-table { width: 100%; border-collapse: collapse; }
  .history-table th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
  }
  .history-table td {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text);
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
  }
  .history-table tr:last-child td { border-bottom: none; }
  .history-table tr:hover td { background: rgba(255,255,255,0.01); }

  .note-cell {
    color: var(--muted);
    font-size: 11px;
    font-style: italic;
    cursor: pointer;
    transition: color 0.2s;
  }
  .note-cell:hover { color: var(--text); }
  .note-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 2px 4px;
    outline: none;
    width: 100%;
    transition: border-color 0.2s;
  }
  .note-input:focus { border-color: var(--border-focus, color-mix(in srgb, var(--accent) 40%, transparent)); }

  .tag-active {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 3px 8px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
    border-radius: 4px;
  }
  .tag-inactive {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 3px 8px;
    background: rgba(255,255,255,0.04);
    color: var(--muted);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
  }

  .empty-state {
    text-align: center;
    padding: 60px 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.1em;
  }

  /* ─── RATES TABLE ─── */
  .rates-search {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
  }
  .rates-table { width: 100%; border-collapse: collapse; }
  .rates-table th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
  }
  .rates-table td {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }
  .rates-table tr:hover td { background: color-mix(in srgb, var(--accent) 2%, transparent); }
  .rate-price { color: var(--accent); }
  .rate-billing-pill {
    display: inline-block;
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
  }
  .rate-billing-1  { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }
  .rate-billing-6  { background: rgba(59,158,255,0.08); color: #3b9eff;   border: 1px solid rgba(59,158,255,0.2); }
  .rate-billing-60 { background: rgba(248,180,0,0.08);  color: #f8b400;   border: 1px solid rgba(248,180,0,0.25); }

  /* ─── ANNOUNCEMENTS ─── */
  .announcements-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
  .announcement-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid;
    position: relative;
    animation: ann-in 0.35s ease;
  }
  @keyframes ann-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .announcement-banner.info    { background: rgba(59,158,255,0.07);  border-color: rgba(59,158,255,0.25);  }
  .announcement-banner.update  { background: rgba(34,197,94,0.07);   border-color: rgba(34,197,94,0.25);   }
  .announcement-banner.success { background: color-mix(in srgb, var(--accent) 7.0%, transparent);   border-color: color-mix(in srgb, var(--accent) 25%, transparent);   }
  .announcement-banner.warning { background: rgba(248,180,0,0.07);   border-color: rgba(248,180,0,0.25);   }
  .announcement-banner.alert   { background: rgba(255,77,77,0.07);   border-color: rgba(255,77,77,0.25);   }
  .ann-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
  .ann-body { flex: 1; }
  .ann-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  .announcement-banner.info    .ann-label { color: #3b9eff; }
  .announcement-banner.update  .ann-label { color: #22c55e; }
  .announcement-banner.success .ann-label { color: var(--accent); }
  .announcement-banner.warning .ann-label { color: #f8b400; }
  .announcement-banner.alert   .ann-label { color: #ff6060; }
  .ann-message {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    white-space: pre-line;
  }
  .ann-expires {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--muted);
    margin-top: 4px;
  }

  /* ─── SUPPORT ─── */
  .ticket-card {
    background: var(--card-bg);
    backdrop-filter: blur(4px) saturate(1.4);
    -webkit-backdrop-filter: blur(4px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(255,255,255,0.04), 0 4px 20px rgba(0,0,0,0.3);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
  }
  .ticket-card:hover { border-color: color-mix(in srgb, var(--accent) 15%, transparent); }
  .ticket-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .ticket-subject { font-size: 14px; font-weight: 600; color: var(--white); }
  .ticket-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 3px 10px;
    border: 1px solid;
    border-radius: 6px;
  }
  .ticket-badge.open { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); background: var(--accent-dim); }
  .ticket-badge.closed { color: var(--muted); border-color: var(--border); }
  .ticket-meta { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); }

  /* ── CHAT MESSAGES ── */
  .chat-msg { display: flex; flex-direction: column; gap: 4px; max-width: 80%; }
  .chat-msg.user { align-self: flex-end; align-items: flex-end; }
  .chat-msg.admin { align-self: flex-start; align-items: flex-start; }
  .chat-bubble {
    padding: 12px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: 0.02em;
    border-radius: 12px;
  }
  .chat-msg.user .chat-bubble { background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); color: var(--text); }
  .chat-msg.admin .chat-bubble { background: var(--surface2); border: 1px solid var(--border); color: var(--text); }
  .chat-time { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--muted); letter-spacing: 0.1em; }
  .chat-label { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; }
  .chat-msg.user .chat-label { color: var(--accent); }
  .chat-msg.admin .chat-label { color: var(--admin-accent, #a78bfa); }

  textarea.field-input {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
  }

  /* ─── ACCOUNT SETTINGS ─── */
  .settings-section {
    background: var(--card-bg);
    backdrop-filter: blur(4px) saturate(1.4);
    -webkit-backdrop-filter: blur(4px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(255,255,255,0.04), 0 6px 28px rgba(0,0,0,0.35);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
  }
  .settings-header {
    padding: 18px 28px;
    border-bottom: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .settings-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; }

  /* ─── TOPUP MODAL ─── */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5,5,8,0.85);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
  }
  .modal-overlay.open { display: flex; }

  .modal {
    background: color-mix(in srgb, var(--surface) 60%, transparent);
    backdrop-filter: blur(50px) saturate(1.8);
    -webkit-backdrop-filter: blur(50px) saturate(1.8);
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 24px 64px rgba(0,0,0,0.6);
    width: 100%;
    max-width: 440px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
  }
  .modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
  }
  .modal-header {
    padding: 28px 32px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
  }
  .modal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
  }
  .modal-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
    display: block;
  }
  .modal-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
  }
  .modal-close:hover { color: var(--text); }
  .modal-body { padding: 28px 32px 32px; }

  .amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
  }
  .amount-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    border-radius: 8px;
  }
  .amount-btn:hover {
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    color: var(--accent);
    background: var(--accent-dim);
  }
  .amount-btn.selected {
    border-color: var(--accent);
    color: #000;
    background: var(--accent);
  }

  .modal-disclaimer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--warning);
    letter-spacing: 0.03em;
    line-height: 1.6;
    padding: 12px 14px;
    border: 1px solid rgba(240,180,41,0.2);
    background: rgba(240,180,41,0.04);
    margin-bottom: 20px;
  }

  /* ─── SCROLLBAR ─── */
  ::-webkit-scrollbar { width: 3px; }
  ::-webkit-scrollbar-track { background: var(--black); }
  ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 40%, transparent); }

  /* ─── RESPONSIVE ─── */
  @media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
    .sidebar.open { transform: translateX(0); box-shadow: 4px 0 32px rgba(0,0,0,0.6); }
    .sidebar-backdrop { display: block; }
    .mobile-menu-btn { display: flex !important; }
    .main { margin-left: 0; }
    .page { padding: 16px 14px 60px; }
    .topbar { padding: 10px 14px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    /* Tables scroll horizontally on mobile */
    .data-table, .rates-table { display: block; overflow-x: auto; white-space: nowrap; }
    /* History and call log tables also scroll */
    .history-table { display: block; overflow-x: auto; white-space: nowrap; }
    /* Calc grid stacks on mobile */
    .calc-grid { grid-template-columns: 1fr !important; }
    /* Noplan page stacks */
    .noplan-grid { grid-template-columns: 1fr !important; }
    /* Card padding reduced */
    .card { padding: 16px; }
    .wallet-card { padding: 20px; }
    /* Dialer full width on tablet/mobile */
    .dialer-wrap { max-width: 360px; width: 100%; }
    .dialer-layout { flex-direction: column; }
    .dialer-side-panel { max-width: 100%; width: 100%; }
    /* Lookup table wrap */
    .lookup-table-wrap { overflow-x: auto; }
    /* Rate pills wrap */
    .rate-pills { flex-wrap: wrap; gap: 4px; }
    /* Topbar right items */
    .topbar-balance { display: none; }
    /* Page title sizes */
    .page-title { font-size: 22px; }
    /* Wallet balance shrink */
    .wallet-balance { font-size: 32px; }
    /* Stat card numbers */
    .stat-num { font-size: 20px; }
    /* Field rows stack on mobile */
    .field-row { flex-direction: column; align-items: stretch; }
    .field-row .btn-action { width: 100%; margin-top: 4px; }
    /* Cred rows — hide min-width constraint */
    .cred-key { min-width: 100px; font-size: 9px; }
    .cred-val { font-size: 11px; word-break: break-all; }
    /* Rates search wraps */
    .rates-search { flex-wrap: wrap; }
    .rates-search input { width: 100%; max-width: 100% !important; }
    /* Rate pills legend stacks */
    .rates-search > div[style*="margin-left:auto"] { margin-left: 0 !important; }
    /* Support grid stacks */
    #supportMain .grid-2 { grid-template-columns: 1fr; }
    /* Topbar greeting font shrink */
    .topbar-greeting { font-size: 12px; }
    /* Noplan plan cards grid */
    #page-noplan .grid-2, #page-noplan > div > div[style*="grid-template-columns:repeat(2"] {
      grid-template-columns: 1fr !important;
    }
    /* SIP cred mini grid on noplan */
    #page-noplan div[style*="grid-template-columns:repeat(3"] {
      grid-template-columns: 1fr !important;
    }
    /* Lookup result grid */
    #lookupGrid { grid-template-columns: 1fr 1fr !important; }
    /* Modal full width */
    .modal { max-width: 96vw; }
    .modal-header { padding: 20px 18px 16px; }
    .modal-body { padding: 18px; }
    /* Amount grid 2 col on mobile */
    .amount-grid { grid-template-columns: repeat(2, 1fr); }
    /* Chat messages full width */
    .chat-msg { max-width: 95%; }
    /* DID table scroll */
    #didCountryTable { display: block; overflow-x: auto; white-space: nowrap; }
    #subPageContent > div:first-of-type { grid-template-columns: repeat(2,1fr) !important; }
    /* Topbar layout tweak */
    .topbar { flex-wrap: nowrap; gap: 8px; }
    /* Dialer display font */
    .dialer-number { font-size: 20px; }
    /* Dial keys shrink */
    .dial-key { padding: 14px 8px; font-size: 14px; }
    .dial-btn  { padding: 14px 8px; }
    /* Status pill text */
    .status-pill { font-size: 8px; padding: 4px 8px; }
    /* Page header bottom spacing */
    .page-header { margin-bottom: 24px; padding-bottom: 18px; }
    /* Ticket header wrap */
    .ticket-header { flex-wrap: wrap; gap: 6px; }
    /* Settings body padding */
    .settings-body { padding: 16px; }
    .settings-header { padding: 14px 16px; }
    /* Balance history table */
    #topupTable { display: block; overflow-x: auto; }
    /* Call logs table */
    #callLogsTable { display: block; overflow-x: auto; }
    /* Lookup history table */
    #page-lookup .history-table { display: block; overflow-x: auto; white-space: nowrap; }
    /* Quick connect flex wrap */
    #page-overview .card > div[style*="flex-wrap:wrap"] { gap: 16px; }
    /* Credential row on small screens */
    .cred-row { flex-wrap: wrap; gap: 6px; }
  }
  /* ─── EXTRA SMALL SCREENS ─── */
  @media (max-width: 480px) {
    .topbar-greeting { white-space: nowrap; }
    .topbar-greeting .greeting-prefix { display: none; }
    .dial-key { padding: 12px 4px; font-size: 13px; }
    .dial-btn  { padding: 12px 4px; font-size: 16px; }
    .dialer-number { font-size: 18px; }
    .page-title { font-size: 20px; }
    .wallet-balance { font-size: 28px; }
    #lookupGrid { grid-template-columns: 1fr !important; }
    .amount-grid { grid-template-columns: repeat(2, 1fr); }
    .unotif-panel { width: 90vw; right: -20px; }
  }

  .sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99;
  }
  .mobile-menu-btn {
    order: 3;
    display: none;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: 10px;
    color: var(--accent);
    width: 36px; height: 36px;
    cursor: pointer;
    transition: background 0.18s;
    flex-shrink: 0;
  }

  /* ─── USER NOTIFICATION BELL ─── */
  @keyframes notifSlideIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
  .unotif-bell {
    order: 2;
    position: relative; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border: none; background: none;
    color: var(--muted); font-size: 18px;
    transition: color 0.15s, transform 0.15s; flex-shrink: 0;
    border-radius: 8px;
  }
  .unotif-bell:hover { color: var(--accent); transform: scale(1.1); }
  .unotif-count {
    position: absolute; top: -4px; right: -4px;
    background: #ff4d4d; color: #fff;
    font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(255,77,77,0.5);
  }
  .unotif-count.hidden { display: none; }
  .unotif-panel {
    position: absolute; top: calc(100% + 10px); right: 0;
    width: 320px;
    background: color-mix(in srgb, var(--surface) 60%, transparent);
    backdrop-filter: blur(50px) saturate(1.8);
    -webkit-backdrop-filter: blur(50px) saturate(1.8);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 16px 48px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
    z-index: 200;
    display: none; max-height: 440px; flex-direction: column;
    overflow: hidden;
  }
  .unotif-panel.open { display: flex; animation: notifSlideIn 0.2s ease both; }
  .unotif-head {
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
  }
  .unotif-head span { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
  .unotif-head-actions { display: flex; gap: 6px; align-items: center; }
  .unotif-read-all { background: none; border: 1px solid var(--border); color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 9px; padding: 3px 10px; cursor: pointer; border-radius: 6px; }
  .unotif-read-all:hover { border-color: var(--accent); color: var(--accent); }
  .unotif-clear-all { background: none; border: 1px solid rgba(255,77,77,0.25); color: rgba(255,77,77,0.7); font-family: 'JetBrains Mono', monospace; font-size: 9px; padding: 3px 10px; cursor: pointer; border-radius: 6px; }
  .unotif-clear-all:hover { border-color: #ff4d4d; color: #ff4d4d; }
  .unotif-list { overflow-y: auto; flex: 1; }
  .unotif-item {
    padding: 11px 14px; border-bottom: 1px solid var(--border);
    cursor: pointer; display: flex; gap: 10px; align-items: flex-start;
    transition: background 0.1s; position: relative;
  }
  .unotif-item:hover { background: var(--surface); }
  .unotif-item.unread { background: color-mix(in srgb, var(--accent) 4%, transparent); }
  .unotif-item.unread:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
  .unotif-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex-shrink: 0; }
  .unotif-dot.read { background: transparent; border: 1px solid var(--border); }
  .unotif-title { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text); margin-bottom: 3px; line-height: 1.4; }
  .unotif-body { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); line-height: 1.5; word-break: break-word; }
  .unotif-time { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--border); margin-top: 3px; }
  .unotif-dismiss { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 2px 5px; line-height: 1; opacity: 0; transition: opacity 0.15s, color 0.15s; }
  .unotif-item:hover .unotif-dismiss { opacity: 1; }
  .unotif-dismiss:hover { color: #ff4d4d; }
  .unotif-empty { padding: 28px 14px; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }
  /* Ticket pagination */
  .ticket-pager { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
  .ticket-pager button { background: none; border: 1px solid var(--border); color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 10px; padding: 4px 12px; cursor: pointer; }
  .ticket-pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
  .ticket-pager button:disabled { opacity: 0.35; cursor: default; }
  .ticket-pager span { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); }

  /* ─── TOAST ─── */
  #toast-container { position:fixed;top:24px;right:24px;z-index:9999;display:flex;flex-direction:column;gap:10px;pointer-events:none; }
  .toast {
    display:flex;align-items:center;gap:12px;padding:13px 18px;
    background:#0f0f17;border:1px solid rgba(255,255,255,0.1);
    font-family:'JetBrains Mono',monospace;font-size:12px;color:#e8e8f0;
    opacity:0;transform:translateY(10px);transition:opacity 0.25s,transform 0.25s;
    pointer-events:auto;min-width:240px;max-width:360px;
    position:relative; overflow:hidden;
    border-radius: 10px;
  }
  .toast.show { opacity:1;transform:translateY(0); }
  .toast-dot { width:7px;height:7px;border-radius:50%;flex-shrink:0; }
  .toast.ok .toast-dot { background: var(--accent); }
  .toast.warn .toast-dot { background:#f0b429; }
  .toast.error .toast-dot { background:#ff4d4d; }
  .toast.ok { border-left: 3px solid var(--accent); }
  .toast.warn { border-left:3px solid #f0b429; }
  .toast-progress {
    position:absolute; bottom:0; left:0; height:2px;
    width:100%; transform-origin:left;
    animation: toast-drain linear forwards;
  }
  .toast.ok .toast-progress { background: var(--accent); }
  .toast.warn .toast-progress { background:#f0b429; }
  .toast.error .toast-progress { background:#ff4d4d; }
  @keyframes toast-drain { from { transform:scaleX(1); } to { transform:scaleX(0); } }
  .toast.error { border-left:3px solid #ff4d4d; }

  /* ── WEB DIALER ──────────────────────────────────────────── */
  .dialer-wrap { max-width: 310px; margin: 0 auto; width: 100%; background: var(--card-bg); backdrop-filter: blur(4px) saturate(1.4); -webkit-backdrop-filter: blur(4px) saturate(1.4); border: 1px solid rgba(255,255,255,0.09); box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 8px 40px rgba(0,0,0,0.35); border-radius: 16px; overflow: hidden; }

  /* ── Dialer two-column layout ── */
  .dialer-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
  }
  .dialer-side-panel {
    flex: 1;
    min-width: 0;
    max-width: 340px;
    background: var(--card-bg);
    backdrop-filter: blur(4px) saturate(1.4);
    -webkit-backdrop-filter: blur(4px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 6px 28px rgba(0,0,0,0.3);
    border-radius: 14px;
    overflow: hidden;
  }
  .dialer-side-recent {
    padding: 16px 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .dialer-side-recent .recent-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  /* ── CONTACTS TOGGLE BUTTON ── */
  /* ── CONTACTS OUTER WRAPPER (holds border) ── */
  .contacts-outer {
    max-width: 310px; margin: 10px auto 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
  }
  .contacts-outer.open { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
  @media (max-width: 600px) { .contacts-outer { max-width: 100%; } }
  .dialer-side-panel .contacts-outer {
    max-width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
  }

  .contacts-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%;
    background: var(--surface); border: none;
    color: var(--muted); font-family: 'JetBrains Mono', monospace;
    font-size: 11px; letter-spacing: 0.08em; padding: 10px 16px;
    cursor: pointer; transition: color 0.2s;
    border-radius: 0;
  }
  .contacts-toggle:hover { color: var(--accent); }
  .contacts-toggle.open  { color: var(--accent); }
  .contacts-toggle-left  { display: flex; align-items: center; gap: 8px; }
  .contacts-toggle-count {
    background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent);
    font-size: 9px; padding: 1px 7px; border-radius: 99px; letter-spacing: 0;
  }
  .contacts-toggle-arrow { transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); font-size: 10px; }
  .contacts-toggle.open .contacts-toggle-arrow { transform: rotate(180deg); }

  /* ── CONTACTS COLLAPSIBLE ── */
  .contacts-collapse {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
  }
  .contacts-collapse.open { max-height: 700px; }

  /* ── CONTACTS PANEL ── */
  .contacts-panel {
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex; flex-direction: column;
  }
  .contacts-outer.open .contacts-panel { border-top-color: color-mix(in srgb, var(--accent) 35%, transparent); }
  .contacts-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
    gap: 10px;
  }
  .contacts-tabs { display: flex; gap: 0; }
  .contacts-tab {
    background: none; border: 1px solid var(--border); color: var(--muted);
    font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.15em;
    text-transform: uppercase; padding: 4px 14px; cursor: pointer;
    transition: all 0.15s; margin-right: -1px;
  }
  .contacts-tab:first-child { border-radius: 0; }
  .contacts-tab.active { border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); z-index: 1; position: relative; }
  .contacts-tab:hover:not(.active) { color: var(--text); }
  .contacts-add-btn {
    background: none; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent);
    font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.1em;
    padding: 4px 12px; cursor: pointer; transition: background 0.15s; white-space: nowrap;
  }
  .contacts-add-btn:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
  .contacts-add-form {
    padding: 12px 14px; border-bottom: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 8px; background: color-mix(in srgb, var(--accent) 2%, transparent);
  }
  .contacts-add-actions { display: flex; gap: 8px; }
  .contacts-search { padding: 7px 10px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
  .contacts-search input {
    width: 100%; background: var(--bg); border: 1px solid var(--border);
    color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 11px;
    padding: 6px 10px; outline: none; transition: border-color 0.2s;
    border-radius: 8px;
  }
  .contacts-search input:focus { border-color: var(--border-focus, color-mix(in srgb, var(--accent) 40%, transparent)); }
  .contacts-list { overflow-y: auto; max-height: 340px; }
  .contact-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 14px; border-bottom: 1px solid var(--border); transition: background 0.1s;
  }
  .contact-item:last-child { border-bottom: none; }
  .contact-item:hover { background: rgba(255,255,255,0.015); }
  .contact-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
    color: var(--accent); font-family: 'Syne', sans-serif; font-weight: 700;
    font-size: 13px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; user-select: none;
  }
  .contact-avatar.internal {
    background: rgba(108,143,255,0.08); border-color: rgba(108,143,255,0.25); color: #6c8fff;
  }
  .contact-info { flex: 1; min-width: 0; }
  .contact-name {
    font-size: 13px; font-weight: 600; color: var(--white);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .contact-sub {
    font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px;
  }
  .contact-actions { display: flex; gap: 5px; flex-shrink: 0; }
  .contact-call-btn {
    background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    color: var(--accent); font-size: 13px; width: 30px; height: 30px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background 0.15s;
    border-radius: 8px;
  }
  .contact-call-btn:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
  .contact-del-btn {
    background: none; border: 1px solid transparent; color: var(--muted);
    font-size: 11px; width: 30px; height: 30px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.15s, border-color 0.15s, color 0.15s;
    border-radius: 8px;
  }
  .contact-item:hover .contact-del-btn { opacity: 1; }
  .contact-del-btn:hover { border-color: rgba(255,77,77,0.3); color: #ff4d4d; }
  .contacts-empty {
    padding: 36px 14px; text-align: center;
    font-family: 'JetBrains Mono', monospace; font-size: 11px;
    color: var(--muted); line-height: 2;
  }
  @media (max-width: 600px) {
    .dialer-wrap, .contacts-outer { max-width: 100%; width: 100%; }
    .dialer-wrap { padding: 0; }
    .dial-key { font-size: 16px; }
    .dial-key .sub, .dial-key .key-letters { font-size: 9px; }
  }
  .dialer-status-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 20px;
    background: var(--glass-tint-md);
    border: none;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.06);
    margin-bottom: 0; font-family: 'JetBrains Mono', monospace; font-size: 11px;
  }
  .dialer-status-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #444;
    flex-shrink: 0; transition: background 0.3s;
  }
  .dialer-status-dot.registered { background: var(--success); box-shadow: 0 0 6px var(--success); }
  .dialer-status-dot.connecting { background: var(--warning); animation: blink 1s infinite; }
  .dialer-status-dot.error      { background: var(--error); }
  .dialer-status-dot.incall     { background: #a78bfa; box-shadow: 0 0 6px #a78bfa; animation: blink 1.5s infinite; }
  @keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.4} }
  .dialer-display {
    background: var(--card-bg);
    backdrop-filter: blur(4px) saturate(1.4);
    -webkit-backdrop-filter: blur(4px) saturate(1.4);
    border: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 -1px 0 rgba(255,255,255,0.04);
    padding: 20px 24px 16px; margin-bottom: 2px; min-height: 72px;
    display: flex; flex-direction: column; justify-content: flex-end;
  }
  .dialer-display.incall {
    justify-content: center; align-items: center; min-height: 90px;
  }
  .dcall-badge {
    font-family: 'JetBrains Mono', monospace; font-size: 10px;
    letter-spacing: .15em; margin-bottom: 8px; text-align: center;
  }
  .dcall-badge.incall  { color: #a78bfa; }
  .dcall-badge.onhold  { color: #ffc850; }
  .dcall-badge.ringing { color: var(--accent); animation: blink 1s infinite; }
  .dcall-name {
    font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700;
    color: var(--fg); text-align: center; margin-bottom: 4px; letter-spacing: .03em;
  }
  .dcall-timer {
    font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted);
    letter-spacing: .12em; text-align: center;
  }
  .dialer-number {
    font-family: 'JetBrains Mono', monospace; font-size: 18px;
    color: var(--text); letter-spacing: 0.05em; word-break: break-all;
    background: transparent; border: none; outline: none;
    width: 100%; text-align: center; caret-color: var(--accent);
    padding: 0;
  }
  .dialer-number::placeholder { color: var(--muted); font-size: 12px; letter-spacing: 0; }
  .dialer-hint { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); margin-top: 4px; letter-spacing: 0.1em; }
  .dialer-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-bottom: 2px; width: 100%; }
  @keyframes dialKeyPress {
    0% { transform: scale(1); }
    40% { transform: scale(0.88); background: var(--accent); color: #000; }
    100% { transform: scale(1); }
  }
  .dial-key.pressed { animation: dialKeyPress 0.18s ease both; }
  .dial-key {
    border-radius: 0;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    background: var(--glass-tint-md);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 -1px 0 rgba(255,255,255,0.04), inset 1px 0 rgba(255,255,255,0.06), inset -1px 0 rgba(255,255,255,0.06);
    color: var(--text);
    user-select: none;
    position: relative;
    overflow: hidden;
  }
  .dial-key:hover { background: color-mix(in srgb, var(--text) 7%, transparent); border-color: color-mix(in srgb, var(--text) 14%, transparent); }
  .dial-key:active { transform: scale(0.9); background: var(--accent) !important; color: #000 !important; }
  .dial-key .key-letters { font-size: 8px; letter-spacing: 0.1em; color: var(--muted); margin-top: 1px; font-family: 'JetBrains Mono', monospace; }
  .dial-key .sub   { font-size: 8px; letter-spacing: 0.2em; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
  .dialer-actions { display: flex; gap: 2px; align-items: stretch; }
  .dial-btn {
    padding: 10px 8px; border: none;
    background: var(--glass-tint-md);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 -1px 0 rgba(255,255,255,0.04);
    color: var(--text); cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center; transition: all 0.15s;
    position: relative; overflow: hidden;
  }
  .dial-btn:hover   { background: var(--glass-tint-strong); }
  .dial-btn.backspace { min-width: 56px; flex-shrink: 0; border-radius: 14px !important; font-size: 18px; }
  .dial-btn.call    { flex: 1; border-radius: 14px !important;
    background: color-mix(in srgb, var(--accent) 18%, var(--glass-tint)); color: var(--accent); font-size: 15px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(255,255,255,0.06), 0 0 28px color-mix(in srgb, var(--accent) 28%, transparent); }
  .dial-btn.call:hover   { background: color-mix(in srgb, var(--accent) 26%, var(--glass-tint-md)); }
  .dial-btn.hangup  { flex: 1; background: rgba(255,77,77,0.12); border-color: var(--error); color: var(--error); font-size: 22px; }
  .dial-btn.hangup:hover { background: rgba(255,77,77,0.2); }
  .dial-btn.cancel  { flex: 1; background: rgba(255,77,77,0.08); border-color: rgba(255,77,77,0.3); color: #ff8080; font-size: 14px; }
  .dial-btn.cancel:hover { background: rgba(255,77,77,0.15); }
  .dial-btn.mute    { flex: 1; background: rgba(255,200,80,0.08); border-color: rgba(255,200,80,0.3); color: #ffc850; font-size: 14px; }
  .dial-btn.mute:hover   { background: rgba(255,200,80,0.18); }
  .dial-btn.mute.active  { background: rgba(255,200,80,0.25); border-color: #ffc850; color: #ffe299; }
  .dial-btn.hold    { flex: 1; background: rgba(160,120,255,0.08); border-color: rgba(160,120,255,0.3); color: #a078ff; font-size: 14px; }
  .dial-btn.hold:hover   { background: rgba(160,120,255,0.18); }
  .dial-btn.hold.active  { background: rgba(160,120,255,0.25); border-color: #a078ff; color: #c8b0ff; }
  .dial-btn:disabled { opacity: 0.3; cursor: not-allowed; }
  .dialer-timer { display: none; }
  .dialer-plan-note {
    font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted);
    text-align: center; margin-top: 14px; letter-spacing: 0.08em;
    padding: 10px 24px 16px; border: none; background: transparent;
    display: none;
  }

  /* ── D3: Call/hangup square buttons ── */
  #dialHangupBtn, .dial-btn.hangup { border-radius: 0 !important; }

  /* ── D3: Dialer number display (Orbitron) ── */
  #dialerNumber {
    font-family: 'Orbitron', monospace !important;
    font-size: 22px !important;
    letter-spacing: 0.06em;
    text-align: center;
    border-bottom: 2px solid rgba(255,255,255,0.06) !important;
    border-top: none !important; border-left: none !important; border-right: none !important;
    background: transparent !important;
    padding: 12px 8px !important;
    transition: border-color 0.2s;
  }
  #dialerNumber:focus { border-bottom-color: var(--accent) !important; outline: none; }

  /* ── D3: Contacts dropdown square ── */
  #contactDropdown, .contact-dropdown { border-radius: 0 !important; overflow: visible !important; z-index: 9999; position: absolute; }
  #contactSearch, .contacts-search input { border-radius: 0 !important; }

  /* ── D3: Call log rows ── */
  .call-log-row { display:flex; align-items:center; gap:12px; padding:10px 16px; border-bottom:1px solid var(--border); transition:background 0.15s; cursor:pointer; }
  .call-log-row:hover { background: rgba(255,255,255,0.03); }
  .call-log-dir { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0; }
  .call-log-dir.in  { background:color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
  .call-log-dir.out { background:rgba(59,158,255,0.1); color:#3b9eff; }
  .call-log-dir.miss{ background:rgba(255,96,96,0.1); color:#ff6060; }

  /* ── Dialog box polish (v3) ── */
  #libsDialogOverlay {
    backdrop-filter: blur(12px) !important;
    background: rgba(5,5,8,0.88) !important;
  }
  #libsDialogBox {
    border-radius: 14px !important;
    background: #0f0f17 !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6) !important;
    overflow: hidden !important;
    position: relative !important;
  }

  /* ── CallerID card (v3) ── */
  .callerid-card {
    background: var(--card-bg);
    backdrop-filter: blur(4px) saturate(1.4);
    -webkit-backdrop-filter: blur(4px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
  }
  .callerid-number {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    color: var(--accent);
    letter-spacing: 0.05em;
  }
  #newCallerId, #newCallback {
    border-radius: 8px !important;
  }

  /* ── History/direction (v3) ── */
  .call-dir-incoming { color: var(--accent); }
  .call-dir-outgoing { color: #3b9eff; }
  .call-dir-missed   { color: #ff6060; }
  .history-table tbody tr { transition: background 0.15s; }
  .history-table tbody tr:hover td { background: rgba(255,255,255,0.03); }

@keyframes loaderBar{0%{transform:scaleX(0);opacity:1}60%{transform:scaleX(1);opacity:1}100%{transform:scaleX(1);opacity:0}}

@keyframes noplFadeUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
    .nopl-card {
      background:rgba(255,255,255,0.025);
      backdrop-filter:blur(20px) saturate(1.4);
      -webkit-backdrop-filter:blur(20px) saturate(1.4);
      border-color:rgba(255,255,255,0.08);
      box-shadow:inset 0 1px 0 rgba(255,255,255,0.07), 0 8px 32px rgba(0,0,0,0.25);
      padding:22px 20px;
      cursor:default;
      transition:transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
      border-radius: 16px;
    }
    .nopl-card:hover { transform:translateY(-5px); }
    .nopl-cta {
      display:inline-block;
      background:color-mix(in srgb, var(--accent) 12%, rgba(255,255,255,0.04));
      backdrop-filter:blur(20px) saturate(1.4);
      -webkit-backdrop-filter:blur(20px) saturate(1.4);
      color:var(--accent);
      font-weight:700;
      font-size:12px;
      letter-spacing:0.1em;
      text-transform:uppercase;
      padding:14px 36px;
      text-decoration:none;
      margin-bottom:14px;
      border:1px solid color-mix(in srgb, var(--accent) 30%, transparent);
      box-shadow:inset 0 1px 0 rgba(255,255,255,0.08);
      transition:background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
      border-radius: 10px;
      cursor: pointer;
    }
    .nopl-cta:hover { background:color-mix(in srgb, var(--accent) 20%, rgba(255,255,255,0.06)); transform:translateY(-2px); box-shadow:inset 0 1px 0 rgba(255,255,255,0.1), 0 6px 24px color-mix(in srgb, var(--accent) 20%, transparent); }
    .nopl-cta:active { transform:translateY(0); }


/* ── Skeleton loading placeholders ── */
.skeleton-line { background: rgba(255,255,255,0.06); border-radius: 4px; height: 14px; margin-bottom: 8px; animation: skeleton-pulse 1.5s ease-in-out infinite; }
.skeleton-line.short { width: 60%; }
@keyframes skeleton-pulse { 0%,100% { opacity:0.5; } 50% { opacity:1; } }

/* ── Utility classes (extracted from repeated inline styles) ── */
.u-hidden { display: none !important; }
.u-accent { color: var(--accent); }
.u-muted { color: var(--muted); }
.u-mb20 { margin-bottom: 20px; }
.u-mb16 { margin-bottom: 16px; }
.u-mb24 { margin-bottom: 24px; }
.u-mb0 { margin-bottom: 0; }
.u-mono-label { font-size: 9px; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 5px; font-family: 'JetBrains Mono', monospace; }
.u-mono-10-muted { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); }
.u-mono-11-muted { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }
.u-mono-11-text { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text); }
.u-mono-13-text { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text); }
.u-flex-1 { flex: 1; min-width: 0; }


/* Bitcoin payment modal */
@keyframes btcOverlayIn  { from { opacity:0; } to { opacity:1; } }
@keyframes btcOverlayOut { from { opacity:1; } to { opacity:0; } }
@keyframes btcCardIn  { from { opacity:0; transform:scale(0.94) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }
@keyframes btcCardOut { from { opacity:1; transform:scale(1) translateY(0); } to { opacity:0; transform:scale(0.94) translateY(10px); } }

body.btc-modal-open .sidebar,
body.btc-modal-open .main { filter: blur(3px) brightness(0.7); transition: filter 0.25s ease; }

.btc-plan-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  text-align: left;
  width: 100%;
}

.btc-deluxe-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(192,132,252,0.2);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  width: 100%;
}
.btc-deluxe-cta:hover { border-color: rgba(192,132,252,0.45); background: rgba(192,132,252,0.06); box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 6px 20px rgba(192,132,252,0.1); }

