/* kolofon Custom Light Theme Stylesheet */

html, body {
  height: 100%;
  overflow: hidden;
}

html {
  overflow-x: hidden;
  font-size: 15px;
}

/* VARIABLES & THEME TOKENS */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f3f4f6;
  --text-main: #111827;
  --text-muted: #4b5563;
  
  /* Brand Accents */
  --accent-gold: #f5a623;
  --accent-teal: #53a027;
  --accent-teal-rgb: 83, 160, 39;
  --accent-teal-dark: #47891f;  /* hover/active/pressed states */
  --accent-teal-light: #7ab236; /* lighter accent — legible on dark backgrounds */
  /* Green used as TEXT on a light background. --accent-teal itself is only
     3.27:1 on white, which fails AA for the nick/pill/tab labels it was used
     for. Backgrounds, borders and the logo keep --accent-teal. */
  --accent-teal-text: #437f1d;  /* 4.89:1 on white */
  --accent-red: #d90429;
  
  /* Light theme borders & shadows */
  --glass-bg: #ffffff;
  --glass-border: #dee2e6;
  --glass-glow: 0 2px 10px rgba(0, 0, 0, 0.05);
  
  --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main:'Source Sans Pro', sans-serif;
}

body.dark-mode {
  --bg-primary: #212121;
  --bg-secondary: #2a2a2a;
  --bg-tertiary: #333333;
  --text-main: #c5c5c5;
  --text-muted: #9c9c9c;
  --glass-border: #3a3a3a;
  --glass-bg: #2a2a2a;
  /* On dark, the same labels need a LIGHTER green, not a darker one —
     --accent-teal is 4.39:1 on #2a2a2a. Reuses the existing light accent. */
  --accent-teal-text: #7ab236; /* 5.64:1 on #2a2a2a */
}

body.dark-mode .entries-feed,
body.dark-mode .main-content,
body.dark-mode .topic-header,
body.dark-mode .app-container,
body.dark-mode .sidebar-header,
body.dark-mode .sidebar {
  background: #2a2a2a;
}


/* RESET & BASE STYLES */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  font-size: 14px;
  background-color: var(--bg-primary);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

/* CUSTOM SCROLLBARS */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-teal);
}

/* UTILITY CLASSES */
.hidden {
  display: none !important;
}

/* BUTTONS */
.btn {
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--accent-red);
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 4, 41, 0.2);
  background: #bd0320;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: #ffffff;
}

.btn-text {
  background: transparent;
  color: var(--text-muted);
}
.btn-text:hover {
  color: var(--text-main);
}

.badge {
  background: var(--accent-red);
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: bold;
}

/* TOP APP HEADER */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 65px;
  display: grid;
  grid-template-columns: 260px 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  padding-left: 2rem;
  width: 100%;
  background: var(--bg-secondary);
  z-index: 100;
}


.header-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding-left: 105px;
}

.header-left .logo {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  cursor: pointer;
}

.logo-txt {
  font-size: 30px !important;
  font-weight: 800 !important;
  color: #000000 !important;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif !important;
  letter-spacing: -1px !important;
  text-transform: lowercase !important;
  line-height: 1 !important;
}

body.dark-mode .logo-txt {
  color: #c5c5c5 !important;
}


body.dark-mode .profile-username-new {
  color: #c5c5c5 !important;
}

body.dark-mode .premium-settings-wrapper {
  --settings-bg: #2a2a2a;
  background-color: #2a2a2a !important;
}

body.dark-mode .premium-settings-wrapper,
body.dark-mode .premium-settings-wrapper * {
  color: #c5c5c5 !important;
}

body.dark-mode .header-notifications-btn,
body.dark-mode .header-messages-btn {
  color: #c5c5c5 !important;
}

body.dark-mode .header-notifications-btn svg,
body.dark-mode .header-messages-btn svg {
  stroke: #c5c5c5 !important;
}
 
.nav-tag {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--text-main);
  padding: 0.4rem 0;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.nav-tag:hover {
  color: var(--text-main);
}
.nav-tag.active {
  color: var(--accent-teal);
  border-bottom: 2px solid var(--accent-teal);
  background: transparent;
}

/* SUB HEADER */
.sub-header {
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  height: 40px;
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  width: 100%;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
  overflow-x: auto;
  z-index: 95;
}

.sub-header-center {
  display: flex;
  align-items: center;
  /* `safe` falls back to flex-start when the row overflows, so the leading
     item is never clipped out of reach — plain `center` clips both ends. */
  justify-content: safe center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.sub-header-center::-webkit-scrollbar {
  display: none;
}

.sub-header-center .nav-tag {
  padding: 0 10px;
  font-size: 14px;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-main);
}
.user-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}
.user-info:hover {
  background: var(--bg-tertiary);
}
.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent-teal);
  background-color: var(--bg-tertiary);
}
.dropdown-arrow {
  font-size: 0.6rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  margin-left: 0.1rem;
}
.user-info.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* DROPDOWN MENU */
.dropdown-menu {
  position: absolute;
  top: 105%;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  min-width: 150px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 0.4rem 0;
  margin-top: 0.4rem;
}
.dropdown-menu.hidden {
  display: none;
}
.dropdown-item {
  padding: 0.5rem 1rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  font-family: var(--font-main);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
}
.dropdown-item:hover {
  background: var(--bg-tertiary);
  color: var(--accent-teal);
}
.dropdown-item.mobile-only-item {
  display: none;
}
.dropdown-notif-badge {
  background: var(--accent-teal);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dropdown-notif-badge.hidden {
  display: none;
}
.dropdown-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 0.3rem 0;
}

/* APP MAIN CONTAINER */
.app-container {
  position: fixed;
  top: 105px;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  overflow: hidden;
  padding-left: 0;
}

/* LEFT SIDEBAR: TOPICS LIST */
.sidebar {
  width: 260px;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  position: relative;
  top: auto;
  height: 100%;
  overflow-y: auto;
  border-right: none;
  padding-left: 0rem;
  margin-left: 0;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .sidebar {
    margin-left: 120px;
  }
}

.sidebar-header {
  padding: 0.5rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: var(--bg-primary);
}


#sidebar-load-more:hover {
  color: var(--text-main);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  padding:0.4rem 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--text-main);
}
.tab-btn.active {
  color: var(--accent-teal-text);
  border-bottom: 2px solid var(--accent-teal);
  border-radius: 0;
  box-shadow: none;
  margin-bottom: -2px;
}

.search-box {
  position: relative;
  width: 460px;
  margin: 0 auto;
}
.search-box input {
  width: 100%;
  height: 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0 44px 0 1rem;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-smooth);
}
.search-box input:focus {
  background: var(--bg-secondary);
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(var(--accent-teal-rgb), 0.13);
}
.search-icon {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-teal);
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.search-icon:hover {
  background: var(--accent-teal-dark);
}

.topics-list-container {
  flex: 1;
  padding: 0.5rem 0;
}

