:root {
    --dashboard-bg: #f7f8fa;
    --dashboard-surface: #ffffff;
    --dashboard-border: #e7e9ed;
    --dashboard-text: #17191c;
    --dashboard-muted: #737982;
    --dashboard-purple: #0a55f0;
    --dashboard-purple-soft: #eaf3ff;
}


body {
    background: var(--dashboard-bg);
}


/* APP */

.app-shell {
    min-height: 100vh;
    display: flex;
}


/* SIDEBAR */

.sidebar {
    width: 245px;
    flex-shrink: 0;

    display: flex;
    flex-direction: column;

    padding: 24px 16px;

    background: #ffffff;
    border-right: 1px solid var(--dashboard-border);
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 0 10px 38px;

    font-size: 18px;
    font-weight: 800;
}

.dashboard-brand span {
    width: 31px;
    height: 31px;

    display: grid;
    place-items: center;

    color: white;
    background: #17191c;
    border-radius: 9px;
}


.sidebar-group {
    margin-bottom: 28px;
}

.sidebar-label {
    margin: 0 12px 8px;

    color: #a0a5ad;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
}


.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;

    margin: 3px 0;
    padding: 10px 12px;

    color: #666d76;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 600;

    transition: .2s;
}

.sidebar-link:hover {
    color: var(--dashboard-text);
    background: #f5f6f8;
}

.sidebar-link.active {
    color: var(--dashboard-purple);
    background: var(--dashboard-purple-soft);
}

.sidebar-link span {
    width: 18px;
    text-align: center;
}


.sidebar-bottom {
    margin-top: auto;
}


.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 18px;
    padding: 12px;

    border-top: 1px solid var(--dashboard-border);
}

.user-avatar,
.top-avatar {
    display: grid;
    place-items: center;

    flex-shrink: 0;

    color: white;
    background: #25282d;

    font-weight: 700;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
}

.sidebar-user strong {
    display: block;
    font-size: 12px;
}

.sidebar-user small {
    display: block;
    margin-top: 2px;
    color: var(--dashboard-muted);
    font-size: 10px;
}

.user-menu {
    margin-left: auto;
    color: #a2a6ad;
}


/* MAIN */

.dashboard-main {
    min-width: 0;
    flex: 1;
}


.dashboard-topbar {
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    padding: 0 34px;

    background: white;
    border-bottom: 1px solid var(--dashboard-border);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-button {
    position: relative;

    width: 35px;
    height: 35px;

    border: 1px solid var(--dashboard-border);
    background: white;
    border-radius: 9px;

    cursor: pointer;
}

.notification i {
    position: absolute;

    top: 7px;
    right: 7px;

    width: 5px;
    height: 5px;

    background: var(--dashboard-purple);
    border-radius: 50%;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-left: 10px;

    font-size: 13px;
    font-weight: 600;
}

.top-avatar {
    width: 32px;
    height: 32px;

    border-radius: 50%;
}

.topbar-user b {
    color: #92969c;
}

.mobile-brand {
    display: none;
}


/* CONTENT */

.dashboard-content {
    width: min(1240px, calc(100% - 60px));
    margin: auto;

    padding: 42px 0 70px;
}


.welcome-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    margin-bottom: 30px;
}

.page-eyebrow {
    color: var(--dashboard-purple);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.welcome-row h1 {
    margin: 8px 0 5px;

    font-size: 28px;
    letter-spacing: -1px;
}

.welcome-row p {
    margin: 0;

    color: var(--dashboard-muted);
    font-size: 13px;
}


.upload-button {
    padding: 11px 16px;

    color: white;
    background: var(--dashboard-text);

    border: 0;
    border-radius: 9px;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}


/* METRICS */

.score-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;

    margin-bottom: 15px;
}


.metric-card,
.dashboard-card {
    background: white;
    border: 1px solid var(--dashboard-border);
    border-radius: 15px;
}


.metric-card {
    padding: 20px 22px;
}


.metric-top {
    display: flex;
    justify-content: space-between;

    color: var(--dashboard-muted);

    font-size: 12px;
    font-weight: 600;
}


.metric-icon {
    color: var(--dashboard-purple);
    font-size: 17px;
}


.metric-value {
    margin-top: 17px;

    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1.5px;
}

.metric-value span {
    color: #a1a5aa;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0;
}


.metric-footer {
    margin-top: 8px;

    font-size: 11px;
    font-weight: 700;
}

.metric-footer span {
    margin-left: 5px;

    color: var(--dashboard-muted);
    font-weight: 500;
}

.positive {
    color: #25845b;
}


/* CARDS */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;

    margin-bottom: 15px;
}


.dashboard-card {
    padding: 22px;
}


.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 25px;
}

.card-heading h2 {
    margin: 0 0 5px;

    font-size: 15px;
    letter-spacing: -.3px;
}

.card-heading p {
    margin: 0;

    color: var(--dashboard-muted);

    font-size: 11px;
}


