/* ============================================
   KAMILI STUDIOS - Admin Panel CSS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --yellow: #FFCD2C;
  --orange: #FDAB3B;
  --black: #0A0A0A;
  --white: #FFFFFF;
  --offwhite: #F8F9FA;
  --text: #1A1A1A;
  --text-muted: #6C757D;
  --border: #E8E8E5;
  --success: #28A745;
  --danger: #DC3545;
  --warning: #FFC107;
  --info: #17A2B8;
  --sidebar-w: 260px;
  --header-h: 60px;
  --gradient: linear-gradient(135deg, var(--yellow) 0%, var(--orange) 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; font-size: 14px; color: var(--text); background: var(--offwhite); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* --- Login --- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
}
.login-card {
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.login-card h1 { font-size: 1.5rem; margin-bottom: 8px; text-align: center; }
.login-card p { text-align: center; color: var(--text-muted); margin-bottom: 24px; font-size: 0.9rem; }
.login-card .logo { text-align: center; margin-bottom: 20px; }
.login-card .logo img { height: 50px; margin: 0 auto; }

/* --- Layout --- */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: var(--black);
  color: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.sidebar__logo { padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar__logo img { height: 35px; }
.sidebar__nav { padding: 16px 0; }
.sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
}
.sidebar__nav a:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.sidebar__nav a.active { color: var(--yellow); background: rgba(255,205,44,0.1); border-right: 3px solid var(--yellow); }
.sidebar__nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar__nav .nav-section { padding: 8px 20px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.3); margin-top: 16px; }

.main-content { margin-left: var(--sidebar-w); flex: 1; }
.admin-header {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-header h2 { font-size: 1.1rem; font-weight: 600; }
.admin-header__user { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; }
.admin-header__user span { color: var(--text-muted); }
.admin-body { padding: 24px; }

/* --- Cards --- */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--white);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--border);
}
.stat-card__label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.stat-card__value { font-size: 2rem; font-weight: 700; }

/* --- Table --- */
.table-card {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 24px;
}
.table-card__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.table-card__header h3 { font-size: 1rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
th { background: var(--offwhite); font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.5px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFAF8; }

/* --- Status Badges --- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.badge--new { background: #E3F2FD; color: #1565C0; }
.badge--contacted { background: #FFF3E0; color: #E65100; }
.badge--confirmed { background: #E8F5E9; color: #2E7D32; }
.badge--completed { background: #F3E5F5; color: #7B1FA2; }
.badge--cancelled { background: #FFEBEE; color: #C62828; }
.badge--unread { background: #E3F2FD; color: #1565C0; }
.badge--read { background: #F5F5F5; color: #757575; }
.badge--published { background: #E8F5E9; color: #2E7D32; }
.badge--draft { background: #FFF3E0; color: #E65100; }

/* --- Forms --- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--white);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--yellow); outline: none; }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  transition: all 0.2s;
}
.btn--primary { background: var(--gradient); color: var(--black); }
.btn--primary:hover { opacity: 0.9; }
.btn--danger { background: var(--danger); color: var(--white); }
.btn--danger:hover { opacity: 0.9; }
.btn--outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn--outline:hover { border-color: var(--yellow); }
.btn--sm { padding: 5px 10px; font-size: 0.78rem; }
.btn--block { width: 100%; justify-content: center; }

/* --- Alerts --- */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 0.85rem; }
.alert--success { background: #E8F5E9; color: #2E7D32; border: 1px solid #C8E6C9; }
.alert--error { background: #FFEBEE; color: #C62828; border: 1px solid #FFCDD2; }

/* --- Detail View --- */
.detail-card {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 24px;
}
.detail-card h3 { margin-bottom: 16px; font-size: 1rem; }
.detail-row { display: flex; margin-bottom: 12px; }
.detail-row__label { width: 140px; font-weight: 600; font-size: 0.85rem; color: var(--text-muted); }
.detail-row__value { flex: 1; font-size: 0.85rem; }

/* --- Empty State --- */
.empty-state { text-align: center; padding: 48px; color: var(--text-muted); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .sidebar { width: 0; overflow: hidden; }
  .main-content { margin-left: 0; }
  .stat-cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