.topic-item {
  padding: 0.8rem 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topic-item:hover {
  background: var(--bg-tertiary);
}
.topic-item.active {
  background: rgba(var(--accent-teal-rgb), 0.08);
  border-left-color: var(--accent-teal);
  color: var(--text-main);
}
.topic-item-title {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-main);
  line-height: 1.3;
  flex: 1;
  margin-right: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.topic-item-count {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.topic-item.active .topic-item-count {
  color: var(--accent-teal) !important;
}

.sidebar-footer {
  padding: 1rem;
  background: var(--bg-primary);
}

/* CENTER CONTENT: MAIN CHAT/FEED AREA */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  height: 100%;
  overflow-y: auto;
  font-size: 14px;
  color: var(--text-main);
}

.topic-header {
  display: none; /* Hide by default */
  padding: 1.5rem 2rem 0.5rem 2rem;
  border-bottom: none;
  background: var(--bg-secondary);
  max-width: 950px;
}
.topic-header.active {
  display: block !important; /* Show when active */
}
.topic-header.active ~ .entries-feed {
  padding-top: 0;
}

/* ── Tight-gap fix: collapse ALL space between sort-tabs and first entry ── */
/* 1. Kill topic-header's own bottom padding when active                      */
.topic-header.active {
  padding-bottom: 0;
}
/* 2. topic-title-area margin-bottom collapsed                                */
.topic-header.active .topic-title-area {
  margin-bottom: 0;
}
/* 3. sort-btn has padding: 0.35rem 0 — kill bottom padding on last tab       */
.topic-header.active .sort-btn {
  padding-bottom: 0;
}
/* 5. entries-feed: force padding-top to 0 (belt + suspenders with sibling)   */
.entries-feed {
  padding-top: 0;
}
/* 6. First entry-card: no top padding; all inter-entry gaps stay untouched   */
.entries-feed .entry-card:first-child {
  padding-top: 0;
}

.topic-title-area {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

#active-topic-title {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
}

.topic-follow-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-main);
  color: var(--text-muted);
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.topic-follow-btn.following {
  color: var(--accent-teal);
  text-decoration: none;
}

.topic-follow-btn:hover {
  color: var(--text-main);
}

.category-pill {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: rgba(var(--accent-teal-rgb), 0.1);
  color: var(--accent-teal-text);
  border: 1px solid rgba(var(--accent-teal-rgb), 0.2);
  padding: 3px 8px;
  border-radius: 4px;
}

.topic-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 650px;
}

.sort-tabs {
  display: flex;
  background: transparent;
  gap: 1.2rem;
}

.sort-btn {
  background: transparent;
  border: none;
  font-family: var(--font-main);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0;
  cursor: pointer;
  transition: var(--transition-smooth);
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
.sort-btn:hover {
  color: var(--text-main);
}
.sort-btn.active {
  color: var(--accent-teal);
  border-bottom: 2px solid var(--accent-teal);
  background: transparent;
  box-shadow: none;
}

.entries-feed {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0rem;
  max-width: 950px;
  text-transform: none;
}

/* Landing Page Message */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Entry Card Style */

.entry-card {
  background: transparent;
  border: none;
  border-bottom: none;
  padding: 0 0 1.5rem 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 650px;
}
.entry-card:last-child {
  border-bottom: none;
}

.entry-text {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  /* NO white-space: pre-line here. parseEntryContent() already converts every
     user newline to <br>, so pre-line preserved nothing real — it only turned
     the indentation between the truncation template's spans into a visible
     line break, so the hidden half started on a fresh line instead of
     continuing the sentence. */
  margin: 0px 0px 5px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.entry-meta {
  display: flex;
  flex-direction: column;
  padding-top: 0.4rem;
  min-height: 96px;
}

.entry-actions {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 30px;
}

.entry-author-area {
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.author-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

.author-name {
  font-size: 14px;
  font-weight: normal;
  color: var(--accent-teal-text);
  cursor: pointer;
}
.author-name:hover {
  text-decoration: underline;
}

.entry-back-link {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s ease;
}
.entry-back-link:hover {
  color: var(--accent-teal);
  text-decoration: underline;
}
.entry-date {
  font-size: 12px;
  color: #767676; /* 4.54:1 on white */
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

body.dark-mode .entry-date {
  color: #949494; /* 4.74:1 on #2a2a2a */
}
.entry-date:hover {
  color: var(--accent-teal);
  text-decoration: underline;
}



.entry-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-tertiary, #f3f4f6);
  border-radius: 100px;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}


.entry-pill.favorited {
  color: var(--accent-teal);
}

.pill-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
  font-size: inherit;
  font-family: var(--font-main);
  padding: 0;
  line-height: 1;
}

.pill-btn.voted-up {
  color: var(--accent-teal);
}

.pill-btn.voted-down {
  color: var(--accent-red);
}

.pill-btn.favorited {
  color: var(--accent-teal);
}

.pill-sep {
  color: var(--glass-border);
  font-size: 0.75rem;
  user-select: none;
}

.entry-more-btn {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f3f4f6;
  border: 1px solid var(--glass-border);
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #374151;
  font-weight: 700;
  padding: 0;
  flex-shrink: 0;
}

.author-name-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}

.author-name-row .entry-more-btn {
  width: 20px;
  height: 20px;
}

/* ponytail: invisible 32px touch target, keeps the dot 20px without shifting layout */
.author-name-row .entry-more-btn::after {
  content: '';
  position: absolute;
  inset: -6px;
}

.entry-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: -6px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  z-index: 100;
  min-width: 0;
  width: auto;
  overflow: hidden;
}

.entry-menu-item {
  padding: 0.5rem 1rem;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  white-space: nowrap;
}

.entry-menu-item:hover {
  background: var(--bg-tertiary, var(--bg-primary));
}

.entry-menu-item-danger {
  color: var(--accent-red);
}

/* Add Entry Box */
.add-entry-box {
  padding: 0.75rem 0 1.5rem 0;
  background: transparent;
  box-sizing: border-box;
  margin-left: 2rem;
  width: 100%;
  max-width: 650px;
}
.entries-feed .add-entry-box {
  margin-left: 0;
  width: 100%;
  max-width: 650px;
}

.add-entry-box.hidden {
  display: none;
}
.entry-box-wrap {
  border: 1px solid #dee2e6;
  background: #fff;
}
body.dark-mode .entry-box-wrap {
  border: 1px solid #3a3a3a;
  background: #1e1e1e;
}
.entry-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid #dee2e6;
}
body.dark-mode .entry-toolbar {
  background: #252525;
  border-bottom-color: #3a3a3a;
}
.entry-tb-btn {
  font-size: 13px;
  color: var(--accent-teal);
  background: none;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  font-family: var(--font-main);
}
.entry-tb-sep {
  color: #ccc;
  font-size: 13px;
}
.add-entry-box textarea {
  display: block;
  width: 100%;
  min-height: 160px;
  box-sizing: border-box;
  background: transparent;
  border: none !important;
  padding: 10px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  resize: none;
}
body.dark-mode .add-entry-box textarea {
  background: #1e1e1e;
  color: var(--text-main);
}
.add-entry-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 6px;
}
/* RIGHT SLIDE-OUT MESSENGER DRAWER */

