/* PDS Higher Edu v1.2.0 — Mobile-First Higher Education Suite */
:root {
    --pds-he-primary: #5B1FBA;
    --pds-he-primary-dark: #451591;
    --pds-he-primary-soft: #F3ECFF;
    --pds-he-accent: #79BA1F;
    --pds-he-accent-bright: #85CE19;
    --pds-he-bg: #F8F9FC;
    --pds-he-surface: #FFFFFF;
    --pds-he-text: #1E1B2E;
    --pds-he-muted: #5C5872;
    --pds-he-border: #E4E1EE;
    --pds-he-green-bg: #ECF8DF;
    --pds-he-green-txt: #2B5E0B;
    --pds-he-amber-bg: #FFF6E0;
    --pds-he-amber-txt: #8A5300;
    --pds-he-red-bg: #FDECEC;
    --pds-he-red-txt: #A41E1E;
    --pds-he-radius: 14px;
}

.pds-he-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--pds-he-text);
    max-width: 980px;
    margin: 24px auto;
    line-height: 1.55;
    box-sizing: border-box;
}

.pds-he-app *, .pds-he-app *::before, .pds-he-app *::after {
    box-sizing: border-box;
}

/* Header */
.pds-he-header {
    background: linear-gradient(135deg, var(--pds-he-primary) 0%, #3A1078 100%);
    color: #fff;
    padding: 28px 24px;
    border-radius: var(--pds-he-radius);
    margin-bottom: 18px;
    box-shadow: 0 10px 28px rgba(91, 31, 186, 0.16);
}

.pds-he-header-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.pds-he-header-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 8px;
}

.pds-he-header-sub {
    margin: 0;
    font-size: 15px;
    opacity: 0.92;
    max-width: 720px;
}

/* Swipeable Tabs */
.pds-he-tabs-wrap {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 2px 12px;
    margin-bottom: 8px;
}
.pds-he-tabs-wrap::-webkit-scrollbar {
    display: none;
}

.pds-he-tab {
    flex: 0 0 auto;
    border: 1.5px solid var(--pds-he-border);
    background: var(--pds-he-surface);
    color: var(--pds-he-muted);
    font-size: 14px;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.pds-he-tab:hover {
    border-color: var(--pds-he-primary);
    color: var(--pds-he-primary);
}

.pds-he-tab.is-active {
    background: var(--pds-he-primary);
    border-color: var(--pds-he-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(91, 31, 186, 0.25);
}

/* Panels & Cards */
.pds-he-panel {
    display: none;
}
.pds-he-panel.is-active {
    display: block;
    animation: pdsHeFade 0.22s ease;
}

@keyframes pdsHeFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.pds-he-card {
    background: var(--pds-he-surface);
    border: 1px solid var(--pds-he-border);
    border-radius: var(--pds-he-radius);
    padding: 24px;
    box-shadow: 0 4px 16px rgba(30, 27, 46, 0.04);
}

.pds-he-card-head h2 {
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 800;
    color: var(--pds-he-primary);
    line-height: 1.3;
}

.pds-he-card-head p {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--pds-he-muted);
}

/* Inputs Grid */
.pds-he-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.pds-he-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pds-he-field label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--pds-he-text);
}

.pds-he-field input,
.pds-he-field select {
    width: 100%;
    font-size: 16px; /* Prevents iOS Safari zoom */
    padding: 11px 13px;
    border: 1.5px solid var(--pds-he-border);
    border-radius: 10px;
    background: #fff;
    color: var(--pds-he-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pds-he-field input:focus,
.pds-he-field select:focus {
    outline: none;
    border-color: var(--pds-he-primary);
    box-shadow: 0 0 0 3px rgba(91, 31, 186, 0.14);
}

.pds-he-hint {
    font-size: 12px;
    color: var(--pds-he-muted);
}

/* Result Box */
.pds-he-result-box {
    background: var(--pds-he-bg);
    border: 1px solid var(--pds-he-border);
    border-radius: 12px;
    padding: 20px;
}

.pds-he-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.pds-he-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.pds-he-stat-card {
    background: #fff;
    border: 1px solid var(--pds-he-border);
    border-radius: 10px;
    padding: 14px;
}

.pds-he-stat-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--pds-he-muted);
    margin-bottom: 6px;
}

.pds-he-stat-val {
    font-size: 20px;
    font-weight: 800;
    color: var(--pds-he-text);
    line-height: 1.2;
}

.pds-he-stat-sub {
    font-size: 12.5px;
    color: var(--pds-he-muted);
    margin-top: 4px;
}

.pds-he-badge {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    margin-top: 2px;
}

.pds-he-badge.is-green { background: var(--pds-he-green-bg); color: var(--pds-he-green-txt); }
.pds-he-badge.is-amber { background: var(--pds-he-amber-bg); color: var(--pds-he-amber-txt); }
.pds-he-badge.is-red   { background: var(--pds-he-red-bg); color: var(--pds-he-red-txt); }

