/* Portail client — design sobre inspiré de Linear : densité maîtrisée,
   bordures fines plutôt qu'ombres, une seule couleur d'accent. */

:root {
    --bg: #f9f9fb;
    --surface: #ffffff;
    --surface-2: #f4f4f6;
    --border: #e4e4e9;
    --border-strong: #d4d4dc;
    --text: #1c1d22;
    --muted: #6f7079;
    --accent: #5e6ad2;
    --accent-hover: #4f5ac0;
    --accent-soft: #eef0fb;
    --success-bg: #e5f6ed;
    --success-text: #15803d;
    --error-bg: #fdecec;
    --error-text: #b91c1c;
    --info-bg: #dbeafe;
    --info-text: #1d4ed8;
    --radius: 8px;
    --radius-s: 6px;
    --shadow-pop: 0 4px 24px rgba(28, 29, 34, 0.10);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[x-cloak] { display: none !important; }

/* Icônes Boxicons : alignement optique avec le texte */
.bx { font-size: 1.1em; vertical-align: -0.16em; }
.btn .bx { font-size: 1.15em; }
.drawer-close .bx, .flash-close .bx, .pill-remove .bx { font-size: 1.25em; vertical-align: -0.2em; }

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 0.5rem; }
h2 { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.005em; margin: 0 0 0.75rem; }

.muted { color: var(--muted); font-size: 0.83rem; }

code {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.05rem 0.35rem;
    font-size: 0.82em;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

/* --- Barre supérieure --- */

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand { font-weight: 600; font-size: 0.9rem; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; color: var(--accent); }

.topbar-right { display: flex; align-items: center; gap: 0.75rem; }
.client-name { font-size: 0.83rem; color: var(--muted); }
.client-name small { color: var(--muted); }

/* --- Cartes & boutons --- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid transparent;
    border-radius: var(--radius-s);
    padding: 0.4rem 0.8rem;
    font: inherit;
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    background: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost { color: var(--muted); border-color: var(--border); background: var(--surface); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }
.btn-danger { color: var(--error-text); border-color: var(--border); background: var(--surface); }
.btn-danger:hover { background: var(--error-bg); border-color: var(--error-bg); }
.btn-block { width: 100%; justify-content: center; }

/* --- Flash --- */

.flash {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-radius: var(--radius-s);
    border: 1px solid transparent;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.flash-success { background: var(--success-bg); color: var(--success-text); }
.flash-error { background: var(--error-bg); color: var(--error-text); }

.flash-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: inherit;
    line-height: 1;
    opacity: 0.6;
}
.flash-close:hover { opacity: 1; }

/* --- Formulaires --- */

label { display: block; font-weight: 500; font-size: 0.83rem; margin: 0.9rem 0 0.3rem; }

input[type="email"],
input[type="password"],
input[type="search"],
input[type="text"],
input[type="url"],
input[type="number"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    padding: 0.45rem 0.65rem;
    font: inherit;
    font-size: 0.88rem;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.12s, box-shadow 0.12s;
}

select { width: auto; }
input[type="number"] { width: auto; }

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

::placeholder { color: #a3a3ad; }

/* --- Connexion --- */

.login-wrap {
    min-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card { width: 100%; max-width: 360px; padding: 2rem; }
.login-card h1 { text-align: center; font-size: 1.1rem; }
.login-card .muted { text-align: center; margin-bottom: 1rem; }
.login-card .btn { margin-top: 1.4rem; }

/* --- Liste des projets --- */

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}

.project-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: inherit;
    transition: border-color 0.12s;
}

.project-card:hover { text-decoration: none; border-color: var(--accent); }
.project-card h2 { margin: 0 0 0.1rem; }
.project-card-body { min-width: 0; }

/* --- Logos projet --- */

.project-logo {
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.project-logo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
}

.board-title { display: flex; align-items: center; gap: 0.6rem; }

.logo-cell { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.logo-cell form { display: flex; align-items: center; gap: 0.3rem; }
.logo-input { max-width: 180px; font-size: 0.78rem; border: none; background: transparent; padding: 0; }

/* --- Barre d'outils projet --- */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.toolbar h1 { margin: 0; }

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap; /* les éléments passent à la ligne au lieu de se chevaucher */
}

.toolbar-actions > * { flex-shrink: 0; }
.toolbar-actions .btn { white-space: nowrap; }
.search { width: 200px; min-width: 150px; }
.sync-info { margin-top: 0.35rem; }

/* --- Barre d'outils des demandes (recherche + filtres + vue) --- */

.issues-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0.6rem;
    margin-top: 1rem;
}

