/* ============================================================
   أحمد محمود ديدي — ADMIN PANEL STYLES
   ============================================================ */

:root {
  --adm-sidebar-w: 220px;
  --adm-topbar-h: 56px;
  --adm-sidebar-bg: #0f1f2e;
  --adm-sidebar-text: #b8ccd8;
  --adm-sidebar-hover: rgba(62,202,212,.12);
  --adm-sidebar-active: rgba(62,202,212,.22);
  --adm-accent: #3ecad4;
  --adm-accent2: #0d7a8c;
  --adm-bg: #f4f6f9;
  --adm-surface: #ffffff;
  --adm-border: #e2e8f0;
  --adm-text: #1a2533;
  --adm-muted: #64748b;
  --adm-danger: #dc2626;
  --adm-green: #16a34a;
  --adm-gold: #b45309;
  --adm-radius: 8px;
  --adm-shadow: 0 1px 4px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

[data-theme="dark"] {
  --adm-bg: #0d1117;
  --adm-surface: #161b22;
  --adm-border: #21262d;
  --adm-text: #e6edf3;
  --adm-muted: #8b949e;
  --adm-sidebar-bg: #080d12;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  background: var(--adm-bg);
  color: var(--adm-text);
  line-height: 1.5;
  min-height: 100vh;
}

/* ── LOGIN SCREEN ─────────────────────────────────────────── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f1f2e 0%, #0d7a8c 100%);
  padding: 24px;
}

.login-card {
  background: var(--adm-surface);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  text-align: center;
}

.login-logo {
  display: block;
  margin: 0 auto 16px;
  height: 110px;
  width: auto;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--adm-text);
  margin-bottom: 4px;
}

.login-sub {
  color: var(--adm-muted);
  font-size: 0.875rem;
  margin-bottom: 28px;
}

.login-form { text-align: right; }

.login-error {
  background: #fef2f2;
  color: var(--adm-danger);
  border: 1px solid #fecaca;
  border-radius: var(--adm-radius);
  padding: 10px 12px;
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: none;
}

.login-error:not(:empty) { display: block; }

/* ── ADMIN LAYOUT ─────────────────────────────────────────── */
.admin-wrap {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
  width: var(--adm-sidebar-w);
  background: var(--adm-sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.sidebar.collapsed {
  transform: translateX(var(--adm-sidebar-w));
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-align: center;
}

.sidebar-logo img {
  height: 72px;
  width: auto;
}

.sidebar-nav { flex: 1; padding: 12px 0; }

.sidebar-nav ul { list-style: none; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 20px;
  background: none;
  border: none;
  color: var(--adm-sidebar-text);
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: right;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
}

.nav-item:hover {
  background: var(--adm-sidebar-hover);
  color: #fff;
}

.nav-item.active {
  background: var(--adm-sidebar-active);
  color: var(--adm-accent);
  border-left: 3px solid var(--adm-accent);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.sidebar-view-site {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--adm-sidebar-text);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.15s;
}

.sidebar-view-site:hover { color: var(--adm-accent); }

/* ── ADMIN MAIN ───────────────────────────────────────────── */
.admin-main {
  flex: 1;
  margin-right: var(--adm-sidebar-w);
  margin-left: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-right 0.25s ease;
}

.admin-main.expanded { margin-right: 0; }

/* ── TOP BAR ──────────────────────────────────────────────── */
.admin-topbar {
  height: var(--adm-topbar-h);
  background: var(--adm-surface);
  border-bottom: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--adm-shadow);
}

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--adm-muted);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.sidebar-toggle:hover { color: var(--adm-text); background: var(--adm-border); }

.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-badge {
  background: var(--adm-accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--adm-border);
  color: var(--adm-muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.15s;
}

.btn-logout:hover { border-color: var(--adm-danger); color: var(--adm-danger); }

.btn-install {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--adm-accent);
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 6px;
  transition: background 0.15s;
}
.btn-install:hover { background: var(--adm-accent2); }

/* ── PANELS ───────────────────────────────────────────────── */
.panel { display: none; }
.panel.active { display: block; }

.panel-body {
  padding: 28px 28px 48px;
}

.panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.panel-hd h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

/* ── STAT CARDS ───────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--adm-shadow);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.si-blue  { background: #eff6ff; color: #2563eb; }
.si-green { background: #f0fdf4; color: #16a34a; }
.si-teal  { background: #ecfeff; color: #0891b2; }
.si-gold  { background: #fffbeb; color: #b45309; }

[data-theme="dark"] .si-blue  { background: rgba(37,99,235,.15); }
[data-theme="dark"] .si-green { background: rgba(22,163,74,.15); }
[data-theme="dark"] .si-teal  { background: rgba(8,145,178,.15); }
[data-theme="dark"] .si-gold  { background: rgba(180,83,9,.15); }

.stat-val {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--adm-text);
}

.stat-lbl {
  font-size: 0.78rem;
  color: var(--adm-muted);
  margin-top: 4px;
}

/* ── DASHBOARD COLUMNS ────────────────────────────────────── */
.dash-cols {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
}

.dash-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 20px;
  box-shadow: var(--adm-shadow);
}

