/* ═══════════════════════════════════════════
   GORETTI SOCIAL — Estilos Premium
   Paleta: Rojo institucional + Azul marino
═══════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --red:        #b71c1c;
  --red-dark:   #7f0000;
  --red-light:  #ef5350;
  --blue:       #1a237e;
  --blue-dark:  #0d1452;
  --white:      #ffffff;
  --gray-50:    #fafafa;
  --gray-100:   #f5f5f5;
  --gray-200:   #eeeeee;
  --gray-300:   #e0e0e0;
  --gray-400:   #bdbdbd;
  --gray-500:   #9e9e9e;
  --gray-700:   #616161;
  --gray-900:   #212121;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.10);
  --shadow-md:  0 4px 12px rgba(0,0,0,.15);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.20);
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --transition: .2s ease;
  --font:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --header-h:   60px;
  --toolbar-h:  48px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-900);
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, textarea, select { font-family: inherit; outline: none; border: none; }
textarea { resize: vertical; }
.hide { display: none !important; }

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 50%, var(--red-dark) 100%);
  box-shadow: var(--shadow-md);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--header-h);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.5);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-goretti {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
}
.brand-social {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,.7);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-badge {
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
}

.btn-icon-header {
  background: rgba(255,255,255,.15);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
}
.btn-icon-header:hover {
  background: rgba(255,255,255,.30);
}

/* Admin Toolbar */
.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(4px);
  border-top: 1px solid rgba(255,255,255,.1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.admin-toolbar::-webkit-scrollbar { display: none; }

.admin-tool-btn {
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  transition: background var(--transition);
  border: 1px solid rgba(255,255,255,.2);
  position: relative;
}
.admin-tool-btn:hover {
  background: rgba(255,255,255,.28);
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--red-light);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15); }
}

/* ══════════════════════════════════════
   MAIN
══════════════════════════════════════ */
.app-main {
  padding-top: var(--header-h);
  min-height: 100vh;
}

.app-section { padding: 16px; max-width: 640px; margin: 0 auto; }

/* ── Loading ── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--gray-500);
  gap: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.empty-state p  { font-size: 14px; }

/* ══════════════════════════════════════
   POST CARDS
══════════════════════════════════════ */
.posts-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 80px;
}

.post-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: fadeUp .3s ease both;
  transition: box-shadow var(--transition);
}
.post-card:hover { box-shadow: var(--shadow-md); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}
.post-author-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.post-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red) 0%, var(--blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.post-meta { display: flex; flex-direction: column; }
.post-author { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.post-date   { font-size: 12px; color: var(--gray-500); }

.post-admin-actions {
  display: flex;
  gap: 6px;
}
.btn-post-admin {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background var(--transition);
}
.btn-post-edit   { background: var(--gray-100); color: var(--blue); }
.btn-post-delete { background: #ffeaea; color: var(--red); }
.btn-post-edit:hover   { background: var(--gray-200); }
.btn-post-delete:hover { background: #ffd0d0; }

.post-media {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.post-media-video {
  width: 100%;
  max-height: 400px;
  display: block;
  background: #000;
}
.post-pdf-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--gray-50);
  color: var(--red);
  font-weight: 600;
  font-size: 14px;
  border-top: 1px solid var(--gray-200);
}
.post-pdf-link:hover { background: var(--gray-100); }

.post-body {
  padding: 12px 14px 6px;
}
.post-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
  line-height: 1.3;
}
.post-text {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.6;
  white-space: pre-wrap;
}

.post-actions {
  display: flex;
  align-items: center;
  padding: 8px 14px 12px;
  gap: 16px;
  border-top: 1px solid var(--gray-100);
  margin-top: 8px;
}
.btn-post-action {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.btn-post-action:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-post-action.liked { color: var(--red); }
.btn-post-action svg { width: 18px; height: 18px; }

/* ══════════════════════════════════════
   SECTION TOPBAR
══════════════════════════════════════ */
.section-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
}
.section-topbar h2 { font-size: 18px; font-weight: 700; }
.btn-back {
  background: var(--gray-100);
  color: var(--gray-700);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition);
}
.btn-back:hover { background: var(--gray-200); }

/* ══════════════════════════════════════
   INBOX
══════════════════════════════════════ */
.inbox-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 40px; }

.msg-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gray-300);
  transition: box-shadow var(--transition);
}
.msg-card.unread { border-left-color: var(--red); background: #fff8f8; }
.msg-card:hover  { box-shadow: var(--shadow-md); }

.msg-sender  { font-weight: 700; font-size: 14px; color: var(--red); }
.msg-subject { font-size: 15px; font-weight: 600; margin: 4px 0; }
.msg-body    { font-size: 14px; color: var(--gray-700); line-height: 1.5; }
.msg-date    { font-size: 12px; color: var(--gray-400); margin-top: 6px; }
.msg-anon-tag {
  display: inline-block;
  background: var(--gray-700);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 6px;
  font-weight: 500;
}
.btn-mark-read {
  margin-top: 10px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 12px;
  transition: background var(--transition);
}
.btn-mark-read:hover { background: var(--gray-200); }

/* ══════════════════════════════════════
   FAB
══════════════════════════════════════ */
.fab {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(183,28,28,.45);
  z-index: 90;
  transition: transform var(--transition), box-shadow var(--transition);
}
.fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(183,28,28,.55);
}
.fab:active { transform: scale(.95); }

