/* ==========================================================================
   ShortCima Admin Panel — Design System
   Dark OLED | Red Accent | RTL
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  --bg:          #07080e;
  --bg-2:        #0d0f1a;
  --bg-3:        #121523;
  --bg-card:     rgba(18, 21, 35, 0.85);
  --sidebar-bg:  #090b14;
  --sidebar-w:   260px;

  --primary:     #E8192C;
  --primary-d:   #a50e1c;
  --primary-g:   rgba(232,25,44,0.35);

  --gold:        #f59e0b;
  --green:       #10b981;
  --cyan:        #22d3ee;
  --purple:      #8b5cf6;
  --orange:      #f97316;

  --text:        #e2e8f0;
  --text-m:      #94a3b8;
  --text-d:      #475569;
  --border:      rgba(255,255,255,0.07);
  --border-h:    rgba(255,255,255,0.13);

  --font:   'Cairo', system-ui, sans-serif;
  --font-en:'Outfit', sans-serif;

  --t: 0.2s cubic-bezier(0.4,0,0.2,1);
  --r: 12px;
  --r2: 18px;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{font-size:16px;background:var(--bg);color:var(--text);font-family:var(--font);direction:rtl;overflow-x:hidden;}
body{min-height:100vh;display:flex;line-height:1.6;}
a{text-decoration:none;color:inherit;}
button{cursor:pointer;font-family:inherit;border:none;}
ul{list-style:none;}
input,textarea,select{font-family:inherit;}
img{display:block;max-width:100%;}
::-webkit-scrollbar{width:5px;height:5px;}
::-webkit-scrollbar-track{background:var(--bg);}
::-webkit-scrollbar-thumb{background:rgba(232,25,44,0.35);border-radius:99px;}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--t);
}
.sidebar-logo {
  padding: 1.5rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-en);
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
}
.sidebar-logo .logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 0 16px var(--primary-g);
}
.logo-accent { color: var(--primary); }
.sidebar-admin-badge {
  margin: 0 1.2rem 1rem;
  padding: 0.6rem 0.8rem;
  background: rgba(232,25,44,0.1);
  border: 1px solid rgba(232,25,44,0.2);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
}
.admin-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}
.admin-info { flex: 1; }
.admin-name { font-size: 0.85rem; font-weight: 800; color: #fff; }
.admin-role { font-size: 0.7rem; color: var(--primary); font-weight: 600; }

/* Nav */
.sidebar-nav { flex: 1; padding: 0.5rem 0.75rem; display: flex; flex-direction: column; gap: 2px; }
.nav-group-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-d);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 1rem 0.6rem 0.4rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--r);
  color: var(--text-m);
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--t);
  position: relative;
  border: 1px solid transparent;
}
.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
  border-color: var(--border);
}
.nav-item.active {
  color: #fff;
  background: rgba(232,25,44,0.12);
  border-color: rgba(232,25,44,0.25);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  right: -0.75rem;
  top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px;
  background: var(--primary);
  border-radius: 2px;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-badge {
  margin-right: auto;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}
.sidebar-bottom {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}
.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--r);
  background: rgba(232,25,44,0.08);
  border: 1px solid rgba(232,25,44,0.2);
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--t);
}
.btn-logout:hover { background: rgba(232,25,44,0.18); }
.btn-logout svg { width: 17px; height: 17px; }

/* ── Main Content ── */
.main-content {
  flex: 1;
  margin-right: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Bar */
.topbar {
  position: sticky;
  top: 0; z-index: 90;
  background: rgba(7,8,14,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topbar-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.topbar-title span { color: var(--text-m); font-weight: 500; font-size: 0.85rem; }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.btn-topbar {
  display: flex; align-items: center; gap: 0.45rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-m);
  padding: 0.45rem 0.9rem;
  border-radius: var(--r);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--t);
}
.btn-topbar:hover { color: #fff; background: rgba(255,255,255,0.1); }
.btn-topbar svg { width: 16px; height: 16px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff; padding: 0.5rem 1.2rem;
  border-radius: var(--r); font-size: 0.88rem;
  font-weight: 800; border: none;
  box-shadow: 0 4px 16px var(--primary-g);
  transition: all var(--t); cursor: pointer;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 22px var(--primary-g); }
.btn-primary svg { width: 17px; height: 17px; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text); padding: 0.5rem 1.1rem;
  border-radius: var(--r); font-size: 0.88rem;
  font-weight: 700; cursor: pointer; transition: all var(--t);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); border-color: var(--border-h); }
