/* ── DASHBOARD STYLES ── */
/* Matches ahmedhussein.org theme: dark navy, cyan accents, Orbitron/Exo2 fonts */

.dash-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
  color: var(--t);
}

.dash-sidebar {
  width: 280px;
  background: var(--bg2);
  border-right: 1px solid var(--bdr);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
}

.ds-logo-area {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid var(--bdr);
}

.ds-logo {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c);
  letter-spacing: 1px;
}

.ds-role {
  font-family: 'Exo 2', sans-serif;
  font-size: 0.8rem;
  color: var(--tm);
  margin-top: 0.25rem;
}

.ds-nav {
  flex: 1;
  padding: 1rem 0;
}

.ds-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--tm);
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.ds-item:hover, .ds-item.act {
  background: rgba(0, 212, 255, 0.05);
  color: var(--c);
  border-left-color: var(--c);
}

.ds-item i {
  font-size: 1rem;
  width: 20px;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--c);
  font-size: 1.5rem;
  padding: 1rem;
  cursor: pointer;
}

.dash-main {
  flex: 1;
  padding: 2rem;
  overflow-x: auto;
  margin-top: 6rem;
}

.dash-panel {
  display: none;
}

.dash-panel.act {
  display: block;
}

.dash-toprow {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dash-hello {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--tw);
  margin-bottom: 0.25rem;
}

.dash-hello span {
  color: var(--c);
}

.dash-sub {
  font-family: 'Exo 2', sans-serif;
  font-size: 1rem;
  color: var(--tm);
}

.dash-plan-chip {
  background: var(--bg3);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  padding: 0.75rem 1rem;
  text-align: center;
}

.dpc-lbl {
  font-size: 0.7rem;
  color: var(--tm);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.dpc-val {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c);
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.dstat {
  background: var(--card);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s;
}

.dstat:hover {
  transform: translateY(-2px);
  border-color: var(--bdr2);
}

.dstat-ico {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 1.5rem;
}

.ico-c { background: linear-gradient(135deg, var(--c), var(--c2)); color: var(--bg); }
.ico-g { background: linear-gradient(135deg, var(--g), #00ff88); color: var(--bg); }
.ico-o { background: linear-gradient(135deg, var(--o), var(--o2)); color: var(--bg); }
.ico-p { background: linear-gradient(135deg, var(--c3), var(--c2)); color: var(--bg); }

.dstat-num {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  font-weight: 900;
  color: var(--tw);
  margin-bottom: 0.25rem;
}

.dstat-lbl {
  font-family: 'Exo 2', sans-serif;
  font-size: 0.8rem;
  color: var(--tm);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.upgrade-banner {
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.ub-text {
  flex: 1;
}

.ub-t {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c);
  margin-bottom: 0.25rem;
}

.ub-d {
  font-family: 'Exo 2', sans-serif;
  font-size: 0.9rem;
  color: var(--tm);
}

/* Tables for Admin */
.admin-table {
  background: var(--card);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  overflow: hidden;
}

.admin-table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 100px;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg3);
  font-family: 'Orbitron', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--c);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 100px;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--bdr);
  align-items: center;
  transition: background 0.2s;
}

.admin-table-row:hover {
  background: rgba(0, 212, 255, 0.02);
}

.admin-table-row .btn {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* Course Cards for Students */
.enrolled-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.enrolled-card {
  background: var(--card);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

.enrolled-card:hover {
  transform: translateY(-4px);
  border-color: var(--bdr2);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.enrolled-thumb {
  height: 150px;
  background: linear-gradient(135deg, var(--c), var(--c2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--bg);
}

.enrolled-body {
  padding: 1.5rem;
}

.enrolled-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--tw);
  margin-bottom: 0.5rem;
}

.enrolled-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--tm);
  margin-bottom: 1rem;
}

.enrolled-progress {
  margin-bottom: 1rem;
}

.progress-bar {
  height: 6px;
  background: var(--bg4);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c), var(--c2));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.7rem;
  color: var(--c);
  font-family: 'Orbitron', monospace;
}

