.form-error-notice {
    background: #f4d9c6;
    color: #8a4a1f;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: bold;
}

.btn-publish.is-published {
    background: #999;
    color: #eee;
}

.locked-notice {
    background: #dce4d0;
    color: #4a5c3a;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: bold;
}

.student-answer-box {
    background: #f5f5f0;
    border-left: 3px solid #4a5c3a;
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.student-answer-label {
    display: block;
    margin-bottom: 8px;
    color: #3d2e1f;
}

.submission-media-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 6px;
    margin-top: 8px;
    display: block;
}

.submission-media-video {
    max-width: 100%;
    border-radius: 6px;
    margin-top: 8px;
}

.submission-media-audio {
    width: 100%;
    margin-top: 8px;
}

.btn-needs-revision {
    margin-top: 8px;
    margin-right: 8px;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    background: #5b7fa6;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-needs-revision.is-current {
    background: #999;
    color: #eee;
}

.lo-detail-row-link {
    text-decoration: none;
    color: #3d2e1f;
    border-radius: 6px;
    transition: background 0.1s ease;
}

.lo-detail-row-link:hover {
    background: #f5f5f0;
}

.lo-achieved-badge {
    color: #4a5c3a;
    margin-left: 4px;
}
.matrix-table td.lo-group-start {
    padding-left: 14px;
    position: relative;
}

.matrix-table td.lo-group-start::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: #ccc;
}

.matrix-table tr th + td.lo-group-start {
    padding-left: 3px;
}

.matrix-table tr th + td.lo-group-start::before {
    display: none;
}

.matrix-stacked-lo-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #4a5c3a;
    margin: 12px 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cell-needsreview {
    background: #d9824e;
}

.cell-approved {
    background: #4a5c3a;
}

.matrix-legend {
    margin: 12px 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.matrix-table {
    border-collapse: collapse;
}

.matrix-table th {
    text-align: left;
    padding: 6px 12px 6px 0;
    white-space: nowrap;
    color: #4a5c3a;
}

.matrix-table td {
    padding: 3px;
}

.matrix-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    color: #fff;
}

.cell-none {
    background: #ddd;
    color: #777;
}

.cell-draft {
    background: #d99a4e;
}

.cell-published {
    background: #5b7fa6;
}

.cell-feedback {
    background: #7c9463;
}
.cohort-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
    max-width: 700px;
}

.cohort-card {
    display: block;
    background: linear-gradient(135deg, #4a5c3a, #7c9463);
    border: none;
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.cohort-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    transform: translateY(-2px);
}

.cohort-card h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1.15rem;
}

.cohort-card p {
    color: rgba(255,255,255,0.85);
}

.cohort-card .badge-ok {
    background: rgba(255,255,255,0.9);
    color: #3d5230;
}

.cohort-card .badge-alert {
    background: #fff3e6;
    color: #8a4a1f;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge-alert {
    background: #f4d9c6;
    color: #8a4a1f;
}

.badge-ok {
    background: #dce4d0;
    color: #4a5c3a;
}

.user-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding: 12px 14px;
    background: #f7f5ef;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.user-filter-bar .filter-input {
    flex: 1 1 240px;
    min-width: 200px;
}

.user-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.user-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #4a5c3a;
    cursor: pointer;
    white-space: nowrap;
}

.user-count-label {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #777;
}

.user-table-scroll {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-top: 8px;
}

.user-table {
    margin-top: 0;
    font-size: 0.85rem;
}

.user-table th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.user-table th, .user-table td {
    padding: 7px 12px;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.styled-table th, .styled-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #ddd;
}

.styled-table th {
    background: #dce4d0;
    color: #4a5c3a;
}
.unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.unit-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 24px 12px;
    text-decoration: none;
    color: #3d2e1f;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
    text-align: center;
}

.unit-box:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.unit-number {
    font-size: 2rem;
    font-weight: bold;
    color: #4a5c3a;
    line-height: 1;
    margin-bottom: 8px;
}

.unit-title {
    font-size: 0.9rem;
}
body {
    font-family: 'Georgia', serif;
    margin: 0;
    background: #faf7f0;
    color: #3d2e1f;
}

header {
    background: #4a5c3a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
}


.header-left img {
    height: 42px;
}

nav {
    display: flex;
    align-items: center;
}

nav {
    display: flex;
    align-items: center;
}