.toolbar-search-icon { color: var(--muted); }

.issues-toolbar .search {
    flex: 1 1 200px;
    min-width: 140px;
    border: none;
    background: transparent;
    padding-left: 0.2rem;
}

.issues-toolbar .search:focus { box-shadow: none; }
.issues-toolbar select { font-size: 0.83rem; }
.issues-toolbar-spacer { margin-left: auto; }

.dropdown { position: relative; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    box-shadow: var(--shadow-pop);
    padding: 0.45rem;
    min-width: 220px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 25;
}

.dropdown-menu label {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    margin: 0;
    padding: 0.3rem 0.4rem;
    font-weight: 400;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
}

.dropdown-menu label:hover { background: var(--surface-2); }
.dropdown-menu input[type="checkbox"] { width: auto; }

.dropdown-clear {
    display: block;
    padding: 0.3rem 0.4rem;
    font-size: 0.8rem;
}

.toggle-old { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; margin: 0; font-weight: 400; }
.toggle-old input { width: auto; }

.due-overdue { color: var(--error-text); font-weight: 600; }

/* --- Liste groupée par statut --- */

.list-group td {
    background: var(--surface-2);
    padding: 0.4rem 0.9rem;
}

.list-group-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    font-size: 0.79rem;
}

.list-group-title::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--column-color, var(--border-strong));
}

.list-group .count { color: var(--muted); font-weight: 500; margin-left: 0.5rem; }

.segmented {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    overflow: hidden;
    background: var(--surface);
}

.segmented button {
    border: none;
    background: none;
    padding: 0.4rem 0.8rem;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--muted);
}

.segmented button.active { background: var(--accent-soft); color: var(--accent); }

/* --- Kanban --- */

.board {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    align-items: flex-start;
    padding: 1.1rem 0;
}

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

.column-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    font-size: 0.83rem;
    padding: 0.3rem 0.25rem 0.55rem;
}

.column-header::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--column-color, var(--border-strong));
    flex-shrink: 0;
}

.column-header .count {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    margin-left: auto;
}

.column-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 2.5rem; /* zone de dépôt même pour une colonne vide */
    border-radius: var(--radius-s);
    transition: background 0.12s, outline-color 0.12s;
}

/* Cible de dépôt pendant un glisser-déposer */
.board-column.drop-over .column-cards {
    background: var(--accent-soft);
    outline: 2px dashed var(--accent);
    outline-offset: 2px;
}

.list-group.drop-over td { background: var(--accent-soft); }

[draggable="true"] { cursor: grab; }
[draggable="true"]:active { cursor: grabbing; }

.drag-handle {
    display: inline-block;
    color: var(--muted);
    margin-right: 0.15rem;
    vertical-align: -0.1em;
}

.drag-handle:hover { color: var(--text); }

.issue-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    color: inherit;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
    transition: border-color 0.12s, box-shadow 0.12s;
}

.issue-card:hover {
    text-decoration: none;
    border-color: var(--border-strong);
    box-shadow: 0 1px 4px rgba(28, 29, 34, 0.06);
}

.issue-ref {
    color: var(--muted);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.issue-title { font-weight: 500; font-size: 0.86rem; line-height: 1.4; }

.issue-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
    font-size: 0.74rem;
    color: var(--muted);
    margin-top: 0.1rem;
}

.chip {
    display: inline-block;
    border-radius: 4px;
    padding: 0.05rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
}

/* --- Vue liste --- */

.table-wrap { padding: 0; overflow-x: auto; margin-top: 1.1rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }

