/* ============================================================
   Potencia Academy — Design System
   Inspired by Edulog style reference
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  --primary: #1a6cff;
  --primary-dark: #1455cc;
  --primary-light: #e8f0fe;
  --accent: #ff6b35;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  --sidebar-w: 220px;
  --sidebar-bg: #ffffff;
  --sidebar-border: #f0f0f5;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e8eaf0;

  --text-primary: #1a1d2e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow: 0 4px 16px rgba(0, 0, 0, .07);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .10);

  --transition: .18s ease;
}

/* ─── Reset ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ─── Page Wrapper ───────────────────────────────────────────── */
.page-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  padding: 28px 16px 24px;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 28px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
  letter-spacing: -.3px;
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .9rem;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: .875rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  position: relative;
}

.sidebar-nav a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.sidebar-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.sidebar-nav a i {
  font-size: 1rem;
  width: 18px;
  text-align: center;
}

.sidebar-nav .badge-dot {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.sidebar-signout a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: .875rem;
  font-weight: 500;
  transition: background var(--transition);
}

.sidebar-signout a:hover {
  background: #fef2f2;
}

/* ─── Main Content ───────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 32px;
  min-width: 0;
}

/* ─── Top Bar ────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.topbar-search {
  flex: 1;
  position: relative;
  max-width: 480px;
}

.topbar-search input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: .875rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}

.topbar-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 108, 255, .12);
}

.topbar-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .9rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
}

.topbar-user .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-user .user-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ─── Welcome Banner ─────────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(130deg, #1a6cff 0%, #3b82f6 55%, #6366f1 100%);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, .07);
  border-radius: 50%;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  right: 80px;
  bottom: -60px;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, .07);
  border-radius: 50%;
}

.welcome-banner h1 {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -.4px;
}

.welcome-banner p {
  font-size: .9rem;
  opacity: .88;
  max-width: 460px;
}

.welcome-banner p strong {
  font-weight: 700;
}

/* ─── Section Title ──────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-link {
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary);
  transition: opacity var(--transition);
}

.section-link:hover {
  opacity: .75;
}

/* ─── Stat Cards Grid ────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.stat-card .stat-label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.stat-icon.blue {
  background: #e8f0fe;
  color: var(--primary);
}

.stat-icon.green {
  background: #dcfce7;
  color: var(--success);
}

.stat-icon.amber {
  background: #fef3c7;
  color: var(--warning);
}

.stat-icon.red {
  background: #fee2e2;
  color: var(--danger);
}

.stat-icon.indigo {
  background: #ede9fe;
  color: #7c3aed;
}

/* ─── Content Grid ───────────────────────────────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-body {
  padding: 22px;
}

.card-header {
  padding: 18px 22px 0;
}

/* ─── Activity List ──────────────────────────────────────────── */
.activity-list {
  list-style: none;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}

