/* OtakuMinds Admin Panel — v2 Bright Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Bebas+Neue&display=swap');

:root {
  --bg-page:   #f5f6fa;
  --bg-white:  #ffffff;
  --bg-soft:   #f0f1f8;
  --bg-card:   #ffffff;
  --border:    #e2e4f0;
  --border-dk: #c8cbe0;

  --text-primary:   #0f0f23;
  --text-secondary: #5a5c7a;
  --text-muted:     #9395b0;

  --accent-red:    #e8284a;
  --accent-red-lt: #fff0f2;
  --accent-blue:   #3d5afe;
  --accent-gold:   #f59e0b;
  --accent-green:  #10b981;
  --accent-purple: #7c3aed;

  --hero-bg:    #0f0f23;
  --hero-border:#2a2a50;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --transition: all 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg-page); color: var(--text-primary); font-family: var(--font-body); font-size: 14px; display: flex; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { line-height: 1.2; }

/* ─── SIDEBAR ─── */
.admin-sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--hero-bg);
  border-right: 1px solid var(--hero-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid var(--hero-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: #fff;
}
.sidebar-logo .red { color: var(--accent-red); }
.sidebar-logo .admin-badge {
  font-family: var(--font-body);
  font-size: 0.6rem;
  background: var(--accent-red);
  color: #fff;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 0.25rem;
}

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

.sidebar-section-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #404070;
  padding: 0.875rem 1.25rem 0.3rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.83rem;
  font-weight: 500;
  color: #7070a0;
  transition: var(--transition);
  position: relative;
}
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.sidebar-link.active { color: #fff; background: rgba(232,40,74,0.12); }
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-red);
  border-radius: 0 2px 2px 0;
}
.sidebar-icon { font-size: 0.95rem; width: 18px; flex-shrink: 0; }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--hero-border);
  font-size: 0.75rem;
  color: #404070;
}

/* ─── MAIN ─── */
.admin-main { margin-left: 240px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.admin-topbar {
  height: 56px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.admin-topbar-title { font-size: 1rem; font-weight: 700; }
.admin-user { display: flex; align-items: center; gap: 0.65rem; font-size: 0.82rem; color: var(--text-secondary); }
.admin-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-red);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.82rem; color: #fff;
}

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

/* ─── STAT CARDS ─── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.25rem; margin-bottom: 1.75rem; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-dk); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.stat-icon.red    { background: #fff0f2; }
.stat-icon.cyan   { background: #e0fffe; }
.stat-icon.gold   { background: #fffbeb; }
.stat-icon.purple { background: #f3f0ff; }
.stat-info-value { font-size: 1.8rem; font-weight: 900; line-height: 1; }
.stat-info-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-top: 0.2rem; }

/* ─── TABLE CARD ─── */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.table-title { font-size: 0.88rem; font-weight: 700; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.admin-table td {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.83rem;
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--bg-soft); }

.table-thumb { width: 36px; height: 50px; object-fit: cover; border-radius: 3px; background: var(--bg-soft); }
.table-thumb-placeholder { width: 36px; height: 50px; border-radius: 3px; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; color: var(--border-dk); font-size: 1.1rem; }

.action-btns { display: flex; gap: 0.4rem; }
.action-btn {
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-secondary);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.action-btn:hover { background: var(--bg-white); border-color: var(--border-dk); color: var(--text-primary); }
.action-btn.btn-danger { border-color: #fecdd3; color: #e11d48; background: #fff0f2; }
.action-btn.btn-danger:hover { background: #ffe4e6; border-color: #fca5a5; }
.action-btn.btn-edit { border-color: #bfdbfe; color: var(--accent-blue); background: #eff6ff; }
.action-btn.btn-edit:hover { background: #dbeafe; }

/* ─── BADGES ─── */
.badge { display: inline-block; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.18rem 0.5rem; border-radius: 3px; }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef3c7; color: #92400e; }

/* ─── FORMS ─── */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  max-width: 860px;
  box-shadow: var(--shadow-sm);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); }
.form-input, .form-select, .form-textarea {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 0.55rem 0.825rem;
  outline: none;
  transition: var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(232,40,74,.1);
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary   { background: var(--accent-red); color: #fff; }
.btn-primary:hover { background: #c41e38; }
.btn-secondary { background: var(--bg-soft); color: var(--text-primary); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-dk); background: var(--bg-white); }
.btn-danger    { background: #fee2e2; color: #991b1b; border: 1px solid #fecdd3; }
.btn-danger:hover { background: #fecdd3; }

/* ─── ALERTS ─── */
.alert {
  padding: 0.875rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
}
.alert-success { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; }
.alert-error   { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }

/* ─── IMPORT DROP ZONE ─── */
.drop-zone {
  border: 2px dashed var(--border-dk);
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.drop-zone:hover, .drop-zone.dragging { border-color: var(--accent-red); background: var(--accent-red-lt); }
.drop-zone-icon  { font-size: 2.5rem; margin-bottom: 0.75rem; color: var(--text-muted); }
.drop-zone-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.drop-zone-sub   { font-size: 0.82rem; color: var(--text-muted); }

.import-preview {
  background: #1e1e2e;
  color: #a0a0c8;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: monospace;
  font-size: 0.78rem;
  max-height: 180px;
  overflow-y: auto;
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* ─── LOGIN ─── */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--hero-bg); padding: 2rem; }
.login-card {
  width: 100%; max-width: 380px;
  background: #1a1a3a;
  border: 1px solid var(--hero-border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.login-card .form-input {
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.12);
  color: #fff;
}
.login-card .form-input::placeholder { color: #6060a0; }
.login-card .form-input:focus { border-color: var(--accent-red); background: rgba(255,255,255,0.1); }
.login-card .form-label { color: #9090b8; }
.login-logo { text-align: center; margin-bottom: 2rem; font-family: var(--font-display); font-size: 2rem; letter-spacing: 0.05em; color: #fff; }
.login-logo .red { color: var(--accent-red); }
