/* DASH-V2.2A — Home Dashboard V2 Foundation.
 * Every selector is scoped to the dashboard container.
 * Colors retain THYNK teal (#2FCDCF) and navy (#002D4D).
 */
.dashboard-content.thynk-dashboard-v2 {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    color: #002D4D;
    font-family: Arial, Helvetica, sans-serif;
}
.thynk-dashboard-v2 .thynk-dash-board {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid #e0e9ef;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,45,77,.045);
}
.thynk-dashboard-v2 .thynk-dash-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin-bottom: 24px;
    padding: 4px;
    width: fit-content;
    max-width: 100%;
    border: 1px solid #d3dee7;
    border-radius: 10px;
    background: #fff;
}
.thynk-dashboard-v2 .thynk-dash-tabs__link {
    padding: 10px 19px;
    border-radius: 7px;
    color: #476277;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .2s, color .2s;
}
.thynk-dashboard-v2 .thynk-dash-tabs__link:hover,
.thynk-dashboard-v2 .thynk-dash-tabs__link:focus-visible {
    color: #002d4d;
    background: #edf8f9;
}
.thynk-dashboard-v2 .thynk-dash-tabs__link.is-current {
    background: #002d4d;
    color: #fff;
}
.thynk-dashboard-v2 .thynk-dash-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 23px 25px;
    border: 1px solid #cde8eb;
    border-radius: 13px;
    background: linear-gradient(115deg, #e8f9fa, #f4f9fd);
}
.thynk-dashboard-v2 .thynk-dash-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #007f89;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
}
.thynk-dashboard-v2 .thynk-dash-welcome h1 {
    margin: 0 0 6px;
    color: #002d4d;
    font-size: clamp(20px, 2vw, 25px);
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.thynk-dashboard-v2 .thynk-dash-welcome p {
    color: #48677c;
    font-size: 13px;
    line-height: 1.55;
}
.thynk-dashboard-v2 .thynk-dash-status {
    min-width: 145px;
    max-width: 210px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 17px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #cfe1e9;
}
.thynk-dashboard-v2 .thynk-dash-status__caption {
    color: #64748b;
    font-size: 11px;
}
.thynk-dashboard-v2 .thynk-dash-status strong {
    color: #002d4d;
    font-size: 16px;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.thynk-dashboard-v2 .thynk-dash-section { margin-top: 29px; }
.thynk-dashboard-v2 .thynk-dash-section__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 17px;
}
.thynk-dashboard-v2 .thynk-dash-section__head h2,
.thynk-dashboard-v2 .thynk-dash-study-support h2 {
    margin: 0 0 4px;
    color: #002d4d;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
}
.thynk-dashboard-v2 .thynk-dash-section__head p,
.thynk-dashboard-v2 .thynk-dash-study-support p {
    color: #60758a;
    font-size: 13px;
    line-height: 1.6;
}
.thynk-dashboard-v2 .thynk-dash-skill-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.thynk-dashboard-v2 .thynk-dash-skill-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    padding: 19px;
    border: 1px solid #d3dee7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,45,77,.035);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.thynk-dashboard-v2 .thynk-dash-skill-card:hover,
.thynk-dashboard-v2 .thynk-dash-skill-card:focus-within {
    transform: translateY(-2px);
    border-color: #2fcdcf;
    box-shadow: 0 8px 22px rgba(0,45,77,.11);
}
.thynk-dashboard-v2 .thynk-dash-skill-card__top {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}
.thynk-dashboard-v2 .thynk-dash-skill-card__icon {
    display: flex;
    flex: 0 0 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: #007c89;
    background: #def7f8;
    border-radius: 10px;
}
.thynk-dashboard-v2 .thynk-dash-skill-card__icon svg { width: 21px; height: 21px; }
.thynk-dashboard-v2 .thynk-dash-skill-card__copy { min-width: 0; }
.thynk-dashboard-v2 .thynk-dash-skill-card__copy h3 {
    margin: 2px 0 6px;
    color: #002d4d;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}
.thynk-dashboard-v2 .thynk-dash-skill-card__copy p {
    color: #61758a;
    font-size: 12px;
    line-height: 1.55;
}
.thynk-dashboard-v2 .thynk-dash-skill-card__action {
    display: flex;
    min-height: 37px;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    background: #002d4d;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s;
}
.thynk-dashboard-v2 .thynk-dash-skill-card__action:hover,
.thynk-dashboard-v2 .thynk-dash-skill-card__action:focus-visible {
    background: #007b86;
    color: #fff;
}
.thynk-dashboard-v2 .thynk-performance-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 0;
}
.thynk-dashboard-v2 .thynk-performance-card {
    min-width: 0;
    padding: 17px 14px;
    border: 1px solid #d8e5ec;
    border-radius: 11px;
    box-shadow: none;
}
.thynk-dashboard-v2 .thynk-performance-card__label { font-size: 12px; margin-bottom: 9px; }
.thynk-dashboard-v2 .thynk-performance-card__value { font-size: 23px; line-height: 1.25; }
.thynk-dashboard-v2 .thynk-performance-card__meta { font-size: 11px; font-weight: 500; line-height: 1.5; color: #61758a; }
.thynk-dashboard-v2 .thynk-dash-text-link {
    color: #007b86;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.thynk-dashboard-v2 .thynk-dash-text-link:hover,
.thynk-dashboard-v2 .thynk-dash-text-link:focus-visible { text-decoration: underline; }
.thynk-dashboard-v2 .thynk-dash-activity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
    margin-top: 28px;
}
.thynk-dashboard-v2 .thynk-dash-activity-grid > .continue-learning,
.thynk-dashboard-v2 .thynk-dash-activity-grid > .recent-activity {
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 1px solid #d8e5ec;
    border-radius: 12px;
    box-shadow: none;
}
.thynk-dashboard-v2 .thynk-continue-learning,
.thynk-dashboard-v2 .thynk-recent-activity {
    min-width: 0;
    height: 100%;
    padding: 20px;
    box-shadow: none;
}
.thynk-dashboard-v2 .thynk-continue-learning__header,
.thynk-dashboard-v2 .thynk-recent-activity__header { margin-bottom: 14px; }
.thynk-dashboard-v2 .thynk-continue-learning__header h2,
.thynk-dashboard-v2 .thynk-recent-activity__header h2 { font-size: 17px; }
.thynk-dashboard-v2 .thynk-continue-learning__info h3 { font-size: 15px; }
.thynk-dashboard-v2 .thynk-continue-learning__footer { flex-wrap: wrap; }
.thynk-dashboard-v2 .thynk-activity-item { padding: 13px 0; }
.thynk-dashboard-v2 .thynk-activity-item__score { font-size: 14px; }
.thynk-dashboard-v2 .thynk-recent-activity__list {
    max-height: 300px;
    overflow-y: auto;
}
.thynk-dashboard-v2 .thynk-dash-activity-link {
    display: block;
    margin: 0 20px 18px;
}
.thynk-dashboard-v2 .thynk-dash-study-support {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 25px;
    padding: 20px 22px;
    border: 1px solid #cfe4e8;
    border-radius: 12px;
    background: #f1f9fa;
}
.thynk-dashboard-v2 .thynk-dash-study-support__links { display: flex; flex-wrap: wrap; gap: 8px; }
.thynk-dashboard-v2 .thynk-dash-study-support__links a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 0 16px;
    border: 1px solid #008d96;
    border-radius: 7px;
    background: #fff;
    color: #002d4d;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.thynk-dashboard-v2 .thynk-dash-study-support__links a:hover,
.thynk-dashboard-v2 .thynk-dash-study-support__links a:focus-visible {
    background: #e0f8f9;
    border-color: #002d4d;
}
.thynk-dashboard-v2 a:focus-visible { outline: 2px solid #007f89; outline-offset: 3px; }
@media (max-width: 1100px) {
    .thynk-dashboard-v2 .thynk-performance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .thynk-dashboard-v2 .thynk-dash-activity-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
    .dashboard-content.thynk-dashboard-v2 .thynk-dash-board { padding: 18px; }
    .thynk-dashboard-v2 .thynk-dash-welcome { align-items: stretch; flex-direction: column; padding: 20px; }
    .thynk-dashboard-v2 .thynk-dash-status { max-width: 100%; width: 100%; }
    .thynk-dashboard-v2 .thynk-dash-skill-grid { grid-template-columns: minmax(0, 1fr); }
    .thynk-dashboard-v2 .thynk-dash-study-support { align-items: stretch; flex-direction: column; }
}
@media (max-width: 450px) {
    .dashboard-content.thynk-dashboard-v2 .thynk-dash-board { padding: 14px; border-radius: 12px; }
    .thynk-dashboard-v2 .thynk-performance-grid { grid-template-columns: minmax(0, 1fr); }
    .thynk-dashboard-v2 .thynk-dash-section__head { align-items: start; flex-direction: column; }
    .thynk-dashboard-v2 .thynk-dash-tabs { width: 100%; }
    .thynk-dashboard-v2 .thynk-dash-tabs__link { padding: 10px 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .thynk-dashboard-v2 .thynk-dash-skill-card { transition: none; }
    .thynk-dashboard-v2 .thynk-dash-skill-card:hover { transform: none; }
}


/* ========================================================================
   DASH-V2.2B — Color Accent System (presentation-only)
   Design rule: THYNK teal/navy stay primary; accents are restricted to
   decorative card surfaces, icons, and section detail inside Dashboard V2.
   No navigation, access logic, dimensions, text, or data contract changes.
   ======================================================================== */
.thynk-dashboard-v2 {
    --dash-accent-writing: #6d28d9;
    --dash-accent-reading: #2563eb;
    --dash-accent-listening: #b45309;
    --dash-accent-speaking: #047857;
}

/* Subtle multi-color welcome; status card stays neutral for expired users. */
.thynk-dashboard-v2 .thynk-dash-welcome {
    background: linear-gradient(110deg, #e4f9fa 0%, #eef7ff 58%, #f5efff 100%);
    border-color: #c9e6ee;
    box-shadow: inset 4px 0 0 #2fcdcf;
}
.thynk-dashboard-v2 .thynk-dash-status {
    background: rgba(255,255,255,.94);
    border-color: #c9dfee;
    box-shadow: 0 2px 8px rgba(0,45,77,.04);
}

/* Colored section markers: no change to heading size or spacing scale. */
.thynk-dashboard-v2 .thynk-dash-section__head h2::before {
    content: '';
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 9px;
    border-radius: 50%;
    background: #6d28d9;
    vertical-align: 2px;
}
.thynk-dashboard-v2 #thynk-dash-progress-title::before { background: #2563eb; }

/* Each skill uses a distinct accessible accent, never a saturated card fill. */
.thynk-dashboard-v2 .thynk-dash-skill-card--writing {
    --dash-skill-accent: var(--dash-accent-writing);
    --dash-skill-soft: #f4efff;
    --dash-skill-border: #e7dcff;
}
.thynk-dashboard-v2 .thynk-dash-skill-card--reading {
    --dash-skill-accent: var(--dash-accent-reading);
    --dash-skill-soft: #eff5ff;
    --dash-skill-border: #dbe8ff;
}
.thynk-dashboard-v2 .thynk-dash-skill-card--listening {
    --dash-skill-accent: var(--dash-accent-listening);
    --dash-skill-soft: #fff5e7;
    --dash-skill-border: #fae6c4;
}
.thynk-dashboard-v2 .thynk-dash-skill-card--speaking {
    --dash-skill-accent: var(--dash-accent-speaking);
    --dash-skill-soft: #eafaf3;
    --dash-skill-border: #cfefdf;
}
.thynk-dashboard-v2 .thynk-dash-skill-card {
    border-color: var(--dash-skill-border, #d3dee7);
    background: linear-gradient(150deg, var(--dash-skill-soft, #fff) 0%, #fff 45%);
    box-shadow: inset 0 3px 0 var(--dash-skill-accent, #2fcdcf),
                0 2px 8px rgba(0,45,77,.035);
}
.thynk-dashboard-v2 .thynk-dash-skill-card__icon {
    color: var(--dash-skill-accent, #007c89);
    background: var(--dash-skill-soft, #def7f8);
    box-shadow: inset 0 0 0 1px var(--dash-skill-border, #d3dee7);
}
.thynk-dashboard-v2 .thynk-dash-skill-card:hover,
.thynk-dashboard-v2 .thynk-dash-skill-card:focus-within {
    border-color: var(--dash-skill-accent, #2fcdcf);
    box-shadow: inset 0 3px 0 var(--dash-skill-accent, #2fcdcf),
                0 9px 22px rgba(0,45,77,.1);
}
/* All primary actions remain navy (THYNK visual identity). */
.thynk-dashboard-v2 .thynk-dash-skill-card__action {
    background: #002d4d;
    color: #fff;
}

/* Progress overview: soft accents, not semantic status indicators. */
.thynk-dashboard-v2 .thynk-performance-grid > .thynk-performance-card:nth-child(1) {
    background: #eff6ff;
    border-color: #dae8ff;
    box-shadow: inset 0 3px 0 #3b82f6;
}
.thynk-dashboard-v2 .thynk-performance-grid > .thynk-performance-card:nth-child(2) {
    background: #f6f1ff;
    border-color: #e8dcff;
    box-shadow: inset 0 3px 0 #8b5cf6;
}
.thynk-dashboard-v2 .thynk-performance-grid > .thynk-performance-card:nth-child(3) {
    background: #edfafa;
    border-color: #cdebed;
    box-shadow: inset 0 3px 0 #2fcdcf;
}
.thynk-dashboard-v2 .thynk-performance-grid > .thynk-performance-card:nth-child(4) {
    background: #fff8eb;
    border-color: #f4e5c6;
    box-shadow: inset 0 3px 0 #f59e0b;
}
/* Readability maintained across different background tints. */
.thynk-dashboard-v2 .thynk-performance-card__label { color: #465e74; }
.thynk-dashboard-v2 .thynk-performance-card__value { color: #002d4d; }

/* Decorative distinction for activity and study help blocks. */
.thynk-dashboard-v2 .thynk-dash-activity-grid > .continue-learning {
    background: linear-gradient(180deg, #f2f9ff 0%, #fff 105px);
    border-color: #d9e8f6;
    box-shadow: inset 0 3px 0 #3b82f6;
}
.thynk-dashboard-v2 .thynk-dash-activity-grid > .recent-activity {
    background: linear-gradient(180deg, #f1fbf8 0%, #fff 105px);
    border-color: #d5ece3;
    box-shadow: inset 0 3px 0 #10b981;
}
.thynk-dashboard-v2 .thynk-dash-study-support {
    background: linear-gradient(110deg, #f3edff 0%, #ebf9fa 100%);
    border-color: #e0d9f3;
    box-shadow: inset 4px 0 0 #8b5cf6;
}
.thynk-dashboard-v2 .thynk-dash-study-support__links a:focus-visible {
    outline: 2px solid #002d4d;
    outline-offset: 3px;
}

/* ========================================================================
   DASH-V2.2C — Mobile Responsive Layout Recovery
   Only the dashboard route is affected. :has() is supported in current
   Chrome/Edge/Firefox/Safari. Keep existing sidebar navigation accessible:
   on small screens it becomes a swipeable horizontal nav above the dashboard.
   No desktop palette, server-side logic or global stylesheet changes.
   ======================================================================== */
@media (max-width: 900px) {
    /* Recover viewport width previously consumed by the 260px desktop sidebar. */
    .think-app:has(.thynk-dashboard-v2) {
        flex-direction: column;
        width: 100%;
        min-width: 0;
    }
    .think-app:has(.thynk-dashboard-v2) > .think-sidebar {
        position: relative;
        width: 100%;
        min-width: 0;
        height: auto;
        padding: 10px 16px 8px;
        flex: 0 0 auto;
        z-index: 2;
    }
    .think-app:has(.thynk-dashboard-v2) .sidebar-logo {
        margin-bottom: 6px;
    }
    /* Native scrolling navigation preserves every existing menu destination. */
    .think-app:has(.thynk-dashboard-v2) .sidebar-nav {
        display: flex;
        align-items: center;
        gap: 2px;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .think-app:has(.thynk-dashboard-v2) .sidebar-nav ul {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        flex-wrap: nowrap;
        gap: 4px;
        margin: 0;
        padding: 0;
        white-space: nowrap;
    }
    .think-app:has(.thynk-dashboard-v2) .sidebar-nav li {
        flex: 0 0 auto;
        margin: 0;
    }
    .think-app:has(.thynk-dashboard-v2) .sidebar-nav a {
        display: inline-flex;
        min-height: 40px;
        align-items: center;
        padding: 8px 11px;
        font-size: 13px;
        line-height: 1.25;
    }
    .think-app:has(.thynk-dashboard-v2) .sidebar-nav hr {
        display: none;
    }
    .think-app:has(.thynk-dashboard-v2) > .think-main {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }
    .think-app:has(.thynk-dashboard-v2) .think-content {
        width: 100%;
        min-width: 0;
        padding: 20px 16px 28px;
    }
    .think-app:has(.thynk-dashboard-v2) .dashboard-content.thynk-dashboard-v2,
    .think-app:has(.thynk-dashboard-v2) .thynk-dash-board {
        max-width: 100%;
        min-width: 0;
    }
    .think-app:has(.thynk-dashboard-v2) .thynk-dash-board {
        padding: 20px;
    }
    .think-app:has(.thynk-dashboard-v2) .thynk-dash-skill-card__copy,
    .think-app:has(.thynk-dashboard-v2) .thynk-dash-welcome__copy {
        min-width: 0;
    }
}
@media (max-width: 600px) {
    .think-app:has(.thynk-dashboard-v2) > .think-sidebar {
        padding: 8px 12px;
    }
    .think-app:has(.thynk-dashboard-v2) .think-topbar {
        height: 60px;
        min-height: 60px;
        padding: 0 14px;
        gap: 8px;
    }
    .think-app:has(.thynk-dashboard-v2) .page-title {
        font-size: 19px;
        line-height: 1.25;
    }
    .think-app:has(.thynk-dashboard-v2) .topbar-right { gap: 8px; }
    .think-app:has(.thynk-dashboard-v2) .notification-btn,
    .think-app:has(.thynk-dashboard-v2) .user-avatar {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
    }
    .think-app:has(.thynk-dashboard-v2) .think-content {
        padding: 14px 12px 22px;
    }
    .think-app:has(.thynk-dashboard-v2) .thynk-dash-board {
        padding: 15px;
        border-radius: 14px;
    }
    .thynk-dashboard-v2 .thynk-dash-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        margin-bottom: 18px;
    }
    .thynk-dashboard-v2 .thynk-dash-tabs__link {
        text-align: center;
        padding: 10px 4px;
        font-size: 12px;
    }
    .thynk-dashboard-v2 .thynk-dash-welcome {
        padding: 17px;
        gap: 14px;
    }
    .thynk-dashboard-v2 .thynk-dash-welcome h1 {
        font-size: clamp(20px, 5vw, 23px);
        line-height: 1.35;
    }
    .thynk-dashboard-v2 .thynk-dash-eyebrow {
        font-size: 10px;
        letter-spacing: .04em;
    }
    .thynk-dashboard-v2 .thynk-dash-status {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
    .thynk-dashboard-v2 .thynk-dash-section { margin-top: 24px; }
    .thynk-dashboard-v2 .thynk-dash-section__head h2 { font-size: 17px; }
    .thynk-dashboard-v2 .thynk-dash-skill-grid,
    .thynk-dashboard-v2 .thynk-performance-grid,
    .thynk-dashboard-v2 .thynk-dash-activity-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .thynk-dashboard-v2 .thynk-dash-skill-card {
        gap: 16px;
        padding: 16px;
    }
    .thynk-dashboard-v2 .thynk-dash-skill-card__top { gap: 12px; }
    .thynk-dashboard-v2 .thynk-dash-skill-card__action {
        min-height: 44px;
        padding: 10px;
        font-size: 13px;
        line-height: 1.3;
        text-align: center;
    }
    .thynk-dashboard-v2 .thynk-continue-learning,
    .thynk-dashboard-v2 .thynk-recent-activity { padding: 16px; }
    .thynk-dashboard-v2 .thynk-dash-study-support { padding: 17px; }
    .think-app:has(.thynk-dashboard-v2) .think-footer {
        height: auto;
        min-height: 56px;
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
}
@media (max-width: 360px) {
    .think-app:has(.thynk-dashboard-v2) .think-content { padding: 10px 8px 20px; }
    .think-app:has(.thynk-dashboard-v2) .thynk-dash-board { padding: 12px; }
    .thynk-dashboard-v2 .thynk-dash-welcome { padding: 14px; }
    .thynk-dashboard-v2 .thynk-dash-skill-card__icon {
        flex-basis: 38px;
        height: 38px;
    }
}