th, td {
    text-align: left;
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.05em;
    font-weight: 600;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

/* --- Détail issue (page et panneau) --- */

.back-link { color: var(--muted); font-size: 0.83rem; }
.back-link:hover { color: var(--text); }

.issue-detail header { margin-bottom: 1rem; }
.issue-detail h1 { font-size: 1.1rem; line-height: 1.45; }
.issue-detail h1 .issue-ref { font-size: 0.9rem; margin-right: 0.25rem; }

.issue-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0; }

.state {
    border-radius: 4px;
    padding: 0.08rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
}

.state-opened { background: var(--info-bg); color: var(--info-text); }
.state-closed { background: var(--success-bg); color: var(--success-text); }

/* --- Markdown --- */

.markdown { overflow-wrap: break-word; font-size: 0.89rem; }
.markdown p { margin: 0.45rem 0; }
.markdown h3, .markdown h4, .markdown h5 { margin: 1rem 0 0.35rem; }
.markdown ul, .markdown ol { margin: 0.45rem 0; padding-left: 1.3rem; }
.markdown blockquote {
    margin: 0.5rem 0;
    padding: 0.2rem 0.85rem;
    border-left: 3px solid var(--border-strong);
    color: var(--muted);
}
.markdown code { font-size: 0.83em; }
.markdown pre {
    background: #1c1d22;
    color: #e6e6ea;
    border-radius: var(--radius-s);
    padding: 0.85rem;
    overflow-x: auto;
}
.markdown pre code { background: none; border: none; padding: 0; }

/* --- Commentaires --- */

.comments { margin-top: 1.4rem; }
.comments h2 { margin-bottom: 0.7rem; }

.comment { margin-bottom: 0.6rem; }
.comment-client { border-left: 2px solid var(--accent); }

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
    font-size: 0.85rem;
}

.badge {
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.08rem 0.4rem;
}

.badge-off { background: var(--error-bg); color: var(--error-text); }

.comment-form { margin-top: 0.9rem; }
.comment-form textarea { resize: vertical; }

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

/* --- Panneau latéral (détail d'issue) --- */

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 29, 34, 0.32);
    z-index: 40;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(620px, 100vw);
    background: var(--bg);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-pop);
    z-index: 41;
    display: flex;
    flex-direction: column;
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.drawer-head a { font-size: 0.8rem; }

.drawer-close {
    border: none;
    background: none;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.drawer-close:hover { color: var(--text); background: var(--surface-2); }

.drawer-body { overflow-y: auto; padding: 1.1rem 1.25rem 2rem; }
.drawer-loading { padding: 2.5rem; text-align: center; color: var(--muted); }

.drawer-enter { transition: transform 0.18s ease-out; }
.drawer-enter-start { transform: translateX(100%); }

/* --- Formulaire nouvelle demande --- */

.new-issue-card { max-width: 640px; }

/* --- Zone de dépôt de fichiers --- */

.dropzone { margin-top: 0.3rem; }
.dropzone__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.dropzone__area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
    padding: 1.1rem;
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
}

.dropzone__area:hover,
.dropzone__area:focus-visible { border-color: var(--accent); outline: none; }
.dropzone__area.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone__area .bx { font-size: 1.5rem; color: var(--muted); }
.dropzone__area small { font-size: 0.78rem; }

.dropzone__error { color: var(--error-text); font-size: 0.82rem; margin: 0.4rem 0 0; }
.dropzone__error:empty { display: none; }

/* Variante compacte (formulaire de commentaire) : zone sur une ligne */
.dropzone--compact { margin-top: 0.6rem; }
.dropzone--compact .dropzone__area {
    flex-direction: row;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.85rem;
}
.dropzone--compact .dropzone__area .bx { font-size: 1.1rem; }

.dropzone__list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.6rem; }

.dropzone__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    padding: 0.35rem 0.5rem;
}

.dropzone__thumb {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    color: var(--muted);
}

.dropzone__thumb img { width: 100%; height: 100%; object-fit: cover; }
.dropzone__thumb .bx { font-size: 1.2rem; }

