:root {
  --bg-1: #ffffff;
  --bg-2: #F5F7FA;
  --ink: #0D1B2A;
  --muted: #6B7280;
  --primary: #16a34a;
  --primary-2: #15803d;
  --primary-light: #dcfce7;
  --danger: #DC2626;
  --card: #ffffff;
  --border: #E2E6EA;
  --surface2: #F5F7FA;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --radius: 10px;
  --green: #16a34a;
  --blue: #2563eb;
  --yellow: #d97706;
  --red: #DC2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Roboto, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg-2);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.backdrop {
  display: none;
}

.page {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 0 16px;
}

/* Auth screen hero — убран, заменён на .auth-screen */
.hero {
  display: none;
}

h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #fff;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 600;
}

h3 {
  margin: 0 0 10px;
  font-size: 0.97rem;
  font-weight: 600;
}

p {
  margin: 0.3rem 0;
  color: var(--muted);
}

.status-box {
  display: none;
}

.panel {
  background: var(--card);
  border: none;
  border-radius: 0;
  padding: 12px 16px;
  box-shadow: none;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.panel-grid {
  display: grid;
  gap: 10px;
}

.panel-grid.two {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.panel-grid.three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel-grid.four {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.card {
  background: #ffffff;
  border-radius: 12px;
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 12px 16px;
  margin-bottom: 12px;
}

label {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  font-size: 0.93rem;
  color: var(--muted);
  font-weight: 500;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
  min-height: 42px;
  color: var(--ink);
  transition: border-color 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  border-width: 1.5px;
  background: #fff;
}

button {
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  padding: 10px 16px;
  min-height: 42px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

button:hover {
  opacity: 0.85;
  box-shadow: none;
}

button:active {
  opacity: 0.75;
}

button.ghost {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--border);
  font-weight: 500;
}

button.ghost:hover {
  background: #F5F7FA;
  box-shadow: none;
  opacity: 1;
}

button.secondary {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--border);
  font-weight: 500;
}

button.secondary:hover {
  background: #F5F7FA;
  opacity: 1;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

/* App header */
.app-header {
  background: #0D1B2A !important;
  border-bottom: none;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Скрываем чип с ролью и email */
.app-role-chip,
.app-me-email {
  display: none !important;
}

.app-buyer-badge {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.app-logout-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 7px 9px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  opacity: 1;
}

.app-logout-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  opacity: 1;
}

.app-logout-btn:active {
  background: rgba(255, 255, 255, 0.3);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border-radius: 999px;
  padding: 4px 10px;
  border: none;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
}

.inline-form {
  display: grid;
  grid-template-columns: 1.4fr minmax(140px, 220px) auto auto;
  gap: 10px;
  margin: 10px 0 12px;
}

.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.album-groups {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.album-group h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.album-tile {
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  padding: 0;
  display: block;
  text-align: left;
}

.album-tile.active {
  background: transparent;
}

.album-tile:hover {
  transform: none;
  box-shadow: none;
}

.album-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #c2cfe0;
}

.album-tile.active .album-cover {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.album-cover-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 700;
  color: #fff;
  background: #0D1B2A;
}

.album-overlay {
  position: absolute;
  inset: auto 10px 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.album-overlay-title {
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-overlay-count {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.album-mobile-info {
  display: none;
  margin-top: 6px;
  padding: 0 2px;
}

.album-title {
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.album-count {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.album-photo-feed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

@media (min-width: 1200px) {
  .album-photo-feed {
    grid-template-columns: repeat(3, 1fr);
  }
}

.album-photo-empty {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 14px;
  color: var(--muted);
}

.album-photo-item {
  position: relative;
  border: none;
  border-radius: 0;
  background: #000;
  box-shadow: none;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.sale-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.catalog-sale-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #374151;
  cursor: pointer;
  user-select: none;
  margin-left: auto;
  margin-right: 8px;
}
.catalog-sale-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #dc2626;
  margin: 0;
}

.album-photo-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.load-more-btn {
  padding: 10px 32px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
}

.load-more-btn:hover {
  background: #F5F7FA;
  opacity: 1;
}

body.lightbox-open .app-header {
  display: none !important;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #000;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  touch-action: none;
  overscroll-behavior: none;
  color: #fff;
}

.photo-lightbox-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 6px) 8px 6px;
  background: transparent;
  z-index: 3;
}

.pl-icon-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  min-height: 0;
}
.pl-icon-btn:active { background: rgba(255,255,255,0.1); }

.pl-counter {
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  padding: 0 4px;
}

.pl-spacer { flex: 1; }

.pl-menu-wrap { position: relative; }

.pl-menu {
  position: absolute;
  top: 48px;
  right: 8px;
  min-width: 200px;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 6px 0;
  box-shadow: 0 10px 32px rgba(0,0,0,0.6);
  z-index: 5;
}
.pl-menu.hidden { display: none; }
.pl-menu-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #fff;
  padding: 12px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  min-height: 0;
}
.pl-menu-item:hover, .pl-menu-item:active { background: rgba(255,255,255,0.08); }
.pl-menu-item:disabled { color: rgba(255,255,255,0.35); cursor: not-allowed; }

.photo-lightbox-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  min-height: 0;
}
.photo-lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.pl-nav { display: none !important; }

.photo-lightbox-bottombar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 3;
}

.photo-lightbox-info {
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.3;
  text-align: left;
  max-height: 36vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-bottom: 6px;
}
.photo-lightbox-info.hidden { display: none; }

.lightbox-info-boutique,
.lightbox-info-sizes,
.lightbox-info-desc,
.lightbox-info-price {
  color: #fff;
}

.lightbox-info-pid {
  display: inline-block;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.85);
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.lightbox-info-desc {
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 400;
}
.lightbox-info-boutique {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  margin-bottom: 2px;
}
.lightbox-info-desc.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lightbox-show-more {
  background: none;
  border: none;
  color: #4a8cff;
  font-size: 0.9rem;
  padding: 4px 0 0;
  cursor: pointer;
  display: block;
}

.lightbox-info-sizes { margin-top: 4px; font-size: 15px; line-height: 1.3; }
.lightbox-info-price { margin-top: 6px; font-size: 16px; line-height: 1.3; font-weight: 600; }

.pl-heart {
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  min-height: 0;
  flex-shrink: 0;
}
.pl-heart:active { background: rgba(255,255,255,0.1); }
.pl-heart svg { width: 26px; height: 26px; }
.pl-heart.active { color: #ff3b50; }
.pl-heart.active svg path { fill: #ff3b50; stroke: #ff3b50; }
.pl-heart.hidden { display: none; }

.photo-lightbox.ui-hidden .photo-lightbox-topbar,
.photo-lightbox.ui-hidden .photo-lightbox-bottombar,
.photo-lightbox.ui-hidden .pl-nav {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.photo-lightbox-topbar,
.photo-lightbox-bottombar,
.pl-nav { transition: opacity 0.2s; }

/* Favorites grid in buyer cabinet */
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.favorite-tile {
  background: #000;
  padding: 0;
  border: none;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  min-height: 0;
}
.favorite-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (min-width: 700px) {
  .favorites-grid { grid-template-columns: repeat(4, 1fr); }
}

.chip-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  padding: 7px 14px;
  font-weight: 500;
  font-size: 0.9rem;
  min-height: 36px;
}

.chip-btn.active {
  border-color: var(--green);
  background: var(--primary-light);
  color: var(--green);
  opacity: 1;
}

.chip-btn:hover {
  opacity: 0.85;
}

.breadcrumbs {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.boutique-filter {
  margin-bottom: 10px;
  border: none;
  border-radius: 6px;
  background: var(--primary-light);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--primary);
  font-size: 0.9rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.product-card {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px;
}

.product-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #f3f6f9;
}

.product-meta {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 5px;
}

.seller-image-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: 6px;
}

.seller-image-tile {
  display: grid;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.seller-image-tile input {
  width: auto;
  min-height: 0;
}

.seller-image-tile img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f7f9fb;
}

.seller-edit-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.seller-edit-btns {
  display: flex;
  gap: 8px;
}

.boutique-link {
  border: 0;
  background: none;
  color: var(--primary);
  box-shadow: none;
  padding: 0;
  min-height: 0;
  border-radius: 0;
  text-decoration: none;
  font-weight: 500;
}

.boutique-link:hover {
  transform: none;
  box-shadow: none;
  text-decoration: underline;
}

.boutique-link.is-active {
  font-weight: 700;
}

.rows {
  display: grid;
  gap: 8px;
}

.row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 10px 0;
  background: transparent;
}

.row-item > div {
  display: flex;
  gap: 6px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 12px;
  margin-top: 10px;
}

.chat-conversation-btn {
  width: 100%;
  min-height: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  display: grid;
  justify-items: start;
  gap: 3px;
  padding: 10px 0;
  text-align: left;
}

.chat-conversation-btn:hover {
  transform: none;
  box-shadow: none;
  background: var(--primary-light);
}

.chat-conversation-btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

.chat-conversation-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.chat-messages {
  border: none;
  border-radius: 0;
  background: var(--bg-2);
  min-height: 240px;
  max-height: 420px;
  overflow: auto;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.chat-bubble {
  border: none;
  border-radius: 12px 12px 12px 4px;
  background: var(--bg-2);
  padding: 8px 12px;
  max-width: min(85%, 540px);
}

.chat-bubble.mine {
  margin-left: auto;
  background: #DDE3EA;
  border-radius: 12px 12px 4px 12px;
}

.chat-bubble-header {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.chat-bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}

.chat-form {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.always-in-stock-note {
  display: grid;
  align-content: center;
  min-height: 42px;
  font-size: 0.9rem;
  color: var(--muted);
}

.danger {
  background: var(--danger);
  color: #fff;
}

.danger:hover {
  background: #cc3333;
  opacity: 1;
}

/* ── Buyer bottom tab navigation ─────────────────────── */
.buyer-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  background: #fff;
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 12px rgba(13, 27, 42, 0.07);
}

.buyer-nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px 11px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.buyer-nav-tab.active {
  color: var(--primary);
}

.buyer-nav-tab:hover {
  color: var(--primary);
}

.buyer-nav-tab svg {
  flex-shrink: 0;
}

.buyer-tab-panel {
  display: none;
  padding-bottom: 16px;
}

.buyer-bottom-nav {
  display: none !important;
}

.buyer-tab-panel.active {
  display: block;
}

.buyer-tab-subtitle {
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.pay-subscription-btn {
  display: block;
  width: 100%;
  margin: 8px 0 4px;
  padding: 12px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.pay-subscription-btn:hover { opacity: 0.85; }
.pay-subscription-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Catalog tab — clean view */
.catalog-breadcrumbs {
  padding: 8px 12px 0;
}

.catalog-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 6px;
}

.catalog-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.catalog-section-count {
  font-weight: 400;
  color: var(--muted);
}

.catalog-show-all-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0;
  min-height: 0;
  box-shadow: none;
  cursor: pointer;
}

.catalog-show-all-btn:hover {
  background: none;
  text-decoration: underline;
  opacity: 0.8;
}

/* Album strip — horizontal scroll, collapsed by default */
.catalog-album-strip {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 10px;
  padding: 0 12px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.catalog-album-strip::-webkit-scrollbar {
  display: none;
}

/* In collapsed (strip) mode each tile is fixed width */
.catalog-album-strip .album-tile {
  flex: 0 0 96px;
  width: 96px;
}

/* In expanded (grid) mode — switch to grid */
.catalog-album-strip.expanded {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  overflow: visible;
  padding: 0 12px 8px;
}

.catalog-album-strip.expanded .album-tile {
  flex: unset;
  width: 100%;
}

/* Album viewer inside catalog */
.buyer-album-viewer-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.buyer-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  color: #0D1B2A;
  padding: 6px 8px;
  min-height: 0;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.buyer-back-btn:hover {
  background: #F5F7FA;
  opacity: 1;
}

.buyer-album-viewer-title {
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: #0D1B2A;
  padding: 6px;
  min-width: 32px;
  min-height: 32px;
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.15s ease;
}

.album-sort-btn:hover {
  background: #F5F7FA;
  opacity: 1;
}

.album-sort-btn.asc svg {
  transform: rotate(180deg);
}

.album-sort-btn svg {
  transition: transform 0.2s ease;
  pointer-events: none;
}

.buyer-album-photo-count {
  color: var(--muted);
  font-size: 0.82rem;
  flex-shrink: 0;
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 12px;
}

.hidden {
  display: none !important;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox input {
  width: auto;
}

.auth-legal-checkbox {
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-legal-checkbox a {
  color: var(--primary);
  text-decoration: none;
}

.auth-legal-checkbox a:hover {
  text-decoration: underline;
}

.legal-footer {
  margin: 12px 0 0;
  padding: 10px 20px 14px;
  background: var(--surface2);
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 0;
  max-width: 980px;
  margin: 0 auto;
}

.legal-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 4px 14px;
  border-right: 1px solid var(--border);
  line-height: 1.2;
  transition: color .15s ease;
}

.legal-links a:last-child {
  border-right: none;
}

.legal-links a:hover {
  color: var(--primary);
  text-decoration: none;
}

@media (max-width: 640px) {
  .legal-footer { margin-top: 8px; padding: 8px 12px 12px; }
  .legal-links a {
    padding: 3px 10px;
    font-size: 0.78rem;
  }
}

.tree {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.tree ul {
  margin: 6px 0 6px 16px;
  padding: 0;
}

/* ── Admin tabs ── */
.admin-header {
  padding: 14px 16px 0;
  background: var(--card);
}

.admin-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.admin-tabs {
  display: flex;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
  padding: 0 4px;
}

.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
  flex: 0 0 auto;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  box-shadow: none;
  min-height: 0;
  margin-bottom: -1px;
}

.admin-tab:hover {
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.admin-tab-panel {
  padding-top: 8px;
}

.admin-tab-panel.hidden {
  display: none;
}

/* ── Admin user list ── */

.admin-user-subtabs {
  display: flex;
  gap: 4px;
  margin: 10px 0 8px;
  border-bottom: 1px solid var(--border, #e5e5e5);
}
.admin-user-subtab {
  background: transparent;
  border: none;
  color: var(--muted, #888);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s, border-color .15s;
}
.admin-user-subtab:hover { color: var(--text, #111); }
.admin-user-subtab.active {
  color: var(--text, #111);
  border-bottom-color: var(--accent, #2e7d32);
}
.admin-user-subtab-count {
  background: var(--surface2, #eee);
  color: var(--muted, #888);
  font-size: .72rem;
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
}
.admin-user-subtab.active .admin-user-subtab-count {
  background: var(--accent, #2e7d32);
  color: #fff;
}
.admin-user-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.admin-user-search {
  flex: 1 1 180px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 8px;
  font: inherit;
  background: var(--surface, #fff);
  color: var(--text, #111);
}
.admin-user-filter {
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 8px;
  font: inherit;
  background: var(--surface, #fff);
  color: var(--text, #111);
}
.admin-user-filter.hidden { display: none !important; }

.admin-user-list {
  margin-top: 10px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.12s;
}

.admin-user-row:hover {
  background: var(--bg-2);
}

.admin-user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.admin-user-dot-active { background: #4BB34B; }
.admin-user-dot-pending { background: #E64646; }

.admin-user-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-user-row-email {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-row-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-user-row-status {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.admin-user-row-arrow {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
}

/* Detail card */

.admin-user-detail-meta {
  margin-bottom: 12px;
}

.admin-user-meta-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  font-size: 0.88rem;
}

.admin-user-meta-grid span {
  color: var(--muted);
}

.admin-user-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-user-edit-form h4 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-user-edit-checks {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 8px 0 14px;
}

/* ── Admin tariffs ── */

.admin-tariff-list {
  margin-top: 6px;
}

.admin-tariff-add-btn {
  margin-top: 10px;
  width: 100%;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px dashed var(--primary);
  box-shadow: none;
}

.admin-tariff-add-btn:hover {
  background: #bbf7d0;
  transform: none;
  box-shadow: none;
  opacity: 1;
}

.admin-tariff-detail-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 540px) {
  .admin-tariff-detail-sections { grid-template-columns: 1fr; }
}

.admin-tariff-section h4 {
  margin: 0 0 4px;
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-tariff-section p {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 8px;
}

/* ── Admin catalog feed ── */

.admin-catalog-photo-wrap {
  position: relative;
  display: block;
}

.admin-catalog-photo-album {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-catalog-photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-catalog-photo-btn img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}

/* Кружок ⋯ */
.admin-photo-menu-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 0;
  min-height: 0;
  box-shadow: none;
  z-index: 2;
  letter-spacing: -1px;
}

.admin-photo-menu-btn:hover {
  background: rgba(0,0,0,0.8);
  transform: none;
  box-shadow: none;
}

/* Выпадающее меню */
.admin-photo-menu {
  position: absolute;
  top: 38px;
  right: 6px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  z-index: 10;
  min-width: 130px;
  overflow: hidden;
}

.admin-photo-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: none;
  border: none;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  min-height: 0;
  box-shadow: none;
  border-radius: 0;
}

.admin-photo-menu button:hover {
  background: var(--bg-2);
  transform: none;
  box-shadow: none;
}

/* Бейджи модерации */
.admin-photo-mod-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,0.55);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.72rem;
  color: #fff;
  z-index: 2;
}

.admin-photo-mod-badge.pending { background: rgba(230,120,0,0.8); }
.admin-photo-mod-badge.rejected { background: rgba(230,70,70,0.8); }

/* Карточка редактирования товара */
.admin-product-edit-card {
  margin-top: 8px;
}

/* ─────────────────────────────── */

.admin-tree-album-btn {
  width: 100%;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  display: grid;
  justify-items: start;
  gap: 2px;
  padding: 8px 10px;
  text-align: left;
}

.admin-tree-album-btn:hover {
  transform: none;
  box-shadow: none;
  background: var(--primary-light);
  border-color: var(--primary);
}

.admin-tree-album-btn small {
  color: var(--muted);
  font-weight: 500;
}

.admin-tree-album-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.admin-album-group h4 {
  margin-bottom: 10px;
}

.admin-album-tile {
  border-radius: 12px;
}

.admin-album-tile.active .album-cover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 27, 42, 0.2);
}

.admin-workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-tree-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  margin: 8px 0 10px;
}

.admin-album-edit-panel {
  margin: 10px 0;
}

.admin-album-workspace-grid {
  margin-top: 10px;
}

.admin-cover-preview-wrap {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 10px;
  min-height: 160px;
  display: grid;
  place-items: center;
  background: #f9fbfc;
}

.admin-cover-preview-wrap img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

.admin-cover-fallback {
  color: var(--muted);
  font-weight: 700;
}

.admin-cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-album-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.admin-photo-tile {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  display: grid;
  gap: 6px;
}

.admin-photo-tile.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 27, 42, 0.18);
}

.admin-photo-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.86rem;
}

.admin-photo-check input {
  width: auto;
  min-height: 0;
}

.admin-photo-preview {
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #f5f8fa;
}

.admin-photo-preview:hover {
  transform: none;
  box-shadow: none;
}

.admin-photo-preview img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.admin-photo-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-photo-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.admin-photo-open-btn {
  min-height: 0;
  padding: 6px 8px;
  font-size: 0.78rem;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

small {
  color: var(--muted);
}

@media (max-width: 900px) {
  .page {
    padding: 18px 12px 28px;
  }

  .panel {
    padding: 12px;
    border-radius: 14px;
  }

  .status-box {
    width: 100%;
    text-align: center;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .cards {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }

  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .album-overlay {
    display: none;
  }

  .album-mobile-info {
    display: grid;
    gap: 2px;
  }

  .row-item {
    align-items: flex-start;
  }

  .row-item > div {
    flex-wrap: wrap;
  }

  .admin-workspace-actions,
  .admin-tree-controls,
  .admin-bulk-actions,
  .admin-cover-actions,
  .admin-photo-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .panel-grid.two,
  .panel-grid.three,
  .panel-grid.four {
    grid-template-columns: 1fr;
  }

  .toolbar:not(.app-header) {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-left {
    justify-content: flex-start;
  }

  .chips-wrap {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .chips-wrap::-webkit-scrollbar {
    height: 6px;
  }

  .chips-wrap::-webkit-scrollbar-thumb {
    background: rgba(13, 95, 99, 0.35);
    border-radius: 999px;
  }

  .chip-btn {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .row-item {
    flex-direction: column;
  }

  .row-item > div {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row-item > div button {
    width: 100%;
  }

  .row-between {
    flex-direction: column;
    align-items: stretch;
  }

  .row-between button {
    width: 100%;
  }

  .tree {
    font-size: 0.92rem;
  }

  .boutique-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 1rem;
  }

  h2 {
    font-size: 0.97rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .album-mobile-info {
    margin-top: 6px;
  }

  .album-photo-feed {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
  }

  .product-card img {
    aspect-ratio: 4 / 5;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .row-item > div {
    grid-template-columns: 1fr;
  }
}

/* Badge styles */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.4;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warn    { background: #fef3c7; color: #92400e; }
.badge-error   { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1e40af; }

/* Review queue */
.review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.review-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 14px;
}
.review-card-images {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.review-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.review-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.review-card-desc {
  font-size: .85rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.4;
}
.review-card-meta {
  font-size: .78rem;
  color: var(--text-muted, #6b7280);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.review-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
.review-stats-bar {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: .85rem;
  color: #0369a1;
  margin-top: 8px;
}
.pagination-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-top: 14px;
  font-size: .85rem;
}

/* AI logs table */
.logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.logs-table th,
.logs-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border, #e5e7eb);
  white-space: nowrap;
}
.logs-table th {
  background: var(--surface-alt, #f9fafb);
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-muted, #6b7280);
}
.logs-table tr:hover td { background: #f9fafb; }

/* AI stats grid */
.ai-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.ai-stat-card {
  background: var(--surface-alt, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ai-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent, #2563eb);
}
.ai-stat-label {
  font-size: .75rem;
  color: var(--text-muted, #6b7280);
  text-align: center;
}
@media (max-width: 640px) {
  .ai-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .review-card { flex-direction: column; }
  .review-card-images { flex-direction: row; }
}

/* Gender radio group */
.gender-fieldset {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.gender-fieldset legend {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  padding: 0 4px;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  cursor: pointer;
  font-weight: 500;
}
.radio-label input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent, #2563eb);
  cursor: pointer;
}

/* Seller product sections */
.seller-section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0 6px;
  font-weight: 600;
  font-size: .95rem;
}
.seller-section-header small {
  font-weight: 400;
  font-size: .8rem;
  color: var(--text-muted, #6b7280);
}
.seller-section-review {
  color: #92400e;
}
.seller-section-divider {
  border-top: 2px dashed var(--border, #e5e7eb);
  margin: 14px 0;
}

.seller-section-pending { color: #92400e; }
.seller-section-rejected { color: #991b1b; }
.seller-section-catalog { color: #065f46; }


/* ═══════════════════════════════════════════════════════════
   MOBILE-FIRST REDESIGN v14 — Buyer & Admin cabinet
   ═══════════════════════════════════════════════════════════ */

/* ── Auth-mode / App-mode body ── */
body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

body.app-mode .hero {
  display: none !important;
}

body.app-mode .page {
  padding-top: 56px;
}

/* ── Hero: auth-only header ── */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--primary);
  color: #fff;
  height: 56px;
}

.hero > div:first-child,
.hero h1,
.hero p {
  display: none;
}

.hero-logo {
  font-family: "Manrope", -apple-system, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.5px;
}

/* ── App header (toolbar when logged in) ── */
.app-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: 56px;
  background: #1a1a1a;
  color: #fff;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border: none !important;
  border-bottom: none !important;
  margin: 0 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Manrope", -apple-system, sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: #fff;
  letter-spacing: 1px;
  line-height: 1;
}

.app-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 0;
  object-fit: contain;
  display: block;
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-role-chip {
  background: rgba(255,255,255,0.22) !important;
  color: #fff !important;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 20px;
}

.app-me-email {
  display: none;
}

.app-logout-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.18);
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  min-height: 0;
  box-shadow: none;
  transition: background 0.15s;
}

.app-logout-btn:hover,
.app-logout-btn:active {
  background: rgba(255,255,255,0.3);
  transform: none;
  box-shadow: none;
}

/* Header pay subscription button (buyer) */
.app-pay-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: rgba(20, 28, 48, 0.85);
  border: 1.5px solid rgba(80, 160, 255, 0.9);
  border-radius: 22px;
  color: #fff;
  font-family: inherit;
  padding: 5px 14px;
  min-height: 38px;
  cursor: pointer;
  line-height: 1.05;
  box-shadow: 0 0 6px rgba(56, 130, 255, 0.55), 0 0 14px rgba(56, 130, 255, 0.35), inset 0 0 6px rgba(56, 130, 255, 0.2);
  transition: box-shadow 0.2s, background 0.2s, transform 0.1s;
}
.app-pay-btn:hover { box-shadow: 0 0 10px rgba(56, 130, 255, 0.85), 0 0 22px rgba(56, 130, 255, 0.55), inset 0 0 8px rgba(56, 130, 255, 0.3); border-color: rgba(120, 190, 255, 1); }
.app-pay-btn:active { transform: scale(0.97); }
.app-pay-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.app-pay-btn-title { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2px; }
.app-pay-btn-date { font-size: 0.72rem; font-weight: 600; opacity: 0.95; white-space: nowrap; }

.app-pay-btn.pay-urgent {
  background: rgba(40, 16, 20, 0.85);
  border-color: rgba(255, 90, 90, 0.95);
  box-shadow: 0 0 6px rgba(255, 60, 60, 0.65), 0 0 14px rgba(255, 60, 60, 0.45), inset 0 0 6px rgba(255, 60, 60, 0.25);
  animation: payUrgentPulse 1.6s ease-in-out infinite;
}
.app-pay-btn.pay-urgent:hover {
  box-shadow: 0 0 10px rgba(255, 60, 60, 0.9), 0 0 22px rgba(255, 60, 60, 0.6), inset 0 0 8px rgba(255, 60, 60, 0.35);
  border-color: rgba(255, 130, 130, 1);
}
@keyframes payUrgentPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 60, 60, 0.65), 0 0 14px rgba(255, 60, 60, 0.45), inset 0 0 6px rgba(255, 60, 60, 0.25); }
  50%      { box-shadow: 0 0 12px rgba(255, 60, 60, 0.95), 0 0 24px rgba(255, 60, 60, 0.6), inset 0 0 10px rgba(255, 60, 60, 0.4); }
}

@media (max-width: 480px) {
  .app-pay-btn { padding: 4px 10px; min-height: 36px; border-radius: 20px; }
  .app-pay-btn-title { font-size: 0.72rem; }
  .app-pay-btn-date { font-size: 0.66rem; }
}

/* ── Security section: compact ── */
#securitySection {
  padding: 0;
  border-bottom: 1px solid var(--border);
}

#securitySection .card {
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 10px 16px;
}

#securitySection h3 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
}

#securitySection h4 {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 8px 0 4px;
}

#securitySection p,
#securitySection small {
  font-size: 0.78rem;
}

#twofaStatusText {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

#twofaDevicesList {
  font-size: 0.78rem;
}

/* ── Buyer home tab ── */
.b-welcome {
  padding: 20px 16px 14px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.b-greeting {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink) !important;
  margin: 0 0 6px;
}

.b-sub-info {
  color: var(--muted) !important;
  font-size: 0.88rem;
  margin: 0;
}

/* ── Buyer big menu tiles (admin-style) ── */
.b-menu {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-2, #F0F2F5);
}

.b-menu-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: #fff;
  border: none;
  border-radius: 12px;
  padding: 20px 20px 20px 24px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: #0D1B2A;
  transition: transform 0.1s, box-shadow 0.1s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
  min-height: 0;
  font-family: inherit;
}

.b-menu-btn:hover {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.b-menu-btn:active {
  transform: scale(0.98);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* Цветная полоса слева */
.b-menu-btn::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  border-radius: 12px 0 0 12px;
}
.b-menu-catalog::before       { background: #34C759; }
.b-menu-search::before        { background: #2688EB; }
.b-menu-notifications::before { background: #FF9500; }
.b-menu-support::before       { background: #AF52DE; }
.b-menu-vk::before            { background: #FF6B6B; }
.b-menu-favorites::before     { background: #FF2D55; }

.b-menu-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 2px;
  position: relative;
  display: inline-block;
}

.b-menu-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0D1B2A;
  line-height: 1.2;
}

.b-menu-hint {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 400;
}

/* Buyer profile form — compact inline style */
.b-profile-form {
  padding: 16px;
  background: #fff;
  border-top: 8px solid var(--bg-2, #F0F2F5);
}

.b-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 8px;
  display: block;
}

.b-profile-row {
  display: flex;
  gap: 8px;
}

.b-profile-input {
  flex: 1;
  min-height: 42px;
}

.b-profile-save {
  flex-shrink: 0;
  padding: 0 16px;
  min-height: 42px;
}

/* ── Admin section ── */
.admin-header {
  display: none !important;
}

/* Admin tabs — sticky below fixed app header */
.admin-tabs {
  position: sticky;
  top: 56px;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.admin-tab {
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-section-panel {
  padding: 0;
}

/* admin panel root: remove double padding */
#adminSection.panel {
  padding: 0;
  margin-bottom: 0;
  border: none;
}

/* ── Buyer tab panels: account for fixed header ── */
.buyer-tab-panel {
  padding-bottom: 16px;
}

/* ── Auth section tweaks ── */
#authSection.panel {
  background: var(--bg-2, #F0F2F5);
  border: none;
  padding: 16px;
}

#loginForm.card,
.card[id$="Form"] {
  border-radius: var(--radius, 8px);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

/* ── Page max-width constraint on mobile ── */
@media (max-width: 700px) {
  .page {
    padding: 0;
  }

  .b-menu {
    gap: 10px;
    padding: 10px 12px;
  }

  .b-menu-btn {
    padding: 16px 16px 16px 22px;
  }

  .b-menu-icon {
    font-size: 1.8rem;
  }

  .b-menu-label {
    font-size: 1.1rem;
  }

  .b-menu-hint {
    font-size: 0.85rem;
  }
}

/* ── Sticky offset fixes for fixed app header ── */
.buyer-album-viewer-header {
  top: 56px;
}

.admin-catalog-refresh-btn {
  font-size: 0.82rem;
}

.catalog-section-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Security section hidden */
#securitySection {
  display: none !important;
}

/* Row gap util */
.row-gap {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Admin section panel reset */
#adminSection.panel {
  padding: 0;
  border: none;
  border-bottom: none;
  margin-bottom: 0;
}

/* ── Buyer back bar ── */
.b-topbar {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  background: #fff;
  border-bottom: none;
  box-shadow: 0 1px 0 #E2E6EA;
  position: sticky;
  top: 52px;
  z-index: 50;
}

.b-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #0D1B2A;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
  min-height: 0;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.b-back-btn:hover {
  background: none;
  color: #1A3047;
}

/* ── Admin back bar ── */
.a-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 56px;
  z-index: 50;
}

.a-topbar-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.a-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* ── Admin home menu tiles ── */
.a-menu {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-2, #F0F2F5);
  min-height: calc(100vh - 56px);
}

.a-menu-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: #fff;
  border: none;
  border-radius: var(--radius, 8px);
  padding: 20px 20px 20px 24px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: var(--ink);
  transition: transform 0.1s, box-shadow 0.1s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
  font-family: inherit;
}

.a-menu-btn::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  border-radius: 8px 0 0 8px;
}

.a-menu-btn:active {
  transform: scale(0.98);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.a-menu-icon { font-size: 2rem; line-height: 1; margin-bottom: 2px; position: relative; display: inline-block; }
.a-menu-bell {
  position: absolute;
  top: -6px;
  right: -14px;
  background: #e53935;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  animation: bell-shake 1.2s ease-in-out infinite;
}
.a-menu-bell-count { font-weight: 700; }
.a-menu-bell--dot { width: 10px; height: 10px; padding: 0; }
@keyframes bell-shake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-12deg); }
  40% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(4deg); }
}
.chat-unread-dot { margin-right: 4px; }

.a-menu-label { font-size: 1.2rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.a-menu-hint { font-size: 0.9rem; color: var(--muted); font-weight: 400; }

.a-menu-users::before       { background: #2688EB; }
.a-menu-catalog::before     { background: #34C759; }
.a-menu-tariffs::before     { background: #FF9500; }
.a-menu-chats::before       { background: #AF52DE; }
.a-menu-products::before    { background: #FF6B6B; }
.a-menu-review::before      { background: #FF3B30; }
.a-menu-ai-logs::before     { background: #5856D6; }
.a-menu-keyword-rules::before { background: #636366; }
.a-menu-notifications::before { background: #FFCC00; }
.a-menu-settings::before    { background: #8E8E93; }
.a-menu-security::before    { background: #30B0C7; }

/* ── Баннер предупреждения о подписке ────────────────────────────────────── */
.sub-warning {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(220, 38, 38, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: .95rem;
  font-weight: 500;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  max-width: calc(100vw - 32px);
  width: max-content;
  animation: warn-in .3s ease;
}
.sub-warning.warn-yellow {
  background: rgba(202, 138, 4, 0.93);
}
@keyframes warn-in {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.sub-warning-text {
  flex: 1;
  line-height: 1.4;
}
.sub-warning-pay {
  flex-shrink: 0;
  padding: 7px 16px;
  background: #fff;
  color: #dc2626;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  white-space: nowrap;
}
.sub-warning.warn-yellow .sub-warning-pay {
  color: #92400e;
}
.sub-warning-pay:hover { opacity: .88; }
.sub-warning-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,.75);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}
.sub-warning-close:hover { color: #fff; }

/* ── Auth screen (replaces .hero) ── */

/* Внутри auth-card убираем grid, оставляем одну колонку */
.auth-card .panel-grid.two {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Скрываем блок "Требования безопасности" на auth screen */
.auth-card .panel-grid.two > div.card {
  display: none;
}

/* Карточка формы входа без дублирующей тени */
.auth-card .panel-grid.two > form.card {
  box-shadow: none;
  border-radius: 0;
  margin-bottom: 0;
  padding: 0;
}

.auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
  background: #F5F7FA;
}

.auth-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.auth-logo-mark {
  /* SVG логотип */
}

.auth-logo-text {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.9rem;
  letter-spacing: 2px;
  color: #0D1B2A;
}

.auth-subtitle {
  font-size: 0.93rem;
  color: #6B7280;
  font-weight: 400;
  margin: 0 0 28px;
  text-align: center;
}

.auth-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(13, 27, 42, 0.09);
  padding: 24px 20px;
  width: 100%;
  max-width: 400px;
}

/* ── Photo search drop zone ── */
.photo-drop-zone {
  border: 2px dashed #CBD5E0;
  border-radius: 12px;
  background: #F5F7FA;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 14px;
  text-align: center;
}

.photo-drop-zone:hover,
.photo-drop-zone.drag-over {
  border-color: #0D1B2A;
  background: #eef1f5;
}

.photo-drop-zone input[type="file"] {
  display: none;
}

.photo-drop-icon {
  color: #6B7280;
  flex-shrink: 0;
}

.photo-drop-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0D1B2A;
}

.photo-drop-hint {
  font-size: 0.85rem;
  color: #6B7280;
  margin-top: -4px;
}

.photo-drop-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* ── Search tab form ── */
.buyer-search-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.search-field-row input {
  width: 100%;
}
.search-gender-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.gender-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #CBD5E0;
  background: #fff;
  color: #374151;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.gender-btn.active {
  background: #0D1B2A;
  border-color: #0D1B2A;
  color: #fff;
}
.search-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.search-row-2col label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}
.search-row-2col input,
.search-row-2col select {
  width: 100%;
}
.search-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.search-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 4px 0 16px;
}
.search-result-card {
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #E5E7EB;
  cursor: pointer;
  display: block;
  text-align: left;
  padding: 0;
  width: 100%;
}
.search-result-card img,
.search-result-no-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  background: #F0F2F5;
}
.search-result-info {
  padding: 8px;
}
.search-result-title {
  font-size: 0.82rem;
  color: #0D1B2A;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-result-price {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0D1B2A;
  margin-top: 4px;
}

/* ─── Уведомления ─────────────────────────────────────────────────────── */
.app-bell-btn {
  position: relative;
  background: transparent; border: none; cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}
.app-bell-btn:hover { background: rgba(255,255,255,.08); }
.app-bell-ico { font-size: 1rem; line-height: 1; }
.app-bell-badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e53935; color: #fff;
  font-size: .7rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.hidden { display: none !important; }

.notif-topic-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 12px;
}
.notif-topic-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #f5f5f5;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  color: #374151;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  text-align: left;
  transition: background .15s, border-color .15s, color .15s;
}
.notif-topic-tab:hover { background: #eceff1; }
.notif-topic-tab.active {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}
.notif-topic-tab-label { flex: 1 1 auto; }
.notif-topic-tab-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.notif-list { display: flex; flex-direction: column; gap: .5rem; }
.notif-mark-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #fff;
  color: #0D1B2A;
  border: 1px solid #E2E6EA;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 24px;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.notif-mark-all-btn:hover { background: #F5F7FA; }
.notif-mark-all-btn:active { background: #eef1f5; }
.notif-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: .75rem 1rem;
  background: #fff;
  cursor: pointer;
}
.notif-item.unread { border-left: 3px solid #e53935; background: #fff7f6; }
.notif-item.broadcast { cursor: default; }
.notif-item-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: .75rem;
  margin-bottom: .25rem;
}
.notif-item-title { font-weight: 700; }
.notif-item-date { font-size: .8rem; color: #6b7280; white-space: nowrap; }
.notif-item-body { font-size: .92rem; color: #333; white-space: pre-wrap; }
.notif-item-meta { margin-top: .35rem; font-size: .8rem; color: #6b7280; }
.notif-item-actions { margin-top: .5rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.notif-product-link {
  cursor: pointer;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  padding: .35rem .75rem;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
}
.notif-product-link:hover { background: #1d4ed8; border-color: #1d4ed8; }
.notif-broadcast-from, .notif-broadcast-from-admin {
  cursor: pointer;
  border: 1px solid #2563eb;
  background: #fff;
  color: #2563eb;
  padding: .35rem .75rem;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
}
.notif-broadcast-from:hover, .notif-broadcast-from-admin:hover { background: #eff6ff; }

.notif-product-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .5rem;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  cursor: pointer;
  text-align: left;
}
.notif-product-row:hover { background: #f8fafc; }
.notif-product-row:last-child { border-bottom: none; }
.notif-product-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  background: #e5e7eb;
  flex-shrink: 0;
  display: inline-block;
}
.notif-product-thumb.placeholder { background: #e5e7eb; }
.notif-product-meta { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.notif-product-title { font-weight: 600; font-size: .9rem; }
.notif-product-sub { font-size: .8rem; color: #6b7280; }
.notif-product-chosen {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem;
  margin-top: .5rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
}
.notif-product-chosen.hidden { display: none; }
.notif-product-clear {
  margin-left: auto;
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  color: #6b7280;
  padding: 0 .3rem;
}
.notif-product-clear:hover { color: #dc2626; }

.notif-search-list {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-top: .5rem;
  max-height: 240px;
  overflow: auto;
}
.notif-search-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .5rem;
  padding: .5rem .75rem;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
}
.notif-search-row:last-child { border-bottom: none; }
.notif-search-row:hover { background: #f9fafb; }
.notif-search-sub { color: #6b7280; font-size: .85rem; }

.notif-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.notif-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #eef2ff; color: #1e3a8a;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .85rem;
}
.notif-chip button {
  border: none; background: transparent; cursor: pointer;
  font-size: 1rem; line-height: 1; color: inherit;
}

.notif-rec-list {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  max-height: 220px;
  overflow: auto;
}
.notif-rec-row {
  display: flex; justify-content: space-between; gap: .5rem;
  padding: .4rem .75rem;
  border-bottom: 1px solid #f3f4f6;
}
.notif-rec-row:last-child { border-bottom: none; }
.notif-rec-name { font-weight: 600; }
.notif-rec-sub { font-size: .82rem; color: #6b7280; }
.notif-rec-read { font-size: .82rem; color: #15803d; white-space: nowrap; }
.notif-rec-read.muted { color: #6b7280; }
.notif-empty-small { padding: .5rem .75rem; color: #6b7280; font-size: .88rem; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  z-index: 1000;
  overflow-y: auto;
  backdrop-filter: blur(3px);
}
.modal-overlay.hidden { display: none !important; }
.modal-overlay .modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  width: 100%;
  max-width: 560px;
  padding: 1.25rem 1.5rem;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}
.modal-overlay .modal label {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: .9rem;
  color: #374151;
}
.modal-overlay .modal label input[type="text"],
.modal-overlay .modal label input[type="number"],
.modal-overlay .modal label textarea {
  width: 100%;
  box-sizing: border-box;
}
.modal-overlay .modal .row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

@media (max-width: 640px) {
  .modal-overlay { padding: 1rem .5rem; }
  .modal-overlay .modal { padding: 1rem; }
}
