/* Base styles */
:root {
    --bg: #f5f7fa;
    --bg-card: #ffffff;
    --text: #1a1a2e;
    --text-muted: #5a6778;
    --accent: #1565c0;
    --accent-hover: #1976d2;
    --success: #2e7d32;
    --warning: #f57c00;
    --danger: #c62828;
    --border: #e0e4e8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-brand {
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
}

.nav-links { display: flex; gap: 1rem; }
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}
.nav-links a:hover, .nav-links a.active {
    color: #fff;
    background: var(--accent);
}

.nav-search {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}
.nav-search input {
    width: 200px;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.nav-user .user-name {
    color: var(--text-muted);
    font-size: 0.875rem;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.btn-outline:hover {
    background: var(--bg);
    color: var(--text);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card h2 { margin-bottom: 0.5rem; }
.subtitle { color: var(--text-muted); margin-bottom: 1rem; }

/* Status Summary (Dashboard) */
.status-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.status-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.status-count {
    font-size: 3rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.status-label {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-new .status-count { color: var(--accent); }
.status-ignored .status-count { color: var(--text-muted); }
.status-applied .status-count { color: var(--success); }
.status-rejected .status-count { color: var(--danger); }

@media (max-width: 900px) {
    .status-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .status-summary {
        grid-template-columns: 1fr;
    }
}

/* Grids */

.job-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 900px) {
    .job-grid { grid-template-columns: 1fr; }
}

/* Tables */
.table, .table-compact {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td,
.table-compact th, .table-compact td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.table-compact th, .table-compact td { padding: 0.5rem; }
.table th { color: var(--text-muted); font-weight: 500; }
.table a { color: var(--accent); text-decoration: none; }
.table a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-new { background: var(--accent); color: #fff; }
.badge-interested { background: #1565c0; color: #fff; }
.badge-applied { background: #6a1b9a; color: #fff; }
.badge-declined { background: #888; color: #fff; }
.badge-interviewing { background: #00838f; color: #fff; }
.badge-rejected { background: var(--danger); color: #fff; }
.badge-offer { background: var(--success); color: #fff; }
.badge-phone, .badge-video, .badge-in_person { background: var(--accent); color: #fff; }
.badge-repost { background: var(--warning); color: #000; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
}

.btn:hover { background: var(--accent-hover); }
.btn-small { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.btn-secondary { background: var(--border); }
.btn-active { background: var(--accent-hover); }
.btn-disabled, .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.btn-disabled:hover, .btn:disabled:hover { background: var(--border); }

/* Forms */
input, select, textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
}

textarea { resize: vertical; margin-bottom: 0.5rem; }
select { width: auto; }

.status-form, .interest-form-inline {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
}

/* Interest buttons */
.interest-form { margin-top: 1rem; }
.interest-buttons { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-top: 0.5rem; }
.btn-interest {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.btn-interest:hover { background: var(--accent); color: #fff; }
.btn-interest.btn-apply { border-color: var(--success); }
.btn-interest.btn-apply:hover { background: var(--success); }

/* Task cards */
.task-cards { display: flex; flex-direction: column; gap: 1rem; }
.task-card { border-left: 4px solid var(--accent); }
.task-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.task-header h3 { margin: 0; }
.task-header h3 a { color: var(--accent); text-decoration: none; }
.task-header h3 a:hover { color: var(--accent-hover); text-decoration: underline; }
.company { color: var(--text-muted); }
.ai-score { text-align: right; }
.score-label { display: block; font-size: 0.75rem; color: var(--text-muted); }
.score-value { font-size: 1.5rem; font-weight: bold; }
.task-details { margin-bottom: 1rem; }
.task-details p { margin-bottom: 0.25rem; }
.reasoning { color: var(--text-muted); font-style: italic; margin-top: 0.5rem; }
.task-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

/* Job detail - Top bar */
.job-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.topbar-left h1 { margin-bottom: 0.25rem; font-size: 1.5rem; }
.topbar-left .company { margin: 0; }
.topbar-center { display: flex; align-items: center; gap: 1rem; }
.status-inline { display: flex; align-items: center; gap: 0.5rem; }
.status-form-inline { display: flex; align-items: center; gap: 0.5rem; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }

/* Interest picker */
.interest-picker { display: flex; align-items: center; gap: 0.25rem; }
.interest-label { color: var(--text-muted); margin-right: 0.5rem; }
.interest-num {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}
.interest-num:hover { background: var(--accent); color: #fff; }
.interest-num.active { background: var(--accent-hover); color: #fff; border-color: var(--accent-hover); }

/* Job content grid */
.job-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 1100px) {
    .job-content-grid { grid-template-columns: 1fr; }
    .job-topbar { flex-direction: column; align-items: flex-start; }
}

/* Job details */
.details-list { margin-bottom: 1rem; }
.details-list dt { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.5rem; }
.details-list dd { margin-left: 0; }
.description-full { padding: 1rem; background: var(--bg); border-radius: 4px; white-space: pre-wrap; }

/* Meetings section */
.meetings-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.meetings-header h2 { margin: 0; }
.meetings-actions { display: flex; gap: 0.5rem; }
.meeting-form-container { margin-bottom: 1rem; padding: 1rem; background: var(--bg); border-radius: 4px; }
.meeting-form-container.hidden { display: none; }
.form-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.meetings-table { margin-bottom: 1rem; }
.meeting-row { cursor: pointer; }
.meeting-row:hover { background: rgba(21, 101, 192, 0.1); }
.meeting-notes-row.hidden { display: none; }
.meeting-notes-content { padding: 0.75rem; background: var(--bg-card); border-left: 3px solid var(--accent); }

/* Hidden utility */
.hidden { display: none; }

/* Lists */
.task-list, .meeting-list, .reminder-list, .meetings, .notes {
    list-style: none;
}

.task-list li, .meeting-list li, .reminder-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.task-list a { color: var(--accent); text-decoration: none; display: block; }
.task-list a:hover { color: var(--accent-hover); }
.task-list strong { display: block; }

.meeting-item, .note-item {
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.meeting-header { display: flex; justify-content: space-between; margin-bottom: 0.25rem; }
.meeting-details { color: var(--text-muted); font-size: 0.875rem; }
.meeting-connection { margin-top: 0.5rem; font-family: monospace; font-size: 0.875rem; }

.note-content { white-space: pre-wrap; }
.note-meta { font-size: 0.75rem; margin-top: 0.5rem; }

/* Rich text notes */
.note-rich {
    white-space: normal;
}
.note-rich p { margin: 0 0 0.5em 0; }
.note-rich p:last-child { margin-bottom: 0; }
.note-rich ul, .note-rich ol { margin: 0.5em 0; padding-left: 1.5em; }
.note-rich a { color: var(--accent-hover); }

/* Quill editor styling */
#note-editor, #meeting-notes-editor {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    min-height: 100px;
    margin-bottom: 0.5rem;
}
#note-editor .ql-editor, #meeting-notes-editor .ql-editor { min-height: 80px; color: var(--text); }
.ql-toolbar.ql-snow { border-color: var(--border); background: var(--bg); }
.ql-container.ql-snow { border-color: var(--border); }
.ql-snow .ql-stroke { stroke: var(--text-muted); }
.ql-snow .ql-fill { fill: var(--text-muted); }
.ql-snow .ql-picker { color: var(--text-muted); }
.ql-snow .ql-picker-options { background: var(--bg-card); border-color: var(--border); }
.ql-snow.ql-toolbar button:hover, .ql-snow.ql-toolbar button.ql-active { color: var(--accent); }
.ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--accent); }
.ql-snow.ql-toolbar button:hover .ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--accent); }

/* Utility */
.muted { color: var(--text-muted); }
.red-flags { color: var(--danger); }
.error { color: var(--danger); padding: 1rem; background: rgba(198, 40, 40, 0.2); border-radius: 4px; }
.filters { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

.btn-dismiss {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}
.btn-dismiss:hover { background: var(--border); }

.status-display { margin-bottom: 1rem; }
.status-display > * { margin-right: 0.5rem; }
.interest-display { font-weight: bold; }

/* Clickable rows */
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: rgba(21, 101, 192, 0.1); }

/* Run logs */
.log-content {
    background: var(--bg);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.875rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Meetings and Notes grid */
.meetings-notes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.meetings-column h4, .notes-column h4 {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.meeting-notes {
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--accent);
}

.note-inline {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: pre-wrap;
}

/* Form grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.form-section h3 {
    margin-bottom: 0.75rem;
}

.form-row {
    margin-bottom: 0.75rem;
}

.form-row label {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.parse-invite {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.parse-invite summary {
    cursor: pointer;
    color: var(--text-muted);
}

.parse-invite[open] summary {
    margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
    .meetings-notes-grid, .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Two-Panel Task Layout */
.tasks-two-panel {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 1rem;
    min-height: calc(100vh - 180px);
}

.tasks-left-panel {
    flex: 0 0 320px;
    min-width: 320px;
    max-width: 320px;
    background: var(--bg-card);
    border-radius: 8px;
    overflow-y: auto;
    max-height: calc(100vh - 180px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tasks-right-panel {
    flex: 1 1 auto;
    min-width: 0;
    background: var(--bg-card);
    border-radius: 8px;
    overflow-y: auto;
    max-height: calc(100vh - 180px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (max-width: 600px) {
    .tasks-two-panel {
        flex-direction: column;
    }
    .tasks-left-panel {
        flex: none;
    }
    .tasks-left-panel, .tasks-right-panel {
        max-height: none;
    }
}

/* Task List Items */
.task-list {
    list-style: none;
}

.task-list-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
}

.task-list-item:hover {
    background: rgba(21, 101, 192, 0.1);
}

.task-list-item.active {
    background: rgba(21, 101, 192, 0.15);
    border-left: 4px solid var(--accent);
}

/* Task Card Layout */
.task-card-layout {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.task-row-split {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.task-grid-item {
    display: flex;
    flex-direction: column;
}

.task-grid-item-right {
    text-align: right;
}

.task-grid-item-full {
    width: 100%;
}

.task-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-value {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Legacy 2x2 Grid (for messages) */
.task-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

/* Task Type Badges */
.task-type-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-review { background: var(--accent); }
.badge-apply { background: #6a1b9a; }
.badge-message { background: var(--warning); color: #000; }
.badge-applying { background: #6a1b9a; }

/* Task Detail Panel */
.task-detail-content {
    padding: 1.5rem;
}

.task-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.action-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.reject-group {
    margin-left: auto;
}

.reject-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.btn-apply {
    background: var(--success);
}

.btn-apply:hover {
    background: #388e3c;
}

.btn-wait {
    background: var(--warning);
    color: #000;
}

.btn-wait:hover {
    background: #ff9800;
}

.btn-reject {
    background: var(--danger);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-reject:hover {
    background: #d32f2f;
}

.btn-success {
    background: var(--success);
}

.btn-success:hover {
    background: #388e3c;
}

.btn-auto-apply {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    border: none;
    position: relative;
}

.btn-auto-apply:hover {
    background: linear-gradient(135deg, #6d28d9, #9333ea);
}

.btn-auto-apply .htmx-indicator {
    display: none;
}

.btn-auto-apply.htmx-request .htmx-indicator {
    display: inline;
}

/* Auto-apply status indicators */
.auto-apply-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.auto-apply-status.pending {
    background: #e3f2fd;
    color: #1565c0;
}

.auto-apply-status.error {
    background: #ffebee;
    color: #c62828;
}

.auto-apply-status.warning {
    background: #fff3e0;
    color: #e65100;
}

.auto-apply-status.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.auto-apply-status a {
    color: inherit;
    text-decoration: underline;
}

/* Task Job Details */
.task-job-details h2 {
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.task-job-details h2 a {
    color: var(--accent);
    text-decoration: none;
}

.task-job-details h2 a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.task-job-details .company {
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.job-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.meta-value {
    font-size: 1rem;
}

.meta-value.score {
    font-size: 1.25rem;
    font-weight: bold;
}

.job-salary-row {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.job-salary-row .meta-label {
    flex-shrink: 0;
}

.job-salary-row .meta-value {
    font-size: 1.1rem;
}

.job-section {
    margin-bottom: 1rem;
}

.job-section h4 {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.description-snippet {
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 4px;
    white-space: pre-wrap;
    font-size: 0.875rem;
    max-height: 300px;
    overflow-y: auto;
}

.action-result {
    padding: 1rem;
    text-align: center;
}

/* Inline action buttons (job detail page) */
.action-buttons-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.reject-inline {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.reject-inline .reject-label {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Upcoming Meetings Section (in Tasks view) */
.upcoming-meetings-section {
    padding: 0.75rem;
    border-bottom: 2px solid var(--accent);
    background: rgba(21, 101, 192, 0.08);
}

.upcoming-meetings-section h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.meeting-card {
    display: block;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--bg);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text);
    border-left: 3px solid var(--success);
}

.meeting-card:last-child {
    margin-bottom: 0;
}

.meeting-card:hover {
    background: rgba(21, 101, 192, 0.1);
}

.meeting-card .meeting-time {
    font-size: 0.75rem;
    color: var(--warning);
    font-weight: 600;
}

.meeting-card .meeting-countdown {
    color: var(--danger);
    font-weight: 700;
}

.meeting-card .meeting-details {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.meeting-card .meeting-company {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

/* Rich text descriptions */
.description-snippet p,
.description-full p {
    margin-bottom: 0.5em;
}

.description-snippet p:last-child,
.description-full p:last-child {
    margin-bottom: 0;
}

/* Meeting Detail View/Edit Mode */
.meeting-detail-row.hidden { display: none; }
.meeting-detail-content {
    padding: 1rem;
    background: var(--bg);
    border-radius: 4px;
}

.meeting-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 800px) {
    .meeting-sections {
        grid-template-columns: 1fr;
    }
}

.meeting-section h4 {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meeting-view-mode, .meeting-edit-mode {
    transition: opacity 0.15s ease-in-out;
}

.meeting-view-mode.hidden, .meeting-edit-mode.hidden {
    display: none;
}

.meeting-view-actions, .meeting-edit-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Quill editor for meeting detail */
.quill-editor {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.quill-editor .ql-editor {
    min-height: 4.5em; /* ~3 lines of text */
    color: var(--text);
    line-height: 1.5;
}

/* Cancel Confirmation Dialog */
.cancel-confirm-dialog {
    padding: 1rem;
    background: rgba(198, 40, 40, 0.15);
    border: 1px solid var(--danger);
    border-radius: 4px;
    margin-top: 1rem;
}

.cancel-confirm-dialog.hidden {
    display: none;
}

.cancel-confirm-dialog p {
    margin-bottom: 1rem;
    color: var(--text);
}

.dialog-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-primary {
    background: var(--success);
}

.btn-primary:hover {
    background: #388e3c;
}

/* AI Question Generator */
.ai-question-generator {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border);
}

.ai-generator-toggle {
    margin-bottom: 0.5rem;
}

.ai-link {
    color: var(--accent-hover);
    text-decoration: none;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.ai-link:hover {
    color: var(--text);
    text-decoration: underline;
}

.ai-link::before {
    content: "\2728";
}

.ai-generator-form {
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 4px;
    border: 1px solid var(--border);
}

.ai-generator-form.hidden {
    display: none;
}

.ai-notes-input {
    width: 100%;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 50px;
}

.ai-generator-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.ai-generator-actions .btn {
    background: var(--accent);
}

.ai-generator-actions .btn:hover {
    background: var(--accent-hover);
}

.ai-generator-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Interview Countdown Bar */
.interview-countdown-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 12px rgba(21, 101, 192, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(21, 101, 192, 0.7); }
}

.interview-countdown-bar .countdown-content {
    text-align: center;
}

.interview-countdown-bar .countdown-label {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.interview-countdown-bar .countdown-timer {
    font-family: monospace;
    font-size: 3.5rem;
    font-weight: bold;
    letter-spacing: 0.15em;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.interview-countdown-bar .countdown-with {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.interview-countdown-bar.interview-now {
    background: linear-gradient(135deg, var(--success) 0%, #1b5e20 100%);
    animation: pulse-now 0.5s ease-in-out infinite;
}

.interview-countdown-bar.interview-now .countdown-timer {
    font-size: 4rem;
}

@keyframes pulse-now {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Skills Feature */
.skills-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.skills-header h1 {
    margin: 0;
}

/* Skills Two-Panel Layout */
.skills-two-panel {
    display: flex;
    gap: 1rem;
    min-height: calc(100vh - 220px);
}

.skills-left-panel {
    flex: 0 0 300px;
    min-width: 300px;
    max-width: 300px;
    background: var(--bg-card);
    border-radius: 8px;
    overflow-y: auto;
    max-height: calc(100vh - 220px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.skills-right-panel {
    flex: 1 1 auto;
    min-width: 0;
    background: var(--bg-card);
    border-radius: 8px;
    overflow-y: auto;
    max-height: calc(100vh - 220px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (max-width: 800px) {
    .skills-two-panel {
        flex-direction: column;
    }
    .skills-left-panel {
        flex: none;
        max-width: none;
        max-height: none;
    }
    .skills-right-panel {
        max-height: none;
    }
}

/* Skill List Items */
.skill-list {
    list-style: none;
}

.skill-list-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

.skill-list-item:hover {
    background: rgba(21, 101, 192, 0.1);
}

.skill-list-item.active {
    background: rgba(21, 101, 192, 0.15);
    border-left: 4px solid var(--accent);
}

.skill-card-layout {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.skill-title {
    font-weight: 600;
    font-size: 1rem;
}

.skill-description {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.skill-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.skill-has-research,
.skill-has-notes {
    font-size: 0.65rem;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 600;
}

.skill-has-research {
    background: #6a1b9a;
    color: #fff;
}

.skill-has-notes {
    background: var(--accent);
    color: #fff;
}

/* Skill Detail */
.skill-detail-content {
    padding: 1.5rem;
}

.skill-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.skill-detail-title h2 {
    margin: 0 0 0.25rem 0;
}

.skill-detail-description {
    color: var(--text-muted);
    margin: 0;
}

.skill-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-section h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Research Section */
.skill-research-section {
    background: var(--bg);
    padding: 1rem;
    border-radius: 4px;
}

.skill-research-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.skill-research-header h3 {
    margin: 0;
}

.btn-research {
    background: #6a1b9a;
}

.btn-research:hover {
    background: #7b1fa2;
}

.btn-research.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Markdown Content Rendering */
.markdown-content {
    line-height: 1.6;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    margin-top: 1.25em;
    margin-bottom: 0.5em;
    color: var(--text);
}

.markdown-content h1 { font-size: 1.5rem; }
.markdown-content h2 { font-size: 1.25rem; border-bottom: 1px solid var(--border); padding-bottom: 0.25em; }
.markdown-content h3 { font-size: 1.1rem; }
.markdown-content h4 { font-size: 1rem; }

.markdown-content p {
    margin-bottom: 0.75em;
}

.markdown-content ul,
.markdown-content ol {
    margin-bottom: 0.75em;
    padding-left: 1.5em;
}

.markdown-content li {
    margin-bottom: 0.25em;
}

.markdown-content code {
    background: var(--bg);
    padding: 0.125em 0.375em;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

.markdown-content pre {
    background: var(--bg);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 0.75em;
    border: 1px solid var(--border);
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.markdown-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    margin: 0.75em 0;
    color: var(--text-muted);
}

.markdown-content a {
    color: var(--accent-hover);
}

.markdown-content a:hover {
    text-decoration: underline;
}

/* Yellow Highlighting */
.highlight-yellow {
    background-color: rgba(255, 235, 59, 0.4);
    padding: 0 2px;
    border-radius: 2px;
}

/* Highlight Toolbar */
.highlight-toolbar {
    position: sticky;
    top: 0;
    background: var(--bg-card);
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    border: 1px solid var(--border);
}

.highlight-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-highlight {
    background: #fbc02d;
    color: #000;
}

.btn-highlight:hover:not(:disabled) {
    background: #fdd835;
}

.btn-highlight:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-highlight.removing {
    background: #ffb74d;
}

.btn-highlight.removing:hover:not(:disabled) {
    background: #ffa726;
}

#filter-highlights-btn.active {
    background: var(--accent);
    color: #fff;
}

#filter-highlights-btn:disabled,
#clear-highlights-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Highlights-only mode */
.markdown-content.highlights-only > *:not(.highlight-yellow),
.markdown-content.highlights-only > *:not(:has(.highlight-yellow)) {
    display: none;
}

.markdown-content.highlights-only .highlight-yellow {
    display: block;
    margin-bottom: 0.5rem;
    padding: 0.25rem;
}

.markdown-content.highlights-only > *:has(.highlight-yellow) {
    display: block;
}

.markdown-content.highlights-only > *:has(.highlight-yellow) > *:not(.highlight-yellow):not(:has(.highlight-yellow)) {
    display: none;
}
