* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--app-board-bg, #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;
}

/* v0.90.7b MFA setup UX redesign */
.admin-mfa-workflow {
    margin-bottom: 1rem;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.admin-mfa-workflow-header {
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.admin-mfa-workflow-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
    gap: 1rem;
    margin-top: 1rem;
}

.admin-mfa-step {
    padding: 1rem;
    border: 1.5px solid rgba(120, 150, 190, 0.34);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.admin-mfa-step-wide {
    grid-column: span 1;
}

.admin-mfa-step-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
    color: #0f2547;
}

.admin-mfa-step-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-weight: 800;
}

.admin-copy-row {
    display: flex;
    gap: 0.6rem;
    align-items: stretch;
}

.admin-info-box,
.admin-warning-box {
    margin-top: 0.8rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    background: rgba(219, 234, 254, 0.58);
    color: #214069;
    font-size: 0.92rem;
}

.admin-info-box.is-ok {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(220, 252, 231, 0.72);
    color: #166534;
    font-weight: 700;
}

.admin-warning-box {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(254, 243, 199, 0.68);
    color: #7c4a03;
}

.admin-recovery-code-list-grid {
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.admin-status-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-mfa-actions-stacked {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
}

.admin-mfa-actions-stacked .inline-admin-form,
.admin-mfa-actions-stacked button,
.admin-mfa-activate-form,
.admin-mfa-activate-form button,
.admin-mfa-activate-form input {
    width: 100%;
}

.admin-code-input {
    min-height: 44px;
    border: 1.5px solid rgba(120, 150, 190, 0.48);
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    background: #fff;
}

.settings-badge.is-ok {
    background: rgba(220, 252, 231, 0.92);
    color: #166534;
}

.login-card .primary-button,
.login-card button[type="submit"],
.auth-card .primary-button,
.auth-card button[type="submit"] {
    border-radius: 16px;
    min-height: 48px;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

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

/* v0.90.8b MFA/user editor grid repair */
.admin-user-management-layout > .admin-user-picker {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.admin-user-management-layout > .admin-mfa-workflow,
.admin-user-management-layout > #user-editor {
    grid-column: 2;
}

.admin-user-management-layout > #user-editor {
    grid-row: 2;
}

.admin-user-management-layout > .admin-mfa-workflow {
    grid-row: 1;
}

@media (max-width: 1180px) {
    .admin-user-management-layout > .admin-user-picker,
    .admin-user-management-layout > .admin-mfa-workflow,
    .admin-user-management-layout > #user-editor {
        grid-column: auto;
        grid-row: auto;
    }
}

/* v0.90.9b - MFA recovery + login gate UI */
.login-card-modern {
    width: min(440px, calc(100vw - 32px));
    padding: 32px;
    border: 2px solid #b7c7df;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(20, 45, 90, 0.16);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.login-brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #0b63ce;
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
}

.login-brand h1 {
    margin: 2px 0 0;
}

.login-muted {
    color: #52637d;
    line-height: 1.45;
    margin: 0 0 20px;
}

.login-form-modern {
    display: grid;
    gap: 10px;
}

.login-form-modern label {
    font-weight: 800;
    color: #10284c;
}

.login-form-modern input {
    width: 100%;
    border: 1.5px solid #c4d0e1;
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    color: #10284c;
    background: #fff;
}

.login-form-modern input:focus {
    outline: 3px solid rgba(37, 99, 235, 0.18);
    border-color: #2563eb;
}

.login-submit {
    width: 100%;
    margin-top: 12px;
    justify-content: center;
}

.login-secondary-form {
    margin-top: 12px;
}

.login-secondary-form .secondary-button {
    width: 100%;
    justify-content: center;
}

.login-error {
    border-radius: 14px;
    padding: 12px 14px;
}

.admin-recovery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}


/* v0.90.11b Admin user/MFA layout polish */
.admin-user-management-layout {
    align-items: start;
}

.admin-user-management-layout > .admin-user-picker {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.admin-user-management-layout > #user-editor {
    grid-column: 2;
    grid-row: 1;
}

.admin-user-management-layout > .admin-mfa-workflow {
    grid-column: 2;
    grid-row: 2;
}

.admin-user-grid {
    align-items: start;
}

.admin-user-grid > div {
    align-content: start;
}

.admin-user-grid .field-hint {
    min-height: 2.25rem;
    margin: 0.2rem 0 0;
    line-height: 1.25;
}

.admin-form-section + .admin-form-section,
.admin-mfa-workflow + .admin-form-section,
.admin-user-editor + .admin-mfa-workflow,
.settings-form + .settings-form {
    margin-top: 1rem;
}

.admin-form-section {
    padding-top: 1.1rem;
}

.admin-section-block > .settings-subsection-header + .settings-form,
.admin-section-block > .settings-form + .admin-user-management-layout {
    margin-top: 1.25rem;
}

.admin-user-picker-item {
    scroll-margin-top: 2rem;
}

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

.admin-mfa-workflow-grid {
    align-items: stretch;
}

.admin-mfa-step {
    min-width: 0;
}

@media (max-width: 1180px) {
    .admin-user-management-layout > .admin-user-picker,
    .admin-user-management-layout > .admin-mfa-workflow,
    .admin-user-management-layout > #user-editor {
        grid-column: auto;
        grid-row: auto;
    }
}


