﻿/* ============================================================
   TelSender — Design System
   Dark-first, restrained, Telegram-inspired. No template feel.
   ============================================================ */

:root {
  --bg: #0b0d10;
  --bg-elev: #12151a;
  --bg-elev2: #171b21;
  --bg-hover: #1d222a;
  --border: #232830;
  --border-strong: #2e3440;
  --text: #e6e9ee;
  --text-2: #9aa3af;
  --text-3: #6b7280;
  --accent: #3b9eff;
  --accent-2: #7b8cff;
  --accent-dim: rgba(59, 158, 255, 0.12);
  --success: #4ade80;
  --success-dim: rgba(74, 222, 128, 0.12);
  --warn: #fbbf24;
  --warn-dim: rgba(251, 191, 36, 0.12);
  --error: #f87171;
  --error-dim: rgba(248, 113, 113, 0.12);
  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, monospace;
  --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.5), 0 24px 64px rgba(0,0,0,0.45);
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg: #f7f8fa;
  --bg-elev: #ffffff;
  --bg-elev2: #f0f2f5;
  --bg-hover: #e8ebf0;
  --border: #e2e5ea;
  --border-strong: #d0d5dd;
  --text: #1a1d23;
  --text-2: #5a6472;
  --text-3: #98a1ad;
  --accent: #2276e3;
  --accent-2: #6558d3;
  --accent-dim: rgba(34, 118, 227, 0.10);
  --shadow: 0 1px 2px rgba(16,24,40,0.06), 0 8px 24px rgba(16,24,40,0.08);
  --shadow-lg: 0 4px 12px rgba(16,24,40,0.10), 0 24px 64px rgba(16,24,40,0.12);
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(59, 158, 255, 0.28); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 0.92rem; }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-elev2);
  color: var(--text);
  font-size: 0.88rem; font-weight: 500;
  transition: background var(--transition), border-color var(--transition),
              transform var(--transition), opacity var(--transition);
  white-space: nowrap;
  user-select: none;
}
.btn:hover { background: var(--bg-hover); border-color: var(--text-3); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, #2f8ef7, #2563d9);
  border-color: transparent; color: #fff;
  box-shadow: 0 1px 3px rgba(37, 99, 217, 0.4);
}
.btn-primary:hover { background: linear-gradient(135deg, #4499ff, #2d6fe8); border-color: transparent; }

.btn-danger { color: var(--error); border-color: rgba(248, 113, 113, 0.3); background: transparent; }
.btn-danger:hover { background: var(--error-dim); border-color: var(--error); }

.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }

.btn-sm { padding: 5px 11px; font-size: 0.8rem; }
.btn-lg { padding: 12px 26px; font-size: 0.98rem; border-radius: var(--radius); }

.btn-icon {
  padding: 7px; width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; color: var(--text-2);
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border); }

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 0.82rem; font-weight: 550;
  color: var(--text-2); margin-bottom: 7px; letter-spacing: 0.01em;
}
.field .hint { font-size: 0.78rem; color: var(--text-3); margin-top: 5px; }

.input, .textarea, .select {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { min-height: 90px; resize: vertical; line-height: 1.5; }

.checkbox-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.checkbox-row span { font-size: 0.88rem; color: var(--text); }

.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 99px;
  background: var(--border-strong); transition: background var(--transition);
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform var(--transition);
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }

/* ------------------------------------------------------------
   Layout: sidebar shell
   ------------------------------------------------------------ */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px; flex-shrink: 0;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: 40;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px 16px;
  font-weight: 650; font-size: 0.98rem; letter-spacing: -0.01em;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, #2f8ef7, #6558d3);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
}
.sidebar-nav { flex: 1; padding: 6px 12px; overflow-y: auto; }
.sidebar-section {
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3);
  padding: 16px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; margin: 1px 0;
  border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 0.88rem; font-weight: 480;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 550; }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 20%; bottom: 20%;
  width: 2px; border-radius: 2px; background: var(--accent);
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.9; }

.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.sidebar-footer .nav-item { font-size: 0.82rem; }

/* Free-trial countdown box (sidebar footer, under Account) */
.trial-box {
  margin: 6px 0 8px; padding: 9px 11px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-elev2);
  animation: cardIn 360ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
.trial-top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.74rem; font-weight: 600; color: var(--text-2); margin-bottom: 7px;
}
.trial-left { font-variant-numeric: tabular-nums; color: var(--text-3); font-weight: 550; }
.trial-track {
  height: 6px; border-radius: 99px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--border);
}
.trial-track i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #2f8ef7, #6558d3);
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
.trial-track i.trial-done { background: var(--error); }
.trial-upgrade {
  display: inline-block; margin-top: 7px;
  font-size: 0.72rem; font-weight: 600; color: var(--accent); text-decoration: none;
}
.trial-upgrade:hover { text-decoration: underline; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 1.05rem; font-weight: 620; letter-spacing: -0.01em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.content { padding: 26px 28px 60px; max-width: 1240px; width: 100%; margin: 0 auto; }

.menu-toggle { display: none; }

/* ------------------------------------------------------------
   Cards & panels
   ------------------------------------------------------------ */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition);
}
.card-hover:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.card-pad { padding: 20px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 0.92rem; font-weight: 600; }

