@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  color-scheme: dark;
  --background: #0c0c0c;
  --sidebar-bg: #101010;
  --foreground: #f5f5f7;
  --card: #161616;
  --border: rgba(255, 255, 255, 0.09);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* Themed checkboxes (panel-wide) */
.ui-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.ui-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-content: center;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.ui-checkbox input[type="checkbox"]:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.09);
}
.ui-checkbox input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14);
}
.ui-checkbox input[type="checkbox"]:checked {
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.4);
}
.ui-checkbox input[type="checkbox"]:checked::after {
  content: '';
  width: 8px;
  height: 5px;
  border-left: 2px solid rgba(255, 255, 255, 0.94);
  border-bottom: 2px solid rgba(255, 255, 255, 0.94);
  transform: rotate(-45deg) translate(1px, -1px);
}
.ui-checkbox input[type="checkbox"]:indeterminate {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
}
.ui-checkbox input[type="checkbox"]:indeterminate::after {
  content: '';
  width: 8px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  transform: none;
}
.ui-checkbox--compact input[type="checkbox"] {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}
.ui-checkbox--compact input[type="checkbox"]:checked::after {
  width: 7px;
  height: 4px;
}

html, body {
  height: 100%;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

.font-display { font-family: var(--font-display); }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes msg-in-me {
  from { opacity: 0; transform: translateX(10px) scale(0.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes msg-in-other {
  from { opacity: 0; transform: translateX(-10px) scale(0.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.animate-fade-up { animation: fade-up 0.3s cubic-bezier(0.4, 0, 0.2, 1) both; }
.animate-fade-in { animation: fade-in 0.2s ease both; }
.animate-scale-in { animation: scale-in 0.28s cubic-bezier(0.4, 0, 0.2, 1) both; }
.animate-slide-left { animation: slide-in-left 0.25s cubic-bezier(0.4, 0, 0.2, 1) both; }
.animate-slide-right { animation: slide-in-right 0.25s cubic-bezier(0.4, 0, 0.2, 1) both; }
.msg-me { animation: msg-in-me 0.22s cubic-bezier(0.4, 0, 0.2, 1) both; }
.msg-other { animation: msg-in-other 0.22s cubic-bezier(0.4, 0, 0.2, 1) both; }

.page-view { display: none; }
.page-view.active { display: flex; flex-direction: column; height: 100%; }

/* Unified page header */
.page-header {
  --page-header-pt: 24px;
  --page-header-px: 32px;
  --page-header-pb: 20px;
  --page-header-gap-collapse: 16px;
  --page-header-gap-subtitle: 6px;
  padding: var(--page-header-pt) var(--page-header-px) var(--page-header-pb);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: #0d0d0d;
  flex-shrink: 0;
}
.page-header-sidebar-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.page-header-sidebar-btn:hover {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}
.page-header-sidebar-icon {
  width: 15px;
  height: 15px;
}
.page-header-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: var(--page-header-gap-collapse);
}
.page-header-text {
  min-width: 0;
}
.page-header-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.page-header-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.94);
}
.page-header-subtitle {
  margin: var(--page-header-gap-subtitle) 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.35);
}
.page-header-badge {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  min-width: 20px;
  text-align: center;
}
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 2px;
}
.page-header-extra {
  margin-top: 16px;
}
.page-header-btn-primary,
.page-header-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.page-header-btn-primary {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.page-header-btn-primary:hover {
  background: rgba(255, 255, 255, 0.18);
}
.page-header-btn-primary:active,
.page-header-btn-secondary:active {
  transform: scale(0.97);
}
.page-header-btn-secondary {
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 500;
}
.page-header-btn-secondary:hover {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
}

.page-content-pad {
  padding-left: var(--page-header-px, 32px);
  padding-right: var(--page-header-px, 32px);
}

.sidebar-nav-item {
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.sidebar-nav-item:hover { background: rgba(255, 255, 255, 0.06); }
.sidebar-nav-item.active { background: rgba(255, 255, 255, 0.1); }

#sidebar { transition: width 0.3s ease; width: 200px; background: var(--sidebar-bg); }
.app-main { background: var(--background); }
#sidebar.collapsed { width: 60px; }
#sidebar.collapsed .sidebar-nav-item .sidebar-label { display: none; }
#sidebar.collapsed .sidebar-nav-item { justify-content: center; padding-left: 0; padding-right: 0; }

.chat-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  transition: all 0.15s ease;
}
.chat-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.13);
}
.chat-card.active {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.chat-card.unread {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.chat-card.unread:hover { background: rgba(255, 255, 255, 0.11); }
.chat-card.chat-card--tagged {
  border-color: var(--chat-tag-color);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--chat-tag-color) 42%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--chat-tag-color) 14%, transparent);
}
.chat-card.chat-card--tagged:hover {
  border-color: var(--chat-tag-color);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--chat-tag-color) 55%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--chat-tag-color) 18%, transparent);
}
.chat-card.chat-card--tagged.active {
  border-color: var(--chat-tag-color);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--chat-tag-color) 65%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--chat-tag-color) 22%, transparent);
}
.chat-card.chat-card--pinned {
  border-color: rgba(255, 255, 255, 0.14);
}
.chat-pin-btn.active {
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}
.chat-listing-link:not(.hidden):hover {
  color: rgba(255, 255, 255, 0.72);
}
.chat-account-select {
  width: 100%;
}