nav a, nav button {
    color: #fff;
    text-decoration: none;
    margin-left: 16px;
    font-size: 0.95rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

nav a:hover, nav button:hover {
    text-decoration: underline;
}

main {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-box {
    text-align: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.login-box img.newbattle {
    height: 40px;
    margin-bottom: 10px;
}

.login-box img.tree {
    height: 140px;
    margin: 15px 0;
}

.login-box h1 {
    font-size: 1.1rem;
    font-weight: normal;
    margin: 5px 0 25px;
}

.login-box input {
    display: block;
    width: 220px;
    margin: 10px auto;
    padding: 8px;
}

.login-box button {
    margin-top: 15px;
    padding: 8px 20px;
    background: #4a5c3a;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}


.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0 40px;
    max-width: 700px;
}

.dashboard-card {
    display: block;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #3d2e1f;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.dashboard-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.dashboard-card h2 {
    margin: 0;
    padding: 44px 16px;
    color: #fff;
    font-size: 1.15rem;
}

.dashboard-card p {
    margin: 0;
    padding: 14px 16px;
    font-size: 0.9rem;
    color: #555;
}

.dashboard-card:nth-child(1) h2 {
    background: linear-gradient(135deg, #6b8354, #a3b98a);
}

.dashboard-card:nth-child(2) h2 {
    background: linear-gradient(135deg, #4a5c3a, #7c9463);
}

.lo-header-table {
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.lo-header-row {
    display: flex;
    background: #dce4d0;
}

.lo-header-row:nth-child(even) {
    background: #e8edE0;
}

.lo-label {
    width: 180px;
    font-weight: bold;
    padding: 10px 14px;
    color: #4a5c3a;
}

.lo-header-row span:last-child {
    padding: 10px 14px;
    flex: 1;
}

.pc-block {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 16px;
}

.pc-question {
    background: #dce4d0;
    padding: 12px 16px;
    font-weight: bold;
    color: #4a5c3a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-save, .btn-publish {
    margin-top: 8px;
    margin-right: 8px;
    padding: 8px 18px;
    background: #ccc;
    color: #555;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-save.is-dirty, .btn-publish.is-dirty {
    background: #4a5c3a;
    color: #fff;
}

.btn-save:hover, .btn-publish:hover {
    opacity: 0.9;
}

.assessor-feedback {
    background: #f5f5f0;
    border-left: 3px solid #4a5c3a;
    padding: 10px 14px;
    margin-top: 10px;
}

.lo-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.nav-button {
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid #4a5c3a;
    color: #4a5c3a;
    text-decoration: none;
}

.nav-button-primary {
    background: #4a5c3a;
    color: #fff;
}

.reflection-page {
    position: relative;
    text-align: center;
    padding: 40px 20px;
}

.reflection-watermark {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.08;
    z-index: 0;
}

.reflection-watermark img {
    width: 320px;
}

.reflection-unit, .reflection-title, .reflection-prompt, .lo-nav {
    position: relative;
    z-index: 1;
}

.reflection-page form {
    position: relative;
    z-index: 2;
}

.reflection-title {
    color: #4a5c3a;
    font-weight: normal;
    margin-top: 0;
}

.reflection-prompt {
    max-width: 600px;
    margin: 20px auto;
    color: #555;
}

.field-row {
    margin-bottom: 14px;
}

.field-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #4a5c3a;
}

.field-row textarea {
    width: 100%;
    max-width: 600px;
    padding: 8px;
}

.field-row select, .field-row input[type="file"] {
    display: block;
}

.btn-approve {
    margin-top: 8px;
    margin-right: 8px;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    background: #4a5c3a;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-approve.is-current {
    background: #999;
    color: #eee;
}

.btn-feedback {
    margin-top: 8px;
    margin-right: 8px;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #555;
    background: #e2e2e2;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-feedback.is-current {
    background: #999;
    color: #eee;
}

.matrix-stacked {
    display: none;
}

.unit-accordion {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
    max-width: 700px;
}

.unit-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.unit-card summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
}

.unit-card summary::-webkit-details-marker {
    display: none;
}

.unit-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.unit-card-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #4a5c3a;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.unit-card-info {
    flex: 1;
}

.unit-card-title {
    font-weight: bold;
    margin-bottom: 6px;
}

.unit-progress-bar {
    background: #eee;
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
}

.unit-progress-fill {
    background: #4a5c3a;
    height: 100%;
}

.unit-progress-label {
    font-size: 0.8rem;
    color: #777;
    margin-top: 4px;
}

.unit-card-detail {
    padding: 4px 20px 20px 76px;
    border-top: 1px solid #eee;
}

.lo-detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.lo-detail-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #4a5c3a;
    min-width: 40px;
    flex-shrink: 0;
    white-space: nowrap;
}

.lo-detail-cells {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    font-size: 0.8rem;
    flex-shrink: 0;
    color: #fff;
}

.pc-answer textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.media-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.media-row select {
    padding: 6px;
}

.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin-left: 12px;
    margin-right: 16px;
    font-size: 1.1rem;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #d9824e;
    color: #fff;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 10px;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: 28px;
    right: -10px;
    width: 260px;
    max-width: calc(100vw - 20px);
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    color: #3d2e1f;
    padding: 6px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    z-index: 100;
}

.notification-dropdown-open {
    display: block;
}

.notification-item {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #3d2e1f;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
    line-height: 1.4;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #f5f5f0;
}

.notification-unread {
    background: #f9f2e8;
    font-weight: bold;
    margin: 0 4px;
    border-radius: 6px;
}

.notification-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 2px;
}

.notification-empty {
    padding: 14px;
    color: #999;
    font-size: 0.85rem;
    text-align: center;
}

.capture-panel video {
    background: #222;
    min-height: 180px;
}

.uploaded-media-preview {
    margin-top: 10px;
}

.capture-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.capture-modal {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 420px;
}

.capture-modal video, .capture-modal img#photo-preview, .capture-modal [id^="photo-preview-"] {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 8px;
    background: #222;
    display: block;
}

.capture-modal audio {
    width: 100%;
}

.capture-controls {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.capture-controls button {
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid #4a5c3a;
    background: #fff;
    color: #4a5c3a;
    cursor: pointer;
}

.btn-record-confirm {
    background: #4a5c3a !important;
    color: #fff !important;
}

.local-capture-preview img,
.local-capture-preview video {
    max-width: 300px;
    max-height: 200px;
    border-radius: 6px;
    margin-top: 8px;
    display: block;
}


.evidence-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    padding: 12px;
    background: #faf7f0;
    border-radius: 8px;
}

.evidence-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #000;
    cursor: pointer;
    flex-shrink: 0;
}

.evidence-audio-thumb {
    position: relative;
}

.evidence-delete-btn {
    position: absolute;
    top: 3px;
    right: 3px;
    z-index: 2;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    opacity: 0.75;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.evidence-delete-btn:hover {
    opacity: 1;
    background: #c0392b;
}

.evidence-delete-btn-inline {
    margin-left: 8px;
    border: none;
    background: none;
    color: #c0392b;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.evidence-delete-btn-inline:hover {
    color: #922b21;
}

.evidence-thumb img, .evidence-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.evidence-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.3rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    pointer-events: none;
}

.evidence-audio-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f5f5f0;
    border-radius: 8px;
    width: fit-content;
    margin-top: 8px;
}

.evidence-audio-chip audio {
    height: 32px;
}

.evidence-file-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 9px;
    background: #f7f5ef;
    padding: 6px;
    flex-shrink: 0;
}

.evidence-file-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #4a5c3a;
    text-decoration: none;
    text-align: center;
    width: 100%;
}

.evidence-file-icon {
    font-size: 22px;
}

.evidence-file-label {
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 66px;
}

.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox-content img, .lightbox-content video {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 6px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #a94442;
    font-weight: bold;
}

