/* =============================================================
   TBF Social App — Main Stylesheet
   ============================================================= */

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  --color-bg:        #f4f4f4;
  --color-surface:   #ffffff;
  --color-border:    #e2e2e2;
  --color-text:      #1a1a1a;
  --color-muted:     #6b6b6b;
  --color-accent:    #c0392b;
  --color-accent-dk: #a93226;
  --color-success:   #1a7a4a;
  --color-warning:   #b45309;
  --color-info:      #2563eb;
  --nav-height:      56px;
  --font:            'Helvetica Neue', Arial, sans-serif;
}

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.9rem;
  margin: 0;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-dk); }

/* ── Top Navbar ──────────────────────────────────────────────── */
.app-navbar {
  height: var(--nav-height);
  background: #1a1a1a;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  gap: 1rem;
}

.app-navbar .brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
  text-decoration: none;
}

.app-navbar .brand span { color: var(--color-accent); }
.app-navbar .brand .brand-sub { font-weight: 100; letter-spacing: 0.08em; color: var(--color-accent); }

/* Desktop nav links */
.nav-links {
  display: none;
  align-items: center;
  gap: 0.15rem;
  margin-left: 1rem;
}
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-links .nav-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: #888;
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
  position: relative;
}
.nav-links .nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-links .nav-link.active { color: #fff; }

.nav-link-badge {
  font-size: 0.55rem;
  font-weight: 700;
  min-width: 15px; height: 15px;
  background: #e53935;
  color: #fff;
  border-radius: 8px;
  padding: 0 3px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 0.2rem;
  vertical-align: middle;
  line-height: 1;
}

.app-navbar .nav-search {
  flex: 1;
  max-width: 300px;
  position: relative;
}
@media (max-width: 767px) { .app-navbar .nav-search { display: none; } }

.app-navbar .nav-search input {
  width: 100%;
  background: #2a2a2a;
  border: 1px solid #383838;
  border-radius: 4px;
  padding: 0.38rem 0.85rem;
  color: #fff;
  font-size: 0.83rem;
  outline: none;
}

.app-navbar .nav-search input::placeholder { color: #777; }
.app-navbar .nav-search input:focus { border-color: #555; }

/* Search dropdown */
.search-dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 2000;
  max-height: 420px;
  overflow-y: auto;
  min-width: 320px;
}
.search-dropdown.open { display: block; }
.search-section-label {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  color: #999; padding: 0.5rem 0.85rem 0.25rem; letter-spacing: 0.04em;
}
.search-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.85rem;
  text-decoration: none; color: #1a1a1a;
  transition: background 0.1s;
}
.search-item:hover, .search-item.active { background: #f5f5f5; }
.search-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; overflow: hidden;
}
.search-avatar img { width: 100%; height: 100%; object-fit: cover; }
.search-info { flex: 1; min-width: 0; }
.search-name { font-size: 0.82rem; font-weight: 600; }
.search-name mark { background: #fff3cd; padding: 0; font-weight: 700; }
.search-meta { font-size: 0.68rem; color: #999; }
.search-meta mark { background: #fff3cd; padding: 0; }
.search-post-preview {
  font-size: 0.75rem; color: #666; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-post-preview mark { background: #fff3cd; padding: 0; font-weight: 600; }
.search-empty {
  padding: 1.2rem; text-align: center; color: #999; font-size: 0.82rem;
}
.search-footer {
  display: block; text-align: center; padding: 0.5rem;
  font-size: 0.72rem; font-weight: 600; color: var(--color-accent);
  border-top: 1px solid #f0f0f0; text-decoration: none;
}
.search-footer:hover { background: #fafafa; }

.app-navbar .nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-icon-btn {
  background: none;
  border: none;
  color: #999;
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
  line-height: 1;
}

.nav-icon-btn:hover { color: #fff; }
.nav-icon-btn svg { display: block; }

.badge-dot {
  position: absolute;
  top: 15px; right: 0px;
  min-width: 17px; height: 16px;
  background: #e53935;
  border-radius: 8px;
  border: 2px solid #1a1a1a;
  font-size: 0.55rem;
  font-weight: 700;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* Notification dropdown */
.notif-dd-menu { border: 1px solid #e2e2e2; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.notif-dd-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 0.85rem; border-bottom: 1px solid #f0f0f0;
}
.notif-dd-item {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.65rem 0.85rem; text-decoration: none; color: inherit;
  border-bottom: 1px solid #f7f7f7; transition: background 0.12s;
}
.notif-dd-item:last-child { border-bottom: none; }
.notif-dd-item:hover { background: #f9f9f9; }
.notif-dd-item.unread { background: #f8f5ff; }
.notif-dd-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; overflow: hidden;
}
.notif-dd-avatar img { width: 100%; height: 100%; object-fit: cover; }
.notif-dd-text { flex: 1; min-width: 0; font-size: 0.78rem; color: #1a1a1a; line-height: 1.35; }
.notif-dd-time { font-size: 0.65rem; color: #999; margin-top: 0.1rem; }
.notif-dd-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-accent); flex-shrink: 0; margin-top: 0.45rem;
}
.notif-dd-empty { padding: 1.5rem; text-align: center; color: #999; font-size: 0.8rem; }
.notif-dd-footer {
  display: block; text-align: center; padding: 0.55rem;
  font-size: 0.72rem; font-weight: 600; color: var(--color-accent);
  border-top: 1px solid #f0f0f0; text-decoration: none;
}
.notif-dd-footer:hover { background: #fafafa; }

.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #333;
  display: flex; align-items: center; justify-content: center;
  color: #ccc;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid #444;
  margin-left: 0.25rem;
  transition: border-color 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-avatar:hover { border-color: var(--color-accent); color: #fff; }

/* ── Layout ──────────────────────────────────────────────────── */
.app-body {
  padding-top: var(--nav-height);
  min-height: 100vh;
  padding-bottom: 2rem;
}

.app-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.app-container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

@media (max-width: 767px) {
  .app-body { padding-bottom: 70px; padding-top: calc(var(--nav-height) + 4px); }
}

/* ── Card ────────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin-bottom: 1.25rem;
}

.card:last-child { margin-bottom: 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.section-header h3 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-muted);
  margin: 0;
}

.section-header a {
  font-size: 0.78rem;
  color: var(--color-accent);
}

/* ── Pills ───────────────────────────────────────────────────── */
.pill {
  font-size: 0.63rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-block;
}

.pill-online    { background: #eaf1ff; color: var(--color-info); }
.pill-physical  { background: #fef3e2; color: var(--color-warning); }
.pill-confirmed { background: #e8f5ee; color: var(--color-success); }
.pill-pending   { background: #fff3e0; color: #e65100; }
.pill-declined  { background: #fdecea; color: var(--color-accent); }
.pill-cancelled { background: #f5f5f5; color: var(--color-muted); }
.pill-completed { background: #e8f5ee; color: var(--color-success); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-confirm {
  background: #e8f5ee;
  color: var(--color-success);
  border: 1px solid #b8ddc9;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}

.btn-confirm:hover { background: #d4eddd; }

.btn-decline {
  background: none;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.btn-decline:hover { color: var(--color-accent); border-color: #f5c6c3; background: #fdecea; }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-primary:hover { background: var(--color-accent-dk); color: #fff; }

.btn-primary-full {
  display: block;
  width: 100%;
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
  text-decoration: none;
}

.btn-primary-full:hover { background: var(--color-accent-dk); color: #fff; }

.btn-outline {
  background: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-outline:hover { border-color: #aaa; background: #f5f5f5; color: var(--color-text); }

.btn-outline-full {
  display: block;
  width: 100%;
  background: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none;
}

.btn-outline-full:hover { border-color: #aaa; background: #f5f5f5; color: var(--color-text); }

/* ── Greeting strip ──────────────────────────────────────────── */
.greeting-strip { margin-bottom: 1.25rem; }

.greeting-strip h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
}

.greeting-strip p {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin: 0;
}

/* ── Status bar ──────────────────────────────────────────────── */
.status-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-bottom: 1.25rem;
}

.status-item {
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-right: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.12s;
  gap: 0.3rem;
  text-decoration: none;
}

.status-item:last-child { border-right: none; }
.status-item:hover { background: #fafafa; }

.s-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  display: block;
}

.s-value.red   { color: var(--color-accent); }
.s-value.green { color: var(--color-success); }
.s-value.blue  { color: var(--color-info); }
.s-value.grey  { color: #555; }

.s-label {
  font-size: 0.68rem;
  color: var(--color-muted);
  line-height: 1.3;
}

@media (max-width: 480px) {
  .status-bar { grid-template-columns: repeat(2, 1fr); }
  .status-item:nth-child(2) { border-right: none; }
  .status-item:nth-child(3) { border-top: 1px solid var(--color-border); }
}

/* ── Quick actions row ───────────────────────────────────────── */
.quick-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.qa-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  text-decoration: none;
  color: var(--color-text);
}

.qa-btn:hover { border-color: #bbb; background: #fafafa; color: var(--color-text); }

.qa-btn.primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.qa-btn.primary:hover { background: var(--color-accent-dk); border-color: var(--color-accent-dk); color: #fff; }

.qa-icon {
  width: 36px; height: 36px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.qa-btn.primary .qa-icon { background: rgba(255,255,255,0.2); color: #fff; }
.qa-btn:not(.primary) .qa-icon { background: #f2f2f2; color: var(--color-muted); }

.qa-text { font-size: 0.83rem; font-weight: 600; }

/* ── Pending requests ────────────────────────────────────────── */
.request-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.request-item:last-child { border-bottom: none; }

.req-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.req-info { flex: 1; min-width: 0; }

.req-name {
  font-weight: 600;
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.25rem;
}

.req-detail {
  font-size: 0.78rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.req-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* ── Timeline ────────────────────────────────────────────────── */
.timeline { padding: 0.5rem 0; }

.tl-item {
  display: flex;
  padding: 0 1.25rem;
}

.tl-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 52px;
  flex-shrink: 0;
  padding-top: 0.2rem;
}

.tl-date-badge {
  text-align: center;
  background: #f2f2f2;
  border-radius: 5px;
  padding: 0.3rem 0.45rem;
  min-width: 44px;
}

.tl-date-badge .tl-day {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  display: block;
}

.tl-date-badge .tl-mon {
  font-size: 0.58rem;
  text-transform: uppercase;
  color: var(--color-muted);
  letter-spacing: 0.05em;
}

.tl-line {
  width: 1px;
  flex: 1;
  background: var(--color-border);
  margin: 0.3rem 0;
  min-height: 1rem;
}

.tl-item:last-child .tl-line { display: none; }

.tl-content {
  flex: 1;
  padding: 0.1rem 0 1.1rem 1rem;
}

.tl-meeting-card {
  border: 1px solid var(--color-border);
  border-radius: 5px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: border-color 0.12s, box-shadow 0.12s;
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
}

.tl-meeting-card:hover {
  border-color: #bbb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  color: var(--color-text);
}

.tl-meeting-info { flex: 1; min-width: 0; }

.tl-meeting-title {
  font-weight: 600;
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.25rem;
}

.tl-meeting-meta {
  font-size: 0.76rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Open slots preview ──────────────────────────────────────── */
.slot-preview-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.sp-datetime { min-width: 80px; flex-shrink: 0; }

.sp-time {
  font-size: 0.95rem;
  font-weight: 700;
  display: block;
}

.sp-date { font-size: 0.7rem; color: var(--color-muted); }

.sp-duration {
  font-size: 0.78rem;
  color: var(--color-muted);
  min-width: 42px;
  flex-shrink: 0;
}

.slot-preview-footer {
  padding: 0.65rem 1.25rem;
  font-size: 0.78rem;
  color: var(--color-muted);
}

/* ── Post cards ──────────────────────────────────────────────── */
.post-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem 0.5rem;
}

.post-card-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  text-decoration: none;
}

.post-card-meta { flex: 1; }

.post-card-author {
  font-weight: 600;
  font-size: 0.875rem;
  display: block;
  color: var(--color-text);
  text-decoration: none;
}

.post-card-author:hover { color: var(--color-accent); }

.post-card-company { font-size: 0.76rem; font-weight: 600; color: #444; display: block; }
.post-card-sub { font-size: 0.68rem; color: var(--color-muted); }

.post-card-time {
  font-size: 0.73rem;
  color: var(--color-muted);
  white-space: nowrap;
}

.post-card-body {
  padding: 0.25rem 1.25rem 0.9rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--color-text);
}

.post-card-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  display: block;
}

.post-card-image-placeholder {
  width: 100%;
  height: 180px;
  background: #ececec;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
}

.post-card-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

.posts-footer {
  padding: 0.75rem 1.25rem;
  font-size: 0.82rem;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

/* ── Avatar initials helper ──────────────────────────────────── */
.avatar-initials {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.35rem;
  display: block;
}

.form-control {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  width: 100%;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.15s;
  outline: none;
}

.form-control:focus { border-color: #aaa; }

.form-control.is-invalid { border-color: var(--color-accent); }

.invalid-feedback {
  font-size: 0.78rem;
  color: var(--color-accent);
  margin-top: 0.25rem;
  display: block;
}

.form-text {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
  display: block;
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert-danger  { background: #fdecea; border-color: #f5c6c3; color: #922b21; }
.alert-success { background: #e8f5ee; border-color: #b8ddc9; color: #1a5e38; }
.alert-info    { background: #eaf1ff; border-color: #bdd0f5; color: #1a3a7a; }
.alert-warning { background: #fef3e2; border-color: #f5d9a0; color: #7a4a00; }

/* ── Page header ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.page-header h1 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--color-muted);
}

.empty-state svg {
  margin-bottom: 0.75rem;
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.85rem;
  margin: 0;
}

/* ── Bottom nav (mobile) ─────────────────────────────────────── */
.app-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  background: #1a1a1a;
  border-top: 1px solid #2e2e2e;
  z-index: 1000;
}

@media (max-width: 767px) { .app-bottom-nav { display: block; } }

.bn-items { display: flex; height: 100%; }

.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 0.58rem;
  gap: 3px;
  cursor: pointer;
  transition: color 0.15s;
  position: relative;
  text-decoration: none;
}

.bn-item svg { width: 21px; height: 21px; }
.bn-item.active { color: #fff; }
.bn-item:hover { color: #ccc; }

.bn-badge {
  position: absolute;
  top: 5px;
  right: calc(50% - 19px);
  background: var(--color-accent);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* ── Utility ─────────────────────────────────────────────────── */
.text-muted  { color: var(--color-muted) !important; }
.text-accent { color: var(--color-accent) !important; }
.text-sm     { font-size: 0.82rem; }
.text-xs     { font-size: 0.72rem; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.divider     { border: none; border-top: 1px solid var(--color-border); margin: 0; }
.mt-1r       { margin-top: 1rem; }
.mt-125      { margin-top: 1.25rem; }

/* ── Auth pages ──────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.auth-logo span { color: var(--color-accent); }

.auth-subtitle {
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-bottom: 1.75rem;
}

.auth-footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 1.25rem;
}

/* ── Language switcher ───────────────────────────────────────── */
.lang-switcher {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.lang-btn {
  background: none;
  border: 1px solid #444;
  color: #999;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.15s;
}

.lang-btn:hover,
.lang-btn.active { border-color: #fff; color: #fff; }
.dropdown-menu .lang-btn { color: #555; border-color: #ddd; }
.dropdown-menu .lang-btn:hover,
.dropdown-menu .lang-btn.active { border-color: var(--color-accent); color: var(--color-accent); }

.lang-btn-auth {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.15s;
}

.lang-btn-auth:hover,
.lang-btn-auth.active { border-color: var(--color-accent); color: var(--color-accent); }

/* ── Profile ─────────────────────────────────────────────────── */
.profile-avatar-lg {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #e8e8e8;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar-lg img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.profile-avatar-lg span {
  font-size: 1.3rem;
  font-weight: 700;
  color: #888;
}

.profile-stats-row {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--color-border);
  margin-top: 1rem;
  padding-top: 0.85rem;
}

.profile-stat {
  flex: 1;
  text-align: center;
}

.profile-stat + .profile-stat {
  border-left: 1px solid var(--color-border);
}

.ps-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
}

.ps-label {
  display: block;
  font-size: 0.7rem;
  color: var(--color-muted);
  margin-top: 0.1rem;
}

/* ── Small buttons ───────────────────────────────────────────── */
.btn-primary-sm {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary-sm:hover { background: var(--color-accent-dk); color: #fff; }

.btn-outline-sm {
  display: inline-block;
  background: none;
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.38rem 0.9rem;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-outline-sm:hover { border-color: #aaa; color: var(--color-text); }

/* Favorite button */
.btn-fav {
  background: none; border: 1px solid var(--color-border); border-radius: 50%;
  width: 36px; height: 36px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #ccc; transition: all 0.2s; flex-shrink: 0;
}
.btn-fav:hover { color: #e53935; border-color: #e53935; }
.btn-fav.active { color: #e53935; border-color: #e53935; }
.btn-fav.active svg { fill: #e53935; }

/* Guide me button */
.guide-me-btn {
  position: fixed;
  bottom: 70px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #1a1a1a; color: #fff;
  border: 2px solid #333;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 999;
  transition: all 0.2s;
}
.guide-me-btn:hover { background: var(--color-accent); border-color: var(--color-accent); transform: scale(1.1); }
@media (min-width: 768px) { .guide-me-btn { bottom: 24px; } }
