* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow-y: hidden;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f6f7f9;
    color: #172b4d;
}

a {
    color: #0c4a8a;
    text-decoration: none;
}

.topbar {
    height: 56px;
    padding: 0 14px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-left,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: #e7f0ff;
    color: #1559c7;
    display: grid;
    place-items: center;
    font-size: 14px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
}

.brand small {
    font-size: 11px;
    letter-spacing: 1px;
    color: #64748b;
}

.board-switcher select {
    height: 34px;
    min-width: 140px;
    border: 1px solid #cfd7e3;
    border-radius: 8px;
    background: #ffffff;
    padding: 0 10px;
}

.pill-link,
.avatar {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 13px;
}

.avatar {
    background: #d9fbe8;
    color: #0f5132;
}

.page {
    height: calc(100vh - 84px);
    overflow: hidden;
}

.board-title {
    height: 88px;
    padding: 18px 14px 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.board-title h1 {
    margin: 0;
    font-size: 26px;
}

.board-title p {
    margin: 6px 0 0;
    color: #64748b;
}

.board-links {
    display: flex;
    gap: 12px;
    font-size: 13px;
}

.board-wrap {
    height: calc(100% - 88px);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 14px 16px;
}

.board {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.column {
    background: #eef1f5;
    border: 1px solid #e1e6ef;
    border-radius: 12px;
    overflow: hidden;
    max-height: calc(100vh - 178px);
    display: flex;
    flex-direction: column;
}

.column-header {
    height: 48px;
    padding: 0 10px 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.column-header h2 {
    font-size: 15px;
    margin: 0;
}

.quick-card-form {
    margin: 0;
}

.add-card-button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.86);
    color: #172b4d;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.add-card-button:hover {
    background: #ffffff;
}

.cards {
    padding: 12px;
    overflow-y: auto;
}

.empty-column {
    border: 1px dashed #d5dce8;
    border-radius: 9px;
    color: #718096;
    font-size: 12px;
    text-align: center;
    padding: 14px 8px;
}

.card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.card-topline,
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-id {
    font-size: 12px;
    color: #475569;
    font-weight: 700;
}

.attachment-icon {
    font-size: 13px;
}

.card h3 {
    font-size: 15px;
    margin: 7px 0 6px;
    line-height: 1.25;
}

.card p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.35;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.due-badge {
    margin-top: 9px;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: #475569;
}

.due-badge.is-overdue {
    color: #b42318;
    font-weight: 700;
    animation: duePulse 1.8s ease-in-out infinite;
}

@keyframes duePulse {
    0% { opacity: 0.72; }
    50% { opacity: 1; }
    100% { opacity: 0.72; }
}

.footer {
    height: 28px;
    padding: 0 14px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
    color: #64748b;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.board-nav-pill,
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #f1f5f9;
    color: #334155;
    font-size: 13px;
    line-height: 1;
    transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.board-nav-pill.is-active {
    background: #e7f0ff;
    color: #1559c7;
    font-weight: 700;
}

.board-nav-pill.is-drop-hover {
    background: #dbeafe;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
    transform: translateY(-1px);
}

.board-nav-pill.is-busy {
    opacity: 0.72;
    pointer-events: none;
}

.card {
    cursor: grab;
}

.card.is-dragging {
    opacity: 0.88;
    cursor: grabbing;
    transform: rotate(2deg) scale(1.025);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.28), 0 0 0 2px rgba(37, 99, 235, 0.16);
    filter: saturate(0.95) brightness(0.98);
    z-index: 50;
}

.card-tags .tag {
    min-height: 26px;
    padding: 5px 9px;
    font-size: 12px;
}


.card-column-dropzone {
    min-height: 70px;
    border-radius: 0 0 12px 12px;
    transition: background 120ms ease, box-shadow 120ms ease;
}

.card-column-dropzone.is-column-drop-hover {
    background: rgba(219, 234, 254, 0.58);
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.card-column-dropzone.is-saving {
    opacity: 0.82;
}

.has-modal-open {
    overflow: hidden;
}

.card-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}

.card-modal.is-open {
    display: block;
}

.card-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
}

.card-modal-panel {
    position: absolute;
    inset: 42px 25vw;
    min-width: 620px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-modal-header {
    height: 54px;
    padding: 0 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close-button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.modal-close-button:hover {
    background: #e2e8f0;
}

#cardModalFrame {
    border: 0;
    width: 100%;
    flex: 1;
    background: #f6f7f9;
}

.card-page {
    min-height: 100vh;
    overflow-y: auto;
}

.card-page.modal-embed {
    background: #f6f7f9;
}

.card-detail {
    max-width: 980px;
    margin: 28px auto;
    padding: 0 18px 40px;
}

.modal-embed .card-detail {
    max-width: none;
    margin: 14px;
    padding: 0 0 20px;
}

.card-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 16px;
}

.card-detail-id {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e7f0ff;
    color: #1559c7;
    font-size: 13px;
    font-weight: 700;
}

.card-detail-header h1 {
    margin: 10px 0 6px;
    font-size: 26px;
}

.card-detail-header p {
    margin: 0;
    color: #64748b;
}

.card-detail-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.card-edit-form {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
}

.card-edit-form label {
    display: block;
    margin: 0 0 7px;
    font-size: 13px;
    color: #475569;
    font-weight: 700;
}

.card-edit-form input[type="text"],
.card-edit-form input[type="datetime-local"],
.card-edit-form select,
.card-edit-form textarea {
    width: 100%;
    border: 1px solid #cfd7e3;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    color: #172b4d;
    background: #ffffff;
    margin-bottom: 14px;
}

.card-edit-form textarea {
    resize: vertical;
    min-height: 280px;
    line-height: 1.45;
}

