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

/* ─── Reset — scoped to our wrapper only ────────────────────────────────────── */
.mpd-wrap *, .mpd-wrap *::before, .mpd-wrap *::after,
.mpd-setup-page *, .mpd-setup-page *::before, .mpd-setup-page *::after {
  box-sizing: border-box;
}
/* Remove default margins only on our elements */
.mpd-page-header, .mpd-kpi-grid, .mpd-tiles, .mpd-card, .mpd-drill,
.mpd-table-wrap, .mpd-priority-strip, .mpd-section-label,
.mpd-stat-strip, .mpd-two-col, .mpd-quick-actions {
  margin-top: 0;
}

/* ─── Tokens ────────────────────────────────────────────────────────────────── */
:root {
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --bg:        #f1f5f9;
  --surface:   #ffffff;
  --border:    #e2e8f0;
  --border-d:  #cbd5e1;
  --text:      #0f172a;
  --text-2:    #334155;
  --text-3:    #64748b;
  --text-4:    #94a3b8;
  --blue:      #2563eb;
  --blue-l:    #eff6ff;
  --red:       #ef4444;
  --red-l:     #fef2f2;
  --amber:     #f59e0b;
  --amber-l:   #fffbeb;
  --green:     #10b981;
  --green-l:   #ecfdf5;
  --purple:    #8b5cf6;
  --r:         8px;
  --r-lg:      12px;
  --sh:        0 1px 3px rgba(0,0,0,.07), 0 2px 8px rgba(0,0,0,.05);
  --sh-lg:     0 4px 6px rgba(0,0,0,.06), 0 12px 32px rgba(0,0,0,.08);
  --sh-xl:     0 8px 16px rgba(0,0,0,.10), 0 24px 48px rgba(0,0,0,.10);
}

/* ─── Wrapper ───────────────────────────────────────────────────────────────── */
.mpd-wrap {
  font-family: var(--font) !important;
  color: var(--text);
  padding: 28px 32px 80px;
  max-width: 1480px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
  /* No background or min-height - let Elementor/theme control page background */
}

/* ─── Page Header ───────────────────────────────────────────────────────────── */
.mpd-page-header {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.mpd-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
}
.mpd-page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.4px;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 5px;
}
.mpd-page-sub { font-size: 13px; color: var(--text-3); }
.mpd-page-header__actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; padding-top: 4px; }

/* ─── Priority Strip (GL AI banner) ────────────────────────────────────────── */
.mpd-priority-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 14px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(37,99,235,.25);
}
.mpd-priority-strip__icon   { font-size: 22px; flex-shrink: 0; }
.mpd-priority-strip__label  { font-size: 10px; font-weight: 700; letter-spacing: .1em; opacity: .65; text-transform: uppercase; display: block; margin-bottom: 2px; }
.mpd-priority-strip__msg    { font-size: 14px; font-weight: 600; }
.mpd-priority-strip__body   { flex: 1; }
.mpd-priority-strip__badge  { background: rgba(255,255,255,.18); border-radius: 20px; padding: 4px 14px; font-size: 12px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }

/* ─── Section Label ─────────────────────────────────────────────────────────── */
.mpd-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 24px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mpd-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Metric Tiles ──────────────────────────────────────────────────────────── */
.mpd-tiles {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
  gap: 10px;
  margin-bottom: 16px;
}
.mpd-metric-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 14px 14px;
  position: relative;
  transition: box-shadow .15s, transform .15s;
}
.mpd-metric-tile[data-drill] { cursor: pointer; }
.mpd-metric-tile[data-drill]:hover { box-shadow: var(--sh-lg); transform: translateY(-1px); }
.mpd-metric-tile__icon  { font-size: 20px; margin-bottom: 10px; display: block; }
.mpd-metric-tile__count { font-size: 30px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.mpd-metric-tile__label { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 3px; }
.mpd-metric-tile__sub   { font-size: 11px; color: var(--text-4); }
.mpd-metric-tile__arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--text-4); }

/* ─── KPI Grid (Admin) ──────────────────────────────────────────────────────── */
.mpd-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)) !important;
  gap: 10px;
  margin-bottom: 16px;
}
.mpd-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 14px;
  position: relative;
}
.mpd-kpi__alert {
  position: absolute; top: 10px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(239,68,68,.25);
}
.mpd-kpi__icon  { font-size: 20px; margin-bottom: 10px; display: block; }
.mpd-kpi__val   { font-size: 26px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.mpd-kpi__label { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 2px; }
.mpd-kpi__sub   { font-size: 11px; color: var(--text-4); }

/* ─── Drill Panels ──────────────────────────────────────────────────────────── */
.mpd-drill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--r-lg);
  padding: 20px;
  margin: 10px 0 16px;
  box-shadow: var(--sh);
  animation: mpd-slide-in .18s ease;
}
@keyframes mpd-slide-in { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }
.mpd-drill__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.mpd-drill__head strong { font-size: 15px; font-weight: 700; display: block; margin-bottom: 3px; }
.mpd-drill__head p      { font-size: 13px; color: var(--text-3); line-height: 1.5; }
.mpd-drill__close {
  background: var(--bg); border: 1px solid var(--border); border-radius: 50%;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; font-size: 12px; color: var(--text-3);
  transition: background .15s;
}
.mpd-drill__close:hover { background: var(--border-d); }

/* ─── Card ──────────────────────────────────────────────────────────────────── */
.mpd-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--sh);
  margin-bottom: 16px;
}
.mpd-card__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}
.mpd-card-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

/* ─── Two-column layout ─────────────────────────────────────────────────────── */
.mpd-two-col {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px;
  margin-bottom: 16px;
}