.pds-he-insight {
    background: #fff;
    border-left: 4px solid var(--pds-he-primary);
    padding: 14px 16px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 14.5px;
}

.pds-he-insight.is-accent {
    border-left-color: var(--pds-he-accent);
}

.pds-he-insight strong {
    color: var(--pds-he-primary);
}

.pds-he-bars {
    margin: 14px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pds-he-bar-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pds-he-bar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
}

.pds-he-bar-track {
    height: 12px;
    background: #E8E6F2;
    border-radius: 999px;
    overflow: hidden;
}

.pds-he-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.35s ease;
}

.pds-he-bar-fill.is-primary { background: var(--pds-he-primary); }
.pds-he-bar-fill.is-accent  { background: var(--pds-he-accent); }
.pds-he-bar-fill.is-amber   { background: #E59819; }
.pds-he-bar-fill.is-red     { background: #D93838; }

.pds-he-roadmap-list {
    margin: 12px 0 0;
    padding-left: 18px;
    font-size: 14px;
}
.pds-he-roadmap-list li {
    margin-bottom: 6px;
}

/* Action Bar */
.pds-he-action-bar {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pds-he-btn-primary,
.pds-he-btn-secondary {
    font-size: 15px;
    font-weight: 700;
    padding: 13px 20px;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pds-he-btn-primary {
    background: var(--pds-he-accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(121, 186, 31, 0.28);
}
.pds-he-btn-primary:hover {
    background: var(--pds-he-accent-bright);
    transform: translateY(-1px);
}

.pds-he-btn-secondary {
    background: var(--pds-he-primary-soft);
    color: var(--pds-he-primary);
    border: 1.5px solid rgba(91, 31, 186, 0.2);
}
.pds-he-btn-secondary:hover {
    background: #E8DCFF;
}

.pds-he-btn-full {
    width: 100%;
    margin-top: 8px;
}

/* FAQ Knowledge Base */
.pds-he-faq-wrap {
    margin-top: 26px;
    background: #fff;
    border: 1px solid var(--pds-he-border);
    border-radius: var(--pds-he-radius);
    padding: 20px 24px;
}

.pds-he-faq-wrap h3 {
    margin: 0 0 14px;
    font-size: 17px;
    color: var(--pds-he-text);
}

.pds-he-faq-wrap details {
    border-top: 1px solid var(--pds-he-border);
    padding: 12px 0;
}
.pds-he-faq-wrap details:first-of-type {
    border-top: none;
}
.pds-he-faq-wrap summary {
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    color: var(--pds-he-primary);
}
.pds-he-faq-wrap details p {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--pds-he-muted);
}

/* Modal (Bottom-sheet on mobile) */
.pds-he-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 14, 38, 0.58);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
}

.pds-he-modal-backdrop.is-open {
    display: flex;
}

.pds-he-modal-dialog {
    background: #fff;
    width: 100%;
    max-width: 460px;
    border-radius: 16px;
    padding: 24px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    max-height: 92vh;
    overflow-y: auto;
}

.pds-he-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #F2F0F8;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--pds-he-text);
}

.pds-he-modal-badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--pds-he-primary);
    background: var(--pds-he-primary-soft);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.pds-he-modal-dialog h3 {
    margin: 0 0 6px;
    font-size: 20px;
    color: var(--pds-he-text);
}

.pds-he-modal-context {
    font-size: 13.5px;
    color: var(--pds-he-muted);
    background: var(--pds-he-bg);
    padding: 10px 12px;
    border-radius: 8px;
    margin: 0 0 14px;
}

.pds-he-modal-dialog .pds-he-field {
    margin-bottom: 12px;
}

.pds-he-lead-status {
    font-size: 13.5px;
    font-weight: 600;
    margin: 8px 0;
}
.pds-he-lead-status.is-ok  { color: var(--pds-he-green-txt); }
.pds-he-lead-status.is-err { color: var(--pds-he-red-txt); }

/* Mobile Responsive */
@media (max-width: 720px) {
    .pds-he-grid,
    .pds-he-status-grid,
    .pds-he-kpi-grid {
        grid-template-columns: 1fr;
    }
    .pds-he-header {
        padding: 20px 18px;
    }
    .pds-he-header-title {
        font-size: 20px;
    }
    .pds-he-card {
        padding: 18px 16px;
    }
    .pds-he-action-bar {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .pds-he-modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }
    .pds-he-modal-dialog {
        border-radius: 18px 18px 0 0;
        max-width: 100%;
    }
}

/* Clean Print Styling for PDF Roadmap */
@media print {
    .pds-he-tabs-wrap,
    .pds-he-action-bar,
    .pds-he-faq-wrap,
    .pds-he-modal-backdrop {
        display: none !important;
    }
    .pds-he-card {
        border: none;
        box-shadow: none;
        padding: 0;
    }
}
