/* ===== ADMIN STYLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a1a2e;
  --accent: #c9a84c;
  --sidebar-w: 260px;
  --text: #333;
  --border: #e0e0e0;
  --bg: #f5f6fa;
  --white: #fff;
  --danger: #e74c3c;
  --success: #27ae60;
  --warning: #f39c12;
}

body { font-family: 'Arial', sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }

/* ===== LOGIN PAGE ===== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), #0f3460); }
.login-card { background: white; padding: 3rem; border-radius: 12px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo h1 { color: var(--primary); font-size: 1.5rem; }
.login-logo span { color: var(--accent); }
.login-logo p { color: #666; font-size: 0.9rem; margin-top: 0.3rem; }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 1.25rem; }
label { display: block; margin-bottom: 0.4rem; font-size: 0.9rem; font-weight: bold; color: #444; }
input[type="text"], input[type="password"], input[type="date"], input[type="email"],
textarea, select {
  width: 100%; padding: 0.75rem 1rem; border: 2px solid var(--border); border-radius: 8px;
  font-size: 0.95rem; outline: none; transition: border-color 0.2s; background: white; color: var(--text);
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { min-height: 120px; resize: vertical; font-family: 'Arial', sans-serif; }
.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.7rem 1.5rem; border-radius: 8px; font-weight: bold; cursor: pointer; border: none; font-size: 0.9rem; transition: all 0.2s; }
.btn-primary { background: var(--accent); color: var(--primary); }
.btn-primary:hover { background: #e8c97a; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #c0392b; }
.btn-secondary { background: #6c757d; color: white; }
.btn-secondary:hover { background: #5a6268; }
.btn-success { background: var(--success); color: white; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }

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

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); background: var(--primary); color: white; position: fixed;
  top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 50; display: flex; flex-direction: column;
  transition: transform 0.3s;
}
.sidebar-header { padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-header h2 { font-size: 1.1rem; color: var(--accent); }
.sidebar-header p { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 0.2rem; }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.5rem;
  color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: all 0.2s; border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(201,168,76,0.15); color: var(--accent); border-left-color: var(--accent);
}
.sidebar-nav .nav-section { padding: 1.2rem 1.5rem 0.3rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.3); }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); }
.sidebar-footer a { color: rgba(255,255,255,0.6); font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }
.sidebar-footer a:hover { color: var(--accent); }

/* Main content */
.admin-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }
.admin-topbar {
  background: white; padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.admin-topbar h1 { font-size: 1.2rem; color: var(--primary); }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.admin-badge { background: var(--primary); color: var(--accent); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; }
.admin-content { padding: 2rem; flex: 1; }

/* ===== DASHBOARD STATS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.stat-card { background: white; padding: 1.5rem; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); border-left: 4px solid var(--accent); }
.stat-card h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 0.5rem; }
.stat-card .stat-number { font-size: 2.5rem; font-weight: bold; color: var(--primary); line-height: 1; }
.stat-card .stat-label { font-size: 0.85rem; color: #888; margin-top: 0.25rem; }

/* ===== TABLES ===== */
.table-wrapper { background: white; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); overflow: hidden; }
.table-header { padding: 1.25rem 1.5rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.table-header h2 { font-size: 1rem; color: var(--primary); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 0.85rem 1.5rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: #888; border-bottom: 2px solid var(--border); background: #f9f9f9; }
td { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.75rem; font-weight: bold; }
.badge-featured { background: #fef3cd; color: #856404; }
.badge-category { background: #e3f2fd; color: #1565c0; }
.actions { display: flex; gap: 0.5rem; }

/* ===== FORMS ===== */
.form-card { background: white; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); padding: 2rem; max-width: 900px; }
.form-card h2 { margin-bottom: 1.5rem; color: var(--primary); padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-check { display: flex; align-items: center; gap: 0.5rem; }
.form-check input[type="checkbox"] { width: auto; }
.current-image { margin-top: 0.5rem; }
.current-image img { width: 150px; height: 100px; object-fit: cover; border-radius: 6px; border: 2px solid var(--border); }
.editor-toolbar { background: #f5f5f5; border: 2px solid var(--border); border-bottom: none; border-radius: 8px 8px 0 0; padding: 0.5rem; display: flex; gap: 0.3rem; flex-wrap: wrap; }
.editor-toolbar button { padding: 0.3rem 0.6rem; border: 1px solid #ddd; border-radius: 4px; background: white; cursor: pointer; font-size: 0.85rem; }
.editor-toolbar button:hover { background: var(--accent); color: var(--primary); border-color: var(--accent); }
#content { border-radius: 0 0 8px 8px !important; min-height: 300px; font-family: Georgia, serif; font-size: 1rem; line-height: 1.7; }

/* ===== FLASH ===== */
.flash { padding: 0.85rem 1.25rem; border-radius: 8px; margin-bottom: 1.5rem; font-size: 0.9rem; }
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ===== PAGE HEADER ===== */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.page-header h1 { font-size: 1.5rem; color: var(--primary); }
.breadcrumb { font-size: 0.85rem; color: #888; margin-top: 0.2rem; }
.breadcrumb a { color: var(--accent); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 4rem 2rem; color: #888; }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { margin-bottom: 0.5rem; color: var(--text); }
