/* ============================================
   Admin Panel Stylesheet
   ============================================ */

.admin-body {
  background: #F0EDE8;
  min-height: 100vh;
  display: flex;
}

/* ---- LOGIN ---- */
.login-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: #1A1A1A;
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.login-logo { max-height: 80px; width: auto; margin: 0 auto 20px; }
.login-title { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: #1A1A1A; margin-bottom: 6px; }
.login-subtitle { font-size: 14px; color: #888; margin-bottom: 28px; }
.login-form .form-group { text-align: left; }
.login-form .form-group input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid #E0DDD8;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  font-family: 'Inter', sans-serif;
}
.login-form .form-group input:focus { border-color: #F07B10; }
.login-form .form-group label { font-size: 14px; font-weight: 500; display: block; margin-bottom: 6px; color: #333; }
.login-error { color: #DC2626; font-size: 14px; margin-bottom: 12px; }
.login-form .btn { width: 100%; justify-content: center; background: #F07B10; border-color: #F07B10; color: #fff; margin-top: 8px; }
.login-form .btn:hover { background: #C25F00; border-color: #C25F00; }

/* ---- LAYOUT ---- */
.admin-sidebar {
  width: 240px;
  background: #1A1A1A;
  min-height: 100vh;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0;
  z-index: 50;
  transition: transform 0.2s ease;
}
.admin-main {
  margin-left: 240px;
  flex: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ---- SIDEBAR ---- */
.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-logo-img { height: 36px; width: auto; }
.sidebar-title strong { display: block; color: #fff; font-size: 14px; }
.sidebar-title span { font-size: 11px; color: rgba(255,255,255,0.5); }

.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 11px 20px;
  background: none; border: none;
  color: rgba(255,255,255,0.65);
  font-size: 14px; font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.07); }
.nav-item.active { color: #fff; background: #F07B10; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-direction: column; gap: 8px;
}
.sidebar-view-site {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: rgba(255,255,255,0.5);
  text-decoration: none; transition: color 0.15s;
}
.sidebar-view-site:hover { color: rgba(255,255,255,0.9); }
.sidebar-signout {
  background: none; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px; padding: 7px 12px;
  color: rgba(255,255,255,0.6); font-size: 13px;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all 0.15s; text-align: left;
}
.sidebar-signout:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ---- TOP BAR ---- */
.admin-topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  height: 60px;
  background: #fff;
  border-bottom: 1px solid #E0DDD8;
  position: sticky; top: 0; z-index: 40;
}
.admin-page-title { font-size: 18px; font-weight: 600; color: #1A1A1A; flex: 1; }
.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: #555; padding: 4px; display: none;
}
.topbar-user { font-size: 13px; color: #888; }

/* ---- TAB CONTENT ---- */
.tab-content { display: none; padding: 28px; }
.tab-content.active { display: block; }

.tab-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
}
.tab-header h2 { font-size: 1.4rem; font-weight: 600; color: #1A1A1A; flex: 1; }
.tab-hint { font-size: 13px; color: #888; }

/* ---- STATS ---- */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.admin-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #E0DDD8;
  display: flex; flex-direction: column; gap: 8px;
}
.admin-stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #888; }
.admin-stat-num { font-size: 2rem; font-weight: 700; color: #F07B10; font-family: 'Playfair Display', serif; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E0DDD8;
  padding: 20px 24px;
}
.dash-card h3 { font-size: 15px; font-weight: 600; color: #1A1A1A; margin-bottom: 16px; }
.dash-list { font-size: 14px; color: #555; min-height: 80px; margin-bottom: 12px; }
.dash-list-item { padding: 8px 0; border-bottom: 1px solid #F0EDE8; }
.dash-list-item:last-child { border-bottom: none; }
.dash-list-item-name { font-weight: 500; color: #1A1A1A; }
.dash-list-item-text { color: #666; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }

.btn-text {
  background: none; border: none;
  color: #F07B10; font-size: 14px; font-weight: 500;
  cursor: pointer; padding: 0;
  font-family: 'Inter', sans-serif;
}
.btn-text:hover { text-decoration: underline; }

.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* ---- FORMS ---- */
.form-panel {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E0DDD8;
  padding: 24px;
  margin-bottom: 24px;
}
.form-panel h3 { font-size: 16px; font-weight: 600; margin-bottom: 20px; color: #1A1A1A; }

.admin-form .form-group { margin-bottom: 16px; }
.admin-form .form-group label {
  display: block; font-size: 13px; font-weight: 500;
  color: #333; margin-bottom: 5px;
}
.admin-form .form-group input,
.admin-form .form-group select,
.admin-form .form-group textarea {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid #E0DDD8;
  border-radius: 8px;
  font-size: 14px; font-family: 'Inter', sans-serif;
  color: #333; background: #fff;
  outline: none; transition: border-color 0.15s;
  resize: vertical;
}
.admin-form .form-group input:focus,
.admin-form .form-group select:focus,
.admin-form .form-group textarea:focus { border-color: #F07B10; }
.admin-form .form-group input[type="file"] { border: none; padding: 0; background: none; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: #F07B10; }
.form-check label { font-size: 14px; color: #333; }

.form-actions { display: flex; gap: 12px; margin-top: 8px; }

.btn-outline-dark {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 500;
  border-radius: 8px;
  border: 1.5px solid #555;
  background: transparent;
  color: #333;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
}
.btn-outline-dark:hover { border-color: #1A1A1A; background: #f5f5f0; }

.field-hint { font-size: 12px; color: #888; margin-top: 4px; }

/* ---- TABLES ---- */
.admin-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid #E0DDD8; background: #fff; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table thead { background: #1A1A1A; }
.admin-table th { padding: 12px 14px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.7); white-space: nowrap; }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid #F0EDE8; vertical-align: middle; color: #333; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #FAFAF8; }

.loading-row { text-align: center; color: #888; padding: 40px !important; }

.action-btns { display: flex; gap: 8px; }
.btn-icon {
  background: none; border: 1px solid #E0DDD8;
  border-radius: 6px; padding: 5px 10px;
  font-size: 12px; cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s; color: #555;
}
.btn-icon:hover { border-color: #F07B10; color: #F07B10; }
.btn-icon.danger:hover { border-color: #DC2626; color: #DC2626; }

.badge-live {
  display: inline-block; background: #DC2626; color: white;
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 100px; text-transform: uppercase;
}
.badge-done {
  display: inline-block; background: #D1FAE5; color: #065F46;
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 100px;
}
.badge-pending {
  display: inline-block; background: #FEF3C7; color: #92400E;
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 100px;
}

.preacher-thumb { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #F07B10; }
.preacher-initials-sm {
  width: 36px; height: 36px; border-radius: 50%;
  background: #F07B10; color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

/* ---- SETTINGS ---- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-card { background: #fff; border-radius: 12px; border: 1px solid #E0DDD8; padding: 24px; }
.settings-card h3 { font-size: 15px; font-weight: 600; color: #1A1A1A; margin-bottom: 16px; }
.settings-hint { font-size: 13px; color: #666; margin-bottom: 16px; line-height: 1.6; }

/* ---- TOAST ---- */
.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  background: #1A1A1A; color: #fff;
  padding: 14px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transform: translateY(20px); opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left: 4px solid #10B981; }
.toast.error { border-left: 4px solid #DC2626; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1000px) {
  .admin-sidebar { transform: translateX(-240px); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .admin-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .tab-content { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
}
