:root {
    color-scheme: light;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: #173047;
    background: #f2f6fa;
    font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at top left, #e0edf7 0, transparent 46%), #f2f6fa; }
.login-card { width: min(100%, 440px); padding: clamp(26px, 7vw, 44px); border: 1px solid #e0e8ef; border-radius: 20px; background: #fff; box-shadow: 0 18px 55px rgb(29 61 86 / 10%); }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #fff; background: #123b5d; font-size: 14px; font-weight: 800; letter-spacing: .06em; }
.eyebrow { margin: 28px 0 8px; color: #36709a; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
h1 { margin: 0; color: #15334c; font-size: clamp(25px, 7vw, 32px); line-height: 1.2; }
.intro { margin: 10px 0 28px; color: #687c8e; font-size: 15px; }
form { display: grid; gap: 10px; }
label { margin-top: 5px; color: #29465e; font-size: 14px; font-weight: 650; }
input { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #ccd8e2; border-radius: 10px; background: #fff; color: #173047; font: inherit; font-size: 16px; }
input:focus { border-color: #3679a7; outline: 3px solid rgb(54 121 167 / 15%); }
button { min-height: 52px; margin-top: 12px; border: 0; border-radius: 10px; background: #123b5d; color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
button:hover { background: #1a527d; }
.back-link { display: block; margin-top: 24px; color: #24638e; font-weight: 700; text-align: center; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.login-note { margin: 20px 0 0; color: #728496; font-size: 13px; line-height: 1.5; text-align: center; }

.workspace-page { min-height: 100vh; background: #f3f6f9; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px clamp(16px, 4vw, 52px); background: #fff; border-bottom: 1px solid #e2eaf0; }
.brand { display: flex; align-items: center; gap: 12px; color: #173047; text-decoration: none; font-weight: 750; }
.brand .brand-mark { width: 42px; height: 42px; border-radius: 12px; }
.brand-name { font-size: 16px; }
.session-info { display: flex; align-items: center; gap: clamp(14px, 3vw, 38px); }
.session-user, .session-date { display: grid; gap: 3px; }
.top-label { color: #7b8b99; font-size: 11px; }
.session-info strong { color: #253f55; font-size: 13px; }
.logout-button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid #d5e0e8; border-radius: 9px; color: #284860; font-size: 13px; font-weight: 700; text-decoration: none; }
.logout-button:hover { color: #fff; border-color: #123b5d; background: #123b5d; }
.workspace { width: min(1180px, 100%); display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; margin: 0 auto; padding: 34px 22px; }
.profile-panel, .entry-panel { border: 1px solid #e1e8ee; border-radius: 16px; background: #fff; box-shadow: 0 8px 28px rgb(27 56 79 / 4%); }
.profile-panel { align-self: start; padding: 26px 22px; text-align: center; }
.panel-kicker { margin: 0; color: #6d8192; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.profile-photo { width: 104px; height: 104px; display: grid; place-items: center; overflow: hidden; margin: 24px auto 16px; border: 4px solid #e9f1f7; border-radius: 50%; background: #dceaf4; color: #1a527d; font-size: 36px; font-weight: 750; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-panel h1 { font-size: 19px; overflow-wrap: anywhere; }
.cdc-number { display: grid; gap: 5px; margin-top: 22px; padding: 15px 10px; border-radius: 11px; background: #f3f7fa; }
.cdc-number span { color: #748798; font-size: 12px; }
.cdc-number strong { color: #214862; font-size: 15px; letter-spacing: .03em; }
.entry-panel { min-height: 520px; padding: 26px; }
.entry-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.entry-heading h2 { margin: 6px 0 0; color: #15334c; font-size: 24px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 20px; background: #eef8f3; color: #347254; font-size: 12px; font-weight: 700; }
.status-pill span { width: 7px; height: 7px; border-radius: 50%; background: #43a675; }
#cdc-entry-form { margin-top: 22px; }
.section-buttons { display: grid; gap: 11px; }
.section-button { width: 100%; min-height: 61px; margin: 0; padding: 13px 18px; border: 1px solid #17496d; border-radius: 11px; background: #15527b; color: #fff; text-align: left; font-size: 16px; transition: background .15s ease, transform .15s ease; }
.section-button:hover, .section-button.is-active { border-color: #0d395a; background: #0d395a; }
.section-button:active { transform: translateY(1px); }
.section-button-empty { min-height: 48px; }
.section-content { min-height: 66px; display: flex; flex-direction: column; justify-content: center; gap: 5px; margin-top: 16px; padding: 14px 16px; border: 1px dashed #d1dce5; border-radius: 10px; color: #718496; font-size: 13px; line-height: 1.5; }
.section-content strong { color: #284860; font-size: 14px; }
.accept-condition { display: flex; align-items: flex-start; gap: 10px; margin-top: 15px; color: #526a7d; font-size: 13px; font-weight: 500; line-height: 1.5; cursor: pointer; }
.accept-condition input { width: 18px; min-width: 18px; height: 18px; min-height: 18px; margin: 1px 0 0; accent-color: #15527b; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }
.form-actions button { min-width: 110px; min-height: 46px; margin: 0; padding: 0 18px; border-radius: 9px; }
.form-actions .submit-button { background: #15527b; }
.form-actions .submit-button:hover { background: #0d395a; }
.form-actions .cancel-button { border: 1px solid #d1dce5; background: #fff; color: #425d72; }
.form-actions .cancel-button:hover { background: #f1f5f8; }
.form-message { margin: 12px 0 0; color: #9c5b17; font-size: 13px; }
@media (max-width: 720px) {
    .topbar { align-items: flex-start; flex-direction: column; padding: 14px 16px; }
    .session-info { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
    .session-user { min-width: 110px; }
    .session-date { flex: 1; min-width: 145px; }
    .logout-button { min-height: 38px; }
    .workspace { grid-template-columns: 1fr; gap: 14px; padding: 16px 12px 28px; }
    .profile-panel { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 2px 14px; padding: 16px; text-align: left; }
    .profile-panel .panel-kicker { grid-column: 1 / -1; }
    .profile-photo { grid-row: span 2; width: 64px; height: 64px; margin: 10px 0 0; border-width: 3px; font-size: 24px; }
    .profile-panel h1 { align-self: end; font-size: 17px; }
    .cdc-number { grid-column: 2; margin-top: 3px; padding: 0; background: transparent; }
    .cdc-number span { font-size: 11px; }
    .cdc-number strong { font-size: 13px; }
    .entry-panel { min-height: 0; padding: 20px 16px; }
    .entry-heading h2 { font-size: 22px; }
    .section-button { min-height: 56px; }
}

.field-label { margin: 8px 0 0; color: #29465e; font-size: 13px; font-weight: 700; }
.entry-input, .entry-textarea { width: 100%; min-height: 48px; padding: 12px 13px; border: 1px solid #ccd8e2; border-radius: 9px; background: #fff; color: #173047; font: inherit; font-size: 15px; }
.entry-textarea { min-height: 108px; resize: vertical; }
.entry-input:focus, .entry-textarea:focus { border-color: #3679a7; outline: 3px solid rgb(54 121 167 / 15%); }

.word-count { align-self: end; color: #748798; font-size: 12px; }

.file-input { padding: 8px 10px; }
.photo-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 9px; }
.photo-preview-grid img { width: 100%; height: 92px; border-radius: 8px; object-fit: cover; }
.upload-error { margin: 0; color: #a53e3e; font-size: 13px; }

.member-heading { margin: 0 0 12px; color: #284860; font-size: 18px; font-weight: 800; }
.member-list { display: grid; gap: 9px; margin-bottom: 12px; }
.member-option { display: flex; min-height: 42px; align-items: center; gap: 10px; margin: 0; padding: 8px 11px; border: 1px solid #e0e8ee; border-radius: 8px; background: #fbfdfe; color: #36536a; font-size: 14px; font-weight: 600; cursor: pointer; }
.member-option input { width: 18px; min-width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: #15527b; }
.single-photo-preview img { display: block; width: min(100%, 360px); max-height: 260px; margin-top: 10px; border-radius: 9px; object-fit: contain; background: #f3f6f9; }
.admin-workspace { width: min(1180px, 100%); margin: 0 auto; padding: 30px 22px 48px; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.admin-heading h1 { margin-top: 6px; font-size: 28px; }
.admin-heading p:not(.panel-kicker) { margin: 7px 0 0; color: #718496; font-size: 14px; }
.prototype-tag { padding: 8px 11px; border: 1px solid #f0ddb5; border-radius: 20px; background: #fff8e9; color: #8d6826; font-size: 12px; font-weight: 700; white-space: nowrap; }
.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card, .admin-card { border: 1px solid #e1e8ee; border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgb(27 56 79 / 4%); }
.stat-card { display: grid; gap: 8px; padding: 18px; }
.stat-card span { color: #708394; font-size: 13px; }
.stat-card strong { color: #173d58; font-size: 27px; }
.admin-card { margin-top: 16px; padding: 22px; }
.admin-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.admin-section-heading h2 { margin: 0; color: #193a54; font-size: 18px; }
.admin-section-heading p { margin: 6px 0 0; color: #718496; font-size: 13px; }
.assignment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.supervisor-card { padding: 16px; border: 1px solid #e3eaf0; border-radius: 11px; background: #fbfdfe; }
.supervisor-top { display: flex; align-items: center; gap: 11px; }
.supervisor-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #e6f0f7; color: #275a7e; font-size: 13px; font-weight: 800; }
.supervisor-top h3 { margin: 0; color: #28465c; font-size: 14px; }
.supervisor-top div > span { color: #7b8b99; font-size: 12px; }
.assignment-count { display: block; margin-top: 19px; color: #1d4d70; font-size: 24px; }
.assignment-count small { color: #718496; font-size: 12px; font-weight: 500; }
.supervisor-card p { margin: 8px 0 0; color: #8392a0; font-size: 12px; line-height: 1.5; }
.unassigned-note { display: grid; gap: 4px; margin-top: 13px; padding: 13px 15px; border: 1px solid #f1dfba; border-radius: 9px; background: #fffaf0; color: #795e2c; font-size: 13px; }
.unassigned-note span { color: #8b7957; font-size: 12px; line-height: 1.5; }
.admin-primary { min-height: 40px; margin: 0; padding: 0 14px; border-radius: 8px; background: #15527b; font-size: 13px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th, .admin-table td { padding: 12px 10px; border-bottom: 1px solid #edf1f4; color: #38546a; font-size: 13px; }
.admin-table th { color: #718496; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.action-note { color: #8795a1; font-size: 12px; }
.progress-empty { display: grid; justify-items: center; padding: 27px 18px; text-align: center; }
.progress-symbol { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: #edf4f9; color: #34709a; font-size: 23px; }
.progress-empty strong { margin-top: 12px; color: #29475d; font-size: 14px; }
.progress-empty p { max-width: 420px; margin: 6px 0 0; color: #7b8b99; font-size: 13px; line-height: 1.5; }
@media (max-width: 760px) {
    .admin-workspace { padding: 20px 12px 32px; }
    .admin-heading { align-items: flex-start; flex-direction: column; }
    .admin-heading h1 { font-size: 25px; }
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .stat-card { padding: 14px; }
    .stat-card strong { font-size: 23px; }
    .assignment-grid { grid-template-columns: 1fr; }
    .admin-card { padding: 17px 14px; }
    .admin-section-heading { align-items: flex-start; flex-direction: column; }
}

.member-list { gap: 8px; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #e0e8ee; border-radius: 8px; background: #fbfdfe; }
.member-name { color: #36536a; font-size: 14px; }
.attendance-options { display: flex; align-items: center; gap: 14px; }
.attendance-choice { display: inline-flex; align-items: center; gap: 5px; margin: 0; color: #526a7d; font-size: 12px; font-weight: 600; cursor: pointer; }
.attendance-choice input { width: 16px; min-width: 16px; height: 16px; min-height: 16px; margin: 0; accent-color: #15527b; }
.member-empty { margin: 0; color: #758899; font-size: 13px; }
@media (max-width: 480px) { .member-row { align-items: flex-start; flex-direction: column; } }

.section-content { grid-column: 1 / -1; }
.section-content[hidden] { display: none !important; }
.data-flash { margin: 14px 0; padding: 12px 15px; border-radius: 9px; font-size: 13px; }
.data-flash.success { border: 1px solid #c8e8d7; background: #eff9f3; color: #276846; }
.data-flash.error { border: 1px solid #f0cccc; background: #fff3f3; color: #923535; }
.form-actions button:disabled { opacity: .55; cursor: not-allowed; }
.member-row { justify-content: flex-start; cursor: pointer; }
.member-row input[type=checkbox] { width: 18px; min-width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: #15527b; }
.member-row.is-present { border-color: #b7ddc7; background: #f3fbf6; }
.member-presence { margin-left: auto; color: #9a6b38; font-size: 12px; font-weight: 700; }
.member-row.is-present .member-presence { color: #347254; }
.supervisor-workspace { grid-template-columns: 280px minmax(0, 1fr); }
.supervisor-button-area { display: grid; place-content: center; min-height: 150px; margin-top: 20px; padding: 24px; border: 1px dashed #d1dce5; border-radius: 12px; background: #fbfdfe; text-align: center; }
.supervisor-button-area p { margin: 0; color: #36536a; font-size: 15px; font-weight: 700; }
.supervisor-button-area span { margin-top: 7px; color: #7b8b99; font-size: 13px; }
.supervisor-officers { margin-top: 18px; }
@media (max-width: 720px) { .supervisor-workspace { grid-template-columns: 1fr; } }
.section-button.is-complete,
.section-button.is-complete:hover,
.section-button.is-complete.is-active { border-color: #13754c; background: #178451; color: #fff; }
.section-button-special { border-color: #b7791f; background: #d69e2e; }
.section-button-special:hover, .section-button-special.is-active { border-color: #975a16; background: #b7791f; }
.section-button-special.is-complete, .section-button-special.is-complete:hover, .section-button-special.is-complete.is-active { border-color: #13754c; background: #178451; }
.photo-preview-item { position: relative; min-width: 0; overflow: hidden; border-radius: 9px; background: #f3f6f9; }
.photo-preview-item img { display: block; width: 100%; height: 100px; border-radius: 9px; object-fit: cover; }
.photo-preview-item .photo-remove-button { position: absolute; top: 6px; right: 6px; z-index: 1; min-height: 30px; margin: 0; padding: 4px 8px; border: 1px solid rgb(255 255 255 / 80%); border-radius: 7px; background: #b83232; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; box-shadow: 0 1px 5px rgb(0 0 0 / 22%); }
.photo-preview-item .photo-remove-button:hover { background: #8f2525; }
.single-photo-preview .photo-preview-item { width: min(100%, 360px); margin-top: 10px; }
.admin-profile-preview-item { width: 120px; height: 100px; margin-top: 8px; }
