/* ================================================================
   Hanley Baptist Church – Admin Stylesheet
   Design: Clean, professional admin dashboard
   Font: Inter
================================================================ */

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

:root {
  --bg:           #f0f2f7;
  --sidebar-w:    240px;
  --sidebar-bg:   #1a2744;
  --sidebar-text: rgba(255,255,255,.75);
  --sidebar-active: rgba(255,255,255,.12);
  --gold:         #b8902a;
  --gold-light:   #d4aa4a;
  --white:        #ffffff;
  --border:       #e2e6ed;
  --text:         #1e2532;
  --text-muted:   #6b7280;
  --text-light:   #9ca3af;
  --primary:      #1a2744;
  --primary-hover:#243259;
  --danger:       #dc2626;
  --danger-hover: #b91c1c;
  --success:      #16a34a;
  --warning:      #d97706;
  --radius:       8px;
  --radius-lg:    12px;
  --shadow:       0 1px 6px rgba(0,0,0,.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.18);
  --trans:        0.18s ease;
  --font:         'Inter', system-ui, sans-serif;
  --topbar-h:     60px;
}

html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a    { color: var(--primary); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--gold); }
button { font-family: var(--font); }

.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
.hidden { display: none !important; }

/* ── Admin Login Page ───────────────────────────────────── */
.admin-body { min-height: 100vh; }

.admin-login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--sidebar-bg);
  padding: 1.5rem;
  position: relative; overflow: hidden;
}
.admin-login-wrap::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(184,144,42,.08);
  top: -150px; right: -150px;
  pointer-events: none;
}
.admin-login-wrap::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
  bottom: -100px; left: -100px;
  pointer-events: none;
}

.admin-login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
}
.admin-login-brand {
  text-align: center; margin-bottom: 2rem;
}
.admin-brand-icon {
  width: 52px; height: 58px;
  margin: 0 auto .9rem;
  color: var(--primary);
}
.admin-login-brand h1 {
  font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: .25rem;
}
.admin-login-brand p { font-size: .85rem; color: var(--text-muted); }

.admin-login-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-label { font-size: .82rem; font-weight: 600; color: var(--text); }
.form-label.required::after { content: ' *'; color: var(--danger); }
.input-icon-wrap { position: relative; }
.input-icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .9rem; pointer-events: none; }
.form-input {
  width: 100%; padding: .7rem .85rem .7rem 2.5rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .9rem; font-family: var(--font); color: var(--text);
  background: var(--white);
  transition: border-color var(--trans), box-shadow var(--trans);
}
.form-input:not(.input-icon-wrap .form-input) { padding-left: .85rem; }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,39,68,.1); }
.form-input[aria-invalid] { border-color: var(--danger); }
.toggle-password {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: .25rem; display: flex; align-items: center;
  transition: color var(--trans);
}
.toggle-password:hover { color: var(--text); }

.form-error {
  display: flex; align-items: center; gap: .5rem;
  padding: .7rem .9rem; background: #fef2f2;
  border: 1px solid #fecaca; border-radius: var(--radius);
  color: var(--danger); font-size: .85rem;
}
.btn-admin-submit {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  width: 100%; padding: .8rem 1.5rem;
  background: var(--primary); color: var(--white);
  border: none; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: background var(--trans), transform var(--trans);
}
.btn-admin-submit:hover { background: var(--primary-hover); }
.btn-admin-submit:active { transform: scale(.99); }
.btn-admin-submit:disabled { opacity: .6; cursor: not-allowed; }

.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.admin-back-link {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  margin-top: 1.25rem; font-size: .82rem; color: var(--text-muted);
}
.admin-back-link:hover { color: var(--primary); }

/* ── Layout ──────────────────────────────────────────────── */
.admin-layout {
  display: flex; min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0;
  z-index: 200;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.sidebar-logo-icon { width: 30px; height: 33px; color: var(--gold-light); flex-shrink: 0; }
.sidebar-brand-name { font-size: 1rem; font-weight: 700; color: var(--white); display: block; }
.sidebar-brand-sub  { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-light); opacity: .8; }

