*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button { font-family: inherit; line-height: 1; vertical-align: middle; }

html { scrollbar-gutter: stable; }

/* ── FOOTER ── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 36px 48px 0;
}
.site-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 28px;
}
.site-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 120px;
}
.site-footer-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.site-footer-tagline {
  font-size: .72rem;
  color: var(--text-muted);
  opacity: .6;
}
.site-footer-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-link {
  color: var(--text-muted);
  font-size: .78rem;
  text-decoration: none;
  padding: 5px 13px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: border-color .2s, color .2s;
}
.footer-link:hover { border-color: var(--accent); color: var(--accent); }
.site-footer-social {
  display: flex;
  gap: 8px;
  min-width: 120px;
  justify-content: flex-end;
}
.footer-social-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.footer-social-btn:hover { border-color: var(--accent); color: var(--accent); }
.site-footer-bottom {
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 0 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-footer-copy {
  font-size: .73rem;
  color: var(--text-muted);
  opacity: .45;
}

:root {
  --bg: #0f0f0f;
  --bg2: #161616;
  --bg3: #1e1e1e;
  --border: #2a2a2a;
  --accent: #a855f7;
  --accent-dim: rgba(168,85,247,0.15);
  --accent2: #7c3aed;
  --text: #e8e8e8;
  --text-muted: #888;
  --card-bg: #181818;
  --radius: 10px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.topbar-left {
  position: relative;
  max-width: 220px;
}
.search-input {
  width: 100%;
  height: 42px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0 36px 0 14px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent); }
.search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  display: flex;
  align-items: center;
}

.logo {
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo-m { color: var(--accent); text-shadow: 0 0 20px rgba(168,85,247,0.6); }
.logo-p { color: var(--text); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

#userPanel  { align-items: center; gap: 10px; }
#guestPanel { align-items: center; gap: 8px; }
.btn-plus {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.balance {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  height: 42px;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  white-space: nowrap;
}
/* ── LANG SWITCHER ── */
.lang-switcher {
  position: relative;
}
.lang-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  height: 42px;
  padding: 0 13px;
  margin: 0;
  cursor: pointer;
  transition: border-color 0.2s;
  box-sizing: border-box;
  line-height: 42px;
  outline: none;
  white-space: nowrap;
  vertical-align: middle;
}
.lang-trigger:hover { border-color: var(--accent); }
.lang-trigger img {
  width: 20px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.lang-arrow {
  font-size: 10px;
  color: var(--text);
  transition: transform 0.2s;
  margin-left: 2px;
}
.lang-switcher.open .lang-arrow { transform: rotate(180deg); }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  min-width: 170px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 999;
}
.lang-switcher.open .lang-dropdown { display: flex; flex-direction: column; gap: 2px; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}
.lang-option:hover { background: rgba(255,255,255,0.06); }
.lang-option.active { background: var(--accent-dim); color: var(--accent); }
.lang-option img {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  object-fit: cover;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  border: 1px solid var(--border);
  box-sizing: border-box;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  outline: none;
  line-height: 1;
}
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  height: 42px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  box-sizing: border-box;
  white-space: nowrap;
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ── NAVBAR ── */
.navbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 14px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); }
.nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.nav-pin {
  margin-left: auto;
  color: var(--text-muted);
  cursor: pointer;
  padding: 14px 0;
  font-size: 16px;
}

/* ── HERO ── */
.hero {
  padding: 20px 0 0;
}
.hero-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 32px;
  display: flex;
  align-items: stretch;
  gap: 16px;
}

/* ГОЛОВНИЙ БЛОК — зліва, з фоном */
.hero-box {
  flex: 1;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 260px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('img/hero.jpg') center/cover;
  filter: brightness(0.6);
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.45) 30%, transparent 100%);
}
.hero-box-inner {
  position: relative;
  z-index: 1;
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}
.hero-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}
.hero-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
}
.notif-count {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}
.submit-btn {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
  box-shadow: 0 4px 14px rgba(168,85,247,0.35);
}
.submit-btn:hover { opacity: 0.85; }

.hero-title {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
}
.hero-desc {
  font-size: 14px;
  color: #ddd;
  max-width: 540px;
  line-height: 1.6;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}
.hero-search {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 11px 18px;
  gap: 10px;
  max-width: 360px;
  margin-top: 4px;
  backdrop-filter: blur(6px);
}
.hero-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  width: 100%;
}
.hero-search input::placeholder { color: var(--text-muted); }
.hs-icon { color: var(--accent); display: flex; align-items: center; }

/* ПРАВА КОЛОНКА — поза hero-box */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 220px;
  flex-shrink: 0;
}

