/* =====================================================================
   Espace client MD Webdesigner — styles de base
   ===================================================================== */

:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --text: #1f2430;
    --muted: #5b6170;
    --border: #e3e5ea;
    --primary: #2b3a8f;
    --primary-hover: #223076;
    --primary-soft: #eef0fa;
    --success: #13795b;
    --success-soft: #e6f4ee;
    --danger: #b42318;
    --danger-soft: #fdecea;
    --warning: #9a6700;
    --warning-soft: #fff4d6;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 var(--font);
}

a { color: var(--primary); }
a:hover { color: var(--primary-hover); }

h1, h2 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }

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

/* --- Marque ---------------------------------------------------------- */

.brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
}
.brand-center { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-size: .85rem;
    letter-spacing: .02em;
}

/* --- Pages de connexion ---------------------------------------------- */

body.auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 28px;
}
.auth-card h1 { font-size: 1.35rem; text-align: center; }
.auth-card > p { text-align: center; }
.auth-foot { margin-top: 1.25rem; font-size: .85rem; color: var(--muted); }

/* --- Formulaires ----------------------------------------------------- */

.form { display: grid; gap: .5rem; margin-top: 1.25rem; }
.form label { font-weight: 600; font-size: .9rem; margin-top: .5rem; }
.form input {
    width: 100%;
    font: inherit;
    padding: .7rem .85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.form input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.form .btn { margin-top: 1rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font: inherit;
    font-weight: 600;
    padding: .7rem 1.2rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-block { width: 100%; }
.btn-sm { padding: .35rem .75rem; font-size: .875rem; }

/* --- Alertes --------------------------------------------------------- */

.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .95rem; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error   { background: var(--danger-soft);  color: var(--danger); }
.alert-info    { background: var(--primary-soft); color: var(--primary); }

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

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: .75rem 16px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.mainnav { display: flex; gap: .85rem; flex: 1; flex-wrap: wrap; font-size: .95rem; }
.mainnav a { text-decoration: none; color: var(--muted); font-weight: 600; padding: .25rem 0; white-space: nowrap; }
.mainnav a[aria-current="page"] { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
.topbar-user { display: flex; align-items: center; gap: .75rem; }
.user-name { display: flex; flex-direction: column; text-align: right; font-size: .9rem; font-weight: 600; line-height: 1.2; }
.user-name small { color: var(--muted); font-weight: 400; }
.topbar-user form { margin: 0; }
body.is-admin .brand-mark { background: #1f2430; }

/* --- Contenu --------------------------------------------------------- */

.page { max-width: 1100px; margin: 0 auto; padding: 28px 16px 64px; }
.page-head { margin-bottom: 1.5rem; }

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
    margin-bottom: 1rem;
}
.card.empty { text-align: center; padding: 40px 22px; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
}
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .9rem; }

.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--border); }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* --- Projets --------------------------------------------------------- */