.grid { display: grid; gap: 16px; }
.grid-stats { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.stat-card { padding: 18px 20px; }
.stat-label {
  font-size: 0.74rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-3); margin-bottom: 8px;
  display: flex; align-items: center; gap: 7px;
}
.stat-value { font-size: 1.65rem; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 0.78rem; color: var(--text-3); margin-top: 4px; }

/* ------------------------------------------------------------
   Status dots & badges
   ------------------------------------------------------------ */
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.dot-success { background: var(--success); box-shadow: 0 0 6px rgba(74,222,128,0.6); }
.dot-warn { background: var(--warn); box-shadow: 0 0 6px rgba(251,191,36,0.5); }
.dot-error { background: var(--error); box-shadow: 0 0 6px rgba(248,113,113,0.5); }
.dot-idle { background: var(--text-3); }
.dot-pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 0.73rem; font-weight: 570; letter-spacing: 0.01em;
}
.badge-success { background: var(--success-dim); color: var(--success); }
.badge-warn { background: var(--warn-dim); color: var(--warn); }
.badge-error { background: var(--error-dim); color: var(--error); }
.badge-accent { background: var(--accent-dim); color: var(--accent); }
.badge-neutral { background: var(--bg-elev2); color: var(--text-2); border: 1px solid var(--border); }

/* ------------------------------------------------------------
   Tables
   ------------------------------------------------------------ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead th {
  text-align: left; padding: 10px 16px;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-3);
  background: var(--bg-elev2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 11px 16px; border-bottom: 1px solid var(--border); color: var(--text-2); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--bg-hover); }
td .mono, .mono { font-family: var(--mono); font-size: 0.8rem; }

/* ------------------------------------------------------------
   Empty & skeleton states
   ------------------------------------------------------------ */
.empty-state {
  text-align: center; padding: 64px 24px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: var(--bg-elev);
}
.empty-state .icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--bg-elev2); border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px; color: var(--text-3);
}
.empty-state h3 { font-size: 0.98rem; font-weight: 600; margin-bottom: 6px; }
.empty-state p { color: var(--text-3); font-size: 0.86rem; max-width: 380px; margin: 0 auto 18px; }

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-elev2) 25%, var(--bg-hover) 50%, var(--bg-elev2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-text { height: 12px; margin: 8px 0; }
.skeleton-text.w-60 { width: 60%; }
.skeleton-text.w-40 { width: 40%; }
.skeleton-card { height: 110px; }

/* ------------------------------------------------------------
   Modal
   ------------------------------------------------------------ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 20px 20px;
  animation: fadeIn 160ms ease;
}
.modal {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px;
  animation: modalIn 200ms cubic-bezier(0.2, 0.9, 0.3, 1);
  max-height: 84vh; display: flex; flex-direction: column;
}
.modal-lg { max-width: 760px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 0.98rem; font-weight: 620; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px 18px; border-top: 1px solid var(--border);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------
   Toasts
   ------------------------------------------------------------ */
.toast-stack {
  position: fixed; bottom: 22px; right: 22px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 360px;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg-elev2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  animation: toastIn 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
.toast.leaving { animation: toastOut 200ms ease forwards; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--error); }
.toast-warn { border-left: 3px solid var(--warn); }
.toast-info { border-left: 3px solid var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* ------------------------------------------------------------
   Progress
   ------------------------------------------------------------ */
.progress-track {
  height: 8px; border-radius: 99px;
  background: var(--bg-elev2); border: 1px solid var(--border);
  overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #2f8ef7, #6558d3);
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ------------------------------------------------------------
   Activity feed
   ------------------------------------------------------------ */
.feed { display: flex; flex-direction: column; }
.feed-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  animation: feedIn 260ms ease;
}
.feed-item:last-child { border-bottom: none; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.feed-time { font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); white-space: nowrap; padding-top: 2px; }
.feed-body { font-size: 0.85rem; color: var(--text-2); min-width: 0; }
.feed-body strong { color: var(--text); font-weight: 550; }
.feed-dot { margin-top: 6px; }

/* ------------------------------------------------------------
   Misc
   ------------------------------------------------------------ */
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.small { font-size: 0.8rem; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.stack-10 > * + * { margin-top: 10px; }
.stack-16 > * + * { margin-top: 16px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page-desc { color: var(--text-3); font-size: 0.88rem; margin-top: 3px; }
.section-title { font-size: 0.95rem; font-weight: 620; margin-bottom: 4px; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #2f8ef7, #6558d3);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 650; font-size: 0.85rem; flex-shrink: 0;
}

.kbd {
  font-family: var(--mono); font-size: 0.75rem;
  background: var(--bg-elev2); border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px;
}

/* Search input with icon */
.search-box { position: relative; }
.search-box .input { padding-left: 34px; }
.search-box svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--text-3); pointer-events: none;
}

/* Segmented control */
.segmented {
  display: inline-flex; background: var(--bg-elev2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 3px; gap: 2px;
}
.segmented button {
  border: none; background: transparent; color: var(--text-2);
  padding: 5px 13px; border-radius: 6px; font-size: 0.82rem; font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.segmented button.active { background: var(--bg-hover); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.segmented button:hover:not(.active) { color: var(--text); }

/* Responsive */
@media (max-width: 1080px) {
  .grid-stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }
  .content { padding: 20px 16px 80px; }
  .topbar { padding: 12px 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-stats { grid-template-columns: 1fr; }
  .btn span.btn-label { display: none; }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 35;
  background: rgba(0,0,0,0.5);
}
.sidebar-overlay.show { display: block; }

/* ------------------------------------------------------------
   Entrance motion (page load, lists, stat cards)
   ------------------------------------------------------------ */
.content > * { animation: pageIn 300ms cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.grid-stats > *, .grid-2 > *, .grid-3 > * { animation: cardIn 360ms cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.grid-stats > *:nth-child(2), .grid-2 > *:nth-child(2), .grid-3 > *:nth-child(2) { animation-delay: 40ms; }
.grid-stats > *:nth-child(3), .grid-2 > *:nth-child(3), .grid-3 > *:nth-child(3) { animation-delay: 80ms; }
.grid-stats > *:nth-child(4) { animation-delay: 120ms; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px) scale(0.99); } to { opacity: 1; transform: none; } }

.modal { will-change: transform, opacity; }
.progress-fill { will-change: width; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------
   Pricing (subscription page)
   ------------------------------------------------------------ */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px; align-items: stretch;
}
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card .card-pad { display: flex; flex-direction: column; flex: 1; }
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-dim), var(--shadow);
}
.price-card.featured:hover { transform: translateY(-3px); }
.price-card:hover { transform: translateY(-2px); }
.price-flag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #2f8ef7, #2563d9); color: #fff;
  font-size: 0.66rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 12px; border-radius: 99px; white-space: nowrap;
}
.price-line { display: flex; align-items: baseline; gap: 3px; margin: 10px 0 14px; }
.price-cur { font-size: 1.1rem; font-weight: 600; color: var(--text-2); }
.price-amt { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.price-perks { list-style: none; padding: 0; margin: 0 0 18px; flex: 1; }
.price-perks li {
  font-size: 0.82rem; color: var(--text-2); padding: 4px 0 4px 22px; position: relative;
}
.price-perks li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--success-dim);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 8px; background-position: center; background-repeat: no-repeat;
}
.price-soon { align-self: flex-start; }
.price-soon::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--warn); animation: pulse 2s ease-in-out infinite;
}

