/* ============================================================
   DISHA desktop layout v2
   Only active at >= 992px. Phones and the mobile apps see the
   original mobile design, untouched.
   ============================================================ */
@media (min-width: 992px) {

    :root {
        --dsk-sidebar-w: 248px;
        --dsk-sidebar-w-collapsed: 68px;
        --dsk-content-max: 880px;
    }

    body { background: #eef1f7 !important; }

    .app-container {
        max-width: none !important;
        inset: 0 0 0 var(--dsk-sidebar-w) !important;
        left: var(--dsk-sidebar-w) !important;
        transform: none !important;
        width: auto !important;
        box-shadow: none !important;
        background: #eef1f7 !important;
        transition: left .22s ease;
    }
    body.dsk-collapsed .app-container { left: var(--dsk-sidebar-w-collapsed) !important; }

    .bottom-nav { display: none !important; }
    .app-back-fab { right: 34px !important; bottom: 30px !important; }

    .screen {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        padding: 26px clamp(20px, 5vw, 60px) 40px !important;
    }
    .screen > * {
        max-width: var(--dsk-content-max);
        width: 100%;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #jrn-stage-page {
        max-width: none !important;
        left: var(--dsk-sidebar-w) !important;
        right: 0 !important;
        width: auto !important;
        transform: none !important;
        padding-left: clamp(20px, 5vw, 60px);
        padding-right: clamp(20px, 5vw, 60px);
    }
    body.dsk-collapsed #jrn-stage-page { left: var(--dsk-sidebar-w-collapsed) !important; }
    #jrn-stage-page > * { max-width: var(--dsk-content-max); margin-left: auto; margin-right: auto; }
    .jrn-sp-back { right: 34px !important; }

    .app-container [style*="max-width:480px"],
    .app-container [style*="max-width: 480px"] {
        max-width: var(--dsk-content-max) !important;
    }

    #dsk-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: var(--dsk-sidebar-w);
        background: #101a3f;
        color: #dbe3f7;
        z-index: 3000;
        display: flex;
        flex-direction: column;
        font-family: 'Segoe UI', Roboto, sans-serif;
        transition: width .22s ease;
        overflow: hidden;
    }
    body.dsk-collapsed #dsk-sidebar { width: var(--dsk-sidebar-w-collapsed); }

    #dsk-sidebar .dsk-brand {
        display: flex; align-items: center; gap: 12px;
        padding: 20px 18px 16px;
        border-bottom: 1px solid rgba(255,255,255,.08);
        white-space: nowrap;
    }
    #dsk-sidebar .dsk-brand-badge {
        flex: 0 0 auto;
        width: 38px; height: 38px; border-radius: 11px;
        background: linear-gradient(135deg, #fdbb2d, #f88b30);
        color: #101a3f; font-weight: 900; font-size: 1.15rem;
        display: flex; align-items: center; justify-content: center;
    }
    #dsk-sidebar .dsk-brand-text { font-weight: 800; font-size: 1.06rem; color: #fff; letter-spacing: .4px; }
    #dsk-sidebar .dsk-brand-text small { display: block; font-weight: 500; font-size: .66rem; color: #9fb0d8; letter-spacing: 1.6px; text-transform: uppercase; }
    body.dsk-collapsed #dsk-sidebar .dsk-brand-text { display: none; }

    #dsk-sidebar .dsk-nav { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 14px 10px; }
    #dsk-sidebar .dsk-nav::-webkit-scrollbar { width: 5px; }
    #dsk-sidebar .dsk-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }

    .dsk-item { margin-bottom: 2px; }
    .dsk-link {
        display: flex; align-items: center; gap: 13px;
        width: 100%;
        padding: 11px 13px;
        border: 0; background: none;
        color: #c6d2ee; font-size: .93rem; font-weight: 600;
        border-radius: 10px; cursor: pointer;
        white-space: nowrap; text-align: left;
    }
    .dsk-link:hover { background: rgba(255,255,255,.07); color: #fff; }
    .dsk-link.active { background: #fdbb2d; color: #14203f; }
    .dsk-link .dsk-ico { flex: 0 0 auto; width: 22px; text-align: center; font-size: 1.06rem; }
    .dsk-link .dsk-badge {
        margin-left: auto; background: #ff5a4e; color: #fff;
        font-size: .68rem; font-weight: 800; border-radius: 9px; padding: 2px 7px;
    }
    .dsk-link .dsk-caret { margin-left: auto; font-size: .68rem; opacity: .7; transition: transform .18s; }
    .dsk-item.open .dsk-caret { transform: rotate(90deg); }
    .dsk-link.active .dsk-badge { background: #14203f; color: #fdbb2d; }
    body.dsk-collapsed .dsk-link { justify-content: center; padding: 12px 0; }
    body.dsk-collapsed .dsk-link span:not(.dsk-ico) { display: none; }

    .dsk-sub { display: none; padding: 2px 0 6px 30px; }
    .dsk-item.open .dsk-sub { display: block; }
    body.dsk-collapsed .dsk-sub { display: none !important; }
    .dsk-sub .dsk-sublink {
        display: block; width: 100%;
        padding: 8px 12px; border: 0; background: none;
        color: #9fb0d8; font-size: .85rem; font-weight: 500;
        border-radius: 8px; cursor: pointer; text-align: left;
        white-space: nowrap;
    }
    .dsk-sub .dsk-sublink:hover { background: rgba(255,255,255,.06); color: #fff; }

    #dsk-sidebar .dsk-foot {
        flex: 0 0 auto;
        border-top: 1px solid rgba(255,255,255,.08);
        padding: 12px 10px;
    }
    #dsk-collapse-btn {
        display: flex; align-items: center; gap: 13px; justify-content: flex-start;
        width: 100%; padding: 10px 13px;
        border: 0; background: none; color: #9fb0d8;
        font-size: .85rem; font-weight: 600; border-radius: 10px; cursor: pointer;
        white-space: nowrap;
    }
    #dsk-collapse-btn:hover { background: rgba(255,255,255,.07); color: #fff; }
    body.dsk-collapsed #dsk-collapse-btn { justify-content: center; padding: 10px 0; }
    body.dsk-collapsed #dsk-collapse-btn span:not(.dsk-ico) { display: none; }
}

@media (max-width: 991.98px) {
    #dsk-sidebar { display: none !important; }
}

/* ============ flow pages (onboarding, welcome, etc.) ============ */
@media (min-width: 992px) {
    body.dsk-flow { background: #eef1f7 !important; }
    body.dsk-flow .app-container {
        position: relative !important;
        inset: auto !important;
        left: auto !important;
        max-width: none !important;
        margin: 0 0 0 var(--dsk-sidebar-w) !important;
        min-height: 100vh;
        box-shadow: none !important;
        background: #eef1f7 !important;
        padding: 34px clamp(20px, 5vw, 60px) 50px !important;
        transition: margin-left .22s ease;
    }
    body.dsk-flow.dsk-collapsed .app-container { margin-left: var(--dsk-sidebar-w-collapsed) !important; }
    body.dsk-flow .app-container > * {
        max-width: var(--dsk-content-max);
        width: 100%;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    body.dsk-flow .app-container > .bottom-nav { display: none !important; }
    body.dsk-flow [style*="max-width:480px"],
    body.dsk-flow [style*="max-width: 480px"] { max-width: var(--dsk-content-max) !important; }

    /* onboarding welcome: compact professional card */
    body.dsk-flow .welcome-screen.active {
        min-height: 0 !important;
        background: #fff !important;
        border-radius: 16px;
        box-shadow: 0 10px 34px rgba(15, 23, 42, .08);
        padding: 56px 48px !important;
        margin-top: 8vh !important;
        max-width: 620px !important;
        gap: 6px;
    }
    body.dsk-flow .welcome-screen .welcome-sub   { color: #64748b !important; }
    body.dsk-flow .welcome-screen .welcome-name  { color: #101a3f !important; font-size: 2.3rem !important; }
    body.dsk-flow .welcome-screen .welcome-brand { color: #b45309 !important; }
    body.dsk-flow .welcome-screen .btn-premium-cta {
        max-width: 340px;
        margin-top: 26px;
    }
    body.dsk-flow .disha-global-back-fab,
    body.dsk-flow .app-back-fab {
        left: auto !important;
        right: 34px !important;
        bottom: 30px !important;
        position: fixed !important;
    }

    /* setup steps: wizard card */
    body.dsk-flow .app-container > .screen {
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 10px 34px rgba(15, 23, 42, .07);
        padding: 40px 48px 44px !important;
        max-width: 960px !important;
        margin-top: 14px !important;
        margin-bottom: 40px !important;
    }
    body.dsk-flow .app-container > .screen .section-title {
        font-size: 1.45rem;
        margin-bottom: 24px;
    }
    body.dsk-flow .app-container > .screen .btn-custom {
        width: auto !important;
        min-width: 230px;
        display: block;
        margin-left: auto !important;
        margin-right: 0 !important;
    }
    body.dsk-flow #top-nav {
        max-width: 960px !important;
        border-radius: 14px;
        overflow: hidden;
    }
    /* option cards in a responsive grid */
    body.dsk-flow .app-container > .screen > div:has(> .option-card),
    body.dsk-flow #interest-options,
    body.dsk-flow #career-options {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
        gap: 12px;
        align-items: stretch;
    }
    body.dsk-flow .option-card { margin-bottom: 0 !important; }
    body.dsk-flow #interest-options .interest-empty,
    body.dsk-flow #career-options .interest-empty,
    body.dsk-flow #interest-options .career-group-head,
    body.dsk-flow #career-options .career-group-head {
        grid-column: 1 / -1;
    }
}