/* MODALS LAYOUT */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  transition: var(--transition-smooth);
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  width: 90%;
  max-width: 450px;
  padding: 2rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  animation: scaleUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes scaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.modal-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
}

.form-group {
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  color: var(--text-main);
  font-family: var(--font-main);
  outline: none;
  transition: var(--transition-smooth);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  background: var(--bg-secondary);
  border-color: var(--accent-teal);
}

.modal-error {
  background: rgba(217, 4, 41, 0.08);
  border: 1px solid rgba(217, 4, 41, 0.2);
  color: var(--accent-red);
  font-size: 0.85rem;
  padding: 0.6rem;
  border-radius: 6px;
  margin-bottom: 1.2rem;
}

/* Blocked list style */
.blocked-list {
  margin-top: 1rem;
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* SKELETON LOADER ANIMATIONS */
.loader-skeleton {
  height: 35px;
  margin: 0.8rem 1rem;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.03) 75%);
  background-size: 200% 100%;
  animation: loadingShimmer 1.5s infinite;
}
@keyframes loadingShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* PROFILE PAGE STYLES */
.profile-bio {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin-top: 0.1rem;
  font-style: normal;
}
.stat-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.profile-entry-topic {
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 0.2rem;
}
.profile-entry-topic a {
  color: var(--text-main);
  text-decoration: none;
}
.profile-entry-topic a:hover {
  text-decoration: underline;
}

/* ENTRY AUTHOR AVATAR & USER PROFILE AVATARS */
.entry-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  background-color: var(--bg-tertiary);
}
.entry-author-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* POLISH FLAG HEART STYLES */
.pl-heart-icon {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2px;
  transition: transform 0.2s ease, fill 0.2s ease, stroke 0.2s ease;
  vertical-align: middle;
}

/* FORCE LOWERCASE EVERYWHERE */
*, *::placeholder, input::placeholder, textarea::placeholder {
  text-transform: lowercase !important;
}

/* Maintain proper casing for password inputs */
input[type="password"] {
  text-transform: none !important;
}

/* HEADER AUTH BUTTONS (compact, brand-green register) */
#open-register-btn,
#open-login-btn {
  background: transparent !important;
  border: none !important;
  color: var(--text-main) !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
  padding: 7px 14px !important;
  font-size: 0.85rem !important;
  box-shadow: none !important;
  transform: none !important;
  transition: var(--transition-smooth);
}
#open-login-btn:hover {
  background: var(--bg-tertiary) !important;
}
#open-register-btn {
  background: var(--accent-teal) !important;
  color: #fff !important;
}
#open-register-btn:hover {
  background: var(--accent-teal-dark) !important;
}


/* INLINE AUTH PAGES (MINIMALIST) */
.auth-page {
  max-width: 380px;
  margin: 3rem 0;
  padding: 0 1rem;
}

.auth-page.content-page {
  max-width: 800px;
}

/* collapsible drawers */

/* admin user list table */

.auth-page h1 {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-main);
  text-transform: lowercase;
  letter-spacing: -0.5px;
}

.auth-page .form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-page .form-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.auth-page .form-group input,
.auth-page .form-group select,
.auth-page .form-group textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  max-width: 400px;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-smooth);
  font-family: inherit;
}

.auth-page .form-group input:focus,
.auth-page .form-group select:focus,
.auth-page .form-group textarea:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 2px rgba(var(--accent-teal-rgb), 0.15);
}

.auth-page-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-page-actions .btn {
  background: transparent !important;
  border: 1px solid var(--accent-teal) !important;
  color: var(--accent-teal) !important;
  border-radius: 100px !important;
  font-weight: 600 !important;
  padding: 0.5rem 1.5rem !important;
  font-size: 0.85rem !important;
  box-shadow: none !important;
  transform: none !important;
  transition: var(--transition-smooth);
  width: auto !important;
  align-self: flex-start;
  cursor: pointer;
}

.auth-page-actions .btn:hover {
  background: var(--accent-teal) !important;
  color: #fff !important;
}

.auth-page-links {
  display: flex;
  justify-content: flex-start;
  gap: 1.5rem;
  margin-top: 1.2rem;
  font-size: 0.85rem;
}

.auth-page-links a {
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.auth-page-links a:hover {
  color: var(--accent-teal);
}

.auth-page-error {
  color: var(--accent-red);
  background: rgba(217, 4, 41, 0.05);
  border: 1px solid rgba(217, 4, 41, 0.1);
  padding: 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.auth-page-success {
  color: var(--accent-teal);
  background: rgba(var(--accent-teal-rgb), 0.05);
  border: 1px solid rgba(var(--accent-teal-rgb), 0.1);
  padding: 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

#edit-profile-bio {
  width: 100%;
  max-width: 400px;
  min-height: 60px;
  height: auto;
  font-size: 0.88rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--glass-border);
  border-radius: 4px;
}

#edit-profile-bio:focus {
  outline: none;
  border-color: var(--glass-border);
}

#body-create-topic-submit {
  background: var(--accent-teal) !important;
  color: white !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 0.4rem 1.2rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  width: auto !important;
}

#body-create-topic-submit:hover {
  background: var(--accent-teal-dark) !important;
  color: #fff !important;
}



.btn-profile-save,
.btn-profile-cancel {
  background: transparent !important;
  border-radius: 100px !important;
  font-weight: 600 !important;
  padding: 0.4rem 1.2rem !important;
  font-size: 0.8rem !important;
  box-shadow: none !important;
  transform: none !important;
  transition: var(--transition-smooth);
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  cursor: pointer !important;
  width: auto !important;
}

/* Specific colors and borders */

.btn-profile-cancel {
  border: 1px solid var(--text-muted) !important;
  color: var(--text-muted) !important;
}

.btn-profile-save {
  border: 1px solid var(--accent-teal) !important;
  color: var(--accent-teal) !important;
}

/* Hover effects: all turn to green (var(--accent-teal)) as requested */

.btn-profile-save:hover {
  background: var(--accent-teal) !important;
  border-color: var(--accent-teal) !important;
  color: #fff !important;
}

.btn-profile-cancel:hover {
  background: var(--text-muted) !important;
  border-color: var(--text-muted) !important;
  color: #fff !important;
}

/* INBOX / MESSAGES LIST STYLES */

/* INBOX TABLE STYLES */
/* REDESIGNED INBOX/MESSAGES STYLES */

/* SEARCH RESULTS DROPDOWN STYLES */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  margin-top: 6px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.search-results-dropdown.hidden {
  display: none !important;
}

.search-result-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition-smooth);
  border-bottom: 1px solid rgba(0, 0, 0, 0.02);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-tertiary);
}