.text-button {
    padding: 0;

    color: var(--dashboard-purple);
    background: none;

    border: 0;

    font-size: 11px;
    font-weight: 700;

    cursor: pointer;
    text-decoration: none;
}


/* HEALTH */

.health-item {
    margin: 19px 0;
}

.health-title {
    display: flex;
    justify-content: space-between;

    margin-bottom: 7px;

    font-size: 11px;
}

.health-title span {
    color: var(--dashboard-muted);
}

.health-title strong {
    font-size: 11px;
}

.progress {
    height: 6px;

    overflow: hidden;

    background: #eef0f3;
    border-radius: 20px;
}

.progress span {
    display: block;
    height: 100%;

    background: var(--dashboard-purple);
    border-radius: inherit;
}


/* AI */

.ai-symbol {
    color: var(--dashboard-purple);
    font-size: 20px;
}

.ai-insight {
    display: flex;
    gap: 12px;

    padding: 14px 0;

    border-top: 1px solid var(--dashboard-border);
}

.insight-icon {
    width: 31px;
    height: 31px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    color: var(--dashboard-purple);
    background: var(--dashboard-purple-soft);

    border-radius: 8px;
}

.ai-insight strong {
    font-size: 12px;
}

.ai-insight p {
    margin: 5px 0 8px;

    color: var(--dashboard-muted);

    font-size: 11px;
    line-height: 1.5;
}

.ai-insight button {
    padding: 0;

    color: var(--dashboard-purple);
    background: none;
    border: 0;

    font-size: 10px;
    font-weight: 700;
}


/* JOBS */

.jobs-card {
    margin-top: 0;
}

.job-table {
    border-top: 1px solid var(--dashboard-border);
}

.job-row {
    display: grid;
    grid-template-columns: 1.1fr 2fr .7fr .4fr;
    align-items: center;
    gap: 15px;

    min-height: 58px;

    border-bottom: 1px solid var(--dashboard-border);

    font-size: 12px;
}

