/* Global polish layer. Loaded last, so it refines the tokens and shared controls for every page at once.
   Keep page-specific styling in the other files; only app-wide rules belong here. */

:root {
  --ink: #14201a;
  --muted: #5f6c63;
  --line: #dde3d6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 32, 58, 0.04), 0 14px 34px -20px rgba(33, 79, 142, 0.24);
  --ring: 0 0 0 3px rgba(21, 88, 223, 0.22);
  --font-display: "Bricolage Grotesque", "DM Sans", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: fixed;
  z-index: 1100;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 10px;
  background: #123d2e;
  color: #f7faf4;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow);
}

/* Country planning and explicitly enabled feature ads. */
.country-plan-card { margin: 0 0 22px; padding: 22px; background: linear-gradient(135deg, #fbfdf8, #f0f7ef); border: 1px solid #d5e4d4; border-radius: 18px; box-shadow: var(--shadow); }
.country-plan-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.country-plan-kicker { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.country-plan-heading h2 { margin: 5px 0; font-size: 21px; }
.country-plan-heading p { max-width: 660px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.country-plan-count { flex: 0 0 auto; border-radius: 999px; background: #e4efe3; color: #245d3b; padding: 7px 11px; font-size: 11px; font-weight: 700; }
.country-plan-selectors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 17px 0 12px; }
.country-plan-selectors label { display: grid; gap: 6px; color: #38453b; font-size: 12px; font-weight: 700; }
.country-plan-selectors input, .country-plan-selectors select { width: 100%; min-width: 0; min-height: 42px; border: 1px solid #cad8c8; border-radius: 10px; background: white; color: var(--ink); padding: 0 11px; font: inherit; }
.country-plan-notice { padding: 11px 13px; border: 1px solid #e5e8d5; border-radius: 10px; background: #fffef8; color: #58614d; font-size: 12px; line-height: 1.5; }
.country-plan-notice strong { display: block; margin-bottom: 2px; color: #314b35; }
.country-plan-results { margin-top: 12px; }
.country-check-summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--green-dark); font-size: 12px; }
.country-check-summary span { color: var(--muted); font-size: 11px; }
.country-authority-link { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 15px; border: 1px solid #c8ddcb; border-radius: 12px; background: white; color: var(--ink); text-decoration: none; }
.country-authority-link:hover { border-color: var(--green); box-shadow: 0 5px 18px #164b2b14; }
.country-authority-link strong, .country-authority-link small { display: block; }
.country-authority-link strong { font-size: 13px; }
.country-authority-link small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.country-authority-link > span:last-child { color: var(--green); font-size: 20px; }
.country-source-missing { padding: 13px 15px; border: 1px solid #f1dfb4; border-radius: 12px; background: #fffbef; color: #5b4c2b; font-size: 12px; line-height: 1.5; }
.country-source-missing p { margin: 4px 0 0; }
.country-list-intro { margin: 15px 0 8px; color: var(--muted); font-size: 12px; }
.country-check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.country-check-item { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; cursor: pointer; }
.country-check-item.is-done { border-color: #b6d6bd; background: #f2faf2; }
.country-check-item input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--green); }
.country-check-item strong, .country-check-item small { display: block; }
.country-check-item strong { font-size: 12px; line-height: 1.4; }
.country-check-item small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.country-check-disclaimer { margin: 11px 0 0; color: #6a5b3c; font-size: 11px; line-height: 1.5; }
.feature-ad-slot:empty { display: none; }
.feature-ad-slot:not(:empty) { position: relative; min-height: 90px; margin: 0 0 20px; padding: 13px; border: 1px dashed #d8ded6; border-radius: 12px; background: #fbfcfa; }
.ad-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 640px) {
  .country-plan-card { padding: 16px; }
  .country-plan-heading { flex-direction: column; gap: 9px; }
  .country-plan-selectors, .country-check-list { grid-template-columns: 1fr; }
  .country-check-summary { align-items: flex-start; flex-direction: column; gap: 3px; }
}
.skip-link:focus { transform: translateY(0); }
.main-content:focus { outline: none; }

/* Type: one display face for headings, balanced lines, no orphaned last words */
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; }
h1 { letter-spacing: -0.03em; }
h2 { letter-spacing: -0.015em; }
p, li, .intro, .sch-desc, .hero-subtitle { text-wrap: pretty; }
.stat-card strong, .stat-value, .nav-count, .record-value { font-variant-numeric: tabular-nums; }

/* Keyboard focus: always visible, same look everywhere */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.primary-button:focus-visible, .secondary-button:focus-visible { outline-offset: 3px; box-shadow: var(--ring); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--green); box-shadow: var(--ring); }

/* Controls respond to hover, press and focus the same way */
button, a, input, select, textarea, .nav-item, .stat-card {
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease),
    box-shadow 0.16s var(--ease), transform 0.16s var(--ease);
}
.primary-button:not(:disabled):active, .secondary-button:not(:disabled):active { transform: translateY(1px); }
.primary-button:not(:disabled):hover { box-shadow: 0 8px 18px -10px rgba(28, 80, 55, 0.55); }
.secondary-button:hover { border-color: var(--green); }

/* Navigation: the current page is marked by more than colour */
.nav-item.active { box-shadow: inset 3px 0 0 var(--green); }

/* Cards: one surface language (border, radius, soft shadow, calm hover) */
.stat-card, .sch-card, .feature-card, .uni-card {
  border-radius: var(--radius);
}
.sch-card, .feature-card { box-shadow: var(--shadow); }
.stat-card:hover { border-color: #c4d3c0; }

::selection { background: var(--lime); color: var(--ink); }

/* Respect people who ask for less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Modern app shell: UniApply light-blue & teal theme ===== */
:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2eaf4;
  --green: #0ea58a;
  --green-dark: #0d8a73;
  --pale: #f3f8ff;
  --soft-green: #e6f9f4;
  --brand-blue: #2563eb;
  --brand-blue-soft: #dbeafe;
  --shadow: 0 2px 6px rgba(15, 23, 42, 0.03), 0 12px 30px -16px rgba(30, 64, 175, 0.14);
  --ring: 0 0 0 3px rgba(37, 99, 235, 0.22);
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
}

.app-shell { background: var(--pale); }

.sidebar { background: #f8fbff; color: #1e293b; border-right: 1px solid #e2eaf4; padding: 22px 14px 16px; }
.sidebar .brand { color: #0f172a; }
.sidebar .brand-accent { color: var(--brand-blue); }
.sidebar .brand-mark { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.sidebar .brand-mark span { background: #ffffff; }
.brand { font-family: var(--font-display); font-size: 21px; letter-spacing: -0.035em; }
.workspace-label { margin: 22px 12px 2px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: #64748b; }
.main-nav { gap: 3px; }
.nav-group-label { margin: 14px 12px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; }
.nav-group-label:first-child { margin-top: 6px; }
.nav-item { height: 40px; border-radius: 10px; gap: 11px; padding: 0 12px; font-size: 13.5px; font-weight: 500; color: #334155; position: relative; }
.nav-item:hover { background: #edf4ff; color: #0f172a; }
.nav-item.active { background: #dbeafe; color: #1d4ed8; font-weight: 600; box-shadow: none; }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #2563eb; }
.nav-icon { width: 22px; display: grid; place-items: center; color: #475569; }
.nav-item.active .nav-icon { color: #1d4ed8; }
.nav-svg { width: 19px; height: 19px; flex: none; opacity: 0.85; }
.nav-item.active .nav-svg { opacity: 1; }
.nav-count { background: #e6eef8; color: #475569; font-weight: 600; border-radius: 999px; }
.nav-item.active .nav-count { background: #ffffff; color: #1d4ed8; }
.badge-new { border-radius: 999px; }
.sidebar .badge-new { background: #e0f2fe; color: #0369a1; }
.privacy-note { background: #eff6ff; border: 1px solid #dbeafe; }
.sidebar .privacy-note strong { color: #1e3a8a; }
.sidebar .privacy-note p { color: #475569; }
.sidebar .lock-icon { color: #2563eb; }
.profile-button:hover { background: #edf4ff; }
.sidebar .profile-copy strong { color: #0f172a; }
.sidebar .profile-copy small, .sidebar .more-icon { color: #64748b; }
.sidebar .avatar { background: #dbeafe; color: #1d4ed8; }

.topbar { height: 64px; padding: 0 32px; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.breadcrumbs { font-size: 13.5px; }
.breadcrumbs strong { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.topbar-actions { gap: 10px; }
.pdf-export-header-btn, .upgrade-header-btn { height: 36px; border-radius: 10px; padding: 0 14px; font-size: 13px; font-weight: 600; }
.upgrade-header-btn { background: var(--brand-blue); color: #ffffff; border: 1px solid var(--brand-blue); }
.upgrade-header-btn:hover { background: #1d4ed8; }
.icon-button, .signout-btn { border-radius: 10px; border-color: var(--line); background: var(--white); }
.icon-button:hover { border-color: var(--brand-blue); }
.top-avatar, .avatar { background: #dbeafe; color: #1d4ed8; }

/* Page header: big calm heading, no uppercase kicker */
.page-wrap { padding: 36px 36px 28px; max-width: 1240px; width: 100%; margin: 0 auto; }
.welcome-row { margin-bottom: 28px; }
.welcome-row .eyebrow { display: none; }
h1 { font-size: clamp(28px, 3.2vw, 38px); letter-spacing: -0.035em; line-height: 1.08; }
.intro { max-width: 52ch; font-size: 14.5px; line-height: 1.6; }

/* Stat cards: number first, label second, accent edge */
.stats-row { gap: 14px; margin-bottom: 24px; }
.stat-card { padding: 18px 20px 16px; border-radius: var(--radius); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #cfe0c8; }
.stat-card.ai-stat::before { background: var(--green); }
.stat-num { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat-label { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 500; color: var(--muted); }

/* Quick links: quiet chips without emoji */
.feature-pills-row { gap: 8px; margin-bottom: 24px; }
.feature-pill { border-radius: 999px; padding: 8px 14px; font-size: 12.5px; font-weight: 600; box-shadow: none; }
.feature-pill > span:first-child { display: none; }

/* Cards and panels share one surface */
.progress-card, .main-panel, .side-panel, .panel, .deadline-card { border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.progress-percent { font-family: var(--font-display); letter-spacing: -0.03em; }
.step-label { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.progress-track { height: 8px; }
.panel-heading h3 { font-size: 17px; letter-spacing: -0.015em; }

/* Forms */
input, select, textarea { border-radius: 10px; }
.secondary-button, .primary-button { border-radius: 10px; }

@media (max-width: 1100px) { .page-wrap { padding: 28px 24px 24px; } }
@media (min-width: 561px) and (max-width: 1100px) {
  .topbar { gap: 12px; padding-inline: 20px; }
  .breadcrumbs { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
  .breadcrumbs > span, .breadcrumbs > .crumb-separator { display: none; }
  .breadcrumbs strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { flex: 0 0 auto; gap: 7px; }
  .fx-rate-status { display: none; }
}
@media (max-width: 800px) {
  /* Keep the icon rail compact after this last-loaded stylesheet overrides base nav rules. */
  .sidebar { width: 64px; flex-basis: 64px; padding-inline: 8px; }
  .sidebar .brand { justify-content: center; padding-inline: 0; }
  .sidebar .brand > span:last-child, .workspace-label { display: none; }
  .nav-item { width: 44px; height: 44px; justify-content: center; gap: 0; padding: 0; font-size: 0; }
  .nav-item .badge-new, .nav-count, .sidebar-bottom .privacy-note, .profile-copy, .more-icon { display: none; }
  .profile-button { justify-content: center; padding: 12px 0 0; }
  .nav-group-label { display: none; }
  .nav-item.active::before { left: -8px; }
  .nav-svg { width: 20px; height: 20px; }
  .page-wrap { padding: 22px 16px 20px; }
  .topbar { padding: 0 16px; }
  .nav-item[title]::after {
    position: absolute;
    z-index: 30;
    top: 50%;
    left: calc(100% + 8px);
    transform: translateY(-50%);
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #0f172a;
    color: #f8fafc;
    content: attr(title);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(12, 35, 26, .2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .nav-item[title]:hover::after, .nav-item[title]:focus-visible::after { opacity: 1; visibility: visible; }
}
@media (max-width: 560px) {
  .app-shell, .main-content, .page-wrap { min-width: 0; max-width: 100%; }
  .steps { flex-direction: column; gap: 4px; }
  .step { width: 100%; min-width: 0; }
  .uni-mode-tabs { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; }
  .uni-mode-tab { min-width: 0; text-align: left; white-space: normal; }
  .uni-search-layout { grid-template-columns: minmax(0, 1fr); min-width: 0; }
  .filter-panel, .uni-results, .uni-list, .empty-docs { width: 100%; min-width: 0; }
  .uni-results-header { min-width: 0; align-items: stretch; flex-direction: column; gap: 8px; }
  .uni-result-actions { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .uni-result-actions select, .uni-result-actions button { width: 100%; min-width: 0; }
  .guide-list li, .guide-steps li { min-width: 0; overflow-wrap: anywhere; }
  .sop-studio-layout, .sop-input-panel, .sop-feedback-panel { min-width: 0; }
  .sop-input-controls .form-row { grid-template-columns: minmax(0, 1fr); }
  .sop-editor-header, .sop-editor-meta, .sop-polish-group { flex-wrap: wrap; }
  .sch-grid { grid-template-columns: minmax(0, 1fr); }
  .sch-card { min-width: 0; }
}

/* ===== UniApply blue and ivory system, shared by every app screen ===== */
body { background: var(--pale); color: var(--ink); }
.app-shell, .main-content { background: var(--pale); }
.sidebar {
  background: #fff;
  color: var(--ink);
  border-right: 1px solid var(--line);
  box-shadow: 2px 0 18px rgba(30, 66, 120, .025);
}
.sidebar .brand { color: #14203a; }
.sidebar .brand-accent { color: var(--green); }
.sidebar .brand-mark { background: var(--green); }
.sidebar .brand-mark span { background: #fff; }
.workspace-label, .nav-group-label { color: #8190a6; }
.nav-item { color: #586985; }
.nav-item:hover { background: #f1f6fd; color: #1649b8; }
.nav-item.active {
  background: #e7f1ff;
  color: #1649b8;
  box-shadow: inset 3px 0 0 var(--brand-blue, #2563eb);
}
.nav-item.active::before { display: none; }
.nav-count { background: #e9f0f9; color: #526782; }
.nav-item.active .nav-count { background: #fff; color: #1649b8; }
.sidebar .badge-new { background: #dff7ef; color: #087d68; }
.privacy-note { background: #f5f9fe; border: 1px solid #e3edf8; }
.sidebar .privacy-note strong { color: #2f496c; }
.sidebar .privacy-note p { color: #667b96; }
.lock-icon { color: #108f7c; }
.avatar, .top-avatar { background: #dcecff; color: #1649b8; }
.profile-copy strong { color: var(--ink); }
.profile-copy small, .more-icon { color: var(--muted); }
.topbar { background: rgba(255, 255, 255, .96); border-bottom-color: var(--line); }
.breadcrumbs, .save-state { color: var(--muted); }
.breadcrumbs strong { color: var(--ink); }
.icon-button, .signout-btn { background: #fff; border-color: var(--line); color: #536783; }
.icon-button:hover { background: #f2f7fd; border-color: #b9cce3; }
.page-wrap { background: transparent; }
h1 { color: #14203a; font-family: var(--font-serif, Georgia), "Times New Roman", serif; font-size: clamp(29px, 2.5vw, 36px); letter-spacing: -.035em; }
h2, h3, h4 { color: #172746; }
.eyebrow, .title-dot { color: var(--green); }
.intro { color: #5c6d87; }
.guide-card, .main-panel, .side-panel, .panel, .progress-card, .deadline-card,
.assistant-card, .assistant-panel, .filter-panel, .uni-card, .app-card,
.sch-card, .feature-card, .sop-input-panel, .sop-feedback-panel,
.ai-provider-card, .ai-status-panel, .account-card, .pricing-card,
.country-plan-card {
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.guide-card, .main-panel, .side-panel, .panel, .progress-card, .deadline-card,
.assistant-card, .assistant-panel, .filter-panel, .uni-card, .app-card,
.sch-card, .feature-card, .sop-input-panel, .sop-feedback-panel,
.ai-provider-card, .ai-status-panel, .account-card, .pricing-card,
.country-plan-card, .country-authority-link, .document-vault,
.document-list .doc-row, .guide-university { border-radius: var(--radius); }
.stat-card { background: #fff; border-color: var(--line); box-shadow: 0 2px 8px rgba(35, 69, 118, .035); }
.stat-card.ai-stat { background: #eff9f7; border-color: #d2eee7; }
.progress-track { background: #e4ebf4; }
.progress-track span, .str-score-circle { background-color: var(--green); }
.step.active span { background: var(--green); border-color: var(--green); color: #fff; }
.step.done span { background: #e2f5ef; border-color: #9ed8c8; color: #087d68; }
.primary-button { background: var(--brand-blue, #2563eb); color: #fff; }
.primary-button:hover:not(:disabled) { background: #1d4ed8; box-shadow: 0 8px 18px -10px rgba(21, 88, 223, .55); }
.secondary-button { color: #174bb8; border-color: #bfd2ec; background: #fff; }
.secondary-button:hover { background: #eef5ff; border-color: #93b2de; }
.text-button, .guide-text-link, .country-authority-link > span:last-child { color: var(--brand-blue, #174bb8); }
.upload-zone { background: #f8fbff; border-color: #c9d8eb; }
.upload-zone:hover, .upload-zone.drag-over { background: #eff6ff; border-color: var(--green); }
.doc-row, .empty-docs, .document-vault { background: #f8fbff; }
.doc-icon { background: #e5f0ff; color: #174bb8; }
.doc-status, .optional-tag { background: #e5f6f0; color: #087d68; }
.feature-pill { color: #2c486c; border-color: var(--line); background: #fff; }
.feature-pill:hover { border-color: #a9c3e5; background: #f1f6fd; }
.uni-mode-tabs { background: #eaf1f9; }
.uni-mode-tab.active { color: #174bb8; }
.str-column { background: #f8fbff; border-color: var(--line); }
.str-uni-reason { background: #f1f7fd; color: #425a79; }
.ai-provider-card.active-card { background: #f2f8ff; border-color: #91b6e7; }
.active-provider-display { background: #e6f6f1; color: #087d68; }
.country-plan-card { background: linear-gradient(135deg, #fff, #f1f7ff); }
.country-plan-kicker, .country-check-summary { color: #174bb8; }
.country-plan-count { background: #e7f1ff; color: #174bb8; }
.country-plan-selectors input:focus, .country-plan-selectors select:focus,
.ai-provider-card input:focus { border-color: var(--green); }
:focus-visible { outline-color: var(--green); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--green); box-shadow: var(--ring); }
.primary-button:not(:disabled):hover { box-shadow: 0 8px 18px -10px rgba(21, 88, 223, .55); }
::selection { background: #c8dcff; color: #14203a; }

@media (max-width: 800px) {
  .nav-item[title]::after { border-color: #d5e1ef; background: #14203a; color: #fff; }
}


/* ===== UniApply Dashboard Redesign (Hero + 2x2 Overview Cards) ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dash-redesign {
  padding-top: 22px;
}

/* Hero Banner */
.dash-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 148px;
  padding: 28px 34px;
  margin-bottom: 22px;
  border-radius: 20px;
  background: linear-gradient(120deg, #e5f1ff 0%, #eaf4ff 48%, #d6ebff 100%);
  border: 1px solid #d5e6fb;
  overflow: hidden;
}

.dash-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.dash-hero-copy h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0;
}

.dash-hero-underline {
  display: block;
  width: 196px;
  height: 12px;
  margin-top: 6px;
}

.dash-hero-art {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(440px, 50%);
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.dash-hero-art svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 2x2 Overview Grid */
.dash-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.dash-card {
  background: #ffffff;
  border: 1px solid #e2eaf4;
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03), 0 12px 28px -18px rgba(30, 64, 175, 0.14);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.dash-card-head h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0;
}

.dash-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.dash-card-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.dash-add-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dash-add-btn:hover {
  background: #dbeafe;
}

/* Card 1: Application progress */
.dash-progress-body {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  padding: 6px 4px;
}

.dash-ring-wrap {
  position: relative;
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
}

.dash-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.dash-ring-track {
  fill: none;
  stroke: #d7e7f7;
  stroke-width: 11;
}

.dash-ring-fill {
  fill: none;
  stroke: #10b981;
  stroke-width: 11;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.dash-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  align-content: center;
  gap: 3px;
  padding-top: 40px;
  font-variant-numeric: tabular-nums;
}

.dash-ring-label strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.dash-ring-label span {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
}

.dash-progress-meta {
  flex: 1;
  min-width: 0;
}

.dash-progress-meta h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 14px;
  font-variant-numeric: tabular-nums;
}

.dash-bar-track {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: #e2eaf4;
  overflow: hidden;
}

.dash-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea58a 0%, #10b981 100%);
  transition: width 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Card 2: Next steps */
.dash-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.dash-step-item {
  border-bottom: 1px solid #eef2f7;
}

.dash-step-item:last-child {
  border-bottom: none;
}

.dash-step-label {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 4px;
  cursor: pointer;
  user-select: none;
}

.dash-step-checkbox {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.dash-step-box {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 5px;
  border: 1.75px solid #94a3b8;
  background: #ffffff;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.dash-step-box svg {
  width: 13px;
  height: 13px;
}

.dash-step-item.is-done .dash-step-box {
  background: #10b981;
  border-color: #10b981;
}

.dash-step-checkbox:focus-visible + .dash-step-box {
  box-shadow: var(--ring);
  border-color: #2563eb;
}

.dash-step-text {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.4;
}

.dash-step-item.is-done .dash-step-text {
  color: #0f172a;
}

.dash-step-label:hover .dash-step-text {
  color: #1d4ed8;
}

/* Card 3: University shortlist */
.dash-shortlist-list {
  display: flex;
  flex-direction: column;
}

.dash-shortlist-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 6px;
  border: none;
  border-bottom: 1px solid #eef2f7;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
}

.dash-shortlist-row:last-child {
  border-bottom: none;
}

.dash-shortlist-row:hover {
  background: #f5f9ff;
}

.dash-uni-crest {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-uni-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-uni-info strong {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-uni-info small {
  font-size: 12.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-country-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #edf4ff;
  color: #1e293b;
  font-size: 12.5px;
  font-weight: 600;
}

.dash-flag {
  font-size: 14px;
  line-height: 1;
}

.dash-row-chevron {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  padding-right: 2px;
}

/* Card 4: Upcoming deadlines */
.dash-deadlines-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-deadline-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid #f7e4c6;
  background: #fef7ec;
  text-align: left;
  cursor: pointer;
}

.dash-deadline-item:hover {
  border-color: #f0cf99;
  background: #fdf2df;
}

.dash-deadline-cal {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: #b4691e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-deadline-cal svg {
  width: 24px;
  height: 24px;
}

.dash-deadline-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-deadline-copy strong {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.dash-deadline-copy small {
  font-size: 12.5px;
  color: #64748b;
}

.dash-deadline-pill {
  flex: 0 0 auto;
  padding: 5px 11px;
  border-radius: 8px;
  background: #fde8c8;
  color: #92400e;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* Empty states inside shortlist / deadlines cards */
.dash-empty-state {
  padding: 18px 16px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #f8fbff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.dash-empty-state p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.dash-empty-btn {
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.dash-empty-btn:hover {
  background: #dbeafe;
}

.dash-compact-stats .stat-card::before {
  background: #bfdbfe;
}

.dash-compact-stats .stat-card.ai-stat::before {
  background: #10b981;
}

@media (max-width: 960px) {
  .dash-overview-grid {
    grid-template-columns: 1fr;
  }
  .dash-hero {
    padding: 24px 22px;
    min-height: 126px;
  }
  .dash-hero-art {
    width: 240px;
    opacity: 0.45;
  }
}

@media (max-width: 560px) {
  .dash-progress-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .dash-deadline-item {
    flex-wrap: wrap;
    gap: 10px;
  }
  .dash-shortlist-row {
    gap: 10px;
  }
  .dash-hero-art {
    display: none;
  }
}
