/* ============================================================
   TELUGU NEWS APP - Complete Stylesheet v9.0
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  font-family: 'Noto Sans Telugu', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
}

body.news-body,
body.admin-body,
body.login-body {
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ============ APP HEADER (FIXED) ============ */
.app-header {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(211, 47, 47, 0.3);
  height: 62px;
}

.app-header h1 {
  font-size: 17px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.header-icon-btn {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.6);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  filter: brightness(0) invert(1);
  /* Ensures icon appears white */
}
.header-icon-btn:active { background: rgba(255,255,255,0.25); border-color: white; }

.btn-new-header {
  background: white;
  color: #d32f2f;
  border: none;
  padding: 8px 12px;
  border-radius: 22px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.15s;
  font-family: inherit;
  min-width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-new-header:active { transform: scale(0.94); }

/* ============ FLASH NEWS MARQUEE BAR (FIXED) ============ */
.flash-news-bar {
  position: fixed;
  top: 62px;
  left: 0;
  right: 0;
  z-index: 999;
  background: #1a1a1a;
  color: #ffcc00;
  display: flex;
  align-items: center;
  height: 36px;
  overflow: hidden;
  border-bottom: 2px solid #d32f2f;
}

.flash-label {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: white;
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 2;
  box-shadow: 4px 0 10px rgba(0,0,0,0.3);
}

.flash-marquee {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.flash-content {
  display: inline-block;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  padding-left: 100%;
  animation: scrollLeft 40s linear infinite;
  color: #ffcc00;
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ============ NEWS FEED ============ */
.news-feed {
  max-width: 560px;
  margin: 0 auto;
  padding: 12px;
  padding-top: 110px; /* 62 header + 36 flash + 12 gap */
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 60px;
}

/* ============ NEWS CARD ============ */
.news-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  animation: fadeIn 0.4s ease;
  transition: box-shadow 0.3s;
}
.news-card.highlight {
  box-shadow: 0 0 0 3px #d32f2f, 0 4px 20px rgba(211, 47, 47, 0.3);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-media {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
  background: #f0f0f0;
}

.video-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  max-height: 400px;
}
.card-video {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  display: block;
  background: #000;
}

.card-body { padding: 12px 14px 8px; }

/* ============ CARD TITLE + SPEAKER ============ */
.card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.title-text {
  flex: 1;
  word-wrap: break-word;
  min-width: 0;
}

/* Speaker Button (Red bg, White icon) */
.speaker-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(211, 47, 47, 0.4);
  transition: transform 0.15s, box-shadow 0.25s;
  padding: 8px;
}
.speaker-svg { width: 100%; height: 100%; display: block; fill: #ffffff; }
.speaker-btn:active { transform: scale(0.88); }
.speaker-btn.speaking {
  animation: speakerPlaying 1.2s infinite;
  background: linear-gradient(135deg, #b71c1c, #7f0000);
  box-shadow: 0 3px 22px rgba(211, 47, 47, 0.9);
}
@keyframes speakerPlaying {
  0%, 100% { box-shadow: 0 3px 10px rgba(211, 47, 47, 0.4); }
  50% { box-shadow: 0 3px 22px rgba(211, 47, 47, 0.9), 0 0 0 8px rgba(211, 47, 47, 0); }
}

.card-content {
  font-size: 14.5px;
  line-height: 1.65;
  color: #333;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: 8px;
}

.card-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 11.5px;
  color: #888;
  padding-top: 4px;
  padding-bottom: 4px;
}

/* ============ CARD ACTIONS ============ */
.card-actions {
  display: flex;
  border-top: 1px solid #f0f0f0;
  padding: 4px 4px;
  background: #fafafa;
  gap: 2px;
}

.action-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #666;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.12s;
  min-width: 0;
}
.action-btn:active { background: #e8e8e8; transform: scale(0.94); }

.action-icon { font-size: 20px; display: block; transition: transform 0.2s; }
.action-count {
  font-size: 10.5px;
  font-weight: 700;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.action-btn.liked .action-icon { animation: likePulse 0.4s; }
.action-btn.liked .action-count { color: #1877f2; }
.action-btn.disliked .action-icon { animation: likePulse 0.4s; }
.action-btn.disliked .action-count { color: #d32f2f; }
.action-btn.saved .action-icon { animation: likePulse 0.4s; }
.action-btn.saved .action-count { color: #ffc107; }

@keyframes likePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ============ TTS BAR ============ */
.tts-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  padding: 10px 16px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.tts-bar.hidden { display: none; }
.tts-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tts-btn:active { background: rgba(255,255,255,0.4); }
.tts-label {
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding-right: 6px;
  white-space: nowrap;
}

/* ============ EMPTY & LOADING ============ */
.empty-state, .loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #666;
  text-align: center;
  padding: 60px 20px;
  gap: 12px;
  min-height: 60vh;
}
.empty-icon { font-size: 72px; margin-bottom: 10px; }
.empty-state h3 { font-size: 20px; color: #333; }
.empty-state p { font-size: 14px; color: #888; }

.spinner {
  width: 44px; height: 44px;
  border: 4px solid rgba(211, 47, 47, 0.2);
  border-top-color: #d32f2f;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state p { font-size: 13px; color: #888; }

/* ============ MODAL ============ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
}
.modal.hidden { display: none; }

.modal-content {
  background: white;
  color: #1a1a1a;
  width: 100%;
  max-width: 500px;
  border-radius: 22px 22px 0 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 92vh;
  overflow-y: auto;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.small-modal {
  max-width: 420px;
  margin: auto;
  border-radius: 18px;
  align-self: center;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.modal-header h2 { font-size: 18px; color: #d32f2f; font-weight: 700; }

.btn-close {
  background: #f5f5f5;
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-close:active { background: #e5e5e5; }

.input, .textarea {
  width: 100%;
  padding: 13px;
  border: 1.5px solid #e5e5e5;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fafafa;
  color: #1a1a1a;
}
.input:focus, .textarea:focus { border-color: #d32f2f; background: white; }
.textarea { min-height: 110px; resize: vertical; }

.label {
  font-size: 12.5px;
  font-weight: 600;
  color: #666;
  margin-top: 4px;
  display: block;
}

.file-label {
  display: block;
  text-align: center;
  padding: 13px;
  border: 1.5px dashed #d32f2f;
  border-radius: 12px;
  color: #d32f2f;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  background: #fff8f8;
}
.file-label:active { background: #ffeeee; }

.image-preview {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  max-height: 220px;
  background: #000;
}
.image-preview img, .image-preview video {
  width: 100%;
  display: block;
  max-height: 220px;
  object-fit: contain;
}
.remove-img {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,0.75);
  color: white;
  border: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
}

.edit-media-box {
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
  padding: 10px;
}
.edit-media-box.hidden { display: none; }

.edit-media-current { display: flex; flex-direction: column; gap: 8px; }
.edit-media-current img, .edit-media-current video {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 10px;
  background: #000;
}

.btn-remove-media {
  background: #dc3545;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
  font-family: inherit;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.hint {
  font-size: 11.5px;
  color: #999;
  text-align: center;
  margin-top: 4px;
}

/* ============ BOTTOM SHEET ============ */
.bottom-sheet {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2500;
  display: flex;
  align-items: flex-end;
  backdrop-filter: blur(3px);
}
.bottom-sheet.hidden { display: none; }

.bottom-sheet-content {
  background: white;
  color: #1a1a1a;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 22px 22px 0 0;
  padding: 10px 16px 20px;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
.small-sheet { max-height: 45vh !important; }

.sheet-handle {
  width: 40px; height: 4px;
  background: #ddd;
  border-radius: 2px;
  margin: 4px auto 12px;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}
.sheet-header h3 { font-size: 16px; font-weight: 700; color: #1a1a1a; }

/* ============ COMMENTS ============ */
.comments-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 12px;
  min-height: 100px;
}
.no-comments {
  text-align: center;
  color: #999;
  padding: 30px 20px;
  font-size: 14px;
  line-height: 1.7;
}
.no-comments small { font-size: 12px; }

.comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 4px;
}
.comment-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-body b { color: #d32f2f; font-size: 13px; display: block; margin-bottom: 3px; }
.comment-body p {
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.comment-form {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}
.comment-form input {
  padding: 11px 14px;
  border: 1.5px solid #e5e5e5;
  border-radius: 24px;
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
  background: #fafafa;
  color: #1a1a1a;
  min-width: 0;
}
.comment-form input:focus { border-color: #d32f2f; background: white; }
#commentName { width: 30%; flex-shrink: 0; }
#commentText { flex: 1; }

.send-comment {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: white;
  border: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.send-comment:active { transform: scale(0.9); }
.send-comment:disabled { opacity: 0.5; }

/* ============ SHARE ============ */
.share-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px 0;
}
.share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border-radius: 14px;
  border: none;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: white;
  font-family: inherit;
}
.share-option:active { transform: scale(0.94); }
.share-option span:first-child { font-size: 28px; }
.share-option.whatsapp { background: linear-gradient(135deg, #25D366, #128C7E); }
.share-option.copy { background: linear-gradient(135deg, #607d8b, #455a64); }
.share-option.native { background: linear-gradient(135deg, #d32f2f, #b71c1c); }

/* ============ SAVED ============ */
.saved-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  max-height: 55vh;
}
.saved-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: #fafafa;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  align-items: center;
}
.saved-item:active { background: #f0f0f0; }
.saved-item img, .saved-noimg {
  width: 60px; height: 60px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eee;
}
.saved-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.saved-info { flex: 1; min-width: 0; }
.saved-info b {
  font-size: 13.5px;
  color: #1a1a1a;
  display: block;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.saved-info p {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.saved-remove {
  background: #ffebee;
  color: #d32f2f;
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 13px 22px;
  border-radius: 26px;
  font-size: 13.5px;
  z-index: 3000;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  font-weight: 600;
  animation: toastIn 0.3s;
}
.toast.success { background: #28a745; }
.toast.error { background: #dc3545; }
.toast.hidden { display: none; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-body {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  min-height: 100vh;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #1a1a1a;
  overflow-y: auto;
  position: static;
}
.login-box {
  background: white;
  padding: 36px 28px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-icon { font-size: 48px; margin-bottom: 12px; }
.login-box h1 { font-size: 22px; color: #d32f2f; margin-bottom: 6px; }
.login-sub { font-size: 13px; color: #888; margin-bottom: 24px; }
.login-input {
  text-align: center;
  font-size: 16px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

/* ============================================================
   ADMIN PANEL (FIXED HEADER + SCROLL BAR)
   ============================================================ */
.admin-body {
  background: #eef1f5;
  color: #1a1a1a;
  padding-bottom: 80px;
  display: block;
}

.admin-header {
  background: linear-gradient(135deg, #1976d2, #0d47a1);
  color: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(25, 118, 210, 0.3);
  height: 62px;
}
.admin-header h1 { font-size: 17px; font-weight: 700; }
.admin-header-right { display: flex; gap: 8px; }
.admin-header-left { display: flex; align-items: center; }

.icon-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: white;
  transition: background 0.15s, transform 0.3s;
}
.icon-btn:active { background: rgba(255,255,255,0.35); }

/* White icon for create post */
.icon-btn.icon-white {
  filter: brightness(0) invert(1);
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.5);
}

/* ============ ADMIN SCROLLING BAR (FIXED) ============ */
.admin-scroll-bar {
  position: fixed;
  top: 62px;
  left: 0;
  right: 0;
  z-index: 999;
  background: #0d47a1;
  color: #ffcc00;
  display: flex;
  align-items: center;
  height: 36px;
  overflow: hidden;
  border-bottom: 2px solid #1976d2;
}
.scroll-label {
  background: linear-gradient(135deg, #1976d2, #0d47a1);
  color: white;
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 2;
  box-shadow: 4px 0 10px rgba(0,0,0,0.3);
  border-right: 1px solid rgba(255,255,255,0.3);
}
.scroll-marquee {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.scroll-content {
  display: inline-block;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  padding-left: 100%;
  animation: scrollLeft 40s linear infinite;
  color: #ffcc00;
}

/* Admin content padding-top for fixed header+scroll */
.stats-grid,
.filter-bar,
.date-filter,
.bulk-bar,
.admin-list {
  padding-top: 0;
}
.admin-body > *:not(.admin-header):not(.admin-scroll-bar):first-of-type {
  margin-top: 110px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 700px;
  margin: 110px auto 0;
  padding: 0 12px;
}

.stat-card {
  background: white;
  padding: 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  user-select: none;
}
.stat-card:active { transform: scale(0.96); }
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.stat-card.active {
  box-shadow: 0 0 0 2px #1976d2, 0 4px 16px rgba(25, 118, 210, 0.3);
  transform: translateY(-2px);
}

.stat-icon { font-size: 26px; }
.stat-info { display: flex; flex-direction: column; }
.stat-num { font-size: 22px; font-weight: 800; color: #1a1a1a; line-height: 1; }
.stat-label { font-size: 11px; color: #888; margin-top: 3px; font-weight: 600; }

.stat-card.pending .stat-num { color: #f57c00; }
.stat-card.approved .stat-num { color: #28a745; }
.stat-card.total .stat-num { color: #1976d2; }
.stat-card.views .stat-num { color: #9c27b0; }

.filter-bar {
  max-width: 700px;
  margin: 14px auto 0;
  padding: 0 12px;
  display: flex;
  gap: 8px;
}
.filter-input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-size: 13.5px;
  outline: none;
  background: white;
  font-family: inherit;
  color: #1a1a1a;
}
.filter-input:focus { border-color: #1976d2; }
.filter-select {
  padding: 11px 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-size: 13.5px;
  outline: none;
  background: white;
  font-family: inherit;
  cursor: pointer;
  font-weight: 600;
  color: #1976d2;
}

.date-filter {
  max-width: 700px;
  margin: 10px auto 0;
  padding: 0 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.date-filter::-webkit-scrollbar { display: none; }

.date-chip {
  background: white;
  border: 1.5px solid #e0e0e0;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.date-chip.active {
  background: #1976d2;
  color: white;
  border-color: #1976d2;
}

.bulk-bar {
  max-width: 676px;
  margin: 12px auto 0;
  display: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: white;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.bulk-bar.active { display: flex; }

.check-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
}
.selected-count {
  font-size: 12.5px;
  color: #1976d2;
  font-weight: 700;
  margin-right: auto;
}
.bulk-btn {
  padding: 7px 12px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  font-family: inherit;
}
.bulk-btn.approve { background: #28a745; }
.bulk-btn.reject { background: #f57c00; }
.bulk-btn.delete { background: #dc3545; }

.admin-list {
  max-width: 700px;
  margin: 14px auto 0;
  padding: 0 12px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-card {
  background: white;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-card-top input[type="checkbox"] {
  width: 20px; height: 20px;
  cursor: pointer;
  accent-color: #1976d2;
}
.post-date { font-size: 11px; color: #888; margin-left: auto; }
.admin-card img, .admin-card video {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}
.admin-card h3 {
  font-size: 15.5px;
  margin-bottom: 6px;
  color: #1a1a1a;
}
.admin-card p {
  font-size: 13.5px;
  color: #555;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.admin-card .meta {
  font-size: 11.5px;
  color: #999;
  margin-top: 8px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
}
.badge.pending { background: #fff3cd; color: #856404; }
.badge.approved { background: #d4edda; color: #155724; }
.badge.rejected { background: #f8d7da; color: #721c24; }

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-actions button {
  flex: 1;
  min-width: 80px;
  padding: 11px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  font-family: inherit;
}
.admin-actions button:active { transform: scale(0.96); }
.btn-edit { background: #1976d2; }
.btn-approve { background: #28a745; }
.btn-reject { background: #f57c00; }
.btn-delete { background: #dc3545; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 14px;
}
.empty small { font-size: 12px; opacity: 0.8; }

/* ============ RESPONSIVE ============ */
@media (min-width: 600px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 500px) {
  .admin-header h1 { font-size: 15px; }
  .icon-btn { width: 34px; height: 34px; font-size: 14px; }
  .stat-card { padding: 12px 10px; }
  .stat-icon { font-size: 22px; }
  .stat-num { font-size: 18px; }
  .stat-label { font-size: 10px; }
  .filter-bar { flex-wrap: wrap; }
  .filter-input { min-width: 100%; order: 2; }
  .filter-select { width: 100%; order: 1; }

  .card-title { font-size: 16px; }
  .speaker-btn { width: 38px; height: 38px; padding: 7px; }
  .action-icon { font-size: 18px; }
  .action-count { font-size: 10px; }
  .app-header h1 { font-size: 15px; }
  .btn-new-header { padding: 6px 10px; font-size: 14px; }
  .header-icon-btn { width: 34px; height: 34px; font-size: 16px; }
  .flash-label { font-size: 10.5px; padding: 0 8px; }
  .flash-content { font-size: 12px; }
}

@media (max-width: 380px) {
  .action-count { display: none; }
  .action-icon { font-size: 22px; }
  .card-title { font-size: 15px; }
  .speaker-btn { width: 36px; height: 36px; padding: 6px; }
  .btn-new-header { padding: 5px 8px; font-size: 13px; }
  .flash-label { font-size: 9.5px; padding: 0 6px; }
}