.recording-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d9534f;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.evidence-toggle {
    margin-top: 10px;
    text-align: left;
}

.evidence-toggle summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: #4a5c3a;
    font-weight: bold;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.evidence-toggle summary::-webkit-details-marker {
    display: none;
}

.evidence-toggle summary::after {
    content: "▾";
    font-size: 0.7rem;
    transition: transform 0.15s ease;
}

.evidence-toggle[open] summary::after {
    transform: rotate(180deg);
}

.evidence-toggle .evidence-gallery {
    margin-top: 8px;
}

.evidence-thumb.evidence-thumb-audio {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: #4a5c3a !important;
    color: #fff;
}

.unit-card-header {
    position: relative;
}

.unit-card-corner-badge {
    position: absolute;
    top: 0;
    right: 0;
}

.evidence-audio-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 80px;
    height: 80px;
    border-radius: 9px;
    background: #f7f5ef;
    border: 1px solid #e2ddd0;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.evidence-audio-thumb:hover {
    background: #efe9db;
    border-color: #cfc6b0;
    transform: translateY(-1px);
}

.evidence-waveform-icon {
    color: #4a5c3a;
}

.evidence-audio-label {
    font-size: 0.6rem;
    font-weight: bold;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4a5c3a;
}

.lo-decision-actions {
    margin-top: 20px;
    padding: 16px 0;
}

.pc-answer {
    padding: 12px 24px;
}

.back-link-top {
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: left;
}


.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 10px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 4px;
}

.notification-dropdown-title {
    font-weight: bold;
    color: #3d2e1f;
    font-size: 0.9rem;
}

.notification-mark-all {
    background: none;
    border: none;
    color: #4a5c3a;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
}

.notification-mark-all:hover {
    text-decoration: underline;
}

.notification-empty {
    text-align: center;
    padding: 20px 14px;
    font-size: 0.85rem;
    color: #999;
}

.add-media-wrapper {
    position: relative;
    display: inline-block;
}

.btn-add-media {
    padding: 6px 14px;
    border: 1px solid #4a5c3a;
    background: #fff;
    color: #4a5c3a;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-add-media:hover {
    background: #f5f5f0;
}


.add-media-menu {
    display: none;
    position: absolute;
    top: 36px;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    z-index: 50;
    min-width: 210px;
    overflow: hidden;
}

.add-media-menu-open {
    display: block;
}
.add-media-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: #3d2e1f;
    border-bottom: 1px solid #eee;
}

.add-media-option:last-child {
    border-bottom: none;
}

.add-media-option:hover {
    background: #f5f5f0;
}

.selected-file-name {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #666;
}

.clear-selected-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    margin-left: 10px;
    padding: 3px 10px;
    min-width: unset;
    width: auto;
    height: auto;
    white-space: nowrap;
    border-radius: 14px;
    border: none;
    font-size: 0.7rem;
    vertical-align: middle;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    opacity: 0.75;
    vertical-align: middle;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.clear-selected-file-btn:hover {
    opacity: 1;
    background: #c0392b;
}

.media-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 190px;
}

.media-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: #fff;
    color: #3d2e1f;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    text-align: left;
    box-sizing: border-box;
}

.media-action-btn:hover {
    background: #f5f5f0;
}

.media-action-btn + .media-action-btn {
    border-top: 1px solid #eee;
}

.media-action-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #4a5c3a;
}


.capture-type-toggle {
    display: none;
    gap: 0;
    margin-bottom: 12px;
    border: 1px solid #4a5c3a;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.capture-toggle-btn {
    padding: 6px 18px;
    border: none;
    background: #fff;
    color: #4a5c3a;
    cursor: pointer;
    font-size: 0.85rem;
}

.capture-toggle-btn.active {
    background: #4a5c3a;
    color: #fff;
}

