/* A4 Board Meeting Engine */
:root {
    --a4-red: #c8102e;
    --a4-red-dark: #8f0b20;
    --a4-gold: #c8b08a;
    --ink: #1a1d21;
    --muted: #5f6772;
    --line: #dde1e6;
    --surface: #ffffff;
    --surface-soft: #f7f8f9;
    --shadow: 0 8px 28px rgba(20, 25, 30, 0.08);
    --radius-large: 14px;
    --radius-small: 6px;
    --topbar-height: 72px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    background: #f0f1f3;
    color: var(--ink);
    line-height: 1.45;
}

.app-shell { min-height: 100vh; }

.topbar {
    min-height: var(--topbar-height);
    padding: 10px 24px;
    background: #111111;
    border-bottom: 3px solid var(--a4-red);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 1;
    min-width: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.brand-logo { width: 92px; height: auto; display: block; }
.brand-text { min-width: 0; }
.brand-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--a4-gold); font-weight: 600; }
.brand-title { font-size: 15px; font-weight: 700; color: #fff; white-space: nowrap; }
.topbar-user { font-size: 13px; color: #d0d0d0; white-space: nowrap; }
.topbar .link-button { color: var(--a4-gold); }
.auth-shell { min-height: 100vh; background: #f0f1f3; }
.auth-topbar { position: static; }
.auth-page {
    max-width: 560px;
    padding-top: 48px;
    padding-bottom: 64px;
}
.auth-card { padding: 32px 28px; }
.auth-card h1 { font-size: 26px; line-height: 1.2; margin-bottom: 10px; }
.auth-card .lead { margin-bottom: 24px; font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.auth-submit { width: 100%; padding: 13px 20px; font-size: 15px; }

.actor-select-page { max-width: 620px; }
.actor-select-card { padding-bottom: 20px; }
.actor-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.actor-row {
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.actor-row:hover {
    border-color: #c5cad1;
    box-shadow: 0 4px 16px rgba(20, 25, 30, 0.06);
}
.actor-row:active { transform: scale(0.995); }
.actor-row-initials {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(200, 16, 46, 0.08);
    color: var(--a4-red);
    font-size: 15px;
    font-weight: 800;
    display: grid;
    place-items: center;
    letter-spacing: 0.02em;
}
.actor-row-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.actor-row-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}
.actor-row-role {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}
.actor-row-arrow {
    flex-shrink: 0;
    font-size: 22px;
    line-height: 1;
    color: #c5cad1;
    font-weight: 300;
}
.actor-row:hover .actor-row-arrow { color: var(--a4-red); }

.phase-hint {
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 10px;
    margin: 0 0 14px;
    line-height: 1.45;
}
.phase-hint-dagsorden {
    background: #eef4fb;
    color: #1f4f82;
    border: 1px solid #c5d9ec;
}
.phase-hint-referat {
    background: #fff8e6;
    color: #7a5c00;
    border: 1px solid #e8d49a;
}

.split-col { position: relative; }
.split-col.phase-locked textarea { opacity: 0.55; }
.phase-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(247, 248, 249, 0.94);
    border: 1px dashed var(--line);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    z-index: 2;
    pointer-events: all;
}
.phase-lock-overlay span {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    max-width: 240px;
    line-height: 1.45;
}

.mail-supplement-field { display: block; margin-bottom: 18px; }
.mail-supplement-input { font-family: inherit; min-height: 96px; }

.topbar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.topbar-nav a,
.section-nav a {
    text-decoration: none;
    color: #e8e8e8;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.15s, border-color 0.15s;
}

.topbar-nav a:hover,
.section-nav a:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
}

.section-nav a.active {
    background: var(--a4-red);
    border-color: var(--a4-red);
    color: #fff;
}

.brand-link { text-decoration: none; color: inherit; }

.mail-templates-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.mail-templates-table th,
.mail-templates-table td {
    border-bottom: 1px solid var(--line);
    padding: 8px;
    vertical-align: top;
}
.mail-templates-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-align: left;
}
.mail-templates-table textarea,
.mail-templates-table input[type="text"] {
    width: 100%;
    font: inherit;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    padding: 6px 8px;
}
.mail-name-input { min-width: 140px; }
.mail-subject-input { min-width: 180px; }
.mail-body-input { min-width: 260px; font-family: inherit; }
.mail-rule-input,
.mail-notes-input { min-width: 160px; font-family: inherit; }
.center { text-align: center; }

.team-leader-section { overflow: hidden; }
.team-leader-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}
.team-leader-grid {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
}
.team-leader-grid thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f4f6;
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
}
.team-leader-corner {
    width: 28%;
    min-width: 220px;
    background: #f3f4f6;
}
.team-leader-name {
    vertical-align: bottom;
    line-height: 1.35;
}
.team-leader-question {
    width: 28%;
    min-width: 220px;
    padding: 14px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid #eceef1;
    text-align: left;
    vertical-align: top;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ink);
    background: #fafbfc;
}
.team-leader-grid td {
    padding: 10px 12px;
    border-bottom: 1px solid #eceef1;
    vertical-align: top;
    background: #fff;
}
.team-leader-input {
    width: 100%;
    min-height: 72px;
    border: 1px solid #d5d9df;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    font-size: 13px;
    line-height: 1.45;
    resize: vertical;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.team-leader-input:hover {
    border-color: #b8bec8;
}
.team-leader-input:focus {
    outline: none;
    border-color: var(--a4-red);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}
.team-leader-grid tbody tr:hover td {
    background: #fcfcfd;
}

.topbar-save {
    padding: 10px 22px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(200, 16, 46, 0.35);
}

.page { max-width: 1480px; margin: 0 auto; padding: 28px 24px 64px; }
.page.narrow { max-width: 520px; }

.hero-card, .form-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
}