.activity-info {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-sub {
  font-size: .78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.activity-time {
  font-size: .75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2px;
}

.badge-blue {
  background: #e8f0fe;
  color: var(--primary);
}

.badge-green {
  background: #dcfce7;
  color: #16a34a;
}

.badge-yellow {
  background: #fef3c7;
  color: #b45309;
}

.badge-red {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-gray {
  background: #f3f4f6;
  color: #6b7280;
}

.badge-indigo {
  background: #ede9fe;
  color: #6d28d9;
}

/* ─── Progress Bar ───────────────────────────────────────────── */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar-bg {
  flex: 1;
  height: 6px;
  background: #e9ecef;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #6366f1);
  border-radius: 999px;
  transition: width .5s ease;
}

.progress-pct {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 32px;
  text-align: right;
}

/* ─── Course Cards Grid ──────────────────────────────────────── */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.course-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.course-card-thumb {
  height: 160px;
  background: linear-gradient(135deg, #e8f0fe, #c7d7fd);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.course-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-card-thumb .thumb-placeholder {
  font-size: 2.5rem;
  color: #b0c4f8;
}

.course-card-status-bar {
  padding: 7px 16px;
  font-size: .75rem;
  font-weight: 600;
  text-align: center;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-processing {
  background: #e8f0fe;
  color: #1e3a8a;
}

.status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.course-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.course-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  line-height: 1.4;
}

.course-card-footer {
  margin-top: auto;
}

/* ─── Materials Grid ─────────────────────────────────────────── */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.material-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.material-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.material-card-thumb {
  height: 150px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.material-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-card-thumb .thumb-icon {
  font-size: 2.5rem;
  color: #d97706;
}

.material-card-body {
  padding: 16px;
}

.material-card h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.material-card-meta {
  font-size: .78rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.material-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(26, 108, 255, .28);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

.btn-yellow {
  background: #f59e0b;
  color: #fff;
}

.btn-yellow:hover {
  background: #d97706;
}

.btn-red {
  background: var(--danger);
  color: #fff;
}

.btn-red:hover {
  background: #b91c1c;
}

.btn-gray {
  background: #e5e7eb;
  color: #6b7280;
  cursor: not-allowed;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #16a34a;
}

.btn-sm {
  padding: 6px 13px;
  font-size: .78rem;
}

/* ─── Table ──────────────────────────────────────────────────── */
.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 13px 18px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-secondary);
  background: #f8f9fc;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 18px;
  font-size: .875rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: #f8f9fc;
}

/* ─── Filter Tabs ────────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.filter-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ─── Filter Bar (Search row) ────────────────────────────────── */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.filter-bar form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 160px;
}

.filter-group label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.filter-group input,
.filter-group select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 108, 255, .1);
}

/* ─── Empty State ────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  color: var(--text-muted);
  gap: 12px;
}

.empty-state i {
  font-size: 2.5rem;
  color: #d1d5db;
}

.empty-state p {
  font-size: .9rem;
  color: var(--text-secondary);
}

/* ─── Alert / Flash ──────────────────────────────────────────── */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-red {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid var(--danger);
}

.alert-green {
  background: #dcfce7;
  color: #166534;
  border-left: 4px solid var(--success);
}

.alert-yellow {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid var(--warning);
}

.alert-blue {
  background: #e8f0fe;
  color: #1e3a8a;
  border-left: 4px solid var(--primary);
}

/* ─── Auth Pages ─────────────────────────────────────────────── */
.auth-page {
  display: flex;
  min-height: 100vh;
}

.auth-panel-left {
  width: 42%;
  background: linear-gradient(140deg, #1a6cff 0%, #3b82f6 60%, #6366f1 100%);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.auth-panel-left::before {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  background: rgba(255, 255, 255, .07);
  border-radius: 50%;
}

.auth-panel-left::after {
  content: '';
  position: absolute;
  left: -60px;
  bottom: -60px;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, .07);
  border-radius: 50%;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.auth-brand .logo-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, .2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  backdrop-filter: blur(8px);
}

.auth-hero {
  position: relative;
  z-index: 1;
}

.auth-hero h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -.4px;
}

.auth-hero p {
  font-size: .92rem;
  opacity: .88;
  line-height: 1.7;
  max-width: 340px;
}

.auth-features {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .88rem;
  opacity: .9;
}

.auth-feature-item i {
  font-size: 1rem;
}

.auth-panel-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--surface);
}

.auth-form-wrap {
  width: 100%;
  max-width: 420px;
}

.auth-form-wrap h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-form-wrap p.sub {
  color: var(--text-secondary);
  font-size: .9rem;
  margin-bottom: 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 18px;
}

.form-group label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 108, 255, .12);
}

.auth-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  font-size: .85rem;
}

.auth-links a {
  color: var(--primary);
  font-weight: 500;
}

.auth-links a:hover {
  text-decoration: underline;
}

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ─── Responsive Mobile ──────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 18px 16px;
  }

  .mobile-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: 18px;
  }

  .auth-panel-left {
    display: none;
  }

  .auth-panel-right {
    padding: 32px 24px;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .materials-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .mobile-toggle {
    display: none !important;
  }
}

/* ─── Form Inputs ────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.form-input {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 108, 255, .12);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* ─── App-style Alert / Flash ────────────────────────────────── */
.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid var(--danger);
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border-left: 4px solid var(--success);
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid var(--warning);
}

.alert-info {
  background: #e8f0fe;
  color: #1e3a8a;
  border-left: 4px solid var(--primary);
}

/* ─── Auth Page Extras ───────────────────────────────────────── */
.auth-logo {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, .22);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  backdrop-filter: blur(8px);
}

/* alias without "-item" suffix */
.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .88rem;
  opacity: .9;
  color: #fff;
}

.auth-feature i {
  font-size: 1rem;
}

.auth-form-header {
  margin-bottom: 28px;
}

.auth-form-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.auth-form-header p {
  font-size: .9rem;
  color: var(--text-secondary);
}

.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: .85rem;
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--primary);
  font-weight: 600;
  margin-left: 4px;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* ─── Extra badge variants ───────────────────────────────────── */
.badge-orange {
  background: #fff7ed;
  color: #c2410c;
}

.badge-purple {
  background: #f3e8ff;
  color: #7e22ce;
}

.badge-teal {
  background: #f0fdfa;
  color: #0f766e;
}

/* ─── Back link ──────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  transition: opacity var(--transition);
}

.back-link:hover {
  opacity: .75;
}