/* ─── Tables ────────────────────────────────────────────────────────────────── */
.mpd-table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--border); }
.mpd-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mpd-table thead th {
  background: #f8fafc;
  text-align: left;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.mpd-table tbody tr { border-bottom: 1px solid #f1f5f9; transition: background .1s; }
.mpd-table tbody tr:last-child { border-bottom: none; }
.mpd-table tbody tr:hover { background: #f8fafc; }
.mpd-table tbody td { padding: 10px 12px; vertical-align: middle; }
.mpd-empty { text-align: center; color: var(--text-4); padding: 28px !important; font-size: 13px; }

/* ─── Mini progress bar ─────────────────────────────────────────────────────── */
.mpd-mini-bar {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3px;
  width: 72px;
}
.mpd-mini-bar__fill { height: 100%; border-radius: 3px; transition: width .4s; }

/* ─── Learner cell ──────────────────────────────────────────────────────────── */
.mpd-learner-cell { display: flex; align-items: center; gap: 10px; }
.mpd-learner-cell__name { font-weight: 600; font-size: 13px; color: var(--text); }
.mpd-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: .5px;
}
.mpd-sub { font-size: 11px; color: var(--text-4); }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.mpd-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r);
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  text-decoration: none; transition: all .15s;
  white-space: nowrap; font-family: var(--font); line-height: 1.4;
}
.mpd-btn--primary   { background: var(--blue); color: #fff; border-color: var(--blue); }
.mpd-btn--primary:hover   { background: #1d4ed8; border-color: #1d4ed8; }
.mpd-btn--secondary { background: var(--surface); color: var(--text-2); border-color: var(--border); }
.mpd-btn--secondary:hover { background: var(--bg); border-color: var(--border-d); }
.mpd-btn--ghost     { background: transparent; color: var(--text-3); border-color: var(--border); }
.mpd-btn--ghost:hover     { background: var(--bg); color: var(--text); }
.mpd-btn--danger    { background: var(--red); color: #fff; border-color: var(--red); }
.mpd-btn--danger:hover    { background: #dc2626; }
.mpd-btn--sm  { padding: 6px 12px; font-size: 12px; }
.mpd-btn--xs  { padding: 3px 9px;  font-size: 11px; }
.mpd-btn--full { width: 100%; justify-content: center; }

/* ─── Form inputs ───────────────────────────────────────────────────────────── */
.mpd-search-input, .mpd-select, .mpd-input, input[type="text"].mpd-input,
input[type="date"].mpd-input, input[type="number"].mpd-input, select.mpd-select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.mpd-search-input:focus, .mpd-select:focus, .mpd-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.mpd-search-input { max-width: 260px; }
.mpd-select       { max-width: 200px; width: auto; }

/* ─── Modal ─────────────────────────────────────────────────────────────────── */
.mpd-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.mpd-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(3px);
}
.mpd-modal__box {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  width: 92%; max-width: 780px;
  max-height: 88vh; overflow-y: auto;
  box-shadow: var(--sh-xl);
  animation: mpd-modal-in .2s cubic-bezier(.16,1,.3,1);
}
@keyframes mpd-modal-in { from { transform:scale(.96) translateY(10px); opacity:0; } to { transform:none; opacity:1; } }
.mpd-modal__body  { padding: 28px; }
.mpd-modal__close {
  position: absolute; top: 14px; right: 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 13px; color: var(--text-3); z-index: 1;
  transition: background .15s;
}
.mpd-modal__close:hover { background: var(--border-d); }

/* ─── Notices ───────────────────────────────────────────────────────────────── */
.mpd-notice { padding: 11px 14px; border-radius: var(--r); font-size: 13px; margin-bottom: 12px; font-weight: 500; }
.mpd-notice--error   { background: var(--red-l);   color: #991b1b; border: 1px solid #fecaca; }
.mpd-notice--success { background: var(--green-l); color: #065f46; border: 1px solid #a7f3d0; }
.mpd-notice--info    { background: var(--blue-l);  color: #1e40af; border: 1px solid #bfdbfe; }

/* ─── Apprentice stat strip ─────────────────────────────────────────────────── */
.mpd-stat-strip {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 10px;
  margin-bottom: 16px;
}
.mpd-stat-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--sh);
}
.mpd-ring-wrap   { position: relative; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.mpd-ring        { width: 64px; height: 64px; }
.mpd-ring-val    { position: absolute; font-size: 13px; font-weight: 800; color: var(--text); }
.mpd-stat-block__big   { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.mpd-stat-block__label { font-size: 11px; font-weight: 600; color: var(--text-3); }
.mpd-stat-block__sub   { font-size: 10px; color: var(--text-4); margin-top: 2px; }

/* ─── Priority Banner (Apprentice) ─────────────────────────────────────────── */
.mpd-priority-banner {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--red-l); border: 1px solid #fecaca;
  border-left: 4px solid var(--red);
  border-radius: var(--r-lg); padding: 18px; margin-bottom: 16px;
}
.mpd-priority-banner__icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.mpd-priority-banner__eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--red); margin-bottom: 4px;
}
.mpd-priority-banner__title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.mpd-priority-banner p { font-size: 13px; color: var(--text-3); margin-bottom: 12px; line-height: 1.6; }

/* ─── AI Insight Box ────────────────────────────────────────────────────────── */
.mpd-ai-insight-box {
  background: var(--blue-l); border: 1px solid #bfdbfe;
  border-radius: var(--r-lg); padding: 18px;
}
.mpd-ai-insight-box__header {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: var(--blue); text-transform: uppercase; margin-bottom: 8px;
}
.mpd-ai-insight-box p { font-size: 13px; color: var(--text-2); line-height: 1.65; }

/* ─── Apprentice two-col ────────────────────────────────────────────────────── */
.mpd-apprentice-hero {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-bottom: 20px;
}

/* ─── Quick actions ─────────────────────────────────────────────────────────── */
.mpd-quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mpd-quick-action {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 12px 16px; text-decoration: none; color: var(--text);
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all .15s; min-width: 90px;
}
.mpd-quick-action:hover { box-shadow: var(--sh-lg); border-color: var(--border-d); transform: translateY(-1px); }
.mpd-quick-action__icon { font-size: 22px; }

/* ─── Form grid ─────────────────────────────────────────────────────────────── */
.mpd-form-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.mpd-form-group { display: flex; flex-direction: column; gap: 4px; }
.mpd-form-group label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.mpd-form-group input, .mpd-form-group select {
  padding: 9px 11px; border: 1.5px solid var(--border); border-radius: var(--r);
  font-size: 13px; color: var(--text); font-family: var(--font);
  transition: border-color .15s, box-shadow .15s; background: var(--surface);
}
.mpd-form-group input:focus, .mpd-form-group select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

/* ─── Badge / pill ──────────────────────────────────────────────────────────── */
.mpd-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.mpd-badge--red    { background: var(--red-l);   color: #991b1b; border: 1px solid #fecaca; }
.mpd-badge--green  { background: var(--green-l); color: #065f46; border: 1px solid #a7f3d0; }
.mpd-badge--blue   { background: var(--blue-l);  color: #1e40af; border: 1px solid #bfdbfe; }
.mpd-badge--amber  { background: var(--amber-l); color: #78350f; border: 1px solid #fde68a; }
.mpd-badge--grey   { background: #f1f5f9; color: #475569; border: 1px solid var(--border); }

/* ─── Employer Setup ────────────────────────────────────────────────────────── */
.mpd-setup-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px; background: var(--bg); font-family: var(--font);
}
.mpd-setup-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 36px;
  width: 100%; max-width: 500px; box-shadow: var(--sh-xl);
}
.mpd-setup-card__header { text-align: center; margin-bottom: 28px; }
.mpd-setup-card__header h1 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.mpd-setup-card__header p  { font-size: 13px; color: var(--text-3); }
.mpd-setup-form { display: flex; flex-direction: column; gap: 14px; }

/* ─── Loading ───────────────────────────────────────────────────────────────── */
.mpd-loading { text-align: center; padding: 40px; color: var(--text-4); font-size: 13px; }
.mpd-loading::after { content: '…'; animation: mpd-dots 1.2s infinite; }
@keyframes mpd-dots { 0%,20%{content:'.'} 40%{content:'..'} 60%,100%{content:'...'} }

/* ─── Editable date ─────────────────────────────────────────────────────────── */
.mpd-editable-date { display: inline-flex; align-items: center; gap: 5px; }
.mpd-edit-date-btn {
  background: none; border: none; cursor: pointer; font-size: 12px;
  opacity: 0; transition: opacity .15s; padding: 0;
}
tr:hover .mpd-edit-date-btn, .mpd-editable-date:hover .mpd-edit-date-btn { opacity: 1; }
.mpd-overdue { color: var(--red); font-weight: 600; }

/* ─── Health check ──────────────────────────────────────────────────────────── */
.mpd-health-grid { display: flex; flex-direction: column; gap: 6px; max-width: 860px; }
.mpd-health-item {
  display: grid; grid-template-columns: 20px 200px 1fr;
  gap: 12px; align-items: start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px 14px; font-size: 13px;
}
.mpd-health-item--pass  { border-left: 3px solid var(--green); }
.mpd-health-item--warn  { border-left: 3px solid var(--amber); }
.mpd-health-item--fail  { border-left: 3px solid var(--red); }
.mpd-health-label  { font-weight: 700; color: var(--text); }
.mpd-health-detail { color: var(--text-3); line-height: 1.5; }
.mpd-health-fix    {
  grid-column: 3; background: var(--amber-l); border: 1px solid #fde68a;
  border-radius: 5px; padding: 7px 10px; color: #78350f; font-size: 12px; margin-top: 4px;
}

/* ─── GL Setup admin page ───────────────────────────────────────────────────── */
.mpd-gl-setup-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mpd-gl-setup-table th { text-align: left; padding: 8px 10px; background: #f8fafc; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing:.05em; color:var(--text-3); }
.mpd-gl-setup-table td { padding: 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .mpd-wrap { padding: 24px 20px 64px; }
  .mpd-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .mpd-wrap { padding: 16px 14px 64px; }
  .mpd-page-header { flex-direction: column; gap: 12px; }
  .mpd-stat-strip { grid-template-columns: repeat(3,1fr); }
  .mpd-apprentice-hero { grid-template-columns: 1fr; }
  .mpd-tiles { grid-template-columns: repeat(2,1fr); }
  .mpd-kpi-grid { grid-template-columns: repeat(2,1fr); }
  .mpd-form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .mpd-stat-strip { grid-template-columns: repeat(2,1fr); }
  .mpd-tiles { grid-template-columns: 1fr 1fr; }
  .mpd-kpi-grid { grid-template-columns: 1fr 1fr; }
  .mpd-form-grid { grid-template-columns: 1fr; }
}

/* ─── View As Banner ────────────────────────────────────────────────────────── */
.mpd-view-as-banner {
  display: flex !important;
  align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff; padding: 12px 20px;
  border-radius: var(--r); margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(37,99,235,.25);
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .mpd-stat-cards  { grid-template-columns: repeat(3,1fr) !important; }
  .mpd-hero-strip  { grid-template-columns: 1fr !important; }
}
@media (max-width: 768px) {
  .mpd-app         { padding: 16px 14px 64px; }
  .mpd-stat-cards  { grid-template-columns: repeat(2,1fr) !important; }
  .mpd-action-cards{ grid-template-columns: 1fr 1fr !important; }
  .mpd-two-col     { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .mpd-stat-cards  { grid-template-columns: 1fr 1fr !important; }
  .mpd-action-cards{ grid-template-columns: 1fr !important; }
}

/* ─── App Shell & Sidebar ────────────────────────────────────────────────────── */
.mpd-shell {
  display: flex !important;
  min-height: 100vh;
  background: #f1f5f9;
  font-family: var(--font);
}

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */
/* ── Main content ─────────────────────────────────────────────────────────── */
.mpd-app-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: #f1f5f9;
}
.mpd-app-main .mpd-learner-hub {
  padding: 32px 36px 80px;
  max-width: 1100px;
}

/* ── Mobile toggle & overlay ──────────────────────────────────────────────── */
.mpd-sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 300;
  background: #1e1b4b;
  border: none; border-radius: 8px;
  width: 40px; height: 40px;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.mpd-sidebar-toggle span {
  display: block; width: 20px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: all .2s;
}
.mpd-sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 150;
  backdrop-filter: blur(2px);
}
.mpd-sidebar-overlay.active { display: block; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .mpd-app-sidebar {
    position: fixed;
    top: 0; left: 0; height: 100%;
    transform: translateX(-100%);
    z-index: 250;
  }
  .mpd-app-sidebar.open { transform: translateX(0); box-shadow: 4px 0 32px rgba(0,0,0,.3); }
  .mpd-sidebar-toggle { display: flex; }
  .mpd-app-main .mpd-learner-hub { padding: 64px 16px 80px; }
}
@media (max-width: 600px) {
  .mpd-app-main .mpd-learner-hub { padding: 60px 12px 80px; }
  .mpd-lh-hero  { grid-template-columns: 1fr !important; }
  .mpd-lh-stats { grid-template-columns: 1fr 1fr !important; }
}


/* ═══════════════════════════════════════════════════════════════════════
   APPRENTICE DASHBOARD — exact MyPortfolio design replica
   ═══════════════════════════════════════════════════════════════════════ */

/* Utility */
.apd-red   { color: #ef4444 !important; }
.apd-muted { color: #94a3b8; font-size: 12px; }
.apd-link  { color: #2563eb !important; font-size: 13px; font-weight: 500; text-decoration: none !important; }
.apd-link:hover { text-decoration: underline !important; }
.apd-badge { border-radius: 20px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.apd-badge--red  { background: #ef4444; color: #fff; }
.apd-badge--blue { background: #dbeafe; color: #1e40af; }
.apd-empty-state { padding: 20px; color: #22c55e; font-weight: 600; text-align: center; }

/* ── Wrapper ──────────────────────────────────────────────────────────── */
.apd {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #0f172a;
  padding: 20px 22px 60px;
  background: #f8fafc;
  min-height: 100vh;
  max-width: 1160px;
}

/* ── Top bar ──────────────────────────────────────────────────────────── */
.apd-topbar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.apd-topbar__title { font-size: 22px; font-weight: 800; margin: 0 0 2px; letter-spacing: -.3px; }
.apd-topbar__sub   { font-size: 13px; color: #64748b; margin: 0; }
.apd-topbar__actions { display: flex !important; align-items: center; gap: 8px; }
.apd-topbar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: #475569; background: #f8fafc;
  cursor: pointer; text-decoration: none !important; font-family: inherit; transition: all .12s;
}
.apd-topbar-btn:hover { background: #fff; border-color: #cbd5e1; color: #1e293b; }
.apd-topbar-btn--icon { position: relative; padding: 7px 10px; font-size: 16px; }
.apd-notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: #ef4444; color: #fff; font-size: 9px; font-weight: 700;
  border-radius: 20px; padding: 0 5px; min-width: 16px; text-align: center;
  line-height: 16px; height: 16px;
}
.apd-topbar-btn--arrow { gap: 4px; }

/* ── Hero: Priority + AI Insight ─────────────────────────────────────── */
.apd-hero {
  display: grid !important;
  grid-template-columns: 1.55fr 1fr !important;
  gap: 12px;
  margin-bottom: 12px;
}

/* Priority card */
.apd-priority {
  background: #fff; border: 1px solid #e8edf2; border-radius: 12px;
  padding: 20px 22px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.apd-priority__eyebrow {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #94a3b8; margin-bottom: 14px;
}
.apd-eyebrow-dot {
  width: 7px; height: 7px; background: #ef4444; border-radius: 50%;
  animation: apd-blink 2s infinite;
}
@keyframes apd-blink { 0%,100%{opacity:1}50%{opacity:.3} }
.apd-priority__content { display: flex !important; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.apd-priority__icon {
  width: 52px; height: 52px; border-radius: 14px; font-size: 28px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.apd-priority__text h2 { font-size: 20px; font-weight: 800; color: #0f172a; margin: 0 0 6px; line-height: 1.2; }
.apd-priority__text p  { font-size: 13px; color: #64748b; line-height: 1.6; margin: 0; }
.apd-priority__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 8px; color: #fff !important;
  font-size: 14px; font-weight: 700; text-decoration: none !important;
  transition: opacity .12s; border: none; cursor: pointer; font-family: inherit;
}
.apd-priority__cta:hover { opacity: .88; color: #fff !important; }

/* AI Insight card */
.apd-ai-insight {
  background: linear-gradient(145deg, #1e3a8a, #2563eb);
  border-radius: 12px; padding: 20px 22px; color: #fff;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 20px rgba(37,99,235,.22);
}
.apd-ai-insight__head {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  opacity: .7; margin-bottom: 10px;
}
.apd-ai-insight__body { font-size: 14px; line-height: 1.7; margin-bottom: 12px; opacity: .96; }
.apd-ai-insight__link { color: rgba(255,255,255,.75) !important; font-size: 13px; font-weight: 600; text-decoration: none !important; }
.apd-ai-insight__link:hover { color: #fff !important; }
.apd-ai-robot {
  position: absolute; bottom: -14px; right: 10px;
  font-size: 80px; opacity: .12; pointer-events: none;
}

/* ── 5 Stat cards ─────────────────────────────────────────────────────── */
.apd-stats {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 10px;
  margin-bottom: 12px;
}
.apd-stat {
  background: #fff; border: 1px solid #e8edf2; border-radius: 12px;
  padding: 16px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.apd-stat--ring    { display: flex !important; align-items: center; gap: 12px; }
.apd-stat--flat    { display: flex !important; flex-direction: column; gap: 3px; }
.apd-stat--alert   { border-left: 3px solid #ef4444 !important; }
.apd-stat__ring    { position: relative; flex-shrink: 0; }
.apd-stat__ring-val {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #0f172a;
}
.apd-stat__flat-icon { font-size: 20px; margin-bottom: 4px; }
.apd-stat__label     { font-size: 11px; font-weight: 500; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; }
.apd-stat__value     { font-size: 15px; font-weight: 800; line-height: 1.2; margin: 2px 0; }
.apd-stat__target    { font-size: 11px; color: #94a3b8; }

/* ── Row 3: Actions + AI Coach ───────────────────────────────────────── */
.mpd-app-shell .apd-row3 {
  display: grid !important;
  grid-template-columns: 1fr 300px !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
  align-items: start;
}

/* Card base */
.apd-card {
  background: #fff; border: 1px solid #e8edf2; border-radius: 12px;
  padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.apd-card--alert { border-left: 4px solid #3b82f6; }
.apd-card__head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.apd-card__title { font-size: 14px; font-weight: 700; color: #0f172a; }
.apd-card__sub   { font-size: 12px; color: #94a3b8; }

/* Action cards */
.apd-actions-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
  gap: 10px;
}
.apd-action-card {
  border: 1px solid #e8edf2; border-radius: 10px; padding: 14px 12px;
  display: flex !important; flex-direction: column; gap: 7px;
  transition: box-shadow .12s; min-height: 160px;
}
.apd-action-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.apd-action-card__icon {
  width: 34px; height: 34px; border-radius: 8px; font-size: 16px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.apd-action-card__title { font-size: 12px; font-weight: 700; color: #0f172a; line-height: 1.3; }
.apd-action-card__body  { font-size: 11px; color: #64748b; line-height: 1.5; flex: 1; }
.apd-action-btn {
  display: block; width: 100%; padding: 8px 6px; text-align: center;
  border-radius: 7px; color: #fff !important; font-size: 11px; font-weight: 700;
  text-decoration: none !important; transition: opacity .12s; margin-top: auto;
  border: none; cursor: pointer; font-family: inherit;
}
.apd-action-btn:hover { opacity: .85; color: #fff !important; }

/* AI items */
.apd-ai-item {
  display: flex !important; gap: 10px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid #f1f5f9;
}
.apd-ai-item:last-of-type { border-bottom: none; }
.apd-ai-item__icon  { width: 36px; height: 36px; border-radius: 9px; font-size: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.apd-ai-item__body  { flex: 1; min-width: 0; }
.apd-ai-item__title { font-size: 12px; font-weight: 700; color: #0f172a; margin-bottom: 3px; }
.apd-ai-item__text  { font-size: 11px; color: #64748b; line-height: 1.45; }
.apd-ai-btn {
  white-space: nowrap; flex-shrink: 0; display: inline-block;
  background: #1e40af; color: #fff !important; font-size: 11px; font-weight: 600;
  padding: 6px 10px; border-radius: 7px; text-decoration: none !important; transition: background .12s;
}
.apd-ai-btn:hover { background: #1d4ed8; color: #fff !important; }
.apd-ai-btn--outline { background: transparent !important; color: #1e40af !important; border: 1.5px solid #1e40af; }
.apd-ai-btn--outline:hover { background: #eff6ff !important; }

/* ── Row 4: Progress + Gateway + Milestones ──────────────────────────── */
.mpd-app-shell .apd-row4 {
  display: grid !important;
  grid-template-columns: 1.1fr 0.95fr 0.95fr !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
  align-items: start;
}

/* Progress bars */
.apd-prog-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.apd-prog-icon  { font-size: 14px; flex-shrink: 0; width: 20px; text-align: center; }
.apd-prog-label { font-size: 12px; font-weight: 600; color: #334155; width: 76px; flex-shrink: 0; }
.apd-prog-track { flex: 1; height: 7px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.apd-prog-fill  { height: 100%; background: #22c55e; border-radius: 4px; transition: width .5s; }
.apd-prog-pct   { font-size: 11px; color: #64748b; width: 32px; text-align: right; flex-shrink: 0; }

/* Trend chart */
.apd-trend { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f1f5f9; }
.apd-trend__head   { font-size: 12px; font-weight: 600; color: #334155; margin-bottom: 8px; }
.apd-trend__chart  { height: 60px; }
.apd-trend__labels {
  display: flex; justify-content: space-between;
  font-size: 10px; color: #94a3b8; margin-top: 4px;
}

/* Gateway readiness */
.apd-gw-wrap { display: flex !important; align-items: center; gap: 16px; margin-bottom: 10px; }
.apd-gw-ring { position: relative; flex-shrink: 0; }
.apd-gw-ring-val {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.apd-gw-ring-pct   { font-size: 18px; font-weight: 800; color: #0f172a; }
.apd-gw-ring-label { font-size: 10px; color: #64748b; }
.apd-gw-checks { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.apd-gw-check  { display: flex !important; align-items: center; gap: 8px; font-size: 12px; color: #334155; }
.apd-gw-check-label { font-size: 12px; }

/* Milestones */
.apd-milestone {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid #f8fafc;
}
.apd-milestone:last-child { border-bottom: none; }
.apd-milestone__icon  { font-size: 15px; flex-shrink: 0; }
.apd-milestone__info  { flex: 1; min-width: 0; }
.apd-milestone__label { font-size: 12px; font-weight: 600; color: #0f172a; }
.apd-milestone__val   { font-size: 11px; color: #64748b; margin-top: 1px; }
.apd-milestone__action { flex-shrink: 0; }

/* ==========================================================================
   APP SHELL + SIDEBAR
   ========================================================================== */

.mpd-app-shell {
  display: flex !important;
  min-height: 100vh;
  background: #f0f2f5;
}

/* SIDEBAR */
.mpd-app-sidebar {
  width: 220px;
  min-width: 220px;
  flex-shrink: 0;
  background: #1a1740;
  display: flex !important;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  transition: transform .25s ease;
}

.mpd-sidebar-brand {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.mpd-sidebar-logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg,#6366f1,#8b5cf6);
  border-radius: 8px; color: #fff;
  font-size: 16px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mpd-sidebar-brand-name { font-size: 15px; font-weight: 800; color: #fff; }

.mpd-sidebar-nav {
  display: flex !important;
  flex-direction: column;
  gap: 1px;
  padding: 10px 8px;
  /* no flex:1 — let content size naturally so all 11 items are always visible */
  overflow: visible;
}
.mpd-sidebar-nav-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  color: rgba(255,255,255,.6);
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 500;
  transition: background .12s, color .12s;
  white-space: nowrap;
  cursor: pointer;
}
.mpd-sidebar-nav-item:hover  { background: rgba(255,255,255,.08); color: #fff !important; }
.mpd-sidebar-nav-item.active { background: rgba(99,102,241,.3)  !important; color: #fff !important; font-weight: 700; }
.mpd-sidebar-nav-icon  { font-size: 15px; flex-shrink: 0; width: 20px; text-align: center; }
.mpd-sidebar-nav-label { flex: 1; }
.mpd-sidebar-nav-badge {
  background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 20px; padding: 1px 6px;
  min-width: 17px; text-align: center; flex-shrink: 0;
}

.mpd-sidebar-footer {
  margin-top: auto;
  padding: 10px 10px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.mpd-sidebar-need-help {
  background: rgba(255,255,255,.05);
  border-radius: 9px; padding: 10px 12px; margin-bottom: 10px;
}
.mpd-sidebar-need-help-title { font-size: 11px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.mpd-sidebar-need-help-text  { font-size: 10px; color: rgba(255,255,255,.45); line-height: 1.4; margin-bottom: 7px; }
.mpd-sidebar-help-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.12); color: #fff !important;
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: 6px; text-decoration: none !important;
}
.mpd-sidebar-help-btn:hover { background: rgba(255,255,255,.22); }
.mpd-sidebar-user {
  display: flex !important; align-items: center; gap: 9px;
  padding: 7px 8px; border-radius: 8px; cursor: pointer;
}
.mpd-sidebar-user:hover { background: rgba(255,255,255,.06); }
.mpd-sidebar-user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.15);
}
.mpd-sidebar-user-info {}
.mpd-sidebar-user-name { font-size: 11px; font-weight: 700; color: #fff; }
.mpd-sidebar-user-role { font-size: 10px; color: rgba(255,255,255,.4); }

/* MAIN */
.mpd-app-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  height: 100vh;
  background: #f8fafc;
}
.mpd-app-main .apd {
  padding: 20px 22px 60px !important;
  background: #f8fafc !important;
  max-width: 1160px !important;
  box-sizing: border-box !important;
}

/* MOBILE TOGGLE */
.mpd-sidebar-toggle {
  display: none;
  position: fixed; top: 12px; left: 12px; z-index: 300;
  background: #1a1740; border: none; border-radius: 8px;
  width: 38px; height: 38px; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.mpd-sidebar-toggle span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; }
.mpd-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 150; }
.mpd-sidebar-overlay.active { display: block; }

@media (max-width: 960px) {
  .mpd-app-sidebar {
    position: fixed; top: 0; left: 0; height: 100%;
    transform: translateX(-100%);
    overflow-y: auto !important;
  }
  .mpd-app-sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.3); }
  .mpd-sidebar-toggle { display: flex; }
  .mpd-app-main .apd { padding: 56px 14px 60px; }
}

/* Inner sections (CIPD/coaching rendered in-page) */
.apd-inner-page {
  padding: 24px 28px 60px;
  max-width: 1240px; margin: 0 auto;
  background: #f8fafc; min-height: 100vh;
}
.apd-inner-page .cipd-student-dashboard,
.apd-inner-page .cipd-dashboard-wrapper,
.apd-inner-page .mpc-page,
.apd-inner-page .sp-portfolio-wrap { max-width: 100% !important; width: 100% !important; }
.apd-section-empty {
  padding: 40px; text-align: center; color: #64748b; font-size: 14px; line-height: 1.7;
}
@media (max-width: 960px) { .apd-inner-page { padding: 56px 14px 60px; } }


/* ==========================================================================
   APPRENTICE DASHBOARD (overview page)
   ========================================================================== */

.apd {
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #0f172a;
  padding: 20px 24px 60px;
  max-width: 1200px;
}

.apd-red   { color: #ef4444 !important; }
.apd-muted { color: #94a3b8; font-size: 12px; }
.apd-link  { color: #2563eb !important; font-size: 13px; font-weight: 500; text-decoration: none !important; }
.apd-link:hover { text-decoration: underline !important; }
.apd-badge { border-radius: 20px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.apd-badge--red  { background: #ef4444; color: #fff; }
.apd-badge--blue { background: #dbeafe; color: #1e40af; }
.apd-empty-state { padding: 20px; color: #22c55e; font-weight: 600; text-align: center; }

/* Top bar */
.apd-topbar {
  display: flex !important; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
  background: #fff; border-radius: 12px; padding: 14px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.apd-topbar__title { font-size: 22px; font-weight: 800; margin: 0 0 2px; letter-spacing: -.3px; }
.apd-topbar__sub   { font-size: 13px; color: #64748b; margin: 0; }
.apd-topbar__actions { display: flex !important; align-items: center; gap: 8px; }
.apd-topbar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: #475569; background: #f8fafc;
  cursor: pointer; text-decoration: none !important; font-family: inherit; transition: all .12s;
}
.apd-topbar-btn:hover { background: #fff; border-color: #cbd5e1; color: #1e293b; }
.apd-topbar-btn--icon { position: relative; padding: 7px 10px; font-size: 16px; }
.apd-notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: #ef4444; color: #fff; font-size: 9px; font-weight: 700;
  border-radius: 20px; padding: 0 5px; min-width: 16px; text-align: center; line-height: 16px; height: 16px;
}

/* Hero */
.mpd-app-shell .apd-hero { display: grid !important; grid-template-columns: 1.55fr 1fr !important; gap: 10px !important; margin-bottom: 10px !important; }
.apd-priority {
  background: #fff; border: 1px solid #e8edf2; border-radius: 12px;
  padding: 20px 22px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.apd-priority__eyebrow {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #94a3b8; margin-bottom: 14px;
}
.apd-eyebrow-dot { width: 7px; height: 7px; background: #ef4444; border-radius: 50%; animation: apd-blink 2s infinite; }
@keyframes apd-blink { 0%,100%{opacity:1}50%{opacity:.3} }
.apd-priority__content { display: flex !important; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.apd-priority__icon { width: 52px; height: 52px; border-radius: 14px; font-size: 28px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.apd-priority__text h2 { font-size: 20px; font-weight: 800; color: #0f172a; margin: 0 0 6px; line-height: 1.2; }
.apd-priority__text p  { font-size: 13px; color: #64748b; line-height: 1.6; margin: 0; }
.apd-priority__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 8px; color: #fff !important;
  font-size: 14px; font-weight: 700; text-decoration: none !important;
  transition: opacity .12s; border: none; cursor: pointer; font-family: inherit;
}
.apd-priority__cta:hover { opacity: .88; color: #fff !important; }

.apd-ai-insight {
  background: linear-gradient(145deg, #1e3a8a, #2563eb);
  border-radius: 12px; padding: 20px 22px; color: #fff;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 20px rgba(37,99,235,.22);
}
.apd-ai-insight::before { content: '🤖'; position: absolute; bottom: -14px; right: 10px; font-size: 80px; opacity: .1; pointer-events: none; }
.apd-ai-insight__head { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-bottom: 10px; }
.apd-ai-insight__body { font-size: 14px; line-height: 1.7; margin-bottom: 12px; opacity: .96; }
.apd-ai-insight__link { color: rgba(255,255,255,.75) !important; font-size: 13px; font-weight: 600; text-decoration: none !important; }

/* Stat cards */
.mpd-app-shell .apd-stats { display: grid !important; grid-template-columns: repeat(5,minmax(0,1fr)) !important; gap: 8px !important; margin-bottom: 10px !important; }
.apd-stat { background: #fff; border: 1px solid #e8edf2; border-radius: 12px; padding: 16px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.apd-stat--ring  { display: flex !important; align-items: center; gap: 12px; }
.apd-stat--flat  { display: flex !important; flex-direction: column; gap: 3px; }
.apd-stat--alert { border-left: 3px solid #ef4444 !important; }
.apd-stat__ring  { position: relative; flex-shrink: 0; }
.apd-stat__ring-val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #0f172a; }
.apd-stat__flat-icon { font-size: 20px; margin-bottom: 4px; }
.apd-stat__label  { font-size: 11px; font-weight: 500; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; }
.apd-stat__value  { font-size: 15px; font-weight: 800; line-height: 1.2; margin: 2px 0; }
.apd-stat__value--red { color: #ef4444 !important; }
.apd-stat__target { font-size: 11px; color: #94a3b8; }

/* Row 3 */
.mpd-app-shell .apd-row3 { display: grid !important; grid-template-columns: 1fr 300px !important; gap: 10px !important; margin-bottom: 10px !important; align-items: start; }
.apd-card { background: #fff; border: 1px solid #e8edf2; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.apd-card--alert { border-left: 4px solid #3b82f6; }
.apd-card__head  { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.apd-card__title { font-size: 14px; font-weight: 700; color: #0f172a; }
.apd-card__sub   { font-size: 12px; color: #94a3b8; }

.mpd-app-shell .apd-actions-grid { display: grid !important; grid-template-columns: repeat(auto-fill,minmax(130px,1fr)) !important; gap: 8px !important; }
.apd-action-card { border: 1px solid #e8edf2; border-radius: 10px; padding: 14px 12px; display: flex !important; flex-direction: column; gap: 7px; min-height: 155px; transition: box-shadow .12s; }
.apd-action-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.apd-action-card__icon { width: 34px; height: 34px; border-radius: 8px; font-size: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.apd-action-card__title { font-size: 12px; font-weight: 700; color: #0f172a; line-height: 1.3; }
.apd-action-card__body  { font-size: 11px; color: #64748b; line-height: 1.5; flex: 1; }
.apd-action-btn {
  display: block; width: 100%; padding: 8px 6px; text-align: center;
  border-radius: 7px; color: #fff !important; font-size: 11px; font-weight: 700;
  text-decoration: none !important; transition: opacity .12s; margin-top: auto; border: none; cursor: pointer; font-family: inherit;
}
.apd-action-btn:hover { opacity: .85; color: #fff !important; }

.apd-ai-item { display: flex !important; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.apd-ai-item:last-of-type { border-bottom: none; }
.apd-ai-item__icon { width: 36px; height: 36px; border-radius: 9px; font-size: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.apd-ai-item__body { flex: 1; min-width: 0; }
.apd-ai-item__title { font-size: 12px; font-weight: 700; color: #0f172a; margin-bottom: 3px; }
.apd-ai-item__text  { font-size: 11px; color: #64748b; line-height: 1.45; }
.apd-ai-btn { white-space: nowrap; flex-shrink: 0; display: inline-block; background: #1e40af; color: #fff !important; font-size: 11px; font-weight: 600; padding: 6px 10px; border-radius: 7px; text-decoration: none !important; }
.apd-ai-btn:hover { background: #1d4ed8; color: #fff !important; }
.apd-ai-btn--outline { background: transparent !important; color: #1e40af !important; border: 1.5px solid #1e40af; }
.apd-ai-btn--outline:hover { background: #eff6ff !important; }

/* Row 4 */
.mpd-app-shell .apd-row4 { display: grid !important; grid-template-columns: 1.1fr 0.95fr 0.95fr !important; gap: 12px !important; margin-bottom: 12px !important; align-items: start; }
.apd-prog-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.apd-prog-icon  { font-size: 14px; flex-shrink: 0; width: 20px; text-align: center; }
.apd-prog-label { font-size: 12px; font-weight: 600; color: #334155; width: 76px; flex-shrink: 0; }
.apd-prog-track { flex: 1; height: 7px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.apd-prog-fill  { height: 100%; background: #22c55e; border-radius: 4px; transition: width .5s; }
.apd-prog-pct   { font-size: 11px; color: #64748b; width: 32px; text-align: right; flex-shrink: 0; }
.apd-trend { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f1f5f9; }
.apd-trend__head { font-size: 12px; font-weight: 600; color: #334155; margin-bottom: 8px; }
.apd-trend__chart { height: 60px; }
.apd-trend__labels { display: flex; justify-content: space-between; font-size: 10px; color: #94a3b8; margin-top: 4px; }

.apd-gw-wrap { display: flex !important; align-items: center; gap: 16px; margin-bottom: 10px; }
.apd-gw-ring { position: relative; flex-shrink: 0; }
.apd-gw-ring-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.apd-gw-ring-pct   { font-size: 18px; font-weight: 800; color: #0f172a; }
.apd-gw-ring-label { font-size: 10px; color: #64748b; }
.apd-gw-checks { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.apd-gw-check  { display: flex !important; align-items: center; gap: 8px; font-size: 12px; color: #334155; }

.apd-milestone { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f8fafc; }
.apd-milestone:last-child { border-bottom: none; }
.apd-milestone__icon   { font-size: 15px; flex-shrink: 0; }
.apd-milestone__info   { flex: 1; min-width: 0; }
.apd-milestone__label  { font-size: 12px; font-weight: 600; color: #0f172a; }
.apd-milestone__val    { font-size: 11px; color: #64748b; margin-top: 1px; }
.apd-milestone__action { flex-shrink: 0; }

/* Row 5 */
.mpd-app-shell .apd-row5 { display: grid !important; grid-template-columns: 1.5fr 1fr !important; gap: 10px !important; margin-bottom: 10px !important; }
.mpd-app-shell .apd-quick-grid { display: grid !important; grid-template-columns: repeat(7,minmax(0,1fr)) !important; gap: 8px !important; }
.apd-quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px; border: 1px solid #e8edf2; border-radius: 10px;
  text-decoration: none !important; color: #334155 !important;
  font-size: 11px; font-weight: 500; text-align: center; background: #fafbfd; transition: all .12s; cursor: pointer;
}
.apd-quick-btn:hover { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.08); border-color: #c7d2dd; }
.apd-quick-btn__icon { font-size: 22px; }
.apd-achievements { display: flex !important; gap: 10px; flex-wrap: wrap; }
.apd-achievement { flex: 1; min-width: 100px; background: #fafbfd; border: 1px solid #f1f5f9; border-radius: 10px; padding: 14px 10px; text-align: center; }
.apd-achievement__bubble { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; margin: 0 auto 8px; }
.apd-achievement__title { font-size: 11px; font-weight: 700; color: #334155; margin-bottom: 3px; }
.apd-achievement__sub   { font-size: 10px; color: #94a3b8; line-height: 1.3; }

/* Responsive */
@media (max-width: 1200px) {
  .mpd-app-shell .mpd-app-shell .apd-row3 { grid-template-columns: 1fr !important; }
  .mpd-app-shell .mpd-app-shell .apd-row4 { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 960px) {
  .mpd-app-shell .apd-hero  { grid-template-columns: 1fr !important; }
  .mpd-app-shell .apd-stats { grid-template-columns: repeat(3,1fr) !important; }
  .mpd-app-shell .apd-quick-grid { grid-template-columns: repeat(4,1fr) !important; }
  .mpd-app-shell .mpd-app-shell .apd-row5 { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .mpd-app-shell .apd-stats  { grid-template-columns: 1fr 1fr !important; }
  .mpd-app-shell .mpd-app-shell .apd-row4   { grid-template-columns: 1fr !important; }
  .mpd-app-shell .apd-quick-grid { grid-template-columns: repeat(3,1fr) !important; }
}

/* ═══════════════════════════════════════════════════════════════
   NEW APPRENTICE DASHBOARD - EXACT MyPortfolio DESIGN
   ═══════════════════════════════════════════════════════════════ */

/* Main Dashboard Layout */
.apd-dashboard {
    display: flex !important;
    min-height: 100vh;
    background: #F8F9FB;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Sidebar */
.apd-sidebar {
    width: 260px;
    min-width: 260px;
    background: #0E1532;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex !important;
    flex-direction: column;
    overflow-y: auto;
}

.apd-sidebar-brand {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.apd-sidebar-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #2563eb, #7B61FF);
    border-radius: 10px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apd-sidebar-brand-name {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}

.apd-sidebar-nav {
    display: flex !important;
    flex-direction: column;
    gap: 2px;
    padding: 14px 10px;
    flex: 1;
}

.apd-nav-item {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,.65);
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 500;
    transition: all .15s;
}

.apd-nav-item:hover {
    background: rgba(255,255,255,.08);
    color: #fff !important;
}

.apd-nav-item.active {
    background: #2563EB !important;
    color: #fff !important;
    font-weight: 700;
}

.apd-nav-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.apd-nav-label {
    flex: 1;
}

.apd-nav-badge {
    background: #EB5757;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 20px;
    padding: 1px 7px;
    min-width: 18px;
    text-align: center;
}

.apd-sidebar-help {
    background: #1a1a40;
    border-radius: 12px;
    padding: 16px;
    margin: 10px;
}

.apd-sidebar-help h4 {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.apd-sidebar-help p {
    font-size: 11px;
    color: rgba(255,255,255,.5);
    margin: 0 0 10px;
    line-height: 1.4;
}

.apd-help-btn {
    display: inline-block;
    background: rgba(255,255,255,.1);
    color: #fff !important;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none !important;
}

.apd-sidebar-user {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 14px 12px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.apd-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.apd-user-info {
    flex: 1;
}

.apd-user-name {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.apd-user-role {
    font-size: 11px;
    color: rgba(255,255,255,.5);
}

/* Main Content Area */
.apd-main {
    flex: 1;
    padding: 0;
    background: #F8F9FB;
    overflow-y: auto;
}

/* Header */
.apd-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 28px;
    background: #fff;
    border-bottom: 1px solid #E8EDf2;
    flex-wrap: wrap;
}

.apd-header-greeting h1 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px;
    letter-spacing: -.3px;
}

.apd-header-greeting p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.apd-header-actions {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.apd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: all .12s;
    font-family: inherit;
    border: 1px solid transparent;
}

.apd-btn--primary {
    background: #2563EB;
    color: #fff !important;
    border-color: #2563EB;
}

.apd-btn--primary:hover {
    background: #1D4ED8;
}

.apd-btn--secondary {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

.apd-btn--secondary:hover {
    background: #fff;
    border-color: #cbd5e1;
}

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

.apd-btn--outline {
    background: transparent !important;
    color: #1e40af !important;
    border: 1.5px solid #1e40af !important;
}

.apd-btn--outline:hover {
    background: #eff6ff !important;
}

.apd-notification-btn {
    position: relative;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 18px;
    cursor: pointer;
}

.apd-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EB5757;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 20px;
    padding: 0 5px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
}

/* Sections */
.apd-section {
    padding: 20px 28px;
}

.apd-section--hero {
    display: grid !important;
    grid-template-columns: 1.5fr 1fr;
    gap: 14px;
}

.apd-section--kpis {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.apd-section--row2 {
    display: grid !important;
    grid-template-columns: 1.4fr 1fr;
    gap: 14px;
}

.apd-section--row3 {
    display: grid !important;
    grid-template-columns: 1.1fr 0.95fr 0.95fr;
    gap: 14px;
}

/* Cards */
.apd-card {
    background: #fff;
    border: 1px solid #E8EDf2;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.apd-card--priority {
    border-left: 4px solid #EB5757;
}

.apd-card--ai {
    background: linear-gradient(145deg, #1e3a8a, #2563eb);
    color: #fff;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
}

.apd-card--kpi {
    background: #fff;
    border: 1px solid #E8EDf2;
    border-radius: 14px;
    padding: 18px 16px;
}

.apd-card--alert {
    border-left: 3px solid #EB5757;
}

.apd-card--review {
    border-left: 4px solid #2F80ED;
}

.apd-card-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 14px;
}

.apd-label-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: apd-pulse 2s infinite;
}

@keyframes apd-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

.apd-card-label--ai {
    color: rgba(255,255,255,.7);
}

.apd-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.apd-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.apd-card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.apd-card-subtitle {
    font-size: 12px;
    color: #94a3b8;
    width: 100%;
    margin-top: 4px;
}

.apd-card-header-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.apd-card-header-inline h3 {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.apd-card-footer {
    margin-top: 14px;
    text-align: right;
}

.apd-info {
    color: #94a3b8;
    font-size: 12px;
}

/* Priority Card */
.apd-priority-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.apd-priority-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.apd-priority-text h2 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
}

.apd-priority-text p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* AI Insight Card */
.apd-ai-message {
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 14px;
    opacity: .96;
}

.apd-ai-message strong {
    color: #fff;
}

.apd-ai-link {
    color: rgba(255,255,255,.75) !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
}

.apd-ai-link:hover {
    color: #fff !important;
}

/* KPI Cards */
.apd-card--kpi {
    display: flex;
    align-items: center;
    gap: 14px;
}

.apd-kpi-ring {
    position: relative;
    flex-shrink: 0;
}

.apd-ring-svg {
    width: 68px;
    height: 68px;
    transform: rotate(-90deg);
}

.apd-ring-svg--large {
    width: 90px;
    height: 90px;
}

.apd-ring-track {
    fill: none;
    stroke: #e8edf2;
    stroke-width: 3.5;
}

.apd-ring-fill {
    fill: none;
    stroke-width: 3.5;
    stroke-linecap: round;
    transition: stroke-dasharray .6s ease;
}

.apd-ring-fill--green { stroke: #27AE60; }
.apd-ring-fill--red   { stroke: #EB5757; }
.apd-ring-fill--blue  { stroke: #2F80ED; }
.apd-ring-fill--orange{ stroke: #F2994A; }

.apd-ring-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.apd-kpi-info {
    flex: 1;
    min-width: 0;
}

.apd-kpi-label {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.apd-kpi-status {
    font-size: 14px;
    font-weight: 800;
    margin: 3px 0;
}

.apd-kpi-status--green { color: #27AE60; }
.apd-kpi-status--red   { color: #EB5757; }
.apd-kpi-status--orange{ color: #F2994A; }

.apd-kpi-target {
    font-size: 11px;
    color: #94a3b8;
}

.apd-kpi-link {
    font-size: 12px;
    color: #2563eb !important;
    text-decoration: none;
    font-weight: 500;
}

.apd-kpi-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

/* Readiness */
.apd-readiness {
    display: flex;
    gap: 16px;
    align-items: center;
}

.apd-readiness-ring {
    position: relative;
    flex-shrink: 0;
}

.apd-readiness-value {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.apd-readiness-pct {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.apd-readiness-label {
    font-size: 9px;
    color: #64748b;
}

.apd-readiness-list {
    flex: 1;
}

.apd-readiness-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 12px;
    color: #334155;
}

.apd-readiness-icon {
    font-size: 14px;
}

/* Progress Bars */
.apd-progress-bars {
    margin-bottom: 16px;
}

.apd-progress-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.apd-progress-icon {
    font-size: 14px;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

.apd-progress-label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    width: 78px;
    flex-shrink: 0;
}

.apd-progress-bar {
    flex: 1;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.apd-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .5s ease;
}

.apd-progress-value {
    font-size: 11px;
    color: #64748b;
    width: 34px;
    text-align: right;
    flex-shrink: 0;
}

.apd-progress-trend {
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.apd-trend-label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.apd-trend-chart {
    height: 58px;
}

.apd-trend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Milestones */
.apd-milestones {
    display: flex;
    flex-direction: column;
}

.apd-milestone-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
}

.apd-milestone-item:last-child {
    border-bottom: none;
}

.apd-milestone-icon {
    font-size: 15px;
    flex-shrink: 0;
}

.apd-milestone-content {
    flex: 1;
    min-width: 0;
}

.apd-milestone-title {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
}

.apd-milestone-value {
    font-size: 11px;
    color: #64748b;
}

.apd-milestone-alert {
    color: #EB5757 !important;
    font-weight: 600;
}

.apd-milestone-action {
    font-size: 12px;
    font-weight: 600;
    color: #EB5757;
    text-decoration: none;
}

.apd-milestone-dash {
    color: #94a3b8;
    font-size: 12px;
}

/* Actions Grid */
.apd-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.apd-action-card {
    border: 1px solid #e8edf2;
    border-radius: 12px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: box-shadow .12s;
    min-height: 165px;
}

.apd-action-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

.apd-action-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apd-action-title {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.apd-action-body {
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
    flex: 1;
}

/* AI Coach Items */
.apd-ai-items {
    display: flex;
    flex-direction: column;
}

.apd-ai-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.apd-ai-item:last-child {
    border-bottom: none;
}

.apd-ai-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.apd-ai-item-content {
    flex: 1;
    min-width: 0;
}

.apd-ai-item-title {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
}

.apd-ai-item-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.45;
    margin-bottom: 8px;
}

/* Quick Actions */
.apd-quick-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.apd-quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 4px;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    text-decoration: none !important;
    color: #334155 !important;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    background: #fafbfd;
    transition: all .12s;
}

.apd-quick-item:hover {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border-color: #c7d2dd;
}

.apd-quick-icon {
    font-size: 22px;
}

/* Achievements */
.apd-achievements {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.apd-achievement-item {
    flex: 1;
    min-width: 100px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
}

.apd-achievement-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 8px;
}

.apd-achievement-title {
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 3px;
}

.apd-achievement-sub {
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.3;
}

/* Badges */
.apd-badge {
    border-radius: 20px;
    padding: 2px 9px;
    font-size: 10px;
    font-weight: 700;
}

.apd-badge--red {
    background: #EB5757;
    color: #fff;
}

.apd-badge--purple {
    background: #7B61FF20;
    color: #7B61FF;
    border: 1px solid #7B61FF40;
}

/* Review Section */
.apd-review-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.apd-review-header h3 {
    margin: 0 0 6px;
}

.apd-review-status {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.apd-status-pill {
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
}

.apd-status-pill--green {
    background: #dcfce7;
    color: #166534;
}

.apd-status-pill--blue {
    background: #dbeafe;
    color: #1e40af;
}

.apd-status-pill--red {
    background: #fee2e2;
    color: #991b1b;
}

/* Action Items List */
.apd-action-items {
    margin-top: 14px;
}

.apd-action-items h4 {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 10px;
}

.apd-action-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f8fafc;
}

.apd-action-item input[type="checkbox"] {
    margin-top: 2px;
    cursor: pointer;
}

.apd-text-done {
    text-decoration: line-through;
    color: #94a3b8;
}

/* Empty State */
.apd-empty-state {
    padding: 24px;
    text-align: center;
}

.apd-empty-state--success {
    color: #22c55e;
    font-weight: 600;
}

/* Links */
.apd-link {
    color: #2563eb !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
}

.apd-link:hover {
    text-decoration: underline !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .apd-section--row3 {
        grid-template-columns: 1fr 1fr !important;
    }
    .apd-section--row2 {
        grid-template-columns: 1fr !important;
    }
    .apd-quick-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

@media (max-width: 960px) {
    .apd-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        z-index: 300;
        transition: transform .25s ease;
    }

    .apd-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,.3);
    }

    .apd-section--hero,
    .apd-section--kpis {
        grid-template-columns: 1fr !important;
    }

    .apd-header {
        padding: 14px 18px;
    }

    .apd-section {
        padding: 16px 18px;
    }

    .apd-quick-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .apd-section--kpis {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .apd-section--row3 {
        grid-template-columns: 1fr !important;
    }

    .apd-quick-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