.field-hint {
    margin: -4px 0 14px;
    color: #64748b;
    font-size: 12px;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.primary-button {
    border: 0;
    border-radius: 10px;
    background: #1559c7;
    color: #ffffff;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
}

.primary-button:hover {
    background: #0f4aad;
}

.save-hint {
    color: #b45309;
    font-size: 13px;
    font-weight: 700;
}

.success-message,
.error-message {
    border-radius: 12px;
    padding: 10px 12px;
    margin: 0 0 14px;
}

.success-message {
    background: #e3fcef;
    color: #0f5132;
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
}


@media (max-width: 1100px) {
    .card-modal-panel {
        inset: 32px 8vw;
        min-width: 0;
    }
}

/* v0.46b card detail/header refinements */
.card h3,
.card-detail h1,
.card-detail-header h1,
.column-header h2 {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.card-description-preview {
    overflow-wrap: anywhere;
}

.card-detail-title-block {
    min-width: 0;
}

.card-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.modal-embed .card-detail-header {
    align-items: flex-start;
}

.modal-embed .card-detail-actions {
    display: none;
}

/* v0.49b markdown toolbar */
.markdown-editor {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 8px;
}

.markdown-editor textarea {
    margin-bottom: 0;
}

.markdown-toolbar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
    border: 1px solid #cfd7e3;
    border-radius: 10px;
    background: #f8fafc;
}

.markdown-toolbar button {
    width: 30px;
    min-height: 30px;
    border: 1px solid #d7dee9;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.markdown-toolbar button:hover {
    background: #e7f0ff;
    border-color: #9ec5fe;
}

.description-rendered-preview {
    display: none;
}

@media (max-width: 760px) {
    .markdown-editor {
        grid-template-columns: 1fr;
    }

    .markdown-toolbar {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* v0.51b: robust tag input add button */
.tag-add-button {
    border: 1px solid #c8d1dc;
    background: #ffffff;
    color: #172b4d;
    border-radius: 999px;
    width: 28px;
    height: 28px;
    font-weight: 700;
    cursor: pointer;
}

.tag-add-button:hover {
    background: #f4f5f7;
}


/* v0.52b tag suggestions and rendered markdown refinements */
.tag-editor {
    position: relative;
}

.tag-input {
    display: inline-block;
    width: min(520px, 100%);
    margin-top: 8px;
}

.tag-add-button {
    margin-left: 6px;
    vertical-align: middle;
}

.tag-suggestions {
    position: absolute;
    z-index: 30;
    left: 0;
    top: calc(100% - 22px);
    min-width: min(420px, 100%);
    max-width: min(520px, 100%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.tag-suggestions[hidden] {
    display: none;
}

.tag-suggestion-item {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #172b4d;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.tag-suggestion-item:hover,
.tag-suggestion-item:focus {
    background: #eaf2ff;
    outline: none;
}

.markdown-preview a,
.card-description-preview a {
    color: #0b5cab;
    text-decoration: underline;
}

.md-checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.md-checkbox-line input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
}


/* v0.53b: remove redundant tag add button and render checkboxes in normal black */
.tag-add-button {
    display: none !important;
}

.tag-input-row {
    display: block;
}

.tag-input-row .tag-input {
    width: 100%;
}

.md-checkbox-line input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border: 1.6px solid #111827;
    border-radius: 3px;
    background: #ffffff;
    opacity: 1;
    position: relative;
}

.md-checkbox-line input[type="checkbox"]:checked {
    background: #ffffff;
    border-color: #111827;
}

.md-checkbox-line input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 0px;
    width: 4px;
    height: 8px;
    border: solid #111827;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.md-checkbox-line input[type="checkbox"]:disabled {
    opacity: 1;
}

/* v0.54b: markdown horizontal rule and robust checkbox rendering */
.md-horizontal-rule {
    border: 0;
    border-top: 1px solid #c7d2e1;
    margin: 8px 0;
}

.markdown-toolbar button[data-md-action="hr"] {
    font-size: 18px;
    line-height: 1;
}

/* v0.58b: board card preview height + hover expand */
.card {
    position: relative;
    transition: box-shadow 140ms ease, transform 140ms ease;
}

.card-description-preview {
    max-height: var(--card-preview-max-height, 120px);
    overflow: hidden;
    position: relative;
}

.card-description-preview::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 24px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0), var(--card-bg, #ffffff) 82%);
}

.card:hover,
.card:focus-within {
    z-index: 20;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
}

.card:hover .card-description-preview,
.card:focus-within .card-description-preview {
    max-height: 65vh;
    overflow-y: auto;
}

.card:hover .card-description-preview::after,
.card:focus-within .card-description-preview::after {
    display: none;
}


.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 14px;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.color-swatch.is-selected {
    outline: 3px solid rgba(37, 99, 235, 0.24);
    border-color: #2563eb;
}

.draft-message {
    margin: 10px 0 14px;
    padding: 9px 11px;
    border-radius: 10px;
    background: #ecfeff;
    border: 1px solid #bae6fd;
    color: #075985;
    font-size: 13px;
}

/* v0.60b: attachments */
.attachments-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #dfe7f1;
}

.section-heading-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.section-heading-row h2 {
    margin: 0;
    font-size: 15px;
}

.section-count {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #edf2f7;
    color: #334155;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.attachment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attachment-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    background: #ffffff;
    font-size: 13px;
}

.attachment-item a {
    color: #0f4aa2;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.attachment-item span {
    color: #64748b;
    white-space: nowrap;
}

.attachment-upload-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.attachment-upload-form .field-hint {
    flex-basis: 100%;
    margin: 0;
}

.secondary-button,
.text-danger-button {
    border: 0;
    border-radius: 10px;
    padding: 8px 11px;
    cursor: pointer;
    font-weight: 600;
}

.secondary-button {
    background: #e0ecff;
    color: #173b7a;
}

.text-danger-button {
    background: #fee2e2;
    color: #991b1b;
}

.inline-delete-form {
    margin: 0;
}


/* v0.86.20b: Autosave-safe undo */
.card-undo-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.card-undo-button:not(:disabled):hover {
    background: #cfe0ff;
}

/* v0.86.9b: Card detail delete action */
.card-form-actions {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 4px;
}

.card-form-main-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.card-delete-button {
    margin-left: auto;
}

.card-delete-button:hover {
    background: #fecaca;
    color: #7f1d1d;
}

@media (max-width: 640px) {
    .card-form-actions {
        align-items: stretch;
    }

    .card-form-main-actions,
    .card-delete-button {
        width: 100%;
    }

    .card-form-main-actions .primary-button,
    .card-delete-button {
        justify-content: center;
        text-align: center;
    }
}

.attachment-icon {
    margin-left: auto;
    font-size: 14px;
}


/* v0.61b: attachment UX polish */
.attachment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: auto;
    color: #334155;
}

.attachment-icon svg {
    width: 15px;
    height: 15px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.attachment-icon:hover {
    color: #0f172a;
}

.attachment-upload-form.is-uploading {
    opacity: 0.72;
    pointer-events: none;
}


/* v0.62b: neutral attachment icon and card detail field order */
.attachment-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #334155;
    vertical-align: -3px;
}

.attachment-heading-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.attachment-icon svg path:first-child,
.attachment-heading-icon svg path:first-child {
    fill: rgba(51, 65, 85, 0.04);
}