/* ══════════════════════════════════════
   MODALS
══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  animation: slideUp .25s ease;
}
.modal-lg { max-width: 560px; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-900); }

.modal-head {
  text-align: center;
  margin-bottom: 20px;
}
.modal-head h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
}
.modal-sub {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}
.modal-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 3px solid var(--gray-200);
}

.modal-form { display: flex; flex-direction: column; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}
.form-group input,
.form-group textarea,
.form-group select {
  padding: 11px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-900);
  background: var(--gray-50);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(183,28,28,.12);
  background: var(--white);
}
.form-group textarea { min-height: 100px; }
.hint { font-size: 11px; color: var(--gray-400); font-weight: 400; }

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 44px; }
.btn-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  font-size: 16px;
  color: var(--gray-400);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition), transform var(--transition);
}
.btn-primary:hover   { opacity: .92; }
.btn-primary:active  { transform: scale(.97); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.btn-secondary:hover { background: var(--gray-200); }
.btn-full { width: 100%; }

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
}
.checkbox-label input { width: auto; cursor: pointer; }

/* File drop zone */
.drop-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.drop-zone:hover { border-color: var(--red); background: #fff5f5; }
.drop-zone.drag-over { border-color: var(--red); background: #fff0f0; }
.drop-icon { font-size: 32px; margin-bottom: 8px; }
.drop-zone p { font-size: 14px; color: var(--gray-500); margin: 0; }
.link-label { color: var(--red); font-weight: 600; cursor: pointer; }
.hidden-input { display: none; }

.file-preview {
  margin-top: 10px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--gray-100);
}
.file-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}
.file-preview .preview-name {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Logo preview */
.logo-preview img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 12px auto;
  border: 3px solid var(--gray-200);
}

