@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
  --primary: #386193;
  --primary-dark: #244D7A;
  --primary-light: #4a7ab5;
  --accent: #008D49;
  --accent-light: #6C9A36;
  --danger: #9D0B1D;
  --danger-dark: #7E1824;
  --warning: #f39c12;
  --bg: #f8f9fa;
  --card: #ffffff;
  --text: #000000;
  --text-light: #444444;
  --border: #ccc;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* Header - matches NeneForms */
#mast { background: #386193; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,.1); flex-shrink: 0; }
#mast img { max-width: 100%; height: 60px; display: block; }
.user-bar { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.user-email { color: rgba(255,255,255,0.85); font-size: 0.85em; }
.logout-btn { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.4); color: #fff; padding: 5px 14px; border-radius: 20px; cursor: pointer; font-size: 0.8em; transition: all 0.2s ease; }
.logout-btn:hover { background: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.7); }
.theme-toggle { background: none; border: none; cursor: pointer; font-size: 1.2em; padding: 0 4px; line-height: 1; }
.theme-toggle:hover { opacity: 0.7; }

main { max-width: 800px; margin: 32px auto; padding: 0 24px; }

/* Navigation */
.main-nav { background: var(--primary-dark); padding: 0 20px; }
.nav-inner { max-width: 800px; margin: 0 auto; display: flex; gap: 4px; align-items: center; }
.nav-back-btn { background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; padding: 8px 12px; border-radius: 4px; opacity: 0.7; }
.nav-back-btn:hover { opacity: 1; background: rgba(255,255,255,0.1); }
.nav-item { position: relative; }
.nav-btn { background: none; border: none; color: #fff; padding: 12px 16px; font-family: inherit; font-size: 0.9rem; cursor: pointer; text-decoration: none; display: block; border-radius: 4px 4px 0 0; }
a.nav-item.nav-btn { display: flex; align-items: center; padding: 12px 16px; line-height: 1; }
.nav-btn:hover { background: rgba(255,255,255,0.1); }
.nav-dropdown { display: none; position: absolute; top: 100%; left: 0; background: var(--card); border: 1px solid var(--border); border-radius: 0 var(--radius) var(--radius) var(--radius); min-width: 200px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 100; }
.nav-dropdown a { display: block; padding: 10px 16px; color: var(--text); text-decoration: none; font-size: 0.9rem; }
.nav-dropdown a:hover { background: #f0f4f8; }
.nav-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.nav-dropdown .nav-note { padding: 10px 16px; color: var(--text-light); font-size: 0.8rem; font-style: italic; }
.dropdown.open .nav-dropdown { display: block; }

/* Feedback page styles */
.guidance-box { background: #f0f6ff; border: 1px solid #c8ddf5; border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.guidance-box h4 { color: var(--primary); margin-bottom: 8px; }
.guidance-box ul { padding-left: 20px; font-size: 0.9rem; }
.guidance-box li { margin-bottom: 6px; }
.guidance-box details { margin-top: 12px; font-size: 0.85rem; }
.guidance-box summary { cursor: pointer; color: var(--primary); font-weight: 500; }
.search-results { border: 1px solid var(--border); border-radius: var(--radius); max-height: 150px; overflow-y: auto; display: none; }
.search-results.active { display: block; }
.search-results div { padding: 8px 12px; cursor: pointer; }
.search-results div:hover { background: #f0f4f8; }
.selected-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.selected-tags .tag { background: var(--primary); color: #fff; padding: 4px 10px; border-radius: 12px; font-size: 0.8rem; display: flex; align-items: center; gap: 4px; }
.selected-tags .tag button { background: none; border: none; color: #fff; cursor: pointer; font-size: 1rem; line-height: 1; }
.template-options { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.template-options label { font-weight: normal; cursor: pointer; }
.template-preview { background: #f8f9fa; border-radius: var(--radius); padding: 12px; margin-top: 8px; font-size: 0.9rem; color: var(--text-light); }
.help-text { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }
.review-banner { background: #fff3cd; border: 1px solid #ffc107; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }
.review-banner p { margin: 0; font-size: 0.9rem; }

/* Search results */
.search-results-panel { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; max-height: 300px; overflow-y: auto; }
.search-count { font-size: 0.8rem; color: var(--text-light); margin-bottom: 8px; }
.search-result-item { padding: 8px; border-bottom: 1px solid var(--border); }
.search-result-item:last-child { border-bottom: none; }
.search-section { font-size: 0.75rem; font-weight: 600; color: var(--primary); text-transform: uppercase; }
.search-snippet { font-size: 0.85rem; margin: 4px 0 0; color: var(--text); }
.search-snippet mark { background: #fff3a8; padding: 1px 2px; border-radius: 2px; }

.step { display: none; background: var(--card); border-radius: var(--radius); padding: 32px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.step.active { display: block; }

h2 { color: var(--primary); margin-bottom: 8px; }
.subtitle { color: var(--text-light); margin-bottom: 20px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.9rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
}
.form-group textarea { resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 2px rgba(56,97,147,0.15); }

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
}
.btn-primary:hover { background: var(--primary-light); }
.btn-primary:disabled { background: #666; cursor: not-allowed; }

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
}
.btn-secondary:hover { background: #dce6f1; }

/* Consent */
.consent-box { background: #f0f7ff; border: 1px solid #b8d4f0; border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.consent-box p { margin-bottom: 8px; }
.consent-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* Recording */
.recording-controls { text-align: center; padding: 24px 0; }
#recording-status { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
#recording-timer { font-size: 2.5rem; font-weight: 700; font-family: 'Courier New', monospace; margin: 16px 0; }
.status-idle { color: var(--text-light); }
.status-recording { color: var(--danger); }

/* Audio level indicator */
.audio-indicator { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 8px 0; }
.mic-icon { font-size: 1.5rem; }
.audio-indicator.active .mic-icon { animation: pulse-mic 1s ease-in-out infinite; }
.audio-bars { display: flex; align-items: flex-end; gap: 3px; height: 24px; }
.audio-bars .bar { width: 4px; background: var(--accent); border-radius: 2px; min-height: 3px; transition: height 0.1s ease; }
.audio-indicator.silent .audio-bars .bar { background: var(--danger); }
.audio-indicator.silent .mic-icon { opacity: 0.5; }
@keyframes pulse-mic { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.status-paused { color: var(--warning); }
.controls { display: flex; gap: 12px; justify-content: center; margin: 20px 0; }
.btn-record { background: var(--danger); color: white; border: none; padding: 12px 24px; border-radius: var(--radius); font-size: 1rem; cursor: pointer; font-weight: 600; }
.btn-teams { background: #5b5fc7; color: white; border: none; padding: 12px 24px; border-radius: var(--radius); font-size: 1rem; cursor: pointer; font-weight: 600; }
.btn-teams:hover { background: #4b4fb7; }
.recording-warning { background: #fff3cd; border: 1px solid #ffc107; border-radius: var(--radius); padding: 10px 14px; margin-top: 12px; font-size: 0.85rem; }
[data-theme="dark"] .recording-warning { background: #2e2a0a; border-color: #665500; }
@media (max-width: 480px) { .btn-teams { display: none; } .recording-warning { display: none; } }
.btn-pause { background: var(--warning); color: white; border: none; padding: 12px 24px; border-radius: var(--radius); font-size: 1rem; cursor: pointer; font-weight: 600; }
.btn-stop { background: #555; color: white; border: none; padding: 12px 24px; border-radius: var(--radius); font-size: 1rem; cursor: pointer; font-weight: 600; }
.btn-record:disabled, .btn-teams:disabled, .btn-pause:disabled, .btn-stop:disabled { opacity: 0.4; cursor: not-allowed; }
.recording-hint { color: var(--text-light); font-size: 0.85rem; margin-top: 12px; }

/* Processing */
.processing-status { text-align: center; padding: 40px 0; }
.spinner { width: 48px; height: 48px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-steps { display: flex; align-items: center; margin-top: 24px; max-width: 400px; margin-left: auto; margin-right: auto; }
.ps-step { flex: 1; text-align: center; font-size: 0.75rem; font-weight: 600; color: var(--text-light); position: relative; padding-top: 20px; }
.ps-step::before { content: ''; position: absolute; top: 6px; left: 0; right: 0; height: 6px; background: #e0e0e0; border-radius: 3px; }
.ps-step:first-child::before { border-radius: 3px 0 0 3px; }
.ps-step:last-child::before { border-radius: 0 3px 3px 0; }
.ps-step::after { content: ''; position: absolute; top: 3px; left: 50%; width: 12px; height: 12px; margin-left: -6px; background: #e0e0e0; border-radius: 50%; z-index: 1; }
.ps-step.done::before { background: var(--accent); }
.ps-step.done::after { background: var(--accent); }
.ps-step.active::before { background: linear-gradient(90deg, var(--accent) 50%, #e0e0e0 50%); animation: fillBar 2s linear infinite; }
.ps-step.active::after { background: var(--primary); box-shadow: 0 0 0 3px rgba(56,97,147,0.25); }
.ps-step.done { color: var(--accent); }
.ps-step.active { color: var(--primary); }
@keyframes fillBar { 0% { background-size: 200% 100%; background-position: 100% 0; } 100% { background-size: 200% 100%; background-position: 0 0; } }

/* Review */
.confirm-box { background: #f0f7ff; border: 1px solid #b8d4f0; border-radius: var(--radius); padding: 16px; margin: 20px 0; }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.checkbox-label input { width: 18px; height: 18px; }

/* Done */
.done-box { text-align: center; padding: 24px 0; }
.done-box p { font-size: 1.1rem; margin-bottom: 20px; color: var(--accent); font-weight: 600; }
.done-box button { margin: 0 8px; }
.done-vip-content { text-align: left; margin: 20px 0; padding: 20px; background: var(--card-bg); border-radius: 8px; border: 1px solid var(--border); max-height: 500px; overflow-y: auto; }
.done-vip-content h4 { color: var(--primary); margin: 20px 0 8px 0; font-size: 0.9rem; padding: 6px 10px; background: rgba(56,97,147,0.1); border-left: 3px solid var(--primary); }
.done-vip-content h4:first-child { margin-top: 0; }
.done-vip-content p { margin: 0 0 10px 0; white-space: pre-wrap; font-size: 0.85rem; line-height: 1.6; font-weight: normal; color: var(--text); padding: 0 10px; }
.done-header { font-size: 1.1rem; padding: 10px; margin-bottom: 16px; border-bottom: 2px solid var(--primary); }
.done-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 0.83rem; }
.done-table th { background: var(--primary); color: white; padding: 6px 10px; text-align: left; font-weight: 600; }
.done-table td { padding: 6px 10px; border: 1px solid var(--border); vertical-align: top; }
.done-manager-comments { margin: 4px 10px 12px; padding: 10px; background: rgba(46,125,50,0.08); border-radius: 6px; border-left: 3px solid #2e7d32; }
.done-manager-comments p { padding: 0; margin: 0; }

/* Previous sessions */
/* Conversation prompts */
.conversation-prompts { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 20px; }
.conversation-prompts h3 { font-size: 1rem; color: var(--primary); margin-bottom: 4px; }
.conversation-prompts > p { color: var(--text-light); font-size: 0.85rem; margin-bottom: 12px; }
.prompts-columns { display: flex; flex-direction: column; gap: 24px; }
.prompt-section { border: 1px solid var(--border); border-radius: var(--radius); padding: 0; }
.prompt-section summary { font-size: 0.85rem; font-weight: 600; color: var(--primary); padding: 12px 16px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.prompt-section summary::-webkit-details-marker { display: none; }
.prompt-section summary::after { content: '▾'; font-size: 0.9rem; color: var(--text-light); }
.prompt-section[open] summary::after { content: '▴'; }
.prompt-section ul { list-style: none; padding: 0 16px 12px; margin-bottom: 0; }
.prompt-section li { font-size: 0.85rem; color: var(--text-light); padding: 5px 0; padding-left: 14px; position: relative; }
.prompt-section li::before { content: "•"; position: absolute; left: 0; color: var(--primary); }
.prompt-subheading { font-size: 0.8rem; margin: 8px 16px 2px; color: var(--text); }
.prompt-tag { font-size: 0.7rem; font-weight: normal; background: #e8f0fe; color: var(--primary); padding: 1px 6px; border-radius: 3px; vertical-align: middle; }


#previous-sessions { margin-top: 32px; border-top: 1px solid var(--border); padding-top: 20px; }
#previous-sessions h3 { margin-bottom: 12px; }
.session-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; }
.session-item.clickable { cursor: pointer; }
.session-item.clickable:hover { background: #f0f4f8; }
.session-item.disabled { opacity: 0.6; cursor: default; }
.session-item.expired { opacity: 0.5; border-style: dashed; }
.session-item .name { font-weight: 600; }
.sessions-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.sessions-table th { text-align: left; padding: 8px 10px; border-bottom: 2px solid var(--primary); color: var(--primary); font-size: 0.8rem; font-weight: 600; }
.sessions-table th.sortable { cursor: pointer; user-select: none; }
.sessions-table th.sortable:hover { background: rgba(56,97,147,0.08); }
.sessions-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.sessions-table tr.clickable { cursor: pointer; }
.sessions-table tr.clickable:hover { background: rgba(56,97,147,0.05); }
.sessions-table tr.disabled { opacity: 0.5; }
.sessions-table tr.expired { opacity: 0.4; }
.sessions-table .name-cell { font-weight: 600; }
.sessions-table .date-cell { color: var(--text-light); font-size: 0.82rem; }
.session-item .date { color: var(--text-light); font-size: 0.85rem; }
.method-badge { font-size: 0.7rem; padding: 1px 6px; border-radius: 8px; margin-left: 8px; font-weight: 600; }
.method-recorded { background: #e3f2fd; color: #1565c0; }
.method-manual { background: #fff3e0; color: #e65100; }
.session-actions { display: flex; align-items: center; gap: 8px; }
.session-item .status-badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.btn-delete { background: none; border: none; color: #c00; font-size: 1.1rem; cursor: pointer; padding: 2px 6px; border-radius: 4px; line-height: 1; }
.btn-delete:hover { background: rgba(200,0,0,0.1); }
.form-buttons { display: flex; gap: 12px; margin-top: 16px; }
#page-my-vips-employee h3 { margin-top: 32px; }
#page-my-vips-employee > .btn-secondary { margin-top: 24px; }
#page-manage-vips > .btn-secondary { margin-top: 24px; }
.vip-type-selector { margin-bottom: 20px; margin-top: 16px; }
.vip-type-selector label { font-size: 1.1rem; font-weight: 600; }
.vip-type-options { margin-top: 12px; }
.vip-type-btn { padding: 12px 24px; border: 2px solid var(--border); border-radius: 8px; background: var(--card-bg); cursor: pointer; font-size: 0.95rem; font-weight: 600; color: var(--text); transition: all 0.2s; }
.vip-type-btn:hover { border-color: var(--primary); background: rgba(56,97,147,0.05); }
.vip-type-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.status-badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 8px; font-weight: 600; }
.status-finalised { background: #d4edda; color: #006633; }
.status-review { background: #fff3cd; color: #856404; }
.status-awaiting-review { background: #fff3cd; color: #856404; }
.status-created { background: #e2e3e5; color: #383d41; }
.status-uploading { background: #e3f2fd; color: #1565c0; }
.status-transcribing { background: #e3f2fd; color: #1565c0; }
.status-deleted { background: #f8d7da; color: #721c24; }


/* Objectives grid */
.objectives-grid { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; }
.obj-header { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr; background: var(--primary); color: white; font-size: 0.8rem; font-weight: 600; }
.obj-header span { padding: 8px; }
.obj-row { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr; border-top: 1px solid var(--border); }
.obj-row input, .obj-row select, .obj-row textarea { border: none; border-radius: 0; padding: 8px; font-size: 0.85rem; border-right: 1px solid var(--border); font-family: inherit; resize: vertical; word-wrap: break-word; }
.obj-row input:last-child, .obj-row select:last-child { border-right: none; }
.obj-row input:focus, .obj-row select:focus { outline: none; background: #f0f7ff; }
.btn-small { background: none; border: 1px solid var(--border); padding: 4px 12px; border-radius: 4px; font-size: 0.8rem; cursor: pointer; color: var(--primary); }
.btn-small:hover { background: #f0f4f8; }

/* Dark Mode */
[data-theme="dark"] { color-scheme: dark; }
[data-theme="dark"] body, [data-theme="dark"] html { background: #181b20; color: #e6edf3; }
[data-theme="dark"] .step { background: #1e2228; border-color: #2a2f37; box-shadow: 0 1px 4px rgba(0,0,0,0.4); }
[data-theme="dark"] h2 { color: #58a6ff; }
[data-theme="dark"] .subtitle { color: #8b949e; }
[data-theme="dark"] .form-group label { color: #e6edf3; }
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select { background: #1e2228; border-color: #2a2f37; color: #e6edf3; }
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus { border-color: #58a6ff; box-shadow: 0 0 0 2px rgba(88,166,255,0.15); }
[data-theme="dark"] .btn-primary { background: #238636; }
[data-theme="dark"] .btn-primary:hover { background: #2ea043; }
[data-theme="dark"] .btn-secondary { background: #1e2228; color: #58a6ff; border-color: #2a2f37; }
[data-theme="dark"] .btn-secondary:hover { background: #2a2f37; border-color: #58a6ff; }
[data-theme="dark"] .vip-type-btn { background: #1e2228; border-color: #2a2f37; color: #e6edf3; }
[data-theme="dark"] .vip-type-btn:hover { border-color: #58a6ff; background: #2a2f37; }
[data-theme="dark"] .vip-type-btn.active { border-color: #58a6ff; background: #58a6ff; color: #fff; }
[data-theme="dark"] .sessions-table th { background: #1e2228; border-color: #2a2f37; color: #58a6ff; }
[data-theme="dark"] .sessions-table td { border-color: #2a2f37; color: #e6edf3; }
[data-theme="dark"] .sessions-table tr.clickable:hover { background: #2a2f37; }
[data-theme="dark"] .method-badge.method-recorded { background: #0d2137; color: #58a6ff; }
[data-theme="dark"] .method-badge.method-manual { background: #2e1f0a; color: #f0883e; }
[data-theme="dark"] .status-badge.status-finalised { background: #0d2818; color: #3fb950; }
[data-theme="dark"] .status-badge.status-review, [data-theme="dark"] .status-badge.status-awaiting-review { background: #2e2a0a; color: #d29922; }
[data-theme="dark"] .status-badge.status-created { background: #1c2128; color: #8b949e; }
[data-theme="dark"] .btn-delete { color: #f85149; }
[data-theme="dark"] .btn-delete:hover { background: rgba(248,81,73,0.1); }
[data-theme="dark"] .done-vip-content { background: #1e2228; border-color: #2a2f37; }
[data-theme="dark"] .done-vip-content h4 { background: rgba(88,166,255,0.08); border-color: #58a6ff; }
[data-theme="dark"] .done-table th { background: #2a2f37; }
[data-theme="dark"] .done-table td { border-color: #2a2f37; }
[data-theme="dark"] .done-manager-comments { background: rgba(63,185,80,0.08); border-color: #3fb950; }
[data-theme="dark"] .consent-box { background: #2a2f37; border-color: #363c45; }
[data-theme="dark"] .confirm-box { background: #2a2f37; border-color: #363c45; }
[data-theme="dark"] .recording-hint { color: #8b949e; }
[data-theme="dark"] #recording-timer { color: #e6edf3; }
[data-theme="dark"] .ps-step { color: #8b949e; }
[data-theme="dark"] .ps-step::before { background: #30363d; }
[data-theme="dark"] .ps-step::after { background: #30363d; }
[data-theme="dark"] .ps-step.done { color: var(--accent); }
[data-theme="dark"] .ps-step.done::before { background: var(--accent); }
[data-theme="dark"] .ps-step.done::after { background: var(--accent); }
[data-theme="dark"] .ps-step.active { color: #58a6ff; }
[data-theme="dark"] .ps-step.active::after { background: #58a6ff; box-shadow: 0 0 0 3px rgba(88,166,255,0.25); }
[data-theme="dark"] .session-item { border-color: #30363d; color: #e6edf3; }
[data-theme="dark"] .session-item:hover { border-color: #58a6ff; background: #1c2128; }
[data-theme="dark"] .session-item .date { color: #8b949e; }
[data-theme="dark"] #previous-sessions { border-color: #30363d; }
[data-theme="dark"] .done-box p { color: #3fb950; }
[data-theme="dark"] .conversation-prompts { border-color: #30363d; }
[data-theme="dark"] .prompt-section { border-color: #30363d; }
[data-theme="dark"] .prompt-section summary { color: #58a6ff; }
[data-theme="dark"] .prompt-section li { color: #8b949e; }
[data-theme="dark"] .objectives-grid { border-color: #30363d; }
[data-theme="dark"] .obj-header { background: #238636; }
[data-theme="dark"] .obj-row { border-color: #30363d; }
[data-theme="dark"] .obj-row input, [data-theme="dark"] .obj-row select, [data-theme="dark"] .obj-row textarea { background: #0d1117; color: #e6edf3; border-color: #30363d; }
[data-theme="dark"] .obj-row input:focus, [data-theme="dark"] .obj-row select:focus, [data-theme="dark"] .obj-row textarea:focus { background: #1c2128; }
[data-theme="dark"] .btn-small { border-color: #30363d; color: #58a6ff; }
[data-theme="dark"] .btn-small:hover { background: #1c2128; }

/* History view */
.history-controls { display: flex; gap: 8px; margin-bottom: 12px; }
.history-controls input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9rem; }
.history-header { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.history-header input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9rem; }
.history-header select { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.history-month { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.history-month-header { background: var(--primary); color: white; padding: 8px 14px; font-weight: 600; font-size: 0.9rem; cursor: pointer; display: flex; justify-content: space-between; }
.history-month-body { padding: 14px; display: none; }
.history-month-body.open { display: block; }
.history-field { margin-bottom: 10px; }
.history-field label { font-weight: 600; font-size: 0.8rem; color: var(--primary); display: block; margin-bottom: 2px; }
.history-field p { font-size: 0.85rem; color: var(--text); margin: 0; }
.history-highlight { background: #fff3cd; padding: 0 2px; border-radius: 2px; }

/* Transcript panel */
.transcript-toggle { margin-bottom: 12px; }
.transcript-panel { background: #f8f9fa; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; max-height: 300px; overflow-y: auto; }
.transcript-panel h4 { color: var(--primary); margin-bottom: 4px; }
.transcript-hint { font-size: 0.8rem; color: var(--text-light); margin-bottom: 8px; }
.transcript-content { font-size: 0.85rem; white-space: pre-wrap; line-height: 1.6; }

/* Wellbeing */
.wellbeing-notice { background: #f0f7ff; border: 1px solid #b8d4f0; border-radius: var(--radius); padding: 12px; margin-top: 16px; text-align: left; }

/* Previous context on recording screen */
.record-context { background: #f7fafd; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.record-context h3 { color: var(--primary); margin-bottom: 12px; font-size: 1rem; }
.context-section { margin-bottom: 16px; }
.context-section h4 { font-size: 0.85rem; color: var(--primary-dark); margin-bottom: 8px; }
.last-summary { list-style: none; padding: 0; }
.last-summary li { font-size: 0.85rem; padding: 4px 0 4px 14px; position: relative; color: var(--text); }
.last-summary li::before { content: "•"; position: absolute; left: 0; color: var(--primary); }
[data-theme="dark"] .record-context { background: #1c2128; border-color: #30363d; }
[data-theme="dark"] .context-section h4 { color: #58a6ff; }
[data-theme="dark"] .last-summary li { color: #e6edf3; }
.wellbeing-notice p { font-size: 0.85rem; margin: 0; }
.wellbeing-check { margin-top: 8px; }
.wellbeing-note { font-weight: normal; font-size: 0.8rem; color: var(--text-light); }

/* Export options */
.export-options { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.export-options select { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.export-options label { font-weight: 600; font-size: 0.9rem; }

/* Dark mode extras */
[data-theme="dark"] .history-controls input,
[data-theme="dark"] .history-header input,
[data-theme="dark"] .history-header select { background: #0d1117; border-color: #30363d; color: #e6edf3; }
[data-theme="dark"] .history-month { border-color: #30363d; }
[data-theme="dark"] .history-month-body { background: #161b22; }
[data-theme="dark"] .history-field label { color: #58a6ff; }
[data-theme="dark"] .history-field p { color: #e6edf3; }
[data-theme="dark"] .transcript-panel { background: #1c2128; border-color: #30363d; }
[data-theme="dark"] .transcript-content { color: #e6edf3; }
[data-theme="dark"] .wellbeing-notice { background: #1c2128; border-color: #30363d; }
[data-theme="dark"] .export-options select { background: #0d1117; border-color: #30363d; color: #e6edf3; }


/* End of Year Assessment */
.eoy-section { margin-top: 16px; }

/* Actions panel */
.actions-panel { background: #fff9e6; border: 1px solid #f0d060; border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.actions-panel h4 { color: var(--warning); margin-bottom: 10px; font-size: 0.95rem; }
.action-item { padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
.action-item:last-child { border-bottom: none; }
.action-item .checkbox-label { font-weight: normal; font-size: 0.9rem; }
.action-owner-tag { color: var(--text-light); font-size: 0.8rem; }
.action-row { display: flex; gap: 8px; margin-bottom: 8px; }
.action-row input { flex: 1; }
.action-row .action-owner { flex: 0 0 150px; }

/* Phone notice */
.phone-notice { background: #e8f4fd; border: 1px solid #b8d4f0; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; font-size: 0.85rem; color: var(--text); }

/* Evidence field */
.evidence-field textarea { border-color: var(--warning); }

/* Dark mode for new elements */
[data-theme="dark"] .actions-panel { background: #2d2a1a; border-color: #5a4d00; }
[data-theme="dark"] .actions-panel h4 { color: #f5c842; }
[data-theme="dark"] .action-item { border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .phone-notice { background: #1c2128; border-color: #30363d; }