.tab-pill {
  flex: 1;
  padding: 6px 0;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.15s;
}
.tab-pill.active {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.tab-pill:hover:not(.active) { color: rgba(255, 255, 255, 0.45); }

.ui-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.75);
  transition: border-color 0.15s;
}
.ui-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.15);
}
.ui-input::placeholder { color: rgba(255, 255, 255, 0.2); }

select.ui-input,
select.ui-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 32px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.35)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
select.ui-input:focus,
select.ui-select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.15);
}
select.ui-input option,
select.ui-select option {
  background: #141414;
  color: rgba(255, 255, 255, 0.88);
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.35);
}
.ui-btn:hover {
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
}

.modal-overlay {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fade-in 0.18s ease;
}
.modal-panel { animation: scale-in 0.28s cubic-bezier(0.4, 0, 0.2, 1) both; }

.account-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  transition: background 0.2s;
  overflow: hidden;
}
.account-card:hover { background: rgba(255, 255, 255, 0.065); }

.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: 8px;
}

.device-option.active {
  border-color: rgba(255, 255, 255, 0.25) !important;
  background: rgba(255, 255, 255, 0.09) !important;
  color: rgba(255, 255, 255, 0.8) !important;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 520px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 10px 12px;
}
.profile-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 4px;
}
.profile-value {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  word-break: break-word;
}

.messages-area {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
}
.messages-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.bubble-me {
  border-radius: 1rem;
  border-bottom-right-radius: 0.125rem;
  background-color: rgb(255 255 255 / 0.07);
}
.bubble-other {
  border-radius: 1rem;
  border-bottom-left-radius: 0.125rem;
  background-color: rgb(255 255 255 / 0.1);
}

.msg-translate-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.38);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}
.msg-translate-btn:hover:not(:disabled) {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.09);
}
.msg-translate-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.msg-translation {
  color: rgba(255, 255, 255, 0.42);
}

.compose-translate-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.38);
}
.compose-translate-btn:hover:not(:disabled) {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.14);
}
.compose-translate-btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

.compose-paste-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.45);
}
.compose-paste-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.14);
}

.paste-menu-empty {
  margin: 6px 10px 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.32);
}
.paste-menu-item-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.paste-card-preview {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.38);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.parser-filters {
  scrollbar-gutter: stable;
}

.parser-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 6px;
}
.parser-label.mb-0 { margin-bottom: 0; }