.job-header {
    min-height: 40px;

    color: #a0a4aa;

    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.company-name {
    display: flex;
    align-items: center;
    gap: 9px;

    font-weight: 700;
}

.company-name b {
    width: 28px;
    height: 28px;

    display: grid;
    place-items: center;

    background: #f0f1f3;

    border-radius: 8px;
}

.match-high {
    color: #25845b;
}

.match-medium {
    color: #a27418;
}

.arrow-button {
    width: 29px;
    height: 29px;

    color: var(--dashboard-muted);
    background: white;

    border: 1px solid var(--dashboard-border);
    border-radius: 8px;

    cursor: pointer;
}


/* RESPONSIVE */

@media (max-width: 950px) {

    .sidebar {
        width: 205px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 720px) {

    .sidebar {
        display: none;
    }

    .mobile-brand {
        display: block;
        margin-right: auto;

        font-weight: 800;
    }

    .dashboard-topbar {
        padding: 0 18px;
    }

    .dashboard-content {
        width: calc(100% - 30px);
        padding-top: 28px;
    }

    .score-grid {
        grid-template-columns: 1fr;
    }

    .welcome-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .job-row {
        grid-template-columns: 1fr .8fr .5fr;
    }

    .job-row > span:nth-child(2) {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .job-header span:last-child,
    .job-row .arrow-button {
        display: none;
    }
}

/* ==========================================================
   GenCVMaker shared page polish
   Applies to resume, ATS and AI-tool pages that use
   .dashboard-page without the full dashboard app shell.
   ========================================================== */
.dashboard-page {
    width: 100%;
    min-height: calc(100vh - 8px);
    padding: clamp(24px, 4vw, 52px) 24px 64px;
    background:
        radial-gradient(ellipse at 80% 0%, rgba(10,85,240, .045), transparent 38%),
        var(--dashboard-bg);
}

.dashboard-page > .dashboard-main {
    width: min(1120px, 100%);
    margin-inline: auto;
}

.dashboard-page .dashboard-header {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto 28px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.dashboard-page .dashboard-header h1 {
    margin: 16px 0 10px;
    color: #111827;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -1.5px;
}

.dashboard-page .dashboard-header > div > p:not(.eyebrow) {
    margin: 0;
    max-width: 680px;
    color: #667085;
    font-size: 16px;
    line-height: 1.7;
}

.dashboard-page .dashboard-card {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto 24px;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid #e4e8f0;
    border-radius: 22px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 34px rgba(25, 35, 70, .045);
}

.dashboard-page .empty-state {
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(26px, 5vw, 56px) 24px;
    text-align: center;
}

.dashboard-page .empty-state::before {
    content: "↑";
    width: 66px;
    height: 66px;
    margin: 0 auto 22px;
    display: grid;
    place-items: center;
    border: 1px solid #e3ddff;
    border-radius: 20px;
    color: var(--dashboard-purple);
    background: linear-gradient(145deg, #f3f0ff, #ffffff);
    font-size: 30px;
    font-weight: 800;
}

.dashboard-page .empty-state h2 {
    margin: 0 0 10px;
    color: #172033;
    font-size: 25px;
    letter-spacing: -.5px;
}

.dashboard-page .empty-state p {
    margin: 0 auto 24px;
    max-width: 500px;
    color: #697386;
    font-size: 15px;
    line-height: 1.7;
}

.dashboard-page .primary-button,
.dashboard-page button.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border: 1px solid var(--dashboard-purple);
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #6857ff, #5039e8);
    box-shadow: 0 7px 16px rgba(10,85,240, .18);
    font: inherit;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.dashboard-page .primary-button:hover,
.dashboard-page button.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(10,85,240, .24);
}

.dashboard-page .form-group,
.dashboard-page .form-field {
    margin-bottom: 22px;
}

.dashboard-page label {
    display: block;
    margin-bottom: 8px;
    color: #283247;
    font-size: 14px;
    font-weight: 700;
}

.dashboard-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.dashboard-page select,
.dashboard-page textarea {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid #dce2ec;
    border-radius: 11px;
    outline: none;
    color: #182235;
    background: #fff;
    font: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.dashboard-page textarea {
    min-height: 130px;
    resize: vertical;
}

.dashboard-page input:focus,
.dashboard-page select:focus,
.dashboard-page textarea:focus {
    border-color: #8b7cff;
    box-shadow: 0 0 0 4px rgba(10,85,240, .10);
}

.dashboard-page input[type="file"] {
    width: 100%;
    padding: 18px;
    border: 1.5px dashed #c8c3ff;
    border-radius: 14px;
    color: #4b5565;
    background: #faf9ff;
}

.dashboard-page .form-group > p,
.dashboard-page .form-field > p {
    margin: 8px 0 0;
    color: #778198;
    font-size: 13px;
}

.dashboard-page .resume-list {
    display: grid;
    gap: 14px;
}

.dashboard-page .resume-list > div,
.dashboard-page .resume-list > article {
    min-width: 0;
    padding: 20px;
    border: 1px solid #e7eaf1;
    border-radius: 15px;
    background: #fff;
    overflow-wrap: anywhere;
}

.dashboard-page .resume-list strong {
    display: block;
    margin: 0 0 8px;
    color: #172033;
    font-size: 16px;
}

.dashboard-page .resume-list small,
.dashboard-page .resume-list p {
    color: #7a8497;
    font-size: 13px;
}

.dashboard-page .resume-list a:not(.primary-button) {
    display: inline-flex;
    margin-top: 10px;
    color: var(--dashboard-purple);
    font-size: 14px;
    font-weight: 700;
}

.dashboard-page .alert {
    width: min(1120px, 100%);
    margin: 0 auto 18px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.dashboard-page .alert.error {
    color: #9f2525;
    border-color: #fecaca;
    background: #fff7f7;
}

.dashboard-page .alert.success {
    color: #176b48;
    border-color: #bbf7d0;
    background: #f0fdf4;
}

/* Make standalone upload forms feel like a centered upload workspace. */
.dashboard-page:has(form[enctype="multipart/form-data"]) .dashboard-card {
    max-width: 900px;
    margin-inline: auto;
    padding: clamp(26px, 5vw, 56px);
}

.dashboard-page:has(form[enctype="multipart/form-data"]) .dashboard-card form {
    width: 100%;
    max-width: 650px;
    margin-inline: auto;
    text-align: center;
}

.dashboard-page:has(form[enctype="multipart/form-data"]) .form-group {
    margin-bottom: 26px;
}

.dashboard-page:has(form[enctype="multipart/form-data"]) .form-group label {
    font-size: 18px;
}

.dashboard-page:has(form[enctype="multipart/form-data"]) .form-group > p {
    margin-top: 12px;
}

@media (max-width: 720px) {
    .dashboard-page {
        padding: 26px 15px 42px;
    }
    .dashboard-page .dashboard-header {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }
    .dashboard-page .dashboard-header > .primary-button {
        align-self: flex-start;
    }
    .dashboard-page .dashboard-card {
        padding: 20px 16px;
        border-radius: 17px;
    }
    .dashboard-page .empty-state {
        padding: 24px 8px;
    }
}

/* GenCVMaker design system v2: consistent polished layouts across tools */
:root {
    --cp-bg: #f5f7fb;
    --cp-card: #ffffff;
    --cp-ink: #14213d;
    --cp-muted: #64748b;
    --cp-border: #e4e9f2;
    --cp-purple: #0a55f0;
    --cp-purple-soft: #eaf3ff;
    --cp-radius: 20px;
}

.dashboard-page {
    width: 100%;
    min-height: calc(100vh - 8px);
    padding: clamp(28px, 4.5vw, 64px) clamp(16px, 3vw, 40px) 72px;
    background: radial-gradient(ellipse at 82% 0%, rgba(10,85,240,.07), transparent 34%), var(--cp-bg);
}

.dashboard-page > .dashboard-main {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.dashboard-page .dashboard-header {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto 28px;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-page .dashboard-header h1 {
    color: var(--cp-ink);
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -1.7px;
}

.dashboard-page .dashboard-header p:not(.eyebrow) {
    max-width: 700px;
    color: var(--cp-muted);
    line-height: 1.75;
}

.dashboard-page .eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--cp-purple);
    background: var(--cp-purple-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}

.dashboard-page .dashboard-card,
.dashboard-page .generator-card,
.dashboard-page .result-card,
.dashboard-page .analysis-card {
    width: 100%;
    min-width: 0;
    padding: clamp(22px, 3vw, 36px);
    background: rgba(255,255,255,.96);
    border: 1px solid var(--cp-border);
    border-radius: var(--cp-radius);
    box-shadow: 0 12px 34px rgba(30,41,80,.045);
}

.dashboard-page .empty-state {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 58px) 22px;
    text-align: center;
}

.dashboard-page .empty-state h2 {
    color: var(--cp-ink);
    font-size: clamp(22px, 3vw, 28px);
}

.dashboard-page .empty-state p {
    max-width: 520px;
    margin: 0 auto 24px;
    color: var(--cp-muted);
    line-height: 1.75;
}

.dashboard-page .primary-button,
.dashboard-page button.primary-button,
.dashboard-page button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 13px 21px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #6757ff, #5140e8);
    box-shadow: 0 8px 18px rgba(10,85,240,.18);
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease;
}

.dashboard-page .primary-button:hover,
.dashboard-page button.primary-button:hover,
.dashboard-page button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 11px 22px rgba(10,85,240,.24);
}

.dashboard-page form {
    width: 100%;
    min-width: 0;
}

.dashboard-page .form-group,
.dashboard-page .form-field {
    margin-bottom: 22px;
}

.dashboard-page label {
    display: block;
    margin-bottom: 9px;
    color: #263550;
    font-size: 14px;
    font-weight: 750;
}

.dashboard-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.dashboard-page select,
.dashboard-page textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 13px 15px;
    border: 1px solid #dce3ef;
    border-radius: 12px;
    color: #17233c;
    background: #fff;
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.dashboard-page textarea {
    min-height: 145px;
    resize: vertical;
    line-height: 1.65;
}

.dashboard-page input:focus,
.dashboard-page select:focus,
.dashboard-page textarea:focus {
    border-color: #9186ff;
    box-shadow: 0 0 0 4px rgba(10,85,240,.11);
}

.dashboard-page input[type="file"] {
    display: block;
    width: 100%;
    min-height: 150px;
    padding: 42px 24px;
    border: 2px dashed #c9c4ff;
    border-radius: 18px;
    color: #5b6680;
    background: linear-gradient(145deg, #faf9ff, #fff);
    text-align: center;
    cursor: pointer;
}

.dashboard-page .form-group > p,
.dashboard-page .form-field > p {
    margin-top: 10px;
    color: var(--cp-muted);
    font-size: 13px;
    line-height: 1.6;
}

/* Centered upload workspace matching the approved reference */
.dashboard-page:has(form[enctype="multipart/form-data"]) .dashboard-card {
    max-width: 920px;
    margin: 0 auto 28px;
    padding: clamp(20px, 3vw, 30px);
}

.dashboard-page:has(form[enctype="multipart/form-data"]) .dashboard-card form {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
}

.dashboard-page:has(form[enctype="multipart/form-data"]) .form-group {
    margin-bottom: 24px;
}

.dashboard-page:has(form[enctype="multipart/form-data"]) .form-group label {
    font-size: 16px;
}

.dashboard-page:has(form[enctype="multipart/form-data"]) .form-group > p {
    margin-top: 12px;
}

.dashboard-page .resume-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 16px;
}

.dashboard-page .resume-list > article,
.dashboard-page .resume-list > div,
.dashboard-page .resume-list > article {
    min-width: 0;
    padding: 22px;
    overflow-wrap: anywhere;
    border: 1px solid var(--cp-border);
    border-radius: 16px;
    background: #fff;
    transition: transform .16s ease, box-shadow .16s ease;
}

.dashboard-page .resume-list > article:hover,
.dashboard-page .resume-list > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(30,41,80,.07);
}

.dashboard-page .resume-list strong {
    display: block;
    margin-bottom: 10px;
    color: var(--cp-ink);
    font-size: 16px;
}

.dashboard-page .resume-list small,
.dashboard-page .resume-list p {
    color: var(--cp-muted);
    font-size: 13px;
    line-height: 1.6;
}

.dashboard-page .resume-list a:not(.primary-button) {
    display: inline-flex;
    margin-top: 12px;
    color: var(--cp-purple);
    font-size: 14px;
    font-weight: 750;
}

.dashboard-page .alert {
    max-width: 1120px;
    margin: 0 auto 18px;
    padding: 14px 17px;
    border: 1px solid var(--cp-border);
    border-radius: 13px;
    background: #fff;
}

.dashboard-page .alert.error {
    color: #a12626;
    border-color: #fecaca;
    background: #fff7f7;
}

.dashboard-page .alert.success {
    color: #176b48;
    border-color: #bbf7d0;
    background: #f0fdf4;
}

@media (max-width: 720px) {
    .dashboard-page {
        padding: 26px 15px 44px;
    }
    .dashboard-page .dashboard-header {
        align-items: stretch;
        flex-direction: column;
    }
    .dashboard-page .dashboard-header > .primary-button {
        align-self: flex-start;
    }
    .dashboard-page .dashboard-card,
    .dashboard-page .generator-card,
    .dashboard-page .result-card,
    .dashboard-page .analysis-card {
        padding: 20px 16px;
        border-radius: 17px;
    }
    .dashboard-page:has(form[enctype="multipart/form-data"]) .dashboard-card {
        padding: 16px;
    }
    .dashboard-page input[type="file"] {
        min-height: 120px;
        padding: 28px 14px;
    }
}

/* ---------------------------------------------------------
   Legacy page-layout compatibility
   Keeps older tool templates aligned with the GenCVMaker UI.
   --------------------------------------------------------- */
.dashboard-layout {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
    width: 100%;
    background: var(--dashboard-bg, #f7f8fa);
}

.dashboard-layout > .dashboard-sidebar {
    box-sizing: border-box;
    width: 256px;
    min-width: 256px;
    min-height: 100vh;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid var(--dashboard-border, #e7e9ed);
}

.dashboard-sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    min-height: 36px;
    margin: 0 10px 30px;
    color: var(--dashboard-text, #17191c);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.dashboard-sidebar .sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
}

.dashboard-sidebar .sidebar-nav a {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    color: #596273;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    transition: background-color .18s ease, color .18s ease;
}

.dashboard-sidebar .sidebar-nav a:hover {
    color: #0a55f0;
    background: #eef5ff;
}

.dashboard-sidebar .sidebar-nav a.active {
    color: #0a55f0;
    background: #eaf3ff;
}

.dashboard-sidebar .sidebar-section-title {
    margin: 22px 10px 7px;
    color: #9299a6;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dashboard-layout > .dashboard-main {
    box-sizing: border-box;
    min-width: 0;
    flex: 1 1 auto;
    padding: 48px clamp(24px, 4vw, 64px);
}

.dashboard-main .achievement-page,
.dashboard-main .salary-page,
.dashboard-main .builder-list,
.dashboard-main .builder-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.dashboard-main .generator-layout,
.dashboard-main .salary-layout {
    align-items: stretch;
    gap: 24px;
}

.dashboard-main .generator-card,
.dashboard-main .salary-card,
.dashboard-main .builder-card {
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .dashboard-layout > .dashboard-sidebar {
        width: 220px;
        min-width: 220px;
    }

    .dashboard-layout > .dashboard-main {
        padding: 32px 24px;
    }
}

@media (max-width: 700px) {
    .dashboard-layout {
        display: block;
    }

    .dashboard-layout > .dashboard-sidebar {
        width: 100%;
        min-width: 0;
        min-height: 0;
        padding: 14px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--dashboard-border, #e7e9ed);
    }

    .dashboard-sidebar .sidebar-brand {
        margin: 0 4px 12px;
    }

    .dashboard-sidebar .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    .dashboard-sidebar .sidebar-section-title {
        grid-column: 1 / -1;
        margin: 12px 4px 3px;
    }

    .dashboard-sidebar .sidebar-nav a {
        min-width: 0;
        font-size: 13px;
    }

    .dashboard-layout > .dashboard-main {
        padding: 28px 16px;
    }
}


/* Unified authenticated-page shell */
.app-shell.dashboard-page {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
    width: 100%;
    padding: 0;
    margin: 0;
    background: var(--dashboard-bg, #f7f8fa);
}
.app-shell.dashboard-page > .sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    min-height: 100vh;
    height: 100vh;
    overflow-y: auto;
}
.app-shell.dashboard-page > .dashboard-main {
    min-width: 0;
    flex: 1 1 auto;
    width: auto;
    padding: 42px clamp(22px, 3.5vw, 56px);
}
.app-shell.dashboard-page .dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.app-shell.dashboard-page .dashboard-card,
.app-shell.dashboard-page .generator-card,
.app-shell.dashboard-page .salary-card,
.app-shell.dashboard-page .builder-card {
    border-radius: 18px;
    border-color: var(--dashboard-border, #e7e9ed);
    box-shadow: 0 8px 28px rgba(24, 32, 56, .045);
}
.app-shell.dashboard-page .primary-button,
.app-shell.dashboard-page button.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 12px 18px;
    background: #17191c;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.app-shell.dashboard-page .primary-button:hover,
.app-shell.dashboard-page button.primary-button:hover {
    background: #0a55f0;
}
@media (max-width: 760px) {
    .app-shell.dashboard-page { display: block; }
    .app-shell.dashboard-page > .sidebar {
        position: relative; top: auto; width: 100%; min-width: 0; height: auto; min-height: 0;
        padding: 16px; border-right: 0; border-bottom: 1px solid var(--dashboard-border, #e7e9ed);
    }
    .app-shell.dashboard-page > .dashboard-main { padding: 28px 16px; }
    .app-shell.dashboard-page .generator-layout,
    .app-shell.dashboard-page .salary-layout,
    .app-shell.dashboard-page .form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
    .app-shell > .sidebar,
    .app-shell.dashboard-page > .sidebar {
        display: flex;
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        position: relative;
        top: auto;
        padding: 14px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--dashboard-border, #e7e9ed);
    }

    .app-shell > .sidebar .sidebar-group {
        margin-bottom: 12px;
    }

    .app-shell > .sidebar .sidebar-link {
        min-height: 38px;
    }
}


/* ------------------------------------------------------------------
   ATS analysis page helpers
------------------------------------------------------------------ */

.dashboard-page .dashboard-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-page .health-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 10px 0 6px;

    font-size: 14px;
}

.dashboard-page .health-row strong {
    color: var(--dashboard-text);
}

.dashboard-page .score-bar {
    height: 6px;
    margin-bottom: 8px;

    overflow: hidden;

    background: #eceef3;
    border-radius: 999px;
}

.dashboard-page .score-bar i {
    display: block;
    height: 100%;

    background: var(--dashboard-purple);
    border-radius: 999px;
}

.dashboard-page .chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 12px;
}

.dashboard-page .chip {
    display: inline-flex;
    align-items: center;

    padding: 6px 12px;

    color: var(--dashboard-purple);
    background: var(--dashboard-purple-soft);
    border-radius: 999px;

    font-size: 13px;
    font-weight: 600;
}

.dashboard-page .chip-missing {
    color: #9f2525;
    background: #fff1f1;
}

.dashboard-page .chip-muted {
    color: #737982;
    background: #f1f2f5;
}

.dashboard-page .muted-label {
    margin: 18px 0 0;

    color: var(--dashboard-muted);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@media (max-width: 800px) {

    .dashboard-page .dashboard-grid-3 {
        grid-template-columns: 1fr;
    }
}


/* ==================================================================
   GenCVMaker brand layer
================================================================== */

.sidebar { background: #fff; border-right: 1px solid #dbe6f7; }

.dashboard-brand { margin: 0 6px 30px; }
.dashboard-brand img { width: 100%; max-width: 200px; height: auto; display: block; }

.sidebar-link:hover { background: #f4f8ff; color: #091445; }

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, #00affe 0%, #0a55f0 60%, #0a3cd0 100%);
    box-shadow: 0 6px 16px rgba(10, 85, 240, .25);
}

.user-avatar, .top-avatar { background: linear-gradient(135deg, #00affe, #001e94); }

.mobile-brand img { height: 32px; width: auto; display: block; }

.app-shell.dashboard-page { background: #f4f8ff; }

.dashboard-page .dashboard-header h1,
.welcome-row h1 { font-family: Montserrat, Inter, sans-serif; color: #091445; }

.progress span, .dashboard-page .score-bar i {
    background: linear-gradient(90deg, #00affe, #0a55f0) !important;
}

.metric-icon, .insight-icon { color: #fff; background: linear-gradient(135deg, #00affe, #0a55f0); }

.text-button, .resume-list a:not(.primary-button) { color: #0a55f0; }

.dashboard-page .empty-state::before { background: linear-gradient(135deg, #00affe, #0a55f0); }

.auth-brand img, .seo-logo img { height: 46px; width: auto; display: block; }


/* ==================================================================
   App shell v2: shared top navigation, fixed sidebar (no scrolling),
   off-canvas drawer on tablet and mobile
================================================================== */

:root { --shell-pad: clamp(16px, 3.5vw, 56px); --topbar-h: 64px; }

/* ---- Sidebar: fixed height, fits the screen, no visible scrolling ---- */
.app-shell > .sidebar,
.app-shell.dashboard-page > .sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    width: 245px;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: clamp(12px, 2.2vh, 24px) 14px;
    overflow-y: auto;            /* safety net for very short screens only */
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 40;
}
.sidebar::-webkit-scrollbar { display: none; }
.dashboard-brand { margin: 0 6px clamp(10px, 2.6vh, 26px); }
.dashboard-brand img { max-width: 190px; }
.sidebar-group { margin-bottom: clamp(6px, 1.8vh, 20px); }
.sidebar-label { margin-bottom: clamp(3px, .8vh, 8px); }
.sidebar-link { margin: 2px 0; padding: clamp(5px, 1.05vh, 10px) 12px; }
.sidebar-bottom { padding-top: 8px; }
.sidebar-close, .sidebar-backdrop { display: none; }
button.sidebar-link { width: 100%; border: 0; background: none; font-family: inherit; cursor: pointer; text-align: left; }

/* ---- Main column ---- */
.app-shell.dashboard-page > .dashboard-main {
    padding: 0 var(--shell-pad) 44px;
}

/* ---- Top navigation ---- */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 var(--shell-pad);
    margin: 0 calc(-1 * var(--shell-pad)) 28px;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid #dbe6f7;
}
.app-shell:not(.dashboard-page) .app-topbar { margin: 0; }

.app-menu-btn {
    display: none;
    width: 40px; height: 40px;
    place-items: center;
    border: 1px solid #dbe6f7; border-radius: 10px;
    background: #fff; color: #091445; cursor: pointer;
}
.app-topbar-brand { display: none; }
.app-topbar-brand img { height: 32px; width: auto; display: block; }

.app-topnav { display: none; align-items: center; gap: 4px; margin-right: auto; }
.app-topnav a {
    padding: 8px 12px; border-radius: 9px;
    color: #4b5f7e; font-size: 14px; font-weight: 600; text-decoration: none;
}
.app-topnav a:hover { background: #f1f6ff; color: #091445; }
.app-topnav a.active { color: #0a55f0; background: #eaf3ff; }

.app-topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.app-topbar-cta {
    padding: 9px 16px; border-radius: 10px;
    background: linear-gradient(135deg, #00affe 0%, #0a55f0 60%, #0a3cd0 100%);
    color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.app-topbar-cta:hover { filter: brightness(1.07); }

.app-user { position: relative; }
.app-user-toggle {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 10px 5px 5px; border: 1px solid #dbe6f7; border-radius: 99px;
    background: #fff; color: #091445; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.app-user-toggle:hover { background: #f4f8ff; }
.app-user .top-avatar {
    width: 30px; height: 30px; display: grid; place-items: center;
    border-radius: 50%; color: #fff; font-size: 13px; font-weight: 800;
}
.app-user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-user-caret { font-size: 11px; color: #7a8aa3; }
.app-user-menu {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px;
    display: none; background: #fff; border: 1px solid #dbe6f7; border-radius: 14px;
    box-shadow: 0 16px 40px rgba(9, 20, 69, .14);
}
.app-user.open .app-user-menu { display: block; }
.app-user-menu a, .app-user-menu button {
    display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px;
    background: none; color: #263b5b; font: inherit; font-size: 14px; font-weight: 600;
    text-align: left; text-decoration: none; cursor: pointer;
}
.app-user-menu a:hover, .app-user-menu button:hover { background: #f1f6ff; color: #0a55f0; }
.app-user-menu form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid #e7eef9; }
.app-user-menu form button { color: #b42318; }
.app-user-menu form button:hover { background: #fff1f0; color: #b42318; }

@media (min-width: 1000px) { .app-topnav { display: flex; } }

/* ---- Short laptop screens: tighten the sidebar so it still fits without scrolling ---- */
@media (min-width: 901px) and (max-height: 760px) {
    .dashboard-brand img { max-width: 160px; }
    .sidebar-link { font-size: 12.5px; }
    .sidebar-label { font-size: 9.5px; }
}

/* ---- Tablet and mobile: sidebar becomes a slide-in drawer ---- */
@media (max-width: 900px) {
    .app-shell, .app-shell.dashboard-page { display: block; }

    .app-shell > .sidebar,
    .app-shell.dashboard-page > .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(290px, 86vw);
        height: 100vh;
        height: 100dvh;
        display: flex;
        padding: 56px 14px 16px;
        border-right: 1px solid #dbe6f7;
        border-bottom: 0;
        transform: translateX(-104%);
        transition: transform .26s ease, box-shadow .26s ease;
        z-index: 1001;
    }
    .app-shell > .sidebar.open { transform: none; box-shadow: 0 0 44px rgba(9, 20, 69, .28); }

    .sidebar-close {
        display: grid; place-items: center;
        position: absolute; top: 10px; right: 10px; width: 38px; height: 38px;
        border: 0; border-radius: 10px; background: #f1f6ff; color: #091445;
        font-size: 24px; line-height: 1; cursor: pointer;
    }
    .sidebar-backdrop {
        display: block; position: fixed; inset: 0; z-index: 1000;
        background: rgba(9, 20, 69, .45); opacity: 0; visibility: hidden;
        transition: opacity .26s ease, visibility .26s ease;
    }
    body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
    body.sidebar-open { overflow: hidden; }

    .app-menu-btn { display: inline-grid; }
    .app-topbar-brand { display: block; margin-right: auto; }
    .app-topbar-right { margin-left: 0; }
    .app-topbar { margin-bottom: 22px; }
}

@media (max-width: 640px) {
    :root { --topbar-h: 58px; }
    .app-topbar { gap: 10px; }
    .app-topbar-cta { display: none; }
    .app-user-name, .app-user-caret { display: none; }
    .app-user-toggle { padding: 4px; }
    .app-topbar-brand img { height: 28px; }
    .app-shell.dashboard-page > .dashboard-main { padding-bottom: 32px; }
}

@media print {
    .app-topbar, .sidebar, .sidebar-backdrop { display: none !important; }
}

/* Logout buttons must not pick up the generic .dashboard-page submit-button style */
.app-shell .sidebar button.sidebar-link.logout-button {
    display: flex; min-height: 0; width: 100%;
    background: none !important; box-shadow: none !important; border: 0; border-radius: 9px;
    color: #666d76 !important; font-size: 13px; font-weight: 600; padding: clamp(5px, 1.05vh, 10px) 12px;
}
.app-shell .sidebar button.sidebar-link.logout-button:hover { background: #fff1f0 !important; color: #b42318 !important; }
.app-shell .app-user .app-user-menu button {
    display: block; min-height: 0; width: 100%;
    background: none !important; box-shadow: none !important; border: 0; border-radius: 9px;
    color: #b42318 !important; font-size: 14px; font-weight: 600; padding: 10px 12px; text-align: left;
}
.app-shell .app-user .app-user-menu button:hover { background: #fff1f0 !important; color: #b42318 !important; }
.app-shell .app-menu-btn, .app-shell .sidebar-close, .app-shell .app-user-toggle {
    box-shadow: none; min-height: 0;
}
.app-shell .app-user-toggle { background: #fff; color: #091445; border: 1px solid #dbe6f7; padding: 5px 10px 5px 5px; }
.app-shell .app-menu-btn { background: #fff; color: #091445; border: 1px solid #dbe6f7; }
.app-shell .sidebar-close { background: #f1f6ff; color: #091445; border: 0; padding: 0; }
.app-shell .sidebar button.sidebar-link.logout-button { justify-content: flex-start; align-items: center; gap: 12px; text-align: left; }


/* ---- Plan strip + usage meters (dashboard) ---- */
.plan-strip { margin: 0 0 22px; padding: 20px 24px; border: 1px solid #dbe6f7; border-radius: 18px; background: #fff; }
.plan-strip-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; }
.plan-strip-head strong { color: #091445; font-size: 15px; }
.plan-strip-sub { margin-left: 8px; color: #607491; font-size: 13px; }
.plan-strip-link { color: #0a55f0; font-size: 14px; font-weight: 700; text-decoration: none; }
.plan-strip-link:hover { text-decoration: underline; }
.plan-chip { display: inline-block; margin-right: 8px; padding: 3px 10px; border-radius: 99px; background: #eef1f6; color: #4b5f7e; font-size: 11px; font-weight: 800; letter-spacing: .5px; }
.plan-chip-pro { background: linear-gradient(135deg, #00affe, #0a3cd0); color: #fff; }
.plan-chip-sm { margin: 0; padding: 2px 7px; font-size: 10px; }
.plan-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plan-meter-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; color: #4b5f7e; font-size: 13px; }
.plan-meter-top b { color: #091445; }
.plan-meter-bar { height: 8px; border-radius: 99px; background: #e8eef8; overflow: hidden; }
.plan-meter-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #00affe, #0a55f0); }
@media (max-width: 640px) { .plan-meters { grid-template-columns: 1fr; gap: 14px; } .plan-strip { padding: 16px; } }

.email-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding: 12px 16px; border: 1px solid #f7d58a; border-radius: 12px; background: #fff8e6; color: #7a5200; font-size: 14px; }
.email-banner form { margin: 0; }
.email-banner button { padding: 7px 14px; border: 1px solid #e0b24d; border-radius: 8px; background: #fff; color: #7a5200; font: inherit; font-weight: 700; cursor: pointer; }

/* Admin orders */
.order-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.order-big { display: block; margin-top: 6px; font-size: 26px; }
.order-filter { display: flex; gap: 8px; margin-bottom: 14px; }
.order-filter a { padding: 7px 16px; border: 1px solid #dbe6f7; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; }
.order-filter a.active { background: #0a55f0; border-color: #0a55f0; color: #fff; }
.order-table-wrap { overflow-x: auto; }
.order-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.order-table th, .order-table td { padding: 10px 12px; border-bottom: 1px solid #e6edf8; text-align: left; vertical-align: top; white-space: nowrap; }
.order-table th { color: #607491; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.order-ids { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: #536986; }
.order-badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.order-paid { background: #e8f8ee; color: #166534; }
.order-created { background: #fff4e5; color: #9a5b00; }
.order-btn { padding: 6px 10px; border: 1px solid #cfdcf2; border-radius: 8px; background: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
@media (max-width: 760px) { .order-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