/* v0.90.12b Admin user layout refactor and spacing polish */
.admin-security-status-block {
    margin-bottom: 2.2rem;
}

.admin-security-status-block + .settings-form {
    margin-top: 2.2rem;
}

.settings-form fieldset {
    margin-top: 1.55rem;
    margin-bottom: 1.75rem;
}

.settings-form legend {
    padding: 0 0.7rem;
    margin-left: 0.6rem;
    line-height: 1.25;
}

/* User management: horizontal picker, then full-width editor, then full-width MFA. */
.admin-user-management-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: stretch;
    margin-top: 1.5rem;
}

.admin-user-management-layout > .admin-user-picker,
.admin-user-management-layout > #user-editor,
.admin-user-management-layout > .admin-mfa-workflow {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
}

.admin-user-management-layout > .admin-user-picker {
    padding: 1.15rem 1.25rem;
    scroll-margin-top: 1.5rem;
}

.admin-user-picker h3 {
    margin-bottom: 0.9rem;
}

.admin-user-picker-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.admin-user-picker-item {
    min-height: 4.1rem;
}

.admin-user-management-layout > #user-editor {
    margin-top: 0;
}

.admin-user-management-layout > .admin-mfa-workflow {
    margin-top: 0;
}

.admin-user-editor .admin-form-section,
.admin-create-user-fieldset .admin-form-section {
    min-width: 0;
}

.admin-user-editor > .admin-form-section + .admin-form-section {
    margin-top: 0;
}

.admin-user-editor {
    gap: 1.4rem;
}

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

.admin-user-grid .field-hint {
    min-height: 0;
    margin-top: 0.35rem;
}

.admin-mfa-workflow-grid {
    gap: 1.25rem;
}

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

/* v0.90.13b Unified user form */
.admin-user-management-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.55rem;
    align-items: stretch;
}

.admin-user-management-layout > .admin-user-picker {
    order: 1;
    grid-column: 1 / -1;
}

.admin-user-management-layout > #user-editor {
    order: 2;
    grid-column: 1 / -1;
}

.admin-user-management-layout > .admin-mfa-workflow {
    order: 3;
    grid-column: 1 / -1;
}

.admin-user-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.95rem;
}

.admin-user-picker-header h3 {
    margin: 0;
}

.admin-new-user-link {
    white-space: nowrap;
}

.admin-new-user-link.is-active {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: #eaf2ff;
}

.admin-user-picker-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
}

.admin-section-block > .settings-subsection-header + .admin-user-management-layout {
    margin-top: 1.35rem;
}

@media (max-width: 780px) {
    .admin-user-picker-header {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-new-user-link {
        justify-content: center;
        width: 100%;
    }
}

/* v0.90.14b Unified user picker repair */
.admin-user-management-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.65rem;
    align-items: stretch;
}

.admin-user-management-layout > .admin-user-picker,
.admin-user-management-layout > #user-editor,
.admin-user-management-layout > .admin-mfa-workflow {
    grid-column: 1 / -1;
    width: 100%;
}

.admin-user-management-layout > .admin-user-picker { order: 1; }
.admin-user-management-layout > #user-editor { order: 2; }
.admin-user-management-layout > .admin-mfa-workflow { order: 3; }

.admin-user-select-row {
    display: grid;
    grid-template-columns: minmax(260px, 520px);
    align-items: center;
}

.admin-user-select {
    width: 100%;
    min-height: 48px;
    border: 2px solid #c8d7ea;
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
    padding: 0 1rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.admin-user-select:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(37, 99, 235, 0.16);
}

.admin-user-picker-header {
    margin-bottom: 0.75rem;
}

.admin-user-picker-list,
.admin-user-picker-item,
.admin-new-user-link {
    display: none;
}

.admin-user-editor + .admin-mfa-workflow {
    margin-top: 0;
}

@media (max-width: 700px) {
    .admin-user-select-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* v0.90.16b - Trusted devices */
.login-trust-device-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
    padding: 12px 14px;
    border: 1.5px solid #d8e2f0;
    border-radius: 14px;
    background: #f7faff;
    color: #10284c;
    font-weight: 750;
    cursor: pointer;
}

.login-trust-device-option input {
    width: auto;
    margin-top: 3px;
    flex: 0 0 auto;
}

.login-trust-device-option span {
    display: grid;
    gap: 2px;
}

.login-trust-device-option small {
    color: #63738d;
    font-weight: 600;
    line-height: 1.35;
}

.admin-trusted-devices-step {
    grid-column: 1 / -1;
}

.admin-trusted-device-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.admin-trusted-device-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1.5px solid #d8e2f0;
    border-radius: 16px;
    background: #ffffff;
}

.admin-trusted-device-item strong,
.admin-trusted-device-item span,
.admin-trusted-device-item small {
    display: block;
}

.admin-trusted-device-item span {
    margin-top: 4px;
    color: #52637d;
    overflow-wrap: anywhere;
}

.admin-trusted-device-item small {
    margin-top: 5px;
    color: #75839a;
    font-weight: 650;
}

.admin-revoke-all-devices {
    margin-top: 14px;
    justify-content: flex-end;
}