.dashboard-card:nth-child(3) h2 {
    background: linear-gradient(135deg, #38472c, #5c7048);
}

.nav-admin-group {
    display: flex;
    align-items: center;
    padding-right: 16px;
    margin-right: 4px;
    border-right: 1px solid rgba(255,255,255,0.3);
}

.nav-secondary {
    opacity: 0.75;
    font-size: 0.85rem;
}

.filter-input {
    display: block;
    width: 100%;
    max-width: 320px;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
}

.filter-list {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px;
}

.filter-item {
    display: block;
    padding: 4px 0;
}

.btn {
    display: inline-block;
    margin-top: 8px;
    margin-right: 8px;
    padding: 8px 18px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: bold;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.btn-outline {
    background: transparent;
    color: #4a5c3a;
    border: 1px solid #4a5c3a;
}

.btn-outline:hover {
    background: #dce4d0;
}

.btn-primary {
    background: #4a5c3a;
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: #e2e2e2;
    color: #555;
}

.btn-secondary:hover {
    background: #d5d5d5;
}

.btn-muted {
    background: #ccc;
    color: #555;
}

.btn-muted:hover {
    opacity: 0.9;
}

.admin-actions {
    margin-bottom: 20px;
}

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.styled-table td .btn {
    margin-top: 0;
    margin-right: 0;
}

.badge-link {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-decoration: none;
    background: #dce4d0;
    color: #4a5c3a;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.badge-link:hover {
    background: #cbd7ba;
}

.stat-number {
    font-size: 1.1rem;
    font-weight: bold;
    color: #3d2e1f;
}

.dashboard-card p {
    line-height: 1.5;
}

.card-desc {
    color: #666;
    font-size: 0.85rem;
}

.dual-listbox {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 12px 0;
}

.dual-listbox-panel {
    flex: 1;
    min-width: 220px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.dual-listbox-panel-header {
    padding: 12px 14px;
    background: #eef1e8;
    border-bottom: 1px solid #ddd;
}

.dual-listbox-panel-header h4 {
    margin: 0 0 4px;
    font-size: 0.95rem;
    color: #3d2e1f;
}

.dual-listbox-panel-header p {
    margin: 0;
    font-size: 0.78rem;
    color: #777;
}

.dual-listbox-panel .filter-input {
    max-width: none;
    margin: 10px 12px 0;
    width: calc(100% - 24px);
}

.dual-listbox-box {
    max-height: 240px;
    overflow-y: auto;
    padding: 8px 12px;
    flex: 1;
}

.dual-listbox-item {
    display: block;
    padding: 4px 0;
    font-size: 0.9rem;
}

.dual-listbox-select-all {
    padding: 8px 12px;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
}

.dual-listbox-select-all a {
    color: #4a5c3a;
    text-decoration: none;
    cursor: pointer;
}

.dual-listbox-select-all a:hover {
    text-decoration: underline;
}

.dual-listbox-arrows {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
}

.dual-listbox-arrow-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #4a5c3a;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease;
}

.dual-listbox-arrow-btn:hover {
    opacity: 0.85;
}

details.cohort-section {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    background: #fff;
}

details.cohort-section summary {
    cursor: pointer;
    font-weight: bold;
    color: #4a5c3a;
    font-size: 1.05rem;
}


.actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

.actions-cell form {
    display: inline;
}

.badge-link-muted {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-decoration: none;
    background: #eee;
    color: #777;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.badge-link-muted:hover {
    background: #e0e0e0;
}

.badge-link-strong {
    background: #4a5c3a;
    color: #fff;
}

.badge-link-strong:hover {
    background: #3d4d30;
}

.decision-select {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #3d2e1f;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.decision-select:focus {
    outline: none;
    border-color: #4a5c3a;
}

.view-notes-link {
    color: #4a5c3a;
    font-size: 0.8rem;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    padding: 0;
}

.notes-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.notes-modal-overlay.open {
    display: flex;
}

.notes-modal {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.notes-modal h3 {
    margin-top: 0;
    color: #4a5c3a;
}

.notes-modal p {
    white-space: pre-wrap;
    color: #3d2e1f;
}

.notes-modal-close {
    margin-top: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-home-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: bold;
}

.header-home-link:hover {
    text-decoration: underline;
}

.validator-section-panel {
    background: #f2f0e9;
    border: 1px solid #e2ddd0;
    border-radius: 12px;
    padding: 28px 30px;
    margin-top: 40px;
}

.validator-section-panel h2 {
    margin-top: 0;
    color: #4a5c3a;
}

.validator-section-panel h3 {
    font-size: 1rem;
    color: #4a5c3a;
    margin-top: 24px;
    margin-bottom: 8px;
}

.validator-section-panel table {
    background: #fff;
}

.admin-form-panel {
    background: #fff;
    border: 1px solid #e2ddd0;
    border-radius: 12px;
    padding: 28px 30px;
    max-width: 480px;
    margin-top: 20px;
}

.admin-form-field {
    margin-bottom: 18px;
}

.admin-form-field label {
    display: block;
    font-weight: bold;
    color: #4a5c3a;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.admin-form-field input[type="text"],
.admin-form-field input[type="email"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.admin-form-field input[type="text"]:focus,
.admin-form-field input[type="email"]:focus {
    outline: none;
    border-color: #4a5c3a;
}

.role-checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.role-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #faf9f5;
    font-size: 0.9rem;
    cursor: pointer;
}

.role-checkbox-item:hover {
    border-color: #4a5c3a;
}

.danger-zone-panel {
    background: #fff;
    border: 1px solid #f0d9c6;
    border-radius: 12px;
    padding: 24px 28px;
    max-width: 480px;
    margin-top: 30px;
}

.danger-zone-panel h3 {
    margin-top: 0;
    color: #8a4a1f;
    font-size: 1rem;
}

.admin-form-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    box-sizing: border-box;
}

.admin-form-field select:focus {
    outline: none;
    border-color: #4a5c3a;
}



.password-toggle-btn:hover {
    color: #4a5c3a;
}

.password-field-wrapper {
    position: relative;
    display: block;
    width: 240px;
    margin: 10px auto;
}

.password-field-wrapper input {
    width: 240px;
    margin: 0;
    padding: 8px;
    padding-right: 34px;
    box-sizing: border-box;
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #777;
    padding: 0;
    display: flex;
    align-items: center;
}

.password-toggle-btn:hover {
    color: #4a5c3a;
}

.login-box button.password-toggle-btn {
    margin-top: 0;
    padding: 0;
    background: none;
    color: #777;
    border-radius: 0;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.login-box button.password-toggle-btn:hover {
    color: #4a5c3a;
}

.locked-notice {
    background: #dce4d0;
    color: #4a5c3a;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: bold;
}

.student-answer-box {
    background: #f5f5f0;
    border-left: 3px solid #4a5c3a;
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.student-answer-label {
    display: block;
    margin-bottom: 8px;
    color: #3d2e1f;
}

.submission-media-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 6px;
    margin-top: 8px;
    display: block;
}

.submission-media-video {
    max-width: 100%;
    border-radius: 6px;
    margin-top: 8px;
}

.submission-media-audio {
    width: 100%;
    margin-top: 8px;
}

.btn-needs-revision {
    margin-top: 8px;
    margin-right: 8px;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    background: #5b7fa6;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-needs-revision.is-current {
    background: #999;
    color: #eee;
}

.lo-detail-row-link {
    text-decoration: none;
    color: #3d2e1f;
    border-radius: 6px;
    transition: background 0.1s ease;
}

.lo-detail-row-link:hover {
    background: #f5f5f0;
}

.lo-achieved-badge {
    color: #4a5c3a;
    margin-left: 4px;
}
.matrix-table td.lo-group-start {
    padding-left: 14px;
    position: relative;
}

.matrix-table td.lo-group-start::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: #ccc;
}

.matrix-table tr th + td.lo-group-start {
    padding-left: 3px;
}

.matrix-table tr th + td.lo-group-start::before {
    display: none;
}

.matrix-stacked-lo-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #4a5c3a;
    margin: 12px 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cell-needsreview {
    background: #d9824e;
}

.cell-approved {
    background: #4a5c3a;
}

.matrix-legend {
    margin: 12px 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.matrix-table {
    border-collapse: collapse;
}

.matrix-table th {
    text-align: left;
    padding: 6px 12px 6px 0;
    white-space: nowrap;
    color: #4a5c3a;
}

.matrix-table td {
    padding: 3px;
}

.matrix-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    color: #fff;
}

.cell-none {
    background: #ddd;
    color: #777;
}

.cell-draft {
    background: #d99a4e;
}

.cell-published {
    background: #5b7fa6;
}

.cell-feedback {
    background: #7c9463;
}
.cohort-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
    max-width: 700px;
}

.cohort-card {
    display: block;
    background: linear-gradient(135deg, #4a5c3a, #7c9463);
    border: none;
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.cohort-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    transform: translateY(-2px);
}

.cohort-card h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1.15rem;
}

.cohort-card p {
    color: rgba(255,255,255,0.85);
}

.cohort-card .badge-ok {
    background: rgba(255,255,255,0.9);
    color: #3d5230;
}

.cohort-card .badge-alert {
    background: #fff3e6;
    color: #8a4a1f;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge-alert {
    background: #f4d9c6;
    color: #8a4a1f;
}

.badge-ok {
    background: #dce4d0;
    color: #4a5c3a;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.styled-table th, .styled-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #ddd;
}

.styled-table th {
    background: #dce4d0;
    color: #4a5c3a;
}
.unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.unit-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 24px 12px;
    text-decoration: none;
    color: #3d2e1f;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
    text-align: center;
}

.unit-box:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.unit-number {
    font-size: 2rem;
    font-weight: bold;
    color: #4a5c3a;
    line-height: 1;
    margin-bottom: 8px;
}

.unit-title {
    font-size: 0.9rem;
}
body {
    font-family: 'Georgia', serif;
    margin: 0;
    background: #faf7f0;
    color: #3d2e1f;
}

header {
    background: #4a5c3a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
}


.header-left img {
    height: 42px;
}

nav {
    display: flex;
    align-items: center;
}

nav {
    display: flex;
    align-items: center;
}

nav a, nav button {
    color: #fff;
    text-decoration: none;
    margin-left: 16px;
    font-size: 0.95rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

nav a:hover, nav button:hover {
    text-decoration: underline;
}

main {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-box {
    text-align: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.login-box img.newbattle {
    height: 40px;
    margin-bottom: 10px;
}

.login-box img.tree {
    height: 140px;
    margin: 15px 0;
}

.login-box h1 {
    font-size: 1.1rem;
    font-weight: normal;
    margin: 5px 0 25px;
}




.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0 40px;
    max-width: 700px;
}

.dashboard-card {
    display: block;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #3d2e1f;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.dashboard-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.dashboard-card h2 {
    margin: 0;
    padding: 44px 16px;
    color: #fff;
    font-size: 1.15rem;
}

.dashboard-card p {
    margin: 0;
    padding: 14px 16px;
    font-size: 0.9rem;
    color: #555;
}

.dashboard-card:nth-child(1) h2 {
    background: linear-gradient(135deg, #6b8354, #a3b98a);
}

.dashboard-card:nth-child(2) h2 {
    background: linear-gradient(135deg, #4a5c3a, #7c9463);
}

.lo-header-table {
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.lo-header-row {
    display: flex;
    background: #dce4d0;
}

.lo-header-row:nth-child(even) {
    background: #e8edE0;
}

.lo-label {
    width: 180px;
    font-weight: bold;
    padding: 10px 14px;
    color: #4a5c3a;
}

.lo-header-row span:last-child {
    padding: 10px 14px;
    flex: 1;
}

.pc-block {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 16px;
}

.pc-question {
    background: #dce4d0;
    padding: 12px 16px;
    font-weight: bold;
    color: #4a5c3a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-save, .btn-publish {
    margin-top: 8px;
    margin-right: 8px;
    padding: 8px 18px;
    background: #ccc;
    color: #555;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-save.is-dirty, .btn-publish.is-dirty {
    background: #4a5c3a;
    color: #fff;
}

.btn-save:hover, .btn-publish:hover {
    opacity: 0.9;
}

.assessor-feedback {
    background: #f5f5f0;
    border-left: 3px solid #4a5c3a;
    padding: 10px 14px;
    margin-top: 10px;
}

.lo-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.nav-button {
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid #4a5c3a;
    color: #4a5c3a;
    text-decoration: none;
}

.nav-button-primary {
    background: #4a5c3a;
    color: #fff;
}

.reflection-page {
    position: relative;
    text-align: center;
    padding: 40px 20px;
}

.reflection-watermark {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.08;
    z-index: 0;
}

.reflection-watermark img {
    width: 320px;
}

.reflection-unit, .reflection-title, .reflection-prompt, .lo-nav {
    position: relative;
    z-index: 1;
}

.reflection-page form {
    position: relative;
    z-index: 2;
}

.reflection-title {
    color: #4a5c3a;
    font-weight: normal;
    margin-top: 0;
}

.reflection-prompt {
    max-width: 600px;
    margin: 20px auto;
    color: #555;
}

.field-row {
    margin-bottom: 14px;
}

.field-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #4a5c3a;
}

.field-row textarea {
    width: 100%;
    max-width: 600px;
    padding: 8px;
}

.field-row select, .field-row input[type="file"] {
    display: block;
}

.btn-approve {
    margin-top: 8px;
    margin-right: 8px;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    background: #4a5c3a;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-approve.is-current {
    background: #999;
    color: #eee;
}

.btn-feedback {
    margin-top: 8px;
    margin-right: 8px;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #555;
    background: #e2e2e2;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-feedback.is-current {
    background: #999;
    color: #eee;
}

.matrix-stacked {
    display: none;
}

.unit-accordion {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
    max-width: 700px;
}

.unit-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.unit-card summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
}

.unit-card summary::-webkit-details-marker {
    display: none;
}

.unit-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.unit-card-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #4a5c3a;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.unit-card-info {
    flex: 1;
}

.unit-card-title {
    font-weight: bold;
    margin-bottom: 6px;
}

.unit-progress-bar {
    background: #eee;
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
}

.unit-progress-fill {
    background: #4a5c3a;
    height: 100%;
}

.unit-progress-label {
    font-size: 0.8rem;
    color: #777;
    margin-top: 4px;
}

.unit-card-detail {
    padding: 4px 20px 20px 76px;
    border-top: 1px solid #eee;
}

.lo-detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.lo-detail-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #4a5c3a;
    min-width: 40px;
    flex-shrink: 0;
    white-space: nowrap;
}

.lo-detail-cells {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    font-size: 0.8rem;
    flex-shrink: 0;
    color: #fff;
}

.pc-answer textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.media-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.media-row select {
    padding: 6px;
}

.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin-right: 16px;
    font-size: 1.1rem;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #d9824e;
    color: #fff;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 10px;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: 28px;
    right: -10px;
    width: 260px;
    max-width: calc(100vw - 20px);
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    color: #3d2e1f;
    padding: 6px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    z-index: 100;
}

.notification-dropdown-open {
    display: block;
}

.notification-item {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #3d2e1f;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
    line-height: 1.4;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #f5f5f0;
}

.notification-unread {
    background: #f9f2e8;
    font-weight: bold;
    margin: 0 4px;
    border-radius: 6px;
}

.notification-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 2px;
}

