* {
    box-sizing: border-box;
}

.social-hero {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.social-hero h1 {
    font-size: clamp(30px, 5vw, 48px);
    margin: 4px 0;
}

.social-hero p:last-child {
    color: var(--muted);
    margin: 0;
}

.social-filters {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(150px, 1fr)) auto auto auto;
    margin: 0 auto 24px;
    max-width: 920px;
    padding: 16px;
}

.social-favorite-filter {
    align-items: center;
    display: flex;
    gap: 8px;
    min-height: 42px;
}

.social-feed {
    display: grid;
    gap: 22px;
    margin: 0 auto;
    max-width: 760px;
}

.social-post,
.article-page,
.article-discussion {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.social-post-header {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px 18px;
}

.social-author {
    align-items: center;
    display: flex;
    gap: 10px;
}

.social-author strong,
.social-author span {
    display: block;
}

.social-author span {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.social-cover {
    background: #dbe4ee;
    display: block;
    max-height: 520px;
    overflow: hidden;
}

.social-cover img {
    display: block;
    max-height: 520px;
    object-fit: cover;
    width: 100%;
}

.social-post-body {
    padding: 20px;
}

.social-post-body h2 {
    font-size: 24px;
    line-height: 1.25;
    margin: 7px 0 10px;
}

.social-post-body h2 a {
    color: inherit;
    text-decoration: none;
}

.card-discussion-link {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-align: left;
}

.card-discussion-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.card-image-discussion {
    border: 0;
    cursor: pointer;
    padding: 0;
    width: 100%;
}

.social-post-body p {
    color: #334155;
    line-height: 1.7;
    white-space: pre-line;
}

.social-origin {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.social-actions {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding: 12px 18px;
}

.social-actions form {
    margin-right: auto;
}

.social-empty {
    min-height: 240px;
}

.article-page,
.article-discussion {
    margin: 0 auto 24px;
    max-width: 900px;
}

.article-back {
    color: var(--primary);
    display: inline-block;
    font-weight: 700;
    margin: 20px 24px 0;
    text-decoration: none;
}

.article-header {
    padding: 26px clamp(22px, 6vw, 70px);
}

.article-header h1 {
    font-size: clamp(32px, 6vw, 58px);
    line-height: 1.08;
    margin: 14px 0;
}

.article-meta {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.article-cover {
    display: block;
    max-height: 620px;
    object-fit: cover;
    width: 100%;
}

.article-content {
    color: #243244;
    font-size: 18px;
    line-height: 1.8;
    padding: 34px clamp(22px, 7vw, 90px) 50px;
}

.article-content img {
    border-radius: 12px;
    height: auto;
    max-width: 100%;
}

.article-content h2,
.article-content h3 {
    color: var(--text);
    line-height: 1.25;
    margin-top: 1.8em;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    color: #475569;
    margin-left: 0;
    padding-left: 20px;
}

.article-discussion {
    padding: 24px;
}

.article-discussion h2 {
    margin-top: 0;
}

.article-actions {
    padding-inline: clamp(22px, 7vw, 90px);
}

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

@media (max-width: 560px) {
    .social-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .social-filters {
        grid-template-columns: 1fr;
    }

    .social-post-header {
        align-items: flex-start;
    }

    .social-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .social-actions form,
    .social-actions .button,
    .social-actions button {
        margin: 0;
        text-align: center;
        width: 100%;
    }
}

.kanban-pagination {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0 80px;
}

.kanban-pagination [aria-disabled="true"] {
    opacity: .5;
}

:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 3px;
}

:root {
    --bg: #eef2f6;
    --surface: #ffffff;
    --surface-muted: #f7f9fc;
    --line: #d7e0ea;
    --text: #18232f;
    --muted: #5b6b7c;
    --nav: #111827;
    --primary: #0f766e;
    --primary-strong: #115e59;
    --accent: #d97706;
    --danger: #b42318;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 14px 34px rgba(15, 23, 42, 0.12);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    min-height: 100vh;
}

body:has(.kanban) {
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 34rem),
        radial-gradient(circle at 92% 8%, rgba(217, 119, 6, 0.1), transparent 28rem),
        linear-gradient(180deg, #f8fafc 0, var(--bg) 18rem);
}

a {
    color: #1f4e79;
}

svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 18px;
}

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

.app-header {
    align-items: center;
    background: rgba(17, 24, 39, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    min-height: 64px;
    padding: 12px 28px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.app-header a,
.app-header button {
    color: #fff;
}

.brand {
    align-items: center;
    color: #fff;
    display: inline-flex;
    font-size: 18px;
    font-weight: 700;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: #0f766e;
    border-radius: 7px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    height: 32px;
    justify-content: center;
    letter-spacing: 0;
    width: 32px;
}

.nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav a,
.nav button {
    border-radius: 6px;
    font-size: 14px;
    padding: 8px 10px;
    text-decoration: none;
}

.nav a:hover,
.nav button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-link {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    padding: 8px 10px;
    position: relative;
}

.notification-link span {
    align-items: center;
    background: var(--accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 6px;
}

.user-chip {
    align-items: center;
    color: #fff;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    gap: 8px;
    min-height: 36px;
    padding: 2px 6px;
}

.avatar {
    background: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #0f172a;
    display: inline-flex;
    flex: 0 0 auto;
    height: 32px;
    object-fit: cover;
    width: 32px;
}

.avatar-fallback {
    align-items: center;
    font-size: 13px;
    font-weight: 800;
    justify-content: center;
    text-transform: uppercase;
}

.avatar-sm {
    height: 24px;
    width: 24px;
}

.container {
    margin: 0 auto;
    max-width: 1500px;
    padding: 30px 28px;
}

.panel {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 18px;
    padding: 16px;
}

.notifications-dialog {
    border: 0;
    border-radius: 14px;
    max-width: 760px;
    padding: 0;
    width: min(760px, calc(100vw - 32px));
}

.notifications-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.notifications-dialog-body {
    display: grid;
    gap: 12px;
    max-height: min(680px, calc(100vh - 150px));
    overflow: auto;
    padding: 16px;
}

.notification-read-all {
    display: flex;
    justify-content: flex-end;
}

.panel-heading {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.panel-heading h2 {
    font-size: 18px;
    margin: 0;
}

.panel-heading p {
    margin: 3px 0 0;
}

.notification-list,
.subscription-list {
    display: grid;
    gap: 8px;
}

.notification-item {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px;
}

.notification-item p {
    color: var(--muted);
    font-size: 13px;
    margin: 3px 0 0;
}

.notification-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.subscription-list {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.subscription-disclosure {
    border-bottom: 1px solid var(--line);
    margin: -2px 0 12px;
    padding-bottom: 10px;
}

.subscription-disclosure summary {
    align-items: center;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    gap: 10px;
    list-style: none;
    min-height: 32px;
}

.subscription-disclosure summary::-webkit-details-marker {
    display: none;
}

.subscription-disclosure summary::before {
    border-bottom: 5px solid transparent;
    border-left: 6px solid var(--muted);
    border-top: 5px solid transparent;
    content: "";
    display: inline-block;
    transition: transform 0.16s ease;
}

.subscription-disclosure[open] summary::before {
    transform: rotate(90deg);
}

.subscription-disclosure summary small {
    background: #eef2f7;
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    padding: 3px 7px;
}

.subscription-disclosure .subscription-list {
    margin-top: 10px;
}

.subscription-list form {
    margin: 0;
}

.subscription-toggle {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--line);
    color: var(--text);
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-height: 42px;
    padding: 7px 9px;
    width: 100%;
}

.subscription-toggle.is-active {
    background: #ecfdf5;
    border-color: #99f6e4;
}

.toolbar-panel {
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 76px;
    z-index: 20;
}

.workspace-header {
    align-items: end;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 22px;
    padding: 8px 0;
}

.workspace-header h1 {
    font-size: 38px;
    line-height: 1.08;
    margin: 0;
}

.eyebrow {
    color: var(--primary-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.workspace-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(100px, 1fr));
}

.stat-tile {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    min-width: 112px;
    padding: 12px 14px;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.stat-tile:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-tile span {
    display: block;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.stat-tile small {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-top: 5px;
}

.login-shell {
    align-items: center;
    background:
        radial-gradient(circle at 15% 15%, rgba(15, 118, 110, 0.16), transparent 32rem),
        radial-gradient(circle at 85% 20%, rgba(217, 119, 6, 0.12), transparent 26rem),
        var(--bg);
    display: flex;
    min-height: 100vh;
    justify-content: center;
    padding: 24px;
}

.login-panel {
    max-width: 420px;
    width: 100%;
}

.login-brand {
    align-items: center;
    display: inline-flex;
    font-size: 15px;
    font-weight: 800;
    gap: 10px;
    margin-bottom: 14px;
}

.form-grid {
    display: grid;
    gap: 12px;
}

.filters {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(240px, 1.5fr) repeat(5, minmax(150px, 1fr)) auto;
}

.filter-search {
    min-width: 240px;
}

.filter-actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.filter-menu {
    display: grid;
    gap: 6px;
}

.filter-menu details {
    position: relative;
}

.filter-menu summary {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: space-between;
    list-style: none;
    min-height: 40px;
    padding: 9px 11px;
}

.filter-menu summary::-webkit-details-marker {
    display: none;
}

.filter-menu summary::after {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--muted);
    content: "";
    margin-left: 8px;
}

.filter-menu summary small {
    background: var(--primary);
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
}

.filter-menu-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    display: grid;
    gap: 2px;
    left: 0;
    max-height: 280px;
    min-width: 220px;
    overflow: auto;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 45;
}

.check-option {
    align-items: center;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    font-weight: 600;
    gap: 8px;
    grid-template-columns: auto 1fr;
    min-height: 32px;
    padding: 6px 8px;
}

.check-option:hover {
    background: #f1f5f9;
}

.check-option input {
    min-height: auto;
    width: auto;
}

label {
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font: inherit;
    min-height: 40px;
    padding: 9px 11px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #1f4e79;
    box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.15);
    outline: 0;
}

textarea {
    min-height: 72px;
    resize: vertical;
}

button,
.button {
    align-items: center;
    background: var(--primary);
    border: 0;
    border-radius: 7px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    padding: 9px 12px;
    text-decoration: none;
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button:hover,
.button:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.button.secondary,
button.secondary {
    background: #475569;
}

.button.danger,
button.danger {
    background: var(--danger);
}

.button.ghost,
button.ghost {
    background: transparent;
    color: #1f4e79;
    padding-left: 0;
    padding-right: 0;
}

.button.ghost-light,
button.ghost-light {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.status {
    background: #e6fffa;
    border: 1px solid #8eeddd;
    border-radius: 4px;
    margin-bottom: 14px;
    padding: 10px 12px;
}

.errors {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 4px;
    color: #742a2a;
    margin-bottom: 14px;
    padding: 10px 12px;
}

.kanban {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    overflow-x: auto;
    padding-bottom: 18px;
}

.kanban-column {
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 12px;
    min-height: 460px;
    padding: 14px;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.kanban-column.status-non_traite {
    border-top: 4px solid #64748b;
}

.kanban-column.status-a_lire {
    border-top: 4px solid var(--accent);
}

.kanban-column.status-lu {
    border-top: 4px solid var(--primary);
}

.kanban-column.is-over {
    background: #fff7ed;
    border-color: var(--accent);
    box-shadow: inset 0 0 0 2px rgba(214, 158, 46, 0.18);
}

.kanban-column h2 {
    font-size: 17px;
    margin: 0 0 14px;
}

.kanban-column-title {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.kanban-column-title small {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.count-badge {
    align-items: center;
    background: #0f172a;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    justify-content: center;
    min-width: 28px;
    padding: 4px 8px;
}

.kanban-dropzone {
    min-height: 370px;
}

.card {
    background: var(--surface);
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
    padding: 14px;
    transition: box-shadow 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.kanban-card {
    cursor: grab;
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kanban-card.is-dragging {
    cursor: grabbing;
    opacity: 0.68;
    transform: rotate(1deg);
}

.card h3 {
    font-size: 16px;
    line-height: 1.35;
    margin: 10px 0;
}

.card-image-link {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: block;
    margin: 8px 0 10px;
    overflow: hidden;
}

.card-image-link img {
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
    width: 100%;
}

.card-topline {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.source-pill {
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    flex: 1;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
    justify-content: space-between;
    min-width: 0;
    padding: 4px 8px;
}

.source-pill span {
    color: #64748b;
    font-weight: 600;
}

.drag-handle {
    align-items: center;
    background: #eef2f7;
    border: 1px solid #d8e1eb;
    border-radius: 7px;
    color: #64748b;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 700;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.favorite-mark {
    color: #b7791f;
    font-size: 16px;
}

.card-tags {
    margin-bottom: 6px;
}

.card-summary {
    color: #394b59;
    font-size: 13px;
    line-height: 1.45;
    margin: 8px 0;
}

.meta,
.muted {
    color: #52606d;
    font-size: 13px;
}

.badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    margin: 3px 4px 3px 0;
    padding: 4px 9px;
}

.badge.neutral {
    background: #edf2f7;
    color: #2d3748;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.card-actions form {
    margin: 0;
}

.card-actions .button,
.card-actions button,
.card-actions select {
    min-height: 34px;
}

.compact-action {
    font-size: 12px;
    padding: 7px 9px;
}

.icon-action {
    border-radius: 9px;
    height: 36px;
    padding: 0;
    width: 36px;
}

.icon-action.is-favorite {
    background: #f59e0b;
    color: #fff;
}

.discussion-trigger {
    align-items: center;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #134e4a;
    gap: 6px;
    justify-content: flex-start;
    margin-top: 2px;
    width: 100%;
}

.kanban-toast {
    background: #16324f;
    border-radius: 6px;
    bottom: 88px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
    color: #fff;
    font-weight: 700;
    padding: 12px 16px;
    position: fixed;
    right: 24px;
    z-index: 40;
}

.kanban-toast[data-type="error"] {
    background: #9b2c2c;
}

.floating-archive-button {
    align-items: center;
    background: var(--danger);
    border-radius: 999px;
    bottom: 24px;
    box-shadow: 0 18px 38px rgba(180, 35, 24, 0.24);
    color: #fff;
    height: 52px;
    justify-content: center;
    padding: 0;
    position: fixed;
    right: 24px;
    width: 52px;
    z-index: 35;
}

.floating-archive-button svg {
    height: 22px;
    width: 22px;
}

.discussion-trigger span {
    background: #fff;
    border-radius: 999px;
    color: #52606d;
    font-size: 12px;
    padding: 2px 6px;
}

.discussion-trigger.has-new {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.discussion-trigger.has-new span {
    color: #8a4b08;
}

.discussion-dialog {
    border: 0;
    border-radius: 14px;
    max-height: min(860px, calc(100vh - 32px));
    max-width: 1120px;
    padding: 0;
    width: min(1120px, calc(100vw - 32px));
}

.archive-dialog {
    border: 0;
    border-radius: 14px;
    max-width: 760px;
    padding: 0;
    width: min(760px, calc(100vw - 32px));
}

.archive-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.archive-dialog-body {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.archive-dialog-body > p {
    margin: 0;
}

.archive-form {
    align-items: end;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(160px, 1fr)) auto;
    padding: 14px;
}

.archive-form button {
    gap: 8px;
    min-height: 40px;
}

.restore-form {
    background: #f8fafc;
}

.discussion-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.empty-state {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.58);
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: var(--muted);
    display: grid;
    gap: 4px;
    padding: 18px;
}

.empty-state strong {
    color: var(--text);
}

.discussion-header {
    align-items: flex-start;
    border-bottom: 1px solid #d9e2ec;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 18px 20px;
}

.discussion-header p {
    margin: 4px 0 0;
}

.dialog-close {
    color: #1f4e79;
}

.discussion-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 0;
}

.discussion-tabs {
    border-bottom: 1px solid #d9e2ec;
    display: flex;
    gap: 6px;
    padding: 12px 16px 0;
}

.discussion-tab {
    background: transparent;
    border-bottom: 3px solid transparent;
    border-radius: 8px 8px 0 0;
    color: var(--muted);
    padding: 9px 12px;
}

.discussion-tab.is-active {
    background: #fff;
    border-bottom-color: var(--primary);
    color: var(--text);
}

.summary-pill {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
}

.summary-pill.mine {
    background: #e6fffa;
    color: #234e52;
}

.summary-pill.others {
    background: #ebf4ff;
    color: #2a4365;
}

.summary-pill.new {
    background: #feebc8;
    color: #7b341e;
}

.discussion-content {
    padding: 16px;
}

.discussion-pane {
    background: var(--surface-muted);
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    min-height: 420px;
    padding: 14px;
}

.discussion-pane h4 {
    font-size: 15px;
    margin: 0;
}

.discussion-pane > .muted {
    margin: 4px 0 12px;
}

.discussion-list {
    display: grid;
    gap: 10px;
    max-height: 500px;
    overflow: auto;
    padding: 0;
}

.message {
    border: 1px solid #d9e2ec;
    border-left: 4px solid #718096;
    background: #fff;
    border-radius: 9px;
    padding: 10px;
}

.message.mine {
    border-left-color: #2c7a7b;
}

.message.others {
    border-left-color: #2b6cb0;
}

.message p {
    margin: 8px 0 0;
}

.message-meta {
    align-items: center;
    color: #52606d;
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 8px;
}

.message-author {
    align-items: center;
    color: var(--text);
    display: inline-flex;
    gap: 6px;
}

.mention-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.mention-list span {
    background: #e0f2fe;
    border-radius: 999px;
    color: #075985;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 7px;
}

.history-list {
    display: grid;
    gap: 0;
    max-height: 500px;
    overflow: auto;
    padding-left: 6px;
}

.history-item {
    display: grid;
    gap: 10px;
    grid-template-columns: 14px 1fr;
    padding: 0 0 18px;
    position: relative;
}

.history-item:not(:last-child)::before {
    background: #cbd5e1;
    bottom: 0;
    content: "";
    left: 5px;
    position: absolute;
    top: 14px;
    width: 2px;
}

.history-dot {
    background: var(--primary);
    border: 3px solid #ccfbf1;
    border-radius: 999px;
    height: 12px;
    margin-top: 3px;
    width: 12px;
}

.history-item strong {
    display: block;
    font-size: 14px;
}

.history-item span:not(.history-dot) {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-top: 2px;
}

.discussion-form {
    border-top: 1px solid #d9e2ec;
    display: grid;
    gap: 10px;
    padding: 16px;
}

.discussion-form .inline-form select {
    max-width: 260px;
}

.form-context {
    background: #eef2f7;
    border: 1px solid #d8e1eb;
    border-radius: 999px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 10px;
}

.table {
    border-collapse: collapse;
    width: 100%;
}

.table th,
.table td {
    border-bottom: 1px solid #d9e2ec;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.table th {
    background: #f0f4f8;
}

.inline-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 900px) {
    .app-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .kanban {
        grid-template-columns: minmax(260px, 1fr);
    }

    .workspace-header {
        align-items: stretch;
        flex-direction: column;
    }

    .workspace-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .toolbar-panel {
        position: static;
    }

}

@media (max-width: 560px) {
    .container {
        padding: 16px;
    }

    .workspace-header h1 {
        font-size: 28px;
    }

    .workspace-stats {
        grid-template-columns: 1fr;
    }

    .card-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .inline-form {
        align-items: stretch;
        flex-direction: column;
    }

    .archive-form {
        grid-template-columns: 1fr;
    }

    .floating-archive-button {
        bottom: 16px;
        right: 16px;
    }
}
