/*
 * Drama Arts — Subject-specific styles
 * Loaded BEFORE shared/css/subject-base.css
 */

/* ---- Subject colours ---- */
:root {
    --primary: #e63946;
    --primary-light: #fde8ed;
}

/* ---- Topic tags — arts discipline colors ---- */
.topic-tag.elem { background: #fce4ec; color: #c62828; }
.topic-tag.princ { background: #f3e5f5; color: #6a1b9a; }
.topic-tag.crit { background: #e8eaf6; color: #283593; }
.topic-tag.arthist { background: #fff3e0; color: #e65100; }
.topic-tag.mtheo { background: #e0f2f1; color: #00695c; }
.topic-tag.rhythm { background: #fff8e1; color: #f57f17; }
.topic-tag.listen { background: #e1f5fe; color: #0277bd; }
.topic-tag.act { background: #fbe9e7; color: #bf360c; }
.topic-tag.stage { background: #efebe9; color: #5d4037; }
.topic-tag.drama { background: #f1f8e9; color: #33691e; }
.topic-tag.desproc { background: #e8f5e9; color: #2e7d32; }
.topic-tag.viscom { background: #ede7f6; color: #4527a0; }
.topic-tag.paper { background: linear-gradient(135deg, #5b21b6, #7c3aed); color: #fff; }

/* ---- Text input (not in base) ---- */
.text-input {
    width: 100%; padding: 12px 16px;
    border: 2px solid var(--border); border-radius: 10px;
    font-size: 1rem; font-family: inherit;
    transition: border-color 0.2s; background: var(--card); color: var(--text);
}
.text-input:focus { outline: none; border-color: var(--primary); }

/* ---- Source extract ---- */
.source-extract {
    background: var(--primary-light); border-left: 4px solid var(--primary);
    padding: 16px 20px; margin: 16px 0; font-style: italic;
    font-size: 0.95rem; line-height: 1.6; border-radius: 0 8px 8px 0;
}
.source-extract .source-attribution {
    display: block; font-style: normal; font-size: 0.8rem;
    color: var(--text-light); margin-top: 8px;
}

/* ---- Coming Soon card ---- */
.coming-soon-card {
    opacity: 0.5; pointer-events: none; position: relative;
}
.coming-soon-card::after {
    content: 'Coming Soon'; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); background: var(--text); color: white;
    padding: 6px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 700;
}

/* ---- Marks badge ---- */
.marks-badge { display: inline-block; padding: 4px 12px; border-radius: 16px; font-size: 0.75rem; font-weight: 700; background: #ede7f6; color: #4527a0; }

/* ---- Dark Mode (subject-specific overrides) ---- */
body.dark-mode {
    --primary-light: rgba(124,58,237,0.15);
}
body.dark-mode .lb-table th { background: rgba(124,58,237,0.15); }
body.dark-mode .text-input { background: #1a1a2e; border-color: #444; color: var(--text); }
body.dark-mode .source-extract { background: rgba(124,58,237,0.1); }
body.dark-mode .marks-badge { background: rgba(69,39,160,0.2); color: #b39ddb; }

/* ---- TTS Reader Bar ---- */
.tts-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; padding: 8px 12px; background: var(--bg-subtle, #f5f6fa); border-radius: 10px; border: 1px solid var(--border); }
.tts-btn { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--primary); color: #fff; font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.15s, opacity 0.2s; flex-shrink: 0; }
.tts-btn:hover { transform: scale(1.1); }
.tts-btn:active { transform: scale(0.95); }
.tts-speed { background: var(--primary-light, #eef0ff); color: var(--primary); font-weight: 700; font-size: 0.7rem; width: auto; padding: 0 10px; border-radius: 8px; }
.tts-voice-select { border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; font-size: 0.75rem; background: var(--card); color: var(--text); max-width: 140px; cursor: pointer; }
.tts-label { font-size: 0.78rem; color: var(--text-light); margin-left: 4px; }
body.dark-mode .tts-bar { background: rgba(255,255,255,0.06); }
.tts-word { cursor: default; border-radius: 3px; transition: background 0.2s, color 0.2s; }
.tts-word-ready { background: var(--primary-light, #eef0ff); color: var(--primary); cursor: pointer; }
body.dark-mode .tts-word-ready { background: rgba(67,97,238,0.2); }

/* ---- Loading screen (subject gradient & animations) ---- */
.loading-screen {
    background: linear-gradient(135deg, #0f0520 0%, #1a0a3e 40%, #2d1065 70%, #1a0a3e 100%);
}
.loading-arc {
    animation: arc-draw 2s ease-in-out infinite;
    transform-origin: center;
}
@keyframes arc-draw {
    0% { stroke-dashoffset: 264; }
    50% { stroke-dashoffset: 66; }
    100% { stroke-dashoffset: 264; }
}
.loading-orbit { animation: orbit-pulse 3s ease-in-out infinite; }
.loading-orbit:nth-child(4) { animation-delay: 0.5s; }
.loading-orbit:nth-child(5) { animation-delay: 1s; }
@keyframes orbit-pulse {
    0%,100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}
.loading-electron {
    animation: electron-orbit 2s linear infinite;
    transform-origin: 50px 50px;
}
@keyframes electron-orbit { to { transform: rotate(360deg); } }
.loading-bar {
    background: linear-gradient(90deg, #7c3aed, #5b21b6, #a78bfa);
}

/* ---- Paper Generator (subject-specific colors) ---- */
.pg-nav-btn.answered { background: #ede7f6; border-color: #7c4dff; }
.pg-context-box {
    background: #f3e8ff; border-left: 4px solid #7c3aed;
    padding: 18px 20px; border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 16px; font-size: 0.92rem; line-height: 1.6;
}
.pg-context-title { font-weight: 700; font-size: 1rem; margin-bottom: 8px; color: #5b21b6; }
.pg-topic-label {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    background: #7c3aed; color: #fff; font-size: 0.7rem; font-weight: 700;
    margin-right: 8px; vertical-align: middle;
}
.pg-grade-circle {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    width: 100px; height: 100px; border-radius: 50%;
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    box-shadow: 0 4px 20px rgba(124,58,237,0.3); margin-bottom: 16px;
}
.pg-q-topic { display: inline-block; padding: 2px 8px; border-radius: 10px; background: #7c3aed; color: #fff; font-size: 0.68rem; font-weight: 700; }
.pg-working-marked { border: 2px solid rgba(124,58,237,0.25); border-radius: 10px; padding: 12px; background: rgba(124,58,237,0.03); }
.pg-reading-banner {
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    box-shadow: 0 4px 15px rgba(124,58,237,0.3);
}

/* Dark mode paper gen (subject-specific) */
body.dark-mode .pg-context-box { background: rgba(124,58,237,0.1); border-left-color: #7c3aed; }
body.dark-mode .pg-context-title { color: #a78bfa; }
body.dark-mode .pg-nav-btn.active { background: rgba(124,58,237,0.15); }
body.dark-mode .pg-working-marked { border-color: rgba(124,58,237,0.3); background: rgba(124,58,237,0.05); }
body.dark-mode .pg-working-feedback { border-top-color: #444; }

/* ════════════════════════════════════════════════════════
   PORTFOLIO — ePortfolio styles
   ════════════════════════════════════════════════════════ */

/* Sub-navigation */
.pf-nav { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.pf-nav-btn {
    padding: 8px 18px; border: 2px solid var(--primary-light);
    border-radius: 24px; background: var(--card); color: var(--text);
    font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.pf-nav-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pf-nav-btn:hover:not(.active) { border-color: var(--primary); }

/* Dashboard */
.pf-stats-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; justify-content: center; }
.pf-stat-card { background: var(--card); border-radius: 12px; padding: 14px 18px; text-align: center; min-width: 100px; box-shadow: var(--shadow); flex: 1; }
.pf-stat-val { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.pf-stat-lbl { font-size: 0.72rem; color: var(--text-light); text-transform: uppercase; margin-top: 2px; }
.pf-quick-actions { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.pf-section-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; margin-bottom: 16px; }
.pf-section-card h3 { color: var(--primary); font-size: 1rem; margin-bottom: 12px; }
.pf-empty { text-align: center; padding: 24px; color: var(--text-light); font-size: 0.88rem; }
.pf-practice-bars { display: flex; flex-direction: column; gap: 10px; }
.pf-pbar { display: flex; align-items: center; gap: 10px; }
.pf-pbar-label { font-size: 0.82rem; font-weight: 500; min-width: 80px; }
.pf-pbar-track { flex: 1; height: 10px; background: #e9ecef; border-radius: 5px; overflow: hidden; }
.pf-pbar-fill { height: 100%; border-radius: 5px; transition: width 0.5s; }
.pf-pbar-val { font-size: 0.82rem; font-weight: 600; min-width: 60px; text-align: right; }
.pf-recent-list { display: flex; flex-direction: column; gap: 8px; }
.pf-recent-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background 0.15s; }
.pf-recent-item:hover { background: var(--primary-light); }
.pf-type-dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1rem; flex-shrink: 0; }
.pf-recent-info { flex: 1; min-width: 0; }
.pf-recent-title { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-recent-meta { font-size: 0.78rem; color: var(--text-light); }

/* Gallery */
.pf-gallery-toolbar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.pf-filter-select { padding: 6px 10px; border-radius: 8px; border: 1px solid #ccc; font-size: 0.82rem; background: var(--card); color: var(--text); }
.pf-filter-search { padding: 6px 10px; border-radius: 8px; border: 1px solid #ccc; font-size: 0.82rem; flex: 1; min-width: 120px; background: var(--card); color: var(--text); }
.pf-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.pf-entry-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: all 0.2s; border: 2px solid transparent; }
.pf-entry-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.pf-card-thumb { height: 120px; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }
.pf-card-thumb-icon { background-size: auto !important; }
.pf-card-body { padding: 12px 14px; }
.pf-type-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; color: #fff; font-size: 0.7rem; font-weight: 700; margin-bottom: 6px; }
.pf-card-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-card-date { font-size: 0.78rem; color: var(--text-light); }
.pf-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pf-tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.68rem; font-weight: 600; background: var(--primary-light); color: var(--primary); }
.pf-card-phases { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pf-phase-chip { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.65rem; font-weight: 700; background: #e0f2f1; color: #00695c; }
.pf-empty-gallery { text-align: center; padding: 48px 20px; color: var(--text-light); }

/* Detail view */
.pf-detail-header { margin-bottom: 16px; }
.pf-detail-header h2 { font-size: 1.3rem; margin: 8px 0 4px; color: var(--text); }
.pf-detail-meta { display: flex; gap: 12px; font-size: 0.82rem; color: var(--text-light); flex-wrap: wrap; }
.pf-detail-tags, .pf-detail-phases { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.pf-detail-img { max-width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; margin-bottom: 16px; }
.pf-detail-section { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; margin-bottom: 14px; }
.pf-detail-section h3 { color: var(--primary); font-size: 0.95rem; margin-bottom: 10px; }
.pf-detail-section p { font-size: 0.9rem; line-height: 1.6; }
.pf-detail-actions { display: flex; gap: 12px; justify-content: center; margin: 20px 0; }
.pf-criteria-box { background: var(--primary-light); padding: 12px 16px; border-radius: 8px; margin: 8px 0; }
.pf-criteria-box h4 { color: var(--primary); font-size: 0.85rem; margin: 0 0 4px; }
.pf-criteria-box p { font-size: 0.85rem; margin: 0; line-height: 1.4; }
.pf-field-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.pf-field { display: flex; gap: 8px; font-size: 0.88rem; }
.pf-field-label { font-weight: 600; color: var(--text-light); min-width: 110px; }
.pf-field-val { flex: 1; }

/* Self-assessment */
.pf-assess-grid { display: flex; flex-direction: column; gap: 14px; }
.pf-assess-item { }
.pf-assess-label { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.pf-assess-bar-wrap { height: 12px; background: #e9ecef; border-radius: 6px; overflow: hidden; margin-bottom: 2px; }
.pf-assess-bar { height: 100%; border-radius: 6px; transition: width 0.5s; }
.pf-assess-score { font-size: 0.8rem; font-weight: 700; }
.pf-assess-input { margin-bottom: 16px; }
.pf-range-row { display: flex; align-items: center; gap: 12px; }
.pf-range-row input[type=range] { flex: 1; accent-color: var(--primary); }
.pf-range-val { font-size: 1.1rem; font-weight: 800; color: var(--primary); min-width: 24px; text-align: center; }
.pf-band-desc { font-size: 0.8rem; color: var(--text-light); font-weight: 600; margin-top: 2px; }
.pf-band-descriptors { font-size: 0.75rem; color: var(--text-light); margin-top: 6px; padding: 8px 12px; background: rgba(128,128,128,0.05); border-radius: 8px; }
.pf-band-item { padding: 2px 0; }

/* DeBono Thinking Hats */
.pf-debono-section, .pf-debono-input { border-left: 4px solid; padding: 10px 14px; margin: 8px 0; border-radius: 0 8px 8px 0; background: rgba(128,128,128,0.03); }
.pf-debono-section summary, .pf-debono-input summary { font-weight: 700; font-size: 0.88rem; cursor: pointer; }
.pf-debono-section p, .pf-debono-input p { font-size: 0.88rem; line-height: 1.5; margin-top: 6px; }
.pf-debono-prompt { font-size: 0.78rem !important; color: var(--text-light); font-style: italic; }

/* Feedback */
.pf-feedback-item { background: rgba(128,128,128,0.05); padding: 12px 16px; border-radius: 10px; margin: 8px 0; }
.pf-fb-header { font-size: 0.85rem; margin-bottom: 4px; }
.pf-fb-role { color: var(--primary); font-size: 0.75rem; font-weight: 600; }
.pf-fb-date { color: var(--text-light); font-size: 0.75rem; }
.pf-fb-comment { font-size: 0.88rem; line-height: 1.5; }
.pf-fb-response { font-size: 0.85rem; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(128,128,128,0.15); color: var(--text-light); }
.pf-fb-add { margin-top: 12px; }

/* Process Journal */
.pf-journal-timeline { display: flex; flex-direction: column; gap: 6px; }
.pf-journal-item { display: flex; gap: 8px; align-items: baseline; font-size: 0.85rem; padding: 4px 0; border-bottom: 1px solid rgba(128,128,128,0.1); }
.pf-journal-date { color: var(--text-light); min-width: 70px; font-size: 0.78rem; }
.pf-journal-type { display: inline-block; padding: 1px 8px; border-radius: 8px; font-size: 0.68rem; font-weight: 700; background: var(--primary-light); color: var(--primary); }
.pf-journal-note { flex: 1; }
.pf-journal-add { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin-top: 10px; }
.pf-journal-add input { flex: 1; min-width: 140px; }
.pf-journal-add select { font-size: 0.82rem; padding: 6px 8px; border-radius: 8px; border: 1px solid #ccc; }

/* Form */
.pf-entry-form label { display: block; font-size: 0.82rem; font-weight: 600; margin: 12px 0 4px; color: var(--text-light); }
.pf-entry-form input[type=text], .pf-entry-form input[type=date], .pf-entry-form input[type=number],
.pf-entry-form select, .pf-entry-form textarea {
    width: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: 10px;
    font-size: 0.9rem; font-family: inherit; background: var(--card); color: var(--text);
    transition: border-color 0.2s;
}
.pf-entry-form input:focus, .pf-entry-form select:focus, .pf-entry-form textarea:focus { outline: none; border-color: var(--primary); }
.pf-entry-form textarea { min-height: 70px; resize: vertical; }
.pf-form-row { display: flex; gap: 12px; }
.pf-form-col { flex: 1; min-width: 0; }
.pf-form-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }
.pf-form-section { margin: 16px 0; border: 1px solid rgba(128,128,128,0.15); border-radius: 10px; padding: 14px 18px; }
.pf-form-section summary { font-weight: 700; font-size: 0.9rem; color: var(--primary); cursor: pointer; }
.pf-type-section h4 { color: var(--primary); font-size: 0.95rem; margin: 14px 0 8px; border-bottom: 2px solid var(--primary-light); padding-bottom: 4px; }

/* Type tabs */
.pf-type-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.pf-type-tab {
    padding: 6px 14px; border: 2px solid var(--primary-light);
    border-radius: 20px; background: var(--card); color: var(--text);
    font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.pf-type-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pf-type-tab:hover:not(.active) { border-color: var(--primary); }

/* Phase toggle buttons */
.pf-phase-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-phase-toggle {
    padding: 6px 14px; border: 2px solid #e0f2f1;
    border-radius: 20px; background: var(--card); color: #00695c;
    font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.pf-phase-toggle.active { background: #00695c; color: #fff; border-color: #00695c; }

/* Media embeds */
.pf-media-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; margin-bottom: 16px; }
.pf-media-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.pf-audio { width: 100%; margin-bottom: 16px; }
.pf-media-img { max-width: 100%; border-radius: 12px; margin-bottom: 16px; }
.pf-media-link { display: inline-block; padding: 8px 16px; background: var(--primary-light); color: var(--primary); border-radius: 8px; font-size: 0.85rem; margin-bottom: 16px; word-break: break-all; }

/* Projects */
.pf-projects-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pf-projects-header h3 { color: var(--primary); margin: 0; }
.pf-project-list { display: flex; flex-direction: column; gap: 10px; }
.pf-project-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; cursor: pointer; transition: all 0.2s; border: 2px solid transparent; display: flex; align-items: center; gap: 12px; }
.pf-project-card:hover { border-color: var(--primary); }
.pf-project-info { flex: 1; min-width: 0; }
.pf-project-name { font-weight: 700; font-size: 0.95rem; }
.pf-project-meta { font-size: 0.8rem; color: var(--text-light); margin-top: 2px; }
.pf-project-desc { font-size: 0.82rem; color: var(--text-light); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-status-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; text-transform: capitalize; white-space: nowrap; }
.pf-status-planned { background: var(--border); color: #666; }
.pf-status-active { background: #fff3e0; color: #e65100; }
.pf-status-done { background: var(--success-light); color: var(--success); }
.pf-project-timeline { display: flex; flex-direction: column; gap: 8px; }
.pf-timeline-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background 0.15s; }
.pf-timeline-item:hover { background: var(--primary-light); }
.pf-timeline-info { flex: 1; min-width: 0; }
.pf-timeline-title { font-weight: 600; font-size: 0.88rem; }
.pf-timeline-meta { font-size: 0.78rem; color: var(--text-light); }
.pf-draft-item { font-size: 0.88rem; padding: 6px 0; border-bottom: 1px solid rgba(128,128,128,0.1); }

/* Export */
.pf-export h3 { color: var(--primary); margin-bottom: 8px; }
.pf-export-desc { font-size: 0.85rem; color: var(--text-light); margin-bottom: 16px; }
.pf-export-filter { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.pf-export-filter label { font-size: 0.82rem; font-weight: 600; }
.pf-export-filter select { padding: 6px 10px; border-radius: 8px; border: 1px solid #ccc; font-size: 0.82rem; }
.pf-export-list { max-height: 400px; overflow-y: auto; margin-bottom: 16px; }
.pf-export-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid rgba(128,128,128,0.1); cursor: pointer; font-size: 0.85rem; }
.pf-export-item:hover { background: var(--primary-light); }
.pf-export-item input[type=checkbox] { accent-color: var(--primary); }
.pf-type-dot-sm { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.7rem; flex-shrink: 0; }
.pf-export-title { flex: 1; font-weight: 500; }
.pf-export-date { color: var(--text-light); font-size: 0.78rem; }
.pf-export-actions { text-align: center; }

/* Dark mode portfolio */
body.dark-mode .pf-filter-select,
body.dark-mode .pf-filter-search { background: #1a1a2e; border-color: #444; color: var(--text); }
body.dark-mode .pf-export-filter select { background: #1a1a2e; border-color: #444; color: var(--text); }
body.dark-mode .pf-entry-form input, body.dark-mode .pf-entry-form select, body.dark-mode .pf-entry-form textarea { background: #1a1a2e; border-color: #444; color: var(--text); }
body.dark-mode .pf-debono-section, body.dark-mode .pf-debono-input { background: rgba(128,128,128,0.08); }
body.dark-mode .pf-feedback-item { background: rgba(128,128,128,0.1); }
body.dark-mode .pf-journal-add select { background: #1a1a2e; border-color: #444; color: var(--text); }
body.dark-mode .pf-band-descriptors { background: rgba(128,128,128,0.1); }
body.dark-mode .pf-assess-bar-wrap { background: #333; }
body.dark-mode .pf-pbar-track { background: #333; }
body.dark-mode .pf-export-item { border-bottom-color: #333; }
body.dark-mode .pf-form-section { border-color: #444; }

/* Glassmorphism support */
body.has-bg .pf-stat-card,
body.has-bg .pf-section-card,
body.has-bg .pf-entry-card,
body.has-bg .pf-detail-section,
body.has-bg .pf-project-card { background: rgba(255,255,255,0.85); backdrop-filter: blur(8px); }
body.has-bg.dark-mode .pf-stat-card,
body.has-bg.dark-mode .pf-section-card,
body.has-bg.dark-mode .pf-entry-card,
body.has-bg.dark-mode .pf-detail-section,
body.has-bg.dark-mode .pf-project-card { background: rgba(22,33,62,0.85); }

/* Portfolio responsive */
@media (max-width: 600px) {
    .pf-stats-row { flex-direction: row; flex-wrap: wrap; }
    .pf-stat-card { min-width: 80px; padding: 10px 12px; }
    .pf-stat-val { font-size: 1.1rem; }
    .pf-card-grid { grid-template-columns: 1fr; }
    .pf-form-row { flex-direction: column; gap: 0; }
    .pf-gallery-toolbar { flex-direction: column; }
    .pf-type-tabs { justify-content: center; }
    .pf-card-thumb { height: 100px; }
    .pf-nav { justify-content: center; }
    .pf-export-filter { flex-direction: column; align-items: stretch; }
}
/* ---- ePortfolio Guide ---- */
.epg-header { text-align: center; margin-bottom: 24px; }
.epg-header h2 { font-size: 1.6rem; font-weight: 700; color: var(--text); }
.epg-soi { font-style: italic; color: var(--primary); margin: 6px 0; font-size: 1rem; }
.epg-unit { font-size: 0.85rem; color: var(--text-light); }
.epg-progress { margin-bottom: 24px; }
.epg-progress-label { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.epg-progress-bar { background: rgba(0,0,0,0.08); border-radius: 10px; height: 10px; overflow: hidden; }
.epg-progress-fill { height: 100%; background: linear-gradient(90deg, #e63946, #f77f00); border-radius: 10px; transition: width 0.4s ease; }
.epg-task { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; border-left: 4px solid var(--task-color); }
.epg-task.complete { opacity: 0.85; }
.epg-task-header { display: flex; align-items: center; gap: 12px; padding: 18px 20px; cursor: pointer; transition: background 0.15s; }
.epg-task-header:hover { background: rgba(0,0,0,0.02); }
.epg-task-badge { color: #fff; font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 20px; letter-spacing: 0.5px; white-space: nowrap; }
.epg-task-title { flex: 1; font-size: 1.05rem; font-weight: 700; color: var(--text); }
.epg-task-check { font-size: 1.2rem; }
.epg-task-body { padding: 0 20px 20px; }
.epg-task-desc { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; margin-bottom: 16px; }
.epg-checklist h4, .epg-bands h4, .epg-self-assess h4, .epg-commands h4 { font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 8px; margin-top: 16px; }
.epg-step { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; margin-bottom: 6px; background: rgba(0,0,0,0.02); cursor: pointer; transition: background 0.15s; }
.epg-step:hover { background: rgba(0,0,0,0.04); }
.epg-step.done { background: var(--success-light); }
.epg-step input[type="checkbox"] { margin-top: 3px; accent-color: var(--task-color); }
.epg-step-text { font-size: 0.88rem; font-weight: 600; color: var(--text); flex: 1; }
.epg-step-tip { display: block; font-size: 0.78rem; color: var(--text-light); margin-top: 2px; font-style: italic; }
.epg-band-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-bottom: 8px; }
.epg-band-table th { text-align: left; padding: 8px 10px; background: rgba(0,0,0,0.04); font-weight: 700; border-bottom: 2px solid rgba(0,0,0,0.08); }
.epg-band-table td { padding: 8px 10px; border-bottom: 1px solid rgba(0,0,0,0.06); vertical-align: top; line-height: 1.5; }
.epg-band-range { font-weight: 700; white-space: nowrap; color: var(--task-color); min-width: 42px; }
.epg-band-select { display: flex; gap: 8px; margin-bottom: 10px; }
.epg-band-btn { padding: 8px 18px; border: 2px solid var(--task-color); border-radius: 10px; background: transparent; color: var(--task-color); font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.epg-band-btn:hover, .epg-band-btn.active { background: var(--task-color); color: #fff; }
.epg-advice { background: rgba(0,0,0,0.03); border-radius: 10px; padding: 12px 16px; font-size: 0.85rem; line-height: 1.6; color: var(--text); }
.epg-command-list { display: flex; flex-wrap: wrap; gap: 8px; }
.epg-command-tag { padding: 4px 14px; border: 2px solid; border-radius: 20px; font-size: 0.78rem; font-weight: 700; }
.epg-complete-btn { display: block; width: 100%; margin-top: 20px; }
.dark-mode .epg-task { background: rgba(255,255,255,0.06); }
.dark-mode .epg-step { background: rgba(255,255,255,0.04); }
.dark-mode .epg-step.done { background: rgba(6,214,160,0.12); }
.dark-mode .epg-advice { background: rgba(255,255,255,0.05); }
.dark-mode .epg-band-table th { background: rgba(255,255,255,0.06); }
.dark-mode .epg-band-table td { border-color: rgba(255,255,255,0.08); }