.search-result-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--glass-border);
}

.search-result-details {
  display: flex;
  flex-direction: column;
}

.search-result-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  text-transform: lowercase;
}

/* HEADER MESSAGE ICON STYLES */
#header-messages-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-main);
  padding: 0;
}

.header-msg-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  background: var(--accent-teal);
  border-radius: 50%;
  display: block;
}
.header-msg-badge.hidden {
  display: none !important;
}
/* --accent-teal-text already flips to the light green on dark, so the two
   body.dark-mode duplicates these rules used to need are gone. */
#header-messages-btn.has-unread {
  color: var(--accent-teal-text);
}
#header-messages-btn.has-unread .header-msg-icon {
  stroke: var(--accent-teal-text);
}

.header-notifications-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent-teal);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  min-width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border: 1px solid var(--bg-primary);
}

.header-notifications-badge.hidden {
  display: none !important;
}


#header-profile-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-main);
  padding: 0;
}

#header-notifications-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-main);
  padding: 0;
}

#header-notifications-btn.has-updates {
  color: var(--accent-teal);
}

#header-notifications-btn.has-updates svg {
  stroke: var(--accent-teal);
}

/* REDESIGNED CONFIRM BLOCK BOX */
.confirm-block-box {
  position: fixed;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 90%;
  max-width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--accent-red);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 1.2rem;
  animation: slideInConfirmCenter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.confirm-block-box.hidden {
  display: none !important;
}

@keyframes slideInConfirmCenter {
  from {
    transform: translate(-50%, -15px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.confirm-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.4rem;
}

.confirm-block-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  text-transform: lowercase;
}

.confirm-block-close {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.confirm-block-close:hover {
  color: var(--accent-red);
}

.confirm-block-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.confirm-block-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-transform: lowercase;
}

.confirm-username-highlight {
  font-weight: 600;
  color: var(--accent-red);
}

.confirm-block-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn-confirm-block {
  border: 1px solid var(--accent-red) !important;
  color: var(--accent-red) !important;
  background: transparent !important;
  border-radius: 100px !important;
  font-weight: 600 !important;
  padding: 0.4rem 1.2rem !important;
  font-size: 0.8rem !important;
  transition: var(--transition-smooth);
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
}

.btn-confirm-block:hover {
  background: var(--accent-red) !important;
  border-color: var(--accent-red) !important;
  color: #fff !important;
}

/* FOOTER BAR STYLES */
.app-footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 0.75rem 2rem;
  z-index: 90;
  display: flex;
  align-items: center;
  width: 100%;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-decoration: none;
  text-transform: lowercase;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--accent-teal);
}

/* TOP & BOTTOM PAGINATION COMPONENT */
.pager {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 0;
}

.pager.hidden {
  display: none;
}

.pager-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 1rem 0 1rem 2rem;
  width: 100%;
  max-width: calc(650px + 2rem);
  box-sizing: border-box;
}

.pager-bottom .pager-next {
  margin-right: 0;
}

.pager-bottom.hidden {
  display: none;
}

.pager-select,
.pager-total {
  height: 26px;
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  font-size: 13px;
  font-family: var(--font-main);
  color: var(--text-main);
  background: var(--bg-secondary);
  padding: 0.2rem 0.5rem;
  cursor: pointer;
}

.pager-select {
  cursor: pointer;
}

.pager-slash {
  font-size: 13px;
  color: var(--text-muted);
  padding: 0;
}

.pager-prev,
.pager-next {
  height: 26px;
  min-width: 26px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  padding: 0 6px;
}

.pager-prev:hover:not(:disabled),
.pager-next:hover:not(:disabled) {
  border-color: #999;
}

.pager-prev:disabled,
.pager-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

body.dark-mode .pager-prev,
body.dark-mode .pager-next {
  background: #2a2a2a;
  color: #c5c5c5;
}

/* ENTRY HIGHLIGHT PULSE ANIMATION */
.entry-card.highlight-pulse {}

/* HEADER THEME ICON STYLES */
.header-theme-icon {
  transition: var(--transition-smooth);
}

/* ==========================================
   REDESIGNED MODERN CHAT & BLOCKED USERS
   ========================================== */

/* Chat/Conversation Page */
.chat-page {
  display: flex;
  flex-direction: column;
  background: transparent;
  margin: 1.5rem 0;
  /* match the inbox main column: feed width minus the 240px rail + 2rem gap */
  max-width: calc(100% - 272px);
}

.chat-breadcrumb-new {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 1rem;
}

.chat-breadcrumb-back-new {
  color: var(--text-main);
  cursor: pointer;
  text-decoration: none;
}
.chat-breadcrumb-back-new:hover {
  color: var(--accent-teal);
}

.chat-breadcrumb-nick-new {
  color: var(--accent-teal);
  cursor: pointer;
}

.chat-messages-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0.5rem 2px;
  max-height: calc(100vh - 380px);
  min-height: 200px;
  overflow-y: auto;
}

.chat-msg {
  align-self: flex-start;
  max-width: 68%;
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 10px 14px;
  background: transparent;
}

.chat-msg.sent {
  align-self: flex-end;
  border-color: #c9ced4;
}
body.dark-mode .chat-msg.sent {
  border-color: #555555;
}

.chat-msg-body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  word-break: break-word;
}

.chat-msg-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  user-select: none;
}
.chat-msg.sent .chat-msg-meta {
  text-align: right;
}

.chat-msg-menu-wrap-new {
  position: relative;
  display: inline-block;
  margin-left: 6px;
}

.chat-actions-row-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.chat-action-btn-new {
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 3px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-family: var(--font-main);
  color: var(--text-muted);
  cursor: pointer;
  margin-right: 6px;
}
.chat-action-btn-new:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.chat-action-btn-danger-new {
  color: var(--accent-red);
  border-color: var(--accent-red);
}
.chat-action-btn-danger-new:hover {
  color: #fff;
  background: var(--accent-red);
  border-color: var(--accent-red);
}

.chat-new-msgs-pill {
  position: sticky;
  bottom: 6px;
  align-self: center;
  background: var(--accent-teal);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.7rem;
  font-family: var(--font-main);
  padding: 3px 12px;
  cursor: pointer;
}
.chat-new-msgs-pill.hidden {
  display: none;
}

/* Chat Input Form */
.chat-page-input-form {
  margin-top: 1.2rem;
  display: block;
}

.chat-input-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 3px;
  padding: 0.6rem 0.75rem;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  max-height: 240px;
  min-height: 105px;
  outline: none;
  font-family:'lato';
}

.chat-input-textarea:focus {
  border-color: var(--text-muted);
}

.chat-send-btn {
  background: var(--accent-teal);
  border: none;
  border-radius: 3px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-main);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.chat-send-btn:hover {
  background: var(--accent-teal-dark);
}