.notification-empty {
    padding: 14px;
    color: #999;
    font-size: 0.85rem;
    text-align: center;
}

.capture-panel video {
    background: #222;
    min-height: 180px;
}

.uploaded-media-preview {
    margin-top: 10px;
}

.capture-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.capture-modal {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 420px;
}

.capture-modal video, .capture-modal img#photo-preview, .capture-modal [id^="photo-preview-"] {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 8px;
    background: #222;
    display: block;
}

.capture-modal audio {
    width: 100%;
}

.capture-controls {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.capture-controls button {
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid #4a5c3a;
    background: #fff;
    color: #4a5c3a;
    cursor: pointer;
}

.btn-record-confirm {
    background: #4a5c3a !important;
    color: #fff !important;
}

.local-capture-preview img,
.local-capture-preview video {
    max-width: 300px;
    max-height: 200px;
    border-radius: 6px;
    margin-top: 8px;
    display: block;
}


.evidence-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    padding: 12px;
    background: #faf7f0;
    border-radius: 8px;
}

.evidence-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #000;
    cursor: pointer;
    flex-shrink: 0;
}

.evidence-thumb img, .evidence-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.evidence-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.3rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    pointer-events: none;
}

.evidence-audio-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f5f5f0;
    border-radius: 8px;
    width: fit-content;
    margin-top: 8px;
}

