:root {
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --secondary-color: #ffffff;
  --bg-color: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --danger-bg: #fee2e2;
  
  --orange-color: #f97316;
  
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* SIDEBAR */
.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  overflow-y: auto;
}

.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
  color: #fff;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  margin-bottom: 0.25rem;
}

.sidebar-header span {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-nav {
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-item .nav-icon {
  margin-right: 0.75rem;
  font-size: 1.2rem;
}

.nav-item:hover, .nav-item.active {
  background-color: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 1rem 0;
}

.nav-site {
  color: #fdba74;
}
.nav-site:hover {
  color: #ffedd5;
  background-color: rgba(249, 115, 22, 0.1);
}

.nav-logout {
  color: #fca5a5;
}
.nav-logout:hover {
  color: #fee2e2;
  background-color: rgba(239, 68, 68, 0.1);
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  margin-left: 260px; /* offset sidebar */
  padding: 2rem 3rem;
  min-height: 100vh;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.header-action {
  margin-bottom: 2.5rem !important;
}
.header-action h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

/* =========================================
   LOGIN LAYOUT
   ========================================= */
.login-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: #0f172a;
}

.login-layout .form-container {
  max-width: 400px;
  width: 100%;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background-color: white;
  color: var(--text-main);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

/* =========================================
   FLASH MESSAGES
   ========================================= */
.flash-messages {
  margin-bottom: 2rem;
}
.flash {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}
.flash.success {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.flash.error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* =========================================
   GRID & CARDS
   ========================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--secondary-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* =========================================
   FORMS
   ========================================= */
.form-container {
  background: var(--secondary-color);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
}

.form-container h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 2rem;
  letter-spacing: -0.5px;
}

.form-container h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #334155;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f1f5f9;
}

.form-group {
  margin-bottom: 1.75rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #334155;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: #1e293b;
  transition: all 0.2s;
  background: #f8fafc;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}