.hero-card { padding: 22px 28px; display: flex; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.hero-card.compact { align-items: center; }
.form-card { padding: 24px 28px; margin-bottom: 20px; }

.eyebrow { margin: 0 0 6px; color: var(--a4-red); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
h1 { font-size: 28px; margin: 0 0 10px; }
h2 { font-size: 20px; margin: 0 0 14px; font-weight: 700; }
h3 { font-size: 17px; }
.lead, .hint { color: var(--muted); line-height: 1.5; }
.hint { font-size: 13px; margin-bottom: 14px; }

.status-card {
    display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px;
    background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px;
    font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--a4-red); }

.field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.timespec-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}
.timespec-row label {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}
.timespec-row label span {
    display: inline;
    margin-bottom: 0;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}
.timespec-date input[type="date"] { width: 168px; padding: 9px 10px; }
.timespec-time input[type="time"] { width: 76px; padding: 8px 4px; font-size: 13px; }
.workflow-next { margin-top: 0; }
.compact-section { padding-top: 20px; padding-bottom: 20px; }

label { display: block; margin-bottom: 14px; }
label span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }

input, select, textarea {
    width: 100%; padding: 10px 12px; font: inherit; border: 1px solid #c5cad1;
    border-radius: var(--radius-small); background: #fff;
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(200, 16, 46, 0.2);
    border-color: var(--a4-red);
}