.evidence-audio-chip audio {
    height: 32px;
}

.evidence-file-link {
    display: inline-block;
    padding: 8px 12px;
    background: #f5f5f0;
    border-radius: 6px;
    color: #4a5c3a;
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 8px;
}

.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox-content img, .lightbox-content video {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 6px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #a94442;
    font-weight: bold;
}

.recording-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d9534f;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.evidence-toggle {
    margin-top: 10px;
    text-align: left;
}

.evidence-toggle summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: #4a5c3a;
    font-weight: bold;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.evidence-toggle summary::-webkit-details-marker {
    display: none;
}

.evidence-toggle summary::after {
    content: "▾";
    font-size: 0.7rem;
    transition: transform 0.15s ease;
}

.evidence-toggle[open] summary::after {
    transform: rotate(180deg);
}

.evidence-toggle .evidence-gallery {
    margin-top: 8px;
}

.evidence-thumb.evidence-thumb-audio {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: #4a5c3a !important;
    color: #fff;
}

.unit-card-header {
    position: relative;
}

.unit-card-corner-badge {
    position: absolute;
    top: 0;
    right: 0;
}

.evidence-audio-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 80px;
    height: 80px;
    border-radius: 9px;
    background: #f7f5ef;
    border: 1px solid #e2ddd0;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.evidence-audio-thumb:hover {
    background: #efe9db;
    border-color: #cfc6b0;
    transform: translateY(-1px);
}

.evidence-waveform-icon {
    color: #4a5c3a;
}

.evidence-audio-label {
    font-size: 0.6rem;
    font-weight: bold;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4a5c3a;
}

.lo-decision-actions {
    margin-top: 20px;
    padding: 16px 0;
}

.pc-answer {
    padding: 12px 24px;
}

.back-link-top {
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: left;
}


.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 10px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 4px;
}

.notification-dropdown-title {
    font-weight: bold;
    color: #3d2e1f;
    font-size: 0.9rem;
}

.notification-mark-all {
    background: none;
    border: none;
    color: #4a5c3a;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
}

.notification-mark-all:hover {
    text-decoration: underline;
}

.notification-empty {
    text-align: center;
    padding: 20px 14px;
    font-size: 0.85rem;
    color: #999;
}

.add-media-wrapper {
    position: relative;
    display: inline-block;
}

.btn-add-media {
    padding: 6px 14px;
    border: 1px solid #4a5c3a;
    background: #fff;
    color: #4a5c3a;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-add-media:hover {
    background: #f5f5f0;
}


.add-media-menu {
    display: none;
    position: absolute;
    top: 36px;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    z-index: 50;
    min-width: 210px;
    overflow: hidden;
}

.add-media-menu-open {
    display: block;
}
.add-media-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: #3d2e1f;
    border-bottom: 1px solid #eee;
}

.add-media-option:last-child {
    border-bottom: none;
}

.add-media-option:hover {
    background: #f5f5f0;
}

.selected-file-name {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #666;
}

.media-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 190px;
}

.media-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: #fff;
    color: #3d2e1f;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    text-align: left;
    box-sizing: border-box;
}

.media-action-btn:hover {
    background: #f5f5f0;
}

.media-action-btn + .media-action-btn {
    border-top: 1px solid #eee;
}

.media-action-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #4a5c3a;
}


.capture-type-toggle {
    display: none;
    gap: 0;
    margin-bottom: 12px;
    border: 1px solid #4a5c3a;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.capture-toggle-btn {
    padding: 6px 18px;
    border: none;
    background: #fff;
    color: #4a5c3a;
    cursor: pointer;
    font-size: 0.85rem;
}

