/* ============================================================
   XCryptoDaily — market-terminal theme (dark + light), RTL
   ============================================================ */

:root,
[data-theme="dark"] {
  --bg: #0F1420;
  --bg-soft: #121828;
  --panel: #171E2E;
  --line: #232C42;
  --text: #EAEDF5;
  --muted: #8C96AD;
  --accent: #F5B841;
  --accent-ink: #14100A;
  --up: #2BD9A5;
  --down: #F55348;
  --shadow: rgba(0,0,0,.35);
  --hero-glow: rgba(245,184,65,.07);
}

[data-theme="light"] {
  --bg: #F4F6FA;
  --bg-soft: #ECEFF5;
  --panel: #FFFFFF;
  --line: #D8DEE8;
  --text: #141A26;
  --muted: #5C677A;
  --accent: #D4920A;
  --accent-ink: #FFFFFF;
  --up: #0A9B6E;
  --down: #D63B32;
  --shadow: rgba(20,26,38,.08);
  --hero-glow: rgba(212,146,10,.12);
}

:root {
  --radius: 12px;
  --font-display: "Space Grotesk", "Tajawal", sans-serif;
  --font-body: "Inter", "Tajawal", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

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

body {
  background:
    radial-gradient(900px 300px at 70% -80px, var(--hero-glow), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  transition: background .25s, color .25s;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.text-accent { color: var(--accent); }
.empty-note { color: var(--muted); padding: 40px 0; }
.lead { color: var(--muted); }

/* ---------- Price tape ---------- */
.tape {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 0;
  direction: ltr;
}
.tape-inner { display: inline-block; animation: slide 45s linear infinite; }
.tape:hover .tape-inner { animation-play-state: paused; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tape-inner { animation: none; } }
.tape-coin { margin: 0 18px; color: var(--muted); }
.tape-coin b { color: var(--text); font-weight: 500; }
.tape-coin .price { color: var(--accent); }
.up { color: var(--up); }
.down { color: var(--down); }

/* ---------- Breaking news ticker ---------- */
.breaking {
  display: flex;
  align-items: stretch;
  background: linear-gradient(90deg, rgba(245,84,72,.12), transparent);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  min-height: 38px;
}
.breaking-label {
  flex-shrink: 0;
  background: var(--down);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0 14px;
  display: flex;
  align-items: center;
}
.breaking-track { flex: 1; overflow: hidden; position: relative; }
.breaking-inner {
  display: inline-flex;
  gap: 40px;
  white-space: nowrap;
  animation: breaking 60s linear infinite;
  padding: 9px 0;
}
.breaking-inner a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.breaking-inner a:hover { color: var(--accent); }
@keyframes breaking { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.breaking:hover .breaking-inner { animation-play-state: paused; }

/* ---------- Header ---------- */
header.top {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo span { color: var(--accent); }
.logo small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
}
.logo-has-img {
  display: flex;
  align-items: center;
  line-height: 1;
}
.logo-img {
  display: block;
  max-height: 48px;
  max-width: min(220px, 55vw);
  width: auto;
  height: auto;
  object-fit: contain;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.search-form {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--panel);
  min-width: 180px;
  max-width: 280px;
  flex: 1;
}
.search-form input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  padding: 8px 14px;
  min-width: 0;
}
.search-form input::placeholder { color: var(--muted); }
.search-form button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 18px;
  padding: 0 14px;
  cursor: pointer;
}
.search-form-lg { max-width: 520px; margin-top: 16px; }

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  display: grid;
  place-items: center;
}
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }

.lang-switch {
  display: flex;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--panel);
}
.lang-switch a { padding: 4px 10px; border-radius: 999px; color: var(--muted); }
.lang-switch a.active { background: var(--bg-soft); color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.nav-wrap { padding-bottom: 10px; }
nav.menu { display: flex; gap: 4px; flex-wrap: wrap; }
nav.menu a {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  transition: color .15s, background .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
nav.menu a em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--muted);
}
nav.menu a:hover { color: var(--text); background: var(--panel); }
nav.menu a.active { color: var(--accent-ink); background: var(--accent); font-weight: 600; }
nav.menu a.active em { background: rgba(0,0,0,.15); color: var(--accent-ink); }

/* ---------- Market panel ---------- */
.market-panel {
  margin: 24px 0 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.market-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.market-panel-head h2 {
  font-family: var(--font-display);
  font-size: 18px;
}
.live-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--up);
  display: flex;
  align-items: center;
  gap: 6px;
}
.live-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.market-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.stat-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card.skeleton .stat-value { opacity: .4; }
.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}
.stat-change { font-family: var(--font-mono); font-size: 12px; }