/* v0.63b: neutral attachment icon, no emoji/document glyph */
.attachment-icon {
    font-family: Arial, sans-serif;
}
.attachment-icon svg {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.card-edit-form label[for="description"] {
    margin-top: 10px;
}

/* v0.64b: neutral attachment paperclip icon */
.attachment-icon svg,
.attachment-heading-icon svg {
    display: inline-block;
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.attachment-heading-icon {
    color: #334155;
}


/* v0.66b: force neutral paperclip SVG, no emoji fallback */
.attachment-icon,
.attachment-heading-icon {
    font-family: Arial, sans-serif !important;
    line-height: 1;
}

.attachment-icon .attachment-svg,
.attachment-heading-icon .attachment-svg {
    display: block;
    width: 16px;
    height: 16px;
    fill: none !important;
    stroke: #334155 !important;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.attachment-heading-icon .attachment-svg {
    width: 18px;
    height: 18px;
}

.attachment-icon .attachment-svg path,
.attachment-heading-icon .attachment-svg path {
    fill: none !important;
}


/* v0.67b: make truncated card preview fade match the card background color */
.card {
    --card-bg: #ffffff;
}

.card-description-preview::after {
    background: linear-gradient(to bottom, rgba(255,255,255,0), var(--card-bg, #ffffff) 82%);
}

/* v0.68b - Comments and activity timeline */
.comments-activity-section {
    margin-top: 22px;
    border-top: 1px solid #dfe1e6;
    padding-top: 18px;
}

.comment-form {
    display: grid;
    gap: 8px;
    margin: 0 0 18px;
}

.comment-form textarea {
    min-height: 86px;
    resize: vertical;
}

.compact-actions {
    align-items: center;
    gap: 12px;
}

.activity-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.timeline-entry {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: flex-start;
}

.timeline-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #172b4d;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

.timeline-body {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
}

.timeline-entry.is-comment .timeline-body {
    background: #ffffff;
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
    align-items: baseline;
    color: #44546f;
    font-size: 13px;
}

.timeline-meta strong {
    color: #172b4d;
}

.timeline-meta time {
    color: #6b7280;
    margin-left: auto;
    font-size: 12px;
}

.timeline-comment {
    margin-top: 8px;
    color: #172b4d;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.timeline-change {
    margin-top: 8px;
    display: grid;
    gap: 5px;
    font-size: 12px;
    color: #44546f;
}

.timeline-old,
.timeline-new {
    display: block;
    padding: 6px 8px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    overflow-wrap: anywhere;
}

.timeline-old::before {
    content: 'Vorher: ';
    font-weight: 700;
}

.timeline-new::before {
    content: 'Neu: ';
    font-weight: 700;
}

/* v0.69b Header search */
.topbar-search {
    position: relative;
    flex: 1 1 420px;
    max-width: 560px;
    margin: 0 18px;
}

.topbar-search input[type="search"] {
    width: 100%;
    height: 36px;
    border: 1px solid #cfd7e3;
    border-radius: 999px;
    background: #f8fafc;
    padding: 0 38px 0 16px;
    color: #172b4d;
    outline: none;
}

.topbar-search input[type="search"]:focus {
    background: #ffffff;
    border-color: #7aa7e9;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-clear-button {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    cursor: pointer;
    line-height: 1;
}

.search-clear-button:hover {
    background: #cbd5e1;
}

.board-search-status {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 12px;
    text-align: right;
}

.card.is-search-hidden {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .topbar-search {
        max-width: none;
        margin: 0 8px;
    }

    .topbar-actions .pill-link:not(:last-child) {
        display: none;
    }
}

/* v0.73b Header filter menu */
.topbar-filter-menu {
    position: relative;
    flex: 0 0 auto;
}

.filter-toggle-button {
    height: 34px;
    border: 1px solid #cfd7e3;
    border-radius: 999px;
    background: #ffffff;
    color: #172b4d;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
}

.filter-toggle-button:hover,
.filter-toggle-button[aria-expanded="true"] {
    background: #f8fafc;
    border-color: #9fb4d0;
}

.filter-toggle-button.has-active-filters {
    border-color: #7aa7e9;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.filter-toggle-button svg {
    flex: 0 0 auto;
}

.filter-active-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #1559c7;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
}

.filter-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 80;
    width: 280px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
    display: grid;
    gap: 8px;
}

.filter-panel label {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
}

.filter-panel select {
    width: 100%;
    height: 34px;
    border: 1px solid #cfd7e3;
    border-radius: 8px;
    background: #ffffff;
    padding: 0 10px;
    font-size: 13px;
    color: #172b4d;
}



.filter-panel select:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.filter-reset-button {
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #0c4a8a;
    padding: 0 10px;
    cursor: pointer;
    font-size: 13px;
    margin-top: 4px;
}

.filter-reset-button:hover {
    background: #e2e8f0;
}

@media (max-width: 1180px) {
    .filter-toggle-button span:not(.filter-active-badge) {
        display: none;
    }
}


/* v0.74b Search + filter are one compact header control */
.topbar-search-filter {
    flex: 1 1 640px;
    max-width: 760px;
    min-width: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 16px;
}

.topbar-search-filter .topbar-search {
    flex: 1 1 auto;
    max-width: none;
    margin: 0;
}

.topbar-search-filter .topbar-filter-menu {
    flex: 0 0 auto;
}

.filter-panel[hidden] {
    display: none !important;
}

.filter-panel {
    right: 0;
    top: calc(100% + 10px);
    animation: filterPanelFadeIn 120ms ease-out;
}

@keyframes filterPanelFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .topbar-search-filter {
        margin: 0 8px;
        gap: 6px;
    }
}


/* v0.75b search result highlighting */
.search-highlight {
    background: rgba(255, 214, 102, 0.85);
    color: inherit;
    border-radius: 4px;
    padding: 0 2px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.card-tags .search-highlight {
    background: rgba(255, 214, 102, 0.95);
}

/* v0.76b: Autosave status */
.autosave-status {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}

.autosave-status[data-state="pending"] {
    color: #64748b;
}

.autosave-status[data-state="saving"] {
    color: #1559c7;
}

.autosave-status[data-state="saved"] {
    color: #0f5132;
}

.autosave-status[data-state="error"] {
    color: #b42318;
}

/* v0.78b Board settings */
.settings-page {
    min-height: 100vh;
    overflow-y: auto;
}

.settings-shell {
    padding: 28px;
    display: flex;
    justify-content: center;
}

.settings-card {
    width: min(860px, 100%);
    background: #ffffff;
    border: 1px solid #dfe1e6;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(9, 30, 66, 0.12);
    padding: 24px;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.settings-header h1 {
    margin: 4px 0 6px;
    font-size: 26px;
}

.settings-header p {
    margin: 0;
    color: #44546f;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    font-weight: 700;
    color: #0052cc;
}

.settings-form {
    display: grid;
    gap: 18px;
}

.settings-form fieldset {
    border: 1px solid #dfe1e6;
    border-radius: 14px;
    padding: 18px;
    display: grid;
    align-content: start;
    gap: 14px;
}

.settings-form legend {
    padding: 0 8px;
    font-weight: 700;
    color: #172b4d;
}

.settings-form label:not(.toggle-row) {
    font-weight: 700;
    margin: 0;
}

.settings-form label:not(.toggle-row) + .inline-field,
.settings-form label:not(.toggle-row) + input,
.settings-form label:not(.toggle-row) + textarea,
.settings-form label:not(.toggle-row) + select {
    margin-top: -4px;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px;
    border-radius: 12px;
    background: #f7f8fa;
}

.toggle-row span {
    display: grid;
    gap: 3px;
}

.toggle-row small {
    color: #626f86;
}

.toggle-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #0c66e4;
    flex: 0 0 auto;
}

.inline-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-field input {
    width: 130px;
    padding: 9px 10px;
    border: 1px solid #c1c7d0;
    border-radius: 10px;
    font: inherit;
}

.inline-field span {
    color: #44546f;
}

/* v0.82b Admin and configuration finish */
.settings-card-wide {
    width: min(1120px, 100%);
}

.settings-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form input[type="password"],
.settings-form input[type="number"],
.settings-form textarea,
.settings-form select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #c1c7d0;
    border-radius: 10px;
    font: inherit;
    background: #ffffff;
}

.settings-subsection {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #dfe1e6;
}

.settings-subsection-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.settings-subsection-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.settings-subsection-header p {
    margin: 0;
    color: #44546f;
}

.settings-table-wrap {
    overflow-x: auto;
    border: 1px solid #dfe1e6;
    border-radius: 14px;
}

.settings-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.settings-table th,
.settings-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #dfe1e6;
    text-align: left;
    vertical-align: top;
}