/* Mute Warning Modal */
.mute-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.mute-modal { background: #fff; border-top: 2px solid var(--accent-teal); padding: 24px 28px; max-width: 360px; width: 90%; }
.mute-modal-msg { font-size: 14px; color: #222; line-height: 1.6; margin-bottom: 18px; font-family: var(--font-main); }
.mute-modal-btn { background: var(--accent-teal); color: #fff; border: none; border-radius: 3px; padding: 7px 20px; font-size: 13px; font-weight: 600; cursor: pointer; }
.mute-modal-btn:hover { background: var(--accent-teal-dark); }
body.dark-mode .mute-modal { background: var(--bg-secondary); }
body.dark-mode .mute-modal-msg { color: var(--text-main); }

/* New Message Compose Page */
.new-msg-error { color: #d90429; font-size: 13px; margin-bottom: 12px; }
.new-msg-error.hidden { display: none; }

/* Blocked Users Redesign */

.blocked-user-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-glow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  max-height: 100px;
}

.blocked-user-card.removing {
  opacity: 0;
  transform: translateY(15px) scale(0.95);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  border-width: 0;
  overflow: hidden;
}

.blocked-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.blocked-user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.blocked-user-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blocked-user-name:hover {
  color: var(--accent-teal);
}

.blocked-user-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-unblock {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--accent-teal);
  background: transparent;
  color: var(--accent-teal);
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.btn-unblock:hover {
  background: var(--accent-teal);
  color: #ffffff;
}

.no-blocked-users {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  border: 1px dashed var(--glass-border);
  border-radius: 16px;
  background: var(--bg-secondary);
}

/* ==========================================================================
   PREMIUM SETTINGS PAGE (Main Body Theme & Top Tabs)
   ========================================================================== */
.premium-settings-wrapper {
  --settings-bg: var(--bg-primary);
  --settings-text-main: var(--text-main);
  --settings-text-muted: var(--text-muted);
  --settings-accent: #1B4332;
  --settings-accent-hover: #122F23;
  --settings-border: var(--glass-border);
  --settings-danger: #C1121F;
  --settings-font: 'Source Sans Pro', sans-serif;

  background-color: var(--settings-bg) !important;
  color: var(--settings-text-main) !important;
  font-family: var(--settings-font) !important;
  padding: 1.5rem 0;
  border-radius: 0;
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.settings-header-minimal {
  margin-bottom: 0.5rem;
}

.settings-header-minimal h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--settings-text-main);
  letter-spacing: -0.02em;
  text-transform: none !important;
}

.settings-header-minimal p {
  font-size: 0.8rem;
  color: var(--settings-text-muted);
  margin-top: 0.2rem;
}

/* Horizontal tab list at the top */
.settings-sidebar-menu {
  display: flex;
  flex-direction: row;
  border-bottom: 1px solid var(--settings-border);
  padding-bottom: 0.1rem;
  gap: 1.25rem;
  align-self: stretch;
}

.settings-tab-btn {
  background: transparent;
  border: none;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  color: var(--settings-text-muted);
  text-align: center;
  padding: 0.5rem 0;
  cursor: pointer;
  border-left: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding-left: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  outline: none;
}

.settings-tab-btn:hover {
  color: var(--settings-text-main);
  padding-left: 0;
}

.settings-tab-btn.active {
  color: var(--settings-accent);
  font-weight: 600;
  border-left: none;
  border-bottom: 2px solid var(--settings-accent);
  padding-left: 0;
}

.settings-content-pane {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.settings-content-pane.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.settings-pane-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--settings-text-main);
  letter-spacing: -0.01em;
  text-transform: none !important;
}

.settings-read-only {
  margin-bottom: 1.25rem;
}

.settings-read-only-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--settings-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.settings-read-only-value {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--settings-text-main);
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--settings-border);
  max-width: 450px;
}

.settings-form-group {
  margin-bottom: 1.25rem;
  max-width: 450px;
}

.settings-form-group label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--settings-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
  transition: all 0.3s ease;
}

.settings-form-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--settings-border);
  padding: 0.4rem 0;
  font-family: var(--settings-font);
  font-size: 0.85rem;
  color: var(--settings-text-main);
  font-weight: 400;
  transition: all 0.3s ease;
}

.settings-form-input:focus {
  outline: none;
  border-bottom: 1px solid var(--settings-accent);
}

.settings-form-group:focus-within label {
  color: var(--settings-accent);
}

.settings-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  max-width: 480px;
  cursor: pointer;
}

.settings-checkbox-group input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--settings-border);
  border-radius: 4px;
  margin-top: 2px;
  outline: none;
  cursor: pointer;
  display: grid;
  place-content: center;
  background: transparent;
  transition: all 0.3s ease;
}

.settings-checkbox-group input[type="checkbox"]::before {
  content: "";
  width: 8px;
  height: 8px;
  transform: scale(0);
  background-color: var(--settings-accent);
  border-radius: 2px;
  transition: transform 0.2s ease-in-out;
}

.settings-checkbox-group input[type="checkbox"]:checked {
  border-color: var(--settings-accent);
}

.settings-checkbox-group input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.settings-checkbox-label {
  font-size: 0.8rem;
  color: var(--settings-text-main);
  user-select: none;
  line-height: 1.4;
}

.settings-btn-submit {
  background-color: var(--settings-accent) !important;
  color: var(--settings-bg) !important;
  border: none !important;
  padding: 0.45rem 1rem !important;
  font-family: var(--font-main) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  text-transform: none !important;
  box-shadow: none !important;
}

.settings-btn-submit:hover {
  background-color: var(--settings-accent-hover) !important;
  transform: translateY(-1px);
}

.settings-btn-submit:active {
  transform: translateY(0);
}

.settings-btn-danger {
  background-color: transparent !important;
  color: var(--settings-danger) !important;
  border: 1px solid var(--settings-danger) !important;
  padding: 0.4rem 0.9rem !important;
  text-transform: none !important;
}

.settings-btn-danger:hover {
  background-color: var(--settings-danger) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}


/* ==========================================================================
   PREMIUM USER PROFILE PAGE (Split-Screen & Cream/Off-White)
   ========================================================================== */

/* Custom Scrollbar for profile topics sidebar */

/* Right Content Area */

/* Entries display inside profile */

/* Individual entries */


/* ==========================================================================
   MINIMALIST DARK USER PROFILE HEADER
   ========================================================================== */
.profile-header-wrapper-new {
  width: 100%;
  background-color: transparent !important;
  border-radius: 0;
  padding: 1.5rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
}

.profile-header-top-new {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 2rem;
}

/* Bio sits right of the avatar column (110px + 2rem gap), so cap it 140px
   short of the 650px entry-card width to land on the same right edge. */
.profile-bio-text-new {
  max-width: 510px;
}

.profile-user-info-new {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
}

.profile-username-new {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  font-family: var(--font-main) !important;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
  text-transform: none !important;
}

body.dark-mode .profile-username-new {
  color: #c5c5c5 !important;
}