.capture-toggle-btn.active {
    background: #4a5c3a;
    color: #fff;
}

.dashboard-card:nth-child(3) h2 {
    background: linear-gradient(135deg, #38472c, #5c7048);
}

.nav-admin-group {
    display: flex;
    align-items: center;
    padding-right: 16px;
    margin-right: 4px;
    border-right: 1px solid rgba(255,255,255,0.3);
}

.nav-secondary {
    opacity: 0.75;
    font-size: 0.85rem;
}

.filter-input {
    display: block;
    width: 100%;
    max-width: 320px;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
}

.filter-list {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px;
}

.filter-item {
    display: block;
    padding: 4px 0;
}

.btn {
    display: inline-block;
    margin-top: 8px;
    margin-right: 8px;
    padding: 8px 18px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: bold;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.btn-outline {
    background: transparent;
    color: #4a5c3a;
    border: 1px solid #4a5c3a;
}

.btn-outline:hover {
    background: #dce4d0;
}

.btn-primary {
    background: #4a5c3a;
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: #e2e2e2;
    color: #555;
}

.btn-secondary:hover {
    background: #d5d5d5;
}

.btn-muted {
    background: #ccc;
    color: #555;
}

.btn-muted:hover {
    opacity: 0.9;
}

.admin-actions {
    margin-bottom: 20px;
}

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.styled-table td .btn {
    margin-top: 0;
    margin-right: 0;
}

.badge-link {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-decoration: none;
    background: #dce4d0;
    color: #4a5c3a;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.badge-link:hover {
    background: #cbd7ba;
}

.stat-number {
    font-size: 1.1rem;
    font-weight: bold;
    color: #3d2e1f;
}

.dashboard-card p {
    line-height: 1.5;
}

.card-desc {
    color: #666;
    font-size: 0.85rem;
}

.dual-listbox {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 12px 0;
}

.dual-listbox-panel {
    flex: 1;
    min-width: 220px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.dual-listbox-panel-header {
    padding: 12px 14px;
    background: #eef1e8;
    border-bottom: 1px solid #ddd;
}

.dual-listbox-panel-header h4 {
    margin: 0 0 4px;
    font-size: 0.95rem;
    color: #3d2e1f;
}

.dual-listbox-panel-header p {
    margin: 0;
    font-size: 0.78rem;
    color: #777;
}

.dual-listbox-panel .filter-input {
    max-width: none;
    margin: 10px 12px 0;
    width: calc(100% - 24px);
}

.dual-listbox-box {
    max-height: 240px;
    overflow-y: auto;
    padding: 8px 12px;
    flex: 1;
}

.dual-listbox-item {
    display: block;
    padding: 4px 0;
    font-size: 0.9rem;
}

.dual-listbox-select-all {
    padding: 8px 12px;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
}

.dual-listbox-select-all a {
    color: #4a5c3a;
    text-decoration: none;
    cursor: pointer;
}

.dual-listbox-select-all a:hover {
    text-decoration: underline;
}

.dual-listbox-arrows {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
}

.dual-listbox-arrow-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #4a5c3a;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease;
}

.dual-listbox-arrow-btn:hover {
    opacity: 0.85;
}

details.cohort-section {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    background: #fff;
}

details.cohort-section summary {
    cursor: pointer;
    font-weight: bold;
    color: #4a5c3a;
    font-size: 1.05rem;
}


.actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

.actions-cell form {
    display: inline;
}

.badge-link-muted {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-decoration: none;
    background: #eee;
    color: #777;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.badge-link-muted:hover {
    background: #e0e0e0;
}

.badge-link-strong {
    background: #4a5c3a;
    color: #fff;
}

.badge-link-strong:hover {
    background: #3d4d30;
}

.decision-select {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #3d2e1f;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.decision-select:focus {
    outline: none;
    border-color: #4a5c3a;
}

.view-notes-link {
    color: #4a5c3a;
    font-size: 0.8rem;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    padding: 0;
}

.notes-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.notes-modal-overlay.open {
    display: flex;
}

.notes-modal {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.notes-modal h3 {
    margin-top: 0;
    color: #4a5c3a;
}

.notes-modal p {
    white-space: pre-wrap;
    color: #3d2e1f;
}

.notes-modal-close {
    margin-top: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-home-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: bold;
}

.header-home-link:hover {
    text-decoration: underline;
}

.validator-section-panel {
    background: #f2f0e9;
    border: 1px solid #e2ddd0;
    border-radius: 12px;
    padding: 28px 30px;
    margin-top: 40px;
}

.validator-section-panel h2 {
    margin-top: 0;
    color: #4a5c3a;
}

.validator-section-panel h3 {
    font-size: 1rem;
    color: #4a5c3a;
    margin-top: 24px;
    margin-bottom: 8px;
}

.validator-section-panel table {
    background: #fff;
}

.admin-form-panel {
    background: #fff;
    border: 1px solid #e2ddd0;
    border-radius: 12px;
    padding: 28px 30px;
    max-width: 480px;
    margin-top: 20px;
}

.admin-form-field {
    margin-bottom: 18px;
}

.admin-form-field label {
    display: block;
    font-weight: bold;
    color: #4a5c3a;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.admin-form-field input[type="text"],
.admin-form-field input[type="email"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.admin-form-field input[type="text"]:focus,
.admin-form-field input[type="email"]:focus {
    outline: none;
    border-color: #4a5c3a;
}

.role-checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.role-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #faf9f5;
    font-size: 0.9rem;
    cursor: pointer;
}

.role-checkbox-item:hover {
    border-color: #4a5c3a;
}

.danger-zone-panel {
    background: #fff;
    border: 1px solid #f0d9c6;
    border-radius: 12px;
    padding: 24px 28px;
    max-width: 480px;
    margin-top: 30px;
}

.danger-zone-panel h3 {
    margin-top: 0;
    color: #8a4a1f;
    font-size: 1rem;
}

.admin-form-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    box-sizing: border-box;
}

.admin-form-field select:focus {
    outline: none;
    border-color: #4a5c3a;
}



.password-toggle-btn:hover {
    color: #4a5c3a;
}

.login-box button.password-toggle-btn {
    margin-top: 0;
    padding: 0;
    background: none;
    color: #777;
    border-radius: 0;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.login-box button.password-toggle-btn:hover {
    color: #4a5c3a;
}

/* My Profile */
.profile-card {
    max-width: 480px;
}

.profile-card .admin-form-field p {
    margin: 0;
    color: #444;
}

.profile-help-text {
    font-size: 0.8rem;
    color: #777;
    margin-top: 6px;
}

.profile-password-card {
    margin-top: 20px;
}

.profile-password-card h3 {
    margin-top: 0;
    color: #4a5c3a;
    font-size: 1rem;
}

.profile-password-card .profile-help-text {
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.pc-block-group .pc-answer-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pc-subquestion {
    border: 1px solid #e8e4d8;
    border-radius: 6px;
    padding: 12px 14px;
    background: #fdfcf8;
}

.pc-subquestion-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #4a5c3a;
    margin-bottom: 8px;
}

.pc-subquestion textarea {
    width: 100%;
    box-sizing: border-box;
}

.risk-assessment-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.risk-assessment-modal {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
}

.risk-assessment-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.85rem;
}

.risk-assessment-table th {
    background: #dce4d0;
    color: #4a5c3a;
    padding: 8px;
    text-align: left;
}

.risk-assessment-table td {
    border: 1px solid #ddd;
    padding: 4px;
}

.risk-assessment-table td:last-child {
    width: 32px;
    text-align: center;
    padding: 4px 0;
}

.risk-assessment-table input {
    width: 100%;
    border: none;
    padding: 6px;
    box-sizing: border-box;
    font-size: 0.85rem;
}

.ra-delete-row-btn {
    background: none;
    border: none;
    color: #a94442;
    cursor: pointer;
    font-size: 1.1rem;
    width: 100%;
    padding: 0;
    text-align: center;
}

.risk-assessment-modal-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}

.btn-secondary {
    padding: 8px 16px;
    border: 1px solid #4a5c3a;
    background: #fff;
    color: #4a5c3a;
    border-radius: 4px;
    cursor: pointer;
}

.ra-add-row-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: -1px;
    padding-right: 4px;
}

.ra-add-row-btn {
    width: 100%;
    border: none;
    background: none;
    color: #4a5c3a;
    font-size: 1.4rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    text-align: center;
}

.ra-add-row-btn:hover {
    color: #3d4d30;
}

.ra-add-row-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.ra-cancel-btn {
    margin-top: 8px;
    padding: 8px 18px;
    background: #fff;
    color: #4a5c3a;
    border: 1px solid #4a5c3a;
    border-radius: 4px;
    cursor: pointer;
}

.ra-cancel-btn:hover {
    background: #f5f5f0;
}

/* ── Behaviour Worksheet ── */

.bw-block {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 24px;
    margin-top: 8px;
    overflow: hidden;
}

.bw-heading {
    background: #dce4d0;
    color: #4a5c3a;
    padding: 12px 16px;
    margin: 0;
    font-size: 1rem;
    font-weight: bold;
}

.bw-block .badge,
.bw-block .btn-secondary {
    margin: 12px 16px;
    display: inline-block;
}

.bw-comments {
    margin: 12px 16px;
    padding: 10px 14px;
    background: #f5f7f2;
    border-left: 3px solid #4a5c3a;
    border-radius: 4px;
}

.bw-comment {
    margin: 4px 0;
    color: #4a5c3a;
    font-size: 0.92rem;
}

/* Modal styling — matches risk assessment modal */
.bw-modal .field-row {
    margin-bottom: 18px;
}

.bw-modal .field-row label {
    display: block;
    font-weight: bold;
    color: #4a5c3a;
    background: #dce4d0;
    padding: 8px 12px;
    border-radius: 4px 4px 0 0;
    margin-bottom: 0;
    font-size: 0.92rem;
}

.bw-modal .field-row textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    padding: 10px 12px;
    font-size: 0.92rem;
    font-family: inherit;
    resize: vertical;
}