.parser-collapse-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  transition: all 0.15s ease;
}
.parser-collapse-trigger:hover,
.parser-collapse-trigger.open {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}
.parser-collapse-value {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  max-width: 120px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.parser-collapse-icon {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.parser-collapse-trigger.open .parser-collapse-icon {
  transform: rotate(180deg);
}
.parser-collapse-panel {
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  max-height: 200px;
  overflow-y: auto;
}

.parser-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.parser-chip {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.parser-chip:hover {
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.65);
}
.parser-chip.active {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

.parser-select {
  position: relative;
}
.parser-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.parser-select-trigger:hover,
.parser-select.open .parser-select-trigger {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.07);
}
.parser-select-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #161616;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: none;
  max-height: 220px;
  overflow-y: auto;
}
.parser-select.open .parser-select-menu {
  display: block;
  animation: scale-in 0.16s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.parser-select-option {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.parser-select-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
}
.parser-select-option.active {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
}

.parser-range-block,
.parser-toggle-block {
  padding: 10px 0 2px;
}
.parser-range-head,
.parser-toggle-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.parser-range-summary {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
}
.parser-dual-range {
  position: relative;
  height: 28px;
  margin: 4px 0 2px;
}
.parser-dual-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.parser-dual-fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
}
.parser-dual-thumb {
  position: absolute;
  left: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  pointer-events: none;
  outline: none;
  top: 0;
}
.parser-dual-thumb::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border: none;
}
.parser-dual-thumb::-moz-range-track {
  height: 4px;
  background: transparent;
  border: none;
}
.parser-dual-thumb::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #161616;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  cursor: grab;
  pointer-events: all;
}
.parser-dual-thumb::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #161616;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  cursor: grab;
  pointer-events: all;
}
.parser-dual-min { z-index: 3; }
.parser-dual-max { z-index: 4; }
.parser-dual-range.is-min-active .parser-dual-min { z-index: 5; }
.parser-dual-range.is-max-active .parser-dual-max { z-index: 5; }
.parser-range-bounds {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  font-variant-numeric: tabular-nums;
}

.parser-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  user-select: none;
}
.parser-check-inline input {
  accent-color: rgba(255, 255, 255, 0.75);
}

.parser-switch {
  position: relative;
  display: inline-flex;
  width: 34px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}
.parser-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.parser-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s, border-color 0.2s;
}
.parser-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition: transform 0.2s, background 0.2s;
}
.parser-switch input:checked + .parser-switch-track {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.22);
}
.parser-switch input:checked + .parser-switch-track::after {
  transform: translateX(14px);
  background: rgba(255, 255, 255, 0.92);
}

.parser-toggle-panel {
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.parser-custom-date input[type="date"] {
  color-scheme: dark;
}
.parser-custom-date input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  opacity: 0.5;
  cursor: pointer;
}

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

.parser-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
}
.parser-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.065);
}

.parser-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.parser-card-media--empty .parser-card-img { display: none; }
.parser-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.parser-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.15);
}

.parser-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.parser-card-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.parser-card-price {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  font-family: var(--font-display);
}
.parser-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
}
.parser-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.parser-card-date {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  margin: 0;
}
.parser-card-email {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  margin: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.parser-card-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}
.parser-btn-primary,
.parser-btn-ghost {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  border: none;
}
.parser-btn-primary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
}
.parser-btn-primary:hover {
  background: rgba(255, 255, 255, 0.16);
}
.parser-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}
.parser-btn-ghost:hover {
  color: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Tags page */
.tags-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}
.tags-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 14px;
}
.tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  max-width: 960px;
}
.tag-card {
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.tag-card-accent {
  height: 3px;
  background: var(--tag-color);
  opacity: 0.85;
}
.tag-card-body { padding: 14px; }
.tag-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.tag-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tag-card-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.tag-card-meta {
  margin: 0 0 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.32);
}
.tag-card-actions {
  display: flex;
  gap: 6px;
}
.tag-card-btn {
  flex: 1;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.tag-card-btn:hover {
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.14);
}
.tag-card-btn--danger:hover {
  color: rgba(248, 113, 113, 0.9);
  border-color: rgba(248, 113, 113, 0.25);
}

