/* ============================================================
   PASTORAL HUB — Design System (SaaS White-label Version)
   Fontes do sistema, Suporte a Theme (Light/Dark), e FontAwesome
   Paleta: #6b5a3f, #b8996f, #d4a574
   ============================================================ */

/* ===== CSS VARIABLES (THEME LIGHT - DEFAULT) ===== */
:root {
  /* Background layers (Tons de bege muito claros para dar frescor) */
  --bg-root: #f7f6f3;
  --bg-primary: #ffffff;
  --bg-surface: #faf9f7;
  --bg-elevated: #ffffff;
  --bg-hover: #f0eee9;
  --bg-active: #e6e3da;

  /* Glass Effects */
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(107, 90, 63, 0.12);
  --glass-hover: rgba(107, 90, 63, 0.2);

  /* Gold/Wood Accent Palette (Sua Paleta) */
  --primary: #b8996f; /* Ouro envelhecido médio */
  --primary-hover: #d4a574; /* Areia claro, mais vibrante */
  --primary-light: rgba(184, 153, 111, 0.15);
  --primary-glow: rgba(212, 165, 116, 0.4);
  --primary-muted: #6b5a3f; /* Marrom escuro para contrastes */

  /* Text Typography Colors */
  --text-primary: #1c1a17;
  --text-secondary: #4a443a;
  --text-muted: #827b71;
  --text-inverse: #ffffff;

  /* Semantic Colors */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows for Light Theme */
  --shadow-sm: 0 1px 3px rgba(107, 90, 63, 0.1);
  --shadow-md: 0 4px 12px rgba(107, 90, 63, 0.08);
  --shadow-lg: 0 10px 30px rgba(107, 90, 63, 0.12);
  --shadow-glow: 0 0 15px var(--primary-glow);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Fonts: System Defaults (Igual ao WhatsApp, nativo, extremamente familiar e rápido) */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout Constants */
  --navbar-height: 60px;
  --sidebar-width: 270px;
  --feed-max-width: 650px;
}

/* ===== THEME DARK ===== */
[data-theme="dark"] {
  --bg-root: #14120e;
  --bg-primary: #1c1a16;
  --bg-surface: #24221d;
  --bg-elevated: #2e2b25;
  --bg-hover: #36322b;
  --bg-active: #423d35;

  --glass-bg: rgba(28, 26, 22, 0.85);
  --glass-border: rgba(184, 153, 111, 0.12);
  --glass-hover: rgba(184, 153, 111, 0.2);

  --text-primary: #f2efe9;
  --text-secondary: #c9c3ba;
  --text-muted: #8c857a;
  --text-inverse: #1c1a16;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hidden { display: none !important; }

/* THEME LOGOS & SIZING */
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none !important; }
[data-theme="dark"] .logo-dark { display: block; }
img.logo-dark { display: none; }
img.logo-light { display: block; }
[data-theme="dark"] img.logo-light { display: none; }
[data-theme="dark"] img.logo-dark { display: block; }

.brand-img { width: 140px; height: auto; animation: pulse-glow 2s infinite; }
.auth-logo-img { width: 180px; height: auto; margin: 0 auto 20px; }
.nav-logo-img { max-height: 40px; width: auto; }
.admin-logo-img { width: 48px; height: 48px; object-fit: contain; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-root);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-base), color var(--transition-base);
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-hover); }
button { font-family: inherit; cursor: pointer; border: none; outline: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; outline: none; border: none; background: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { color: var(--text-primary); font-family: var(--font-display); font-weight: 600; line-height: 1.3; }
h1 { font-size: 1.8rem; letter-spacing: -0.5px; }
h2 { font-size: 1.4rem; letter-spacing: -0.3px; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

.text-muted { color: var(--text-muted); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--bg-active); }

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed; inset: 0; background: var(--bg-root);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity var(--transition-slow);
}
#loading-screen.hidden { opacity: 0; pointer-events: none; }
.loading-logo { color: var(--primary); font-size: 2.5rem; animation: pulse-glow 2s infinite; margin-bottom: var(--space-lg); }

/* ===== AUTH & SETUP SCREENS ===== */
.auth-wrapper {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: var(--space-lg); background: var(--bg-root);
}
.auth-wrapper.hidden { display: none; }
.auth-container { width: 100%; max-width: 440px; animation: slide-up 0.5s ease-out; }

.auth-brand { text-align: center; margin-bottom: var(--space-xl); }
.auth-brand-icon {
  width: 60px; height: 60px; margin: 0 auto var(--space-md);
  background: var(--bg-surface); border: 2px solid var(--primary-light);
  border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--primary); box-shadow: var(--shadow-sm);
}
.auth-brand h1 { color: var(--text-primary); margin-bottom: 4px; }
.auth-brand p { color: var(--text-muted); font-size: 0.95rem; }