.button {
    appearance: none; border: none; border-radius: 999px; padding: 10px 18px;
    font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center;
    white-space: nowrap;
}
.button.primary { color: white; background: var(--a4-red); }
.button.primary:hover { background: var(--a4-red-dark); }
.button.secondary { color: var(--ink); background: white; border: 1px solid var(--line); }
.button.danger { color: var(--a4-red); background: #fff; border: 1px solid rgba(200, 16, 46, 0.35); }
.button.tiny { min-height: 30px; padding: 5px 10px; font-size: 12px; }

.action-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; }
.alert.success { background: #eef8f0; color: #276738; }
.alert.error { background: #fdecec; color: #8f0b20; }
.alert.info { background: #eef4fb; color: #1f4f82; }

.subsection-title { font-size: 17px; margin: 24px 0 10px; }
.actor-edit-table input,
.actor-edit-table select { margin: 0; padding: 7px 9px; font-size: 13px; }
.actor-edit-table td { vertical-align: middle; }

.section-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.section-header-row h2 { margin: 0; }

.editor-section { scroll-margin-top: calc(var(--topbar-height) + 16px); }

.actor-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.actor-table th, .actor-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.actor-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

.agenda-root { display: flex; flex-direction: column; gap: 10px; }
.agenda-node {
    border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: visible;
}
.agenda-node.reviewed { border-color: #b9dfc2; }
.agenda-node.collapsed .agenda-node-body,
.agenda-node.collapsed .agenda-children { display: none; }
.agenda-node-header {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-soft);
    flex-wrap: wrap;
}
.inline-title {
    flex: 1;
    min-width: 240px;
    padding: 7px 10px;
    font-weight: 700;
    border: 1px solid #c5cad1;
    border-radius: var(--radius-small);
}
.agenda-node-responsible {
    padding: 6px 14px 8px;
    border-top: 1px solid var(--line);
    background: #fff;
}
.agenda-node-body { padding: 14px; }
.agenda-children { padding: 0 12px 12px 20px; display: flex; flex-direction: column; gap: 10px; }

.agenda-split-body {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
    align-items: start;
}
.agenda-split-body label { margin-bottom: 0; }
.agenda-split-body textarea,
.agenda-node-body textarea.auto-grow {
    min-height: 2.4em;
    resize: none;
    overflow: hidden;
    line-height: 1.45;
}

.responsible-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    flex: 1 1 180px;
    min-width: 160px;
    max-width: 100%;
}
.responsible-picker .resp-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    margin-right: 4px;
}
.resp-chip {
    appearance: none;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    color: var(--muted);
}
.resp-chip.active {
    background: var(--a4-red);
    border-color: var(--a4-red);
    color: #fff;
}
.responsible-readonly {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin-left: auto;
}
.split-referat { display: flex; flex-direction: column; gap: 12px; }

.node-actions { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; }
.task-badge { background: #eef8f0; color: #276738; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.reviewed-check input { display: none; }
.reviewed-check .checkmark {
    width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--line);
    display: grid; place-items: center; color: transparent; font-weight: 700; font-size: 12px;
}
.reviewed-check input:checked + .checkmark { background: #2f8a45; color: white; border-color: #2f8a45; }

.task-form-row { display: contents; }

.count-badge {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 6px;
}

.task-create-form {
    margin-bottom: 22px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}
.task-create-form.task-create-compact {
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff;
}
.task-create-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.task-create-inline-field {
    margin: 0;
}
.task-create-inline-text {
    flex: 1 1 220px;
    min-width: 180px;
}
.task-create-inline-text .task-cell-input {
    margin: 0;
}
.task-create-select {
    font: inherit;
    font-size: 13px;
    line-height: 1.35;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    max-width: 200px;
}
.task-create-inline-assignees .task-create-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.task-create-submit-btn {
    flex-shrink: 0;
    white-space: nowrap;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.task-create-form .subsection-title {
    margin: 0 0 12px;
    font-size: 15px;
}
.task-create-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 14px 16px;
    align-items: start;
}
.task-create-field > span {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.task-create-text-field { grid-column: 1 / -1; }
.task-create-text-field textarea {
    min-height: 2.6em;
    resize: vertical;
    font: inherit;
}
.task-create-assignees .task-create-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.assignee-chip-option {
    display: inline-flex;
    cursor: pointer;
    margin: 0;
}
.assignee-chip-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.assignee-chip-option input:checked + .resp-chip {
    background: var(--a4-red);
    border-color: var(--a4-red);
    color: #fff;
}
.assignee-chip-option input:focus-visible + .resp-chip {
    outline: 2px solid rgba(200, 16, 46, 0.35);
    outline-offset: 2px;
}
.task-create-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}
@media (max-width: 760px) {
    .task-create-grid { grid-template-columns: 1fr; }
}

.task-section .task-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: var(--surface-soft);
    border-radius: 10px;
    border: 1px solid var(--line);
}
.task-toolbar-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}
.task-filter-chips { display: flex; flex-wrap: wrap; gap: 5px; }

.task-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.task-form-row { display: contents; }

.task-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}
.task-grid thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f4f6;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}
.task-grid thead th.sortable { cursor: pointer; user-select: none; }
.task-grid thead th.sortable:hover { color: var(--ink); }
.task-grid .col-task { width: 34%; }
.task-grid .col-comment { width: 18%; }
.task-grid .col-meeting { width: 14%; }
.task-grid .col-assignee { width: 16%; }
.task-grid .col-status { width: 14%; }
.task-grid .col-action { width: 44px; }

.task-grid-row td {
    padding: 8px 12px;
    border-bottom: 1px solid #eceef1;
    vertical-align: middle;
}
.task-grid-row:hover td { background: #fafbfc; }
.task-grid-row:last-child td { border-bottom: none; }

.task-point-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.task-cell-input {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 6px;
    margin: 0 -6px;
    font: inherit;
    font-size: 13px;
    line-height: 1.35;
    resize: none;
    background: transparent;
    max-height: 2.7em;
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s, max-height 0.15s;
}
.task-cell-input:hover {
    border-color: #d5d9df;
    background: #fff;
}
.task-cell-input:focus {
    outline: none;
    border-color: #b8bec8;
    background: #fff;
    max-height: 12em;
    box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.08);
}
.task-comment-input { color: var(--muted); font-size: 12px; }