/* ---------- Topic pills ---------- */
.topic-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.topic-pills-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-inline-end: 4px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.pill em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}
.pill:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
  margin: 24px 0;
}
.hero-card {
  background: linear-gradient(160deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero-card .thumb { aspect-ratio: 16 / 8; background: var(--bg-soft) center/cover no-repeat; }
.hero-card .body { padding: 24px; }
.hero-card h2 {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.22;
  margin: 10px 0;
}
.hero-card h2 a:hover { color: var(--accent); }
.hero-meta { margin-top: 12px; }

.side-list { display: flex; flex-direction: column; gap: 14px; }
.side-list h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 2px;
}
.side-item {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.side-item:last-child { border-bottom: 0; padding-bottom: 0; }
.side-thumb {
  position: relative;
  flex-shrink: 0;
  display: block;
  border-radius: 10px;
  overflow: hidden;
}
.side-thumb-img {
  width: 84px;
  height: 84px;
  background: var(--bg-soft) center/cover no-repeat;
  transition: transform .2s;
}
.side-thumb-fallback {
  background: linear-gradient(135deg, var(--panel), var(--line));
}
.side-thumb:hover .side-thumb-img { transform: scale(1.05); }
.side-thumb .rank {
  position: absolute;
  top: 6px;
  inset-inline-start: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  min-width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 8px var(--shadow);
}
.side-body { flex: 1; min-width: 0; }
.side-body > a {
  display: block;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 6px;
}
.side-body > a:hover { color: var(--accent); }

/* ---------- Labels & meta ---------- */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
}
.meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 2px solid var(--accent);
  padding-top: 14px;
  margin: 12px 0 18px;
}
.section-head h3 { font-family: var(--font-display); font-size: 20px; }

.page-head { margin: 28px 0 8px; }
.page-head h1 { font-family: var(--font-display); font-size: 28px; }

/* ---------- Card grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px var(--shadow);
}
.card-thumb-link { position: relative; display: block; }
.card .thumb { aspect-ratio: 16 / 9; background: var(--bg-soft) center/cover no-repeat; }
.card-read {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 10px;
  background: rgba(15,20,32,.82);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 6px;
}
[data-theme="light"] .card-read { background: rgba(20,26,38,.75); }
.card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card h4 { font-size: 16px; line-height: 1.4; flex: 1; }
.card h4 a:hover { color: var(--accent); }
.card p { font-size: 14px; color: var(--muted); }

.ad-slot {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 34px 10px;
  margin: 28px 0;
}
.ad-unit {
  margin: 28px 0;
  text-align: center;
  overflow: hidden;
  border-radius: var(--radius);
}
.ad-unit iframe,
.ad-unit ins { display: block; margin: 0 auto; max-width: 100%; }

.ad-slot-inline { margin: 28px 0; }
.ad-slot-bottom { margin: 8px 0 28px; }

.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 30px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--panel);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pagination .page-arrow { font-size: 16px; padding: 8px 12px; }

/* ---------- Article page ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0 8px;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span[aria-current] { color: var(--text); }

/* Article 3-column layout: left ad | content | right ad */
.article-layout {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 160px;
  gap: 24px;
  align-items: start;
  margin-bottom: 40px;
}
.article-layout.no-left {
  grid-template-columns: minmax(0, 1fr) 160px;
}
.article-layout.no-right {
  grid-template-columns: 160px minmax(0, 1fr);
}
.article-layout.no-left.no-right {
  grid-template-columns: minmax(0, 1fr);
}
.article-main { min-width: 0; }

.article-rail { min-width: 0; }
.article-rail-sticky {
  position: sticky;
  top: 14px;
}
.article-rail .ad-slot,
.article-rail .ad-unit {
  margin: 0;
}
.article-rail .ad-slot {
  min-height: 600px;
  padding: 16px 6px;
  font-size: 11px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-rail .ad-unit {
  max-width: 160px;
  margin-inline: auto;
}

@media (min-width: 1280px) {
  .article-layout {
    grid-template-columns: 180px minmax(0, 1fr) 180px;
    gap: 28px;
  }
  .article-layout.no-left { grid-template-columns: minmax(0, 1fr) 180px; }
  .article-layout.no-right { grid-template-columns: 180px minmax(0, 1fr); }
  .article-rail .ad-unit { max-width: 180px; }
}

@media (max-width: 1100px) {
  .article-rail { display: none; }
  .article-layout,
  .article-layout.no-left,
  .article-layout.no-right,
  .article-layout.no-left.no-right {
    grid-template-columns: minmax(0, 1fr);
  }
}

article.single { max-width: none; margin: 20px 0 34px; }
article.single h1 {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.18;
  margin: 12px 0 16px;
}
.article-meta { margin-bottom: 8px; }

.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 16px 0 20px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.share-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-inline-end: 4px;
}
.share-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

