/* ============================================================================
   Fiqih Wanita — fiqihwanita.usthanif.com
   Editorial Islamic Design System (Emerald, Dusty Mauve, Warm Ivory & Gold)
   ============================================================================ */

:root {
  --bg-body: #fbf9f5;
  --bg-surface: #ffffff;
  --bg-muted: #f3efe7;
  --bg-tint: #eef5f2;
  --bg-mauve-tint: #f8f1f5;

  --text-main: #1d2925;
  --text-muted: #5b6863;
  --text-light: #7c8782;

  --primary: #1b4d3e;
  --primary-hover: #143b2f;
  --secondary: #7b4f6b;
  --secondary-hover: #643e57;
  --accent-gold: #c59b54;

  --border: #e7dfd3;
  --shadow-sm: 0 4px 14px rgba(27, 77, 62, 0.05);
  --shadow-md: 0 12px 32px rgba(27, 77, 62, 0.08);
  --shadow-lg: 0 22px 50px rgba(27, 77, 62, 0.12);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --font-arabic: 'Amiri', 'Noto Naskh Arabic', serif;
  --transition: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg-body: #111916;
  --bg-surface: #18231f;
  --bg-muted: #202e29;
  --bg-tint: #1b2f28;
  --bg-mauve-tint: #2a2028;

  --text-main: #f1f5f3;
  --text-muted: #b3c0bb;
  --text-light: #899892;

  --primary: #3b9176;
  --primary-hover: #49ab8c;
  --secondary: #b982a6;
  --secondary-hover: #ca95b8;
  --accent-gold: #ddb56b;

  --border: #2a3b34;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 22px 50px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.section-padding {
  padding: 84px 0;
}

.section-alt {
  background: var(--bg-muted);
}

/* ---- Setup Alert Banner ---- */
.setup-banner {
  background: #7b4f6b;
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.setup-banner a {
  text-decoration: underline;
  font-weight: 700;
  margin-left: 0.4rem;
}

/* ---- Header & Navigation ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(251, 249, 245, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

[data-theme="dark"] .header {
  background: rgba(17, 25, 22, 0.9);
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  box-shadow: 0 6px 16px rgba(27, 77, 62, 0.22);
}

.logo-text span {
  color: var(--secondary);
}

.logo-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: -2px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--bg-tint);
  border: 1px solid var(--border);
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
}

.theme-btn,
.mobile-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--transition);
}

.theme-btn:hover,
.mobile-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-toggle {
  display: none;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.35rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(27, 77, 62, 0.22);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--primary);
  border-color: var(--border);
}

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

.btn-mauve {
  background: var(--secondary);
  color: #fff;
}

.btn-mauve:hover {
  background: var(--secondary-hover);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.84rem;
  border-radius: 9px;
}

/* ---- Hero Section ---- */
.hero-section {
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 85% 15%, rgba(123, 79, 107, 0.08), transparent 45%),
              radial-gradient(circle at 10% 80%, rgba(27, 77, 62, 0.07), transparent 45%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  background: var(--bg-mauve-tint);
  color: var(--secondary);
  border: 1px solid rgba(123, 79, 107, 0.22);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.18;
  margin: 0 0 1rem;
  color: var(--text-main);
}

.hero-title .highlight {
  color: var(--primary);
}

.hero-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--secondary);
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-gold);
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0 0 1.65rem;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.8rem;
}

.ustadzah-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.ustadzah-chip i {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-tint);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.ustadzah-chip strong {
  display: block;
  font-size: 0.92rem;
}

.ustadzah-chip span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-photo-frame {
  position: relative;
  max-width: 430px;
  margin: 0 auto;
}

.hero-photo-backdrop {
  position: absolute;
  inset: 16px -14px -14px 16px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(27, 77, 62, 0.16), rgba(123, 79, 107, 0.22));
  z-index: 0;
}

.hero-photo-card {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  padding: 12px;
  border-radius: 26px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.hero-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
  object-position: center top;
  border-radius: 18px;
}

.photo-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0.5rem 0.25rem;
  gap: 0.5rem;
}

.photo-caption strong {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  display: block;
}

