.po-app{display:flex;min-height:100vh;background:#f5f7fb}.po-sidebar{width:260px;min-width:260px;background:#111827;color:#fff;padding:24px 20px;display:flex;flex-direction:column;justify-content:space-between;transition:transform .25s ease;z-index:1001}.po-sidebar__brand h2{margin:0;font-size:22px;line-height:1.2}.po-sidebar__brand p{margin:6px 0 0;font-size:13px;color:#9ca3af}.po-sidebar__nav{margin-top:30px}.po-nav-link{display:block;padding:12px;border-radius:10px;text-decoration:none;color:#d1d5db;font-weight:600}.po-nav-link:hover{background:#1f2937;color:#fff}.po-nav-link--active{background:#2563eb;color:#fff}.po-sidebar__footer{margin-top:20px;border-top:1px solid rgba(255,255,255,.1);padding-top:16px}.po-user-box{margin-bottom:10px}.po-user-box__name{font-weight:700;font-size:14px}.po-user-box__email{font-size:12px;color:#9ca3af;word-break:break-word}.po-logout-link{display:inline-block;margin-top:10px;padding:8px 12px;background:#1f2937;border-radius:8px;color:#fff;text-decoration:none;font-size:13px}.po-logout-link:hover{background:#374151}.po-mobile-toggle{display:none;position:fixed;top:14px;left:14px;z-index:1100;width:44px;height:44px;border:none;border-radius:12px;background:#111827;color:#fff;font-size:22px;line-height:1;cursor:pointer;box-shadow:0 8px 20px rgba(15,23,42,.18)}.po-mobile-overlay{display:none}.po-main{flex:1;padding:28px;width:100%;max-width:none}.po-card{background:#fff;border:1px solid #e6eaf0;border-radius:18px;padding:18px 20px;margin-bottom:18px;width:100%;box-shadow:0 4px 16px rgba(15,23,42,.04);box-sizing:border-box}.po-composer{padding:14px 16px}.po-textarea{width:100%;border:1px solid #d8dee8;border-radius:14px;padding:12px 14px;font-size:14px;box-sizing:border-box;background:#fff;font-family:inherit;resize:vertical}.po-textarea:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 3px rgba(96,165,250,.15)}.po-textarea--post{min-height:50px}.po-textarea--comment{min-height:40px}.po-composer__footer,.po-comment-form__footer{margin-top:10px;display:flex;align-items:center;justify-content:space-between;gap:12px}.po-text-counter{font-size:12px;color:#94a3b8}.po-text-counter--limit{color:#b91c1c;font-weight:700}.po-button{background:#2563eb;color:#fff;border:none;border-radius:12px;padding:10px 16px;cursor:pointer;font-weight:600;font-size:14px}.po-button:hover{background:#1d4ed8}.po-button--secondary{background:#111827}.po-button--secondary:hover{background:#000}.po-feed{display:flex;flex-direction:column;gap:16px}.po-post{text-align:left}.po-post__top{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:6px}.po-post__author{font-size:16px;font-weight:600;color:#2563eb;line-height:1.2}.po-post__content{font-size:20px;line-height:1.5;color:#0f172a;font-weight:400;margin-top:6px;text-align:left;white-space:normal;word-break:break-word}.po-post__date{margin-top:6px;font-size:11px;color:#9ca3af;line-height:1.2}.po-delete-form,.po-comment-delete-form{margin:0}.po-delete-icon{background:transparent;border:none;color:#ef4444;font-size:18px;font-weight:700;line-height:1;cursor:pointer;padding:2px 4px}.po-delete-icon:hover{color:#b91c1c;transform:scale(1.08)}.po-post__reactions,.po-comment__reactions{display:flex;align-items:center;gap:10px;margin-top:10px}.po-like-button{background:#f3f4f6;border:1px solid #d1d5db;border-radius:999px;padding:6px 12px;font-size:13px;cursor:pointer;color:#111827}.po-like-button:hover{background:#e5e7eb}.po-like-button--small{padding:5px 10px;font-size:12px}.po-like-button--active{background:#dbeafe;color:#1d4ed8;border-color:#93c5fd}.po-like-count{font-size:13px;color:#64748b}.po-comments{margin-top:14px;border-top:1px solid #e5e7eb;padding-top:10px}.po-comments__list{display:flex;flex-direction:column;gap:10px;margin-bottom:10px}.po-comment{background:#f8fafc;border-radius:12px;padding:10px}.po-comment__meta{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:4px}.po-comment__author{font-size:13px;font-weight:600;color:#2563eb;line-height:1.2}.po-comment__date{font-size:11px;color:#9ca3af;line-height:1.2;margin-top:2px}.po-comment__content{font-size:14px;margin-top:4px;text-align:left;white-space:normal;word-break:break-word}.po-load-more-wrap{display:flex;justify-content:center;margin-top:10px}.po-load-more-button{background:#fff;border:1px solid #d1d5db;border-radius:12px;padding:10px 16px;cursor:pointer;font-size:14px;font-weight:600}.po-load-more-button:hover{background:#f3f4f6}.po-login-screen{display:flex;justify-content:center;align-items:center;min-height:70vh}.po-login-box{background:#fff;padding:40px;border-radius:16px;border:1px solid #e5e7eb;text-align:center;max-width:400px;width:100%}.po-login-box p{color:#6b7280}.po-notice{padding:12px;border-radius:10px;margin-bottom:15px;font-size:14px}.po-notice--success{background:#dcfce7;color:#166534;border:1px solid #bbf7d0}.po-notice--error{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}.po-simulacres-intro h2{margin:0 0 8px;color:#0f172a}.po-simulacres-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}.po-simulacre-card h3{margin-top:0;color:#2563eb}.po-simulacre-card__access{font-weight:700;color:#0f172a}@media (max-width:768px){.po-mobile-toggle{display:flex;align-items:center;justify-content:center}.po-mobile-overlay{display:block;position:fixed;inset:0;background:rgba(15,23,42,.45);opacity:0;pointer-events:none;transition:opacity .25s ease;z-index:1000}.po-sidebar{position:fixed;top:0;left:0;height:100vh;transform:translateX(-100%);box-shadow:8px 0 24px rgba(15,23,42,.18)}.po-app.po-menu-open .po-sidebar{transform:translateX(0)}.po-app.po-menu-open .po-mobile-overlay{opacity:1;pointer-events:auto}.po-main{padding:70px 16px 18px}.po-post__top,.po-comment__meta,.po-composer__footer,.po-comment-form__footer{flex-direction:column;align-items:flex-start}.po-post__content{font-size:18px}}

/* SIMULACRES EXAM */
.po-back-link {
    display: inline-block;
    margin-bottom: 14px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.po-back-link:hover {
    text-decoration: underline;
}

.po-simulacre-card__button,
.po-simulacre-start {
    display: inline-block;
    text-decoration: none;
    margin-top: 8px;
}

.po-simulacre-rules,
.po-result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.po-simulacre-rules div,
.po-result-summary div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px;
}

.po-simulacre-rules strong,
.po-result-summary strong {
    display: block;
    font-size: 22px;
    color: #0f172a;
}

.po-simulacre-rules span,
.po-result-summary span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #64748b;
}