@media (max-width: 720px) {
    .admin-trusted-device-item {
        grid-template-columns: 1fr;
    }

    .admin-trusted-device-item .inline-admin-form,
    .admin-trusted-device-item button,
    .admin-revoke-all-devices,
    .admin-revoke-all-devices button {
        width: 100%;
    }
}

/* v0.90.22b - Audit log foundation */
.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1.5px solid #d8e2f0;
    border-radius: 16px;
    background: #ffffff;
}

.admin-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
    padding: 11px 13px;
    border-bottom: 1px solid #edf1f7;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: #f7faff;
    color: #52637d;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

.admin-table code {
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef4ff;
    color: #174ea6;
    font-size: 0.82rem;
    font-weight: 750;
}


/* v0.90.23b - Bounded audit log table */
.audit-log-table-wrapper {
    max-height: 420px;
    overflow: auto;
}

.audit-log-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.audit-log-table td:nth-child(6) {
    min-width: 220px;
}

/* v0.90.30b - Allow regular page scrolling on admin/system pages */
body.app-page.admin-page {
    min-height: 100%;
    height: auto;
    overflow-y: auto;
}

body.app-page.admin-page .admin-shell {
    min-height: 100vh;
}


/* v0.90.31b - Fix admin cleanup page document scrolling */
html.admin-document,
html.admin-document body {
    min-height: 100%;
    height: auto;
    overflow-y: auto;
}

html.admin-document body.app-page.admin-page {
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
}

/* v0.90.34b - Responsive / Mobile Basis */
:root {
    --mobile-safe-gap: 12px;
}

.topbar,
.board-title,
.board-wrap,
.settings-shell,
.admin-shell {
    min-width: 0;
}

.topbar-left,
.topbar-actions,
.board-links {
    min-width: 0;
}

.topbar .brand,
.topbar .board-switcher,
.topbar-search-filter {
    min-width: 0;
}