.tag-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--swatch-color);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.tag-color-swatch:hover { transform: scale(1.08); }
.tag-color-swatch.active {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

/* Chat tag picker */
.chat-tag-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 168px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #161616;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 50;
}
.chat-tag-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.chat-tag-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}
.chat-tag-menu-item.active {
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.95);
}
.chat-tag-menu-item--muted {
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
}
.chat-tag-menu-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chat-tag-menu-divider {
  height: 1px;
  margin: 4px 6px;
  background: rgba(255, 255, 255, 0.07);
}
.chat-tag-menu.compose-paste-menu {
  top: auto;
  bottom: calc(100% + 6px);
  right: 0;
  max-height: 240px;
  overflow-y: auto;
}
.chat-tag-menu.listing-paste-menu {
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  max-height: 220px;
  overflow-y: auto;
}
#chat-tag-btn.chat-tag-btn--active {
  border-color: color-mix(in srgb, var(--chat-tag-color) 50%, transparent);
  color: rgba(255, 255, 255, 0.78);
}

/* Accounts table */
.accounts-table-wrap {
  background: #0d0d0d;
}
.accounts-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 20px;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
}

.accounts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.accounts-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #141414;
}
.accounts-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  white-space: nowrap;
}
.accounts-th-actions {
  text-align: right;
  width: 96px;
}
.accounts-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.12s ease;
}
.accounts-row:hover {
  background: rgba(255, 255, 255, 0.03);
}
.accounts-td {
  padding: 9px 14px;
  color: rgba(255, 255, 255, 0.72);
  vertical-align: middle;
  white-space: nowrap;
}
.accounts-td--muted {
  color: rgba(255, 255, 255, 0.42);
  font-variant-numeric: tabular-nums;
}
.accounts-td--name {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.accounts-td--num {
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.accounts-td--actions {
  text-align: right;
}

.accounts-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.accounts-badge--self {
  color: #86efac;
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.2);
}
.accounts-badge--mix {
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.2);
}
.accounts-badge--muted {
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}
.accounts-badge--active {
  color: #86efac;
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.18);
}
.accounts-badge--blocked {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.22);
}

.accounts-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}
.accounts-action-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}
.accounts-action-btn:hover {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
}
.accounts-action-btn--danger:hover {
  color: rgba(248, 113, 113, 0.9);
  background: rgba(248, 113, 113, 0.08);
}

/* Cookie drop zone */
.cookie-drop-zone {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}
.cookie-drop-zone.is-dragover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}
.cookie-drop-zone.has-file {
  border-style: solid;
  border-color: rgba(74, 222, 128, 0.25);
}
.cookie-drop-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 12px 10px;
  text-align: center;
}
.cookie-drop-link {
  border: none;
  background: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}
.cookie-drop-link:hover { color: rgba(255, 255, 255, 0.85); }
.cookie-drop-textarea {
  width: 100%;
  border: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 0 !important;
  min-height: 110px;
}

/* Listings page */
.listings-card .parser-card-media {
  position: relative;
}
.listings-card-account {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
}
.listings-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.listings-status {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.listings-status--active {
  color: rgba(74, 222, 128, 0.9);
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.16);
}
.listings-status--reserved {
  color: rgba(251, 191, 36, 0.95);
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.16);
}
.listings-status--muted {
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
.listings-category {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
}
.listings-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 6px;
}
.listings-stat-views-split {
  font-variant-numeric: tabular-nums;
}
.listings-stat-views-plus {
  color: rgba(255, 255, 255, 0.28);
  margin: 0 1px;
}
.listings-stat-views-hour {
  color: rgba(74, 222, 128, 0.85);
  font-weight: 600;
}
.listings-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.listings-card.selected {
  border-color: rgba(147, 197, 253, 0.35);
  background: rgba(147, 197, 253, 0.04);
}
.listings-card-check {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  cursor: pointer;
}
.listings-card-check.ui-checkbox {
  gap: 0;
}
.listings-card-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  flex-wrap: nowrap;
}
.listings-btn {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 8px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}
.listings-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.listings-btn--primary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
}
.listings-btn--primary:hover {
  background: rgba(255, 255, 255, 0.16);
}
.listings-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}
.listings-btn--ghost:hover {
  color: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.14);
}
.listings-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.listings-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  user-select: none;
}

.listings-selected-info {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
}
.listings-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.listings-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: all 0.15s;
}
.listings-toolbar-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}
.listings-toolbar-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.listings-toolbar-btn--danger {
  border-color: rgba(248, 113, 113, 0.2);
  color: rgba(248, 113, 113, 0.85);
}
.listings-toolbar-btn--danger:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.3);
}