.btn-secondary svg { width: 16px; height: 16px; }
.btn-danger {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(232,25,44,0.12);
  border: 1px solid rgba(232,25,44,0.25);
  color: #ff5252; padding: 0.42rem 0.8rem;
  border-radius: 8px; font-size: 0.82rem;
  font-weight: 700; cursor: pointer; transition: all var(--t);
}
.btn-danger:hover { background: rgba(232,25,44,0.22); }
.btn-danger svg { width: 15px; height: 15px; }
.btn-edit {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.25);
  color: var(--cyan); padding: 0.42rem 0.8rem;
  border-radius: 8px; font-size: 0.82rem;
  font-weight: 700; cursor: pointer; transition: all var(--t);
}
.btn-edit:hover { background: rgba(34,211,238,0.2); }
.btn-edit svg { width: 15px; height: 15px; }

/* ── Page Body ── */
.page-body { flex: 1; padding: 1.5rem; }

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 1.3rem;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: all var(--t);
}
.stat-card:hover { border-color: var(--border-h); transform: translateY(-3px); }
.stat-card::before {
  content: '';
  position: absolute;
  top: -30px; left: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.25;
}
.stat-card.red::before   { background: var(--primary); }
.stat-card.gold::before  { background: var(--gold); }
.stat-card.green::before { background: var(--green); }
.stat-card.cyan::before  { background: var(--cyan); }
.stat-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}
.stat-card.red   .stat-icon { background: rgba(232,25,44,0.15); }
.stat-card.gold  .stat-icon { background: rgba(245,158,11,0.15); }
.stat-card.green .stat-icon { background: rgba(16,185,129,0.15); }
.stat-card.cyan  .stat-icon { background: rgba(34,211,238,0.15); }
.stat-value { font-size: 1.9rem; font-weight: 900; color: #fff; line-height: 1; margin-bottom: 0.3rem; }
.stat-label { font-size: 0.82rem; color: var(--text-m); font-weight: 600; }
.stat-change { font-size: 0.75rem; color: var(--green); margin-top: 0.4rem; font-weight: 700; }

/* ── Content Card ── */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem; flex-wrap: wrap;
}
.card-title {
  font-size: 1rem; font-weight: 800; color: #fff;
  display: flex; align-items: center; gap: 0.5rem;
}
.card-title svg { width: 20px; height: 20px; stroke: var(--primary); }
.card-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

/* Search & Filter Bar */
.filter-bar {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
.search-field {
  position: relative; flex: 1; min-width: 200px;
}
.search-field svg {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; stroke: var(--text-d); pointer-events: none;
}
.search-field input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.55rem 2.5rem 0.55rem 0.9rem;
  border-radius: var(--r);
  color: var(--text);
  font-size: 0.88rem;
  transition: all var(--t);
}
.search-field input::placeholder { color: var(--text-d); }
.search-field input:focus { outline: none; border-color: var(--primary); background: rgba(0,0,0,0.4); box-shadow: 0 0 0 3px rgba(232,25,44,0.1); }
.filter-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.55rem 0.9rem;
  border-radius: var(--r);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--t);
}
.filter-select:focus { outline: none; border-color: var(--primary); }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 1px solid var(--border); }
thead th {
  padding: 0.85rem 1.2rem;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-d);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
tbody tr:hover { background: rgba(255,255,255,0.025); }
tbody tr:last-child { border-bottom: none; }
tbody td {
  padding: 1rem 1.2rem;
  font-size: 0.88rem;
  color: var(--text);
  vertical-align: middle;
}