.dropzone__meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dropzone__name { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dropzone__remove {
    border: none;
    background: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.2rem 0.35rem;
    border-radius: 4px;
}

.dropzone__remove:hover { color: var(--error-text); background: var(--error-bg); }

/* --- Pièces jointes rendues dans une demande --- */

.attachment-img {
    max-width: 100%;
    max-height: 360px;
    border-radius: var(--radius-s);
    border: 1px solid var(--border);
    margin: 0.3rem 0;
}

.attachment-file {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    padding: 0.3rem 0.6rem;
    margin: 0.2rem 0.3rem 0.2rem 0;
    font-size: 0.85rem;
    color: var(--text);
}

.attachment-file:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Compteur de pièces jointes sur les cartes (comme le compteur de commentaires) */
.attachments-count { display: inline-flex; align-items: center; gap: 0.15rem; }

/* Badge masqué quand le compteur vaut zéro (prime sur le display des classes) */
.issue-meta [hidden] { display: none; }

/* --- Overlay d'envoi + bouton en chargement (anti double-soumission) --- */

.submit-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(28, 29, 34, 0.4);
}

.submit-overlay.is-visible { display: flex; }

.submit-overlay__box {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 0.9rem 1.3rem;
    box-shadow: var(--shadow-pop);
    font-weight: 500;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-strong);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn.is-loading { position: relative; color: transparent !important; }

.btn.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row > div { flex: 1 1 160px; }
.field-row select { width: 100%; }

/* --- Aide / état vide --- */

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 2.5rem 1rem;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    margin-top: 1rem;
}

.board-hint { margin: 1rem 0 0; }

/* --- Administration --- */

.topbar-admin { border-bottom: 2px solid var(--accent); }

.admin-links { display: flex; gap: 0.9rem; }
.admin-links a { color: var(--muted); font-size: 0.83rem; font-weight: 500; }
.admin-links a:hover { color: var(--accent); text-decoration: none; }

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.9rem;
    margin: 1rem 0;
}

.checklist { list-style: none; padding: 0; margin: 0 0 1rem; font-size: 0.86rem; }
.checklist li { padding: 0.22rem 0; }
.check-ok { color: var(--success-text); }
.check-bad { color: var(--error-text); font-weight: 600; }

.stats { list-style: none; padding: 0; margin: 0 0 1rem; font-size: 0.86rem; }
.stats li { padding: 0.18rem 0; }

.setup-steps { margin-top: 1rem; }
.setup-steps ol { padding-left: 1.4rem; }
.setup-steps li { margin: 0.55rem 0; }
.setup-steps pre, .setup-hint pre {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    padding: 0.55rem 0.75rem;
    overflow-x: auto;
    font-size: 0.8rem;
}
.setup-steps pre code, .setup-hint pre code { background: none; border: none; padding: 0; }

.setup-card { max-width: 440px; }
.setup-hint { margin: 1rem 0; font-size: 0.85rem; }

.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: flex-end;
}

.form-inline > div { flex: 1 1 190px; }
.form-inline label { margin-top: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.actions form { display: flex; align-items: center; gap: 0.3rem; }

.board-config .order-input { width: 4.2rem; }
.form-actions { display: flex; gap: 0.6rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }

.client-row { margin-bottom: 0.7rem; }
.client-disabled { opacity: 0.55; }

.client-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.client-actions { display: flex; gap: 0.35rem; align-items: flex-start; flex-wrap: wrap; }

.client-projects {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--border);
}

.project-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.12rem 0.35rem 0.12rem 0.7rem;
    font-size: 0.8rem;
}

.project-pill em { color: var(--muted); font-size: 0.74rem; }
.project-pill form { display: inline; }

.pill-remove {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1;
    padding: 0.05rem 0.25rem;
    border-radius: 3px;
}

.pill-remove:hover { color: var(--error-text); }

.assign-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* --- Responsive --- */

@media (max-width: 640px) {
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-actions { flex-wrap: wrap; }
    .search { flex: 1; width: auto; }
    .board-column { flex-basis: 255px; }
    .drawer { width: 100vw; }
}