/* Publish page */
.publish-layout {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.publish-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.publish-section-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}
.publish-field { display: flex; flex-direction: column; gap: 6px; }
.publish-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
}
.publish-field-note {
  color: rgba(147, 197, 253, 0.45);
  font-weight: 400;
}
.publish-required {
  color: rgba(248, 113, 113, 0.75);
  font-weight: 600;
}
.publish-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.22);
}
.publish-row { display: flex; gap: 12px; flex-wrap: wrap; }
.publish-row--aligned {
  align-items: flex-end;
}
.publish-row--aligned .publish-field {
  min-width: 0;
}
.publish-field-head {
  min-height: 34px;
  display: flex;
  align-items: flex-end;
}
.publish-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.publish-inline-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
}
.publish-inline-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.publish-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  user-select: none;
}

.publish-category-badge {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  min-height: 16px;
}
.publish-category-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}
.publish-category-item {
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.publish-category-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}
.publish-category-item.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}
.publish-category-item-title {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.35;
}
.publish-category-item-meta {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.28);
  margin-top: 4px;
  line-height: 1.35;
}
.publish-nl {
  display: block;
  color: rgba(255, 255, 255, 0.82);
}
.publish-ru {
  display: block;
  font-size: 10px;
  color: rgba(147, 197, 253, 0.75);
  margin-top: 2px;
  font-weight: 400;
}
.publish-label-bilingual {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.publish-label-bilingual .publish-nl {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.3;
}
.publish-label-bilingual .publish-ru {
  display: block;
  font-size: 10px;
  margin-top: 0;
  margin-left: 0;
  line-height: 1.3;
}
.publish-attrs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.publish-attr-select {
  max-width: 100%;
}
.publish-category-badge {
  line-height: 1.4;
}
.publish-translate-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.publish-translate-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
}
.publish-contact-line {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
.publish-dropzone {
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.publish-dropzone.dragover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
}
.publish-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.publish-image-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: grab;
  transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s, transform 0.15s;
}
.publish-image-tile:active {
  cursor: grabbing;
}
.publish-image-tile.is-dragging {
  opacity: 0.45;
  transform: scale(0.96);
}
.publish-image-tile.is-drag-over {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}
.publish-image-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}
.publish-image-order {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.95);
  font-size: 10px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}
.publish-image-remove {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}
.publish-image-add {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.15s;
}
.publish-image-add:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
}
.settings-section {
  max-width: 560px;
}
.settings-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.settings-section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}
.settings-section-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 4px;
}
.settings-section-desc {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.32);
  margin: 0;
}
.settings-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.settings-row {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}
.settings-row--stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settings-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
}
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.settings-sound-select-wrap {
  width: 100%;
  max-width: 280px;
}
.settings-sound-select {
  width: 100%;
}
.settings-sound-select-trigger {
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 12px;
}
.settings-sound-select-trigger-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.settings-sound-select-trigger-icon-wrap,
.settings-sound-select-option-icon-wrap {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}
.settings-sound-select-value {
  font-weight: 500;
}
.settings-sound-select-chevron {
  color: rgba(255, 255, 255, 0.28);
  transition: transform 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}
.settings-sound-select.open .settings-sound-select-chevron {
  transform: rotate(180deg);
  color: rgba(255, 255, 255, 0.5);
}
.settings-sound-select-menu {
  padding: 5px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 18, 18, 0.98);
  backdrop-filter: blur(14px);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.settings-sound-select-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: left;
}
.settings-sound-select-option-label {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}
.settings-sound-select-option-check {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.85);
  color: rgba(255, 255, 255, 0.9);
  transition: opacity 0.12s, transform 0.12s, background 0.12s;
  flex-shrink: 0;
}
.settings-sound-select-option.active {
  background: rgba(255, 255, 255, 0.1);
}
.settings-sound-select-option.active .settings-sound-select-option-icon-wrap {
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.88);
}
.settings-sound-select-option.active .settings-sound-select-option-check {
  opacity: 1;
  transform: scale(1);
  background: rgba(255, 255, 255, 0.14);
}
.settings-sound-select.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.settings-sound-select.is-disabled .settings-sound-select-trigger {
  cursor: not-allowed;
}