.sidebar-nav { flex: 1; padding: .75rem .65rem; }
.sidebar-menu { list-style: none; display: flex; flex-direction: column; gap: .1rem; }
.sidebar-link {
  display: flex; align-items: center; gap: .7rem;
  padding: .65rem .85rem; border-radius: 7px;
  color: var(--sidebar-text); font-size: .88rem; font-weight: 500;
  transition: background var(--trans), color var(--trans);
}
.sidebar-link:hover { background: rgba(255,255,255,.08); color: var(--white); }
.sidebar-link.active { background: var(--sidebar-active); color: var(--white); }
.sidebar-link i { width: 16px; text-align: center; flex-shrink: 0; font-size: .95rem; }

.sidebar-footer {
  padding: .75rem .65rem 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-public-link { color: rgba(255,255,255,.5) !important; font-size: .82rem; }
.sidebar-public-link:hover { color: var(--gold-light) !important; }

.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 190;
}

/* Main */
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.admin-topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.sidebar-toggle-btn {
  display: none; background: none; border: none;
  cursor: pointer; padding: .4rem; color: var(--text-muted);
  border-radius: 6px; font-size: 1.05rem;
  transition: background var(--trans);
}
.sidebar-toggle-btn:hover { background: var(--bg); color: var(--text); }
.admin-page-title { font-size: 1rem; font-weight: 700; flex: 1; }
.admin-topbar-right { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.btn-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; color: var(--text-muted);
  transition: all var(--trans); font-size: .9rem;
  text-decoration: none;
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); background: rgba(26,39,68,.04); }

.admin-content { padding: 1.75rem 1.5rem; flex: 1; }

/* ── Stats ───────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.stat-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: box-shadow var(--trans);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(26,39,68,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--primary); flex-shrink: 0;
}
.stat-body { min-width: 0; }
.stat-value { display: block; font-size: 1.6rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 500; }

.skeleton { animation: skeleton-pulse 1.5s ease-in-out infinite; }
@keyframes skeleton-pulse { 0%,100%{opacity:1} 50%{opacity:.6} }

/* ── Sections ────────────────────────────────────────────── */
.admin-section { margin-bottom: 2rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.section-title { font-size: .95rem; font-weight: 700; color: var(--text); }
.section-link { font-size: .82rem; color: var(--gold); display: flex; align-items: center; gap: .3rem; }
.section-link:hover { color: var(--primary); }

/* Quick Actions */
.quick-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.quick-action-card {
  display: flex; align-items: center; gap: .65rem;
  padding: .85rem 1.25rem; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  font-size: .88rem; font-weight: 600; color: var(--text);
  transition: all var(--trans); box-shadow: var(--shadow);
  text-decoration: none;
}
.quick-action-card:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-md); }
.quick-action-card.accent { background: var(--primary); border-color: var(--primary); color: var(--white); }
.quick-action-card.accent:hover { background: var(--primary-hover); color: var(--white); }
.quick-action-card i { font-size: 1rem; }

/* ── Table ───────────────────────────────────────────────── */
.admin-table-wrap {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow-x: auto;
  box-shadow: var(--shadow);
}
.admin-table {
  width: 100%; border-collapse: collapse;
  font-size: .86rem;
}
.admin-table th {
  text-align: left; padding: .75rem 1rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted);
  background: #f8f9fb; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: middle;
  max-width: 240px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #f8f9fb; }