.enrolled-actions {
  display: flex;
  gap: 0.5rem;
}

.enrolled-actions .btn {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.85rem;
}

/* Progress Tracking */
.progress-item {
  background: var(--card);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.progress-course-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tw);
  margin-bottom: 1rem;
}

.progress-lessons {
  display: grid;
  gap: 0.5rem;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--bg3);
  border-radius: 6px;
  transition: background 0.2s;
}

.lesson-item:hover {
  background: var(--bg4);
}

.lesson-status {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.lesson-status.completed {
  background: var(--g);
  color: var(--bg);
}

.lesson-status.incomplete {
  background: var(--bg4);
  color: var(--tm);
}

.lesson-title {
  flex: 1;
  font-size: 0.9rem;
  color: var(--t);
}

.lesson-duration {
  font-size: 0.8rem;
  color: var(--tm);
}

/* ═════════════════════════════════════════════════════════════
   LIGHT MODE OVERRIDES FOR DASHBOARD
   ═════════════════════════════════════════════════════════════ */

[data-theme="light"] .dash-layout {
  background: #f5f7fa;
  color: #1e293b;
}

[data-theme="light"] .dash-sidebar {
  background: #f0f4f9;
  border-right-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ds-logo-area {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ds-logo {
  color: #0f172a;
}

[data-theme="light"] .ds-role {
  color: #0062cc;
}

[data-theme="light"] .ds-item {
  color: #64748b;
  border-color: transparent;
}

[data-theme="light"] .ds-item:hover {
  background: rgba(0, 98, 204, 0.06);
  color: #0f172a;
}

[data-theme="light"] .ds-item.act {
  background: rgba(0, 98, 204, 0.09);
  color: #0062cc;
  border-color: rgba(0, 98, 204, 0.2);
}

[data-theme="light"] .ds-sep {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ds-logout {
  color: #64748b;
}

[data-theme="light"] .ds-logout:hover {
  color: #c94f08;
}

[data-theme="light"] .dash-main {
  background: #f5f7fa;
}

[data-theme="light"] .dash-toprow {
  background: transparent;
}

[data-theme="light"] .dash-hello {
  color: #0f172a;
}

[data-theme="light"] .dash-hello span {
  color: #0062cc;
}

[data-theme="light"] .dash-sub {
  color: #64748b;
}

[data-theme="light"] .dash-plan-chip {
  background: rgba(0, 98, 204, 0.06);
  border-color: rgba(0, 98, 204, 0.15);
}

[data-theme="light"] .dpc-lbl {
  color: #64748b;
}

[data-theme="light"] .dpc-val {
  color: #0062cc;
}

[data-theme="light"] .dstat {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .dstat:hover {
  border-color: rgba(0, 98, 204, 0.2);
}

[data-theme="light"] .dstat-ico {
  border-radius: 9px;
}

[data-theme="light"] .ico-c {
  background: rgba(0, 98, 204, 0.08);
  color: #0062cc;
}

[data-theme="light"] .ico-g {
  background: rgba(22, 163, 74, 0.08);
  color: #16a34a;
}

[data-theme="light"] .ico-o {
  background: rgba(201, 79, 8, 0.08);
  color: #c94f08;
}

[data-theme="light"] .ico-p {
  background: rgba(160, 100, 255, 0.08);
  color: #a064ff;
}

[data-theme="light"] .dstat-num {
  color: #0f172a;
}

[data-theme="light"] .dstat-lbl {
  color: #64748b;
}

[data-theme="light"] .dash-sec-title {
  color: #0f172a;
}

[data-theme="light"] .progress-item {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .progress-course-title {
  color: #0f172a;
}

[data-theme="light"] .lesson-item {
  background: #f0f4f9;
}

[data-theme="light"] .lesson-item:hover {
  background: rgba(0, 98, 204, 0.06);
}

[data-theme="light"] .lesson-status.completed {
  background: #16a34a;
  color: #ffffff;
}

[data-theme="light"] .lesson-status.incomplete {
  background: rgba(0, 0, 0, 0.06);
  color: #64748b;
}

[data-theme="light"] .lesson-title {
  color: #1e293b;
}

[data-theme="light"] .lesson-duration {
  color: #64748b;
}

[data-theme="light"] .enr-item {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .enr-item:hover {
  border-color: rgba(0, 98, 204, 0.2);
}

[data-theme="light"] .enr-name {
  color: #0f172a;
}

[data-theme="light"] .enr-prog-lbl {
  color: #64748b;
}

[data-theme="light"] .enr-bar {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .enr-fill {
  background: linear-gradient(90deg, #0062cc, rgba(0, 98, 204, 0.3));
}

[data-theme="light"] .enr-pct {
  color: #0062cc;
}

[data-theme="light"] .empty-state {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .es-title {
  color: #0f172a;
}

[data-theme="light"] .es-desc {
  color: #64748b;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dash-layout {
    flex-direction: column;
  }

  .dash-sidebar {
    width: 100%;
    height: auto;
    position: fixed;
    top: 0;
    left: -100%;
    z-index: 1000;
    transition: left 0.3s ease;
  }

  .dash-sidebar.open {
    left: 0;
  }

  .sidebar-toggle {
    display: block;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
  }

  .dash-main {
    padding: 1rem;
    margin-top: 60px;
  }

  .dash-toprow {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .upgrade-banner {
    flex-direction: column;
    text-align: center;
  }

  .admin-table-header,
  .admin-table-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .admin-table-row .btn {
    width: 100%;
  }

  .enrolled-list {
    grid-template-columns: 1fr;
  }

  .enrolled-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .dash-main {
    padding: 0.5rem;
  }

  .dash-stats {
    grid-template-columns: 1fr;
  }

  .dstat {
    padding: 1rem;
  }

  .dstat-num {
    font-size: 1.5rem;
  }
}

/* ── LIGHT MODE COMPLETE THEME ── */

/* Main Layout */
[data-theme="light"] .dash-layout {
  background: #f8f9fa;
  color: #0a1525;
}

[data-theme="light"] .dash-sidebar {
  background: #ffffff;
  border-right: 1px solid #e0e0e0;
}

[data-theme="light"] .ds-logo-area {
  border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .ds-logo {
  color: #0062cc;
}

[data-theme="light"] .ds-role {
  color: #666;
}

[data-theme="light"] .ds-item {
  color: #555;
}

[data-theme="light"] .ds-item:hover,
[data-theme="light"] .ds-item.act {
  color: #0062cc;
  background: rgba(0, 98, 204, 0.08);
  border-left-color: #0062cc;
}

[data-theme="light"] .dash-main {
  background: #f8f9fa;
}

/* Typography */
[data-theme="light"] .dash-hello {
  color: #0a1525;
}

[data-theme="light"] .dash-hello span {
  color: #0062cc;
}

[data-theme="light"] .dash-sub {
  color: #666;
}

/* Plan Chip */
[data-theme="light"] .dash-plan-chip {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
}

[data-theme="light"] .dpc-lbl {
  color: #666;
}

[data-theme="light"] .dpc-val {
  color: #0062cc;
}

/* Stats Cards */
[data-theme="light"] .dstat {
  background: #ffffff;
  border: 1px solid #e0e0e0;
}

[data-theme="light"] .dstat:hover {
  border-color: #ccc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .dstat-num {
  color: #0a1525;
}

[data-theme="light"] .dstat-lbl {
  color: #666;
}

/* Upgrade Banner */
[data-theme="light"] .upgrade-banner {
  background: linear-gradient(135deg, #f5f5f5, #f0f0f0);
  border: 1px solid #e0e0e0;
}

[data-theme="light"] .ub-t {
  color: #0062cc;
}

[data-theme="light"] .ub-d {
  color: #666;
}

/* Admin Tables */
[data-theme="light"] .admin-table {
  background: #ffffff;
  border: 1px solid #e0e0e0;
}

[data-theme="light"] .admin-table-header {
  background: #f5f5f5;
  color: #0062cc;
  border-bottom: 1px solid #e0e0e0;
}

[data-theme="light"] .admin-table-row {
  border-top: 1px solid #e0e0e0;
  color: #0a1525;
}

[data-theme="light"] .admin-table-row:hover {
  background: #f9f9f9;
}

/* Enrolled Cards */
[data-theme="light"] .enrolled-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
}

[data-theme="light"] .enrolled-card:hover {
  border-color: #0062cc;
  box-shadow: 0 4px 12px rgba(0, 98, 204, 0.15);
}

[data-theme="light"] .enrolled-title {
  color: #0a1525;
}

[data-theme="light"] .enrolled-meta {
  color: #666;
}

[data-theme="light"] .progress-bar {
  background: #e8e8e8;
}

[data-theme="light"] .progress-text {
  color: #0062cc;
}

/* Progress Items */
[data-theme="light"] .progress-item {
  background: #ffffff;
  border: 1px solid #e0e0e0;
}

[data-theme="light"] .progress-course-title {
  color: #0a1525;
}

[data-theme="light"] .lesson-item {
  background: #f5f5f5;
  color: #555;
}

[data-theme="light"] .lesson-item:hover {
  background: #e8e8e8;
  color: #0062cc;
}

[data-theme="light"] .lesson-status.completed {
  background: #4caf50;
  color: #fff;
}

[data-theme="light"] .lesson-status.incomplete {
  background: #e0e0e0;
  color: #666;
}

[data-theme="light"] .lesson-title {
  color: #0a1525;
}

[data-theme="light"] .lesson-duration {
  color: #888;
}

/* ════════════════════════════════════════════════════════════════════
   DASHBOARD MOBILE RESPONSIVE FIXES
   ════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  /* Show sidebar toggle when sidebar is hidden at 1100px */
  .sidebar-toggle {
    display: block !important;
  }

  /* Ensure dashboard main adjusts when sidebar is hidden */
  .dash-main {
    margin-left: 0 !important;
  }
}

@media (max-width: 768px) {
  /* Dashboard layout single column */
  .dash-layout,
  .dashboard-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .dash-main {
    padding: 1.5rem 1rem !important;
    margin-left: 0 !important;
    margin-top: 60px;
  }

  /* Sidebar off-canvas confirmed */
  .dash-sidebar {
    position: fixed;
    left: -100%;
    top: 70px;
    width: 280px;
    height: calc(100vh - 70px);
    z-index: 1000;
    transition: left 0.3s ease;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    padding: 1rem;
    overflow-y: auto;
  }

  .dash-sidebar.open {
    left: 0 !important;
  }

  /* Stats grid at tablet */
  .dash-stats-row,
  .dash-tw-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  /* Sidebar toggle visibility and styling */
  .sidebar-toggle {
    display: block !important;
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 1001;
  }

  /* Dashboard hello text */
  .dash-hello {
    font-size: 1.4rem;
  }

  /* Upgrade banner improvements */
  .upgrade-banner {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 1rem;
  }

  .upgrade-banner button {
    width: 100%;
  }

  /* Enrolled cards grid */
  .enrolled-list {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  /* ── DASHBOARD LAYOUT ── */
  .dash-layout,
  .dashboard-layout {
    grid-template-columns: 1fr !important;
  }

  .dash-main {
    padding: 1rem !important;
    margin-left: 0 !important;
    margin-top: 60px;
  }

  .dash-sidebar {
    width: calc(100% - 2rem) !important;
    left: -100% !important;
    margin: 1rem !important;
    border-radius: 8px;
  }

  /* ── DASHBOARD HEADER ── */
  .dash-toprow {
    flex-direction: column;
    gap: 1rem;
  }

  .dash-hello {
    font-size: 1.2rem;
  }

  .dash-greeting-name {
    font-size: 1rem;
  }

  .dash-plan-chip {
    align-self: flex-start;
    padding: 4px 10px;
    font-size: 0.7rem;
  }

  /* ── STATS CARDS ── */
  .dash-tw-grid,
  .dash-stats-row {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .dash-stat-card {
    padding: 1rem !important;
  }

  .dstat-num {
    font-size: 1.8rem;
  }

  .dstat-label {
    font-size: 0.75rem;
  }

  .dstat-trend {
    font-size: 0.65rem;
  }

  /* ── ENROLLED COURSES ── */
  .enrolled-section {
    padding: 1rem 0;
  }

  .enrolled-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .enrolled-list {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .enrolled-card {
    padding: 1rem;
  }

  .enrolled-thumb {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px;
  }

  .enrolled-title {
    font-size: 0.95rem;
  }

  .enrolled-meta {
    font-size: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .enrolled-actions {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .enrolled-actions button,
  .enrolled-actions a {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.75rem;
    min-height: 36px;
  }

  /* ── UPGRADE BANNER ── */
  .upgrade-banner {
    padding: 1.2rem !important;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .upgrade-banner h3 {
    font-size: 1rem;
  }

  .upgrade-banner p {
    font-size: 0.85rem;
  }

  .upgrade-banner button {
    width: 100%;
    min-height: 44px;
  }

  /* ── ADMIN TABLE ── */
  .admin-tbl {
    font-size: 0.8rem;
  }

  .admin-tbl-hdr,
  .admin-tbl-row {
    padding: 0.6rem 0.75rem;
    gap: 0.6rem;
  }

  .admin-av {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.5rem;
  }

  /* ── FORMS ── */
  .form-group {
    margin-bottom: 1rem;
  }

  .finp,
  textarea,
  select {
    width: 100%;
    padding: 10px;
    min-height: 40px;
    font-size: 0.9rem;
  }

  .form-btns {
    flex-direction: column;
    gap: 0.75rem;
  }

  .form-btns button {
    width: 100%;
    min-height: 44px;
  }

  /* ── SIDEBAR TOGGLE ANIMATION ── */
  .sidebar-toggle {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 375px) {
  .dash-main {
    padding: 0.75rem !important;
  }

  .dash-hello {
    font-size: 1rem;
  }

  .dash-stat-card {
    padding: 0.8rem !important;
  }

  .dstat-num {
    font-size: 1.6rem;
  }

  .enrolled-card {
    padding: 0.8rem;
    flex-direction: column;
    text-align: center;
  }

  .enrolled-thumb {
    width: 50px !important;
    height: 50px !important;
  }

  .enrolled-title {
    font-size: 0.9rem;
  }

  .enrolled-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .enrolled-actions button,
  .enrolled-actions a {
    flex: 1;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 0.75rem;
  }

  .upgrade-banner {
    padding: 1rem !important;
  }

  .admin-tbl-row {
    padding: 0.5rem;
  }
}

/* ──── MEDIUM PHONES (425px–480px) ──── */
@media (max-width: 425px) {
  .dash-main { padding: 1.5rem 0.9rem !important; }
  .dash-hello { font-size: 1.2rem; }
  .dash-stat-card { padding: 1rem !important; }
  .enrolled-actions button, .enrolled-actions a { min-height: 44px; padding: 8px 10px; }
}

/* ──── iPhone 14/15 STANDARD WIDTH (390px) ──── */
@media (max-width: 390px) {
  .dash-main { padding: 1.3rem 0.85rem !important; }
  .dash-hello { font-size: 1.15rem; }
  .dash-stat-card { padding: 1rem !important; }
  .enrolled-actions button, .enrolled-actions a { min-height: 44px; padding: 8px 10px; }
}

/* ──── TOUCH TARGET FIXES FOR TABLETS (481px–1024px) ──── */
@media (min-width: 481px) and (max-width: 1024px) {
  .enrolled-actions button, .enrolled-actions a { min-height: 44px; padding: 10px 12px; }
  .sidebar-toggle { min-height: 44px; min-width: 44px; }
}

/* ──── 320px TINY SCREENS ──── */
@media (max-width: 320px) {
  .dash-main { padding: 1rem 0.5rem !important; }
  .dash-hello { font-size: 1rem; }
  .dash-stat-card { padding: 0.75rem !important; }
}