.settings-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #44546f;
    background: #f7f8fa;
}

.settings-table tr:last-child td {
    border-bottom: 0;
}

@media (max-width: 800px) {
    .settings-two-column,
    .settings-header {
        grid-template-columns: 1fr;
        display: grid;
    }

    .settings-header {
        justify-items: start;
    }
}


/* v0.86.1b Admin spacing and board creation */
.settings-form .admin-create-board-fieldset {
    gap: 12px;
}

.admin-create-board-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 2px;
}

.settings-muted {
    color: #626f86;
    font-size: 13px;
}

/* v0.86.2b Admin user management */
.admin-create-user-fieldset {
    gap: 12px;
}

.admin-user-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.admin-user-list {
    display: grid;
    gap: 12px;
}

.admin-user-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dfe1e6;
    border-radius: 14px;
    background: #ffffff;
}

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

.admin-user-options {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.admin-checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
}

.settings-badge {
    display: inline-flex;
    margin-left: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e9f2ff;
    color: #0c66e4;
    font-size: 12px;
    font-weight: 700;
}

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

    .admin-user-card-header {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* v0.86.3b Admin user management visual polish */
.settings-form fieldset {
    gap: 10px;
}

.settings-form label:not(.toggle-row) + .inline-field,
.settings-form label:not(.toggle-row) + input,
.settings-form label:not(.toggle-row) + textarea,
.settings-form label:not(.toggle-row) + select {
    margin-top: 0;
}

.settings-form input[type="email"],
.settings-form input[type="password"] {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #c1c7d0;
    border-radius: 10px;
    font: inherit;
    background: #ffffff;
}

.settings-form input[type="text"]:focus,
.settings-form input[type="email"]:focus,
.settings-form input[type="password"]:focus,
.settings-form input[type="number"]:focus,
.settings-form textarea:focus,
.settings-form select:focus,
.inline-field input:focus {
    outline: 2px solid #85b8ff;
    outline-offset: 1px;
    border-color: #0c66e4;
}

.admin-create-user-fieldset,
.admin-user-card {
    border: 1px solid #cfd7e6;
    box-shadow: 0 1px 2px rgba(9, 30, 66, 0.06);
}

.admin-create-user-fieldset {
    background: #fbfcff;
    padding: 20px;
}

.admin-user-grid {
    align-items: end;
    gap: 16px;
}

.admin-user-grid > div {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.admin-user-card {
    padding: 18px;
    background: #ffffff;
}

.admin-user-card-header {
    padding-bottom: 12px;
    border-bottom: 1px solid #e9edf5;
}

.admin-user-card-header strong {
    font-size: 16px;
}

.admin-user-options {
    padding: 12px;
    border-radius: 12px;
    background: #f7f8fa;
}

.admin-checkbox-line {
    margin: 0;
}

.admin-checkbox-line input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0c66e4;
}

.admin-user-meta {
    margin: 0;
    padding-top: 2px;
}

.admin-create-user-fieldset .settings-muted {
    margin: 2px 0 0;
}

.admin-create-board-actions {
    margin-top: 6px;
}

/* v0.86.4b Admin board access management */
.admin-board-access-panel {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #dfe7f3;
    border-radius: 14px;
    background: #f8faff;
}

.admin-board-access-panel h3 {
    margin: 0;
    font-size: 16px;
}

.admin-board-access-panel .settings-muted {
    margin: 0;
}

.admin-board-access-panel-compact {
    background: #fbfcff;
}

.admin-board-access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-board-access-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.admin-board-access-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-weight: 700;
}

.admin-board-access-main span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-board-access-main input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: #0c66e4;
}

.admin-board-access-item select {
    width: 130px;
    flex: 0 0 auto;
}

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

    .admin-board-access-item {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-board-access-item select {
        width: 100%;
    }
}

/* v0.86.5b Admin user editor refactor */
.admin-section-block {
    padding: 22px;
    border: 1px solid #dfe7f3;
    border-radius: 18px;
    background: #fbfcff;
}

.admin-panel-card {
    border: 1px solid #cfd7e6;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(9, 30, 66, 0.07);
}

.admin-form-section {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #e5ebf5;
    border-radius: 14px;
    background: #f8faff;
}

.admin-form-section h3 {
    margin: 0;
    color: #172b4d;
    font-size: 16px;
}

.admin-create-user-fieldset.admin-panel-card {
    gap: 16px;
    padding: 18px;
}

.admin-user-management-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.admin-user-picker {
    align-self: start;
    padding: 14px;
}

.admin-user-picker h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.admin-user-picker-list {
    display: grid;
    gap: 8px;
}

.admin-user-picker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #ffffff;
    color: #172b4d;
    text-decoration: none;
}

.admin-user-picker-item:hover,
.admin-user-picker-item.is-active {
    border-color: #85b8ff;
    background: #e9f2ff;
}

.admin-user-picker-item span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.admin-user-picker-item strong,
.admin-user-picker-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-picker-item small {
    color: #626f86;
    font-size: 12px;
}

.admin-user-picker-item em {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f1f3f7;
    color: #44546f;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.admin-user-editor {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.admin-editor-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e9edf5;
}

.admin-editor-header h3 {
    margin: 0;
    font-size: 20px;
}

