@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #6D28D9;
  --primary-light: #8B5CF6;
  --secondary: #F59E0B;
  --success: #10B981;
  --danger: #EF4444;
  --bg-dark: #1F2937;
  --bg-light: #F9FAFB;
  --text-dark: #111827;
  --text-light: #E5E7EB;
  --border-color: #D1D5DB;
  --card-bg: #FFFFFF;
  --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);
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
}

/* --- Layout --- */
.admin-wrapper {
  display: flex;
}

.sidebar {
  width: 250px;
  background-color: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
  padding: 1.5rem;
  position: fixed;
}

.main-content {
  margin-left: 250px;
  width: calc(100% - 250px);
  padding: 2rem;
}

/* --- Sidebar --- */
.sidebar-header {
  text-align: center;
  margin-bottom: 2rem;
}
.sidebar-header h2 {
  color: white;
  margin: 0;
  font-weight: 700;
}
.sidebar-header p {
  font-size: 0.8rem;
  color: var(--text-light);
  opacity: 0.6;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: background-color 0.2s ease;
}
.sidebar-menu a:hover, .sidebar-menu a.active {
  background-color: rgba(255, 255, 255, 0.1);
}
.sidebar-menu a .icon {
  width: 20px;
  height: 20px;
}

/* --- Main Content --- */
.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn .icon {
    width: 16px; height: 16px;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-light); }
.btn-secondary { background-color: var(--secondary); color: white; }
.btn-danger { background-color: var(--danger); color: white; }
.btn-outline { background-color: transparent; color: var(--primary); border: 1px solid var(--primary); }

/* --- Cards --- */
.card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.stat-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-card .icon-wrapper {
  padding: 1rem;
  border-radius: 50%;
  color: white;
}
.stat-card h3 { margin: 0; font-size: 0.9rem; color: #6B7280; }
.stat-card p { margin: 0; font-size: 1.75rem; font-weight: 700; }

/* --- Table --- */
.table-wrapper {
    overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
th, td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}
th { font-weight: 600; color: #4B5563; }
.status {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}
.status.approved { background-color: var(--success); }
.status.pending { background-color: var(--secondary); }

/* --- Forms --- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.form-group {
    margin-bottom: 1rem;
}
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
input[type="text"], input[type="password"], input[type="url"], input[type="number"], select, textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}
textarea {
    min-height: 100px;
    resize: vertical;
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }

/* Login Page Specific */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
.login-card {
  width: 100%;
  max-width: 400px;
}
.login-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}
.message.error {
    background-color: #FEF2F2;
    color: #991B1B;
}