.profile-stats-line-new {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.profile-stat-number-new {
  font-weight: 700;
  color: var(--text-main);
}

.profile-stats-separator-new {
  color: var(--glass-border);
  margin: 0 0.15rem;
}

.profile-reg-date-new {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.1rem;
}

.profile-calendar-icon-new {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.profile-action-buttons-new {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
  position: relative;
}

.profile-action-buttons-new button {
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.profile-action-buttons-new button:hover {
  color: #fff !important;
  border-color: var(--accent-teal) !important;
  background: var(--accent-teal) !important;
}
.profile-action-buttons-new .profile-action-btn-block:hover,
.profile-action-buttons-new .profile-action-btn-danger:hover {
  color: #fff !important;
  border-color: var(--accent-red) !important;
  background: var(--accent-red) !important;
}
.profile-action-buttons-new .profile-action-btn-unblock:hover {
  color: #fff !important;
  border-color: var(--accent-teal) !important;
  background: var(--accent-teal) !important;
}

.profile-avatar-container-new {
  flex-shrink: 0;
}

.profile-avatar-img-new {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--glass-border);
  background-color: transparent;
  display: block;
}

body.dark-mode .profile-avatar-img-new {
  border-color: #333333;
}

.profile-tabs-menu-new {
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  max-width: 650px;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

body.dark-mode .profile-tabs-menu-new {
  border-top-color: #c5c5c5;
  border-bottom-color: #c5c5c5;
}

.profile-tab-link-new {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  /* pull the tab's own 2px indicator onto the row's 1px bottom rule */
  margin-bottom: -1px;
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.profile-tab-link-new:hover {
  color: var(--text-main);
}

.profile-tab-link-new.active {
  color: var(--text-main);
  font-weight: 700;
  border-bottom-color: var(--accent-teal-dark);
}

.profile-options-dropdown-container-new {
  position: relative;
  display: inline-block;
}

.edit-bio-btn {
  border: 1px solid var(--glass-border);
  border-radius: 100px !important;
  padding: 0.3rem 0.8rem;
  font-size: 0.82rem;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

body.dark-mode .entry-more-btn {
  background: #c0c0c0 !important; /* 5.66:1 against the #374151 glyph */
}

/* The four render sites set color:var(--accent-red) inline, which beats the
   stylesheet; !important is the only way to reach it without editing all
   three entry-card renderers. #d90429 is 2.41:1 on the dark pill background. */
body.dark-mode .pill-btn.favorited,
body.dark-mode .entry-pill.favorited {
  color: #ff6b6b !important; /* 4.55:1 on #333333 */
}

body.dark-mode .entry-dots-btn {
  background: #3a3a3a !important;
  color: #c5c5c5 !important;
}

body.dark-mode .edit-bio-btn {
  background: #2a2a2a !important;
  color: #c5c5c5 !important;
}

.edit-bio-btn:hover {
  background: var(--accent-teal) !important;
  color: white !important;
  border-color: var(--accent-teal) !important;
}

.profile-edit-btn-rect {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  color: #000000;
  font-size: 0.72rem;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
  width: 100%;
  max-width: 110px;
  margin-top: 0.6rem;
  font-family: var(--font-main);
  text-transform: lowercase;
}

.profile-edit-btn-rect:hover {
  color: var(--accent-teal-light);
  border-color: var(--accent-teal-light);
  background-color: transparent;
}

body.dark-mode .profile-edit-btn-rect {
  border-color: #3d3d3d;
  color: #000000;
}

body.dark-mode .profile-edit-btn-rect:hover {
  color: var(--accent-teal-light);
  border-color: var(--accent-teal-light);
  background-color: transparent;
}

@media (max-width: 540px) {
  .profile-header-top-new {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .profile-avatar-img-new {
    width: 90px;
    height: 90px;
  }
  .profile-edit-btn-rect {
    max-width: 90px;
  }
  .profile-tabs-menu-new {
    gap: 1rem;
  }
  .profile-tab-link-new {
    font-size: 0.85rem;
  }
}


/* ══════════════════════════════════════════
   Wyślij Wiadomość Modal  (.sm-*)
══════════════════════════════════════════ */

.sm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.18);
  align-items: center;
  justify-content: center;
}
.sm-overlay.open { display: flex; }

/* Container — 650px wide, Verdana throughout */
.sm-container {
  font-family: 'Lato', sans-serif;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.16), 0 1px 4px rgba(0,0,0,0.08);
  width: 650px;
  max-width: calc(100vw - 2rem);
  padding: 28px 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  animation: sm-in 0.16s ease;
}
@keyframes sm-in {
  from { opacity:0; transform: translateY(-10px); }
  to   { opacity:1; transform: translateY(0); }
}

/* Header */
.sm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8e8e8;
}
.sm-title {
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: normal;
  color: #666666;
  letter-spacing: 0;
  text-transform: lowercase;
}
.sm-close-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  color: #999;
  line-height: 1;
  padding: 2px 6px;
  transition: color 0.15s;
}
.sm-close-btn:hover { color: #333; }

/* Rows (label + content) */
.sm-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sm-row-label {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

/* kime / do kogo input */
.sm-kime-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sm-kime-input {
  font-family: var(--font-main);
  font-size: 13px;
  color: var(--text-main);
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 3px;
  padding: 6px 10px;
  width: 100%;
  max-width: 320px;
  outline: none;
  cursor: default;
}
.sm-kime-input:focus { border-color: var(--text-muted); }

/* Status texts */
.sm-status-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-main);
  font-size: 11px;
}
.sm-status-warn {
  color: #d9534f;
}
.sm-status-info {
  color: #999999;
}

/* Entry ref chip */
.sm-entry-ref {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-main);
  font-size: 12px;
  color: var(--accent-teal);
  background: rgba(var(--accent-teal-rgb), 0.07);
  border: 1px solid rgba(var(--accent-teal-rgb), 0.22);
  border-radius: 3px;
  padding: 2px 8px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.12s;
  width: fit-content;
}
.sm-entry-ref:hover { background: rgba(var(--accent-teal-rgb), 0.15); }

/* Message textarea */
.sm-row-msg { gap: 8px; }
.sm-textarea {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: var(--text-main);
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 3px;
  padding: 10px 12px;
  width: 100%;
  height: auto;
  min-height: 120px;
  max-height: 400px;
  overflow-y: auto;
  resize: none;
  outline: none;
  line-height: 1.6;
  box-sizing: border-box;
}
.sm-textarea:focus { border-color: var(--text-muted); }
.sm-textarea::placeholder { color: var(--text-muted); }

/* Actions — button bottom-left */
.sm-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 4px;
}
.sm-send-btn {
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: normal;
  background: var(--accent-teal);
  color: #fff;
  border: 1px solid var(--accent-teal);
  border-radius: 4px;
  padding: 7px 22px;
  cursor: pointer;
  transition: background 0.15s;
  letter-spacing: 0;
}
.sm-send-btn:hover,
.sm-send-btn:active { background: var(--accent-teal-dark); }