.admin-user-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-status-tile {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.admin-form-actions-bottom {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

.admin-user-editor .admin-board-access-grid,
.admin-create-user-fieldset .admin-board-access-grid {
    gap: 12px;
}

.admin-user-editor .admin-board-access-item,
.admin-create-user-fieldset .admin-board-access-item {
    min-height: 48px;
}

.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form input[type="password"],
.settings-form input[type="number"],
.settings-form textarea,
.settings-form select,
.inline-field input {
    min-height: 42px;
    border-radius: 12px;
}

@media (max-width: 1000px) {
    .admin-user-management-layout {
        grid-template-columns: 1fr;
    }

    .admin-user-picker-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .admin-user-picker-list,
    .admin-status-grid,
    .admin-user-grid-two {
        grid-template-columns: 1fr;
    }
}


/* v0.86.6b Admin layout clarity and stronger section borders */
.settings-card-wide {
    width: min(1320px, calc(100vw - 56px));
}

.settings-subsection.admin-section-block {
    border: 2px solid #b8c7dc;
    border-radius: 20px;
    background: #f7faff;
    box-shadow: 0 10px 24px rgba(9, 30, 66, 0.08);
}

.admin-panel-card {
    border: 2px solid #b8c7dc;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(9, 30, 66, 0.08);
}

.admin-form-section {
    border: 2px solid #d0dbea;
    border-radius: 16px;
    background: #f4f7fc;
    padding: 18px;
}

.admin-form-section h3 {
    padding-bottom: 8px;
    border-bottom: 1px solid #dbe4f0;
}

.admin-create-user-fieldset.admin-panel-card,
.admin-user-editor {
    padding: 22px;
}

.admin-user-management-layout {
    grid-template-columns: 300px minmax(760px, 1fr);
    gap: 20px;
}

.admin-user-picker {
    border-color: #b8c7dc;
    background: #ffffff;
}

.admin-user-picker-item {
    border: 2px solid #d5dfed;
    border-radius: 15px;
}

.admin-user-picker-item:hover,
.admin-user-picker-item.is-active {
    border-color: #5f9bf7;
    background: #e7f0ff;
}

.admin-board-access-item,
.admin-status-tile {
    border: 2px solid #d5dfed;
    border-radius: 15px;
}

.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form input[type="password"],
.settings-form input[type="number"],
.settings-form textarea,
.settings-form select,
.inline-field input {
    min-height: 44px;
    border: 2px solid #c8d2e1;
    border-radius: 13px;
    background: #ffffff;
}

.settings-form select {
    padding-right: 36px;
}

.admin-form-actions-bottom {
    padding-top: 8px;
}

@media (max-width: 1180px) {
    .settings-card-wide {
        width: min(1120px, calc(100vw - 32px));
    }

    .admin-user-management-layout {
        grid-template-columns: 1fr;
    }
}

/* v0.86.7b Unified admin/board settings blocks and retention UI */
.settings-card,
.settings-card-wide {
    border: 2px solid #aebfd5;
}

.settings-card-wide {
    width: min(1400px, calc(100vw - 40px));
}

.settings-form fieldset,
.settings-subsection,
.settings-table-wrap {
    border: 2px solid #b8c7dc;
    border-radius: 18px;
    background: #fbfcff;
    box-shadow: 0 4px 14px rgba(9, 30, 66, 0.05);
}

.settings-subsection {
    padding: 22px;
    border-top: 2px solid #b8c7dc;
}

.settings-subsection + .settings-subsection {
    margin-top: 26px;
}

.settings-form fieldset legend {
    padding: 0 10px;
    font-size: 15px;
    background: #ffffff;
    border-radius: 999px;
}

.settings-form fieldset > label:not(.toggle-row),
.admin-form-section > label:not(.toggle-row) {
    margin-top: 4px;
}

.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form input[type="password"],
.settings-form input[type="number"],
.settings-form textarea,
.settings-form select,
.inline-field input {
    border: 2px solid #c6d2e3;
    border-radius: 14px;
}

.settings-form input:focus,
.settings-form textarea:focus,
.settings-form select:focus,
.inline-field input:focus {
    outline: none;
    border-color: #5f9bf7;
    box-shadow: 0 0 0 3px rgba(12, 102, 228, 0.12);
}

.toggle-row,
.admin-checkbox-line,
.admin-board-access-item,
.admin-status-tile {
    border: 2px solid #d2ddeb;
    border-radius: 16px;
    background: #ffffff;
}

.settings-table-wrap {
    overflow: hidden;
}

.settings-table th {
    background: #eef4ff;
}

@media (max-width: 900px) {
    .settings-card-wide {
        width: min(100%, calc(100vw - 24px));
    }
}

.card-lifecycle-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.card-lifecycle-actions form {
    margin: 0;
}

.mini-action-button {
    border: 1px solid #c6d2e3;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: #172b4d;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
}

.mini-action-button:hover {
    background: #eef4ff;
    border-color: #85b8ff;
}

/* v0.86.11b: column configuration for independent board/archive/trash areas. */
.column-config-fieldset {
    display: grid;
    gap: 18px;
}

.column-config-block {
    border: 2px solid var(--border, #c7ccd8);
    border-radius: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 24px rgba(9, 30, 66, 0.06);
}

.column-config-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.column-config-header h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.column-config-header p {
    margin: 0;
    color: var(--muted, #5e6c84);
    font-size: 0.9rem;
}

.column-config-list {
    display: grid;
    gap: 10px;
}

.column-config-row {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) 120px 120px 120px minmax(150px, 1fr);
    gap: 12px;
    align-items: end;
    border: 1px solid var(--border, #dfe1e6);
    border-radius: 16px;
    padding: 14px;
    background: #fff;
}

.column-config-row-new {
    grid-template-columns: minmax(260px, 2fr) 120px 120px 170px;
    margin-top: 12px;
    border: 2px dashed var(--border-strong, #c7ccd8);
    background: rgba(244, 245, 247, 0.9);
}

.column-config-row-new .compact-hint {
    display: block;
    margin: 6px 0 0;
    font-size: 0.78rem;
}

.column-add-action {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    height: 100%;
}

.mini-submit-button {
    min-height: 44px;
    white-space: nowrap;
}

.column-config-row label:not(.admin-checkbox-line) {
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted, #5e6c84);
}

.column-config-row input[type="color"] {
    min-height: 44px;
    padding: 5px;
    border-radius: 12px;
    border: 1px solid var(--border, #dfe1e6);
    background: #fff;
    width: 100%;
}

.column-delete-option {
    align-self: center;
    margin: 0;
    align-items: flex-start;
    gap: 8px;
}

.column-delete-option span {
    display: block;
}

.column-delete-option small {
    display: block;
    margin-top: 2px;
    color: var(--muted, #5e6c84);
    font-size: 0.75rem;
    font-weight: 500;
}

@media (max-width: 980px) {
    .column-config-row,
    .column-config-row-new {
        grid-template-columns: 1fr;
    }
}

/* v0.86.14b: alphabetic tag management with picker/editor layout. */
.tag-config-fieldset {
    display: grid;
    gap: 18px;
}

.tag-config-block {
    border: 2px solid var(--border, #c7ccd8);
    border-radius: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 24px rgba(9, 30, 66, 0.06);
}

.tag-management-layout {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(360px, 1fr);
    gap: 18px;
    align-items: start;
}

.tag-config-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.tag-config-header.compact {
    margin-bottom: 12px;
}

.tag-config-header h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.tag-config-header p {
    margin: 0;
    color: var(--muted, #5e6c84);
    font-size: 0.9rem;
}

.tag-picker-panel,
.tag-editor-panel,
.tag-create-panel {
    border: 1px solid var(--border, #dfe1e6);
    border-radius: 16px;
    background: #fff;
    padding: 14px;
}

.tag-picker-list {
    display: grid;
    gap: 8px;
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.tag-picker-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border, #dfe1e6);
    border-radius: 14px;
    background: #f7f8fa;
    color: var(--text, #172b4d);
    text-decoration: none;
}

.tag-picker-item:hover,
.tag-picker-item.is-active {
    border-color: var(--accent, #0052cc);
    background: #eef4ff;
}

.tag-picker-swatch {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(9, 30, 66, 0.18);
}

.tag-picker-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.tag-picker-item small {
    color: var(--muted, #5e6c84);
}

.tag-editor-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 120px 110px;
    gap: 12px;
    align-items: end;
}

.tag-editor-grid label,
.tag-create-panel label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted, #5e6c84);
}

.tag-editor-grid input[type="color"],
.tag-create-panel input[type="color"] {
    min-height: 44px;
    padding: 5px;
    border-radius: 12px;
    border: 1px solid var(--border, #dfe1e6);
    background: #fff;
    width: 100%;
}

.tag-delete-option {
    margin-top: 14px;
    align-items: flex-start;
    gap: 8px;
}

.tag-delete-option span {
    display: block;
}

.tag-delete-option small {
    display: block;
    margin-top: 2px;
    color: var(--muted, #5e6c84);
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-card-count {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    border: 1px solid var(--border, #dfe1e6);
    border-radius: 999px;
    background: #f7f8fa;
    color: var(--muted, #5e6c84);
    font-size: 0.82rem;
}

.tag-card-count strong {
    color: var(--text, #172b4d);
}

.tag-create-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 120px 160px;
    gap: 12px;
    align-items: end;
    border-style: dashed;
    background: rgba(244, 245, 247, 0.9);
}

.tag-add-action {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    height: 100%;
}

@media (max-width: 1180px) {
    .tag-management-layout,
    .tag-editor-grid,
    .tag-create-panel {
        grid-template-columns: 1fr;
    }

    .tag-picker-list {
        max-height: none;
    }

    .tag-card-count {
        justify-content: flex-start;
        padding: 0 14px;
    }
}


/* v0.86.15b - Tag management filter and anchored selection */
.tag-filter-label {
    display: block;
    margin: 0 0 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted, #5e6c84);
}

.tag-filter-input {
    width: 100%;
    margin-bottom: 10px;
    border-radius: 14px;
}

.tag-filter-empty {
    margin: 8px 0 10px;
}

.tag-config-fieldset {
    scroll-margin-top: 24px;
}

/* v0.86.16b: robust dynamic tag filter and clearer search field */
.tag-picker-item[hidden] {
    display: none !important;
}

.tag-filter-label {
    display: block;
    margin-top: 8px;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--text, #172b4d);
}

.tag-filter-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px 10px 38px;
    border: 2px solid var(--border-strong, #c7d2e5);
    border-radius: 999px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235e6c84' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 13px center;
    box-shadow: inset 0 1px 0 rgba(9, 30, 66, 0.04);
}

.tag-filter-input:focus {
    outline: none;
    border-color: var(--accent, #0052cc);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.12);
}

.tag-filter-empty {
    margin-top: 10px;
}

/* v0.86.17b - Bulk tag delete */
.tag-picker-item {
    grid-template-columns: 24px minmax(0, 1fr);
}

.tag-bulk-check {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-bulk-check input {
    width: 18px;
    height: 18px;
}

.tag-picker-select {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.tag-bulk-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border, #dfe1e6);
}

.tag-bulk-count {
    color: var(--muted, #5e6c84);
    font-size: 0.9rem;
    font-weight: 700;
}

.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border: 0;
    border-radius: 12px;
    background: #ffebe6;
    color: #bf2600;
    font-weight: 800;
    cursor: pointer;
}

.danger-button:hover:not(:disabled) {
    background: #ffd2c2;
}

.danger-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.tag-bulk-delete-button {
    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;
}


/* v0.86.18b - Tag management compact bulk actions */
.tag-picker-panel .tag-filter-label {
    display: none;
}

.tag-picker-panel .tag-filter-input {
    margin-top: 8px;
    margin-bottom: 12px;
}

.tag-bulk-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
}

.tag-bulk-count {
    display: block;
    line-height: 1.2;
}

.tag-bulk-delete-button {
    width: 100%;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
    white-space: normal;
    text-align: center;
}

.tag-picker-panel .compact-hint {
    margin-top: 8px;
    line-height: 1.25;
}

/* v0.86.19b - Column veil colors and board background themes */
body.board-theme-light {
    background: #f6f7f9;
}

body.board-theme-soft {
    background: #eef1f5;
}

body.board-theme-cool {
    background: #edf5ff;
}

body.board-theme-warm {
    background: #fff7ed;
}

body.board-theme-dark {
    background: #172033;
    color: #172b4d;
}

body.board-theme-light .page,
body.board-theme-light .board-wrap {
    background: #f6f7f9;
}

body.board-theme-soft .page,
body.board-theme-soft .board-wrap {
    background: linear-gradient(180deg, #f3f5f8 0%, #e9edf3 100%);
}

body.board-theme-cool .page,
body.board-theme-cool .board-wrap {
    background: linear-gradient(180deg, #f3f8ff 0%, #e6f0ff 100%);
}

body.board-theme-warm .page,
body.board-theme-warm .board-wrap {
    background: linear-gradient(180deg, #fffaf2 0%, #fff0dc 100%);
}

body.board-theme-dark .page,
body.board-theme-dark .board-wrap {
    background: linear-gradient(180deg, #202b3f 0%, #121a29 100%);
}

body.board-theme-dark .board-title h1,
body.board-theme-dark .board-title p,
body.board-theme-dark .board-links,
body.board-theme-dark .board-search-status {
    color: #e7edf7;
}

.column {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--column-color, #ebecf0) 22%, #ffffff 78%) 0%,
        color-mix(in srgb, var(--column-color, #ebecf0) 13%, #ffffff 87%) 52%,
        color-mix(in srgb, var(--column-color, #ebecf0) 9%, #ffffff 91%) 100%
    );
    border-color: color-mix(in srgb, var(--column-color, #ebecf0) 42%, #cfd7e3 58%);
    box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.18), 0 10px 24px rgba(9, 30, 66, 0.08);
}

.column-header {
    background: color-mix(in srgb, var(--column-color, #ebecf0) 50%, #ffffff 50%);
    border-bottom-color: color-mix(in srgb, var(--column-color, #ebecf0) 50%, rgba(15, 23, 42, 0.14) 50%);
}

.cards {
    background: transparent;
}

.column-color-select {
    min-height: 44px;
    width: 100%;
    border: 2px solid #c6d2e3;
    border-radius: 14px;
    background: #ffffff;
    padding: 0 10px;
}

.column-color-select:focus {
    outline: none;
    border-color: #5f9bf7;
    box-shadow: 0 0 0 3px rgba(12, 102, 228, 0.12);
}

body.board-theme-dark .column {
    box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.08), 0 12px 28px rgba(0, 0, 0, 0.26);
}

/* v0.86.26b: Inline images inside rendered Markdown content. */
.md-inline-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 280px;
    margin: 10px 0;
    border-radius: 14px;
    border: 1px solid rgba(9, 30, 66, 0.16);
    box-shadow: 0 8px 20px rgba(9, 30, 66, 0.10);
    object-fit: contain;
}

.card-description-preview .md-inline-image,
.card .markdown-preview .md-inline-image {
    width: 100%;
    max-width: 100%;
    max-height: 86px;
    margin: 6px 0;
    border-radius: 10px;
    object-fit: cover;
}

.card:hover .card-description-preview .md-inline-image,
.card:focus-within .card-description-preview .md-inline-image,
.card:hover .markdown-preview .md-inline-image,
.card:focus-within .markdown-preview .md-inline-image {
    max-height: 120px;
}

.markdown-live-preview {
    margin: 10px 0 8px;
    border: 2px solid #d8e2ef;
    border-radius: 16px;
    background: #f8fafc;
    overflow: hidden;
}

.markdown-live-preview-title {
    padding: 8px 12px;
    border-bottom: 1px solid #d8e2ef;
    color: #42526e;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.markdown-live-preview-content {
    min-height: 54px;
    max-height: 320px;
    overflow: auto;
    padding: 12px;
    background: #ffffff;
}

.markdown-live-preview-content:empty::before {
    content: 'Noch keine Vorschau vorhanden.';
    color: #7a869a;
}

.markdown-live-preview-content .md-inline-image {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
}

.markdown-toolbar button[data-md-action="inline-image"] {
    font-size: 15px;
}


/* v0.86.29b: Inline images are shown as a compact gallery with large-view overlay. */
.inline-image-strip {
    grid-column: 1 / -1;
    margin: 10px 0 0;
    padding: 10px;
    border: 2px solid #d8e2ef;
    border-radius: 16px;
    background: #f8fafc;
}

.inline-image-strip-title {
    margin: 0 0 8px;
    color: #42526e;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inline-image-strip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inline-image-strip-item {
    width: 150px;
    margin: 0;
    padding: 8px;
    border: 1px solid #d8e2ef;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(9, 30, 66, 0.08);
    cursor: pointer;
    text-align: left;
}

.inline-image-strip-item:hover,
.inline-image-strip-item:focus-visible {
    border-color: #7aa7ff;
    box-shadow: 0 8px 20px rgba(12, 102, 228, 0.16);
    outline: none;
}

.inline-image-strip-item img {
    display: block;
    width: 100%;
    height: 96px;
    border-radius: 10px;
    object-fit: cover;
}

.inline-image-strip-item span {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    color: #5e6c84;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inline-image-lightbox[hidden] {
    display: none !important;
}

.inline-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.inline-image-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 30, 66, 0.72);
}

.inline-image-lightbox-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: min(1100px, 96vw);
    max-height: 92vh;
    padding: 16px;
    border: 2px solid #d8e2ef;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(9, 30, 66, 0.35);
}

.inline-image-lightbox-header,
.inline-image-lightbox-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.inline-image-lightbox-body {
    display: flex;
    min-height: 160px;
    overflow: auto;
    border-radius: 16px;
    background: #f4f7fb;
}

.inline-image-lightbox-body img {
    display: block;
    max-width: 100%;
    max-height: 72vh;
    margin: auto;
    object-fit: contain;
}

.markdown-live-preview {
    display: none;
}

/* v0.87.1b - Card templates */
.template-config-fieldset {
    scroll-margin-top: 24px;
}

.template-management-layout {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(360px, 1fr);
    gap: 18px;
    align-items: start;
    border: 2px solid var(--border, #c7ccd8);
    border-radius: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 24px rgba(9, 30, 66, 0.06);
}

.template-picker-panel,
.template-editor-panel,
.template-create-panel {
    border: 1px solid var(--border, #dfe1e6);
    border-radius: 16px;
    background: #fff;
    padding: 14px;
}

.template-picker-list {
    display: grid;
    gap: 8px;
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.template-picker-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border, #dfe1e6);
    border-radius: 14px;
    background: #f7f8fa;
    color: var(--text, #172b4d);
    text-decoration: none;
}

.template-picker-item:hover,
.template-picker-item.is-active {
    border-color: var(--accent, #0052cc);
    background: #eef4ff;
}

.template-picker-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.template-picker-item small {
    color: var(--muted, #5e6c84);
}

.template-editor-panel label,
.template-create-panel label {
    display: block;
    margin: 10px 0 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted, #5e6c84);
}

.template-editor-panel textarea,
.template-create-panel textarea {
    min-height: 160px;
    resize: vertical;
}

.template-create-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(360px, 1fr) 180px;
    gap: 12px;
    align-items: end;
    border-style: dashed;
    background: rgba(244, 245, 247, 0.9);
}

.template-insert-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border, #dfe1e6);
    border-radius: 14px;
    background: #f7f8fa;
}

.template-insert-panel select {
    margin: 0;
}

@media (max-width: 1180px) {
    .template-management-layout,
    .template-create-panel {
        grid-template-columns: 1fr;
    }

    .template-picker-list {
        max-height: none;
    }
}

@media (max-width: 760px) {
    .template-insert-panel {
        grid-template-columns: 1fr;
    }
}


/* v0.87.2b - Template insert moved into toolbar flyout */
.toolbar-template-button {
    font-size: 14px;
}

.template-insert-popover {
    position: absolute;
    top: 42px;
    right: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 8px;
    align-items: center;
    width: min(520px, calc(100% - 12px));
    padding: 12px;
    border: 2px solid #c7d2e4;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(9, 30, 66, 0.18);
}

.template-insert-popover[hidden] {
    display: none;
}

.template-insert-popover select {
    min-width: 0;
    margin: 0;
}

.template-insert-popover button {
    white-space: nowrap;
}

.template-insert-panel {
    display: none;
}

@media (max-width: 760px) {
    .template-insert-popover {
        position: static;
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
        width: auto;
        margin-top: 8px;
    }
}


/* v0.87.5b: Dynamic card hover preview */
.card-hover-preview-panel {
    position: absolute;
    z-index: 3000;
    width: min(720px, calc(100vw - 36px));
    max-height: calc(100vh - 36px);
    overflow: hidden;
    padding: 14px 16px;
    border: 2px solid rgba(38, 73, 123, 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 45px rgba(15, 35, 70, 0.20);
    color: #10264a;
    font-size: 0.95rem;
    line-height: 1.45;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.card-hover-preview-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.card-hover-preview-title {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(38, 73, 123, 0.14);
    font-weight: 800;
    color: #09285a;
}

.card-hover-preview-body {
    max-height: var(--hover-preview-body-max-height, calc(100vh - 120px));
    overflow: hidden;
}

.card-hover-preview-body img,
.card-hover-preview-panel img {
    display: block;
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 12px;
    margin: 8px 0;
}


.card-hover-preview-body::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 26px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.98));
}

.card-hover-preview-body {
    position: relative;
}

/* v0.88.1b - Due dates and board card header layout */
.card {
    border-width: 1.5px;
}

.card.is-overdue-card {
    border-color: rgba(180, 35, 24, 0.38);
    box-shadow: 0 0 0 0 rgba(180, 35, 24, 0.22), 0 1px 2px rgba(15, 23, 42, 0.12);
    animation: overdueCardPulse 2.2s ease-in-out infinite;
}

@keyframes overdueCardPulse {
    0% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0.20), 0 1px 2px rgba(15, 23, 42, 0.12); }
    55% { box-shadow: 0 0 0 7px rgba(180, 35, 24, 0.00), 0 1px 2px rgba(15, 23, 42, 0.12); }
    100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0.00), 0 1px 2px rgba(15, 23, 42, 0.12); }
}

.card-topline {
    min-height: 24px;
    gap: 8px;
    margin-bottom: 6px;
}

.card-topline-left,
.card-topline-right {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.card-topline-left {
    flex: 1 1 auto;
}

.card-topline-right {
    flex: 0 0 auto;
    margin-left: auto;
}

.card-id {
    display: none !important;
}

.card h3 {
    margin-top: 3px;
    margin-bottom: 8px;
}

.card-description-preview {
    padding: 7px 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.48);
    color: #1f2937;
    font-size: 13.5px;
    line-height: 1.42;
}

.due-badge {
    margin-top: 0;
    padding: 3px 8px;
    border: 1px solid rgba(71, 85, 105, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #334155;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.due-badge.is-today {
    border-color: rgba(180, 83, 9, 0.22);
    background: rgba(254, 243, 199, 0.82);
    color: #92400e;
}

.due-badge.is-overdue {
    border-color: rgba(180, 35, 24, 0.28);
    background: rgba(254, 226, 226, 0.86);
    color: #b42318;
}

.due-date-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.due-date-row input[type="datetime-local"] {
    width: min(100%, 280px);
    max-width: 280px;
    margin-bottom: 0;
    min-height: 44px;
    border-radius: 12px;
    border-color: #cfd7e3;
    background: #ffffff;
}

.due-clear-button {
    white-space: nowrap;
}

/* v0.88.4b - Due date field polish */
.due-date-row .due-clear-button {
    min-height: 44px;
    align-self: stretch;
}

/* v0.88.5b - clearer card meta sections */
.card-meta-section {
    margin-top: 18px;
    padding: 16px 18px;
    border: 1.5px solid rgba(148, 163, 184, 0.26);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.62);
}

.card-meta-section + .card-meta-section {
    margin-top: 14px;
}

.card-meta-section-due {
    margin-top: 22px;
    border-color: rgba(37, 99, 235, 0.16);
    background: rgba(239, 246, 255, 0.42);
}

.card-meta-heading {
    margin: 0 0 10px 0;
    color: #475569;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
}

.card-meta-section .tag-editor,
.card-meta-section .color-picker,
.card-meta-section .due-date-row {
    margin-top: 0;
}

.card-meta-section .field-hint {
    margin-top: 8px;
    margin-bottom: 0;
}

.card-meta-section-tags .tag-input {
    margin-top: 10px;
}

.card-meta-section-color .color-picker {
    padding-top: 2px;
}

@media (max-width: 760px) {
    .card-meta-section {
        padding: 14px;
        border-radius: 16px;
    }
}


/* v0.90.2b - Security status visibility in admin settings */
.admin-security-status-block {
    margin-top: 1.5rem;
}

.security-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    border: 2px solid rgba(31, 41, 55, 0.14);
    background: #f8fafc;
    color: #111827;
}

.security-summary-badge.is-ok {
    background: #e7f8ef;
    border-color: #a7e0bf;
    color: #166534;
}

.security-summary-badge.is-warning {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.security-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.security-check-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border: 2px solid rgba(31, 41, 55, 0.12);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.security-check-card strong {
    display: block;
    color: #111827;
    margin-bottom: 0.2rem;
}

.security-check-card small {
    display: block;
    color: #6b7280;
    line-height: 1.35;
}

.security-check-card > span {
    flex: 0 0 auto;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.security-check-card.is-ok {
    border-color: #b7e4c7;
    background: #f4fbf7;
}

.security-check-card.is-ok > span {
    background: #dcfce7;
    color: #166534;
}

.security-check-card.is-warning {
    border-color: #fed7aa;
    background: #fff7ed;
}

.security-check-card.is-warning > span {
    background: #ffedd5;
    color: #9a3412;
}

/* v0.90.4b - MFA setup UI */
.admin-mfa-setup-result {
    border-color: rgba(79, 70, 229, 0.35);
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.admin-mfa-result-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 1rem;
    margin: 1rem 0;
}

.admin-code-block {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.04);
    color: #111827;
    font-size: 0.9rem;
    line-height: 1.5;
}

.admin-code-block-wrap {
    white-space: normal;
    overflow-wrap: anywhere;
}

.admin-recovery-code-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.55rem;
    margin: 0.65rem 0 0.85rem;
}

.admin-recovery-code-list code {
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.12);
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.admin-mfa-panel {
    margin-top: 1rem;
}

.admin-mfa-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1rem;
}

.inline-admin-form {
    margin: 0;
}

.danger-button-soft {
    border-color: rgba(185, 28, 28, 0.28);
    color: #991b1b;
    background: rgba(254, 242, 242, 0.9);
}

.danger-button-soft:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

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


/* v0.90.6b MFA activation */
.admin-mfa-activate-form {
    align-items: center;
    gap: 0.75rem;
}
.admin-mfa-activate-form input[name="mfa_code"] {
    width: 11rem;
    max-width: 100%;
    text-align: center;
    letter-spacing: 0.14em;
    font-weight: 700;
}
