/* shared/past-weak — gecmis eksik konular modali */
#past-weak-topics-modal {
    position: fixed; inset: 0; z-index: 171;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    padding: 0.75rem;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
}
#past-weak-topics-modal.hidden { display: none !important; }
.pwt-panel {
    width: min(96vw, 44rem);
    max-height: 80vh;
    height: 80vh;
    background: linear-gradient(165deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 1.35rem;
    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
    display: flex; flex-direction: column;
    overflow: hidden;
    color: #e2e8f0;
    overscroll-behavior: contain;
    touch-action: auto;
}
.pwt-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding: 1.1rem 1.25rem 0.85rem;
    border-bottom: 1px solid rgba(148,163,184,0.18);
    flex: 0 0 auto;
}
.pwt-head h3 { font-size: 1.05rem; font-weight: 900; color: #fff; margin: 0; }
.pwt-head p { font-size: 0.72rem; color: #94a3b8; margin: 0.35rem 0 0; line-height: 1.4; }
.pwt-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
    padding: 0.65rem 1.15rem;
    border-bottom: 1px solid rgba(148,163,184,0.12);
    background: rgba(15,23,42,0.45);
    flex: 0 0 auto;
}
.pwt-sort {
    display: inline-flex; align-items: center; gap: 0.45rem;
    font-size: 0.68rem; font-weight: 700; color: #94a3b8;
}
.pwt-sort select {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #e2e8f0;
    border-radius: 0.55rem;
    padding: 0.35rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}
.pwt-body {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    height: auto;
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: 0.75rem 1.1rem 1.35rem;
    display: block;
}
.pwt-pack {
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.72);
    overflow: visible;
    margin-bottom: 0.75rem;
}
.pwt-pack:last-child { margin-bottom: 0.25rem; }
.pwt-pack-head {
    width: 100%; text-align: left; cursor: pointer;
    padding: 0.9rem 1rem;
    background: transparent; border: 0; color: inherit;
    display: flex; flex-direction: column; gap: 0.55rem;
}
.pwt-pack-title-row {
    display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
}
.pwt-pack-title { font-size: 0.9rem; font-weight: 900; color: #f8fafc; line-height: 1.3; }
.pwt-pack-title .pwt-pct-inline {
    color: #fbbf24; font-weight: 900; margin-left: 0.35rem;
}
.pwt-pack-meta { font-size: 0.65rem; color: #94a3b8; font-weight: 700; }
.pwt-pack-chevron { color: #94a3b8; transition: transform 0.15s; flex-shrink: 0; }
.pwt-pack.is-open .pwt-pack-chevron { transform: rotate(180deg); }
.pwt-progress {
    display: grid; grid-template-columns: 1fr auto; gap: 0.45rem 0.65rem; align-items: center;
}
.pwt-progress-bar {
    height: 0.5rem; border-radius: 999px; background: rgba(148,163,184,0.2); overflow: hidden;
}
.pwt-progress-bar > span {
    display: block; height: 100%; border-radius: inherit;
    background: linear-gradient(90deg, #f59e0b, #34d399);
    width: var(--p, 0%);
    max-width: 100%;
    transition: width 0.25s ease;
}
.pwt-progress-label { font-size: 0.7rem; font-weight: 800; color: #fbbf24; white-space: nowrap; }
.pwt-pack-body { display: none; padding: 0 0.85rem 0.95rem; }
.pwt-pack.is-open .pwt-pack-body { display: block; }
.pwt-local-filter {
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin: 0.15rem 0 0.75rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.65rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.22);
    font-size: 0.7rem; font-weight: 700; color: #fde68a;
    cursor: pointer; user-select: none;
}
.pwt-local-filter input { accent-color: #f59e0b; width: 0.95rem; height: 0.95rem; }
.pwt-subject {
    margin-bottom: 0.65rem;
    border: 1px solid rgba(148,163,184,0.14);
    border-radius: 0.75rem;
    background: rgba(30, 41, 59, 0.55);
    overflow: hidden;
}
.pwt-subject-head {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid rgba(148,163,184,0.1);
}
.pwt-subject-title {
    font-size: 0.75rem; font-weight: 900; letter-spacing: 0.02em;
}
.pwt-subject-pct {
    font-size: 0.68rem; font-weight: 800; color: #94a3b8;
    white-space: nowrap;
}
.pwt-subject-bar {
    height: 0.28rem; background: rgba(148,163,184,0.15); border-radius: 999px; margin: 0 0.7rem 0.35rem;
    overflow: hidden;
}
.pwt-subject-bar > span {
    display: block; height: 100%; border-radius: inherit;
    width: var(--p, 0%);
    background: var(--c, #64748b);
}
.pwt-item {
    display: flex; align-items: flex-start; gap: 0.55rem;
    padding: 0.5rem 0.7rem;
    border-top: 1px solid rgba(148,163,184,0.08);
    font-size: 0.74rem; color: #cbd5e1; line-height: 1.35;
    cursor: pointer;
    width: 100%;
    text-align: left;
    background: transparent;
    border-left: 0; border-right: 0; border-bottom: 0;
}
.pwt-item:hover { background: rgba(148,163,184,0.06); }
.pwt-item.is-done { opacity: 0.72; }
.pwt-item.is-done .pwt-item-text { text-decoration: line-through; }
.pwt-item-check {
    width: 1.15rem; height: 1.15rem; border-radius: 0.3rem; margin-top: 0.1rem; flex-shrink: 0;
    border: 1.5px solid #64748b; display: grid; place-items: center;
    font-size: 0.55rem; color: transparent;
    background: rgba(15,23,42,0.5);
}
.pwt-item.is-done .pwt-item-check {
    background: #059669; border-color: #059669; color: #fff;
}
.pwt-item input.pwt-cb {
    position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.pwt-item-tier {
    display: inline-block; margin-left: 0.35rem;
    font-size: 0.58rem; font-weight: 800; text-transform: uppercase;
    color: #f87171;
}
.pwt-item-tier.is-orta { color: #fbbf24; }
.pwt-late-badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    margin-top: 0.3rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.58rem; font-weight: 800;
    letter-spacing: 0.02em;
    color: #fdba74;
    background: rgba(234, 88, 12, 0.18);
    border: 1px solid rgba(251, 146, 60, 0.35);
}
.pwt-empty { text-align: center; color: #94a3b8; font-size: 0.82rem; padding: 2rem 1rem; }