.auth-card {
  background: var(--bg-surface); border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); padding: var(--space-xl); box-shadow: var(--shadow-lg);
}

.auth-tabs { display: flex; background: var(--bg-hover); border-radius: var(--radius-md); padding: 4px; margin-bottom: var(--space-lg); }
.auth-tab { flex: 1; padding: 10px; border-radius: var(--radius-sm); font-weight: 500; font-size: 0.9rem; color: var(--text-secondary); text-align: center; }
.auth-tab.active { background: var(--bg-surface); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ===== FORMS ===== */
.form-group { margin-bottom: var(--space-md); }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-input, .form-select {
  width: 100%; padding: 12px 16px; background: var(--bg-primary); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.95rem; transition: all var(--transition-fast);
}
.form-input:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-select { cursor: pointer; appearance: none; }
textarea.form-input { min-height: 100px; resize: vertical; }

.form-error { color: var(--error); font-size: 0.85rem; margin-top: 4px; display: none; }
.form-error.visible { display: block; }
.form-hint { color: var(--text-muted); font-size: 0.75rem; margin-top: 4px; display: block; line-height: 1.3; }

/* Upload Area */
.upload-area {
  border: 2px dashed var(--glass-border); border-radius: var(--radius-md); padding: var(--space-lg);
  display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer;
  background: var(--bg-hover); transition: all var(--transition-fast); position: relative; overflow: hidden;
}
.upload-area:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-area img { max-width: 100px; max-height: 100px; border-radius: var(--radius-full); object-fit: cover; margin-bottom: var(--space-sm); border: 2px solid var(--glass-border); }
.upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; font-size: 0.95rem; font-weight: 600; border-radius: var(--radius-md);
  transition: all var(--transition-fast); position: relative;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--primary); color: var(--text-inverse); box-shadow: 0 4px 12px var(--primary-glow); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 6px 16px var(--primary-glow); }

.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--glass-border); }
.btn-secondary:hover { background: var(--bg-hover); }

.btn-ghost { color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-full); }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--navbar-height);
  background: var(--glass-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-lg); z-index: 100;
}
.nav-left { display: flex; align-items: center; gap: var(--space-md); }
.nav-menu-btn { display: none; font-size: 1.3rem; color: var(--text-secondary); }

.nav-brand { display: flex; align-items: center; gap: 8px; }
.nav-brand-icon { width: 32px; height: 32px; background: var(--primary); color: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.nav-brand-text { font-weight: 700; color: var(--text-primary); font-size: 1.1rem; }

.nav-right { display: flex; align-items: center; gap: var(--space-md); }

.nav-user {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px;
  background: var(--bg-elevated); border: 1px solid var(--glass-border);
  border-radius: var(--radius-full); cursor: pointer; transition: all var(--transition-fast); position: relative;
}
.nav-user:hover { background: var(--bg-hover); }
.nav-user-info { display: flex; flex-direction: column; line-height: 1.1; margin-right: 4px; }
.nav-user-name { font-size: 0.85rem; font-weight: 600; }
.nav-user-role { font-size: 0.7rem; color: var(--text-muted); }

/* Dropdown */
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0; background: var(--bg-elevated);
  border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 6px;
  min-width: 220px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
  transform: translateY(-10px); transition: all var(--transition-fast); z-index: 110;
}
.dropdown-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; width: 100%;
  border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 0.9rem;
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-divider { height: 1px; background: var(--glass-border); margin: 6px 0; }

/* ===== AVATAR (With Transparent Support & Icons) ===== */
.avatar {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--bg-hover); color: var(--text-muted); overflow: hidden;
  border: 1px solid var(--glass-border); /* Transparent border styling */
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 30px; height: 30px; }
.avatar.lg { width: 50px; height: 50px; font-size: 1.2rem; }
.avatar.xl { width: 70px; height: 70px; font-size: 1.5rem; }

/* ===== APP LAYOUT & SIDEBAR ===== */
.app-layout { display: flex; padding-top: var(--navbar-height); min-height: 100vh; }

.sidebar {
  position: fixed; top: var(--navbar-height); left: 0; bottom: 0; width: var(--sidebar-width);
  background: var(--bg-primary); border-right: 1px solid var(--glass-border);
  padding: var(--space-lg); overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-xl); z-index: 90;
  transition: transform var(--transition-base);
}

.church-profile { text-align: center; padding-bottom: var(--space-lg); border-bottom: 1px solid var(--glass-border); }
.church-profile .avatar { margin: 0 auto; color: var(--primary); background: var(--primary-light); }
.church-profile h3 { margin-top: var(--space-sm); font-size: 1.1rem; }
.church-code {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; margin-top: 8px;
  background: var(--bg-hover); border-radius: var(--radius-full); font-size: 0.75rem;
  color: var(--text-secondary); cursor: pointer; transition: background var(--transition-fast);
}
.church-code:hover { background: var(--active); color: var(--primary); }