.hero-sidebar .snapshot-card {
  flex: 1;
}

/* CATEGORY TABS */
.category-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cat-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
  text-align: left;
}
.cat-tab:hover { border-color: var(--accent); background: var(--accent-dim); }
.cat-tab.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 10px rgba(168,85,247,0.15);
}
.cat-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.cat-icon img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.cat-icon.flask { background: rgba(168,85,247,0.2); color: var(--accent); }
.cat-icon.carbon { background: rgba(200,150,0,0.2); color: #c89600; }
.cat-icon.harmony { background: rgba(100,200,100,0.2); color: #64c864; }
.cat-name { font-size: 13px; font-weight: 600; }
.cat-count { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.snapshot-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  width: 100%;
}
.snapshot-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.snap-icon { font-size: 14px; }
.snap-title { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: #aaa; }
.snap-sub { font-size: 11px; color: var(--text-muted); margin-bottom: 14px; }
.snap-stats {
  display: flex;
  justify-content: space-between;
}
.snap-num { font-size: 20px; font-weight: 700; color: #fff; }
.snap-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── AUTH BUTTONS (topbar) ── */
.btn-auth-outline {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  height: 42px;
  padding: 0 16px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-auth-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-auth-fill {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  height: 42px;
  padding: 0 16px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(168,85,247,0.35);
  transition: opacity 0.2s;
}
.btn-auth-fill:hover { opacity: 0.85; }

.user-badge-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  min-width: 180px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  z-index: 999;
}
.user-badge-wrap.open .user-dropdown { display: flex; flex-direction: column; gap: 2px; }
.user-dd-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 12px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.user-dd-item svg { opacity: .6; width: 16px; height: 16px; flex-shrink: 0; display: block; overflow: hidden; }
.user-dd-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.user-dd-item:hover svg { opacity: 1; }
.user-dd-divider { height: 1px; background: var(--border); margin: 4px 0; }
.user-dd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 10px;
}
.user-dd-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.user-dd-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-dd-name  { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-dd-balance { font-size: 12px; color: var(--accent); font-weight: 600; }
.user-dd-logout { color: #e57373; }
.user-dd-logout svg { opacity: .7; }
.user-dd-logout:hover { background: rgba(229,115,115,0.1); color: #ef9a9a; }

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

.modal-box {
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
  position: relative;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  width: 28px; height: 28px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.07); color: var(--text); }

.modal-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg3);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}
.modal-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 9px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.modal-tab.active { background: var(--bg2); color: var(--text); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.form-group input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  padding: 11px 16px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  height: 44px;
  box-sizing: border-box;
}
.form-group input:focus { border-color: var(--accent); background: rgba(168,85,247,.05); }
.form-group input::placeholder { color: var(--text-muted); }

.input-pw-wrap { position: relative; }
.input-pw-wrap input { width: 100%; padding-right: 40px; }
.pw-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 15px;
  color: var(--text-muted);
  user-select: none;
}
.pw-toggle:hover { color: var(--text); }

.form-error {
  font-size: 12px;
  color: #e57373;
  min-height: 16px;
}

.btn-submit {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border: none;
  border-radius: 9px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(168,85,247,0.35);
  transition: opacity 0.2s;
  margin-top: 4px;
}
.btn-submit:hover { opacity: 0.85; }

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.forgot-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.forgot-link:hover { opacity: 0.8; }

#regConfirmGroup {
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.form-success {
  font-size: 13px;
  color: #81c784;
  min-height: 16px;
}
.btn-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  text-align: center;
  width: 100%;
  transition: color 0.2s;
}
.btn-back:hover { color: var(--text); }

/* ── MAIN ── */
.main {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* CONTROLS */
.list-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
  padding-bottom: 40px;
}
#paginationTop {
  margin-top: 0;
  padding-bottom: 0;
}
.page-dots { color: var(--text-muted); padding: 0 4px; font-size: 13px; }
.page-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.page-btn:disabled { opacity: .4; cursor: default; }
.page-btn.page-next, .page-btn.page-prev {
  width: auto;
  padding: 0 14px;
  letter-spacing: .04em;
  font-size: 13px;
}
.page-info { color: var(--text-muted); font-size: 13px; margin-left: 6px; }

.filter-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.filter-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: .03em;
}
.filter-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn-sm {
  width: 30px;
  height: 30px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.icon-btn-sm:hover { border-color: var(--accent); color: var(--accent); }

/* PLUGIN GRID */
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.plugin-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
  cursor: pointer;
}
.plugin-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.plugin-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
}
.plugin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.plugin-card:hover .plugin-thumb img { transform: scale(1.04); }