.table-loading, .table-empty {
  text-align: center; color: var(--text-muted);
  padding: 2rem !important;
  font-style: italic;
}
.table-actions { display: flex; gap: .4rem; }
.tbl-btn {
  padding: .3rem .6rem; border-radius: 6px; border: 1px solid var(--border);
  font-size: .78rem; cursor: pointer; background: none; color: var(--text-muted);
  transition: all var(--trans); display: flex; align-items: center; gap: .3rem;
  white-space: nowrap;
}
.tbl-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(26,39,68,.04); }
.tbl-btn.danger:hover { border-color: var(--danger); color: var(--danger); background: rgba(220,38,38,.05); }
.badge {
  display: inline-block; padding: .2rem .55rem; border-radius: 20px;
  font-size: .72rem; font-weight: 600; letter-spacing: .03em; white-space: nowrap;
}
.badge-active   { background: #dcfce7; color: var(--success); }
.badge-inactive { background: #fef2f2; color: var(--danger); }
.type-badge-sunday  { background: rgba(26,39,68,.09);  color: var(--primary); padding: .2rem .55rem; border-radius: 20px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.type-badge-bible   { background: #dcfce7; color: var(--success); padding: .2rem .55rem; border-radius: 20px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.type-badge-prayer  { background: #fef9c3; color: #a16207; padding: .2rem .55rem; border-radius: 20px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.type-badge-special { background: #fae8ff; color: #7e22ce; padding: .2rem .55rem; border-radius: 20px; font-size: .72rem; font-weight: 600; white-space: nowrap; }

/* ── Admin Filters ───────────────────────────────────────── */
.admin-filters {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-bottom: 1rem; align-items: center;
}
.admin-search-wrap {
  position: relative; flex: 1; min-width: 200px;
}
.admin-search-wrap i {
  position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: .85rem; pointer-events: none;
}
#admin-search {
  width: 100%; padding: .6rem .8rem .6rem 2.2rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .88rem; font-family: var(--font);
  background: var(--white); color: var(--text);
  transition: border-color var(--trans);
}
#admin-search:focus { outline: none; border-color: var(--primary); }
.admin-filters select {
  padding: .6rem .8rem; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: .88rem; font-family: var(--font);
  background: var(--white); color: var(--text); cursor: pointer;
  transition: border-color var(--trans);
}
.admin-filters select:focus { outline: none; border-color: var(--primary); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .6rem 1.15rem; border-radius: var(--radius);
  font-size: .88rem; font-weight: 600; font-family: var(--font);
  cursor: pointer; border: none; text-decoration: none;
  transition: all var(--trans); white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); color: var(--white); }
.btn-ghost {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: var(--danger-hover); color: var(--white); }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal-card {
  background: var(--white); border-radius: var(--radius-lg);
  width: 100%; max-width: 640px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideUp .22s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.modal-sm { max-width: 420px; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px;
  background: none; border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--trans); font-size: .9rem;
}
.modal-close:hover { border-color: var(--text-muted); color: var(--text); }
.modal-body {
  padding: 1.5rem; overflow-y: auto; flex: 1;
  display: flex; flex-direction: column; gap: 1rem;
}
.modal-footer {
  padding: 1rem 1.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: .75rem;
  flex-shrink: 0;
}

/* Form elements inside modal */
.form-row { display: flex; flex-direction: column; gap: .25rem; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row.full .form-group { width: 100%; }
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-label { font-size: .8rem; font-weight: 600; color: var(--text); }
.form-label.required::after { content: ' *'; color: var(--danger); }
.form-input, .form-textarea {
  width: 100%; padding: .6rem .8rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .88rem; font-family: var(--font); color: var(--text);
  background: var(--white);
  transition: border-color var(--trans), box-shadow var(--trans);
}
.form-input:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,39,68,.08);
}
.form-input[aria-invalid], .form-textarea[aria-invalid] { border-color: var(--danger); }
.form-textarea { resize: vertical; min-height: 80px; }
.field-error { font-size: .78rem; color: var(--danger); }
.field-hint  { font-size: .75rem; color: var(--text-muted); margin-top: .2rem; }
.char-count  { font-size: .73rem; color: var(--text-light); text-align: right; margin-top: .2rem; }

/* File upload */
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-upload-label {
  display: flex; flex-direction: column; align-items: center;
  gap: .5rem; padding: 1.25rem;
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  cursor: pointer; text-align: center;
  transition: border-color var(--trans), background var(--trans);
  background: var(--bg);
}
.file-upload-label:hover, .file-upload-label.dragover {
  border-color: var(--primary); background: rgba(26,39,68,.03);
}
.file-upload-label i { font-size: 1.5rem; color: var(--text-muted); }
.file-label-text { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.file-label-hint { font-size: .75rem; color: var(--text-light); }
.current-file {
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem; color: var(--text-muted); margin-top: .4rem;
}
.current-file i { color: var(--primary); }
.file-keep-note { font-size: .73rem; opacity: .7; }

/* ── Footer ──────────────────────────────────────────────── */
.admin-footer {
  margin-top: auto; padding: .85rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--white);
}
.admin-footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .75rem; color: var(--text-light);
}