.bw-modal .field-row textarea:focus {
    outline: none;
    border-color: #4a5c3a;
}

/* Assessor review read-only answers */
.bw-review {
    padding: 12px 16px;
}

.bw-review p strong {
    display: block;
    color: #4a5c3a;
    background: #dce4d0;
    padding: 8px 12px;
    border-radius: 4px 4px 0 0;
    font-size: 0.92rem;
    margin-bottom: 0;
}

.bw-review .student-answer-box {
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    padding: 10px 12px;
    margin-bottom: 16px;
    background: #fff;
    font-size: 0.92rem;
}

/* ── Behaviour Worksheet overrides (v2) ── */

.bw-modal {
    background: #f5f5f0;
}

.bw-modal .field-row label {
    background: #dce4d0;
    color: #4a5c3a;
}

.bw-modal .field-row textarea {
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    display: block;
    border: 1px solid #c5cfc0;
    border-top: none;
}

/* ── Behaviour Worksheet textarea full-width fix ── */
.bw-modal .field-row textarea {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #c5cfc0;
    border-top: none;
    border-radius: 0 0 4px 4px;
    font-family: inherit;
    font-size: 0.92rem;
    padding: 10px 12px;
    resize: vertical;
}

.bw-modal .field-row label {
    background: #dce4d0;
    color: #4a5c3a;
    padding: 8px 12px;
    border-radius: 4px 4px 0 0;
    margin-bottom: 0;
    font-size: 0.92rem;
    display: block;
    font-weight: bold;
}

.bw-modal {
    background: #f5f5f0;
}

/* ── BW textarea specificity fix ── */
.risk-assessment-modal.bw-modal .field-row textarea {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
}

/* ── BW textarea ID-level fix ── */
#bw-answer_1a, #bw-answer_1b, #bw-answer_2, #bw-answer_3 {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #c5cfc0;
    border-top: none;
    border-radius: 0 0 4px 4px;
    font-family: inherit;
    font-size: 0.92rem;
    padding: 10px 12px;
    resize: vertical;
    display: block;
}