.photo-caption span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.photo-badge {
  background: var(--bg-tint);
  color: var(--primary);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---- Stats Bar ---- */
.stats-strip {
  background: var(--primary);
  color: #fff;
  padding: 22px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-box strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: #f3d79e;
  line-height: 1.2;
}

.stat-box span {
  font-size: 0.84rem;
  opacity: 0.9;
}

/* ---- Section Headings & Filters ---- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2.2rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
  margin-bottom: 0.45rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  margin: 0;
  line-height: 1.25;
}

.section-subtitle {
  color: var(--text-muted);
  margin: 0.45rem 0 0;
  max-width: 620px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.search-box {
  position: relative;
  min-width: 240px;
}

.search-box i {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.search-box input {
  width: 100%;
  padding: 0.58rem 0.9rem 0.58rem 2.35rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
}

/* ---- Articles Grid & Cards ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.article-cover {
  height: 170px;
  background: linear-gradient(135deg, rgba(27, 77, 62, 0.12), rgba(123, 79, 107, 0.16));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-cover-pattern {
  font-family: var(--font-arabic);
  font-size: 2.3rem;
  color: var(--primary);
  opacity: 0.35;
  user-select: none;
}

.cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
}

[data-theme="dark"] .cat-badge {
  background: rgba(24, 35, 31, 0.92);
  color: var(--accent-gold);
}

.article-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.38;
  margin: 0 0 0.65rem;
}

.article-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1.2rem;
  flex: 1;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

/* ---- Video Section & Featured Playlist ---- */
.playlist-featured {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 1.75rem;
  align-items: center;
  margin-bottom: 2.2rem;
}

.video-embed-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #101916;
}

.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #14221d;
  cursor: pointer;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-card:hover .video-thumb img {
  transform: scale(1.04);
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 28, 24, 0.32);
  display: grid;
  place-items: center;
  transition: background var(--transition);
}

.play-btn-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(196, 30, 58, 0.92);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.duration-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 0.74rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

/* ---- Download Materials Grid ---- */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.material-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition);
}

.material-card:hover {
  transform: translateY(-4px);
  border-color: var(--secondary);
}

.material-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.format-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--bg-mauve-tint);
  color: var(--secondary);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

.material-meta-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.meta-pill {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-muted);
}

.material-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 0;
}

.material-desc {
  font-size: 0.89rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.material-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ---- Tanya Fiqih & Profil ---- */
.qa-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

.qa-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.qa-q {
  font-weight: 700;
  font-size: 1rem;
  margin: 0.45rem 0 0.65rem;
  color: var(--primary);
}

.qa-a {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border);
}

.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-body);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.94rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.12);
}

/* ---- Profil Pengasuh ---- */
.profile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.2rem;
  align-items: center;
  box-shadow: var(--shadow-md);
}

.profile-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 20px;
  border: 4px solid var(--bg-muted);
}

.focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.focus-tag {
  background: var(--bg-tint);
  color: var(--primary);
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---- Dedicated Article Page & Dalil Arabic Block ---- */
.article-reader {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.article-reader h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  line-height: 1.25;
  margin: 0.7rem 0 1rem;
}

.article-prose {
  font-size: 1.04rem;
  line-height: 1.85;
  color: var(--text-main);
}

.article-prose h3 {
  font-family: var(--font-serif);
  color: var(--primary);
  margin: 1.8rem 0 0.7rem;
}

.dalil-box {
  background: var(--bg-tint);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  margin: 1.5rem 0;
}

.arabic-text {
  font-family: var(--font-arabic);
  font-size: 1.65rem;
  line-height: 2.1;
  text-align: right;
  color: var(--primary);
  margin: 0 0 0.75rem;
}

.dalil-translation {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.96rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---- Modal (Video Player & Quick Read) ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 20, 17, 0.75);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1200;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  max-width: 860px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* ---- Footer ---- */
.footer {
  background: #142a23;
  color: #e2ece8;
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer h4 {
  color: #f3d79e;
  margin: 0 0 0.85rem;
  font-family: var(--font-serif);
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer li {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.88;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.35rem;
  font-size: 0.84rem;
  opacity: 0.8;
}

/* ---- Admin Dashboard Styles ---- */
.admin-login-wrap {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.admin-login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  max-width: 430px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.85rem;
}

.admin-tab-btn {
  padding: 0.6rem 1.05rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.admin-tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.admin-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 1.5rem;
  align-items: start;
}

.admin-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.admin-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-list-item:last-child {
  border-bottom: none;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 1500;
  display: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.toast.show {
  display: block;
}

.toast.error {
  background: #b91c1c;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
  .hero-grid,
  .playlist-featured,
  .qa-layout,
  .admin-panel-grid,
  .profile-card {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .materials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.25rem;
    display: none;
  }

  .nav-menu.open {
    display: flex;
  }

  .mobile-toggle {
    display: grid;
  }

  .domain-badge {
    display: none;
  }

  .stats-grid,
  .cards-grid,
  .materials-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .article-reader {
    padding: 1.4rem;
  }
}