@media (max-width: 980px) {
    html,
    body {
        overflow-y: auto;
    }

    body:not(.app-page) {
        min-height: 100%;
        height: auto;
    }

    .topbar {
        height: auto;
        min-height: 56px;
        padding: 10px 12px;
        gap: 10px;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .topbar-left,
    .topbar-actions {
        gap: 8px;
        flex-wrap: wrap;
    }

    .topbar-actions {
        margin-left: auto;
        justify-content: flex-end;
    }

    .brand {
        font-size: 16px;
        flex-wrap: wrap;
    }

    .board-switcher select {
        max-width: min(52vw, 260px);
    }

    .pill-link,
    .avatar {
        height: auto;
        min-height: 32px;
        padding: 7px 10px;
        white-space: nowrap;
    }

    .page {
        height: auto;
        min-height: calc(100vh - 76px);
        overflow: visible;
    }

    .board-title {
        height: auto;
        padding: 14px 12px 10px;
        gap: 10px;
        flex-direction: column;
    }

    .board-title h1 {
        font-size: 22px;
        line-height: 1.18;
    }

    .board-links {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .board-nav-pill {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .board-wrap {
        height: auto;
        min-height: calc(100vh - 185px);
        overflow-x: auto;
        overflow-y: visible;
        padding: 0 12px 16px;
        -webkit-overflow-scrolling: touch;
    }

    .board {
        min-width: max-content;
        gap: 12px;
        padding-bottom: 4px;
    }

    .column {
        max-height: calc(100vh - 205px);
    }

    .card {
        margin-bottom: 10px;
    }

    .card h3 {
        font-size: 15px;
    }

    .card-description-preview {
        font-size: 13px;
        line-height: 1.45;
    }
}

@media (max-width: 760px) {
    .topbar {
        align-items: stretch;
    }

    .topbar-left,
    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .topbar-actions {
        overflow-x: auto;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .topbar-search-filter {
        width: 100%;
        order: 3;
    }

    .topbar-search,
    .topbar-search input,
    .board-switcher,
    .board-switcher select {
        width: 100%;
        max-width: none;
    }

    .filter-panel {
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }

    .board-title {
        padding-inline: var(--mobile-safe-gap);
    }

    .board-wrap {
        padding-inline: var(--mobile-safe-gap);
    }

    .column {
        width: min(86vw, 360px);
        max-height: calc(100vh - 235px);
    }

    .column-header {
        min-height: 48px;
        height: auto;
        padding-block: 8px;
        gap: 8px;
    }

    .cards {
        padding: 10px;
    }

    .card-modal-panel {
        inset: 10px;
        min-width: 0;
        max-width: none;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }

    .card-detail-header,
    .card-detail-actions,
    .form-actions,
    .admin-form-actions-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .card-detail-actions a,
    .card-detail-actions button,
    .form-actions a,
    .form-actions button,
    .admin-form-actions-bottom a,
    .admin-form-actions-bottom button {
        width: 100%;
        justify-content: center;
    }

    .settings-shell,
    .admin-shell {
        width: 100%;
        max-width: none;
        padding: 12px;
    }

    .settings-card,
    .admin-settings-card,
    .settings-subsection,
    .admin-section-card,
    .admin-panel-card {
        border-radius: 16px;
        padding: 14px;
    }

    .admin-table-wrapper {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table {
        min-width: 680px;
    }

    .admin-user-management-layout,
    .admin-user-grid,
    .admin-user-grid-two,
    .admin-board-access-grid,
    .admin-status-grid,
    .settings-two-column {
        grid-template-columns: 1fr !important;
    }

    .admin-editor-header,
    .admin-list-row,
    .backup-list-row,
    .cleanup-list-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .button-secondary,
    .primary-button,
    .secondary-button,
    button[type="submit"] {
        max-width: 100%;
    }
}

@media (max-width: 520px) {
    .brand small {
        display: none;
    }

    .board-title h1 {
        font-size: 20px;
    }

    .column {
        width: calc(100vw - 28px);
    }

    .board {
        gap: 10px;
    }

    .admin-table {
        min-width: 620px;
        font-size: 0.86rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 9px 10px;
    }
}

/* v0.90.35b - Board responsive navigation and horizontal scroll fix */
@media (max-width: 1280px) {
    .topbar {
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 12px;
        overflow: visible;
    }

    .topbar-left {
        flex: 1 1 auto;
        min-width: 260px;
    }

    .topbar-actions {
        flex: 0 1 auto;
        margin-left: auto;
        justify-content: flex-end;
        flex-wrap: wrap;
        min-width: 0;
    }

    .topbar-actions .pill-link,
    .topbar-actions .avatar {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .topbar-search-filter {
        order: 3;
        flex: 1 0 100%;
        width: 100%;
        max-width: none;
        margin: 0;
    }
}

@media (max-width: 900px) {
    .topbar-actions .pill-link:not(:last-child) {
        display: inline-flex;
    }
}

@media (max-width: 760px) {
    .topbar-left,
    .topbar-actions {
        width: 100%;
        min-width: 0;
    }

    .topbar-left {
        flex-direction: column;
        align-items: stretch;
    }

    .brand {
        width: 100%;
    }

    .topbar-actions {
        order: 4;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .topbar-actions .pill-link,
    .topbar-actions .avatar {
        flex: 0 0 auto;
    }
}

.page {
    max-width: 100vw;
}

.board-wrap {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.board {
    width: max-content;
    min-width: 100%;
}

.column {
    flex: 0 0 360px;
    min-width: 280px;
}

@media (max-width: 980px) {
    .page {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .board-wrap {
        overflow-x: auto;
        overflow-y: visible;
    }

    .board {
        width: max-content;
        min-width: max-content;
    }
}

@media (max-width: 760px) {
    .column {
        flex-basis: min(86vw, 360px);
        min-width: min(86vw, 360px);
        width: min(86vw, 360px);
    }
}

@media (max-width: 520px) {
    .column {
        flex-basis: calc(100vw - 28px);
        min-width: calc(100vw - 28px);
        width: calc(100vw - 28px);
    }
}

/* v0.90.39b: Allow link-styled POST buttons for CSRF-protected actions. */
button.button-inline-link {
    border: 0;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

/* v0.90.42b recovery DB restore hardening */
.warning-message {
    border-radius: 12px;
    padding: 10px 12px;
    margin: 0 0 14px;
    background: #fff7ed;
    color: #9a3412;
}

.danger-zone {
    border-color: #fecaca;
    background: #fff7f7;
}

.button-danger {
    border: 0;
    border-radius: 12px;
    background: #b91c1c;
    color: #ffffff;
    padding: 12px 16px;
    font-weight: 800;
    cursor: pointer;
}

.button-danger:hover {
    background: #991b1b;
}


/* v0.90.43b - Recovery page vertical scroll fix */
html.recovery-document,
html.recovery-document body,
html.recovery-document body.app-page.admin-page.recovery-page {
    min-height: 100%;
    height: auto;
    overflow-y: auto !important;
    overflow-x: hidden;
}

body.app-page.admin-page.recovery-page .admin-shell {
    min-height: 100vh;
    height: auto;
    overflow: visible;
    padding-bottom: 64px;
}

body.app-page.admin-page.recovery-page .settings-card,
body.app-page.admin-page.recovery-page .admin-settings-card {
    overflow: visible;
}

body.app-page.admin-page.recovery-page select,
body.app-page.admin-page.recovery-page input[type="text"],
body.app-page.admin-page.recovery-page input[type="password"] {
    max-width: 100%;
}


/* v0.90.46b - Active green header branding */
.topbar {
    min-height: 64px;
    height: auto;
    background: linear-gradient(90deg, #16833a 0%, #22a64a 54%, #1b7d38 100%);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 26px rgba(18, 100, 51, 0.18);
}

.topbar a {
    color: #ffffff;
}

.topbar-left {
    min-width: 0;
}

.product-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
}

.product-brand:hover {
    color: #ffffff;
    text-decoration: none;
}

.product-brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.18));
}

.product-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    min-width: 0;
}

.product-brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.product-brand-copy small {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.topbar .board-switcher select,
.topbar-search input[type="search"] {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(255, 255, 255, 0.35);
    color: #172b4d;
}

.topbar .pill-link,
.topbar .filter-toggle-button {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.26);
    color: #ffffff;
}

.topbar .pill-link:hover,
.topbar .filter-toggle-button:hover {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.topbar .avatar {
    background: #ffffff;
    color: #16833a;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.topbar .filter-active-badge {
    background: #ffffff;
    color: #16833a;
}

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        gap: 10px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .product-brand-logo {
        width: 34px;
        height: 34px;
    }

    .product-brand-name {
        font-size: 17px;
    }

    .product-brand-copy small {
        font-size: 9px;
    }
}

@media (max-width: 520px) {
    .product-brand-copy {
        display: none;
    }

    .product-brand-logo {
        width: 36px;
        height: 36px;
    }
}


/* v0.90.47b - Configurable branding/header and compact board title */
.topbar {
    background: var(--app-header-bg, #1f5f3b);
}

.product-brand-logo-only {
    gap: 0;
    flex: 0 0 auto;
}

.product-brand-logo-only .product-brand-logo,
.product-brand-logo {
    width: 42px;
    height: 42px;
}

.product-brand-context {
    color: #ffffff;
    max-width: 280px;
}

.product-brand-context .product-brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-switcher-brand select {
    min-width: 220px;
    max-width: min(36vw, 360px);
    font-weight: 700;
}

.board-title {
    padding-top: 8px;
    padding-bottom: 8px;
}

.board-title h1 {
    font-size: 18px;
    line-height: 1.15;
    margin: 0;
}

.board-title p {
    margin-top: 3px;
    font-size: 12px;
}

.board-wrap {
    background: var(--app-board-bg, #f6f7f9);
}

input[type="color"] {
    width: 72px;
    height: 38px;
    padding: 2px;
    border: 1px solid #cfd7e3;
    border-radius: 8px;
    background: #ffffff;
}

@media (max-width: 760px) {
    .product-brand-context {
        max-width: 100%;
    }

    .board-switcher-brand select {
        max-width: none;
        width: 100%;
    }

    .board-title h1 {
        font-size: 16px;
    }
}


/* v0.90.49b - Active Board Body Gradient Fix
 * Apply the configured board background color to the actual board view.
 * The lower area uses the selected color and fades upward into a lighter surface.
 * This overrides older fixed board theme backgrounds and the board-wrap flat color.
 */
body[class*="board-theme-"] {
    background:
        linear-gradient(
            to top,
            var(--app-board-bg, #f6f7f9) 0%,
            color-mix(in srgb, var(--app-board-bg, #f6f7f9) 42%, #ffffff 58%) 58%,
            #ffffff 100%
        ) !important;
    background-attachment: fixed !important;
}

body[class*="board-theme-"] .page,
body[class*="board-theme-"] .board-wrap {
    background:
        linear-gradient(
            to top,
            var(--app-board-bg, #f6f7f9) 0%,
            color-mix(in srgb, var(--app-board-bg, #f6f7f9) 42%, #ffffff 58%) 58%,
            #ffffff 100%
        ) !important;
}

@supports not (color: color-mix(in srgb, #000000 50%, #ffffff 50%)) {
    body[class*="board-theme-"],
    body[class*="board-theme-"] .page,
    body[class*="board-theme-"] .board-wrap {
        background:
            linear-gradient(
                to top,
                var(--app-board-bg, #f6f7f9) 0%,
                #f7fbf8 62%,
                #ffffff 100%
            ) !important;
    }
}

body.board-theme-dark[class*="board-theme-"] {
    color: #172b4d;
}


/* v0.90.52b - Branding contrast, board background and duplicate title hardening */
:root {
    --app-header-text: #ffffff;
}

.topbar {
    color: var(--app-header-text, #ffffff) !important;
}

.topbar a,
.topbar .pill-link,
.topbar .filter-toggle-button,
.topbar .product-brand,
.topbar .product-brand:hover {
    color: var(--app-header-text, #ffffff) !important;
}

.topbar .pill-link,
.topbar .filter-toggle-button {
    background: color-mix(in srgb, var(--app-header-text, #ffffff) 16%, transparent) !important;
    border-color: color-mix(in srgb, var(--app-header-text, #ffffff) 28%, transparent) !important;
}

.topbar .pill-link:hover,
.topbar .filter-toggle-button:hover {
    background: color-mix(in srgb, var(--app-header-text, #ffffff) 24%, transparent) !important;
}

.topbar .avatar {
    background: color-mix(in srgb, var(--app-header-text, #ffffff) 92%, transparent) !important;
    color: var(--app-header-bg, #1f5f3b) !important;
    border-color: color-mix(in srgb, var(--app-header-text, #ffffff) 70%, transparent) !important;
}

.topbar .board-switcher select,
.topbar-search input[type="search"] {
    background: color-mix(in srgb, var(--app-header-text, #ffffff) 94%, transparent) !important;
    color: #10264a !important;
    border-color: color-mix(in srgb, var(--app-header-text, #ffffff) 40%, transparent) !important;
}

/* Board background must be applied to the real board page, not only admin/config wrappers. */
html:has(body.is-board-page),
body.is-board-page {
    min-height: 100%;
    background:
        linear-gradient(
            to top,
            var(--app-board-bg, #f6f7f9) 0%,
            color-mix(in srgb, var(--app-board-bg, #f6f7f9) 42%, #ffffff 58%) 58%,
            #ffffff 100%
        ) fixed !important;
}

body.is-board-page .page,
body.is-board-page .board-wrap {
    background: transparent !important;
}

/* Keep the mode tabs, but remove the duplicated board title/description from the content area. */
body.is-board-page .board-title > div:first-child {
    display: none !important;
}

body.is-board-page .board-title {
    justify-content: flex-end;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    margin-bottom: 6px !important;
}

body.is-board-page .board-title h1,
body.is-board-page .board-title p:not(.board-search-status) {
    display: none !important;
}

@supports not (color: color-mix(in srgb, #000000 50%, #ffffff 50%)) {
    .topbar .pill-link,
    .topbar .filter-toggle-button {
        background: rgba(255,255,255,0.16) !important;
    }

    html:has(body.is-board-page),
    body.is-board-page {
        background: linear-gradient(to top, var(--app-board-bg, #f6f7f9) 0%, #f7fbf8 62%, #ffffff 100%) fixed !important;
    }
}


/* v0.90.57b - Active board UI cleanup
 *
 * Fixes:
 * - Remove remaining green/old board-theme shimmer directly below the header.
 * - Keep the selected global board background only in the actual board work area.
 * - Ensure filter button and badge no longer keep old green/blue accent colors.
 * - Keep duplicate board title hidden.
 */

body.is-board-page {
    background: #ffffff !important;
}

body.is-board-page .page {
    background: #ffffff !important;
}

body.is-board-page .board-title {
    background: #ffffff !important;
    min-height: auto !important;
}

/* The board work area uses the configurable global board background color,
   but the top area remains clean/white to avoid the old green shimmer. */
body.is-board-page .board-wrap {
    background:
        linear-gradient(
            to top,
            var(--app-board-bg, #f6f7f9) 0%,
            color-mix(in srgb, var(--app-board-bg, #f6f7f9) 18%, #ffffff 82%) 48%,
            #ffffff 100%
        ) !important;
    background-attachment: local !important;
}

/* Fallback for older browsers without color-mix support. */
@supports not (color: color-mix(in srgb, #000 50%, #fff 50%)) {
    body.is-board-page .board-wrap {
        background:
            linear-gradient(
                to top,
                var(--app-board-bg, #f6f7f9) 0%,
                #fbfbfb 50%,
                #ffffff 100%
            ) !important;
    }
}

/* Neutralize legacy board theme backgrounds on the modern branded board page. */
body.is-board-page.board-theme-light,
body.is-board-page.board-theme-soft,
body.is-board-page.board-theme-cool,
body.is-board-page.board-theme-warm,
body.is-board-page.board-theme-dark,
body.is-board-page.board-theme-light .page,
body.is-board-page.board-theme-soft .page,
body.is-board-page.board-theme-cool .page,
body.is-board-page.board-theme-warm .page,
body.is-board-page.board-theme-dark .page {
    background: #ffffff !important;
}

/* Filter control: use neutral readable control colors instead of old accent colors. */
body.is-board-page .topbar .filter-toggle-button,
body.is-board-page .topbar .filter-toggle-button:hover,
body.is-board-page .topbar .filter-toggle-button[aria-expanded="true"],
body.is-board-page .topbar .filter-toggle-button.has-active-filters {
    color: var(--app-header-control-text, #111827) !important;
    background: var(--app-header-control-bg, rgba(255,255,255,0.82)) !important;
    border-color: var(--app-header-control-border, rgba(17,24,39,0.22)) !important;
    box-shadow: none !important;
}

body.is-board-page .topbar .filter-toggle-button *,
body.is-board-page .topbar .filter-toggle-button svg,
body.is-board-page .topbar .filter-toggle-button path {
    color: inherit !important;
    stroke: currentColor !important;
}

/* The active filter badge must not remain green/blue from old theme rules. */
body.is-board-page .topbar .filter-active-badge,
body.is-board-page .topbar #boardFilterActiveBadge {
    color: var(--app-header-control-text, #111827) !important;
    background: rgba(255,255,255,0.96) !important;
    border: 1px solid rgba(17,24,39,0.12) !important;
}

/* Keep duplicate board title/description removed. The board selector is now the primary board label. */
body.is-board-page .board-title > div:first-child,
body.is-board-page .board-title h1,
body.is-board-page .board-title p:not(.board-search-status) {
    display: none !important;
}

body.is-board-page .board-title {
    justify-content: flex-end !important;
    padding: 8px 14px !important;
    height: auto !important;
}

body.is-board-page .board-links {
    color: #172b4d !important;
}


/* v0.90.59b - Active header fields and admin background cleanup
 * This block is intentionally appended to app.css so it wins over the older
 * branding/theme rules from v0.90.46b-v0.90.57b.
 */

/* 1) Admin and board configuration pages must not inherit the old board/theme glow. */
html,
body.settings-page,
body.app-page.admin-page,
html.admin-document body,
html.recovery-document body {
    background: #ffffff !important;
    background-image: none !important;
}

body.settings-page::before,
body.settings-page::after,
body.app-page.admin-page::before,
body.app-page.admin-page::after,
html.admin-document body::before,
html.admin-document body::after {
    display: none !important;
    content: none !important;
    background: none !important;
    box-shadow: none !important;
}

.settings-page .settings-shell,
.settings-page .settings-card,
body.app-page.admin-page .admin-shell,
body.app-page.admin-page .settings-card,
body.app-page.admin-page .admin-settings-card {
    background-image: none !important;
}

/* 2) Board page: keep the top area clean white; only the work area gets the global background gradient. */
body.is-board-page,
body.is-board-page .page,
body.is-board-page .board-title {
    background: #ffffff !important;
    background-image: none !important;
}

body.is-board-page .board-wrap {
    background:
        linear-gradient(
            to top,
            var(--app-board-bg, #f6f7f9) 0%,
            color-mix(in srgb, var(--app-board-bg, #f6f7f9) 16%, #ffffff 84%) 48%,
            #ffffff 100%
        ) !important;
    background-attachment: local !important;
}

@supports not (color: color-mix(in srgb, #000 50%, #fff 50%)) {
    body.is-board-page .board-wrap {
        background: linear-gradient(to top, var(--app-board-bg, #f6f7f9) 0%, #fbfbfb 48%, #ffffff 100%) !important;
    }
}

/* 3) Header form fields: never derive field background from header text color. */
body.is-board-page .topbar .board-switcher select,
body.is-board-page .topbar .board-switcher-brand select,
body.is-board-page .topbar select[name="board_id"],
body.is-board-page .topbar-search input[type="search"],
body.is-board-page .topbar input#boardSearchInput,
.topbar .board-switcher select,
.topbar .board-switcher-brand select,
.topbar select[name="board_id"],
.topbar-search input[type="search"],
.topbar input#boardSearchInput {
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #10264a !important;
    -webkit-text-fill-color: #10264a !important;
    border-color: rgba(16,38,74,0.18) !important;
    caret-color: #10264a !important;
    box-shadow: none !important;
}

body.is-board-page .topbar-search input[type="search"]::placeholder,
body.is-board-page .topbar input#boardSearchInput::placeholder,
.topbar-search input[type="search"]::placeholder,
.topbar input#boardSearchInput::placeholder {
    color: rgba(16,38,74,0.58) !important;
    -webkit-text-fill-color: rgba(16,38,74,0.58) !important;
    opacity: 1 !important;
}

body.is-board-page .topbar .board-switcher select option,
body.is-board-page .topbar .board-switcher-brand select option,
body.is-board-page .topbar select[name="board_id"] option,
.topbar .board-switcher select option,
.topbar .board-switcher-brand select option,
.topbar select[name="board_id"] option {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #10264a !important;
    -webkit-text-fill-color: #10264a !important;
}

body.is-board-page .topbar .board-switcher select option:checked,
body.is-board-page .topbar .board-switcher-brand select option:checked,
body.is-board-page .topbar select[name="board_id"] option:checked,
.topbar .board-switcher select option:checked,
.topbar .board-switcher-brand select option:checked,
.topbar select[name="board_id"] option:checked {
    background: #e8f0fe !important;
    color: #10264a !important;
    -webkit-text-fill-color: #10264a !important;
}

/* 4) Filter button and badge: neutral readable control, no old green accent. */
body.is-board-page .topbar .filter-toggle-button,
body.is-board-page .topbar .filter-toggle-button:hover,
body.is-board-page .topbar .filter-toggle-button[aria-expanded="true"],
body.is-board-page .topbar .filter-toggle-button.has-active-filters,
.topbar .filter-toggle-button,
.topbar .filter-toggle-button:hover,
.topbar .filter-toggle-button[aria-expanded="true"],
.topbar .filter-toggle-button.has-active-filters {
    background: rgba(255,255,255,0.90) !important;
    background-color: rgba(255,255,255,0.90) !important;
    color: #10264a !important;
    -webkit-text-fill-color: #10264a !important;
    border-color: rgba(16,38,74,0.16) !important;
    box-shadow: none !important;
}

body.is-board-page .topbar .filter-toggle-button *,
body.is-board-page .topbar .filter-toggle-button svg,
body.is-board-page .topbar .filter-toggle-button path,
.topbar .filter-toggle-button *,
.topbar .filter-toggle-button svg,
.topbar .filter-toggle-button path {
    color: inherit !important;
    stroke: currentColor !important;
    -webkit-text-fill-color: currentColor !important;
}

body.is-board-page .topbar .filter-active-badge,
body.is-board-page .topbar #boardFilterActiveBadge,
.topbar .filter-active-badge,
.topbar #boardFilterActiveBadge {
    background: #ffffff !important;
    color: #10264a !important;
    -webkit-text-fill-color: #10264a !important;
    border: 1px solid rgba(16,38,74,0.12) !important;
}

/* 5) Keep duplicate board title removed. */
body.is-board-page .board-title > div:first-child,
body.is-board-page .board-title h1,
body.is-board-page .board-title p:not(.board-search-status) {
    display: none !important;
}


/* v0.90.63b - Board background and footer flow fix
 *
 * Reverts the too-aggressive min-height approach from v0.90.62b.
 * The page background owns the full-height gradient; board content and footer
 * remain in the normal document flow and the page can scroll naturally.
 */

html {
    min-height: 100%;
    overflow-y: auto !important;
}

body.is-board-page {
    min-height: 100vh !important;
    overflow-y: auto !important;
    background:
        linear-gradient(
            to top,
            var(--app-board-bg, #fff7df) 0%,
            color-mix(in srgb, var(--app-board-bg, #fff7df) 28%, #ffffff 72%) 58%,
            #ffffff 100%
        ) fixed !important;
}

/* Fallback for browsers without color-mix support. */
@supports not (color: color-mix(in srgb, #000 50%, #fff 50%)) {
    body.is-board-page {
        background:
            linear-gradient(
                to top,
                var(--app-board-bg, #fff7df) 0%,
                #fffdf6 62%,
                #ffffff 100%
            ) fixed !important;
    }
}

/* The app shell should not create a second, shorter background layer. */
body.is-board-page .page,
body.is-board-page main,
body.is-board-page .board-page,
body.is-board-page .board-shell,
body.is-board-page .kanban-page {
    min-height: auto !important;
    background: transparent !important;
    background-image: none !important;
}

/* Board work area stays transparent and uses natural content height. */
body.is-board-page .board-wrap,
body.is-board-page .board-container,
body.is-board-page .kanban-board-wrapper,
body.is-board-page .kanban-board-container {
    min-height: 0 !important;
    background: transparent !important;
    background-image: none !important;
    background-attachment: scroll !important;
}

/* Keep horizontal board scrolling, but do not suppress vertical page scrolling. */
body.is-board-page .board-wrap,
body.is-board-page .board-container,
body.is-board-page .kanban-board-wrapper,
body.is-board-page .kanban-board-container {
    overflow-x: auto;
    overflow-y: visible;
}

/* Footer remains in the normal document flow and visible/reachable. */
body.is-board-page .app-footer,
body.is-board-page footer {
    position: static !important;
    background: transparent !important;
    margin-top: 24px;
}

/* Make sure no previous full-height rule keeps columns stretching incorrectly. */
body.is-board-page .columns,
body.is-board-page .board-columns,
body.is-board-page .kanban-columns {
    min-height: 0 !important;
}


/* v0.90.65b - Board footer no-extra-scroll fix
 *
 * Final correction for short boards:
 * - footer is fixed to the bottom of the viewport on board pages
 * - board content gets bottom padding so content is not hidden behind footer
 * - no artificial vertical page height is added for short boards
 * - long boards still scroll naturally
 */

body.is-board-page {
    min-height: 100vh !important;
    overflow-y: auto !important;
    display: block !important;
    padding-bottom: 34px !important;
    background:
        linear-gradient(
            to top,
            var(--app-board-bg, #fff7df) 0%,
            color-mix(in srgb, var(--app-board-bg, #fff7df) 24%, #ffffff 76%) 58%,
            #ffffff 100%
        ) fixed !important;
}

@supports not (color: color-mix(in srgb, #000 50%, #fff 50%)) {
    body.is-board-page {
        background:
            linear-gradient(
                to top,
                var(--app-board-bg, #fff7df) 0%,
                #fffdf6 62%,
                #ffffff 100%
            ) fixed !important;
    }
}

/* Reset previous flex/min-height experiments from v0.90.62-v0.90.64. */
body.is-board-page .page,
body.is-board-page main,
body.is-board-page .board-page,
body.is-board-page .board-shell,
body.is-board-page .kanban-page,
body.is-board-page .board-wrap,
body.is-board-page .board-container,
body.is-board-page .kanban-board-wrapper,
body.is-board-page .kanban-board-container {
    flex: initial !important;
    min-height: 0 !important;
    height: auto !important;
    background: transparent !important;
    background-image: none !important;
}

/* Keep horizontal scrolling on the board area only. */
body.is-board-page .board-wrap,
body.is-board-page .board-container,
body.is-board-page .kanban-board-wrapper,
body.is-board-page .kanban-board-container {
    overflow-x: auto !important;
    overflow-y: visible !important;
}

/* Footer stays visible for short boards without requiring scroll. */
body.is-board-page .app-footer,
body.is-board-page footer {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 20 !important;
    height: 28px !important;
    line-height: 28px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    background: rgba(255,255,255,0.82) !important;
    border-top: 1px solid rgba(15,23,42,0.10) !important;
    backdrop-filter: blur(8px);
}

/* Do not create artificial column height. */
body.is-board-page .columns,
body.is-board-page .board-columns,
body.is-board-page .kanban-columns {
    min-height: 0 !important;
}


/* v0.95.0b - Card detail section cleanup */
.attachments-section.card-meta-section,
.comments-activity-section.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);
}

.attachments-section.card-meta-section {
    border-top: 1.5px solid rgba(148, 163, 184, 0.26);
}

.comments-activity-section.card-meta-section {
    border-top: 1.5px solid rgba(148, 163, 184, 0.26);
}

.attachments-section .section-heading-row,
.comments-activity-section .section-heading-row {
    margin-bottom: 10px;
}

.attachments-section .attachment-list {
    margin-top: 12px;
}

.attachments-section .attachment-item {
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: #fff;
}

.markdown-toolbar [data-md-action="image-token"],
.markdown-toolbar [data-md-action="image-token-50"],
.markdown-toolbar [data-md-action="image-token-400"] {
    min-width: auto;
    padding-left: 8px;
    padding-right: 8px;
    font-size: 0.78rem;
    font-weight: 700;
}

.inline-image-token-hint code {
    white-space: nowrap;
}