/* ══════════════════════════════════════════
   Settings Privacy Toggle  (.sett-toggle-*)
══════════════════════════════════════════ */

.sett-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.sett-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sett-toggle-title {
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  text-transform: lowercase;
}

.sett-toggle-desc {
  font-family: var(--font-main);
  font-size: 0.78rem;
  color: #999999;
  line-height: 1.5;
  max-width: 380px;
}

/* Toggle switch */
.sett-toggle-switch {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-block;
  margin-top: 2px;
}

.sett-toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.sett-toggle-track {
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #ccc;
  transition: background 0.2s ease;
  position: relative;
}

.sett-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

.sett-toggle-switch input:checked ~ .sett-toggle-track .sett-toggle-thumb {
  transform: translateX(20px);
}

/* Sub-header tabs layout */
.sub-header-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 105px;
  gap: 2rem;
}

/* ==========================================================================
   Minimalist Inbox Layout Redesign
   ========================================================================== */
.inbox-wrapper-new {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.inbox-header-new {
  margin-bottom: 2rem;
}

.inbox-title-row-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.inbox-title-new {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.inbox-navbar-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(44, 44, 44, 0.08);
  padding-bottom: 0.1rem;
}

.nav-tabs-new {
  display: flex;
  gap: 2rem;
}

.tab-item-new {
  background: transparent;
  border: none;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.6rem 0 0.8rem 0;
  text-transform: lowercase;
  position: relative;
  transition: var(--transition-smooth);
}

.tab-item-new:hover {
  color: var(--text-main);
}

.tab-item-new.active {
  color: var(--text-main);
}

.tab-item-new.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-teal-light);
}

/* Inbox reuses the shared .pager-* styling (see entry pager) — the old
   .pagination-bar-new / .pag-*-new rules were removed when the inbox pager
   was aligned to the entry pager. */

/* Thread Items */
.threads-container-new {
  display: flex;
  flex-direction: column;
}

.inbox-columns-new {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.inbox-main-col-new {
  flex: 1;
  min-width: 0;
}

.inbox-side-col-new {
  width: 240px;
  flex-shrink: 0;
}

.inbox-side-title-new {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0.4rem 0 0.5rem;
}

.inbox-search-form-new {
  display: flex;
  gap: 6px;
  margin-bottom: 1.4rem;
}

.inbox-side-input-new {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 3px;
  padding: 7px 10px;
  font-size: 0.82rem;
  color: var(--text-main);
  font-family: var(--font-main);
  outline: none;
}
.inbox-side-input-new:focus {
  border-color: var(--text-muted);
}

.inbox-search-btn-new {
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 3px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-family: var(--font-main);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}
.inbox-search-btn-new:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.inbox-compose-textarea-new {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 3px;
  padding: 8px 10px;
  font-size: 0.82rem;
  color: var(--text-main);
  font-family: 'Lato', sans-serif;
  min-height: 110px;
  resize: none;
  outline: none;
  margin: 8px 0;
}
.inbox-compose-textarea-new:focus {
  border-color: var(--text-muted);
}

.thread-item-new {
  position: relative;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
}
.thread-item-new:hover .thread-name-new {
  color: var(--accent-teal);
}

.inbox-thread-checkbox-new {
  position: absolute;
  right: 2px;
  top: 14px;
  cursor: pointer;
}

.thread-name-new {
  font-size: 0.98rem;
  font-family: var(--font-main);
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  padding-right: 28px;
  transition: var(--transition-smooth);
}

.message-count-new {
  font-size: 0.82rem;
  font-family: var(--font-main);
  color: var(--text-muted);
  font-weight: 400;
}

.thread-unread-dot-new {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-teal);
  vertical-align: 2px;
}

.thread-body-new {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 6px 28px 0 0;
  word-break: break-word;
}
.thread-item-new.unread .thread-body-new {
  color: var(--text-main);
}

.thread-footer-new {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 7px;
}

.thread-actions-new {
  display: flex;
  gap: 0.8rem;
}

.action-link-new {
  font-size: 0.8rem;
  font-family: var(--font-main);
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.action-link-new:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.thread-timestamp-new {
  font-size: 0.8rem;
  font-family: var(--font-main);
  color: var(--text-muted);
  user-select: none;
  margin-left: auto;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .thread-actions-new {
    opacity: 1;
  }
  .thread-item-new {
    padding: 10px 12px 10px 9px;
  }
}

/* ENTRY EDITOR TOOLBAR (new-topic modal) */
.entry-box-wrap-modal {
  border: 1px solid #dee2e6;
  background: #fff;
  margin-bottom: 1rem;
}
body.dark-mode .entry-box-wrap-modal {
  border-color: var(--glass-border);
  background: var(--bg-secondary);
}
.entry-box-wrap-modal .entry-toolbar {
  border-bottom: 1px solid #dee2e6;
}
body.dark-mode .entry-box-wrap-modal .entry-toolbar {
  border-bottom-color: var(--glass-border);
}
.entry-box-wrap-modal textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: none !important;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Ensure Verdana typography on the textareas */
#new-entry-content,
#body-new-topic-first-entry {
  font-family: var(--font-main) !important;
  font-size: 13px !important;
}

/* EKŞİ SÖZLÜK CLICKABLE LINKS */
.kolofon-link {
  color: var(--accent-teal) !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.kolofon-link:hover {
  color: var(--accent-teal-dark) !important;
  text-decoration: none !important;
}

.toolbar-popup {
  position: absolute;
  z-index: 1000;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 220px;
}

.toolbar-popup input {
  flex: 1;
  border: 1px solid var(--glass-border);
  border-radius: 5px;
  padding: 0.3rem 0.5rem;
  font-size: 13px;
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-main);
  outline: none;
}

.toolbar-popup input:focus {
  border-color: var(--accent-teal);
}

.toolbar-popup-confirm {
  background: var(--accent-teal);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.3rem 0.6rem;
  font-size: 12px;
  font-family: var(--font-main);
  cursor: pointer;
  white-space: nowrap;
}

.toolbar-popup-confirm:hover {
  opacity: 0.85;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */


/* Category drawer toggle button - hidden on desktop */
.category-drawer-toggle {
  display: none;
}

/* Sub-header auth buttons (guests, mobile only) - hidden on desktop */
.sub-header-auth {
  display: none;
}

.category-drawer-close {
  display: none;
}

.category-drawer-overlay {
  display: none;
}

.category-page {
  padding: 1rem;
}

.category-page-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.category-page-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-page-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: 15px;
  color: var(--text-main);
  cursor: pointer;
}

.category-page-item:hover {
  color: var(--accent-teal);
}