/* Pagination (reused from public) */
.pagination {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: 1.25rem;
}
.page-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 7px; font-size: .82rem; color: var(--text);
  cursor: pointer; transition: all var(--trans); font-family: var(--font);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: var(--white); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-btn.prev, .page-btn.next { width: auto; padding: 0 .7rem; gap: .3rem; font-size: .78rem; }

/* ── Responsive ─────────────────────────────────────────── */

/* Tablet & below (≤ 900px) */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile landscape / small tablet (≤ 768px) */
@media (max-width: 768px) {
  /* Sidebar becomes a slide-over drawer */
  .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .sidebar-overlay {
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
  }
  .sidebar-overlay.visible { opacity: 1; pointer-events: auto; }

  /* Main takes full width */
  .admin-main { margin-left: 0; }
  .sidebar-toggle-btn { display: flex; }

  /* Topbar tighter */
  .admin-topbar { padding: 0 .85rem; gap: .6rem; }
  .admin-page-title { font-size: .92rem; }

  /* Content padding */
  .admin-content { padding: 1rem .85rem; }

  /* Filters stack vertically */
  .admin-filters { flex-direction: column; align-items: stretch; }
  .admin-search-wrap { min-width: 0; }
  .admin-filters select { width: 100%; }

  /* Modal: full-screen on mobile */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-card {
    max-width: 100%;
    max-height: 96vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }
  .modal-sm { max-width: 100%; }
  .modal-header { padding: 1rem 1.15rem; }
  .modal-body   { padding: 1rem 1.15rem; }
  .modal-footer { padding: .85rem 1.15rem; }

  /* Two-col form grids collapse to single column */
  .form-row.two-col { grid-template-columns: 1fr; }

  /* Table: allow horizontal scroll, don't clip */
  .admin-table-wrap { border-radius: var(--radius); overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { min-width: 560px; }
  .admin-table th, .admin-table td { padding: .6rem .75rem; }

  /* Stats 2-column */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }

  /* Footer compact */
  .admin-footer { padding: .65rem .85rem; }
  .admin-footer-inner { flex-direction: column; gap: .2rem; text-align: center; }
}

/* Small phone (≤ 480px) */
@media (max-width: 480px) {
  html { font-size: 14px; }

  /* Login card */
  .admin-login-card { padding: 1.75rem 1.1rem; }

  /* Stats single column on very small screens */
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card  { padding: 1rem; }
  .stat-value { font-size: 1.35rem; }
  .stat-icon  { width: 38px; height: 38px; font-size: .95rem; }

  /* Quick actions stack */
  .quick-actions { flex-direction: column; }
  .quick-action-card { width: 100%; }

  /* Topbar – hide text on page title when very narrow */
  .admin-topbar-right .btn-icon { width: 30px; height: 30px; font-size: .82rem; }

  /* Table: hide less important columns so it fits */
  .admin-table th:nth-child(5),
  .admin-table td:nth-child(5) { display: none; } /* File col */
  .admin-table th:nth-child(7),
  .admin-table td:nth-child(7) { display: none; } /* Status col */

  /* Action buttons: icon-only on small screens */
  .tbl-btn span, .tbl-btn .btn-text { display: none; }
  .tbl-btn { padding: .35rem .45rem; }

  /* Pagination compact */
  .page-btn { width: 30px; height: 30px; font-size: .78rem; }

  /* Add sermon button: shorter label */
  .admin-topbar-right .btn span { display: none; }
  .admin-topbar-right .btn { padding: .55rem .65rem; }

  /* Modal footer buttons full-width stack */
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; justify-content: center; }
}

/* Extra small (≤ 360px) */
@media (max-width: 360px) {
  .stats-grid { grid-template-columns: 1fr; }
  .admin-content { padding: .85rem .65rem; }
}