.po-simulacre-exam-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.po-simulacre-exam-header h2 {
    margin: 0;
    font-size: 20px;
}

.po-exam-timer {
    background: #111827;
    color: #ffffff;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 800;
    min-width: 72px;
    text-align: center;
}

.po-exam-question__number {
    font-weight: 800;
    color: #2563eb;
    margin-bottom: 10px;
}

.po-exam-question__text {
    font-size: 18px;
    line-height: 1.5;
    color: #0f172a;
    margin-bottom: 14px;
}

.po-exam-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.po-exam-option {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    cursor: pointer;
}

.po-exam-option:hover {
    background: #eef6ff;
    border-color: #bfdbfe;
}

.po-exam-option input {
    margin-top: 3px;
}

.po-exam-option__letter {
    font-weight: 800;
    color: #2563eb;
    min-width: 18px;
}

.po-clear-answer {
    margin-top: 12px;
    background: transparent;
    border: none;
    color: #64748b;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.po-clear-answer:hover {
    color: #b91c1c;
}

.po-exam-submit-box {
    text-align: center;
}

.po-result-score {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 14px 0;
}

.po-result-score strong {
    font-size: 42px;
    color: #2563eb;
}

.po-result-score span {
    color: #64748b;
    font-weight: 700;
}

.po-topic-table {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

.po-topic-row {
    display: grid;
    grid-template-columns: 2fr 0.7fr 0.9fr 0.7fr 0.8fr;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.po-topic-row:last-child {
    border-bottom: none;
}

.po-topic-row--head {
    background: #f8fafc;
    font-weight: 800;
    color: #0f172a;
}

.po-review-question {
    border: 1px solid #e5e7eb;
    border-left-width: 5px;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    background: #ffffff;
}

.po-review-question--correct {
    border-left-color: #16a34a;
}

.po-review-question--wrong {
    border-left-color: #dc2626;
}

.po-review-question--blank {
    border-left-color: #94a3b8;
}

.po-review-question__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #0f172a;
}

.po-review-question__top span {
    color: #64748b;
    font-size: 13px;
}

.po-review-question__text {
    margin-top: 10px;
}

.po-review-explanation {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .po-simulacre-exam-header {
        position: static;
        flex-direction: column;
        align-items: flex-start;
    }

    .po-topic-row {
        grid-template-columns: 1fr;
    }

    .po-review-question__top {
        flex-direction: column;
    }
}


/* SIMULACRES RESULTATS AVANÇATS */
.po-result-raw-score {
    color: #64748b;
    font-size: 14px;
    margin-top: -6px;
}

.po-history-table {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

.po-history-row {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 0.6fr 0.8fr 0.7fr;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.po-result-history--compact .po-history-row {
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
}

.po-history-row:last-child {
    border-bottom: none;
}

.po-history-row--head {
    background: #f8fafc;
    font-weight: 800;
    color: #0f172a;
}

.po-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 16px;
}

.po-topic-filter-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

.po-topic-filter {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 9px 12px;
    background: #ffffff;
    min-width: 220px;
}

.po-review-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.po-review-option {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    gap: 10px;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
}

.po-review-option--correct {
    border-color: #86efac;
    background: #f0fdf4;
}

.po-review-option--selected:not(.po-review-option--correct) {
    border-color: #fecaca;
    background: #fef2f2;
}

.po-review-option__letter {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #111827;
}

.po-review-option--correct .po-review-option__letter {
    background: #16a34a;
    color: #ffffff;
}

.po-review-option--selected:not(.po-review-option--correct) .po-review-option__letter {
    background: #dc2626;
    color: #ffffff;
}

.po-review-option__text {
    color: #0f172a;
    line-height: 1.45;
}

.po-review-option__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.po-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 800;
}

.po-badge--selected {
    background: #dbeafe;
    color: #1d4ed8;
}

.po-badge--correct {
    background: #dcfce7;
    color: #166534;
}

.po-review-blank {
    color: #64748b;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .po-history-row,
    .po-result-history--compact .po-history-row,
    .po-review-option {
        grid-template-columns: 1fr;
    }

    .po-review-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .po-topic-filter {
        min-width: 100%;
        width: 100%;
    }

    .po-review-option__badges {
        justify-content: flex-start;
    }
}

/* FLASHCARDS */
.po-input {
    width: 100%;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    box-sizing: border-box;
    background: #ffffff;
}

.po-flashcards-form,
.po-flashcards-card-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.po-flashcards-card-form label {
    font-weight: 700;
    color: #111827;
    font-size: 14px;
}

.po-flashcards-decks,
.po-flashcards-cards-list,
.po-flashcards-study-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.po-flashcards-deck-card,
.po-flashcards-deck-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.po-flashcards-deck-card h3,
.po-flashcards-deck-header h2 {
    margin: 0 0 6px;
}

.po-flashcards-deck-card p,
.po-flashcards-deck-header p,
.po-flashcards-header p {
    margin: 0;
    color: #64748b;
}

.po-flashcards-deck-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.po-back-link {
    display: inline-block;
    margin-bottom: 10px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
}

.po-flashcard-card,
.po-flashcard-study-card {
    position: relative;
}

.po-flashcard-delete {
    position: absolute;
    top: 12px;
    right: 14px;
    margin: 0;
}

.po-flashcard-topic {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.po-flashcard-card h4 {
    margin: 10px 0 4px;
    color: #111827;
}

.po-flashcard-card p {
    margin: 0;
    color: #334155;
    white-space: normal;
    word-break: break-word;
}

.po-flashcard-front {
    font-size: 22px;
    line-height: 1.45;
    color: #0f172a;
    margin-bottom: 16px;
}

.po-flashcard-back {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #334155;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .po-flashcards-deck-card,
    .po-flashcards-deck-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .po-flashcards-deck-actions {
        flex-wrap: wrap;
    }
}

/* FLASHCARDS STUDY MODE */
.po-flash-study-mode {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: #f5f7fb;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.po-flash-study-topbar {
    height: 56px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.po-flash-study-exit {
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
    justify-self: start;
}

.po-flash-study-title {
    font-weight: 800;
    color: #111827;
    text-align: center;
}

.po-flash-study-progress {
    justify-self: end;
    color: #64748b;
    font-weight: 700;
    font-size: 14px;
}

.po-flash-study-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 22px 18px 32px;
    overflow-y: auto;
}

.po-flash-study-card {
    width: min(100%, 980px);
    min-height: 360px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}

.po-flash-study-topic {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 20px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.po-flash-study-face {
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.35;
    color: #0f172a;
    font-weight: 600;
    text-align: center;
    word-break: break-word;
}

.po-flash-study-answer {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.4;
    color: #334155;
    text-align: center;
    word-break: break-word;
}

.po-flash-study-actions {
    width: min(100%, 980px);
    display: flex;
    justify-content: center;
    margin-top: 22px;
}

.po-flash-show-answer {
    min-width: 190px;
}

.po-flash-difficulty-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.po-flash-difficulty {
    border: none;
    border-radius: 14px;
    padding: 13px 20px;
    font-weight: 800;
    cursor: pointer;
    color: #ffffff;
}

.po-flash-difficulty--hard { background: #dc2626; }
.po-flash-difficulty--normal { background: #2563eb; }
.po-flash-difficulty--easy { background: #16a34a; }

.po-flash-difficulty:hover {
    filter: brightness(0.95);
}

.po-flash-difficulty:disabled {
    opacity: 0.6;
    cursor: wait;
}

.po-flash-study-finish {
    width: min(100%, 680px);
    margin-top: 40px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.po-flash-study-finish h2 {
    margin-top: 0;
}

.po-flash-study-empty {
    margin: 40px auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
    text-align: center;
}

@media (max-width: 768px) {
    .po-flash-study-topbar {
        grid-template-columns: 1fr;
        height: auto;
        padding: 12px 16px;
        text-align: left;
    }

    .po-flash-study-title,
    .po-flash-study-progress,
    .po-flash-study-exit {
        justify-self: start;
        text-align: left;
    }

    .po-flash-study-stage {
        padding: 16px 12px 24px;
    }

    .po-flash-study-card {
        min-height: 300px;
        padding: 24px 18px;
        border-radius: 20px;
    }

    .po-flash-difficulty-actions {
        width: 100%;
    }

    .po-flash-difficulty {
        flex: 1;
        min-width: 96px;
    }
}

/* FLASHCARDS STUDY FIX: contained inside main area, not browser fullscreen */
.po-flash-study-mode {
    position: relative !important;
    inset: auto !important;
    z-index: auto !important;
    width: 100%;
    min-height: calc(100vh - 56px);
    background: #f5f7fb;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.po-flash-study-topbar {
    height: auto !important;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 0 !important;
    background: transparent !important;
    border-bottom: none !important;
}

.po-flash-study-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    justify-content: flex-start;
    padding: 0 !important;
    overflow: visible !important;
}

.po-flash-study-card {
    width: 100% !important;
    min-height: min(62vh, 560px);
    padding: 42px 36px;
}

.po-flash-study-actions {
    width: 100% !important;
}

.po-flash-study-finish {
    margin: 40px auto 0;
}

@media (max-width: 768px) {
    .po-flash-study-mode {
        min-height: calc(100vh - 88px);
    }

    .po-flash-study-topbar {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .po-flash-study-card {
        min-height: 360px;
        padding: 28px 18px;
    }
}

/* FLASHCARDS STUDY FIXES */
.po-flash-difficulty-actions[hidden],
.po-flash-study-answer[hidden],
.po-flash-study-finish[hidden],
.po-flash-study-actions[hidden] {
    display: none !important;
}

.po-flash-difficulty-actions {
    display: none;
}

.po-flash-study-end-card {
    width: 100%;
    text-align: center;
}

.po-flash-study-end-card h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    color: #0f172a;
}

.po-flash-study-end-card p {
    margin: 8px 0;
    font-size: clamp(18px, 2.4vw, 26px);
    color: #334155;
}

/* FLASHCARDS STATS */
.po-flash-stats-card {
    margin-bottom: 18px;
}

.po-flash-stats-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.po-flash-stats-head h3 {
    margin: 0 0 4px;
    font-size: 18px;
    color: #0f172a;
}

.po-flash-stats-head p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.po-flash-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.po-flash-stat-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
}

.po-flash-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.po-flash-stat-top span {
    font-size: 13px;
    color: #475569;
    font-weight: 700;
}

.po-flash-stat-top strong {
    font-size: 20px;
    color: #0f172a;
}

.po-flash-stat-track {
    height: 9px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.po-flash-stats-bar {
    height: 100%;
    min-width: 0;
    border-radius: 999px;
}

.po-flash-stats-bar--unseen { background: #94a3b8; }
.po-flash-stats-bar--hard { background: #dc2626; }
.po-flash-stats-bar--normal { background: #2563eb; }
.po-flash-stats-bar--easy { background: #16a34a; }

.po-flash-stat-percent {
    margin-top: 7px;
    font-size: 12px;
    color: #94a3b8;
    text-align: right;
}

@media (max-width: 768px) {
    .po-flash-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Flashcards fase 6: estudi ràpid i mòbil */
.po-flash-difficulty-actions[hidden] {
    display: none !important;
}

.po-flash-difficulty-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.po-flash-study-end-card {
    width: 100%;
    text-align: center;
}

.po-flash-study-end-card h2 {
    margin: 0 0 12px;
}

.po-flash-continue {
    margin-top: 18px;
}

@media (max-width: 768px) {
    .po-flash-study-card {
        min-height: 55vh;
        padding: 28px 18px;
        touch-action: pan-y;
    }

    .po-flash-difficulty-actions {
        width: 100%;
        gap: 10px;
    }

    .po-flash-difficulty {
        flex: 1 1 30%;
        min-height: 48px;
        font-size: 14px;
    }

    .po-flash-show-answer,
    .po-flash-continue {
        width: 100%;
        min-height: 48px;
    }
}

/* Flashcards ajustes móviles y eliminación de swipe */
.po-flashcards-deck-card {
    position: relative;
    padding-right: 56px;
}

.po-flashcards-deck-main {
    min-width: 0;
}

.po-flashcards-deck-delete {
    position: absolute;
    top: 16px;
    right: 16px;
    margin: 0;
}

.po-flashcards-deck-actions {
    padding-right: 8px;
}

@media (max-width: 768px) {
    .po-flash-study-mode {
        display: flex;
        flex-direction: column;
    }

    .po-flash-study-stage {
        order: 1;
        padding-top: 0 !important;
    }

    .po-flash-study-topbar {
        order: 2;
        margin-top: 14px;
        margin-bottom: 0;
    }

    .po-flash-study-card {
        min-height: 58vh;
        touch-action: auto;
    }

    .po-flashcards-deck-card {
        padding-right: 50px;
    }

    .po-flashcards-deck-actions {
        padding-right: 0;
    }

    .po-flashcards-deck-delete {
        top: 14px;
        right: 14px;
    }
}

/* Layout fase 8: menys espai superior mòbil i sidebar desktop fixa */
@media (min-width: 769px) {
    .po-app {
        min-height: 100vh;
        height: 100vh;
        overflow: hidden;
    }

    .po-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        flex-shrink: 0;
    }

    .po-main {
        height: 100vh;
        overflow-y: auto;
        padding-top: 20px;
    }
}

@media (max-width: 768px) {
    .po-mobile-toggle {
        top: 8px;
        left: 10px;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 20px;
    }

    .po-main {
        padding-top: 52px;
    }

    .po-card:first-child,
    .po-notice:first-child,
    .po-simulacres-intro:first-child,
    .po-flashcards-page > *:first-child,
    .po-flash-study-mode > *:first-child {
        margin-top: 0;
    }

    .po-composer {
        margin-top: 0;
    }
}

/* TESTS MODULE */
.po-tests { display: flex; flex-direction: column; gap: 16px; }
.po-tests-scorebar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.po-tests-scorebar > div { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 14px; }
.po-tests-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.po-tests-controls label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #64748b; }
.po-tests-controls select,
.po-input { width: 100%; border: 1px solid #d8dee8; border-radius: 12px; padding: 10px 12px; box-sizing: border-box; background: #fff; }
.po-tests-question { margin-top: 18px; }
.po-tests-question__title { font-size: 22px; font-weight: 650; color: #0f172a; margin-bottom: 16px; line-height: 1.4; }
.po-tests-options { display: flex; flex-direction: column; gap: 10px; }
.po-tests-option { display: block; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px 14px; background: #fff; cursor: pointer; }
.po-tests-option:hover { background: #f8fafc; }
.po-tests-option--correct { border-color: #86efac; background: #dcfce7; }
.po-tests-option--wrong { border-color: #fecaca; background: #fee2e2; }
.po-tests-actions { display: flex; gap: 10px; margin-top: 14px; }
.po-tests-feedback { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #f8fafc; border: 1px solid #e5e7eb; }
.po-tests-explanation { margin-top: 8px; color: #475569; }
.po-tests-editor form { display: flex; flex-direction: column; gap: 10px; }
.po-tests-editor label { font-size: 13px; font-weight: 700; color: #334155; }
.po-tests-question-list { display: flex; flex-direction: column; gap: 10px; }
.po-tests-question-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border: 1px solid #e5e7eb; border-radius: 14px; background: #f8fafc; }
.po-tests-question-row span { display: block; margin-top: 4px; font-size: 12px; color: #64748b; }
.po-tests-row-actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 768px) {
    .po-tests-controls, .po-tests-actions, .po-tests-question-row { flex-direction: column; align-items: stretch; }
    .po-tests-question__title { font-size: 18px; }
}

/* TESTS FASE 2 UX */
.po-tests-practice {
    text-align: center;
}

.po-tests-scorebar {
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
}

.po-tests-scorebar > div {
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.po-tests-scorebar strong {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.po-tests-scorebar span {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.po-tests-controls {
    justify-content: center;
    align-items: flex-end;
    margin-top: 6px;
}

.po-tests-controls[hidden] {
    display: none !important;
}

.po-tests-controls label {
    text-align: left;
}

.po-tests-question {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.po-tests-question__title {
    margin-top: 4px;
    margin-bottom: 18px;
    text-align: center;
}

.po-tests-options {
    align-items: stretch;
    max-width: 760px;
    margin: 0 auto;
}

.po-tests-option {
    width: 100%;
    text-align: left;
    font-size: 16px;
    line-height: 1.45;
}

.po-tests-option:disabled {
    cursor: default;
    opacity: 1;
}

.po-tests-feedback {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

#po-tests-next {
    margin-top: 14px;
}

.po-tests-list-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 10px;
    margin-bottom: 14px;
}

.po-tests-editor-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.po-tests-editor-options__title {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.po-tests-editor-option {
    display: grid !important;
    grid-template-columns: auto 32px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.po-tests-editor-option input[type="radio"] {
    width: 18px;
    height: 18px;
}

.po-tests-editor-option__letter {
    font-weight: 700;
    color: #2563eb;
}

@media (max-width: 768px) {
    .po-tests-list-tools {
        grid-template-columns: 1fr;
    }

    .po-tests-scorebar > div {
        min-width: 88px;
        padding: 8px 10px;
    }

    .po-tests-scorebar span {
        font-size: 17px;
    }

    .po-tests-question__title {
        font-size: 18px;
    }
}

/* TESTS MODULE - FIXES I SUBAPARTATS */
.po-tests,
.po-tests * {
    color: #0f172a;
}

.po-tests-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2px;
}

.po-tests-tab {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #0f172a;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
}

.po-tests-tab:hover {
    background: #f3f4f6;
}

.po-tests-tab--active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.po-tests-panel {
    display: none;
}

.po-tests-panel--active {
    display: block;
}

.po-tests-created-count {
    width: 100%;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4px;
}

.po-tests-topic-picker {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
    min-width: min(100%, 420px);
    background: #f8fafc;
    text-align: left;
}

.po-tests-topic-picker legend {
    padding: 0 6px;
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}

.po-tests-topic-option {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    color: #0f172a !important;
    cursor: pointer;
}

.po-tests-topic-option:hover {
    background: #eef2ff;
}

.po-tests-topic-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.po-tests-topic-option span {
    color: #0f172a !important;
    font-weight: 700;
}

.po-tests-topic-option strong {
    min-width: 34px;
    text-align: center;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 3px 8px;
    color: #2563eb;
}

.po-tests-empty {
    width: 100%;
    margin: 0 0 8px;
    font-weight: 700;
}

.po-tests-option,
.po-tests-option strong,
.po-tests-option span,
.po-tests-feedback,
.po-tests-explanation,
.po-tests-question__title,
.po-tests-question-row strong,
.po-tests-editor label,
.po-tests-editor-options__title {
    color: #0f172a !important;
}

.po-tests-tab--active,
.po-tests-tab--active * {
    color: #ffffff !important;
}

@media (max-width: 768px) {
    .po-tests-tabs {
        display: grid;
        grid-template-columns: 1fr;
    }

    .po-tests-topic-picker {
        min-width: 0;
        width: 100%;
    }
}

/* TESTS - SUBAPARTATS A LA BARRA LATERAL I DESPLEGABLE DE TEMES */
.po-sidebar-subnav {
    margin: 6px 0 8px 12px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,.14);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.po-sidebar-subnav__link {
    display: block;
    padding: 8px 10px;
    border-radius: 9px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.po-sidebar-subnav__link:hover,
.po-sidebar-subnav__link--active {
    background: #1f2937;
    color: #ffffff;
}

.po-tests-topic-dropdown {
    position: relative;
    min-width: min(100%, 420px);
    text-align: left;
}

.po-tests-topic-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1px solid #d8dee8;
    background: #ffffff;
    border-radius: 14px;
    padding: 11px 14px;
    cursor: pointer;
    font-weight: 800;
    color: #0f172a !important;
}

.po-tests-topic-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 310px;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 8px;
    background: #ffffff;
    box-shadow: 0 16px 35px rgba(15,23,42,.16);
}

.po-tests-topic-menu[hidden] {
    display: none !important;
}

.po-tests-topic-menu .po-tests-topic-option {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .po-tests-topic-dropdown {
        min-width: 0;
        width: 100%;
    }
}
.po-comments-toggle,.po-comments-more{background:#fff;border:1px solid #d1d5db;border-radius:999px;padding:7px 12px;cursor:pointer;font-size:13px;font-weight:600;color:#111827}.po-comments-toggle:hover,.po-comments-more:hover{background:#f3f4f6}.po-comments__panel{margin-top:10px}.po-comments-more{align-self:flex-start;margin:2px 0 10px}.po-comments__panel[hidden],[data-comment-item][hidden]{display:none!important}

.po-input{width:100%;border:1px solid #d8dee8;border-radius:14px;padding:12px 14px;font-size:14px;box-sizing:border-box;background:#fff;font-family:inherit}.po-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 3px rgba(96,165,250,.15)}.po-nickname-form{display:flex;flex-direction:column;gap:12px;margin-top:18px}.po-nickname-help{font-size:12px;color:#64748b;margin-top:12px}.po-nickname-box .po-notice{text-align:left;margin-top:12px;margin-bottom:0}

.po-flash-session-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.po-flash-session-card p {
    margin: 6px 0 0;
    color: #64748b;
}

.po-flash-session-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.po-flash-session-form label {
    font-weight: 700;
    color: #334155;
}

.po-flash-difficulty--again {
    border-color: #dc2626;
    color: #991b1b;
    background: #fee2e2;
}
.po-muted{color:#64748b;margin-top:0}.po-contacta h2{margin-top:0;color:#0f172a}.po-contacta-form{display:flex;flex-direction:column;gap:14px}.po-field{display:flex;flex-direction:column;gap:6px;font-weight:600;color:#0f172a}.po-field span{font-size:14px}.po-input{width:100%;border:1px solid #d8dee8;border-radius:14px;padding:11px 12px;font-size:14px;box-sizing:border-box;background:#fff;font-family:inherit}.po-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 3px rgba(96,165,250,.15)}.po-contacta-form__footer{display:flex;justify-content:flex-end}
.po-public-shortcode-only{width:100%;display:flex;justify-content:center;align-items:flex-start;text-align:center}.po-public-shortcode-only>*{max-width:980px;width:100%;margin-left:auto;margin-right:auto}

.po-checkbox-line {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
    margin: 8px 0;
}

.po-checkbox-line input[type="checkbox"] {
    margin-top: 2px;
    flex: 0 0 auto;
}

.po-checkbox-line a {
    color: inherit;
    text-decoration: underline;
}

/* PUBLICITAT LATERAL + MENÚ COL·LAPSABLE */
.po-sidebar-collapse {
    position: fixed;
    left: 248px;
    top: 22px;
    z-index: 1010;
    width: 32px;
    height: 40px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 0 12px 12px 0;
    background: #111827;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15,23,42,.16);
    transition: left .25s ease, background .2s ease;
}

.po-sidebar-collapse:hover {
    background: #1f2937;
}

.po-app.po-sidebar-collapsed .po-sidebar {
    margin-left: -260px;
}

.po-app.po-sidebar-collapsed .po-sidebar-collapse {
    left: 0;
}

.po-ads-sidebar {
    width: 260px;
    min-width: 260px;
    padding: 28px 20px 28px 0;
    box-sizing: border-box;
}

.po-ads-slider {
    position: sticky;
    top: 24px;
    width: 100%;
    min-height: 260px;
}

.po-ad-slide {
    display: none;
    width: 100%;
}

.po-ad-slide--active {
    display: block;
}

.po-ad-slide a,
.po-ad-slide img {
    display: block;
    width: 100%;
}

.po-ad-slide img {
    height: auto;
    border-radius: 18px;
    border: 1px solid #e6eaf0;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(15,23,42,.06);
}

@media (max-width: 1200px) {
    .po-ads-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .po-sidebar-collapse {
        display: none;
    }

    .po-app.po-sidebar-collapsed .po-sidebar {
        margin-left: 0;
    }
}


/* PUBLICITAT RESPONSIVE: desktop/tauleta + mòbil */
.po-ads-mobile {
    display: none;
}

.po-ads-mobile .po-ads-slider {
    position: static;
    min-height: 0;
}

@media (max-width: 1200px) and (min-width: 769px) {
    .po-ads-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .po-app {
        flex-direction: column;
        min-height: 100vh;
    }

    .po-ads-sidebar {
        display: none !important;
    }

    .po-ads-mobile {
        display: block;
        padding: 0 16px 22px;
        box-sizing: border-box;
        width: 100%;
    }

    .po-ads-mobile .po-ads-slider {
        width: 100%;
        max-width: 680px;
        margin: 0 auto;
    }

    .po-ads-mobile .po-ad-slide img {
        width: 100%;
        height: auto;
        border-radius: 16px;
    }
}


/* AJUSTOS PUBLICITAT: opció desktop estreta + mòbil fix */
@media (max-width: 1200px) and (min-width: 769px) {
    .po-app.po-ads-keep-desktop .po-ads-sidebar {
        display: block;
        width: 220px;
        min-width: 220px;
        padding-right: 12px;
    }
}

@media (max-width: 768px) {
    .po-app.po-has-mobile-ads .po-main {
        padding-bottom: 150px;
    }

    .po-ads-mobile {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 950;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
        background: rgba(245,247,251,.96);
        box-shadow: 0 -8px 22px rgba(15,23,42,.12);
    }

    .po-app.po-menu-open .po-ads-mobile {
        display: none !important;
    }

    .po-ads-mobile .po-ads-slider {
        max-width: 520px;
        min-height: 0;
    }

    .po-ads-mobile .po-ad-slide img {
        max-height: 110px;
        object-fit: contain;
    }
}

/* PLATAFORMA: amagar header del tema només dins les pàgines del plugin */
body.plataforma-oposicions header,
body.plataforma-oposicions #header,
body.plataforma-oposicions .site-header,
body.plataforma-oposicions .main-header,
body.plataforma-oposicions .wp-site-blocks > header,
body.plataforma-oposicions .elementor-location-header {
    display: none !important;
}

body.plataforma-oposicions .site-content,
body.plataforma-oposicions #content,
body.plataforma-oposicions .content-area,
body.plataforma-oposicions .wp-site-blocks {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* PLATAFORMA: fletxa de la barra lateral centrada verticalment */
.po-sidebar-collapse {
    top: 50% !important;
    transform: translateY(-50%);
    height: 44px;
    width: 36px;
}

/* Public SEO blocks shown above the private module content. */
.po-seo-content {
    margin-bottom: 18px;
}

.po-seo-content h1 {
    margin: 0 0 10px;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.15;
}

.po-seo-content p {
    margin: 0 0 12px;
    max-width: 780px;
}

.po-seo-list {
    margin: 12px 0 0 18px;
    padding: 0;
}

.po-seo-list li {
    margin: 6px 0;
}

.po-login-cta {
    margin-top: 18px;
}

.po-login-cta h2 {
    margin-top: 0;
}