.sidebar-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.5px; }

/* Categories (FontAwesome) */
.category-list { display: flex; flex-direction: column; gap: 4px; }
.category-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-md);
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all var(--transition-fast);
}
.category-item i { font-size: 1.1rem; width: 20px; text-align: center; color: var(--text-muted); }
.category-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.category-item:hover i { color: var(--primary); }
.category-item.active { background: var(--primary-light); color: var(--primary); }
.category-item.active i { color: var(--primary); }
.cat-count { margin-left: auto; font-size: 0.75rem; padding: 2px 8px; background: var(--bg-hover); border-radius: 12px; color: var(--text-muted); }
.category-item.active .cat-count { background: var(--bg-primary); color: var(--primary); }

/* Members List */
.members-list { display: flex; flex-direction: column; gap: 8px; }
.member-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--radius-md); transition: background var(--transition-fast); }
.member-item:hover { background: var(--bg-hover); }
.member-info { flex: 1; min-width: 0; line-height: 1.2; }
.member-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-role { font-size: 0.7rem; color: var(--text-muted); }

/* Sidebar Overlay */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 89;
  opacity: 0; transition: opacity var(--transition-base);
}
.sidebar-overlay.visible { opacity: 1; }

/* ===== MAIN FEED ===== */
.main-content { flex: 1; margin-left: var(--sidebar-width); display: flex; justify-content: center; padding: var(--space-xl) var(--space-lg); }
.feed-container { width: 100%; max-width: var(--feed-max-width); }

/* Stats Bar */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); margin-bottom: var(--space-xl); }
.stat-card {
  background: var(--bg-surface); border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: var(--space-md); text-align: center;
}
.stat-val { font-size: 1.8rem; font-weight: 700; color: var(--primary); line-height: 1; margin-bottom: 4px; }
.stat-lbl { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); font-weight: 600; letter-spacing: 0.5px; }

/* Trigger Post */
.post-trigger {
  background: var(--bg-surface); border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 12px 16px; margin-bottom: var(--space-xl); display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: all var(--transition-fast); box-shadow: var(--shadow-sm);
}
.post-trigger:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.post-plchdr { flex: 1; color: var(--text-muted); font-size: 0.95rem; }

/* Cards Feed */
.feed-list { display: flex; flex-direction: column; gap: var(--space-lg); }

.update-card {
  background: var(--bg-surface); border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--transition-fast);
}
.update-card:hover { border-color: var(--glass-hover); box-shadow: var(--shadow-md); }

.card-header { display: flex; gap: 12px; padding: var(--space-lg) var(--space-lg) 0; }
.card-author-info { flex: 1; }
.card-author-name { font-weight: 600; font-size: 0.95rem; }
.card-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.card-body { padding: var(--space-md) var(--space-lg); }
.card-category {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  background: var(--bg-hover); color: var(--text-secondary); border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600; margin-bottom: 12px;
}
.card-category i { color: var(--primary); }
.card-title { font-size: 1.1rem; margin-bottom: 8px; }
.card-text { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; white-space: pre-wrap; }

/* Reactions */
.reactions-bar { display: flex; gap: 8px; padding: var(--space-sm) var(--space-lg); border-top: 1px solid var(--glass-border); }
.reaction-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  background: var(--bg-hover); border-radius: var(--radius-full); font-size: 0.85rem; color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.reaction-btn:hover { background: var(--bg-active); }
.reaction-btn.active { background: var(--primary-light); color: var(--primary); }
.reaction-btn i { font-size: 1rem; }

/* Comments */
.comments-section { border-top: 1px solid var(--glass-border); background: var(--bg-primary); }
.comments-toggle { padding: 12px var(--space-lg); width: 100%; text-align: left; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.comments-toggle:hover { color: var(--text-primary); }
.comment-input-area { display: flex; gap: 12px; padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--glass-border); }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 200;
  opacity: 0; visibility: hidden; transition: all var(--transition-base); padding: var(--space-md);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-surface); border: 1px solid var(--glass-border); border-radius: var(--radius-xl);
  width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.95); transition: transform var(--transition-base);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: var(--space-lg); border-bottom: 1px solid var(--glass-border); }
.modal-close { width: 32px; height: 32px; font-size: 1.2rem; color: var(--text-muted); border-radius: var(--radius-md); }
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-body { padding: var(--space-lg); }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column-reverse; gap: 10px; }
.toast {
  padding: 12px 20px; border-radius: var(--radius-md); font-size: 0.9rem; font-weight: 500;
  display: flex; align-items: center; gap: 10px; background: var(--bg-elevated); border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg); color: var(--text-primary); white-space: nowrap;
}

