/* ── Vibin Portal — Base Styles ────────────────────────────────────────── */
/* Shared across all portal pages: reset, body, topbar, shared buttons     */

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease;
}
@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
}

/* Logo invert for dark bg */
.topbar-center img { filter: brightness(0) invert(1); opacity: 0.92; }

/* ── Top Bar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  background: rgba(8,8,16,0.96);
  border-bottom: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.topbar-left a {
  font: 400 13px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.68);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
}
.topbar-left a:hover { color: var(--text-primary); }

.topbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-ghost-sm {
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.17);
  border-radius: 8px;
  background: transparent;
  font: 500 13px/1 'DM Sans', sans-serif;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn-ghost-sm:hover {
  border-color: rgba(255,255,255,0.42);
  background: rgba(255,255,255,0.05);
}

.btn-publish {
  height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: #FFFFFF;
  font: 500 13px/1 'DM Sans', sans-serif;
  color: #0C0C12;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-publish:hover { opacity: 0.80; }

/* ── Autosave indicator ── */
.autosave-indicator {
  font: 400 13px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.50);
  transition: color 0.25s;
  display: flex;
  align-items: center;
  min-width: 96px;
  justify-content: flex-end;
  padding-right: 16px;
  border-right: 1px solid rgba(255,255,255,0.10);
}
.autosave-indicator.saved { color: rgba(100, 192, 132, 0.82); }

/* ── Top Bar — User Icon ── */
.topbar-user-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.17);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.topbar-user-btn:hover {
  border-color: rgba(255,255,255,0.38);
  background: rgba(255,255,255,0.09);
  color: var(--text-primary);
}

/* ── Sticky Bottom Bar ── */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(8,8,16,0.96);
  border-top: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}
.bottom-bar-inner {
  width: 100%;
  max-width: 1140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 16px;
}

.submit-review-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 13px/1.4 'DM Sans', sans-serif;
  color: #ffffff;
  flex: 1;
}
/* Override autosave in bottom-bar context — no divider, left-aligned */
.bottom-bar .autosave-indicator {
  border-right: none;
  padding-right: 0;
  justify-content: flex-start;
  min-width: auto;
}

/* ── Mobile performance: disable expensive backdrop-filter and body transition ── */
@media (max-width: 767px) {
  body { transition: none; }
  .topbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(8,8,16,0.98);
  }
  .bottom-bar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(8,8,16,0.98);
  }
  .topbar-left a,
  .topbar-user-btn { touch-action: manipulation; }
}