/* ══════════════════════════════════════
   COMMENTS
══════════════════════════════════════ */
.comments-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding: 2px;
}
.comment-bubble {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  padding: 10px 12px;
  animation: fadeUp .2s ease;
}
.comment-bubble.admin-comment {
  background: linear-gradient(135deg, #fff5f5, #ffeaea);
  border-color: #ffcdd2;
}
.comment-author { font-size: 13px; font-weight: 700; color: var(--red); }
.comment-text   { font-size: 14px; color: var(--gray-700); margin-top: 3px; line-height: 1.5; }
.comment-date   { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.btn-del-comment {
  background: none;
  color: var(--gray-400);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  float: right;
}
.btn-del-comment:hover { background: #ffeaea; color: var(--red); }

.no-comments {
  text-align: center;
  padding: 20px;
  color: var(--gray-400);
  font-size: 14px;
}

.comment-form-wrap {
  border-top: 1px solid var(--gray-200);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ══════════════════════════════════════
   TOASTS
══════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
  pointer-events: none;
}
.toast {
  background: var(--gray-900);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease;
  max-width: 300px;
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.success { background: #2e7d32; }
.toast.error   { background: var(--red-dark); }
.toast.info    { background: var(--blue); }
.toast.out     { animation: toastOut .3s ease forwards; }

@keyframes toastIn  { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(60px); } }

/* ══════════════════════════════════════
   ADMIN HEADER EXTRA HEIGHT
══════════════════════════════════════ */
body.admin-mode .app-main {
  padding-top: calc(var(--header-h) + var(--toolbar-h));
}

/* ══════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (min-width: 640px) {
  .posts-container { padding-bottom: 40px; }
  .modal-box { padding: 32px; }
  .app-section { padding: 24px 16px; }
}

@media (max-width: 420px) {
  .brand-goretti { font-size: 14px; }
  .admin-tool-btn { font-size: 12px; padding: 5px 11px; }
  .modal-box { padding: 20px 16px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn-secondary,
  .form-actions .btn-primary { width: 100%; }
}

/* ══════════════════════════════════════
   INSTAGRAM-STYLE COMMENTS BOTTOM SHEET
══════════════════════════════════════ */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 290;
  backdrop-filter: blur(2px);
  animation: fadeIn .2s ease;
}

.comments-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80vh;
  max-height: 80vh;
  background: var(--white);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -6px 30px rgba(0,0,0,.18);
  z-index: 295;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.comments-sheet.open {
  transform: translateY(0);
}

.sheet-handle-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
}
.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--gray-300);
  border-radius: 2px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 16px 12px;
  border-bottom: 1px solid var(--gray-200);
  position: relative;
}
.sheet-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
}
.btn-close-sheet {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-close-sheet:hover { background: var(--gray-200); }

.sheet-comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sheet-comment {
  display: flex;
  gap: 10px;
  animation: fadeUp .2s ease;
}
.sheet-comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: linear-gradient(135deg, var(--red), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.sheet-comment-avatar img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
.sheet-comment-content { flex: 1; }
.sheet-comment-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-900);
}
.sheet-comment-author.is-admin { color: var(--red); }
.sheet-comment-text {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.4;
  margin-top: 2px;
  word-break: break-word;
}
.sheet-comment-date {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 4px;
}
.sheet-comment-actions { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.btn-del-sheet-comment {
  background: none;
  color: var(--gray-400);
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 4px;
}
.btn-del-sheet-comment:hover { color: var(--red); }

.sheet-no-comments {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
  font-size: 14px;
}

/* ── Comment Input Bar (bottom of sheet) ── */
.sheet-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.commenter-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.commenter-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.commenter-avatar-initial {
  position: absolute;
  inset: 0;
  background: var(--gray-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  pointer-events: none;
}

.sheet-input-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sheet-name-input {
  border: none;
  border-bottom: 2px solid var(--gray-300);
  border-radius: 0;
  padding: 6px 4px;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  color: var(--gray-500);
  outline: none;
  width: 100%;
}
.sheet-comment-input {
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 15px;
  background: var(--gray-50);
  color: var(--gray-900);
  outline: none;
  width: 100%;
  margin-top: 4px;
}
.sheet-name-input:focus { border-bottom-color: var(--red); }
.sheet-comment-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(183,28,28,.1); background: #fff; }

.btn-post-comment {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: opacity var(--transition);
}
.btn-post-comment:hover { opacity: .88; }
.btn-post-comment:disabled { opacity: .5; }

/* ── Post action counts ── */
.action-count { font-size: 13px; font-weight: 600; }

/* ── Comment like & delete buttons ── */
.sheet-comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.btn-clike {
  background: none;
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 12px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 3px;
}
.btn-clike:hover { background: #fff0f0; color: var(--red); }
.btn-clike.liked { color: var(--red); background: #fff0f0; }
.btn-del-sheet-comment {
  background: none;
  color: var(--gray-300);
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
}
.btn-del-sheet-comment:hover { color: var(--red); background: #ffeaea; }

/* ══════════════════════════════════════
   ADMIN AVATAR
══════════════════════════════════════ */
.post-avatar img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-preview-wrap {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 16px;
  position: relative;
  overflow: hidden;
  border: 3px solid var(--gray-200);
  background: var(--gray-100);
}
.avatar-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-preview-initial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: linear-gradient(135deg, var(--red) 0%, var(--blue) 100%);
  color: white;
  border-radius: 50%;
}

/* ══════════════════════════════════════
   REPLY SYSTEM
══════════════════════════════════════ */

/* Wrapper que engloba indicador + input bar */
.sheet-input-area {
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

/* Quitar el border-top del input-bar porque ya lo tiene sheet-input-area */
.sheet-input-bar {
  border-top: none !important;
}

/* Banda "Respondiendo a @nombre" */
.reply-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  background: #fff5f5;
  border-bottom: 1px solid #ffcdd2;
  font-size: 13px;
  color: var(--gray-700);
  animation: fadeUp .15s ease;
}
.reply-indicator strong { color: var(--red); }

.btn-cancel-reply {
  background: none;
  color: var(--gray-400);
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 50%;
  transition: color var(--transition);
}
.btn-cancel-reply:hover { color: var(--red); }

/* Comentario de respuesta (indentado) */
.sheet-comment.reply {
  margin-left: 28px;
  padding-left: 10px;
  border-left: 2px solid var(--gray-200);
  position: relative;
}
.sheet-comment.reply .sheet-comment-avatar {
  width: 26px;
  height: 26px;
  font-size: 10px;
}
.sheet-comment.reply .sheet-comment-avatar img {
  width: 26px;
  height: 26px;
}

/* Etiqueta "↩ NombrePadre" sobre el texto de la respuesta */
.reply-to-label {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
  display: block;
  margin-bottom: 1px;
}

/* Botón "↩ Responder" inline en cada comentario */
.btn-reply-comment {
  background: none;
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  transition: all var(--transition);
}
.btn-reply-comment:hover {
  color: var(--blue);
  background: rgba(26,35,126,.07);
}
/* ══════════════════════════════════════
   GOOGLE FORM BANNER
══════════════════════════════════════ */
.form-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #1a237e 0%, #283593 60%, #b71c1c 100%);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 4px 16px rgba(26,35,126,.30);
  transition: transform .18s ease, box-shadow .18s ease;
  animation: fadeUp .3s ease both;
}
.form-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,35,126,.40);
}
.form-banner:active { transform: scale(.98); }

.form-banner-icon {
  font-size: 28px;
  flex-shrink: 0;
  background: rgba(255,255,255,.15);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.form-banner-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.2px;
}
.form-banner-sub {
  font-size: 12px;
  opacity: .75;
}
.form-banner-arrow {
  flex-shrink: 0;
  opacity: .7;
}
