:root {
    --navy-950: #071a36;
    --navy-900: #0b2448;
    --navy-800: #102f5e;
    --navy-700: #174477;
    --navy-100: #e8eef6;
    --green-700: #318f3a;
    --green-800: #277a30;
    --green-600: #43a94c;
    --green-500: #4fb555;
    --green-100: #e9f7ea;
    --orange-600: #df6f22;
    --orange-100: #fff1e5;
    --purple-600: #6f55d9;
    --red-600: #c93d4a;
    --red-100: #fff0f2;
    --amber-600: #a76a00;
    --amber-100: #fff6df;
    --ink: #182436;
    --muted: #637083;
    --muted-soft: #667386;
    --line: #dfe5ed;
    --line-strong: #cbd4df;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --canvas: #eef2f6;
    --sidebar-width: 264px;
    --topbar-height: 76px;
    --radius-sm: 9px;
    --radius-md: 13px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(10, 33, 67, .05), 0 6px 18px rgba(10, 33, 67, .05);
    --shadow-md: 0 16px 40px rgba(10, 33, 67, .10);
    --focus: 0 0 0 3px rgba(79, 181, 85, .34);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .58; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--navy-800); }
img { display: block; max-width: 100%; }
svg { display: block; }
[hidden] { display: none !important; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.content [id] { scroll-margin-top: calc(var(--topbar-height) + 16px); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid rgba(79, 181, 85, .58);
    outline-offset: 2px;
}

/* Application shell */
.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed;
    z-index: 60;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    color: #fff;
    background: linear-gradient(180deg, var(--navy-800), var(--navy-950));
    box-shadow: 10px 0 30px rgba(7, 26, 54, .12);
}
.brand {
    flex: 0 0 auto;
    min-height: 145px;
    padding: 20px 22px 15px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 9px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.brand:hover { color: #fff; }
.brand-logo-wrap { width: 100%; height: 88px; display: grid; place-items: center; }
.brand-logo-wrap img { width: auto; height: 88px; max-width: 100%; object-fit: contain; }
.brand-product { color: #cbd7e7; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav-list { min-height: 0; padding: 18px 12px; display: flex; flex: 1 1 auto; flex-direction: column; gap: 5px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.nav-list a { min-height: 45px; padding: 9px 12px; display: flex; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 11px; color: #cbd7e7; font-size: 13px; font-weight: 650; transition: background .16s ease, color .16s ease, transform .16s ease; }
.nav-list a:hover { color: #fff; background: rgba(255, 255, 255, .07); transform: translateX(2px); }
.nav-list a.is-active { color: #fff; background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .08); box-shadow: inset 3px 0 0 var(--green-500); }
.nav-icon { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; }
.nav-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-separator { margin: 14px 10px 4px; color: #788da9; font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.nav-mobile-action { display: none !important; }
.sidebar-footer { flex: 0 0 auto; padding: 15px; display: grid; gap: 12px; border-top: 1px solid rgba(255, 255, 255, .09); background: rgba(4, 18, 39, .22); }
.user-chip { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; }
.user-chip > span:last-child { min-width: 0; display: grid; }
.user-chip strong { overflow: hidden; color: #fff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-chip small { overflow: hidden; color: #95a8c1; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer .btn-ghost { color: #d9e3ef; border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.03); }
.sidebar-footer .btn-ghost:hover { color: #fff; background: rgba(255,255,255,.09); }
.main-shell { min-width: 0; min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; z-index: 40; top: 0; height: var(--topbar-height); padding: 0 clamp(18px, 3vw, 38px); display: flex; align-items: center; gap: 16px; border-bottom: 1px solid rgba(203, 212, 223, .86); background: rgba(255,255,255,.94); box-shadow: 0 4px 16px rgba(10,33,67,.035); backdrop-filter: blur(14px); }
.topbar-context { min-width: 0; }
.topbar h1 { margin: 0; overflow: hidden; color: var(--navy-800); font-size: clamp(18px, 2vw, 21px); font-weight: 780; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.topbar p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.top-action-leboncoin { white-space: nowrap; }
.menu-toggle { width: 42px; height: 42px; display: none; border: 1px solid var(--line); border-radius: 10px; color: var(--navy-800); background: #fff; font-size: 21px; }
.menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.content { width: 100%; max-width: 1840px; margin: 0 auto; padding: clamp(18px, 2.5vw, 34px); }
.sidebar-overlay { display: none; }

/* Type, buttons and shared UI */
.eyebrow { display: inline-block; color: var(--green-800); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.section-bar { width: 28px; height: 3px; margin-bottom: 8px; display: block; border-radius: 99px; background: var(--green-500); }
.btn { min-height: 40px; padding: 8px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); background: #fff; font-size: 12px; font-weight: 760; line-height: 1.2; text-align: center; transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--navy-800); border-color: var(--navy-800); box-shadow: 0 6px 14px rgba(16,47,94,.15); }
.btn-primary:hover { color: #fff; background: var(--navy-700); border-color: var(--navy-700); }
.btn-secondary { color: var(--navy-800); background: #fff; border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--navy-100); border-color: #aebdce; }
.btn-ghost { color: var(--muted); background: transparent; border-color: var(--line); }
.btn-ghost:hover { color: var(--navy-800); background: #fff; }
.btn-success { color: #fff; background: var(--green-800); border-color: var(--green-800); box-shadow: 0 7px 18px rgba(39,122,48,.20); }
.btn-success:hover { color: #fff; background: #216728; border-color: #216728; }
.btn-light { color: var(--navy-800); background: #fff; border-color: #fff; box-shadow: 0 8px 22px rgba(4,18,39,.18); }
.btn-light:hover { color: var(--navy-800); background: #f4f8fc; }
.btn-hero-ghost { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); }
.btn-hero-ghost:hover { color: #fff; background: rgba(255,255,255,.16); }
.btn-ai { color: #fff; background: linear-gradient(135deg, #5945b9, var(--purple-600)); border-color: transparent; box-shadow: 0 8px 20px rgba(89,69,185,.20); }
.btn-ai:hover { color: #fff; background: linear-gradient(135deg, #4d3aa5, #634bc8); }
.btn-leboncoin { color: #fff; background: #c84e00; border-color: #c84e00; }
.btn-leboncoin:hover { color: #fff; background: #a94000; border-color: #a94000; }
.btn-danger-link { color: var(--red-600); background: transparent; border-color: transparent; }
.btn-danger-link:hover { color: #9f2430; background: var(--red-100); }
.btn-lg { min-height: 46px; padding: 11px 18px; font-size: 13px; border-radius: 11px; }
.btn-sm { min-height: 34px; padding: 7px 11px; font-size: 11px; }
.btn-xs { min-height: 30px; padding: 5px 8px; font-size: 11px; border-radius: 7px; }
.btn-block { width: 100%; }
.action-group, .row-actions, .card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-actions { margin-top: auto; }

.panel { margin-bottom: 20px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel.no-padding, .no-padding { padding: 0; overflow: hidden; }
.panel-header { margin-bottom: 17px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-header > div:first-child { min-width: 0; }
.panel-header h2 { margin: 0; color: var(--navy-800); font-size: 17px; letter-spacing: -.02em; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.page-actions { min-height: 42px; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.compact-page-actions { margin-bottom: 13px; }
.page-intro { margin: 0; color: var(--muted); }
.page-note, .help-text { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.page-hero, .hero-panel { margin-bottom: 18px; padding: clamp(23px, 3vw, 32px); display: flex; align-items: center; justify-content: space-between; gap: 26px; border-radius: var(--radius-lg); color: #fff; background: linear-gradient(120deg, var(--navy-800), var(--navy-700)); box-shadow: var(--shadow-md); }
.page-hero .eyebrow, .hero-panel .eyebrow { color: #9be0a1; }
.page-hero h2, .hero-panel h2 { margin: 3px 0 0; font-size: clamp(23px, 2.8vw, 31px); letter-spacing: -.04em; }
.page-hero p, .hero-panel p { max-width: 760px; margin: 8px 0 0; color: #cfdaea; line-height: 1.58; }
.hero-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.catalog-head { margin-bottom: 17px; padding: 4px 1px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.catalog-head h2 { margin: 3px 0 0; color: var(--navy-800); font-size: clamp(22px,2.6vw,29px); letter-spacing: -.035em; }

.alert { margin-bottom: 16px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #cbddeb; border-left-width: 4px; border-radius: 11px; color: #244968; background: #eef7ff; box-shadow: 0 5px 16px rgba(10,33,67,.05); }
.alert-error { color: #8f2630; border-color: #efbdc2; background: var(--red-100); }
.alert-success { color: #256f2d; border-color: #bee1c1; background: var(--green-100); }
.alert-warning { color: #7f570b; border-color: #edd49a; background: var(--amber-100); }
.alert > button { width: 30px; height: 30px; flex: 0 0 auto; border: 0; border-radius: 7px; color: currentColor; background: transparent; font-size: 20px; }
.alert > button:hover { background: rgba(0,0,0,.06); }
.badge, .type-badge, .due-label, .task-state, .task-status, .category-label, .score-pill { max-width: 100%; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: 10px; font-weight: 790; line-height: 1.2; }
.badge { padding: 5px 8px; }
.badge-green { color: #277a30; background: var(--green-100); }
.badge-gray { color: #687587; background: #edf1f5; }
.badge-blue { color: #245b93; background: #e9f3ff; }
.badge-orange { color: #9a571c; background: var(--orange-100); }
.type-badge { padding: 5px 8px; color: color-mix(in srgb, var(--type-color, var(--navy-700)) 75%, #172231); background: color-mix(in srgb, var(--type-color, var(--navy-700)) 13%, #fff); border: 1px solid color-mix(in srgb, var(--type-color, var(--navy-700)) 24%, #fff); }
.avatar { width: 36px; height: 36px; flex: 0 0 auto; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; background: var(--avatar, var(--green-500)); font-size: 12px; font-style: normal; font-weight: 850; box-shadow: inset 0 0 0 2px rgba(255,255,255,.22); }
.avatar-lg { width: 52px; height: 52px; font-size: 17px; }
.avatar-xs { width: 23px; height: 23px; font-size: 9px; }

/* Forms */
.form-layout { display: grid; gap: 18px; }
.form-layout > .panel { margin-bottom: 0; }
.form-layout.narrow { max-width: 850px; margin-inline: auto; }
.stack-form { display: grid; gap: 15px; }
.form-grid { display: grid; gap: 15px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .two-span { grid-column: span 2; }
.field { min-width: 0; display: grid; align-content: start; gap: 7px; color: var(--ink); }
.field > span:first-child { color: #354256; font-size: 11px; font-weight: 760; }
.field input:not([type="checkbox"]):not([type="color"]), .field select, .field textarea,
.inline-form input, .inline-form select, .task-editor input, .task-editor select {
    width: 100%; min-width: 0; min-height: 43px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); background: #fff; outline: 0; transition: border-color .14s ease, box-shadow .14s ease;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #aab7c6; }
.field input:focus, .field select:focus, .field textarea:focus, .task-editor input:focus, .task-editor select:focus { border-color: var(--green-500); box-shadow: var(--focus); }
.field small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.field-error { color: var(--red-600) !important; font-weight: 650; }
.field input[type="color"] { width: 100%; min-height: 43px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; }
.checkbox-field { min-height: 54px; padding: 11px 12px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.checkbox-field:focus-within { border-color: var(--green-500); box-shadow: var(--focus); }
.checkbox-field input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--green-500); }
.checkbox-field span { display: grid; gap: 2px; }
.checkbox-field strong { font-size: 12px; }
.checkbox-field small { color: var(--muted); font-size: 10px; }
.checkbox-field.align-end { align-self: end; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.sticky-actions { position: sticky; z-index: 15; bottom: 14px; padding: 12px 14px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.94); box-shadow: 0 10px 30px rgba(10,33,67,.14); backdrop-filter: blur(10px); }
.password-control { position: relative; display: block; }
.password-control input { padding-right: 82px !important; }
.password-control button { position: absolute; top: 50%; right: 7px; min-height: 30px; padding: 4px 8px; transform: translateY(-50%); border: 0; border-radius: 7px; color: var(--navy-700); background: var(--navy-100); font-size: 10px; font-weight: 750; }
.inline-create-form { display: grid; grid-template-columns: minmax(230px,1fr) 100px auto; align-items: end; gap: 12px; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Native controls with a shared visual language */
select:not([multiple]) {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 38px !important;
    color: var(--ink);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23102f5e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 14px 14px !important;
    transition: border-color .14s ease, background-color .14s ease, box-shadow .14s ease;
}
select:not([multiple]):hover:not(:disabled) { border-color: #99a9ba; background-color: #f8fafc; box-shadow: 0 1px 2px rgba(10,33,67,.06); }
select:not([multiple]):focus { border-color: var(--green-500); outline: 0; background-color: #fff; box-shadow: var(--focus); }
select:not([multiple]):disabled { color: #7b8796; background-color: #f1f4f7; opacity: 1; }
select option, select optgroup { color: var(--ink); background: #fff; font-family: inherit; }
select option { padding: 8px 10px; }
select option:checked { color: var(--navy-800); background: #e8f5ea; font-weight: 750; }
select option:disabled { color: #8b97a7; }
select optgroup { color: var(--navy-800); font-weight: 800; }
select::-ms-expand { display: none; }

/* Enhanced single-select component; the native control remains the form source of truth. */
.custom-select { position: relative; min-width: 0; width: 100%; display: inline-block; vertical-align: middle; }
select.custom-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.custom-select-trigger {
    width: 100%;
    min-height: 43px;
    padding: 9px 39px 9px 11px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    color: var(--ink);
    background: linear-gradient(180deg,#fff,#fbfcfe);
    box-shadow: 0 1px 2px rgba(10,33,67,.035);
    outline: 0;
    cursor: pointer;
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.custom-select-trigger:hover { border-color: #99a9ba; background: #f8fafc; }
.custom-select-trigger:focus-visible, .custom-select.is-open .custom-select-trigger { border-color: var(--green-500); background: #fff; box-shadow: var(--focus); }
.custom-select-value { min-width: 0; flex: 1 1 auto; overflow: hidden; font-size: 12px; line-height: 1.35; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-chevron { position: absolute; top: 50%; right: 13px; width: 8px; height: 8px; border-right: 2px solid var(--navy-700); border-bottom: 2px solid var(--navy-700); transform: translateY(-68%) rotate(45deg); transition: transform .16s ease; pointer-events: none; }
.custom-select.is-open .custom-select-chevron { transform: translateY(-28%) rotate(225deg); }
.custom-select.has-placeholder .custom-select-value { color: #667386; }
.custom-select.is-disabled .custom-select-trigger { color: #7b8796; border-color: #d7dee7; background: #f1f4f7; box-shadow: none; cursor: not-allowed; opacity: .72; }
.custom-select.is-disabled .custom-select-chevron { border-color: #8b97a7; }
.custom-select.is-invalid .custom-select-trigger { border-color: var(--red-600); box-shadow: 0 0 0 3px rgba(201,61,74,.16); }
.custom-select-menu {
    position: fixed;
    z-index: 1000;
    inset: auto;
    margin: 0;
    padding: 5px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #c8d3df;
    border-radius: 10px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 18px 45px rgba(7,26,54,.20), 0 4px 12px rgba(7,26,54,.10);
    scrollbar-width: thin;
    scrollbar-color: #a8b4c3 #edf1f5;
}
.custom-select-menu[popover] { inset: auto; margin: 0; }
.custom-select-option { position: relative; min-height: 36px; padding: 8px 34px 8px 10px; display: flex; align-items: center; border-radius: 7px; font-size: 12px; line-height: 1.35; cursor: pointer; }
.custom-select-option:hover, .custom-select-option.is-active { color: var(--navy-800); background: #edf4fb; }
.custom-select-option[aria-selected="true"] { color: var(--navy-800); background: var(--green-100); font-weight: 760; }
.custom-select-option[aria-selected="true"]::after { content: "✓"; position: absolute; right: 11px; color: var(--green-800); font-size: 12px; font-weight: 900; }
.custom-select-option[aria-disabled="true"] { color: #929dab; background: transparent; cursor: not-allowed; }
.custom-select-option[aria-disabled="true"]::after { display: none; }
.custom-select-group + .custom-select-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.custom-select-group-label { padding: 6px 10px 4px; color: #687587; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.custom-select-empty { padding: 12px 10px; color: var(--muted); font-size: 11px; text-align: center; }
.filter-bar > .custom-select { width: auto; min-width: 145px; flex: 0 1 auto; }
.filter-bar .custom-select-trigger, .planning-commandbar .custom-select-trigger { min-height: 40px; }
.planning-commandbar form .custom-select { min-width: 170px; }
.inline-form > .custom-select { width: auto; min-width: 220px; flex: 1 1 240px; }
.task-editor .custom-select-trigger { min-height: 34px; padding-block: 5px; font-size: 11px; }
.custom-select.custom-select-compact { min-width: 115px; }
.custom-select-compact .custom-select-trigger { min-height: 36px; padding-block: 6px; border-color: transparent; border-radius: 7px; background: #f4f7fa; }
.custom-select-compact .custom-select-trigger:hover, .custom-select-compact.is-open .custom-select-trigger { border-color: var(--line-strong); background: #fff; }
select[multiple] {
    min-height: 132px;
    padding: 6px;
    border-color: #b9c6d5;
    color: var(--ink);
    background: linear-gradient(180deg,#fff,#fbfcfe);
    scrollbar-width: thin;
    scrollbar-color: #9eacbc #edf2f6;
}
select[multiple]:hover:not(:disabled) { border-color: #8fa2b5; }
select[multiple]:focus { border-color: var(--green-500); outline: 0; box-shadow: var(--focus); }
select[multiple] option { margin: 2px 0; padding: 8px 10px; border-radius: 7px; }
select[multiple] option:checked { color: var(--navy-800); background: linear-gradient(135deg,#dff1e1,#edf6ff); font-weight: 780; }

.checkbox-field input[type="checkbox"],
input[type="checkbox"].table-checkbox,
input[type="checkbox"].row-checkbox,
input[type="checkbox"].bulk-checkbox,
input[type="checkbox"].select-all-checkbox {
    -webkit-appearance: none;
    appearance: none;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    border: 1px solid #aeb9c8;
    border-radius: 6px;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 13px 13px;
    box-shadow: inset 0 1px 2px rgba(10,33,67,.05);
    transition: border-color .14s ease, background-color .14s ease, box-shadow .14s ease;
}
.checkbox-field input[type="checkbox"]:hover,
input[type="checkbox"].table-checkbox:hover,
input[type="checkbox"].row-checkbox:hover,
input[type="checkbox"].bulk-checkbox:hover,
input[type="checkbox"].select-all-checkbox:hover { border-color: var(--navy-700); }
.checkbox-field input[type="checkbox"]:checked,
input[type="checkbox"].table-checkbox:checked,
input[type="checkbox"].row-checkbox:checked,
input[type="checkbox"].bulk-checkbox:checked,
input[type="checkbox"].select-all-checkbox:checked {
    border-color: var(--navy-800);
    background-color: var(--navy-800);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E");
}
.checkbox-field input[type="checkbox"]:indeterminate,
input[type="checkbox"].table-checkbox:indeterminate,
input[type="checkbox"].row-checkbox:indeterminate,
input[type="checkbox"].bulk-checkbox:indeterminate,
input[type="checkbox"].select-all-checkbox:indeterminate {
    border-color: var(--navy-800);
    background-color: var(--navy-800);
    background-image: linear-gradient(#fff,#fff);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 9px 2px;
}

.bulk-action-bar,
.bulk-actions-bar,
.mass-action-bar,
.selection-actions,
[data-bulk-toolbar] {
    min-height: 56px;
    padding: 10px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #bfd0e3;
    border-radius: 11px;
    color: var(--navy-800);
    background: linear-gradient(135deg, #f7faff, #eef4fa);
    box-shadow: 0 8px 22px rgba(16,47,94,.08);
}
.bulk-action-bar.is-sticky,
.bulk-actions-bar.is-sticky,
.mass-action-bar.is-sticky,
.selection-actions.is-sticky,
[data-bulk-toolbar].is-sticky { position: sticky; z-index: 12; top: calc(var(--topbar-height) + 8px); }
.bulk-action-bar > :first-child,
.bulk-actions-bar > :first-child,
.mass-action-bar > :first-child,
.selection-actions > :first-child,
[data-bulk-toolbar] > :first-child { min-width: 0; }
.bulk-actions,
.bulk-action-bar .action-group,
[data-bulk-toolbar] .action-group { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.bulk-actions { min-width: 0; flex: 1 1 auto; }
.bulk-selection-count,
.selection-count,
[data-bulk-toolbar] [data-bulk-count] { font-size: 12px; font-weight: 780; white-space: nowrap; }
.selection-cell,
.table-select-cell { width: 46px; text-align: center; }
.selection-cell label,
.table-select-cell label { display: inline-grid; place-items: center; cursor: pointer; }
.ads-table tr:has(.table-checkbox:checked) { background: #f0f6fc; box-shadow: inset 3px 0 0 var(--navy-700); }

/* Dashboard */
.stats-grid { margin-bottom: 18px; display: grid; gap: 12px; }
.stats-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card { min-width: 0; padding: 17px 18px; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.stat-card span { color: var(--muted); font-size: 11px; font-weight: 690; }
.stat-card strong { color: var(--navy-800); font-size: 26px; line-height: 1.15; }
.stat-card small { color: var(--muted-soft); font-size: 10px; }
.stat-card.is-alert { border-color: #edb4ba; background: #fff7f8; }
.stat-card.is-alert strong { color: var(--red-600); }
.compact-stats .stat-card { padding-block: 14px; }
.stat-card[class*="stat-tone-"] {
    --stat-tone: var(--navy-700);
    --stat-soft: #eef4fa;
    --stat-line: #c8d7e7;
    position: relative;
    overflow: hidden;
    border-color: var(--stat-line);
    background: linear-gradient(135deg, #fff 18%, var(--stat-soft));
}
.stat-card[class*="stat-tone-"]::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--stat-tone);
}
.stat-card[class*="stat-tone-"] strong { color: var(--stat-tone); }
.stat-card.stat-tone-navy { --stat-tone: #174477; --stat-soft: #edf3f9; --stat-line: #c8d6e5; }
.stat-card.stat-tone-blue { --stat-tone: #2d67a3; --stat-soft: #edf6ff; --stat-line: #c9def2; }
.stat-card.stat-tone-green { --stat-tone: #277a30; --stat-soft: #edf9ee; --stat-line: #c6e4c9; }
.stat-card.stat-tone-amber,
.stat-card.stat-tone-orange { --stat-tone: #9a5d08; --stat-soft: #fff7e7; --stat-line: #edd8a9; }
.stat-card.stat-tone-red { --stat-tone: #b93442; --stat-soft: #fff1f3; --stat-line: #edc1c6; }
.stat-card.stat-tone-purple { --stat-tone: #6550c6; --stat-soft: #f4f1ff; --stat-line: #d8d0f4; }
.color-kpis .color-kpi-card[class*="stat-tone-"] {
    --kpi-start: #3979c8;
    --kpi-end: #21579c;
    position: relative;
    min-height: 128px;
    padding: 20px;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 14px;
    overflow: hidden;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg,var(--kpi-start),var(--kpi-end));
    box-shadow: 0 13px 28px color-mix(in srgb,var(--kpi-end) 28%,transparent);
    isolation: isolate;
}
.color-kpis .color-kpi-card[class*="stat-tone-"]::before { content: ""; position: absolute; z-index: -1; inset: -48px -36px auto auto; width: 132px; height: 132px; border-radius: 50%; background: rgba(255,255,255,.13); }
.color-kpis .color-kpi-card[class*="stat-tone-"]::after { content: ""; position: absolute; z-index: -1; right: 46px; bottom: -58px; width: 112px; height: 112px; border-radius: 50%; background: rgba(255,255,255,.07); }
.color-kpis .color-kpi-card.stat-tone-blue { --kpi-start: #4386d4; --kpi-end: #225da5; }
.color-kpis .color-kpi-card.stat-tone-red { --kpi-start: #eea43a; --kpi-end: #d47a16; }
.color-kpis .color-kpi-card.stat-tone-red.is-alert { --kpi-start: #e96872; --kpi-end: #bd3543; }
.color-kpis .color-kpi-card.stat-tone-green { --kpi-start: #57bd66; --kpi-end: #2d8c3a; }
.color-kpis .color-kpi-card.stat-tone-purple { --kpi-start: #8a70e0; --kpi-end: #6044bd; }
.color-kpi-copy { min-width: 0; display: grid; align-content: center; gap: 1px; }
.color-kpis .color-kpi-card .color-kpi-copy > span { color: rgba(255,255,255,.90); font-size: 11px; font-weight: 760; }
.color-kpis .color-kpi-card strong { color: #fff; font-size: clamp(27px,2.4vw,34px); line-height: 1.1; text-shadow: 0 1px 1px rgba(0,0,0,.10); }
.color-kpis .color-kpi-card small { color: rgba(255,255,255,.78); font-size: 10px; }
.color-kpi-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; color: #fff !important; background: rgba(255,255,255,.15); box-shadow: inset 0 1px 0 rgba(255,255,255,.20); backdrop-filter: blur(4px); }
.color-kpi-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-deposit-header { align-items: center; justify-content: flex-start; gap: 16px; }
.dashboard-deposit-action { flex: 0 0 auto; padding-right: 16px; border-right: 1px solid var(--line); }
.dashboard-deposit-title { min-width: 0; display: flex; align-items: center; gap: 10px; }
.dashboard-deposit-title .section-bar { width: 3px; height: 30px; margin: 0; flex: 0 0 3px; }
.dashboard-deposit-title h2 { margin: 0; color: var(--navy-800); font-size: 17px; letter-spacing: -.02em; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .62fr); gap: 18px; align-items: start; }
.dashboard-grid .panel { margin-bottom: 0; }
.task-list { display: grid; gap: 8px; }
.task-row { min-width: 0; min-height: 65px; padding: 9px 10px; display: grid; grid-template-columns: 4px minmax(0,1fr) auto auto; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease; }
.task-row:hover { color: var(--ink); border-color: #b9c5d3; box-shadow: 0 8px 20px rgba(10,33,67,.08); transform: translateY(-1px); }
.person-color-bar { width: 4px; height: 38px; border-radius: 99px; background: var(--person-color); }
.task-main, .task-person { min-width: 0; display: grid; gap: 2px; }
.task-main strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.task-main small, .task-person small { color: var(--muted); font-size: 10px; }
.task-person { grid-template-columns: 8px auto; align-items: center; }
.task-person i { width: 8px; height: 8px; border-radius: 50%; background: var(--person-color); }
.task-person small { grid-column: 2; }
.task-state { padding: 5px 8px; white-space: nowrap; }
.task-row.is-posted { border-color: #e8b0b6; background: #fff2f3; }
.task-row.is-posted:hover { border-color: var(--red-600); background: #ffeaed; }
.task-row.is-posted .person-color-bar { background: var(--red-600); }
.task-state-posted { color: #a82e3b; background: #ffe2e6; }
.task-state-in_progress { color: #805907; background: var(--amber-100); }
.task-state-planned { color: #315c8d; background: #eaf2fb; }
.team-today-list { display: grid; gap: 8px; }
.team-today-row { min-width: 0; padding: 10px; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; }
.team-today-row:hover, .team-today-row.is-selected { color: var(--ink); border-color: color-mix(in srgb, var(--person-color) 42%, var(--line)); background: color-mix(in srgb, var(--person-color) 6%, #fff); }
.team-today-row > span:nth-child(2) { min-width: 0; display: grid; }
.team-today-row small { color: var(--muted); font-size: 10px; }
.mini-progress { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 99px; background: #e9edf2; }
.mini-progress i { display: block; height: 100%; border-radius: inherit; background: var(--person-color); }

/* Catalogue, tables and pagination */
.filters-panel { padding: 13px; }
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-bar select, .filter-bar input { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); background: #fff; }
.search-field { min-width: 240px; flex: 1 1 280px; display: flex; align-items: center; gap: 7px; padding-left: 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; }
.search-field > span { color: var(--muted); font-size: 18px; }
.search-field input { min-width: 0; flex: 1; padding-left: 0; border: 0; outline: 0; }
.catalog-workspace { overflow: hidden; }
.catalog-toolbar { min-height: 76px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); background: #fff; }
.catalog-toolbar-title { min-width: 0; display: grid; gap: 2px; }
.catalog-toolbar-title > div { min-width: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.catalog-toolbar-title h2 { margin: 0; color: var(--navy-800); font-size: 18px; letter-spacing: -.025em; }
.catalog-result-count { padding: 3px 8px; border-radius: 99px; color: #526174; background: #eef2f6; font-size: 10px; white-space: nowrap; }
.catalog-filter-zone { padding: 13px 16px 15px; border-bottom: 1px solid var(--line); background: #f7f9fc; }
.catalog-filter-caption { margin-bottom: 9px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.catalog-filter-caption strong { color: var(--navy-800); font-size: 11px; }
.catalog-filter-caption small { color: var(--muted); font-size: 10px; }
.catalog-filter-bar { display: grid; grid-template-columns: minmax(240px,.82fr) minmax(0,2fr) auto; align-items: center; gap: 9px; }
.catalog-filter-bar .search-field { width: 100%; min-width: 0; flex: none; }
.catalog-filter-selects { min-width: 0; display: grid; grid-template-columns: repeat(5,minmax(120px,1fr)); gap: 8px; }
.catalog-filter-selects > select { width: 100%; min-width: 0; }
.catalog-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.catalog-filter-actions .btn { min-height: 40px; white-space: nowrap; }
.catalog-bulk-bar { border-bottom-color: #c5d4e4; background: linear-gradient(135deg,#f5f9fd,#eaf2f9); }
.bulk-selection-copy { min-width: 0; display: grid; gap: 2px; }
.bulk-selection-copy small { color: var(--muted); font-size: 9px; }
.catalog-table-wrap { background: #fff; }
.catalog-table-wrap th { border-bottom: 1px solid var(--line); background: #f3f6f9; }
.catalog-table-wrap tbody tr { transition: background .13s ease, box-shadow .13s ease; }
.catalog-table-wrap .ads-table { min-width: 1260px; table-layout: fixed; }
.catalog-table-wrap .catalog-col-selection { width: 42px; }
.catalog-table-wrap .catalog-col-type { width: 140px; }
.catalog-table-wrap .catalog-col-location { width: 112px; }
.catalog-table-wrap .catalog-col-price { width: 92px; }
.catalog-table-wrap .catalog-col-owner { width: 110px; }
.catalog-table-wrap .catalog-col-due { width: 105px; }
.catalog-table-wrap .catalog-col-actions { width: 175px; }
.catalog-table-wrap .ads-table th { padding: 8px 9px; font-size: 9px; }
.catalog-table-wrap .ads-table td { padding: 7px 9px; font-size: 11px; }
.catalog-table-wrap .title-input { min-width: 0; font-size: 11px; }
.catalog-table-wrap .table-quick-input { min-width: 0; min-height: 32px; padding: 5px 7px; font-size: 11px; }
.catalog-table-wrap .custom-select.custom-select-compact { min-width: 0; }
.catalog-table-wrap .custom-select-compact .custom-select-trigger { min-height: 32px; padding-block: 5px; }
.catalog-table-wrap .btn-xs { min-height: 28px; padding: 4px 7px; font-size: 10px; }
.catalog-table-wrap .row-actions { flex-wrap: nowrap; gap: 6px; }
.catalog-table-wrap .user-inline, .catalog-table-wrap .due-label { font-size: 10px; }
.catalog-workspace .pagination { background: #fafbfd; }
.catalog-empty-cell::before { display: none !important; }
.table-summary { min-height: 54px; padding: 10px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.table-summary.bulk-action-bar {
    min-height: 58px;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid #c8d7e7;
    border-radius: 0;
    background: linear-gradient(135deg,#f7faff,#edf4fb);
    box-shadow: inset 3px 0 0 var(--navy-700);
}
.responsive-table { width: 100%; overflow: auto; scrollbar-width: thin; scrollbar-color: #a8b4c3 #eef2f6; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 12px; color: #687587; background: #f7f9fb; font-size: 10px; font-weight: 820; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: #f8fafc; }
.ads-table { min-width: 1180px; }
.table-quick-input { width: 100%; min-width: 115px; min-height: 36px; padding: 7px 8px; border: 1px solid transparent; border-radius: 7px; color: var(--ink); background: #f4f7fa; }
.table-quick-input:hover, .table-quick-input:focus { border-color: var(--line-strong); background: #fff; outline: 0; }
.title-input { min-width: 260px; font-weight: 680; }
.price-input { min-width: 84px; }
.table-actions { white-space: nowrap; }
.user-inline { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.user-inline i { width: 8px; height: 8px; border-radius: 50%; background: var(--user-color); }
.due-label { padding: 5px 8px; color: #526174; background: #edf1f5; white-space: nowrap; }
.due-label.is-late { color: #a62d38; background: var(--red-100); }
.pagination { padding: 14px; display: flex; align-items: center; justify-content: center; gap: 5px; border-top: 1px solid var(--line); }
.pagination a { min-width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; font-weight: 720; }
.pagination a:hover, .pagination a.is-current { color: #fff; border-color: var(--navy-800); background: var(--navy-800); }

/* Planning */
.planning-commandbar { margin-bottom: 15px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.week-switcher { display: flex; align-items: center; gap: 11px; }
.week-switcher > a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--navy-800); background: #fff; font-size: 22px; }
.week-switcher > a:hover { background: var(--navy-100); }
.week-switcher div { display: grid; }
.week-switcher span { color: var(--muted); font-size: 10px; font-weight: 740; letter-spacing: .08em; text-transform: uppercase; }
.week-switcher strong { color: var(--navy-800); font-size: 14px; }
.planning-commandbar form select { min-height: 40px; padding: 8px 28px 8px 10px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); background: #fff; }
.planning-summary { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.planning-summary article { padding: 12px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow-sm); }
.planning-summary article > div { display: grid; }
.planning-summary strong { color: var(--navy-800); font-size: 20px; }
.planning-summary small { color: var(--muted); font-size: 10px; }
.summary-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; font-weight: 850; }
.summary-icon.blue { color: #2f69a5; background: #eaf3fd; }
.summary-icon.amber { color: #9a6808; background: var(--amber-100); }
.summary-icon.green { color: #267a30; background: var(--green-100); }
.summary-icon.red { color: #a62d38; background: var(--red-100); }
.planning-workspace { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(0, 3.1fr); gap: 15px; align-items: start; }
.pillar-column, .weekly-planning { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.pillar-column { overflow: hidden; }
.pillar-column-head { padding: 17px; border-bottom: 1px solid #efdbc3; background: #fff8ef; }
.pillar-column-head h2 { margin: 2px 0 0; color: var(--navy-800); font-size: 17px; }
.pillar-column-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.pillar-list { max-height: calc(100vh - 245px); padding: 10px; display: grid; align-content: start; gap: 8px; overflow-y: auto; }
.form-layout > .pillar-column,
.form-layout > .weekly-planning { width: 100%; }
.form-layout > .pillar-column .pillar-column-head { padding: 13px 15px; }
.form-layout > .pillar-column .pillar-list {
    max-height: none;
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
    gap: 10px;
    overflow: visible;
}
.pillar-card { padding: 10px; display: grid; gap: 7px; border: 1px solid color-mix(in srgb, var(--type-color) 25%, var(--line)); border-left: 4px solid var(--type-color); border-radius: 9px; background: color-mix(in srgb, var(--type-color) 5%, #fff); }
.pillar-card.is-due { box-shadow: inset 0 0 0 1px #e8aab0; }
.pillar-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pillar-card > strong { font-size: 11px; line-height: 1.4; }
.pillar-card > small { color: var(--muted); font-size: 10px; }
.pillar-due-label { color: var(--red-600); font-size: 10px; font-weight: 780; white-space: nowrap; }
.pillar-empty { padding: 18px 10px; color: var(--muted); text-align: center; }
.pillar-empty p { margin-bottom: 0; font-size: 11px; }
.weekly-planning { overflow-x: auto; scroll-snap-type: x proximity; }
.planning-scroll-controls { position: sticky; z-index: 3; left: 0; width: 100%; min-height: 42px; padding: 6px 10px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.planning-scroll-controls > span { color: var(--muted); font-size: 10px; font-weight: 740; }
.planning-scroll-controls > div { display: flex; gap: 5px; }
.planning-scroll-controls button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--navy-800); background: #fff; font-size: 18px; line-height: 1; }
.planning-scroll-controls button:hover { color: #fff; border-color: var(--navy-800); background: var(--navy-800); }
.weekly-planning-head { min-width: 1260px; padding: 12px 14px 10px; display: flex; gap: 10px; border-bottom: 1px solid var(--line); background: #fff; }
.weekly-planning-head h2 { margin: 0; color: var(--navy-800); font-size: 17px; }
.weekly-planning-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.team-days { min-width: 1260px; padding: 8px; display: grid; grid-template-columns: repeat(7, minmax(170px, 1fr)); gap: 7px; background: #f2f5f8; }
.team-day { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; scroll-snap-align: start; }
.team-day.is-today { border-color: var(--green-500); box-shadow: 0 0 0 2px rgba(79,181,85,.14); }
.team-day > header { min-height: 47px; padding: 7px 9px; display: flex; align-items: center; justify-content: space-between; gap: 7px; border-bottom: 1px solid var(--line); background: #f7f9fb; }
.team-day.is-today > header { background: var(--green-100); }
.team-day > header div { display: grid; }
.team-day > header span { color: var(--navy-800); font-size: 10px; font-weight: 790; text-transform: uppercase; }
.team-day > header strong { font-size: 14px; }
.team-day > header small { padding: 4px 6px; border-radius: 99px; color: var(--muted); background: #fff; font-size: 10px; font-weight: 780; }
.team-day-tasks { min-height: 150px; padding: 6px; display: grid; align-content: start; gap: 6px; }
.team-day.is-drag-over { background: var(--green-100); box-shadow: inset 0 0 0 2px var(--green-500); }
.calendar-task { min-width: 0; padding: 7px; display: grid; gap: 5px; border: 1px solid color-mix(in srgb, var(--type-color) 30%, var(--line)); border-top: 3px solid var(--type-color); border-radius: 8px; background: color-mix(in srgb, var(--type-color) 5%, #fff); box-shadow: 0 3px 9px rgba(10,33,67,.04); }
.calendar-task.is-dragging { opacity: .58; }
.task-owner { min-width: 0; display: grid; grid-template-columns: 23px minmax(0,1fr) auto; align-items: center; gap: 6px; }
.task-owner strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.task-time { color: var(--muted); font-size: 10px; font-weight: 760; }
.task-title { min-width: 0; display: grid; gap: 2px; color: var(--ink); }
.task-title:hover { color: var(--navy-700); }
.task-title strong { overflow: hidden; font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.task-title small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.task-meta-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.category-label { min-width: 0; padding: 3px 5px; overflow: hidden; color: var(--navy-700); background: #edf2f7; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.task-status { padding: 3px 5px; font-size: 10px; white-space: nowrap; }
.status-posted { color: #a82e3b; background: #ffe2e6; }
.status-in_progress { color: #8a5c08; background: var(--amber-100); }
.status-skipped { color: #9b3340; background: var(--red-100); }
.status-planned { color: #315d8c; background: #eaf2fb; }
.calendar-task.status-border-posted { border-color: #e6aab1; border-top-color: var(--red-600); background: #fff1f3; opacity: 1; }
.task-actions { display: flex; gap: 5px; }
.task-editor { padding-top: 7px; display: grid; gap: 7px; border-top: 1px dashed var(--line-strong); }
.task-editor form:first-child { display: grid; gap: 6px; }
.task-editor label { display: grid; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 720; }
.task-editor input, .task-editor select { min-height: 34px; padding: 5px 7px; font-size: 11px; }
.day-empty { min-height: 112px; display: grid; place-items: center; align-content: center; gap: 4px; color: #9aa5b3; border: 1px dashed var(--line-strong); border-radius: 8px; }
.day-empty span { font-size: 20px; }
.day-empty small { font-size: 10px; }
.drag-help { min-width: 1260px; margin: 0; padding: 8px 12px 10px; color: var(--muted); background: #fff; font-size: 10px; }
.empty-planning { padding: 42px 20px; display: grid; justify-items: center; gap: 8px; text-align: center; }
.empty-icon { width: 55px; height: 55px; display: grid; place-items: center; border-radius: 15px; color: var(--navy-700); background: var(--navy-100); font-size: 24px; }

/* Ad detail and rapid copy workflow */
.ad-heading { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; scroll-margin-top: calc(var(--topbar-height) + 16px); }
.ad-heading h2 { margin: 8px 0 3px; color: var(--navy-800); font-size: clamp(19px,2vw,25px); letter-spacing: -.03em; }
.ad-heading p { margin: 0; color: var(--muted); }
.heading-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.deposit-heading-meta { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.copy-progress { min-width: 83px; padding: 8px 10px; display: grid; border: 1px solid var(--line); border-radius: 9px; text-align: center; background: var(--surface-soft); }
.copy-progress strong { color: var(--navy-800); font-size: 15px; }
.copy-progress span { color: var(--muted); font-size: 10px; font-weight: 740; text-transform: uppercase; }
.copy-progress.is-complete { color: #26772f; border-color: #b6deb9; background: var(--green-100); }
.price-block { min-width: 105px; display: grid; text-align: right; }
.price-block strong { color: var(--navy-800); font-size: 19px; }
.price-block small { color: var(--muted); font-size: 10px; }
.copy-panel { overflow: hidden; }
.legacy-copy-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.ultra-compact-copy-panel { padding: 15px; }
.ultra-compact-copy-panel .panel-header { margin-bottom: 11px; }
.ultra-compact-copy-panel .legacy-copy-grid { grid-template-columns: repeat(auto-fit,minmax(165px,1fr)); gap: 8px; }
.ultra-compact-copy-panel .copy-field { min-height: 72px; padding: 8px 9px; }
.ultra-compact-copy-panel .copy-description-tall { grid-column: auto; min-height: 72px !important; }
.ultra-compact-copy-panel .copy-field .preline { max-height: 62px; }
.ultra-compact-copy-panel .subsection-title { margin-top: 11px; }
.legacy-copy-column { min-width: 0; display: grid; align-content: start; gap: 8px; }
.copy-description-tall { grid-column: span 2; min-height: 184px; }
.copy-field { min-width: 0; min-height: 64px; padding: 10px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-left: 3px solid var(--navy-100); border-radius: 9px; background: #fff; transition: border-color .14s ease, background .14s ease; }
.copy-field > div { min-width: 0; display: grid; gap: 3px; }
.copy-field span { color: var(--muted); font-size: 10px; font-weight: 820; letter-spacing: .07em; text-transform: uppercase; }
.copy-field p { margin: 0; overflow: hidden; font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.copy-field .preline { max-height: 150px; overflow: auto; white-space: pre-line; }
.copy-field button { min-height: 32px; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--navy-800); background: #fff; font-size: 11px; font-weight: 780; }
.copy-field button:hover { color: #fff; border-color: var(--navy-800); background: var(--navy-800); }
.copy-field.is-copied { border-color: #a9d9ad; border-left-color: var(--green-500); background: #f3fbf4; }
.copy-field.is-copied button { color: #24732d; border-color: #b5dcb8; background: var(--green-100); }
.deposit-workspace > .compact-ad-heading { margin-bottom: 10px; padding: 11px 14px; gap: 14px; }
.deposit-workspace > .compact-ad-heading h2 { margin: 4px 0 2px; font-size: clamp(17px,1.5vw,21px); }
.deposit-workspace > .compact-ad-heading p { font-size: 11px; }
.deposit-workspace .deposit-heading-meta { gap: 8px; }
.deposit-workspace .copy-progress { min-width: 74px; padding: 5px 8px; }
.deposit-workspace .copy-progress strong { font-size: 13px; }
.deposit-workspace .copy-progress span { font-size: 8px; }
.deposit-workspace .price-block strong { font-size: 17px; }
.deposit-workspace .instant-deposit-form .btn { min-height: 38px; padding: 8px 13px; }
.deposit-copy-panel { margin-bottom: 10px; padding: 14px; }
.deposit-copy-panel .panel-header { margin-bottom: 9px; align-items: center; }
.deposit-copy-panel .panel-header > div:first-child { min-width: 0; }
.deposit-copy-panel .section-bar, .deposit-week-plan .section-bar { width: 22px; height: 2px; margin-bottom: 4px; }
.deposit-copy-panel .panel-header h2, .deposit-week-plan .panel-header h2 { font-size: 15px; }
.deposit-copy-steps { display: grid; gap: 8px; }
.deposit-copy-step { min-width: 0; display: grid; grid-template-columns: 135px minmax(0,1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(10,33,67,.045); }
.deposit-step-heading { padding: 10px; display: flex; align-items: flex-start; gap: 8px; border-right: 1px solid #cddbeb; background: linear-gradient(145deg,#f1f6fb 0%,#e8f0f8 100%); }
.deposit-step-heading > div { min-width: 0; display: grid; gap: 2px; }
.deposit-step-heading small { color: var(--green-700); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.deposit-step-heading h3 { margin: 0; color: var(--navy-800); font-size: 12px; line-height: 1.2; }
.deposit-step-number { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: var(--navy-800); font-size: 11px; font-weight: 850; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.deposit-step-fields { min-width: 0; padding: 8px; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); align-content: start; gap: 6px; }
.deposit-field-span-2 { grid-column: span 2; }
.deposit-field-span-3 { grid-column: span 3; }
.deposit-field-span-4 { grid-column: span 4; }
.deposit-field-span-6 { grid-column: 1 / -1; }
.deposit-step-fields .copy-field { min-height: 56px; padding: 7px 8px; gap: 7px; }
.deposit-step-fields .copy-field button { min-height: 28px; padding: 4px 7px; font-size: 10px; }
.deposit-step-fields .copy-description-tall { min-height: 76px; grid-column: 1 / -1; }
.deposit-step-fields .copy-description-tall .preline { max-height: 4.15em; overflow: hidden; white-space: pre-line; }
.deposit-reference-field { min-width: 0; min-height: 56px; padding: 7px 8px; display: grid; align-content: center; gap: 4px; border: 1px solid #d8e1eb; border-left: 3px solid #9cadbf; border-radius: 8px; background: #f8fafc; }
.deposit-reference-label { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.deposit-reference-label span { min-width: 0; color: #56657a; font-size: 10px; font-weight: 820; letter-spacing: .06em; text-transform: uppercase; }
.deposit-reference-label small { flex: 0 0 auto; padding: 2px 5px; border: 1px solid #d5dee8; border-radius: 99px; color: #66758a; background: #fff; font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.deposit-reference-field p { margin: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 10px; font-weight: 650; line-height: 1.3; }
.deposit-last-posted-field { min-height: 46px; grid-template-columns: minmax(120px,.55fr) minmax(0,1fr); align-items: center; gap: 10px; }
.deposit-last-posted-field p { color: #536174; }
.deposit-week-scroll { width: 100%; overflow-x: auto; overflow-y: hidden; padding: 1px 1px 4px; scrollbar-width: thin; scrollbar-color: #a8b4c3 #edf1f5; scroll-snap-type: x proximity; }
.deposit-week-board { min-width: 820px; display: grid; grid-template-columns: minmax(130px,1.2fr) repeat(7,minmax(90px,1fr)); gap: 6px; }
.deposit-week-plan { margin-bottom: 0; padding: 10px 12px; }
.deposit-week-plan .panel-header { margin-bottom: 6px; align-items: center; }
.deposit-week-plan .deposit-week-scroll { padding-bottom: 2px; }
.deposit-pillars-column, .deposit-week-day { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; scroll-snap-align: start; }
.deposit-pillars-column { border-color: #efc797; background: #fff8ef; }
.deposit-pillars-column > header, .deposit-week-day > header { min-height: 34px; padding: 4px 6px; display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 0 4px; border-bottom: 1px solid var(--line); background: #edf2f7; }
.deposit-pillars-column > header { background: #ffe7ca; border-bottom-color: #efc797; }
.deposit-pillars-column > header strong { grid-column: 1 / -1; }
.deposit-pillars-column > header small { color: #80521f; }
.deposit-week-day > header strong { color: var(--navy-800); font-size: 11px; }
.deposit-week-day > header span { color: var(--muted); font-size: 10px; }
.deposit-week-day > header small { grid-row: 1 / 3; grid-column: 2; align-self: center; padding: 3px 6px; border-radius: 99px; color: var(--navy-800); background: #fff; font-size: 10px; font-weight: 800; }
.deposit-week-day.is-selected-day { border-color: var(--green-500); box-shadow: inset 0 0 0 1px var(--green-500); }
.deposit-week-day.is-selected-day > header { background: var(--green-100); }
.deposit-pillars-column > div, .deposit-week-day > div { min-height: 112px; padding: 3px; display: grid; align-content: start; gap: 3px; overflow-y: visible; }
.deposit-mini-task { min-width: 0; padding: 3px 4px; display: grid; gap: 0; overflow: hidden; border: 1px solid color-mix(in srgb,var(--type-color) 30%,var(--line)); border-left: 3px solid var(--type-color); border-radius: 6px; color: var(--ink); background: color-mix(in srgb,var(--type-color) 6%,#fff); line-height: 1.18; }
.deposit-mini-task:hover { color: var(--ink); box-shadow: 0 4px 10px rgba(10,33,67,.08); }
.deposit-mini-task strong, .deposit-mini-task small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deposit-mini-task strong { font-size: 10px; }
.deposit-mini-task small { color: var(--muted); font-size: 9px; }
.deposit-mini-task.is-current { border-color: var(--navy-800); border-left-color: var(--green-500); background: #eef4fa; box-shadow: inset 0 0 0 1px var(--navy-800); }
.deposit-mini-task.is-done { border-color: #e4a8af; border-left-color: var(--red-600); background: #fff0f2; }
.deposit-mini-task.is-done strong::after { content: " · déposée"; color: var(--red-600); }
.deposit-mini-task.is-done.is-current { box-shadow: inset 0 0 0 1px var(--red-600); }
.deposit-week-empty { padding: 10px 4px; color: var(--muted-soft); font-size: 9px; text-align: center; }

@media (min-width: 1440px) {
    .deposit-copy-steps { grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; }
    .deposit-copy-step { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .deposit-step-heading { padding: 8px 9px; align-items: center; border-right: 0; border-bottom: 1px solid #cddbeb; }
    .deposit-step-fields { height: 100%; }
}

/* Forms, team, references and settings */
.ad-editor-form { display: grid; gap: 18px; }
.subsection-title { margin: 6px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--navy-800); font-size: 13px; }
.photo-manager { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 12px; }
.photo-manager > div { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); }
.photo-manager img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-soft); }
.photo-manager button { width: 100%; min-height: 36px; border: 0; border-top: 1px solid var(--line); color: var(--red-600); background: #fff; font-size: 11px; font-weight: 760; }
.photo-manager button:hover { color: #fff; background: var(--red-600); }
.upload-dropzone { min-height: 100px; padding: 20px; display: grid; place-items: center; align-content: center; gap: 4px; border: 1px dashed #aab8c7; border-radius: 11px; color: var(--navy-800); background: #f8fafc; text-align: center; cursor: pointer; }
.upload-dropzone:hover { border-color: var(--green-500); background: var(--green-100); }
.upload-dropzone input { max-width: 100%; }
.upload-dropzone span { font-weight: 760; }
.upload-dropzone small { color: var(--muted); }
.security-note { padding: 14px 16px; border-left: 4px solid var(--navy-700); border-radius: 9px; color: #30445f; background: var(--navy-100); }
.security-note p { margin: 4px 0 0; font-size: 11px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 14px; }
.team-card { min-height: 225px; padding: 19px; display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.team-card.is-disabled { opacity: .7; }
.team-card-head { display: flex; align-items: center; justify-content: space-between; }
.team-card h2 { margin: 0; color: var(--navy-800); font-size: 19px; }
.team-card p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.panel > .team-grid { grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); align-items: start; }
.panel > .team-grid .team-card {
    min-height: 0;
    padding: 14px;
    gap: 11px;
    border-top: 4px solid var(--person-color, var(--green-500));
    box-shadow: 0 6px 18px rgba(10,33,67,.06);
}
.panel > .team-grid .team-card-head { gap: 10px; }
.panel > .team-grid .team-card h2 { font-size: 17px; }
.panel > .team-grid .task-list { gap: 7px; }
.panel > .team-grid .task-row {
    min-height: 58px;
    padding: 8px 9px;
    grid-template-columns: 4px minmax(0,1fr) auto;
    grid-template-rows: auto auto;
    gap: 2px 9px;
}
.panel > .team-grid .person-color-bar { grid-row: 1 / span 2; }
.panel > .team-grid .task-main { grid-column: 2; grid-row: 1; }
.panel > .team-grid .task-person { grid-column: 2; grid-row: 2; display: grid; justify-self: start; }
.panel > .team-grid .task-state { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.panel > .team-grid .empty-state { min-height: 105px; align-content: center; }
.reference-section { padding: 0; overflow: hidden; }
.reference-section > .panel-header { margin: 0; padding: 19px 20px 15px; border-bottom: 1px solid var(--line); }
.reference-section > form { margin: 15px 20px; }
.reference-cards { border-top: 1px solid var(--line); }
.reference-editor { border-bottom: 1px solid var(--line); }
.reference-editor:last-child { border-bottom: 0; }
.reference-editor summary { min-height: 55px; padding: 11px 20px; display: grid; grid-template-columns: auto minmax(120px,1fr) auto; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.city-editor-list .reference-editor summary { grid-template-columns: auto minmax(140px,1fr) minmax(180px,auto) auto; }
.reference-editor summary::-webkit-details-marker { display: none; }
.reference-editor summary:hover { background: #f8fafc; }
.reference-editor summary small { color: var(--muted); }
.summary-action { color: var(--navy-700); font-size: 10px; font-weight: 750; }
.reference-editor-form { padding: 18px 20px; border-top: 1px solid var(--line); background: #f8fafc; }
.reference-delete-form { padding: 0 20px 15px; background: #f8fafc; }
.rank { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--navy-700); font-size: 10px; font-weight: 820; }
.compact-reference-create { padding-bottom: 4px; }
.score-pill { padding: 4px 7px; color: var(--navy-700); background: var(--navy-100); }

/* Gemini */
.ai-hero { background: linear-gradient(118deg, #2c285f, #5d4bc0); }
.ai-model { padding: 8px 11px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.2); border-radius: 99px; background: rgba(255,255,255,.09); font-size: 10px; font-weight: 740; white-space: nowrap; }
.ai-model i { color: #d9d0ff; font-style: normal; }
.ai-config-alert { align-items: center; }
.ai-layout { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(250px,.65fr); gap: 17px; align-items: start; }
.ai-layout .panel { margin-bottom: 18px; }
.ai-guidance { position: sticky; top: calc(var(--topbar-height) + 18px); color: #342d62; border-color: #ddd7fa; background: #f8f6ff; }
.ai-guidance h2 { margin: 8px 0 12px; font-size: 17px; }
.ai-guidance ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: #56506f; font-size: 11px; }
.ai-guidance p { margin-bottom: 0; color: #6f6985; font-size: 10px; line-height: 1.55; }
.ai-spark { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--purple-600); font-size: 18px; }
.ai-submit { margin-top: 4px; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 11px; color: #393161; background: #f3f0ff; }
.ai-submit > div { display: grid; }
.ai-submit span { color: #746d90; font-size: 10px; }
.ai-multi-field { margin: 0; padding: 0; border: 0; }
.ai-multi-field > legend { width: 100%; margin: 0 0 7px; padding: 0; color: #354256; font-size: 11px; font-weight: 760; }
.ai-type-picker { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 8px; }
.ai-type-choice,
.ai-source-choice {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: 25px minmax(0,1fr);
    align-items: center;
    gap: 9px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease, transform .14s ease;
}
.ai-type-choice { min-height: 64px; padding: 10px 11px; border-left: 4px solid color-mix(in srgb,var(--type-color) 72%,#fff); }
.ai-source-choice { min-height: 62px; padding: 9px 10px; }
.ai-type-choice:hover,
.ai-source-choice:hover { border-color: #a9a0db; box-shadow: 0 6px 16px rgba(72,55,150,.08); transform: translateY(-1px); }
.ai-type-choice > input,
.ai-source-choice > input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); opacity: 0; }
.ai-choice-check { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #b8bfd0; border-radius: 8px; color: transparent; background: #fff; font-size: 11px; font-weight: 900; box-shadow: inset 0 1px 2px rgba(10,33,67,.05); transition: color .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease; }
.ai-type-choice > span:last-child,
.ai-source-choice > span:last-child { min-width: 0; display: grid; gap: 2px; }
.ai-type-choice strong,
.ai-source-choice strong { overflow: hidden; color: var(--navy-800); font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.ai-type-choice small,
.ai-source-choice small { overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.ai-type-choice:has(input:checked) { border-color: color-mix(in srgb,var(--type-color) 50%,#c5ccda); background: color-mix(in srgb,var(--type-color) 7%,#fff); box-shadow: 0 0 0 2px color-mix(in srgb,var(--type-color) 13%,transparent); }
.ai-source-choice:has(input:checked) { border-color: #9586df; background: #f8f6ff; box-shadow: 0 0 0 2px rgba(99,75,194,.10); }
.ai-type-choice input:checked + .ai-choice-check { color: #fff; border-color: var(--type-color); background: var(--type-color); }
.ai-source-choice input:checked + .ai-choice-check { color: #fff; border-color: var(--purple-600); background: var(--purple-600); }
.ai-type-choice input:focus-visible + .ai-choice-check,
.ai-source-choice input:focus-visible + .ai-choice-check { box-shadow: 0 0 0 3px rgba(79,181,85,.22); }
.ai-type-choice:has(input:disabled) { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.ai-source-picker { padding: 13px; gap: 10px; border: 1px solid #d8d3ef; border-radius: 12px; background: #fbfaff; }
.ai-source-picker > legend { width: auto; margin: 0; padding: 0 6px; color: #393161; }
.ai-source-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-source-toolbar .search-field { min-width: 260px; min-height: 41px; flex: 1 1 420px; background: #fff; }
.ai-source-toolbar .search-field input { min-height: 39px; background: transparent; box-shadow: none; }
.ai-source-toolbar .badge { flex: 0 0 auto; }
.ai-source-empty { min-height: 94px; padding: 18px; display: grid; place-items: center; align-content: center; gap: 3px; border: 1px dashed #c9c3e8; border-radius: 10px; color: #4d456f; background: rgba(255,255,255,.72); text-align: center; }
.ai-source-empty strong { font-size: 12px; }
.ai-source-empty span { color: var(--muted); font-size: 10px; }
.ai-source-groups { max-height: 390px; padding: 2px; display: grid; align-content: start; gap: 10px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #a99ee0 #eeebfa; }
.ai-source-group { overflow: hidden; border: 1px solid #ddd8ef; border-radius: 10px; background: #fff; }
.ai-source-group > header { position: sticky; z-index: 2; top: 0; min-height: 39px; padding: 6px 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #e8e4f5; background: rgba(249,248,253,.96); backdrop-filter: blur(7px); }
.ai-source-group > header small { color: var(--muted); font-size: 9px; font-weight: 740; }
.ai-source-grid { padding: 7px; display: grid; grid-template-columns: repeat(auto-fit,minmax(235px,1fr)); gap: 7px; }
.ai-source-group.has-no-match::after { content: "Aucune annonce ne correspond à cette recherche."; margin: 0 8px 8px; padding: 12px; display: block; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); font-size: 10px; text-align: center; }
.ai-selection-summary { min-height: 40px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 9px; color: #514a72; background: #efecfb; }
.ai-selection-summary span { font-size: 9px; line-height: 1.35; }
.ai-selection-summary strong { flex: 0 0 auto; color: #4d3e9e; font-size: 11px; }
.ai-selection-summary strong.is-error,
.ai-source-picker.is-invalid .ai-selection-summary strong { color: var(--red-600); }
.ai-source-picker.is-invalid .ai-selection-summary { background: #fff0f2; }
.ai-seo-title { margin: 5px 0; padding: 6px 8px; display: block; border-left: 3px solid var(--purple-600); border-radius: 5px; color: #44378c; background: #f3f0ff; font-size: 10px; font-weight: 760; line-height: 1.4; }
.ai-suggestion-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 10px; }
.suggestion-card { position: relative; min-height: 145px; padding: 14px; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-content: start; gap: 9px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.suggestion-card:hover, .suggestion-card:focus-within { border-color: #9d8fea; box-shadow: 0 8px 20px rgba(89,69,185,.10); }
.suggestion-card > input { position: absolute; opacity: 0; }
.suggestion-check { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #bcb3e8; border-radius: 8px; color: transparent; background: #fff; }
.suggestion-card:has(input:checked) { border-color: #b9afe9; background: #fbfaff; }
.suggestion-card input:checked + .suggestion-check { color: #fff; background: var(--purple-600); border-color: var(--purple-600); }
.suggestion-location, .suggestion-slot { display: grid; }
.suggestion-location small, .suggestion-slot small { color: var(--muted); font-size: 10px; }
.suggestion-slot { text-align: right; }
.suggestion-card p { grid-column: 2 / -1; margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.proposal-actions { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Dialogs and empty/error states */
.app-dialog { width: min(760px, calc(100vw - 28px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid rgba(16,47,94,.12); border-radius: 18px; color: var(--ink); background: #fff; box-shadow: 0 28px 90px rgba(4,18,39,.32); }
.app-dialog::backdrop { background: rgba(6,20,43,.62); backdrop-filter: blur(3px); }
.app-dialog[open] { animation: dialog-enter .18s ease-out both; }
.app-dialog[open]::backdrop { animation: dialog-backdrop-enter .18s ease-out both; }
@keyframes dialog-enter {
    from { opacity: 0; transform: translateY(8px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dialog-backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
.dialog-header { position: sticky; z-index: 3; top: 0; padding: 19px 21px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg,#fff,#fbfcfe); }
.dialog-header h2 { margin: 2px 0 0; color: var(--navy-800); font-size: 20px; }
.dialog-header p { margin: 5px 0 0; color: var(--muted); }
.dialog-header > button { width: 35px; height: 35px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fff; font-size: 20px; }
.dialog-header > button:hover { color: var(--navy-800); background: var(--navy-100); }
.dialog-tabs { padding: 10px 16px 0; display: flex; gap: 3px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.dialog-tabs button { padding: 9px 11px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 11px; font-weight: 740; white-space: nowrap; }
.dialog-tabs button.is-active { color: var(--navy-800); border-color: var(--green-500); }
.dialog-panel { display: none; padding: 20px; }
.dialog-panel.is-active { display: block; }
.template-list { display: grid; gap: 8px; }
.template-list article { padding: 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 9px; }
.template-list article > div { display: grid; }
.template-list small { color: var(--muted); font-size: 10px; }
.message-dialog { width: min(470px, calc(100vw - 28px)); border-top: 4px solid var(--green-500); }
.message-dialog .dialog-header { position: static; padding-bottom: 15px; border-bottom: 0; background: linear-gradient(135deg,#fff,#f3f8fd); }
.message-dialog .dialog-header p { font-size: 13px; line-height: 1.55; }
.message-dialog-actions { padding: 14px 20px 20px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.message-dialog-actions .btn { min-width: 108px; }
.message-dialog-actions .btn-danger-link { color: #fff; border-color: var(--red-600); background: var(--red-600); box-shadow: 0 7px 16px rgba(201,61,74,.18); }
.message-dialog-actions .btn-danger-link:hover { color: #fff; border-color: #a72d39; background: #a72d39; }
.bulk-edit-dialog { width: min(680px, calc(100vw - 28px)); }
.bulk-edit-dialog .dialog-panel { padding: 21px; }
.bulk-edit-dialog .form-actions { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.person-picker-grid { padding: 18px; display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 10px; }
.person-pick-card { padding: 14px; display: grid; grid-template-columns: 52px minmax(0,1fr); align-items: center; gap: 11px; border: 1px solid var(--line); border-left: 4px solid var(--person-color); border-radius: 11px; color: var(--ink); background: #fff; }
.person-pick-card:hover { color: var(--ink); background: color-mix(in srgb,var(--person-color) 6%,#fff); box-shadow: var(--shadow-sm); }
.person-pick-card > span:last-child { min-width: 0; display: grid; }
.person-pick-card small { color: var(--muted); font-size: 10px; }
.empty-state { padding: 32px 16px; display: grid; justify-items: center; gap: 7px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); }
.empty-state p { max-width: 460px; margin: 0 0 4px; }
.empty-state.compact { padding: 18px 12px; }
.error-page { min-height: 55vh; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; }
.error-page > span { color: var(--green-500); font-size: 58px; font-weight: 850; }
.error-page h1, .error-page p { margin: 0; }
.error-page p { color: var(--muted); }

/* Login and account setup */
.guest-shell { min-height: 100vh; padding: 28px; display: grid; place-items: center; background: #fff; }
.guest-card { width: min(900px,100%); min-height: 540px; display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; border: 1px solid rgba(16,47,94,.08); border-radius: 22px; background: #fff; box-shadow: 0 28px 80px rgba(7,26,54,.22); }
.guest-card > .brand-centered { grid-row: 1 / span 3; min-height: 540px; padding: 43px 38px; display: flex; align-items: flex-start; justify-content: center; flex-direction: column; gap: 21px; border: 0; color: #fff; background: linear-gradient(150deg,var(--navy-800),var(--navy-950)); }
.guest-logo { width: 260px; max-height: 128px; object-fit: contain; }
.guest-brand-copy { display: grid; gap: 9px; }
.guest-product-name { color: #9ce3a2; font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.guest-brand-copy strong { font-size: clamp(24px,3vw,31px); line-height: 1.12; letter-spacing: -.04em; }
.guest-brand-copy p { margin: 0; color: #c6d4e6; font-size: 12px; line-height: 1.65; }
.guest-benefits { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.guest-benefits span { padding: 5px 8px; border: 1px solid rgba(255,255,255,.15); border-radius: 99px; color: #dce6f2; font-size: 10px; font-weight: 730; }
.guest-card > .alert { grid-column: 2; margin: 22px 35px 0; }
.guest-card > .guest-heading, .guest-card > .stack-form { grid-column: 2; }
.guest-heading { margin: 0; padding: 60px 40px 17px; align-self: end; }
.guest-heading h1 { margin: 4px 0 0; color: var(--navy-800); font-size: 28px; letter-spacing: -.04em; }
.guest-heading p { margin: 9px 0 0; color: var(--muted); line-height: 1.55; }
.guest-card > .stack-form { padding: 0 40px 55px; align-self: start; }

/* Installer */
.installer-shell { min-height: 100vh; margin: 0; padding: 28px 16px; color: var(--ink); background: var(--canvas); }
.installer-card { width: min(980px,100%); margin: 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-md); }
.installer-header { padding: 23px 27px; display: grid; grid-template-columns: 175px 1fr; align-items: center; gap: 25px; border-top: 4px solid var(--green-500); border-bottom: 1px solid var(--line); }
.installer-header img { width: 175px; max-height: 85px; object-fit: contain; }
.installer-header h1 { margin: 0; color: var(--navy-800); font-size: 26px; }
.installer-header p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.installer-steps { padding: 0 25px; display: grid; grid-template-columns: repeat(3,1fr); border-bottom: 1px solid var(--line); background: #f7f9fb; }
.installer-steps span { min-height: 57px; display: flex; align-items: center; justify-content: center; gap: 7px; border-bottom: 3px solid transparent; color: var(--muted); font-size: 10px; font-weight: 790; }
.installer-steps span.is-current { color: var(--navy-800); border-color: var(--green-500); }
.installer-steps i { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #98a5b5; font-style: normal; }
.installer-steps .is-current i { background: var(--green-500); }
.installer-errors { margin: 18px 25px 0; align-items: flex-start; }
.installer-errors ul { margin: 5px 0 0; padding-left: 17px; }
.requirements-box { margin: 18px 25px 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafc; }
.requirements-box > strong { color: var(--navy-800); }
.requirements-box > div { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 7px; }
.requirements-box span { padding: 5px 7px; display: inline-flex; align-items: center; gap: 5px; border-radius: 7px; font-size: 10px; font-weight: 720; }
.requirements-box .is-ok { color: #26742f; background: var(--green-100); }
.requirements-box .is-error { color: #a22e39; background: var(--red-100); }
.requirements-box i { font-style: normal; }
.installer-form { padding: 18px 25px 25px; display: grid; gap: 14px; }
.installer-section { padding: 19px; border: 1px solid var(--line); border-radius: 12px; }
.installer-section-title { margin-bottom: 16px; display: flex; gap: 11px; }
.installer-section-title > span { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--navy-800); font-weight: 820; }
.installer-section-title h2 { margin: 0; color: var(--navy-800); font-size: 16px; }
.installer-section-title p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.installer-submit { padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-radius: 12px; color: #fff; background: var(--navy-800); }
.installer-submit > div { display: grid; }
.installer-submit span { color: #cbd8e8; font-size: 10px; }

/* Responsive */
@media (max-width: 1240px) {
    .form-grid.five { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .legacy-copy-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .copy-description-tall { grid-column: span 1; }
    .ai-layout { grid-template-columns: minmax(0,1.45fr) minmax(230px,.65fr); }
    .catalog-filter-bar { grid-template-columns: 1fr; }
    .catalog-filter-selects { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .catalog-filter-actions { justify-content: flex-start; }
}

@media (max-width: 1024px) {
    body.sidebar-open { overflow: hidden; }
    .sidebar { visibility: hidden; transform: translateX(-102%); transition: transform .2s ease, visibility 0s linear .2s; }
    body.sidebar-open .sidebar { visibility: visible; transform: translateX(0); transition-delay: 0s; }
    .main-shell { margin-left: 0; }
    .menu-toggle { display: grid; place-items: center; }
    .sidebar-overlay { position: fixed; z-index: 50; inset: 0; background: rgba(5,18,39,.55); backdrop-filter: blur(2px); }
    body.sidebar-open .sidebar-overlay { display: block; }
    .nav-mobile-action { display: flex !important; }
    .dashboard-grid, .ai-layout { grid-template-columns: 1fr; }
    .ai-guidance { position: static; }
    .planning-workspace { grid-template-columns: 1fr; }
    .pillar-list { max-height: none; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); }
    .form-grid.five { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 860px) {
    .guest-shell { padding: 0; background: #fff; }
    .guest-card { width: 100%; min-height: 100vh; grid-template-columns: 1fr; align-content: start; border: 0; border-radius: 0; box-shadow: none; }
    .guest-card > .brand-centered { grid-row: auto; min-height: 235px; padding: 28px 26px; display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 22px; }
    .guest-logo { width: 180px; max-height: 95px; }
    .guest-brand-copy strong { font-size: 23px; }
    .guest-brand-copy p, .guest-benefits { display: none; }
    .guest-card > .alert, .guest-card > .guest-heading, .guest-card > .stack-form { grid-column: 1; }
    .guest-card > .alert { margin: 18px 24px 0; }
    .guest-heading { padding: 34px 25px 16px; }
    .guest-card > .stack-form { padding: 0 25px 40px; }
    .page-hero, .hero-panel, .ad-heading { align-items: flex-start; flex-direction: column; }
    .deposit-heading-meta { width: 100%; justify-content: flex-start; }
    .planning-commandbar { align-items: stretch; flex-direction: column; }
    .planning-commandbar > .action-group { justify-content: space-between; }
    .proposal-actions { align-items: stretch; flex-direction: column; }
    .catalog-filter-selects { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .deposit-copy-step { grid-template-columns: 1fr; }
    .deposit-step-heading { padding: 11px 13px; align-items: center; border-right: 0; border-bottom: 1px solid #cddbeb; }
    .deposit-step-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .deposit-field-span-2, .deposit-field-span-3, .deposit-field-span-4 { grid-column: span 1; }
    .deposit-field-span-6 { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    :root { --topbar-height: 68px; }
    .content { padding: 15px; }
    .topbar { padding: 0 13px; }
    .topbar p { display: none; }
    .top-action-pack { display: none; }
    .topbar .btn { min-height: 38px; padding-inline: 11px; font-size: 10px; }
    .page-actions { align-items: stretch; flex-direction: column; }
    .page-actions > .action-group { justify-content: space-between; }
    .catalog-head { align-items: stretch; flex-direction: column; }
    .stats-grid.four, .planning-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .task-row { grid-template-columns: 4px minmax(0,1fr) auto; }
    .task-person { display: none; }
    .dashboard-deposit-header { gap: 11px; }
    .dashboard-deposit-action { width: 100%; padding: 0 0 11px; border-right: 0; border-bottom: 1px solid var(--line); }
    .dashboard-deposit-action .btn { width: 100%; }
    .dashboard-deposit-title { width: 100%; }
    .panel > .team-grid { grid-template-columns: 1fr; }
    .panel > .team-grid .task-row { grid-template-columns: 4px minmax(0,1fr) auto; grid-template-rows: auto; }
    .panel > .team-grid .person-color-bar { grid-row: 1; }
    .panel > .team-grid .task-main { grid-column: 2; grid-row: 1; }
    .panel > .team-grid .task-person { display: none; }
    .panel > .team-grid .task-state { grid-column: 3; grid-row: 1; }
    .form-grid.two, .form-grid.three, .form-grid.five { grid-template-columns: 1fr; }
    .form-grid .two-span { grid-column: 1; }
    .inline-create-form { grid-template-columns: 1fr 90px; }
    .inline-create-form .btn { grid-column: 1 / -1; }
    .filter-bar { align-items: stretch; }
    .filter-bar > * { width: 100%; }
    .filter-bar > .custom-select, .inline-form > .custom-select { width: 100%; min-width: 0; }
    .search-field { min-width: 0; }
    .catalog-toolbar { padding: 14px; align-items: stretch; flex-direction: column; }
    .catalog-toolbar > .action-group { justify-content: flex-start; }
    .catalog-filter-zone { padding: 12px; }
    .catalog-filter-selects { grid-template-columns: 1fr; }
    .catalog-filter-actions { align-items: stretch; }
    .catalog-filter-actions > * { flex: 1 1 0; }
    .bulk-selection-copy small { display: none; }
    .ads-table { min-width: 0; }
    .ads-table thead { display: none; }
    .ads-table, .ads-table tbody, .ads-table tr, .ads-table td { display: block; width: 100%; }
    .ads-table tr { padding: 12px; border-top: 1px solid var(--line); }
    .ads-table tr:first-child { border-top: 0; }
    .ads-table td { padding: 7px 0; display: grid; grid-template-columns: 105px minmax(0,1fr); align-items: center; gap: 10px; border: 0; }
    .ads-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
    .ads-table td.catalog-empty-cell { padding: 0; display: block; }
    .catalog-table-columns { display: none; }
    .catalog-table-wrap .ads-table { min-width: 0; table-layout: auto; }
    .catalog-table-wrap .ads-table td { padding: 7px 0; font-size: 12px; }
    .catalog-table-wrap .table-quick-input, .catalog-table-wrap .custom-select-compact .custom-select-trigger { min-height: 40px; font-size: 12px; }
    .catalog-table-wrap .btn-xs { min-height: 34px; padding: 6px 9px; font-size: 11px; }
    .catalog-table-wrap .row-actions { flex-wrap: wrap; }
    .title-input, .table-quick-input, .custom-select.custom-select-compact { min-width: 0; }
    .table-actions .row-actions { justify-content: flex-start; }
    .legacy-copy-grid { grid-template-columns: 1fr; }
    .copy-description-tall { min-height: 150px; }
    .copy-field p { white-space: normal; }
    .panel-header { align-items: stretch; flex-direction: column; }
    .panel-header > .action-group { justify-content: flex-start; }
    .pillar-list { max-height: 320px; grid-template-columns: 1fr; overflow-y: auto; }
    .form-layout > .pillar-column .pillar-list { max-height: 320px; grid-template-columns: 1fr; overflow-y: auto; }
    .ad-heading { padding: 15px; }
    .price-block { text-align: left; }
    .instant-deposit-form, .instant-deposit-form .btn { width: 100%; }
    .bulk-action-bar, .bulk-actions-bar, .mass-action-bar, .selection-actions, [data-bulk-toolbar] { align-items: stretch; flex-direction: column; }
    .bulk-actions, .bulk-action-bar .action-group, [data-bulk-toolbar] .action-group { justify-content: flex-start; }
    .ai-source-toolbar { align-items: stretch; flex-direction: column; }
    .ai-source-toolbar .search-field { width: 100%; min-width: 0; flex-basis: auto; }
    .ai-source-toolbar .badge { align-self: flex-start; }
    .ai-source-groups { max-height: 360px; }
    .ai-selection-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
    .ai-submit { align-items: stretch; flex-direction: column; }
    .ai-submit .btn { width: 100%; }
    .installer-shell { padding: 0; background: #fff; }
    .installer-card { border: 0; border-radius: 0; box-shadow: none; }
    .installer-header { padding: 20px 17px; grid-template-columns: 1fr; gap: 10px; }
    .installer-header img { width: 145px; }
    .installer-steps { padding: 0 8px; }
    .installer-steps span { font-size: 0; }
    .installer-steps span i { font-size: 10px; }
    .requirements-box, .installer-errors { margin-inline: 14px; }
    .installer-form { padding: 15px 14px 22px; }
    .installer-section { padding: 15px; }
    .installer-submit { align-items: stretch; flex-direction: column; }
    .installer-submit .btn { width: 100%; }
}

@media (max-width: 520px) {
    .topbar-actions .top-action { width: 38px; padding: 0; font-size: 0; }
    .topbar-actions .top-action span { font-size: 20px; }
    .topbar h1 { font-size: 16px; }
    .page-hero, .hero-panel { padding: 20px; }
    .page-hero .btn, .hero-actions, .hero-actions .btn { width: 100%; }
    .stats-grid.four, .planning-summary { gap: 8px; }
    .stat-card { padding: 13px; }
    .stat-card strong { font-size: 22px; }
    .color-kpis .color-kpi-card[class*="stat-tone-"] { min-height: 112px; padding: 14px; gap: 8px; }
    .color-kpis .color-kpi-card strong { font-size: 27px; }
    .color-kpi-icon { width: 36px; height: 36px; }
    .color-kpi-icon svg { width: 18px; height: 18px; }
    .catalog-filter-actions { flex-direction: column; }
    .catalog-filter-actions .btn { width: 100%; }
    .ai-type-picker, .ai-source-grid { grid-template-columns: 1fr; }
    .ai-source-picker { padding: 10px; }
    .ai-source-choice strong { white-space: normal; }
    .ultra-compact-copy-panel .legacy-copy-grid { grid-template-columns: 1fr; }
    .ultra-compact-copy-panel .copy-description-tall { min-height: 110px !important; }
    .deposit-copy-panel { padding: 13px; }
    .deposit-copy-panel .panel-header .action-group, .deposit-copy-panel .panel-header .btn { width: 100%; }
    .deposit-copy-panel .panel-header .action-group { display: grid; grid-template-columns: 1fr; }
    .deposit-step-fields { grid-template-columns: 1fr; padding: 9px; }
    .deposit-field-span-2, .deposit-field-span-3, .deposit-field-span-4, .deposit-field-span-6 { grid-column: 1; }
    .deposit-step-fields .copy-description-tall { min-height: 132px; }
    .deposit-last-posted-field { grid-template-columns: 1fr; gap: 4px; }
    .week-switcher { justify-content: space-between; }
    .week-switcher strong { font-size: 12px; }
    .planning-commandbar > .action-group { align-items: stretch; flex-direction: column; }
    .planning-commandbar form, .planning-commandbar form select, .planning-commandbar form .custom-select, .planning-commandbar .btn { width: 100%; }
    .guest-card > .brand-centered { min-height: 185px; padding: 24px; grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .guest-logo { width: 205px; }
    .guest-brand-copy strong { display: none; }
    .guest-heading { padding-top: 28px; }
    .guest-heading h1 { font-size: 24px; }
    .app-dialog { width: calc(100vw - 16px); }
    .dialog-header, .dialog-panel { padding: 16px; }
    .message-dialog-actions { align-items: stretch; flex-direction: column-reverse; }
    .message-dialog-actions .btn { width: 100%; }
    .person-picker-grid { grid-template-columns: 1fr; padding: 14px; }
    .sticky-actions { align-items: stretch; flex-direction: column-reverse; }
    .sticky-actions .btn { width: 100%; }
    .reference-editor summary { padding-inline: 14px; grid-template-columns: auto minmax(0,1fr); }
    .reference-editor summary .summary-action { grid-column: 2; }
    .city-editor-list .reference-editor summary { grid-template-columns: auto minmax(0,1fr) auto; }
    .city-editor-list .reference-editor summary small { grid-column: 2; }
    .city-editor-list .reference-editor summary .summary-action { grid-column: 3; grid-row: 1 / span 2; }
    .reference-editor-form, .reference-delete-form { padding-inline: 14px; }
}

@media (forced-colors: active) {
    select:not([multiple]) { appearance: auto; padding-right: 11px !important; background-image: none !important; }
    .checkbox-field input[type="checkbox"],
    input[type="checkbox"].table-checkbox,
    input[type="checkbox"].row-checkbox,
    input[type="checkbox"].bulk-checkbox,
    input[type="checkbox"].select-all-checkbox { appearance: auto; background-image: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