/* ===== FLOATING ACTION BUTTON (FAB) ===== */
.fab {
  display: none;
  position: fixed; bottom: 24px; right: 24px;
  width: 58px; height: 58px; border-radius: var(--radius-full);
  background: var(--primary); color: #fff; font-size: 1.3rem;
  box-shadow: 0 6px 20px var(--primary-glow);
  z-index: 150; transition: all var(--transition-fast);
  align-items: center; justify-content: center;
}
.fab:hover { transform: scale(1.08); background: var(--primary-hover); }
.fab:active { transform: scale(0.95); }

/* ===== BOTTOM SHEET ===== */
.sheet-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  z-index: 200; opacity: 0; transition: opacity var(--transition-base);
}
.sheet-overlay.open { display: block; opacity: 1; }

.bottom-sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--bg-surface); border-top: 1px solid var(--glass-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.2);
  z-index: 201; max-height: 92vh; overflow-y: auto;
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: env(safe-area-inset-bottom, 16px);
}
.bottom-sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 40px; height: 4px; background: var(--bg-active);
  border-radius: var(--radius-full); margin: 12px auto 4px; 
}

.sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--space-lg) 8px;
  border-bottom: 1px solid var(--glass-border);
}

.sheet-title-input {
  width: 100%; padding: 14px var(--space-lg) 10px;
  font-size: 1.15rem; font-weight: 600; color: var(--text-primary);
  background: transparent; border: none; outline: none;
  border-bottom: 1px solid var(--glass-border);
  letter-spacing: -0.2px;
}
.sheet-title-input::placeholder { color: var(--text-muted); font-weight: 500; }

.sheet-textarea {
  width: 100%; padding: 14px var(--space-lg);
  font-size: 1rem; color: var(--text-secondary); line-height: 1.65;
  background: transparent; border: none; outline: none;
  resize: none; overflow: hidden; min-height: 100px;
}
.sheet-textarea::placeholder { color: var(--text-muted); }

/* Category Chips */
.sheet-categories {
  display: flex; gap: 8px; padding: 10px var(--space-lg) 14px;
  overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--glass-border);
}
.sheet-categories::-webkit-scrollbar { display: none; }

.cat-chip {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 7px 14px; border-radius: var(--radius-full); font-size: 0.83rem; font-weight: 500;
  background: var(--bg-hover); color: var(--text-secondary);
  border: 1.5px solid transparent; transition: all var(--transition-fast);
}
.cat-chip:hover { background: var(--bg-active); color: var(--text-primary); }
.cat-chip.active {
  background: var(--primary-light); color: var(--primary);
  border-color: var(--primary); font-weight: 600;
}

/* Sheet Footer */
.sheet-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--space-lg); border-top: 1px solid var(--glass-border);
  background: var(--bg-surface); position: sticky; bottom: 0;
}
.char-count { font-size: 0.78rem; color: var(--text-muted); }
.sheet-send-btn { padding: 10px 22px; border-radius: var(--radius-full); }
.sheet-send-btn:disabled { opacity: 0.45; pointer-events: none; }

/* ===== READING CARDS — Premium ===== */
.feed-list { display: flex; flex-direction: column; gap: var(--space-lg); }

.update-card {
  background: var(--bg-surface); border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition-fast);
}
.update-card:hover { box-shadow: var(--shadow-md); }

.card-header { display: flex; gap: 12px; padding: 18px 20px 0; }
.card-author-info { flex: 1; }
.card-author-name { font-weight: 600; font-size: 0.95rem; }
.card-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.card-body { padding: 14px 20px 16px; }
.card-category {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  background: var(--primary-light); color: var(--primary); border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600; margin-bottom: 10px; letter-spacing: 0.2px;
}
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); line-height: 1.35; }
.card-text {
  font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}

/* Reactions */
.reactions-bar {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 20px; border-top: 1px solid var(--glass-border);
}
.reaction-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px;
  background: var(--bg-hover); border-radius: var(--radius-full);
  font-size: 0.82rem; color: var(--text-secondary); transition: all var(--transition-fast);
  min-height: 34px;
}
.reaction-btn:hover { background: var(--bg-active); }
.reaction-btn.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; }
  .main-content { margin-left: 0; }
  .nav-menu-btn { display: block; }
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-val { font-size: 1.4rem; }
  .stat-lbl { font-size: 0.68rem; }
  .nav-user-info { display: none; }
  .post-trigger { display: none; }
  .fab { display: flex; }
  .main-content { padding: var(--space-md); padding-bottom: 90px; }
  .feed-list { gap: var(--space-md); }
  .card-header { padding: 14px 16px 0; }
  .card-body { padding: 12px 16px 14px; }
  .reactions-bar { padding: 8px 16px; gap: 6px; }
  .reaction-btn { padding: 5px 10px; font-size: 0.8rem; }
  .bottom-sheet { max-height: 95vh; }
}