.card-no-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: rgba(255,255,255,.2);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  padding: 12px;
}

.pending-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255,165,0,0.85);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}
.card-pending {
  opacity: 0.7;
  border-color: rgba(255,165,0,0.4) !important;
}
.card-pending:hover { border-color: rgba(255,165,0,0.8) !important; opacity: 1; }

.sale-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e53935;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
  letter-spacing: 0.06em;
}
.card-actions {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}
.plugin-card:hover .card-actions { opacity: 1; }
.ca-btn {
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.ca-btn:hover { background: var(--accent); color: #000; border-color: var(--accent); }

.plugin-info {
  padding: 12px 14px;
}
.plugin-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.plugin-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plugin-price {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.plugin-price.paid { color: var(--accent); }
.plugin-price.free { color: #a0e070; }
.old-price { color: var(--text-muted); font-weight: 400; font-size: 11px; text-decoration: line-through; }

.plugin-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.by { font-size: 12px; color: var(--text-muted); }
.stars { color: #f5a623; font-size: 13px; letter-spacing: 1px; }

/* ── SUBMIT MODAL ── */
.submit-modal-box {
  max-width: 680px;
  width: 95vw;
  padding: 24px 32px 24px;
}
.submit-modal-box .submit-steps,
.update-modal-box .submit-steps {
  padding-right: 32px;
}

.submit-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}
.submit-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.submit-step.active { color: var(--accent); }
.submit-step.done   { color: #81c784; }
.step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.submit-step.active .step-num { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.submit-step.done   .step-num { border-color: #81c784; background: rgba(129,199,132,0.15); color: #81c784; }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px; }

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.drop-icon { font-size: 38px; color: var(--accent); line-height: 1; }
.drop-text { font-size: 15px; font-weight: 600; color: var(--text); }
.drop-sub  { font-size: 12px; color: var(--text-muted); }
.btn-browse {
  margin-top: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-browse:hover { border-color: var(--accent); color: var(--accent); }

.file-chosen {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px; margin-top: 10px;
}
.file-icon { font-size: 20px; }
.file-chosen span:nth-child(2) { flex: 1; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-remove-file {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 13px; padding: 0 4px;
  transition: color 0.2s;
}
.btn-remove-file:hover { color: #e57373; }

/* Screenshots */
.submit-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.ss-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.ss-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ss-thumb .ss-del {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(0,0,0,0.75); border: none; border-radius: 50%;
  color: #fff; font-size: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ss-thumb .ss-del:hover { background: #e53935; }
.btn-add-screenshot {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg3); border: 1px dashed var(--border);
  border-radius: 9px; color: var(--text-muted);
  font-size: 13px; font-weight: 600; padding: 10px 18px;
  cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.btn-add-screenshot:hover { border-color: var(--accent); color: var(--accent); }

/* Metadata step */
.meta-scroll {
  max-height: 560px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
  padding-right: 8px;
}
.meta-scroll::-webkit-scrollbar { width: 4px; }
.meta-scroll::-webkit-scrollbar-track { background: transparent; }
.meta-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-group textarea, .form-group select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  padding: 11px 16px;
  outline: none;
  resize: none;
  transition: border-color 0.2s, background 0.2s;
}
.form-group textarea:focus, .form-group select:focus { border-color: var(--accent); background: rgba(168,85,247,.05); }
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  height: 44px;
  box-sizing: border-box;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a855f7' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.form-group select option { background: #1e1e1e; color: var(--text); }
.form-check-row { display: flex; gap: 20px; flex-wrap: wrap; }
.check-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text); cursor: pointer;
}
.check-label input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }

.submit-panel {
  display: flex;
  flex-direction: column;
}
#sPanel3 { min-height: 620px; }

/* ── QUILL DARK THEME ──
   Quill вставляє .ql-toolbar як sibling ПЕРЕД контейнером,
   а сам #quillEditor отримує класи .ql-container.ql-snow
   Тому toolbar стилізуємо напряму, а не через .quill-editor-wrap
─────────────────────────────────────────────────── */

/* TOOLBAR — sibling перед .quill-editor-wrap */
.ql-toolbar.ql-snow {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-bottom: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 10px 10px 0 0 !important;
  padding: 8px 12px !important;
}

/* Focus: коли editor у фокусі — міняємо border toolbar через form-group */
.form-group:focus-within .ql-toolbar.ql-snow {
  border-color: var(--accent) !important;
  border-bottom-color: rgba(255,255,255,.07) !important;
}

/* EDITOR CONTAINER — #quillEditor сам стає .ql-container.ql-snow */
.quill-editor-wrap {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-top: none !important;
  border-radius: 0 0 10px 10px !important;
  transition: border-color .2s;
}
.quill-editor-wrap:focus-within {
  border-color: var(--accent) !important;
}

/* Toolbar кнопки */
.ql-toolbar.ql-snow button {
  border-radius: 6px;
  transition: background .15s;
  padding: 3px 5px;
  height: 26px;
  width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ql-toolbar.ql-snow button:hover  { background: rgba(168,85,247,.2); }
.ql-toolbar.ql-snow button.ql-active { background: rgba(168,85,247,.28); }

/* Editor контент */
.quill-editor-wrap .ql-editor {
  color: var(--text);
  padding: 14px 16px;
  min-height: 160px;
  line-height: 1.75;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}
.quill-editor-wrap .ql-editor img {
  height: 1.25em;
  width: auto;
  vertical-align: -0.2em;
}
.quill-editor-wrap .ql-editor.ql-blank::before {
  color: var(--text-muted);
  font-style: normal;
  left: 16px;
}

/* Іконки SVG */
.ql-snow .ql-stroke { stroke: #999; transition: stroke .15s; }
.ql-snow .ql-fill   { fill:   #999; transition: fill .15s; }
.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow button.ql-active .ql-stroke { stroke: var(--accent); }
.ql-toolbar.ql-snow button:hover .ql-fill,
.ql-toolbar.ql-snow button.ql-active .ql-fill   { fill: var(--accent); }

/* Size picker — числові значення */
.ql-snow .ql-size .ql-picker-label::before,
.ql-snow .ql-size .ql-picker-item::before { content: attr(data-value) !important; }
.ql-snow .ql-size .ql-picker-label:not([data-value])::before,
.ql-snow .ql-size .ql-picker-item:not([data-value])::before   { content: 'Size' !important; }

/* Picker (Normal ▾ dropdown) */
.ql-snow .ql-picker-label {
  color: #aaa !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 6px !important;
  padding: 2px 8px !important;
  transition: color .15s, border-color .15s;
}
.ql-snow .ql-picker-label:hover,
.ql-snow .ql-picker.ql-expanded .ql-picker-label {
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}

/* Dropdown список */
.ql-snow .ql-picker-options {
  background: #1a1a26 !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 6px !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.7) !important;
}
.ql-snow .ql-picker-item { color: var(--text-muted); border-radius: 6px; padding: 5px 10px; }
.ql-snow .ql-picker-item:hover { color: var(--accent); background: rgba(168,85,247,.12); }
.ql-snow .ql-picker-item.ql-selected { color: var(--accent); background: rgba(168,85,247,.18); }

/* Nav buttons */
.submit-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}
.btn-submit-next {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border: none; border-radius: 9px;
  color: #fff; font-size: 14px; font-weight: 700;
  padding: 10px 24px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(168,85,247,0.3);
  transition: opacity 0.2s;
}
.btn-submit-next:hover { opacity: 0.85; }
.btn-submit-next:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-submit-back {
  background: none; border: 1px solid var(--border);
  border-radius: 9px; color: var(--text-muted);
  font-size: 14px; font-weight: 600;
  padding: 10px 20px; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-submit-back:hover { border-color: var(--accent); color: var(--accent); }
.btn-submit-final {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border: none; border-radius: 9px;
  color: #fff; font-size: 14px; font-weight: 700;
  padding: 10px 24px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(168,85,247,0.3);
  transition: opacity 0.2s;
}
.btn-submit-final:hover { opacity: 0.85; }
.btn-submit-final:disabled { opacity: 0.4; cursor: not-allowed; }

.submit-error {
  font-size: 12px; color: #e57373;
  min-height: 16px; margin-top: 8px;
}

/* ── notification bell ───────────────────────────── */
.notif-bell-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.notif-bell-btn {
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  color: var(--text);
  transition: border-color .2s;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  outline: none;
  line-height: 1;
}
.notif-bell-btn:hover { border-color: var(--accent); }

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
}

.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  z-index: 9999;
  overflow: hidden;
  animation: modalIn .15s ease;
}

.notif-bell-wrap.open .notif-dropdown {
  display: block;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.notif-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-main);
}

.notif-read-all {
  background: none;
  border: none;
  font-size: .75rem;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
}
.notif-read-all:hover { text-decoration: underline; }

.notif-list {
  max-height: 380px;
  overflow-y: auto;
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .15s, opacity .2s;
  position: relative;
}

.notif-item:hover { background: rgba(255,255,255,.03); }
.notif-item:last-child { border-bottom: none; }

.notif-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.notif-avatar-icon { font-size: 1rem; }

.notif-unread {
  background: rgba(99,102,241,.06);
}
.notif-unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.notif-icon {
  font-size: 1.1rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-msg {
  font-size: .83rem;
  color: var(--text-main);
  text-decoration: none;
  display: block;
  line-height: 1.4;
  margin-bottom: 3px;
}
.notif-msg:hover { color: var(--accent); }

.notif-time {
  font-size: .72rem;
  color: var(--text-muted);
}

.notif-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .7rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s, background .15s;
}
.notif-item:hover .notif-dismiss { opacity: 1; }
.notif-dismiss:hover { background: rgba(239,68,68,.15); color: #ef4444; }

/* ── MESSAGES NAV BADGE ──────────────────────────────── */
.nav-link-messages { position: relative; }
.nav-msg-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── MESSAGES / INBOX PAGE ───────────────────────────── */
.inbox-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 32px auto;
  padding: 0 24px;
  height: calc(100vh - 180px);
  min-height: 500px;
}
.inbox-page {
  display: flex;
  height: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

/* Left sidebar */
.inbox-sidebar {
  width: 300px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border-radius: 14px 0 0 14px;
}
.inbox-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.inbox-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.inbox-sort-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  letter-spacing: .04em;
}
.inbox-conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.inbox-empty {
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

/* Conversation item */
.conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .15s;
  position: relative;
}
.conv-item:hover  { background: rgba(255,255,255,.04); }
.conv-item.active { background: rgba(168,85,247,.08); border-left: 3px solid var(--accent); padding-left: 13px; }
.conv-item-body { flex: 1; min-width: 0; }
.conv-item-top  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.conv-item-name { font-size: 13px; font-weight: 600; color: var(--text); }
.conv-item-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.conv-item-sub  { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-plugin-tag {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 5px;
}
.conv-unread-badge {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Chat area */
.inbox-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.inbox-no-conv {
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
}
.inbox-no-conv-inner { padding: 32px; }
.inbox-warning {
  background: rgba(200,150,0,.12);
  border-bottom: 1px solid rgba(200,150,0,.25);
  color: #c89600;
  font-size: 12px;
  padding: 10px 20px;
  line-height: 1.5;
}
.inbox-chat-header {
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  background: var(--bg2);
}
.inbox-chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.inbox-members-icon { font-size: 16px; color: var(--text-muted); }
.inbox-members-text { font-size: 12px; color: var(--text-muted); }
.inbox-chat-participants {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.chat-participant {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* Messages */
.inbox-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 80%;
}
.msg-row.msg-me {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.msg-bubble-wrap { display: flex; flex-direction: column; }
.msg-me .msg-bubble-wrap { align-items: flex-end; }
.msg-sender { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 3px; }
.msg-bubble {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 2px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
  max-width: 480px;
}
.msg-me .msg-bubble {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  border-radius: 12px 12px 2px 12px;
}
.msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 2px;
}

/* Input */
.inbox-input-wrap {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  background: var(--bg2);
}
.inbox-input-inner {
  display: flex;
  align-items: flex-end;
  gap: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .2s;
  overflow: hidden;
}
.inbox-input-inner:focus-within { border-color: var(--accent); }
.inbox-textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 12px 16px;
  resize: none;
  outline: none;
  line-height: 1.5;
  min-height: 44px;
  max-height: 120px;
}
.inbox-send-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0 10px 10px 0;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  align-self: stretch;
  transition: background .2s;
  letter-spacing: .02em;
}
.inbox-send-btn:hover { background: var(--accent2); }

.msg-icon-btn {
  position: relative;
  text-decoration: none;
  color: var(--text-muted);
  transition: color .2s, border-color .2s;
}
.msg-icon-btn:hover { color: var(--text); border-color: var(--accent); }
.msg-icon-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  font-size: 10px;
  padding: 0 3px;
}

.inbox-sort-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 100;
}
.inbox-sort-option {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s;
}
.inbox-sort-option:hover { background: rgba(255,255,255,.06); color: var(--text); }
.inbox-sort-option.active { color: var(--accent); background: var(--accent-dim); font-weight: 600; }

/* ── SHARED BUTTON ── */
.pcover-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.pcover-btn:hover { border-color: var(--accent); color: var(--accent); }
.pcover-btn-msg { background: var(--accent); border-color: var(--accent); color: #fff; }
.pcover-btn-msg:hover { background: var(--accent2); border-color: var(--accent2); color: #fff; }
