/* Artistry Tasks: soft glass interface on the Artistry brand (navy ink, coral-red action). */
:root {
    --ink: #1B345B;
    --ink-2: #46577A;
    --line: rgba(27, 52, 91, .10);
    --glass: rgba(255, 255, 255, .62);
    --glass-strong: rgba(255, 255, 255, .86);
    --page: #EEF1F8;
    --accent: #D7302F;
    --accent-grad: linear-gradient(135deg, #E5483F 0%, #C42A33 100%);
    --soft-red: #FDE4E2; --red-ink: #B42318;
    --soft-orange: #FDEBD3; --orange-ink: #8A4B00;
    --soft-blue: #E2ECFD; --blue-ink: #1E4FA8;
    --soft-grey: #EDF0F5; --grey-ink: #3F4D66;
    --radius: 22px;
    --shadow: 0 10px 30px rgba(27, 52, 91, .08), 0 1px 2px rgba(27, 52, 91, .06);
    --font: "Inter", system-ui, sans-serif;
    --display: "Montserrat", "Inter", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; font: 400 14px/1.5 var(--font); color: var(--ink);
    background: var(--page);
}
body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(40vw 40vw at 92% -5%, rgba(232, 59, 59, .16), transparent 60%),
        radial-gradient(45vw 45vw at -10% 30%, rgba(124, 140, 255, .20), transparent 60%),
        radial-gradient(40vw 40vw at 70% 110%, rgba(110, 211, 190, .18), transparent 60%);
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; margin: 0; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.shell { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 18px; padding: 18px; min-height: 100vh; }
.side {
    flex: 1 1 230px; max-width: 100%; align-self: flex-start; position: sticky; top: 18px;
    padding: 20px 14px; border-radius: var(--radius); background: var(--glass);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255, 255, 255, .7); box-shadow: var(--shadow);
}
.main { flex: 999 1 600px; min-width: 0; padding: 6px 4px 40px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; background: var(--accent-grad); color: #fff; display: grid; place-items: center; font: 800 16px var(--display); }
.brand-name { font: 800 15px var(--display); letter-spacing: .08em; }
.brand-name span { display: block; font-size: 10px; letter-spacing: .3em; color: var(--accent); }
.nav { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 14px; text-decoration: none; font-weight: 500; color: var(--ink-2); }
.nav:hover { background: rgba(255, 255, 255, .7); }
.nav.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 8px; }
.nav svg, .icon { width: 20px; height: 20px; flex: none; }
.side-foot { margin-top: 22px; padding: 14px 12px 0; border-top: 1px solid var(--line); }
.page-head { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: flex-end; margin: 6px 0 20px; }
.crumbs { font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.crumbs a { text-decoration: none; }

/* Surfaces */
.card { background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .75); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card.solid { background: var(--glass-strong); }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.grow { flex: 999 1 460px; min-width: 0; }
.aside { flex: 1 1 300px; min-width: 0; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; }

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 600 14px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { box-shadow: var(--shadow); }
.btn.primary { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(196, 42, 51, .25); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn-link { border: 0; background: none; padding: 0; color: var(--ink-2); font: inherit; cursor: pointer; text-decoration: underline; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .9); color: var(--ink); font: 400 14px var(--font); }
.field:focus, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(30, 79, 168, .35); outline-offset: 2px; }
textarea.field { min-height: 110px; resize: vertical; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 500; color: var(--ink); margin: 0; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.error { color: var(--red-ink); font-size: 13px; margin-top: 6px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); }
.seg a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.seg a.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* Status */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.h-late { background: var(--soft-red); color: var(--red-ink); }
.h-urgent { background: var(--soft-orange); color: var(--orange-ink); }
.h-waitc { background: var(--soft-blue); color: var(--blue-ink); }
.h-ok, .h-done { background: var(--soft-grey); color: var(--grey-ink); }
.stripe-late { background: #E5483F; } .stripe-urgent { background: #E8890C; } .stripe-waitc { background: #2D6BD0; } .stripe-ok, .stripe-done { background: #C3C9D3; }
.p-urgente { background: var(--soft-red); color: var(--red-ink); }
.p-haute { background: var(--soft-orange); color: var(--orange-ink); }
.p-normale { background: var(--soft-grey); color: var(--grey-ink); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--ink-2); margin-bottom: 18px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 14px 0 6px; }
.steps span { height: 6px; border-radius: 999px; background: rgba(27, 52, 91, .12); }
.steps .done { background: var(--ink); }
.steps .now { background: var(--accent); }
.bar { height: 8px; border-radius: 999px; background: rgba(27, 52, 91, .10); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.bar span.over { background: var(--accent); }
.avatars { display: inline-flex; }
.ava { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--ink); border: 2px solid #fff; margin-left: -6px; }
.avatars .ava:first-child { margin-left: 0; }

/* Client cards 2/3 */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.tile { position: relative; aspect-ratio: 2 / 3; display: flex; flex-direction: column; text-decoration: none; border-radius: 26px; overflow: hidden; background: var(--glass-strong); border: 1px solid rgba(255, 255, 255, .8); box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(27, 52, 91, .14); }
.tile-cover { flex: 1 1 55%; display: grid; place-items: center; background: linear-gradient(160deg, rgba(124, 140, 255, .18), rgba(232, 59, 59, .10)); }
.tile-mono { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; background: rgba(255, 255, 255, .85); font: 800 28px var(--display); box-shadow: var(--shadow); }
.tile-body { padding: 14px 16px 20px; display: flex; flex-direction: column; gap: 8px; }
.tile-flag { position: absolute; top: 12px; right: 12px; }
.tile-stripe { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; }
.tile.empty { opacity: .75; }

/* Lists */
.list-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 6px; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-row .main-col { flex: 1 1 240px; min-width: 0; text-decoration: none; }
.group-title { display: flex; align-items: center; gap: 8px; margin: 26px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.kv:first-of-type { border-top: 0; }
.kv span:first-child { color: var(--ink-2); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th { text-align: left; font-size: 12px; color: var(--ink-2); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); }

/* Kanban */
.board { display: flex; gap: 14px; overflow-x: auto; padding: 4px 4px 16px; }
.col { flex: 0 0 262px; border-radius: var(--radius); background: rgba(255, 255, 255, .45); border: 1px solid rgba(255, 255, 255, .7); padding: 12px; min-height: 420px; }
.col.drop-target { background: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 2px rgba(30, 79, 168, .25); }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 12px; font-weight: 700; font-size: 13px; }
.task-card { display: block; text-decoration: none; background: var(--glass-strong); border: 1px solid rgba(255, 255, 255, .9); border-radius: 18px; padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); cursor: grab; }
.task-card.late { box-shadow: inset 3px 0 0 #E5483F, var(--shadow); }
.task-card:active { cursor: grabbing; }
.task-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }

