/* ═══════════════════════════════════════════
   BAIA HOLDING — Admin Panel Styles
   ═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #C9A96E;
  --primary-dark: #8B7340;
  --bg: #F4F1ED;
  --sidebar-bg: #1A1A2E;
  --card-bg: #fff;
  --text: #2D2D2D;
  --text-muted: #8A8A8A;
  --border: #E5E0D8;
  --danger: #D64545;
  --success: #2D8B55;
  --warning: #E8A317;
  --info: #3B82F6;
  --radius: 14px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Nunito Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }

/* ─── Layout ─── */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; background: var(--sidebar-bg); color: #fff;
  padding: 24px 0; display: flex; flex-direction: column; position: fixed;
  top: 0; bottom: 0; left: 0; z-index: 50;
}
.sidebar-logo { padding: 0 24px 32px; display: flex; align-items: center; gap: 12px; }
.sidebar-logo-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
}
.sidebar-logo-text { font-size: 16px; font-weight: 700; }
.sidebar-logo-sub { font-size: 10px; letter-spacing: 2px; color: var(--primary); text-transform: uppercase; }
.sidebar-nav { flex: 1; }
.sidebar-link {
  display: flex; align-items: center; gap: 14px; padding: 14px 28px;
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.55);
  transition: all 0.3s; cursor: pointer; border: none; background: none; width: 100%; text-align: left;
}
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,0.06); }
.sidebar-link.active { color: var(--primary); background: rgba(201,169,110,0.1); border-right: 3px solid var(--primary); }
.sidebar-link-icon { font-size: 20px; width: 24px; text-align: center; }
.sidebar-footer { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-footer-btn {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.12);
  background: none; color: rgba(255,255,255,0.6); font-family: var(--font);
  font-size: 13px; cursor: pointer; width: 100%; transition: all 0.3s;
}
.sidebar-footer-btn:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

.main-content { margin-left: 260px; flex: 1; padding: 32px; }

/* ─── Top Bar ─── */
.topbar {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px;
}
.topbar h1 { font-size: 28px; font-weight: 800; }
.topbar-actions { display: flex; gap: 12px; }

/* ─── Stats Cards ─── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card {
  background: var(--card-bg); border-radius: var(--radius); padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.stat-card-icon { font-size: 32px; margin-bottom: 12px; }
.stat-card-value { font-size: 32px; font-weight: 800; margin-bottom: 4px; }
.stat-card-label { font-size: 13px; color: var(--text-muted); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px;
  border-radius: 10px; font-family: var(--font); font-size: 13px; font-weight: 700;
  border: none; cursor: pointer; transition: all 0.3s var(--ease);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; border-radius: 8px; }

/* ─── Table ─── */
.table-container { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.table-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.table-header h2 { font-size: 18px; font-weight: 700; }
.table-search {
  padding: 10px 16px; border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--font); font-size: 13px; width: 250px; outline: none;
  transition: border-color 0.3s;
}
.table-search:focus { border-color: var(--primary); }

.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; padding: 14px 20px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted);
  border-bottom: 1px solid var(--border); background: #FAFAF8;
}
.table td { padding: 16px 20px; border-bottom: 1px solid #f5f5f5; font-size: 14px; vertical-align: middle; }
.table tr:hover { background: #FAFAF8; }
.table-img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--bg); }
.table-actions { display: flex; gap: 6px; }

/* ─── Badges ─── */
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-new { background: #DBEAFE; color: #1E40AF; }
.badge-confirmed { background: #D1FAE5; color: #065F46; }
.badge-production { background: #FEF3C7; color: #92400E; }
.badge-delivery { background: #E0E7FF; color: #3730A3; }
.badge-completed { background: #D1FAE5; color: #065F46; }
.badge-cancelled { background: #FEE2E2; color: #991B1B; }
.badge-hit { background: #FFEDD5; color: #C2410C; }
.badge-premium { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; }
.badge-sale { background: #FEE2E2; color: #991B1B; }
.badge-active { background: #D1FAE5; color: #065F46; }
.badge-inactive { background: #F3F4F6; color: #6B7280; }
.badge-expired { background: #FEE2E2; color: #991B1B; }

/* ─── Forms ─── */
.form-card { background: var(--card-bg); border-radius: var(--radius); padding: 32px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 1px; text-transform: uppercase; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--font); font-size: 14px; outline: none; background: #fff;
  transition: border-color 0.3s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(201,169,110,0.1); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-full { grid-column: 1 / -1; }

/* ─── Login Page ─── */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1A1A2E, #16213E);
}
.login-card {
  background: #fff; border-radius: var(--radius); padding: 48px;
  width: min(420px, 90vw); box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo-icon {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; font-weight: 800;
}
.login-title { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.login-sub { font-size: 14px; color: var(--text-muted); }
.login-error { background: #FEE2E2; color: #991B1B; padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; display: none; }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: #fff; border-radius: var(--radius); padding: 32px; max-width: 600px; width: 90vw; max-height: 90vh; overflow-y: auto; }
.modal-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
