:root {
  /* Brand Colors */
  --primary: #1E1B4B; /* Deep Indigo */
  --primary-light: #4338CA; /* Indigo 600 */
  --accent: #F43F5E; /* Rose 500 */
  --accent-hover: #E11D48; /* Rose 600 */
  --success: #10B981;
  --danger: #EF4444;
  --bg-body: #F8FAFC;
  --bg-surface: #FFFFFF;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;

  /* Spacing & Sizing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --container-width: 1200px;
  --header-height: 70px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  color: var(--primary);
}

h1 { font-size: 3rem; letter-spacing: -0.02em; line-height: 1.1; }
h2 { font-size: 2rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }

a { text-decoration: none; color: inherit; transition: color 0.2s; }

/* Utilities */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.mt-4 { margin-top: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.hidden { display: none; }

/* Grid System */
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive Grid */
.grid-responsive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

/* Navbar */
.navbar {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-content {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
  font-weight: 500;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #EA580C 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Cards */
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: all 0.2s ease;
  overflow: hidden;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-image {
  width: 100%;
  height: 200px;
  background-color: #CBD5E1;
  position: relative;
  overflow: hidden;
  margin: -24px -24px 24px -24px;
  width: calc(100% + 48px);
}

.card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

/* Hero Section */
.hero {
  padding: 100px 0;
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  position: relative;
  overflow: hidden;
}

.bg-soft-indigo {
  background: linear-gradient(135deg, #E0E7FF 0%, #EEF2FF 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 800px;
  margin: 0 auto 24px;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 32px;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-blue { background: #DBEAFE; color: #1E40AF; }
.badge-orange { background: #FEF3C7; color: #92400E; }
.badge-green { background: #D1FAE5; color: #065F46; }

/* Admin Layout */
.admin-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
}

.sidebar {
  width: 260px;
  background: var(--primary);
  color: white;
  padding: 24px;
  flex-shrink: 0;
}

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

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: #94A3B8;
  font-weight: 500;
}

.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.admin-content {
  flex-grow: 1;
  padding: 32px;
  background: #F1F5F9;
  overflow-y: auto;
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  text-align: left;
}

.table th {
  background: #F8FAFC;
  padding: 16px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}

.table tr:last-child td { border-bottom: none; }

/* Placeholders */
.placeholder-image {
  width: 100%;
  height: 100%;
  background: #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  font-size: 0.8rem;
  font-weight: 500;
}

.placeholder-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #CBD5E1;
}

.placeholder-icon {
  width: 20px;
  height: 20px;
  background: currentColor;
  opacity: 0.5;
  border-radius: 2px;
  display: inline-block;
}

/* Footer */
.footer {
  background: var(--primary);
  color: white;
  padding: 48px 0;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.footer h4 { color: white; margin-bottom: 1.5rem; }
.footer p { color: #94A3B8; }
.footer a { color: #94A3B8; display: block; margin-bottom: 0.5rem; }
.footer a:hover { color: white; }

/* Custom */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 8px 0;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .grid-2, .grid-3, .grid-4, .grid-sidebar-layout { grid-template-columns: 1fr !important; }
  .admin-layout { flex-direction: column; }
  .sidebar { width: 100%; padding: 16px; }
  .nav-links { display: none; } /* Simplified mobile view */
  .hidden-mobile { display: none !important; }
  .hero .grid { grid-template-columns: 1fr !important; }
}

/* Style Guide Utilities */
.swatch {
  width: 100%;
  height: 100px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.swatch-group {
  margin-bottom: 32px;
}

.swatch-label {
  font-weight: 600;
  color: var(--text-main);
  display: block;
  margin-bottom: 4px;
}

.swatch-hex {
  font-family: monospace;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.section-title {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 32px;
  margin-top: 48px;
}