.project-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.tag { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.badge { font-size: .8rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.badge-en_cours { background: var(--primary-soft); color: var(--primary); }
.badge-en_pause { background: var(--warning-soft); color: var(--warning); }
.badge-livre    { background: var(--success-soft); color: var(--success); }

/* Barre native <progress> (pas de style inline : compatible avec la CSP) */
.progress {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: var(--bg);
    overflow: hidden;
    color: var(--primary);
}
.progress::-webkit-progress-bar   { background: var(--bg); border-radius: 999px; }
.progress::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
.progress::-moz-progress-bar      { background: var(--primary); border-radius: 999px; }

.todo {
    margin-top: 1rem;
    padding: .85rem 1rem;
    background: var(--warning-soft);
    border-radius: 8px;
}
.todo p { margin: .25rem 0 0; }

/* --- Mobile ---------------------------------------------------------- */

@media (max-width: 640px) {
    h1 { font-size: 1.35rem; }
    .topbar-inner { gap: .75rem; }
    .mainnav { order: 3; flex-basis: 100%; }
    .topbar-user { margin-left: auto; }
    .user-name small { display: none; }
}

/* =====================================================================
   Étape 2 — back-office et page projet
   ===================================================================== */

h3 { font-size: 1rem; margin: 0 0 .5rem; }
.subhead { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.text-danger { color: var(--danger); }
.link-plain { color: inherit; text-decoration: none; }
.link-plain:hover { color: var(--primary); }
.pad { padding: 20px 22px; margin: 0; }

.page-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.breadcrumb { margin: 0 0 .35rem; font-size: .875rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.actions form { margin: 0; }

.card-flush { padding: 0; overflow-x: auto; }
.card-flush .table th:first-child, .card-flush .table td:first-child { padding-left: 22px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-link { margin-top: 1rem; }
.narrow { max-width: 480px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: 1rem; }
.grid-2-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid-2 > div > .card:first-child { margin-top: 0; }

a.stat { text-decoration: none; color: inherit; transition: box-shadow .15s; }
a.stat:hover { box-shadow: 0 0 0 2px var(--primary-soft), var(--shadow); }

.table .num { text-align: right; white-space: nowrap; }
.table td { vertical-align: top; }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }

.tabs { display: flex; gap: 1rem; margin-top: .25rem; }
.tabs a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding-bottom: .2rem; }
.tabs a[aria-current="page"] { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }

/* --- Formulaires du back-office ------------------------------------- */

.form select, .form textarea {
    width: 100%;
    font: inherit;
    padding: .65rem .8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.form textarea { resize: vertical; }
.form select:focus, .form textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.form .btn { justify-self: start; }

.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; row-gap: .5rem; margin-top: 0; }
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field label, .field legend { margin-top: .5rem; font-weight: 600; font-size: .9rem; }
.field-full { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.hint { margin: 0; font-size: .8rem; color: var(--muted); }
.field-error { margin: 0; font-size: .85rem; color: var(--danger); font-weight: 600; }
.form-actions { display: flex; gap: .5rem; margin-top: 1rem; }
.form-actions .btn { margin-top: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.form-row > div { display: grid; gap: .35rem; }

.form-inline { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
.form-inline input:not([type="checkbox"]) { width: auto; flex: 1 1 140px; padding: .5rem .7rem; }
.form-inline .btn { margin-top: 0; }
.check { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400 !important; margin: 0 !important; cursor: pointer; }
.check input { width: auto; margin: 0; }

.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: .25rem; }
.choice { display: flex; gap: .6rem; align-items: flex-start; padding: .85rem; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 400 !important; margin: 0 !important; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice input { width: auto; margin-top: .2rem; }
.choice-body { display: flex; flex-direction: column; gap: .2rem; }

.todo-field { margin-top: .75rem; padding: .75rem; background: var(--warning-soft); border-radius: 8px; display: grid; gap: .4rem; }
.todo-field legend { font-size: .85rem; font-weight: 600; padding: 0; float: left; width: 100%; margin-bottom: .4rem; }

/* --- Badges supplémentaires ----------------------------------------- */

.badge-brouillon      { background: var(--bg); color: var(--muted); border: 1px dashed var(--border); }
.badge-archive        { background: var(--bg); color: var(--muted); }
.badge-off            { background: var(--danger-soft); color: var(--danger); font-size: .75rem; }
.badge-attente_client,
.badge-step-attente_client { background: var(--warning-soft); color: var(--warning); }
.badge-step-a_venir   { background: var(--bg); color: var(--muted); }
.badge-step-en_cours  { background: var(--primary-soft); color: var(--primary); }
.badge-step-terminee  { background: var(--success-soft); color: var(--success); }
.tag-muted { font-size: .7rem; background: var(--bg); padding: .05rem .4rem; border-radius: 4px; }

.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { color: var(--danger); background: var(--danger-soft); }
.btn:disabled { opacity: .55; cursor: default; }

.note-interne { background: #fffbea; border: 1px solid #f3e3a3; box-shadow: none; }
.note-interne p { margin: .35rem 0 0; }

/* --- Accès utilisateurs ---------------------------------------------- */

.user-list { list-style: none; margin: 0; padding: 0; }
.user-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; padding: .85rem 0; border-bottom: 1px solid var(--border); }
.user-row.is-off .user-main { opacity: .6; }
.user-actions { display: flex; gap: .4rem; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.user-actions form { margin: 0; }
.user-edit { grid-column: 1 / -1; }
.user-edit summary { cursor: pointer; color: var(--primary); }

/* --- Étapes (admin) --------------------------------------------------- */

.steps-admin { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.step-admin { position: relative; border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 10px; padding: .75rem .75rem .75rem .9rem; }
.step-admin.step-en_cours       { border-left-color: var(--primary); }
.step-admin.step-attente_client { border-left-color: #e0a100; }
.step-admin.step-terminee       { border-left-color: var(--success); background: #fbfdfc; }
.step-form { margin: 0; gap: .5rem; }
.step-top { display: grid; grid-template-columns: auto minmax(0, 1fr) 170px; gap: .5rem; align-items: center; padding-right: 92px; }
.step-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); font-size: .8rem; font-weight: 700; color: var(--muted); }
.step-title { font-weight: 600; padding: .45rem .6rem !important; }
.step-top select { padding: .45rem .6rem; }
.step-more summary { cursor: pointer; color: var(--muted); }
.step-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .6rem; }
.step-fields label { display: grid; gap: .3rem; font-size: .85rem; font-weight: 600; margin: 0; }
.step-actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.step-actions .btn { margin-top: 0; }
.step-tools { position: absolute; top: .75rem; right: .75rem; display: flex; gap: .25rem; }
.step-tools form { margin: 0; }
.icon-btn { width: 28px; height: 28px; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; font-size: .85rem; color: var(--muted); }
.icon-btn:hover:not(:disabled) { color: var(--text); background: var(--bg); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn-danger:hover:not(:disabled) { color: var(--danger); background: var(--danger-soft); }
.add-step { margin-top: 1rem; }

.progress-lg { height: 10px; margin-bottom: .25rem; }

/* --- Fil d'activité --------------------------------------------------- */

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.feed li:last-child { border-bottom: 0; }
.feed time { white-space: nowrap; }

/* --- Page projet (client) --------------------------------------------- */

.project-summary .progress { margin-top: 1rem; }
.summary-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.summary-label { display: block; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.summary-value { font-size: 1.15rem; }

.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: .85rem; padding-bottom: 1.25rem; }
.tl-item::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); background: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: #fff; }
.tl-en_cours .tl-dot       { border-color: var(--primary); box-shadow: inset 0 0 0 5px #fff; background: var(--primary); }
.tl-attente_client .tl-dot { border-color: #e0a100; box-shadow: inset 0 0 0 5px #fff; background: #e0a100; }
.tl-terminee .tl-dot       { border-color: var(--success); background: var(--success); }
.tl-terminee::before       { background: var(--success); }
.tl-a_venir .tl-body strong { color: var(--muted); }
.tl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; }
.tl-body p { margin: .2rem 0 0; }
.tl-note { background: var(--bg); padding: .6rem .75rem; border-radius: 8px; margin-top: .5rem !important; font-size: .95rem; }
.tl-body .btn { margin-top: .5rem; }

/* --- Mobile ----------------------------------------------------------- */

@media (max-width: 860px) {
    .grid-2, .grid-2-wide { grid-template-columns: 1fr; }
    .choice-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
    .summary-row { grid-template-columns: 1fr 1fr; }
    .summary-row > div:last-child { grid-column: 1 / -1; }
    .step-top { grid-template-columns: auto minmax(0, 1fr); padding-right: 0; margin-top: 2rem; }
    .step-top select { grid-column: 1 / -1; }
    .step-fields { grid-template-columns: 1fr; }
    .user-row { grid-template-columns: 1fr; }
    .user-actions { justify-content: flex-start; }
    .card-flush .table th:nth-child(n+3), .card-flush .table td:nth-child(n+3) { display: none; }
    .card-flush .table th:last-child, .card-flush .table td:last-child { display: table-cell; }
    .mainnav { gap: .85rem; overflow-x: auto; flex-wrap: nowrap; }
    .mainnav a { white-space: nowrap; }
    .feed li { flex-direction: column; gap: .15rem; }
}
.step-fields label.check { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; grid-column: 1 / -1; }
.grid-2 > * { min-width: 0; }
.card { min-width: 0; }
@media (max-width: 640px) {
    .card:not(.card-flush) > .table { display: block; overflow-x: auto; white-space: nowrap; }
    .card-head .small { display: none; }
}
.form-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.form input, .form select { min-width: 0; max-width: 100%; }

/* =====================================================================
   Étape 3 — contenus à fournir, fichiers, validations
   ===================================================================== */

.count { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--bg); padding: .15rem .55rem; border-radius: 999px; margin-left: .4rem; vertical-align: middle; }
.count-warn { background: var(--warning-soft); color: var(--warning); }
.count-ok { background: var(--success-soft); color: var(--success); }
.card-head form { margin: 0; }

.contents { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.content { border: 1px solid var(--border); border-left: 4px solid #e0a100; border-radius: 10px; padding: .75rem .9rem; }
.content-recu   { border-left-color: var(--primary); }
.content-valide { border-left-color: var(--success); background: #fbfdfc; }
.content-form { margin: 0; gap: .5rem; }
.content-top { display: grid; grid-template-columns: 150px minmax(0, 1fr) 130px; gap: .5rem; }
.content-top input, .content-top select { padding: .45rem .6rem; }
.content-title { font-weight: 600; }
.content-tools { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--border); }
.content-tools form { margin: 0; }
.upload-inline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.upload-inline input[type=file] { font-size: .85rem; max-width: 260px; }

.content-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.content-name { display: block; }
.content-hint { margin: .3rem 0 0; }
.content p { margin: .3rem 0 0; }
.badge-content-manquant { background: var(--warning-soft); color: var(--warning); }
.badge-content-recu     { background: var(--primary-soft); color: var(--primary); }
.badge-content-valide   { background: var(--success-soft); color: var(--success); }

.files { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .35rem; }
.files li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--bg); border-radius: 8px; padding: .4rem .6rem; }
.files a { font-weight: 600; word-break: break-all; }
.files form { margin: 0 0 0 auto; }

.upload-box { display: flex; gap: .5rem; align-items: stretch; flex-wrap: wrap; margin-top: .75rem; }
.upload-label { position: relative; flex: 1 1 220px; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem .8rem; border: 2px dashed var(--border); border-radius: 8px; color: var(--muted); font-size: .9rem; text-align: center; cursor: pointer; }
.upload-label:hover, .upload-label:focus-within { border-color: var(--primary); color: var(--primary); }
.upload-label.has-files { border-style: solid; border-color: var(--primary); color: var(--text); background: var(--primary-soft); }
.upload-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload-box .btn { margin: 0; }

.alerts-mini { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.alerts-mini a { display: inline-block; font-size: .85rem; font-weight: 600; text-decoration: none; background: var(--warning-soft); color: var(--warning); padding: .3rem .7rem; border-radius: 999px; }

/* Validations */
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #0f6249; color: #fff; }
.validate-box { margin-top: .75rem; padding: .85rem; background: var(--warning-soft); border-radius: 10px; gap: .4rem; }
.validate-box label { margin-top: .25rem; font-weight: 400; }
.validate-box textarea { background: #fff; }
.validate-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .25rem; }
.validate-actions .btn { margin-top: 0; }
.validate-box p { margin: 0; }
.validation-note { font-size: .875rem; margin: .5rem 0 0 !important; padding: .4rem .6rem; border-radius: 6px; }
.validation-validee { background: var(--success-soft); color: var(--success); }
.validation-modifications_demandees { background: var(--warning-soft); color: var(--warning); }
.validation-note .muted, .validation .muted { color: var(--text); opacity: .8; }

.validations { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .35rem; }
.validation { font-size: .875rem; padding: .45rem .6rem; border-radius: 6px; }
.validation p { margin: .3rem 0 0; color: var(--text); }

@media (max-width: 640px) {
    .content-top { grid-template-columns: 1fr; }
    .content-tools { flex-direction: column; align-items: stretch; }
    .upload-inline input[type=file] { max-width: 100%; }
}

/* Arborescence */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.tree { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.tree li { position: relative; padding: .3rem 0 .3rem 1.1rem; border-bottom: 1px solid var(--border); }
.tree li:last-child { border-bottom: 0; }
.tree li::before { content: ""; position: absolute; left: 0; top: .85rem; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.tree .tree-l0 { font-weight: 600; }
.tree .tree-l1 { margin-left: 1.1rem; }
.tree .tree-l2 { margin-left: 2.2rem; color: var(--muted); }
.tree .tree-l3 { margin-left: 3.3rem; color: var(--muted); }
.tree .tree-l1::before, .tree .tree-l2::before, .tree .tree-l3::before { background: var(--border); }

/* =====================================================================
   Étape 4 — maintenance, sites, tickets
   ===================================================================== */

.row-muted td, li.row-muted { opacity: .62; }
.text-warn { color: var(--warning); font-weight: 600; }
.pad-b0 { padding-bottom: 0; }
.table-compact td { padding: .4rem .35rem; }
.stat-alert { background: var(--danger-soft); }
.stat-alert .stat-value { color: var(--danger); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .4rem; background: var(--muted); vertical-align: middle; }
.badge-statut { background: var(--bg); color: var(--text); }
.ticket-badges { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: .25rem 0 0; }

.prio { font-size: .8rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.prio-haute   { background: var(--warning-soft); color: var(--warning); }
.prio-urgente { background: var(--danger-soft); color: var(--danger); }

.state { font-weight: 700; white-space: nowrap; }
.state::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .4rem; background: var(--muted); vertical-align: middle; }
.state-up { color: var(--success); }
.state-up::before { background: var(--success); }
.state-down { color: var(--danger); }
.state-down::before { background: var(--danger); animation: pulse 1.4s infinite; }
.stat-value.state { font-size: 1.35rem; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .state-down::before { animation: none; } }

.kv { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; background: var(--bg); padding: .1rem .35rem; border-radius: 4px; }
code.copy { cursor: copy; }
code.copied { background: var(--success-soft); color: var(--success); }
.token-box { border: 2px solid var(--primary); }
.token-reset { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); }

.errors { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.errors li { display: grid; gap: .15rem; font-size: .85rem; }
.errors code { display: block; white-space: pre-wrap; word-break: break-word; padding: .4rem .55rem; }
.errors .err-fatal code { background: var(--danger-soft); color: var(--danger); }

.time-list li { align-items: center; }
.time-right { display: flex; align-items: center; gap: .5rem; }
.time-right form { margin: 0; }

/* Fil de discussion */
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.msg { border-radius: 12px; padding: .8rem 1rem; background: var(--bg); max-width: 92%; }
.msg-admin { background: var(--primary-soft); margin-left: auto; }
.msg-interne { background: #fffbea; border: 1px dashed #e7d48a; margin-left: auto; }
.msg-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; margin-bottom: .35rem; font-size: .9rem; }
.msg-meta time { margin-left: auto; }
.msg-body { overflow-wrap: anywhere; line-height: 1.55; }
.attachments { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.att-img img { display: block; max-width: 220px; max-height: 160px; border-radius: 8px; border: 1px solid var(--border); object-fit: cover; background: #fff; }
.att-file { display: inline-flex; gap: .35rem; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: .35rem .6rem; font-size: .9rem; text-decoration: none; }
.reply-actions { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .25rem; }
.reply-actions .btn { margin-top: 0; }
.close-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.form .upload-label { margin-top: .25rem; }

.site-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.site-cards .card { margin-bottom: 0; }
.site-card h2 { margin-bottom: .1rem; }
.checks { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.filter select { padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fff; }

@media (max-width: 640px) {
    .msg { max-width: 100%; }
    .att-img img { max-width: 140px; max-height: 110px; }
    .kv { grid-template-columns: 1fr; gap: .1rem; }
    .kv dd { margin-bottom: .4rem; }
}

/* Portail à code */
.code-big { font-size: 1.4rem; letter-spacing: .12em; padding: .3rem .7rem; }
.code-input { text-transform: uppercase; letter-spacing: .1em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
body.portal .auth-card .brand { margin-bottom: 1rem; }

/* --- Tableau de bord graphique (étape 5) ------------------------------ */
/* Couleurs de séries : ordre fixe, validé daltonisme (jamais réutilisées pour un statut) */
:root {
    --series-1: #2a78d6;
    --series-2: #eb6834;
    --series-3: #1baf7a;
    --series-4: #eda100;
    --series-5: #e87ba4;
    --chart-grid: #eceef2;
}

.grid-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.grid-charts .card { margin-bottom: 0; }
.chart-card { display: flex; flex-direction: column; min-width: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.chart-head h2 { margin: 0; }
.chart-kpi { margin: 0; color: var(--muted); font-size: .9rem; }
.chart-kpi strong { color: var(--text); font-size: 1.05rem; }

.chart-box { position: relative; height: 240px; }
.chart-box-sm { height: 180px; }
.chart-box-donut { height: 180px; width: 180px; flex: none; }
.chart-box canvas { display: block; }

.chart-legend { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .875rem; color: var(--muted); }
.chart-legend li { display: flex; align-items: center; gap: .4rem; }
.chart-legend-col { flex-direction: column; flex-wrap: nowrap; flex: 1; min-width: 0; margin: 0; }
.chart-legend-col li { justify-content: flex-start; padding: .2rem 0; border-bottom: 1px solid var(--border); }
.chart-legend-col li:last-child { border-bottom: 0; }
.lg-label { color: var(--text); }
.lg-value { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--muted); }
.sw-1 { background: var(--series-1); }
.sw-2 { background: var(--series-2); }
.sw-3 { background: var(--series-3); }
.sw-4 { background: var(--series-4); }
.sw-5 { background: var(--series-5); }
.donut-wrap { display: flex; align-items: center; gap: 1.5rem; flex: 1; }

.chart-data { margin-top: .5rem; font-size: .85rem; }
.chart-data summary { cursor: pointer; color: var(--muted); }
.table-compact th, .table-compact td { padding: .3rem .4rem; }

.gauges { list-style: none; margin: 0; padding: 0; }
.gauges li { padding: .6rem 0; border-bottom: 1px solid var(--border); }
.gauges li:last-child { border-bottom: 0; }
.gauge-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; }
.gauge-pct { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gauges .progress { margin: .35rem 0 .2rem; }

.hero-number { font-size: 2.4rem; font-weight: 700; line-height: 1.1; margin: .25rem 0 0; font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
    .grid-charts { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .donut-wrap { flex-direction: column; align-items: stretch; }
    .chart-box-donut { margin: 0 auto; }
}
.grid-2-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-2-even { grid-template-columns: 1fr; } }

/* --- Forfaits, temps sans ticket, rapports ------------------------------ */
.inline-fields { display: flex; gap: .5rem; }
.inline-fields input { flex: 1; min-width: 0; }
.inline-fields select { width: auto; }
.stat-of { font-size: 1rem; font-weight: 600; color: var(--muted); }
.stat .progress { margin-top: .5rem; }
.badge-neutral { background: var(--primary-soft); color: var(--primary); font-size: .75rem; vertical-align: middle; }
.form-inline-time { margin-bottom: 1rem; }
.time-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.time-row > * { min-width: 0; }
.time-row .input-time { width: 6rem; }
.time-row .btn { margin-left: auto; }
.progress-over::-webkit-progress-value { background: var(--danger); }
.progress-over::-moz-progress-bar { background: var(--danger); }
.forfait-cell { min-width: 160px; }
.forfait-cell .progress { display: block; margin-top: .3rem; }
.report-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem 1rem; align-items: end; }
.report-filters .field { margin: 0; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0 1rem; }
.report-title { font-size: 1.4rem; margin: 0; }
.table-scroll { overflow-x: auto; }
.table tfoot th { color: var(--text); font-size: .9rem; text-transform: none; letter-spacing: 0; border-bottom: 0; }

@media print {
    .topbar, .no-print, .alert, .chart-data summary { display: none !important; }
    body { background: #fff; font-size: 12px; }
    .card, .stat { box-shadow: none; border: 1px solid var(--border); break-inside: avoid; }
    .container, main { max-width: none; padding: 0; }
    a { color: inherit; text-decoration: none; }
    .grid-2, .grid-2-even { grid-template-columns: 1fr 1fr; }
}
.ref { font-size: .8rem; font-weight: 600; padding: .05rem .4rem; border-radius: 6px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.todo-client { margin: .4rem 0 0; padding: .45rem .7rem; background: var(--warning-soft); border-radius: 8px; }
.project-note { margin: .35rem 0 0; color: var(--muted); }

/* --- Boîte « À traiter » et tâches --------------------------------------- */
.nav-count { display: inline-block; min-width: 1.3em; padding: 0 .35em; margin-left: .2em; border-radius: 999px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1.5; text-align: center; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-body { font-size: .95rem; max-height: 70vh; overflow-y: auto; padding: .75rem; background: var(--bg); border-radius: 8px; }
.action-card summary { cursor: pointer; list-style: none; }
.action-card summary::-webkit-details-marker { display: none; }
.action-card summary h2 { display: inline; }
.action-card summary::after { content: " ▾"; color: var(--muted); }
.action-card[open] summary { margin-bottom: .75rem; }
.ignore-form { text-align: right; }
.inline-form { display: inline; }
.link-button { background: none; border: 0; padding: 0; color: var(--primary); text-decoration: underline; cursor: pointer; font: inherit; }
.alert-info { background: var(--primary-soft); color: var(--primary); }
.tasks { list-style: none; margin: 0 0 .75rem; padding: 0; }
.task { display: flex; gap: .5rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.task:last-child { border-bottom: 0; }
.task-form { display: flex; flex: 1; gap: .75rem; align-items: flex-start; justify-content: space-between; min-width: 0; flex-wrap: wrap; }
.task-main { min-width: 0; flex: 1; }
.task-main strong { display: block; }
.task-ctrl { display: flex; gap: .5rem; align-items: center; }
.task-ctrl select { width: auto; padding: .25rem .4rem; font-size: .85rem; }
.task-terminee .task-main strong { text-decoration: line-through; color: var(--muted); }
.task-state { white-space: nowrap; color: var(--muted); }
.task-state-en_cours, .task-state-en_recette { color: var(--primary); font-weight: 600; }
.task-state-terminee { color: var(--success); }
.history { margin-top: .75rem; }

/* --- Tutos ----------------------------------------------------------------- */
.tuto-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.tuto-list li a { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; padding: .6rem 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.tuto-list li:last-child a { border-bottom: 0; }
.tuto-list li a:hover strong { color: var(--primary); text-decoration: underline; }
.tuto-list .small { flex-basis: 100%; }
.tuto-type { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .45rem; border-radius: 6px; background: var(--primary-soft); color: var(--primary); }
.tuto-type-video { background: var(--warning-soft); color: var(--warning); }
.tuto-type-pdf { background: var(--danger-soft); color: var(--danger); }
.tuto .lead { font-size: 1.05rem; color: var(--muted); }
.tuto-text { line-height: 1.65; }
.tuto-text p { margin: 0 0 1rem; }
.tuto-steps { padding-left: 1.4rem; margin: 0 0 1rem; }
.tuto-steps li { margin-bottom: .5rem; padding-left: .2rem; }
.tuto-fig { margin: .75rem 0 1.25rem; }
.tuto-fig img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.tuto-gallery { display: grid; gap: 1rem; }
.video-frame { position: relative; aspect-ratio: 16 / 9; margin-bottom: .5rem; border-radius: 10px; overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tuto-files { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.tuto-files li { display: flex; align-items: center; gap: .6rem; }
.tuto-files img { width: 72px; height: 48px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.tuto-files form { margin-left: auto; }
.tuto-li-fig { list-style: none; margin-left: -1.4rem; }

/* Aperçu admin de l'espace client / du portail */
.apercu-bar{position:sticky;top:0;z-index:50;display:flex;flex-wrap:wrap;gap:.5rem 1rem;align-items:center;justify-content:center;padding:.5rem 1rem;background:#fff4d6;border-bottom:1px solid #e8c55c;color:#5a4300;font-size:.9rem}
.apercu-bar form{margin:0}

/* Logo client dans l'en-tête */
.brand-logo{display:inline-flex;align-items:center;height:38px;max-width:180px}
.brand-logo img{max-height:38px;max-width:180px;width:auto;height:auto;object-fit:contain;display:block}
.brand-name-sub{font-size:.8rem;font-weight:500;opacity:.75;border-left:1px solid currentColor;padding-left:.6rem;margin-left:.1rem}
.auth-card .brand-logo{height:56px;max-width:240px}
.auth-card .brand-logo img{max-height:56px;max-width:240px}
.logo-row{display:flex;flex-wrap:wrap;gap:1rem 1.5rem;align-items:flex-start}
.logo-preview{min-width:160px;min-height:70px;display:flex;align-items:center;justify-content:center;padding:.75rem;border:1px dashed #cfd5df;border-radius:8px;background:#fafbfc}
.logo-preview img{max-height:70px;max-width:220px}
.logo-form{flex:1;min-width:240px;max-width:420px}
@media (max-width:640px){.brand-name-sub{display:none}}

/* Devis & factures (espace client / portail) */
.nowrap { white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.billing-table td { vertical-align: top; }
.billing-table .actions-cell { text-align: right; white-space: nowrap; }
.billing-table .actions-cell .btn + .btn { margin-left: .35rem; }
.badge-doc-envoye, .badge-doc-emise { background: var(--primary-soft); color: var(--primary); }
.badge-doc-accepte, .badge-doc-facture, .badge-doc-payee { background: var(--success-soft); color: var(--success); }
.badge-doc-retard { background: var(--danger-soft); color: var(--danger); }
.badge-doc-refuse, .badge-doc-sans_reponse, .badge-doc-expire, .badge-doc-annulee { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .25rem 1rem; max-height: 260px; overflow-y: auto; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.check-list .check { margin: 0; font-weight: 400; }
@media (max-width: 640px) {
    .billing-table thead { display: none; }
    .billing-table, .billing-table tbody, .billing-table tr, .billing-table td { display: block; width: 100%; }
    .billing-table tr { padding: .75rem 1rem; border-top: 1px solid var(--border); }
    .card-flush .billing-table td, .billing-table td { display: block !important; padding: .15rem 0; border: 0; text-align: left !important; white-space: normal; }
    .billing-table td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 5.5rem; color: var(--muted); font-size: .8rem; }
    .billing-table td.num br, .billing-table td[data-label="Statut"] br { display: none; }
    .billing-table .actions-cell { padding-top: .5rem; }
    .card-flush .billing-table td:first-child { padding-left: 0 !important; }
}

/* --- Mon temps (suivi automatique) ------------------------------------- */
:root { --tt-travail: #2563eb; --tt-loisir: #f59e0b; --tt-autre: #14b8a6; --tt-non: #9ca3af; }
.tt-pause { margin: 0; }
.tt-live { color: var(--success); font-weight: 600; font-size: .875rem; }
.tt-daynav { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.tt-daynav h2 { margin: 0; }
.tt-datepick { margin-left: auto; }
.tt-stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.tt-stats .stat-value { font-size: 1.5rem; }
.tt-stat-travail { box-shadow: inset 0 3px 0 var(--tt-travail); }
.tt-stat-loisir { box-shadow: inset 0 3px 0 var(--tt-loisir); }
.tt-stat-autre { box-shadow: inset 0 3px 0 var(--tt-autre); }
.tt-stat-non_classe { box-shadow: inset 0 3px 0 var(--tt-non); }
.tt-timeline { user-select: none; touch-action: none; }
.tt-timeline svg { display: block; width: 100%; height: 56px; cursor: crosshair; border-radius: 8px; }
.tt-bg { fill: #eef0f3; background: #eef0f3; }
.tt-grid { stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; }
.tt-seg { cursor: pointer; }
.tt-travail { fill: var(--tt-travail); background: var(--tt-travail); }
.tt-loisir { fill: var(--tt-loisir); background: var(--tt-loisir); }
.tt-autre { fill: var(--tt-autre); background: var(--tt-autre); }
.tt-non_classe { fill: var(--tt-non); background: var(--tt-non); }
.tt-done { fill-opacity: .35; opacity: .45; }
.tt-sel { fill: rgba(43, 58, 143, .14); stroke: var(--primary); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.tt-hours { display: grid; grid-template-columns: repeat(12, 1fr); font-size: .75rem; color: var(--muted); margin-top: .25rem; }
.tt-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; list-style: none; padding: 0; margin: .75rem 0 0; color: var(--muted); }
.tt-legend li { display: flex; align-items: center; gap: .35rem; }
.tt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.tt-assign { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 1rem; }
.tt-assign h3 { font-size: 1rem; margin: 0 0 .25rem; }
.tt-assign label { display: inline-flex; align-items: center; gap: .35rem; }
.tt-assign details { margin-top: .25rem; }
.tt-assign details label { display: flex; margin-top: .4rem; }
.tt-assign select, .tt-row-form select { max-width: 22rem; }
.tt-assign select, .tt-row-form select, .tt-targets select { padding: .45rem .55rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: .9rem; background: #fff; color: var(--text); }
.form-inline input.tt-min { flex: 0 0 5.5rem; width: 5.5rem; }
.tt-assign input[type="time"] { flex: 0 0 auto; }
.tt-row-form { margin: 0; }
.tt-row-form select { max-width: 26rem; flex: 1 1 12rem; }
.tt-targets .tt-row-form select { flex: 0 1 auto; }
.tt-table td { vertical-align: middle; }
.tt-titles { display: block; max-width: 34rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-tag { display: inline-block; color: #fff; font-size: .75rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; }
.tt-tag.tt-non_classe { color: #1f2430; }
.tt-barcell { width: 40%; }
.tt-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--bg); min-width: 80px; }
.tt-bar i { display: block; height: 100%; }
.tt-todo { color: var(--warning); font-weight: 600; }
.tt-erase { text-align: right; margin-top: .5rem; }
.tt-points { margin: .5rem 0 1rem; padding-left: 1.2rem; }
.tt-steps { margin: 1rem 0 0; padding-left: 1.2rem; }
.tt-steps li { margin-bottom: .35rem; }
@media (max-width: 720px) {
    .card-flush .table.tt-table th, .card-flush .table.tt-table td { display: table-cell; }
    .card-flush .table.tt-stack, .tt-stack tbody, .tt-stack tr { display: block; }
    .tt-stack thead { display: none; }
    .tt-stack tr { padding: .7rem 22px; border-bottom: 1px solid var(--border); }
    .card-flush .table.tt-stack td { display: block; border: 0; padding: .15rem 0; text-align: left; }
    .tt-assign select, .tt-row-form select { max-width: 100%; min-width: 0; flex: 1 1 100%; }
    .tt-titles { white-space: normal; }
    .tt-row-form { flex-wrap: wrap; }
    .tt-datepick { margin-left: 0; }
    .tt-barcell { display: none !important; }
}
.user-link { color: inherit; text-decoration: none; }
.user-link:hover, .user-link[aria-current="page"] { color: var(--primary); text-decoration: underline; }