/* Brief panel and running stopwatch */
.brief-panel summary { list-style: none; }
.brief-panel summary::-webkit-details-marker { display: none; }
.brief-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px 22px; }
.brief-grid .full { grid-column: 1 / -1; }
.brief-grid a { color: var(--blue-ink); word-break: break-all; }
.task-card .task-meta form { margin: 0; }
.task-card.running { box-shadow: inset 0 0 0 2px var(--ink), var(--shadow); }

/* Project discussion */
.chat-msg { max-width: min(560px, 92%); padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: rgba(255, 255, 255, .95); border: 1px solid var(--line); }
.chat-msg.mine { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: #EEF2FC; }
.chat-msg.decision { box-shadow: inset 3px 0 0 #2D6BD0; }
[data-show-for][hidden] { display: none; }

/* Feedback */
.flash { margin-bottom: 16px; padding: 12px 16px; border-radius: 16px; background: var(--glass-strong); border: 1px solid rgba(255, 255, 255, .9); box-shadow: var(--shadow); font-weight: 500; }
.flash.bad { background: var(--soft-red); color: var(--red-ink); }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-2); }
.timer { font: 800 32px var(--display); }
.notice { padding: 12px 14px; border-radius: 14px; background: var(--soft-blue); color: var(--blue-ink); font-size: 13px; font-weight: 500; }

/* Login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.auth .card { width: min(420px, 100%); padding: 32px; }

@media (max-width: 760px) {
    .shell { padding: 12px; gap: 12px; }
    .side { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 4px; padding: 8px; overflow-x: auto; border-radius: 18px; }
    .brand { padding: 0 6px 0 2px; }
    .brand-name, .side-foot p { display: none; }
    .nav { flex: none; min-height: 40px; padding: 0 10px; white-space: nowrap; }
    .side-foot { margin: 0; padding: 0 0 0 6px; border: 0; }
    .side-foot form { margin: 0 !important; }
    h1 { font-size: 22px; }
    .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
    .tile-cover { padding-top: 34px; }
    .tile-mono { width: 56px; height: 56px; border-radius: 18px; font-size: 22px; }
    .tile-flag { top: 8px; right: 8px; }
    .col { flex-basis: 78vw; min-height: 140px; }
}
