/* ==========================================================================
   GCE A/L Science Syllabus Coverage Tracker — Styles
   ========================================================================== */

.syl-page {
    min-height: 90vh;
    padding: 2.2rem 0 5rem;
    font-family: 'Archivo', sans-serif;
    color: #f8fafc;
}

.syl-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ── Breadcrumb & Title ── */
.syl-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(203, 213, 225, 0.7);
    text-decoration: none;
    font-size: 0.88rem;
    margin-bottom: 1.2rem;
    transition: color 0.2s ease;
}
.syl-back:hover {
    color: #7dd2ff;
}

.syl-header-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.syl-title {
    font-size: clamp(1.6rem, 3.2vw, 2.25rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
}

.syl-subtitle {
    font-size: 0.95rem;
    color: rgba(203, 213, 225, 0.72);
    margin: 0;
    max-width: 660px;
    line-height: 1.5;
}

.syl-action-btns {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.syl-btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.syl-btn-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(125, 210, 255, 0.4);
    color: #fff;
}

.syl-btn-primary {
    background: linear-gradient(135deg, #e72749, #c81d3b);
    border-color: #ff4769;
    color: #fff;
    box-shadow: 0 4px 14px rgba(231, 39, 73, 0.35);
}
.syl-btn-primary:hover {
    background: linear-gradient(135deg, #f03357, #d42242);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(231, 39, 73, 0.45);
}

/* ── Guest Sync Banner ── */
.syl-guest-banner {
    background: linear-gradient(135deg, rgba(231, 39, 73, 0.14), rgba(125, 210, 255, 0.1));
    border: 1px solid rgba(231, 39, 73, 0.35);
    border-radius: 16px;
    padding: 1rem 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}
.syl-guest-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.syl-guest-icon {
    font-size: 1.5rem;
    color: #ff6b86;
}

/* ── Executive Progress Cockpit ── */
.syl-cockpit {
    background: rgba(24, 28, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.syl-cockpit-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.syl-stream-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7dd2ff;
    background: rgba(125, 210, 255, 0.1);
    border: 1px solid rgba(125, 210, 255, 0.22);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
}

.syl-save-indicator {
    font-size: 0.78rem;
    color: rgba(203, 213, 225, 0.55);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.syl-save-indicator.saved {
    color: #4ade80;
}

.syl-progress-main {
    margin-bottom: 1.25rem;
}
.syl-progress-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.syl-progress-pct {
    font-size: 2.1rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.syl-progress-label {
    font-size: 0.85rem;
    color: rgba(203, 213, 225, 0.65);
    font-weight: 500;
}
.syl-progress-periods {
    font-size: 0.85rem;
    color: rgba(203, 213, 225, 0.65);
    font-weight: 600;
}

.syl-bar-track {
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.syl-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #e72749, #ff6b86 60%, #7dd2ff);
    border-radius: 999px;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(231, 39, 73, 0.5);
}

.syl-submetrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.syl-submetric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.75rem 0.95rem;
}
.syl-submetric-lbl {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(203, 213, 225, 0.6);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.syl-submetric-val {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.syl-submetric-mini-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    margin-top: 0.45rem;
    overflow: hidden;
}
.syl-submetric-mini-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.35s ease;
}
.syl-submetric-mini-fill.theory { background: #ffc107; }
.syl-submetric-mini-fill.notes  { background: #7dd2ff; }
.syl-submetric-mini-fill.papers { background: #4ade80; }

/* ── Subject Tabs ── */
.syl-subject-tabs {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.85rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.syl-subject-tabs::-webkit-scrollbar { display: none; }

.syl-sub-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 1.25rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.syl-sub-tab:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}
.syl-sub-tab.active {
    background: rgba(231, 39, 73, 0.15);
    border-color: rgba(231, 39, 73, 0.4);
    color: #fff;
    box-shadow: 0 4px 15px rgba(231, 39, 73, 0.25);
}

.syl-sub-tab-pct {
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
}
.syl-sub-tab.active .syl-sub-tab-pct {
    background: #e72749;
    color: #fff;
}

/* ── Filter & Search Toolbar ── */
.syl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.syl-search-input {
    background: rgba(20, 24, 33, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.55rem 0.95rem;
    color: #fff;
    font-size: 0.88rem;
    outline: none;
    min-width: 240px;
    transition: border-color 0.2s ease;
}
.syl-search-input:focus {
    border-color: rgba(125, 210, 255, 0.45);
}

.syl-term-filter-pills {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.syl-filter-pill {
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.syl-filter-pill:hover {
    color: #fff;
}
.syl-filter-pill.active {
    background: #7dd2ff;
    color: #0b111e;
    border-color: #7dd2ff;
}

/* ── Term Section Grouping ── */
.syl-term-group {
    margin-bottom: 2rem;
}
.syl-term-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding: 0 0.25rem;
}
.syl-term-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.syl-term-badge {
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.65);
    padding: 0.18rem 0.55rem;
    border-radius: 6px;
}

/* ── Topic / Unit Card ── */
.syl-unit-card {
    background: rgba(24, 28, 38, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    transition: all 0.2s ease;
}
.syl-unit-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(27, 32, 44, 0.85);
}
.syl-unit-card.theory-done {
    border-color: rgba(255, 193, 7, 0.28);
    background: rgba(35, 30, 20, 0.4);
}
.syl-unit-card.all-done {
    border-color: rgba(74, 222, 128, 0.28);
    background: rgba(20, 35, 28, 0.45);
}

.syl-unit-info {
    flex: 1;
    min-width: 0;
}
.syl-unit-title-row {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}
.syl-unit-num {
    font-size: 0.8rem;
    font-weight: 700;
    color: #7dd2ff;
    text-transform: uppercase;
}
.syl-unit-name {
    font-size: 0.98rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}
.syl-unit-meta {
    font-size: 0.78rem;
    color: rgba(203, 213, 225, 0.6);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}
.syl-weight-chip {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.72rem;
}

/* ── 3 Multi-Stage Checkbox Toggles ── */
.syl-stages-wrap {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}

.syl-stage-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.syl-stage-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.syl-stage-btn i {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

/* Stage active states */
.syl-stage-btn.active.theory {
    background: rgba(255, 193, 7, 0.16);
    border-color: rgba(255, 193, 7, 0.45);
    color: #ffc107;
}
.syl-stage-btn.active.notes {
    background: rgba(125, 210, 255, 0.16);
    border-color: rgba(125, 210, 255, 0.45);
    color: #7dd2ff;
}
.syl-stage-btn.active.papers {
    background: rgba(74, 222, 128, 0.16);
    border-color: rgba(74, 222, 128, 0.45);
    color: #4ade80;
}

.syl-stage-btn.active i {
    transform: scale(1.15);
}

/* ── Stream Selector Modal ── */
.syl-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 14, 22, 0.82);
    backdrop-filter: blur(8px);
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.syl-modal-backdrop.show {
    display: flex;
}

.syl-modal-box {
    background: #181c26;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    width: 100%;
    max-width: 580px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    animation: sylModalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes sylModalPop {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.syl-modal-header {
    padding: 1.35rem 1.6rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.syl-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}
.syl-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}
.syl-modal-close:hover { color: #fff; }

.syl-modal-body {
    padding: 1.5rem 1.6rem;
}

.syl-stream-choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.syl-stream-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.syl-stream-card:hover {
    background: rgba(255, 255, 255, 0.08);
}
.syl-stream-card.active {
    background: rgba(125, 210, 255, 0.12);
    border-color: #7dd2ff;
    box-shadow: 0 4px 18px rgba(125, 210, 255, 0.25);
}
.syl-stream-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #7dd2ff;
}
.syl-stream-card-name {
    font-size: 0.96rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}
.syl-stream-card-sub {
    font-size: 0.78rem;
    color: rgba(203, 213, 225, 0.65);
}

.syl-subj-checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}
.syl-subj-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.syl-subj-option:hover {
    background: rgba(255, 255, 255, 0.06);
}
.syl-subj-option.selected {
    background: rgba(231, 39, 73, 0.12);
    border-color: rgba(231, 39, 73, 0.45);
}
.syl-subj-option.locked {
    cursor: not-allowed;
    opacity: 0.9;
}

.syl-modal-footer {
    padding: 1rem 1.6rem 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ── Mobile Responsive Overrides ── */
@media (max-width: 767.98px) {
    .syl-unit-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }
    .syl-stages-wrap {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.45rem;
    }
    .syl-stage-btn {
        justify-content: center;
        padding: 0.45rem 0.4rem;
        font-size: 0.74rem;
        text-align: center;
    }
    .syl-submetrics-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
    .syl-stream-choice-grid {
        grid-template-columns: 1fr;
    }
}

/* ── First-Time Onboarding Wizard ── */
.syl-wizard-wrap {
    max-width: 760px;
    margin: 1.5rem auto 3rem;
    animation: fadeInSyl 0.35s ease;
}

.syl-wizard-card {
    background: linear-gradient(135deg, rgba(23, 27, 38, 0.95), rgba(16, 18, 25, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2.25rem 2.25rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(125, 210, 255, 0.08);
}

.syl-wizard-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(125, 210, 255, 0.12);
    border: 1px solid rgba(125, 210, 255, 0.28);
    color: #7dd2ff;
    padding: 0.32rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.syl-wizard-title {
    font-size: clamp(1.4rem, 2.8vw, 1.95rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
}

.syl-wizard-desc {
    font-size: 0.92rem;
    color: rgba(203, 213, 225, 0.74);
    line-height: 1.55;
    margin-bottom: 2rem;
}

.syl-wizard-step {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 1.4rem 1.4rem;
    margin-bottom: 1.5rem;
}

.syl-step-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.syl-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #e72749, #c81d3b);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1px;
}

.syl-step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.2rem;
}

.syl-step-sub {
    font-size: 0.82rem;
    color: rgba(203, 213, 225, 0.65);
    margin: 0;
}

.syl-batch-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.syl-batch-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.55rem 1.15rem;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.syl-batch-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(125, 210, 255, 0.35);
    color: #fff;
}

.syl-batch-chip.active {
    background: rgba(125, 210, 255, 0.16);
    border-color: #7dd2ff;
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(125, 210, 255, 0.2);
}

.syl-wizard-footer {
    text-align: center;
    padding-top: 0.75rem;
}

.syl-launch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    background: linear-gradient(135deg, #e72749, #c81d3b);
    border: 1px solid #ff4769;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.95rem 1.75rem;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(231, 39, 73, 0.4);
    transition: all 0.25s ease;
}

.syl-launch-btn:hover {
    background: linear-gradient(135deg, #f03357, #d42242);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(231, 39, 73, 0.55);
    color: #fff;
}

.syl-launch-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.syl-wizard-footnote {
    font-size: 0.78rem;
    color: rgba(203, 213, 225, 0.55);
    margin-top: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

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