/* ------------------------------------------------------------
   Help / FAQ widget (bottom-right)
   ------------------------------------------------------------ */
.help-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border: none; border-radius: 99px;
  background: linear-gradient(135deg, #2f8ef7, #2563d9);
  color: #fff; font-size: 0.86rem; font-weight: 600;
  box-shadow: 0 6px 20px rgba(37, 99, 217, 0.45);
  transition: transform var(--transition), box-shadow var(--transition);
}
.help-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(37, 99, 217, 0.55); }
.help-fab:active { transform: scale(0.97); }

.help-backdrop {
  position: fixed; inset: 0; z-index: 160;
  background: rgba(4, 6, 10, 0.55);
  animation: fadeIn 160ms ease;
}

.help-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 170;
  width: min(420px, calc(100vw - 36px));
  max-height: min(640px, calc(100vh - 36px));
  display: flex; flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: helpIn 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
  overflow: hidden;
}
/* the hidden attribute must beat display:flex */
.help-panel[hidden] { display: none; }
.help-backdrop[hidden] { display: none; }
@keyframes helpIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.help-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px; border-bottom: 1px solid var(--border);
}
.help-head strong { display: block; font-size: 0.95rem; }
.help-head .small { display: block; margin-top: 1px; }
.help-body { overflow-y: auto; padding: 10px 14px; flex: 1; }
.help-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin: 8px 0; background: var(--bg-elev2);
  overflow: hidden;
}
.help-item summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: 10px 12px; font-size: 0.85rem; font-weight: 550; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after {
  content: "+"; font-size: 1rem; color: var(--text-3); font-weight: 500;
  transition: transform var(--transition);
}
.help-item[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.help-item[open] summary { color: var(--accent); }
.help-answer { padding: 0 12px 12px; font-size: 0.82rem; color: var(--text-2); line-height: 1.6; }
.help-answer p { margin: 0 0 6px; }
.help-answer a { color: var(--accent); }
.help-foot {
  padding: 12px 16px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-elev2);
}
.help-foot .btn { justify-content: center; word-break: break-all; }

@media (max-width: 560px) {
  .help-fab span { display: none; }
  .help-fab { padding: 12px; border-radius: 50%; }
  .help-panel { right: 10px; bottom: 10px; }
}