.task-meeting-pill {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--surface-soft);
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.task-assignee-cell { position: relative; }
.task-assignee-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-height: 26px;
}
.assignee-pill {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--a4-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.assignee-edit-btn {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 1px dashed #c5cad1;
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}
.assignee-edit-btn:hover {
    border-color: var(--a4-red);
    color: var(--a4-red);
}
.task-assignee-popover {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 5;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    min-width: 180px;
}
.task-assignee-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}
.status-pill {
    appearance: none;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    color: var(--muted);
}
.status-pill.active { color: #fff; border-color: transparent; }
.status-pill.status-i_gang.active { background: #3b6ea8; }
.status-pill.status-udfordring.active { background: #b86b00; }
.status-pill.status-afsluttet.active { background: #2f8a45; }

.task-delete-btn {
    appearance: none;
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 15px;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
}
.task-grid-row:hover .task-delete-btn,
.task-grid-row:focus-within .task-delete-btn { opacity: 1; }
.task-delete-btn:hover {
    background: #fff0f2;
    border-color: #f0c4cb;
    color: var(--a4-red);
}

.task-assignee-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: none;
}
.task-readonly-text {
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
}
.task-readonly-text.muted { color: var(--muted); }
.task-assignee-readonly {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.task-inline-create {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--line);
}
.task-create-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}
.task-create-toggle input { display: none; }
.task-toggle-box {
    width: 18px;
    height: 18px;
    border: 1px solid var(--line);
    border-radius: 4px;
    display: grid;
    place-items: center;
    background: #fff;
}
.task-create-toggle input:checked + .task-toggle-box {
    background: var(--a4-red);
    border-color: var(--a4-red);
    color: #fff;
    font-size: 11px;
}
.task-create-toggle input:checked + .task-toggle-box::after { content: "✓"; }
.task-create-panel { margin-top: 8px; }
.task-create-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
}
.task-create-text {
    flex: 1 1 200px;
    min-height: 2.2em;
    border: 1px solid #d5d9df;
    border-radius: var(--radius-small);
    padding: 6px 8px;
    font: inherit;
    resize: none;
}
.assignee-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.task-inline-zone {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.task-created-mark {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 8px;
    background: #eef8f0;
    color: #276738;
    font-size: 12px;
    font-weight: 600;
    min-width: 0;
}
.task-preview-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.task-preview-who {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #2f8a45;
}
.task-created-mark .task-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2f8a45;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
}
.task-inline-delete {
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.45;
    padding: 2px 4px;
    flex-shrink: 0;
    transition: opacity 0.15s, color 0.15s;
}
.task-created-mark:hover .task-inline-delete,
.task-created-mark:focus-within .task-inline-delete {
    opacity: 1;
}
.task-inline-delete:hover {
    color: var(--a4-red);
}

.actor-edit-table .col-initials,
.actor-edit-table .actor-initials {
    width: 52px;
    max-width: 52px;
}
.actor-edit-table .actor-initials {
    padding: 5px 4px;
    text-align: center;
}

.meeting-admin-table-wrap { overflow-x: auto; margin-top: 12px; }
.meeting-admin-table .main-titles-cell {
    font-size: 12px;
    line-height: 1.4;
    max-width: 280px;
}
.meeting-admin-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}
.meeting-row-active td { background: #f0f7ff !important; }
.meeting-row-default td { background: #fff8f0 !important; }
.default-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    background: #fdecec;
    color: #8f0b20;
}
.user-data-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    background: #eef8f0;
    color: #276738;
}
.inline-alert { display: inline; padding: 2px 8px; margin: 0 0 0 6px; font-size: 12px; }

.hint-warning {
    color: #8f0b20;
    background: #fff5f5;
    border: 1px solid #f0c4cb;
    border-radius: 8px;
    padding: 8px 12px;
}
.optional-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}
.start-cycle-card .start-cycle-actions-panel {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.start-cycle-card .start-cycle-actions-panel h3 {
    margin: 0 0 8px;
    font-size: 14px;
}
.start-cycle-action-list {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.5;
}
.start-cycle-location {
    display: block;
    margin-top: 12px;
    max-width: 320px;
}
.start-cycle-location input {
    width: 100%;
}

.task-row { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.attachment-list { list-style: none; padding: 0; }
.attachment-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }

.mail-preview pre {
    white-space: pre-wrap; background: var(--surface-soft); padding: 14px; border-radius: 10px; border: 1px solid var(--line);
}

.inline-form { display: inline; }

.draft-status { font-size: 12px; margin: 4px 0 0; color: var(--muted); }
.draft-status.local { color: #276738; }
.draft-status.offline { color: #8f0b20; font-weight: 700; }
.draft-status.pending { color: #9a6700; }

.draft-restore-banner {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fff8e6;
    border: 1px solid #e8d49a;
    border-radius: 10px;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.link-button { background: none; border: none; color: var(--a4-red); cursor: pointer; font: inherit; text-decoration: underline; }

@media (max-width: 1100px) {
    .topbar { flex-wrap: wrap; }
    .topbar-left { flex-wrap: wrap; }
    .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .agenda-split-body { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .timespec-row { flex-wrap: wrap; gap: 12px; }
    .field-grid { grid-template-columns: 1fr; }
    .topbar-right { width: 100%; justify-content: flex-end; }
}