/* Series Row */
.series-thumb {
  width: 48px; height: 68px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.series-info { display: flex; align-items: center; gap: 0.85rem; }
.series-meta { display: flex; flex-direction: column; gap: 2px; }
.series-name { font-weight: 800; color: #fff; font-size: 0.9rem; line-height: 1.3; }
.series-sub { font-size: 0.75rem; color: var(--text-m); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 800;
  padding: 3px 9px; border-radius: 99px;
}
.badge-red    { background: rgba(232,25,44,0.15); color: #ff6b6b; border: 1px solid rgba(232,25,44,0.3); }
.badge-gold   { background: rgba(245,158,11,0.15); color: var(--gold); border: 1px solid rgba(245,158,11,0.3); }
.badge-green  { background: rgba(16,185,129,0.15); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.badge-cyan   { background: rgba(34,211,238,0.15); color: var(--cyan); border: 1px solid rgba(34,211,238,0.3); }
.badge-purple { background: rgba(139,92,246,0.15); color: var(--purple); border: 1px solid rgba(139,92,246,0.3); }
.badge-gray   { background: rgba(255,255,255,0.07); color: var(--text-m); border: 1px solid var(--border); }

.rating-star { color: var(--gold); font-weight: 900; }
.actions-cell { display: flex; align-items: center; gap: 0.5rem; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(14px);
  z-index: 500;
  display: none;
  align-items: center; justify-content: center;
  padding: 1.5rem;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--bg-2);
  border: 1px solid var(--border-h);
  border-radius: var(--r2);
  width: 100%; max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.22s ease-out;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
}
@keyframes modalIn { from { opacity:0; transform:scale(0.94) translateY(16px); } to { opacity:1; transform:scale(1) translateY(0); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.3rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--bg-2);
  z-index: 10;
}
.modal-title { font-size: 1.1rem; font-weight: 900; color: #fff; display: flex; align-items: center; gap: 0.5rem; }
.modal-title svg { width: 20px; height: 20px; stroke: var(--primary); }
.modal-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-m);
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; cursor: pointer; transition: all var(--t);
}
.modal-close:hover { color: #fff; background: rgba(232,25,44,0.2); border-color: rgba(232,25,44,0.3); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── Form ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 0.82rem; font-weight: 700; color: var(--text-m); }
.form-label .req { color: var(--primary); margin-right: 2px; }
.form-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.6rem 0.9rem;
  border-radius: var(--r);
  color: var(--text);
  font-size: 0.9rem;
  transition: all var(--t);
  width: 100%;
}
.form-input::placeholder { color: var(--text-d); }
.form-input:focus { outline: none; border-color: var(--primary); background: rgba(0,0,0,0.4); box-shadow: 0 0 0 3px rgba(232,25,44,0.1); }
textarea.form-input { resize: vertical; min-height: 90px; }
select.form-input { cursor: pointer; }
.form-hint { font-size: 0.75rem; color: var(--text-d); margin-top: 2px; }

/* Poster Preview */
.poster-preview-wrap {
  width: 100%; height: 160px;
  border-radius: var(--r);
  border: 2px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
  transition: border-color var(--t);
  background: rgba(0,0,0,0.3);
}
.poster-preview-wrap:hover { border-color: var(--primary); }
.poster-preview-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }
.poster-placeholder { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: var(--text-d); font-size: 0.82rem; font-weight: 600; }
.poster-placeholder svg { width: 32px; height: 32px; }

/* Server links */
.server-row {
  display: grid;
  grid-template-columns: 140px 1fr 36px;
  gap: 0.5rem; align-items: center;
  margin-bottom: 0.5rem;
}
.btn-add-server {
  display: flex; align-items: center; gap: 0.4rem;
  background: rgba(16,185,129,0.1);
  border: 1px dashed rgba(16,185,129,0.4);
  color: var(--green);
  padding: 0.5rem 0.9rem;
  border-radius: var(--r); font-size: 0.82rem;
  font-weight: 700; cursor: pointer; transition: all var(--t);
  margin-top: 0.3rem;
}
.btn-add-server:hover { background: rgba(16,185,129,0.18); }
.btn-remove-server {
  background: rgba(232,25,44,0.1);
  border: 1px solid rgba(232,25,44,0.25);
  color: #ff6b6b; width: 36px; height: 36px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--t);
}
.btn-remove-server:hover { background: rgba(232,25,44,0.22); }
.btn-remove-server svg { width: 14px; height: 14px; }

/* Toggle Switch */
.toggle-wrap { display: flex; align-items: center; gap: 0.75rem; }
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border);
  border-radius: 99px; cursor: pointer;
  transition: all var(--t);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 2px; top: 2px;
  background: var(--text-m);
  border-radius: 50%;
  transition: all var(--t);
}
.toggle input:checked + .toggle-slider { background: rgba(16,185,129,0.25); border-color: rgba(16,185,129,0.5); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); background: var(--green); }
.toggle-label { font-size: 0.88rem; font-weight: 700; color: var(--text); }

/* Empty State */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 4rem 2rem; gap: 1rem;
  color: var(--text-d);
}
.empty-state svg { width: 56px; height: 56px; opacity: 0.3; }
.empty-state h3 { font-size: 1rem; font-weight: 800; color: var(--text-m); }
.empty-state p { font-size: 0.85rem; text-align: center; max-width: 300px; line-height: 1.6; }

/* Pagination */
.table-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; border-top: 1px solid var(--border);
  flex-wrap: wrap; gap: 0.75rem;
}
.table-info { font-size: 0.82rem; color: var(--text-d); }
.pagination { display: flex; align-items: center; gap: 0.4rem; }
.page-btn {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-m);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700; cursor: pointer;
  transition: all var(--t);
}
.page-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Toast */
.toast-container { position: fixed; bottom: 1.5rem; left: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  background: var(--bg-3);
  border: 1px solid var(--border-h);
  border-radius: var(--r);
  padding: 0.8rem 1.1rem;
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.88rem; font-weight: 700;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: toastIn 0.25s ease-out;
  min-width: 240px;
}
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.success .toast-icon { color: var(--green); }
.toast.error { border-color: rgba(232,25,44,0.4); }
.toast.error .toast-icon { color: var(--primary); }
.toast-icon { font-size: 1.1rem; }
@keyframes toastIn { from { opacity:0; transform:translateX(-20px); } to { opacity:1; transform:translateX(0); } }