.dash-card-hd {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--adm-border);
}

.recent-list {
  list-style: none;
}

.recent-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--adm-border);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

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

.recent-cat {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--adm-accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.recent-title {
  font-size: 0.85rem;
  color: var(--adm-text);
  line-height: 1.4;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qa-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--adm-bg);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 10px 14px;
  color: var(--adm-text);
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  text-align: right;
}

.qa-btn:hover {
  border-color: var(--adm-accent);
  background: rgba(62,202,212,.06);
}

/* ── TABLE ────────────────────────────────────────────────── */
.table-wrap {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  overflow: hidden;
  box-shadow: var(--adm-shadow);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.data-table thead {
  background: var(--adm-bg);
  border-bottom: 1px solid var(--adm-border);
}

.data-table th {
  padding: 12px 16px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--adm-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--adm-border);
  font-size: 0.875rem;
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover { background: rgba(62,202,212,.04); }

.td-title {
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: #ecfeff;
  color: #0891b2;
  white-space: nowrap;
}

.cat-pill.mauritania { background: #dcfce7; color: #16a34a; }
.cat-pill.world      { background: #eff6ff; color: #2563eb; }
.cat-pill.economy    { background: #fffbeb; color: #b45309; }
.cat-pill.sports     { background: #fdf4ff; color: #9333ea; }
.cat-pill.politics   { background: #fff1f2; color: #be123c; }
.cat-pill.technology { background: #f0f9ff; color: #0369a1; }
.cat-pill.culture    { background: #fef3c7; color: #92400e; }
.cat-pill.health     { background: #fdf2f8; color: #a21caf; }
.cat-pill.science    { background: #f0fdf4; color: #15803d; }
.cat-pill.life       { background: #dcfce7; color: #16a34a; }
.cat-pill.thoughts   { background: #fdf4ff; color: #9333ea; }
.cat-pill.projects   { background: #eff6ff; color: #2563eb; }
.cat-pill.travel     { background: #fff1f2; color: #be123c; }

[data-theme="dark"] .cat-pill            { background: rgba(8,145,178,.15); }
[data-theme="dark"] .cat-pill.mauritania { background: rgba(22,163,74,.15); }
[data-theme="dark"] .cat-pill.world      { background: rgba(37,99,235,.15); }
[data-theme="dark"] .cat-pill.economy    { background: rgba(180,83,9,.15); }
[data-theme="dark"] .cat-pill.sports     { background: rgba(147,51,234,.15); }
[data-theme="dark"] .cat-pill.politics   { background: rgba(190,18,60,.15); }
[data-theme="dark"] .cat-pill.technology { background: rgba(3,105,161,.15); }
[data-theme="dark"] .cat-pill.culture    { background: rgba(146,64,14,.15); }
[data-theme="dark"] .cat-pill.health     { background: rgba(162,28,175,.15); }
[data-theme="dark"] .cat-pill.science    { background: rgba(21,128,61,.15); }

.table-actions {
  display: flex;
  gap: 6px;
}

.btn-edit, .btn-del {
  border: none;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 500;
  transition: opacity 0.15s;
}

.btn-edit { background: #eff6ff; color: #2563eb; }
.btn-edit:hover { opacity: .8; }
.btn-del  { background: #fef2f2; color: var(--adm-danger); }
.btn-del:hover { opacity: .8; }

[data-theme="dark"] .btn-edit { background: rgba(37,99,235,.2); }
[data-theme="dark"] .btn-del  { background: rgba(220,38,38,.2); }

/* ── FORMS ────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--adm-text);
}

.req { color: var(--adm-danger); }

input[type="text"],
input[type="password"],
input[type="url"],
input[type="date"],
input[type="email"],
select,
textarea {
  padding: 9px 12px;
  border: 1px solid var(--adm-border);
  border-radius: 6px;
  background: var(--adm-surface);
  color: var(--adm-text);
  font-family: inherit;
  font-size: 0.875rem;
  transition: border-color 0.15s;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--adm-accent);
  box-shadow: 0 0 0 3px rgba(62,202,212,.15);
}

textarea { resize: vertical; min-height: 80px; }

.pass-wrap { position: relative; }
.pass-wrap input { padding-left: 40px; padding-right: 12px; }

.toggle-pass {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--adm-muted);
  display: flex;
  align-items: center;
  padding: 2px;
}

.toggle-pass:hover { color: var(--adm-text); }

.article-form {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 28px;
  box-shadow: var(--adm-shadow);
}

.article-body-textarea {
  resize: vertical;
  min-height: 420px;
  font-size: 0.9rem;
  line-height: 1.8;
  font-family: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
}

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

.form-error {
  background: #fef2f2;
  color: var(--adm-danger);
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: none;
}

.form-error:not(:empty) { display: block; }

.form-success {
  background: #f0fdf4;
  color: var(--adm-green);
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: none;
}

.form-success:not(:empty) { display: block; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary {
  background: var(--adm-accent);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover { background: var(--adm-accent2); }

.btn-primary.btn-full { width: 100%; }

.btn-secondary {
  background: var(--adm-bg);
  color: var(--adm-text);
  border: 1px solid var(--adm-border);
  padding: 9px 18px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s;
}

.btn-secondary:hover { border-color: var(--adm-muted); }

.btn-danger {
  background: var(--adm-danger);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-danger:hover { opacity: .85; }

/* ── SETTINGS ─────────────────────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.settings-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 24px;
  box-shadow: var(--adm-shadow);
}

.settings-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--adm-border);
}

.theme-btns { display: flex; gap: 10px; margin-top: 4px; }

.theme-opt {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--adm-border);
  border-radius: var(--adm-radius);
  background: var(--adm-bg);
  color: var(--adm-text);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.15s;
}

.theme-opt.active { border-color: var(--adm-accent); color: var(--adm-accent); }

/* ── DELETE MODAL ─────────────────────────────────────────── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-box {
  background: var(--adm-surface);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.modal-box h2 { font-size: 1.1rem; margin-bottom: 8px; }
.modal-box p  { color: var(--adm-muted); font-size: 0.875rem; margin-bottom: 20px; }

.modal-btns { display: flex; gap: 10px; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .dash-cols { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .stats-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .sidebar { transform: translateX(var(--adm-sidebar-w)); }
  .sidebar.mobile-open { transform: translateX(0); }
  .admin-main { margin-right: 0; }
  .panel-body { padding: 16px; }
  .admin-topbar { padding: 0 16px; }
}

/* ── SIDEBAR NAV COUNTER BADGE ──────────────────────────────── */
.nav-counter {
  margin-right: auto;
  background: var(--adm-accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
  line-height: 1.6;
}
.nav-counter:empty { display: none; }

/* ── STAT CARD: PURPLE ──────────────────────────────────────── */
.si-purple { background: #fdf4ff; color: #9333ea; }
[data-theme="dark"] .si-purple { background: rgba(147,51,234,.15); }

/* ── PANEL SUBTITLE ─────────────────────────────────────────── */
.panel-sub {
  font-size: 0.78rem;
  color: var(--adm-muted);
  font-weight: 400;
}

/* ── ARTICLE STATUS PILL ────────────────────────────────────── */
.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.status-pill:hover { opacity: .75; }
.status-pill.published { background: #dcfce7; color: #16a34a; }
.status-pill.draft     { background: #fef3c7; color: #92400e; }
[data-theme="dark"] .status-pill.published { background: rgba(22,163,74,.2); }
[data-theme="dark"] .status-pill.draft     { background: rgba(180,83,9,.2); }

/* ── COMMENTS TABLE ─────────────────────────────────────────── */
.td-comment {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
  color: var(--adm-muted);
}

/* ── MEDIA TABS ─────────────────────────────────────────────── */
.media-tabs {
  display: flex;
  gap: 4px;
  background: var(--adm-bg);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 4px;
  margin-bottom: 22px;
  width: fit-content;
}
.media-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 20px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--adm-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.media-tab.active {
  background: var(--adm-surface);
  color: var(--adm-text);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.media-tab:hover:not(.active) { color: var(--adm-text); }

/* ── MEDIA ADD CARD ─────────────────────────────────────────── */
.media-add-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--adm-shadow);
}
.media-add-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--adm-border);
}
.form-label-lg {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--adm-text);
  display: block;
  margin-bottom: 10px;
}

/* ── PHOTO GRID ─────────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.photo-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  overflow: hidden;
  box-shadow: var(--adm-shadow);
  position: relative;
  transition: box-shadow 0.15s;
}
.photo-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.photo-card-img {
  width: 100%;
  height: 155px;
  object-fit: cover;
  display: block;
  background: var(--adm-bg);
}
.photo-card-del {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(220,38,38,.85);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s;
  backdrop-filter: blur(2px);
}
.photo-card:hover .photo-card-del { opacity: 1; }
.photo-card-body { padding: 10px 12px 12px; }
.photo-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--adm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.photo-card-caption {
  font-size: 0.75rem;
  color: var(--adm-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
}
.photo-card-date { font-size: 0.72rem; color: var(--adm-muted); }

/* ── ADS GRID ──────────────────────────────────────────────── */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.ad-card .photo-card-img { object-fit: contain; background: var(--adm-bg); }
.ad-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

/* ── VIDEO LIST ─────────────────────────────────────────────── */
.video-list { display: flex; flex-direction: column; gap: 10px; }
.video-item {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--adm-shadow);
}
.video-thumb {
  width: 96px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--adm-bg);
}
.video-thumb-placeholder {
  width: 96px;
  height: 54px;
  border-radius: 6px;
  background: var(--adm-bg);
  border: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--adm-muted);
}
.video-info { flex: 1; min-width: 0; }
.video-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--adm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.video-url {
  font-size: 0.72rem;
  color: var(--adm-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  text-decoration: none;
}
.video-url:hover { color: var(--adm-accent); }
.video-date { font-size: 0.75rem; color: var(--adm-muted); white-space: nowrap; margin-left: 8px; }

/* ── BREAKING NEWS PANEL ────────────────────────────────────── */
.breaking-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}
.breaking-input-row input { flex: 1; }
.char-counter {
  font-size: 0.75rem;
  color: var(--adm-muted);
  text-align: right;
  margin-bottom: 4px;
}
.breaking-items-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.breaking-items-hd h3 { font-size: 0.95rem; font-weight: 600; }
.breaking-item-list { display: flex; flex-direction: column; gap: 8px; }
.breaking-item {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--adm-shadow);
}
.breaking-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--adm-accent);
  flex-shrink: 0;
}
.breaking-item-text {
  flex: 1;
  font-size: 0.875rem;
  color: var(--adm-text);
}

/* ── EMPTY STATE ────────────────────────────────────────────── */
.media-empty {
  text-align: center;
  color: var(--adm-muted);
  padding: 40px 20px;
  font-size: 0.875rem;
  border: 2px dashed var(--adm-border);
  border-radius: var(--adm-radius);
}

/* ── SMALL BUTTON VARIANT ───────────────────────────────────── */
.btn-sm { font-size: 0.75rem !important; padding: 5px 10px !important; }

/* ── FIELD HINT ──────────────────────────────────────────────── */
.field-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--adm-muted);
  margin-right: 6px;
}

/* ── MEDIA INPUT ROWS (multi-image / multi-video) ────────────── */
.media-inputs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.media-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.media-input-row input {
  flex: 1;
  margin-bottom: 0;
}

.media-input-row--video input:first-child {
  flex: 0 0 200px;
}

.remove-row-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #fef2f2;
  color: var(--adm-danger);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.remove-row-btn:hover { background: #fecaca; }

[data-theme="dark"] .remove-row-btn { background: rgba(220,38,38,.15); }

.btn-add-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px dashed var(--adm-border);
  color: var(--adm-muted);
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  margin-top: 6px;
}
.btn-add-row:hover { border-color: var(--adm-accent); color: var(--adm-accent); }

/* ── FORM ACTIONS with icon ──────────────────────────────────── */
.form-actions .btn-primary { display: inline-flex; align-items: center; gap: 7px; }