article.single .content { margin: 24px 0; font-size: 17px; color: color-mix(in srgb, var(--text) 88%, transparent); line-height: 1.75; }
article.single .content h2,
article.single .content h3,
article.single .content h4 {
  font-family: var(--font-display);
  margin: 1.4em 0 0.6em;
  line-height: 1.25;
  color: var(--text);
}
article.single .content p { margin: 0 0 1em; }
article.single .content ul,
article.single .content ol { margin: 0 0 1em 1.2em; padding: 0; }
article.single .content li { margin-bottom: 0.45em; }
article.single .content a { color: var(--accent); text-decoration: underline; }
article.single .content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.2em auto;
}
article.single .cover { border-radius: var(--radius); margin: 20px 0; width: 100%; height: auto; }

.source-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--muted);
}
.source-box a { color: var(--accent); }

/* ---------- Footer ---------- */
footer.bottom {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 28px 0;
  color: var(--muted);
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.footer-brand strong { color: var(--text); font-size: 16px; }
.footer-brand p { margin-top: 8px; max-width: 320px; }
.footer-social { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.footer-social a { font-size: 13px; color: var(--accent); }
.footer-social a:hover { text-decoration: underline; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { text-align: end; align-self: end; }

/* ---------- Back to top ---------- */
.back-top {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 40;
  box-shadow: 0 4px 20px var(--shadow);
}
.back-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- RTL ---------- */
[dir="rtl"] body, [dir="rtl"] { letter-spacing: 0; }
[dir="rtl"] .logo, [dir="rtl"] .hero-card h2, [dir="rtl"] article.single h1 { letter-spacing: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .market-stats { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-copy { grid-column: 1 / -1; text-align: start; }
}

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .hero-card h2 { font-size: 22px; }
  .nav-toggle { display: flex; }
  .nav-wrap {
    display: none;
    padding-bottom: 14px;
  }
  .nav-wrap.open { display: block; }
  .top-inner { flex-wrap: nowrap; }
  .logo { flex: 1; }
  .top-actions .search-form { display: none; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .market-stats { grid-template-columns: 1fr 1fr; }
  article.single h1 { font-size: 27px; }
  .breaking-label { font-size: 10px; padding: 0 10px; }
  .share-bar { gap: 6px; }
  .share-btn { font-size: 12px; padding: 5px 10px; }
}

.account-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: nowrap;
}
.account-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Forms & auth pages ---------- */
.msg {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
}
.msg.ok {
  background: color-mix(in srgb, var(--up) 14%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--up) 40%, transparent);
  color: var(--up);
}
.msg.err {
  background: color-mix(in srgb, var(--down) 12%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--down) 35%, transparent);
  color: var(--down);
}

.auth-form {
  max-width: 520px;
  margin: 28px auto 40px;
  padding: 0 4px;
}
.auth-form > p {
  color: var(--muted);
  margin-top: 16px;
  font-size: 15px;
}
.auth-form > p a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.form-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px var(--shadow);
}
.form-panel label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.form-panel input[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}
.form-panel input[type="text"],
.form-panel input[type="email"],
.form-panel input[type="password"],
.form-panel input[type="search"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .15s;
}
.form-panel input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  transition: background .15s, border-color .15s, color .15s, filter .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn.primary:hover {
  filter: brightness(1.06);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn.danger {
  background: transparent;
  color: var(--down);
  border-color: color-mix(in srgb, var(--down) 50%, transparent);
}
.btn.danger:hover {
  background: color-mix(in srgb, var(--down) 10%, transparent);
  color: var(--down);
  border-color: var(--down);
}
.auth-form .btn { align-self: flex-start; margin-top: 4px; }
.auth-form .msg { margin-bottom: 8px; }
.auth-form .form-panel + form { margin-top: 8px; }
.auth-logout-form { margin-top: 4px; }