.profile-layout {
  max-width: 900px;
}
.profile-loading {
  padding: 32px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.28);
  text-align: center;
}
.profile-loading--error {
  color: rgba(252, 165, 165, 0.85);
}
.profile-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}
.profile-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 26px 28px 28px;
}
.profile-pane--account {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.profile-pane-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
  margin-bottom: 16px;
}
.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}
.profile-name {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.25;
}
.profile-handle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 3px;
}
.profile-rows {
  display: flex;
  flex-direction: column;
}
.profile-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.profile-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.profile-row-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
  flex-shrink: 0;
}
.profile-row-value {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  text-align: right;
  line-height: 1.4;
  word-break: break-word;
}
.profile-sub-status {
  padding-bottom: 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.profile-badge--active {
  background: rgba(74, 222, 128, 0.14);
  color: rgba(134, 239, 172, 0.95);
  border: 1px solid rgba(74, 222, 128, 0.22);
}
.profile-badge--inactive {
  background: rgba(248, 113, 113, 0.12);
  color: rgba(252, 165, 165, 0.95);
  border: 1px solid rgba(248, 113, 113, 0.2);
}
.profile-badge--dev {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.profile-sub-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.profile-sub-note {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.45);
  margin: 4px 0 0;
}
.profile-sub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  align-self: flex-start;
}
.profile-sub-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}
@media (max-width: 760px) {
  .profile-shell {
    grid-template-columns: 1fr;
  }
  .profile-pane--account {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .profile-pane {
    padding: 22px 20px 24px;
  }
}
@media (max-width: 480px) {
  .profile-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .profile-row-value {
    text-align: left;
  }
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #080808;
  overflow: hidden;
}
.auth-gate.hidden {
  display: none;
}
.auth-gate-mesh {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 55% 45% at 15% 20%, rgba(59, 130, 246, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 75%, rgba(168, 85, 247, 0.1), transparent 55%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(255, 255, 255, 0.04), transparent 50%);
  pointer-events: none;
}
.auth-gate-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(14, 14, 16, 0.82);
  backdrop-filter: blur(20px);
  padding: 36px 32px 30px;
  text-align: center;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.auth-gate-card--login {
  max-width: 400px;
}
.auth-gate-card--wide {
  max-width: 520px;
}
.auth-brand {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 6px;
}
.auth-brand-main {
  color: rgba(255, 255, 255, 0.96);
}
.auth-brand-dot {
  color: rgba(255, 255, 255, 0.38);
  font-weight: 600;
}
.auth-tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.32);
  margin: 0 0 28px;
  letter-spacing: 0.02em;
}
.telegram-login-wrap {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.telegram-login-wrap iframe {
  border-radius: 14px !important;
}
.auth-fallback-btn {
  margin-top: 18px;
  padding: 0;
  border: none;
  background: none;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.auth-fallback-btn:hover {
  color: rgba(255, 255, 255, 0.55);
}
.auth-fallback-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.auth-gate-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
}
.auth-gate-title {
  font-size: 20px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 8px;
}
.auth-gate-desc {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.38);
  margin: 0 0 18px;
}
.auth-gate-status {
  min-height: 18px;
  margin-top: 16px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
}
.auth-telegram-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.28), rgba(37, 99, 235, 0.18));
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
}
.auth-telegram-btn:hover {
  border-color: rgba(96, 165, 250, 0.55);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.36), rgba(37, 99, 235, 0.24));
}
.auth-telegram-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.auth-telegram-btn--secondary {
  margin-top: 12px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}
.billing-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.billing-plan-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.billing-plan-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}
.billing-plan-label {
  font-size: 12px;
  font-weight: 600;
}
.billing-plan-price {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}
@media (max-width: 560px) {
  .billing-plans {
    grid-template-columns: 1fr;
  }
}

.publish-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.publish-result-link {
  font-size: 12px;
  color: rgba(96, 165, 250, 0.9);
  text-align: center;
}
.publish-result-id {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  font-family: ui-monospace, monospace;
}
.publish-status {
  font-size: 12px;
  min-height: 18px;
  padding: 0 2px;
}

.hidden { display: none !important; }
.flex { display: flex; }