@media (max-width: 768px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  /* Fill the viewport so short pages (e.g. an inbox with one conversation)
     don't collapse to content height and leave the browser background showing
     below — that dead space read as "the page only covers half the screen".
     body is a flex column; app-container grows to absorb the spare height, so
     its panel background reaches the bottom and the footer sticks there. */
  body {
    min-height: 100vh;
  }

  .app-container {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    overflow: visible;
    flex: 1 0 auto;
  }

  .main-content {
    height: auto;
    overflow-y: visible;
  }

  .sidebar {
    height: auto;
    overflow-y: visible;
    margin-left: 0;
  }

  textarea, input[type="text"], input[type="email"], input[type="password"], input[type="search"], select {
    font-size: 16px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .add-entry-box,
  .entries-feed .add-entry-box {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    padding: 0.5rem 0.75rem !important;
  }

  .add-entry-box textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
  }

  .settings-sidebar-menu {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .inbox-wrapper-new {
    padding: 1rem;
  }

  /* Header */
  .logo-txt {
    display: none !important;
  }

  /* Hide sidebar, show full-width main content */
  .app-container {
    padding-left: 0;
    flex-direction: column;
  }

  .sidebar {
    display: flex;
    width: 100%;
    height: auto;
    min-height: 0;
    position: relative;
    top: auto;
    border-right: none;
    overflow-y: visible;
  }

  .sidebar.mobile-hidden {
    display: none !important;
  }

  .topic-item-title {
    font-size: 17px;
  }

  .topic-item-count {
    font-size: 17px !important;
  }

  .main-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  .main-content.mobile-hidden {
    display: none !important;
  }

  .entries-feed {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .entries-feed .profile-header-wrapper-new,
  .entries-feed .inbox-wrapper-new,
  .entries-feed .auth-page,
  .entries-feed .category-page,
  .entries-feed .premium-settings-wrapper {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Entry cards full width on mobile */
  .entry-card {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 1rem 1.5rem 1rem !important;
    box-sizing: border-box !important;
  }

  /* Add entry box matches entry cards */
  .add-entry-box,
  .entries-feed .add-entry-box {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .add-entry-box textarea {
    width: 100%;
    box-sizing: border-box;
  }

  /* Topic header */
  .topic-header {
    padding: 0.8rem 1rem;
  }

  .topic-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 !important;
  }

  .topic-filters .pager {
    margin-right: 0 !important;
    margin-left: auto;
  }

  /* Pagination */
  .pager,
  .pager-bottom {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-right: 0 !important;
  }

  #pager-bottom {
    margin-bottom: 1rem !important;
  }

  .pager {
    margin-right: 0 !important;
  }

  .pager-bottom .pager-next {
    margin-right: 0 !important;
  }

  .pager-bottom {
    padding: 0.5rem 1rem 0.5rem 0.5rem !important;
    max-width: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-left: 0.5rem !important;
    padding-right: 1rem !important;
  }

  .profile-avatar-container-new {
    display: none !important;
  }

  /* Show toggle button */
  .category-drawer-toggle {
    all: unset !important;
    font-family: var(--font-main) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
    cursor: pointer !important;
  }

  /* !important required: the rule above resets everything with all: unset !important */
  .category-drawer-toggle.active {
    color: var(--accent-teal) !important;
    border-bottom: 2px solid var(--accent-teal) !important;
  }

  /* Hide nav by default on mobile */

  /* Close button inside drawer */
  .category-drawer-close {
    display: flex;
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 18px;
    cursor: pointer;
    margin-bottom: 1rem;
  }

  /* Overlay behind drawer */
  .category-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 499;
  }

  .category-drawer-overlay.active {
    display: block;
  }

  /* Nav tags vertical in drawer */

  textarea, input[type='text'], input[type='email'], input[type='password'], input[type='search'], select {
    font-size: 16px !important;
  }

  .app-header {
    position: relative;
    top: auto;
    z-index: 200;
    height: 48px;
    padding: 0 0.8rem;
    gap: 0.5rem;
    grid-template-columns: auto 1fr auto;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--glass-border);
  }

  .header-left {
    flex: none;
    padding-left: 0;
    width: auto;
  }

  .search-box {
    flex: 1;
    width: auto;
    margin: 0;
  }


  .search-box input {
    font-size: 13px;
    padding: 0.4rem 2.6rem 0.4rem 0.8rem;
    border-radius: 6px;
  }

  .search-icon {
    border-radius: 0 6px 6px 0;
  }

  .header-right {
    flex: none;
    gap: 6px !important;
  }

  #header-messages-btn,
  #header-profile-btn,
  #user-profile-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* obserwowane moves into the account dropdown on mobile — the header-right
     row is too narrow to keep 3 icons + the avatar and still leave room
     for the search input */
  #header-notifications-btn {
    display: none !important;
  }

  .dropdown-item.mobile-only-item {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
  }

  .user-controls button > span:last-child {
    display: none !important;
  }

  .user-controls button svg,
  .user-controls button .header-msg-icon {
    display: inline-block !important;
  }

  .user-controls button svg {
    width: 20px;
    height: 20px;
  }

  .header-avatar {
    display: none;
  }

  #user-profile-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    gap: 0;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-tertiary);
  }

  .sub-header {
    position: relative;
    top: auto;
    z-index: 199;
    background: var(--bg-primary);
    padding: 0.3rem 0.8rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .sub-header-left {
    justify-content: flex-start;
    width: auto;
    flex: none;
    padding-left: 0;
    gap: 0.75rem;
  }

  .sub-header-center {
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
    gap: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .sub-header-center::-webkit-scrollbar {
    display: none;
  }

  /* Mobile: category tags collapse into the kanały page; najlepsze has no
     data-category so it stays visible */
  .sub-header-center .nav-tag[data-category] {
    display: none;
  }

  /* Guest auth buttons live in the sub-header on mobile; top header pair hidden
     (!important beats the inline display:flex on .guest-controls) */
  .app-header .guest-controls {
    display: none !important;
  }

  .sub-header-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: none;
  }

  #open-login-btn,
  #open-register-btn,
  #sub-login-btn,
  #sub-register-btn {
    all: unset !important;
    font-family: var(--font-main) !important;
    font-size: 13px !important;
    color: var(--text-main) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    padding: 0.2rem 0.3rem !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: inline !important;
  }

  /* Mobile profile fixes */
  .profile-header-top-new {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* header stacks here, so the bio no longer sits beside the avatar */
  .profile-bio-text-new {
    max-width: none;
  }

  .profile-avatar-container-new {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem !important;
    width: 100% !important;
  }

  .profile-avatar-img-new {
    width: 70px !important;
    height: 70px !important;
  }

  .edit-bio-btn {
    display: block !important;
    margin-top: 0.5rem !important;
    font-size: 0.75rem !important;
    padding: 0.3rem 0.6rem !important;
  }

  .chat-page {
    padding: 0 0.5rem;
    margin: 0.75rem 0;
    max-width: none;
  }

  .chat-msg {
    max-width: 85%;
  }
  .chat-messages-container {
    max-height: calc(100vh - 340px);
  }
  .inbox-columns-new {
    flex-direction: column;
  }
  .inbox-side-col-new {
    width: 100%;
    margin-top: 1.2rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 0.8rem;
  }

}