/* Confirm Dialog */
.confirm-box {
  background: var(--bg-2);
  border: 1px solid var(--border-h);
  border-radius: var(--r2);
  padding: 2rem;
  max-width: 420px;
  text-align: center;
  animation: modalIn 0.2s ease-out;
}
.confirm-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.confirm-title { font-size: 1.2rem; font-weight: 900; color: #fff; margin-bottom: 0.6rem; }
.confirm-msg { font-size: 0.9rem; color: var(--text-m); line-height: 1.65; margin-bottom: 1.5rem; }
.confirm-actions { display: flex; justify-content: center; gap: 0.75rem; }

/* ── Login Page ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.login-glow {
  position: absolute; border-radius: 50%;
  filter: blur(120px); pointer-events: none; opacity: 0.2;
}
.login-glow-1 { width: 500px; height: 500px; background: var(--primary); top: -150px; right: -100px; }
.login-glow-2 { width: 400px; height: 400px; background: var(--cyan); bottom: -100px; left: -100px; opacity: 0.1; }
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-radius: var(--r2);
  padding: 2.5rem;
  width: 100%; max-width: 420px;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  position: relative; z-index: 1;
}
.login-logo {
  display: flex; align-items: center; justify-content: center;
  gap: 0.6rem; margin-bottom: 0.5rem;
  font-family: var(--font-en); font-size: 1.8rem; font-weight: 900; color: #fff;
}
.login-logo .logo-icon { width: 44px; height: 44px; border-radius: 12px; font-size: 1.1rem; }
.login-subtitle { text-align: center; font-size: 0.88rem; color: var(--text-m); margin-bottom: 2rem; }
.login-form { display: flex; flex-direction: column; gap: 1rem; }
.form-input-wrap { position: relative; }
.form-input-wrap svg {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; stroke: var(--text-d); pointer-events: none;
}
.form-input-wrap input {
  padding-right: 2.5rem;
}
.btn-login {
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff; border: none;
  padding: 0.8rem;
  border-radius: var(--r); font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 4px 20px var(--primary-g);
  transition: all var(--t); cursor: pointer; width: 100%;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--primary-g); }
.login-hint { text-align: center; font-size: 0.78rem; color: var(--text-d); margin-top: 1rem; }

/* ── Dashboard Charts (CSS only) ── */
.quick-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.recent-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; }

/* Activity list */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
.activity-item:hover { background: rgba(255,255,255,0.02); }
.activity-item:last-child { border-bottom: none; }
.activity-thumb {
  width: 42px; height: 58px;
  border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border); flex-shrink: 0;
}
.activity-info { flex: 1; }
.activity-name { font-size: 0.88rem; font-weight: 700; color: #fff; }
.activity-meta { font-size: 0.75rem; color: var(--text-m); margin-top: 2px; }
.activity-time { font-size: 0.72rem; color: var(--text-d); white-space: nowrap; }

/* Top series list */
.top-series-list { display: flex; flex-direction: column; gap: 0px; }
.top-series-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
.top-series-item:hover { background: rgba(255,255,255,0.02); }
.top-series-item:last-child { border-bottom: none; }
.top-rank {
  font-size: 1rem; font-weight: 900;
  color: var(--text-d); min-width: 24px; text-align: center;
}
.top-rank.gold-rank { color: var(--gold); }
.top-rank.silver-rank { color: #94a3b8; }
.top-rank.bronze-rank { color: #cd7c2f; }
.top-series-thumb {
  width: 36px; height: 50px;
  border-radius: 6px; object-fit: cover;
  border: 1px solid var(--border); flex-shrink: 0;
}
.top-series-info { flex: 1; }
.top-series-name { font-size: 0.85rem; font-weight: 700; color: #fff; }
.top-series-views { font-size: 0.72rem; color: var(--text-m); }
.top-series-bar-wrap { width: 70px; }
.top-series-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; }
.top-series-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold)); border-radius: 99px; }

/* Responsive */
@media(max-width:1100px){
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .recent-grid { grid-template-columns: 1fr; }
}
@media(max-width:900px){
  :root{ --sidebar-w: 220px; }
  .form-grid { grid-template-columns: 1fr; }
}
@media(max-width:768px){
  .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-right: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .series-info { gap: 0.6rem; }
  .mobile-menu-btn { display: flex; }
}
