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

:root {
  --bg-admin: #f1f5f9;
  --bg-sidebar: #1e293b;
  --bg-card: #ffffff;
  --text-main: #334155;
  --text-light: #94a3b8;
  --text-sidebar: #f8fafc;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --danger: #ef4444;
  --success: #10b981;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-admin);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: var(--bg-sidebar);
  color: var(--text-sidebar);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.sidebar-nav {
  list-style: none;
  padding: 1rem 0;
  flex-grow: 1;
}

.sidebar-nav li a {
  display: block;
  padding: 1rem 1.5rem;
  color: rgba(248, 250, 252, 0.7);
  text-decoration: none;
  transition: 0.3s;
}

.sidebar-nav li a:hover, .sidebar-nav li a.active {
  background-color: rgba(255,255,255,0.05);
  color: #fff;
  border-left: 4px solid var(--accent);
}

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

/* Main Content */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  background-color: var(--bg-card);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.content-wrapper {
  padding: 2rem;
  flex-grow: 1;
  overflow-y: auto;
}

/* Typography */
h1 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #0f172a;
}

/* Cards (Dashboard Stats) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.stat-card h3 {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: 0.2s;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-danger {
  background-color: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
}

/* Tables */
.table-responsive {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background-color: #f8fafc;
  font-weight: 600;
  color: #475569;
}

tr:hover {
  background-color: #f1f5f9;
}

.alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.alert-error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #f87171;
}

/* Login Page specific */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #f8fafc;
}

.login-box {
  background: #fff;
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
}
.login-box h2 {
  text-align: center;
  margin-bottom: 2rem;
}
