:root {
        --ww-bg: #f8f9fa;
        --ww-surface: #ffffff;
        --ww-surface-soft: #f3f4f5;
        --ww-surface-muted: #edeeef;
        --ww-border: #e1e3e4;
        --ww-border-warm: #dac2b1;
        --ww-text: #191c1d;
        --ww-muted: #6f7477;
        --ww-soft-text: #544337;
        --ww-sidebar: #2e3132;
        --ww-sidebar-text: #cec5bc;
        --ww-primary: #ff9d42;
        --ww-primary-strong: #904d00;
        --ww-primary-soft: #ffdcc2;
        --ww-primary-text: #6c3900;
        --ww-green: #15803d;
        --ww-green-soft: #f0fdf4;
        --ww-green-border: #bbf7d0;
        --ww-yellow: #b45309;
        --ww-yellow-soft: #fffbeb;
        --ww-yellow-border: #fef3c7;
        --ww-red: #ba1a1a;
        --ww-red-soft: #fef2f2;
        --ww-red-border: #fecaca;
        --ww-blue: #2563eb;
        --ww-blue-soft: #eff6ff;
        --ww-radius: 14px;
        --ww-radius-sm: 10px;
        --ww-shadow: 0 4px 20px rgba(15, 23, 42, .035);
        --ww-sidebar-width: 260px;
    }

    * { box-sizing: border-box; }

    body.app-shell-body {
        margin: 0;
        min-height: 100vh;
        background: var(--ww-bg);
        color: var(--ww-text);
        font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: 14px;
        line-height: 1.45;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
    }

    a { color: inherit; text-decoration: none; }
    button, input, select, textarea { font: inherit; }

    .material-symbols-outlined,
    .ui-icon {
        font-family: 'Material Symbols Outlined';
        font-weight: normal;
        font-style: normal;
        font-size: 22px;
        line-height: 1;
        letter-spacing: normal;
        text-transform: none;
        display: inline-block;
        white-space: nowrap;
        word-wrap: normal;
        direction: ltr;
        -webkit-font-feature-settings: 'liga';
        -webkit-font-smoothing: antialiased;
        font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
    }

    .app-shell {
        display: flex;
        min-height: 100vh;
        width: 100%;
        overflow: hidden;
        background: var(--ww-bg);
    }

    .app-main {
        flex: 1;
        min-width: 0;
        height: 100vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .app-content {
        flex: 1;
        overflow-y: auto;
        padding: 32px;
        background:
            radial-gradient(circle at 100% 0%, rgba(255, 157, 66, .06), transparent 28%),
            linear-gradient(180deg, #f8f9fa 0%, #f7f8f9 100%);
    }

    .app-content::-webkit-scrollbar,
    .table-responsive::-webkit-scrollbar,
    .sidebar-nav::-webkit-scrollbar { width: 7px; height: 7px; }
    .app-content::-webkit-scrollbar-track,
    .table-responsive::-webkit-scrollbar-track,
    .sidebar-nav::-webkit-scrollbar-track { background: transparent; }
    .app-content::-webkit-scrollbar-thumb,
    .table-responsive::-webkit-scrollbar-thumb,
    .sidebar-nav::-webkit-scrollbar-thumb { background: #d6d9dc; border-radius: 999px; }

    /* Sidebar */
    .app-sidebar {
        width: var(--ww-sidebar-width);
        flex: 0 0 var(--ww-sidebar-width);
        height: 100vh;
        position: sticky;
        top: 0;
        display: flex;
        flex-direction: column;
        background: var(--ww-sidebar);
        color: var(--ww-sidebar-text);
        border-right: 1px solid rgba(255,255,255,.08);
        z-index: 50;
    }

    .app-brand { padding: 24px 24px 18px; }
    .app-brand__link { display: flex; align-items: center; gap: 12px; }
    .app-brand__mark {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--ww-primary);
        color: var(--ww-primary-text);
        font-weight: 800;
        box-shadow: 0 8px 20px rgba(255,157,66,.16);
    }
    .app-brand__title { display: block; color: var(--ww-primary); font-size: 22px; line-height: 1; font-weight: 800; letter-spacing: -.04em; }
    .app-brand__subtitle { display: block; margin-top: 4px; font-size: 11px; color: var(--ww-sidebar-text); font-weight: 600; letter-spacing: .02em; }

    .sidebar-nav {
        flex: 1;
        overflow-y: auto;
        padding: 10px 0 18px;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }
    .sidebar-heading { margin: 18px 20px 8px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: rgba(206,197,188,.58); }
    .sidebar-link {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 42px;
        padding: 11px 18px;
        border-left: 4px solid transparent;
        color: var(--ww-sidebar-text);
        transition: background .18s ease, color .18s ease, border-color .18s ease;
        font-weight: 650;
        font-size: 13px;
    }
    .sidebar-link:hover { color: #fff; background: rgba(255,255,255,.055); }
    .sidebar-link.is-active {
        color: var(--ww-primary);
        background: rgba(255, 157, 66, .10);
        border-left-color: var(--ww-primary);
    }
    .sidebar-link__icon { width: 22px; font-size: 21px; opacity: .92; }
    .sidebar-user {
        padding: 18px 22px;
        border-top: 1px solid rgba(255,255,255,.10);
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .sidebar-user__avatar { width: 34px; height: 34px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); color: #fff; }
    .sidebar-user__name { color: #fff; font-weight: 700; font-size: 13px; }
    .sidebar-user__role { color: var(--ww-sidebar-text); font-size: 11px; margin-top: 2px; }

    /* Topbar */
    .topbar {
        height: 66px;
        min-height: 66px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 32px;
        border-bottom: 1px solid var(--ww-border);
        background: rgba(248, 249, 250, .88);
        backdrop-filter: blur(12px);
    }
    .topbar__search {
        width: min(420px, 45vw);
        height: 42px;
        border: 1px solid var(--ww-border);
        background: var(--ww-surface-soft);
        border-radius: 999px;
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 0 15px;
        color: var(--ww-muted);
        transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
    }
    .topbar__search:focus-within { border-color: var(--ww-primary); box-shadow: 0 0 0 4px rgba(255,157,66,.11); background: #fff; }
    .topbar__search input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--ww-text); font-size: 13px; }
    .topbar__actions { display: flex; align-items: center; gap: 10px; }
    .topbar__icon-button {
        width: 36px;
        height: 36px;
        border: 0;
        background: transparent;
        color: var(--ww-primary-strong);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        cursor: pointer;
    }
    .topbar__icon-button:hover { background: var(--ww-surface-soft); }
    .topbar__avatar { width: 34px; height: 34px; border: 1px solid var(--ww-border); border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--ww-surface-muted); color: var(--ww-muted); }

    .page-head {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 24px;
        margin-bottom: 28px;
    }
    .page-head__eyebrow { margin: 0 0 5px; color: var(--ww-primary-strong); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
    .page-head__title { margin: 0; font-size: clamp(27px, 3vw, 34px); line-height: 1.18; letter-spacing: -.035em; font-weight: 760; color: var(--ww-text); }
    .page-head__subtitle { margin: 6px 0 0; color: var(--ww-muted); font-size: 15px; }
    .page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

    /* Generic UI */
    .button, button.button, a.button {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border-radius: 10px;
        padding: 9px 14px;
        border: 1px solid transparent;
        cursor: pointer;
        font-weight: 700;
        font-size: 12px;
        transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
    }
    .button:hover { transform: translateY(-1px); }
    .button--primary { background: var(--ww-primary); color: var(--ww-primary-text); box-shadow: 0 8px 20px rgba(255,157,66,.15); }
    .button--primary:hover { background: #ff8d26; }
    .button--ghost { background: #fff; color: var(--ww-primary-strong); border-color: var(--ww-border); }
    .button--ghost:hover { background: var(--ww-surface-soft); border-color: var(--ww-border-warm); }
    .button--tiny { min-height: 30px; padding: 6px 9px; border-radius: 8px; font-size: 11px; }
    .button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

    .panel {
        border: 1px solid var(--ww-border);
        border-radius: var(--ww-radius);
        background: var(--ww-surface);
        box-shadow: var(--ww-shadow);
        padding: 22px;
    }
    .panel--flat { box-shadow: none; }
    .panel__header { margin-bottom: 18px; }
    .panel__header--space-between { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
    .panel__eyebrow { margin: 0 0 6px; font-size: 11px; color: var(--ww-primary-strong); font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
    .panel__title { margin: 0; color: var(--ww-text); font-size: 24px; line-height: 1.2; letter-spacing: -.02em; font-weight: 760; }
    .panel__text { margin: 7px 0 0; color: var(--ww-muted); }
    .panel__section-title { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; }

    .status-badge, .text-badge {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        border-radius: 999px;
        padding: 5px 10px;
        border: 1px solid var(--ww-border);
        background: var(--ww-surface-soft);
        color: var(--ww-muted);
        font-size: 12px;
        font-weight: 760;
        white-space: nowrap;
    }
    .status-badge::before, .text-badge::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; opacity: .9; }
    .status-badge--draft, .status-badge--ready_for_ai, .status-badge--ai_generated { background: var(--ww-yellow-soft); color: var(--ww-yellow); border-color: var(--ww-yellow-border); }
    .status-badge--ai_processing, .status-badge--publishing, .status-badge--review_pending, .status-badge--ready_to_publish { background: var(--ww-blue-soft); color: var(--ww-blue); border-color: #bfdbfe; }
    .status-badge--approved, .status-badge--published, .status-badge--active { background: var(--ww-green-soft); color: var(--ww-green); border-color: var(--ww-green-border); }
    .status-badge--error, .status-badge--changes_requested { background: var(--ww-red-soft); color: #b91c1c; border-color: var(--ww-red-border); }
    .status-badge--archived, .status-badge--none, .status-badge--soft { background: var(--ww-surface-soft); color: var(--ww-muted); border-color: var(--ww-border); }
    .text-badge--success { background: var(--ww-green-soft); color: var(--ww-green); border-color: var(--ww-green-border); }
    .text-badge--warning { background: var(--ww-yellow-soft); color: var(--ww-yellow); border-color: var(--ww-yellow-border); }
    .text-badge--muted { background: var(--ww-surface-soft); color: var(--ww-muted); }

    .form-label { display: block; margin-bottom: 6px; color: var(--ww-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .065em; }
    .form-control, input.form-control, select.form-control, textarea.form-control {
        width: 100%;
        min-height: 40px;
        border: 1px solid var(--ww-border);
        border-radius: 10px;
        background: #fff;
        color: var(--ww-text);
        padding: 9px 11px;
        outline: 0;
        transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    }
    .form-control:focus { border-color: var(--ww-primary); box-shadow: 0 0 0 4px rgba(255,157,66,.12); }

    /* Dashboard */
    .dashboard-kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; margin-bottom: 30px; }
    .kpi-card {
        min-height: 120px;
        padding: 18px;
        border: 1px solid var(--ww-border);
        background: #fff;
        border-radius: var(--ww-radius);
        box-shadow: var(--ww-shadow);
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .kpi-card--accent { border-color: var(--ww-primary-soft); box-shadow: 0 4px 20px rgba(255,157,66,.08); }
    .kpi-card--success { border-color: var(--ww-green-border); }
    .kpi-card--danger { border-color: var(--ww-red-border); }
    .kpi-card__decor { position: absolute; right: -22px; top: -28px; width: 90px; height: 90px; border-radius: 0 0 0 999px; background: rgba(255,157,66,.13); }
    .kpi-card--success .kpi-card__decor { background: rgba(21,128,61,.08); }
    .kpi-card--danger .kpi-card__decor { background: rgba(186,26,26,.08); }
    .kpi-card__top { display: flex; justify-content: space-between; gap: 10px; position: relative; z-index: 1; }
    .kpi-card__label { font-size: 10px; line-height: 1.25; color: var(--ww-muted); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
    .kpi-card__icon { color: #b5a79c; font-size: 20px; }
    .kpi-card__value { position: relative; z-index: 1; color: var(--ww-text); font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
    .kpi-card--accent .kpi-card__value, .kpi-card--accent .kpi-card__icon { color: var(--ww-primary); }
    .kpi-card--success .kpi-card__value, .kpi-card--success .kpi-card__icon { color: var(--ww-green); }
    .kpi-card--danger .kpi-card__value, .kpi-card--danger .kpi-card__icon { color: var(--ww-red); }

    .dashboard-main-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 22px; }
    .dashboard-card { background: #fff; border: 1px solid var(--ww-border); border-radius: var(--ww-radius); overflow: hidden; box-shadow: var(--ww-shadow); }
    .dashboard-card__head { padding: 18px 20px; border-bottom: 1px solid var(--ww-border); display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #fff; }
    .dashboard-card__title { margin: 0; font-size: 18px; letter-spacing: -.02em; }
    .dashboard-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }

    .mini-project-list { width: 100%; border-collapse: collapse; }
    .mini-project-list th { padding: 13px 14px; text-align: left; color: var(--ww-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; background: var(--ww-surface-soft); border-bottom: 1px solid var(--ww-border); }
    .mini-project-list td { padding: 13px 14px; border-bottom: 1px solid var(--ww-border); vertical-align: middle; }
    .mini-project-list tr:hover td { background: #fffaf5; }
    .mini-project-list tr:last-child td { border-bottom: 0; }
    .mini-thumb { width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--ww-border); background: var(--ww-surface-muted); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; color: #a9abad; font-weight: 800; }
    .mini-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .mini-project-title { font-weight: 800; max-width: 260px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .mini-project-symbol { margin-top: 3px; color: var(--ww-muted); font-size: 12px; }
    .error-list { padding: 14px; display: grid; gap: 12px; }
    .error-card { border: 1px solid var(--ww-border); border-radius: 12px; background: #fff; padding: 14px; transition: border-color .15s ease; }
    .error-card:hover { border-color: rgba(186,26,26,.35); }
    .error-card__meta { display: flex; justify-content: space-between; color: var(--ww-muted); font-size: 11px; margin-bottom: 8px; }
    .error-card__title { font-weight: 800; font-size: 13px; margin-bottom: 4px; }
    .error-card__text { color: var(--ww-muted); font-size: 12px; }
    .dashboard-card__footer { padding: 14px; text-align: center; border-top: 1px solid var(--ww-border); background: #fff; }

    /* Catalog */
    .panel--catalog { padding: 0; overflow: hidden; }
    .catalog-head { padding: 24px; border-bottom: 1px solid var(--ww-border); display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; background: rgba(255,255,255,.66); }
    .catalog-toolbar { margin: 0; padding: 18px 20px; border-bottom: 1px solid var(--ww-border); background: #fff; display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
    .catalog-toolbar__grid { flex: 1; min-width: 280px; display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(130px, .8fr)); gap: 12px; align-items: end; }
    .catalog-toolbar__actions { display: flex; gap: 8px; align-items: center; }
    .catalog-toolbar .form-label { display: none; }
    .catalog-toolbar .form-control { background: var(--ww-surface-soft); }
    .catalog-toolbar .form-control:focus { background: #fff; }

    .table-card { background: #fff; }
    .table-responsive { overflow-x: auto; }
    .data-table { width: 100%; border-collapse: collapse; }
    .data-table th {
        padding: 14px 16px;
        border-bottom: 1px solid var(--ww-border);
        background: var(--ww-surface-soft);
        color: var(--ww-muted);
        font-size: 10px;
        text-align: left;
        text-transform: uppercase;
        letter-spacing: .08em;
        font-weight: 850;
        white-space: nowrap;
    }
    .data-table td { padding: 15px 16px; border-bottom: 1px solid var(--ww-border); vertical-align: middle; }
    .data-table tr:hover td { background: #fffaf5; }
    .data-table tr:last-child td { border-bottom: 0; }
    .data-table--projects { min-width: 1160px; }
    .data-table--projects th:last-child, .data-table--projects td:last-child { text-align: right; }
    .data-table__row--project strong { letter-spacing: -.01em; }

    .project-thumb {
        width: 52px;
        height: 52px;
        border: 1px solid var(--ww-border);
        border-radius: 11px;
        background: var(--ww-surface-muted);
        object-fit: cover;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        color: #9ca3af;
        font-weight: 800;
    }
    .project-thumb--placeholder { background: linear-gradient(145deg, #f0f1f2, #e5e7eb); }
    .project-name-cell { min-width: 270px; }
    .project-name-cell__title { color: var(--ww-text); font-size: 14px; font-weight: 850; display: inline-block; max-width: 320px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; vertical-align: bottom; }
    .project-name-cell__title:hover { color: var(--ww-primary-strong); }
    .project-name-cell__meta { margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--ww-muted); font-size: 11px; }
    .project-type-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ww-border); background: var(--ww-surface-soft); border-radius: 8px; padding: 5px 9px; font-weight: 700; color: var(--ww-soft-text); white-space: nowrap; }
    .mono-badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 7px; background: var(--ww-surface-soft); color: var(--ww-muted); font-size: 11px; font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
    .table-actions { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
    .icon-action { width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent; color: var(--ww-muted); display: inline-flex; align-items: center; justify-content: center; }
    .icon-action:hover { background: var(--ww-surface-soft); color: var(--ww-text); }

    .project-integrations { display: inline-flex; gap: 12px; align-items: center; white-space: nowrap; }
    .integration-state { display: inline-flex; align-items: center; gap: 5px; color: var(--ww-muted); font-size: 12px; font-weight: 700; }
    .integration-state__icon { width: 15px; height: 15px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ww-border); background: #fff; }
    .integration-state--ok .integration-state__icon { background: var(--ww-green); border-color: var(--ww-green); color: #fff; }
    .integration-state--pending .integration-state__icon { border-color: var(--ww-yellow-border); background: var(--ww-yellow-soft); color: var(--ww-yellow); }
    .integration-state--error .integration-state__icon { background: var(--ww-red); border-color: var(--ww-red); color: #fff; }

    /* Platform micro-table */
    .channel-lines { min-width: 240px; display: grid; gap: 6px; color: var(--ww-muted); }
    .channel-lines__head { font-size: 10px; font-weight: 850; color: var(--ww-soft-text); text-transform: uppercase; letter-spacing: .06em; }
    .channel-lines__rows { display: grid; gap: 5px; }
    .channel-line {
        display: grid;
        grid-template-columns: minmax(88px, 1fr) auto;
        gap: 8px;
        align-items: center;
    }
    .channel-line__platform { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 760; color: var(--ww-text); }
    .channel-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border-radius: 999px;
        padding: 4px 8px;
        border: 1px solid var(--ww-border);
        background: var(--ww-surface-soft);
        color: var(--ww-muted);
        font-size: 11px;
        font-weight: 800;
    }
    .channel-dot, .channel-spinner { width: 9px; height: 9px; border-radius: 999px; flex: 0 0 auto; }
    .channel-dot--green { background: var(--ww-green); box-shadow: 0 0 0 3px rgba(21,128,61,.10); }
    .channel-dot--red { background: var(--ww-red); box-shadow: 0 0 0 3px rgba(186,26,26,.10); }
    .channel-dot--gray { background: #b7bbc0; }
    .channel-spinner { border: 2px solid var(--ww-yellow-border); border-top-color: var(--ww-yellow); animation: wwSpin .78s linear infinite; }
    .channel-pill--published, .channel-pill--active { background: var(--ww-green-soft); border-color: var(--ww-green-border); color: var(--ww-green); }
    .channel-pill--progress { background: var(--ww-yellow-soft); border-color: var(--ww-yellow-border); color: var(--ww-yellow); }
    .channel-pill--error { background: var(--ww-red-soft); border-color: var(--ww-red-border); color: #b91c1c; }
    .channel-lines__more { margin-top: 3px; }
    .channel-lines__more summary { cursor: pointer; color: var(--ww-muted); font-size: 11px; font-weight: 750; }
    .channel-lines__hidden { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; }
    .channel-lines__hidden span { border-radius: 999px; background: var(--ww-surface-soft); border: 1px solid var(--ww-border); padding: 3px 7px; font-size: 10px; color: var(--ww-muted); }
    @keyframes wwSpin { to { transform: rotate(360deg); } }

    .pagination-bar { padding: 16px 20px; border-top: 1px solid var(--ww-border); background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
    .pagination-bar__summary { color: var(--ww-muted); }
    .pagination { display: flex; align-items: center; gap: 6px; }
    .pagination__link, .pagination__dots { min-width: 34px; min-height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; color: var(--ww-muted); border: 1px solid var(--ww-border); background: #fff; }
    .pagination__link.is-active { background: var(--ww-primary); color: var(--ww-primary-text); border-color: var(--ww-primary); font-weight: 800; }
    .pagination__link.is-disabled { pointer-events: none; opacity: .45; }

    .empty-state { padding: 36px; display: grid; gap: 5px; color: var(--ww-muted); text-align: center; }
    .text-muted { color: var(--ww-muted); }
    .flash-stack { margin-bottom: 16px; }
    .flash { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ww-border); background: #fff; margin-bottom: 8px; font-weight: 700; }
    .flash--success { background: var(--ww-green-soft); color: var(--ww-green); border-color: var(--ww-green-border); }
    .flash--error, .flash--danger { background: var(--ww-red-soft); color: var(--ww-red); border-color: var(--ww-red-border); }
    .flash--warning { background: var(--ww-yellow-soft); color: var(--ww-yellow); border-color: var(--ww-yellow-border); }

    @media (max-width: 1180px) {
        .dashboard-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .dashboard-main-grid { grid-template-columns: 1fr; }
        .catalog-toolbar__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 860px) {
        .app-shell { display: block; overflow: visible; }
        .app-sidebar { width: 100%; height: auto; min-height: auto; position: relative; flex: none; }
        .sidebar-nav { max-height: 320px; }
        .app-main { height: auto; min-height: 100vh; overflow: visible; }
        .topbar { padding: 12px 16px; height: auto; min-height: 60px; }
        .topbar__search { width: 100%; }
        .topbar__actions { display: none; }
        .app-content { padding: 20px 16px; }
        .page-head, .catalog-head, .panel__header--space-between { align-items: flex-start; flex-direction: column; }
        .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .catalog-toolbar__grid { grid-template-columns: 1fr; }
        .pagination-bar { align-items: flex-start; flex-direction: column; }
    }
    @media (max-width: 560px) {
        .dashboard-kpi-grid { grid-template-columns: 1fr; }
        .page-head__actions, .button-row { width: 100%; }
        .page-head__actions .button, .button-row .button { flex: 1; }
    }

/* Project detail / tab workspace refresh */
.project-detail-shell {
    display: grid;
    gap: 20px;
}

.project-hero {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) minmax(280px, .65fr);
    gap: 22px;
    align-items: stretch;
    padding: 24px;
    border: 1px solid var(--ww-border);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(255, 157, 66, .12), transparent 30%),
        #fff;
    box-shadow: var(--ww-shadow);
}

.project-hero__media {
    width: 112px;
    height: 112px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--ww-border);
    background: var(--ww-surface-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a4a9ad;
    font-weight: 900;
    font-size: 26px;
}

.project-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-hero__title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.project-hero__title {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.05;
    letter-spacing: -.045em;
    font-weight: 820;
}

.project-hero__subtitle {
    margin: 8px 0 0;
    color: var(--ww-muted);
    max-width: 760px;
}

.project-hero__badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.project-hero__actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.project-hero__side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
}

.project-health-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.project-health-card {
    border: 1px solid var(--ww-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .74);
    padding: 12px;
}

.project-health-card span {
    display: block;
    color: var(--ww-muted);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.project-health-card strong {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    line-height: 1.25;
    color: var(--ww-text);
}

.project-tabs-shell {
    border: 1px solid var(--ww-border);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--ww-shadow);
}

.project-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px;
    border-bottom: 1px solid var(--ww-border);
    background: rgba(243, 244, 245, .78);
    overflow-x: auto;
}

.project-tabs__button {
    min-height: 40px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ww-muted);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 820;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.project-tabs__button:hover {
    color: var(--ww-text);
    background: #fff;
}

.project-tabs__button.is-active {
    background: #fff;
    border-color: var(--ww-border-warm);
    color: var(--ww-primary-strong);
    box-shadow: 0 6px 18px rgba(255, 157, 66, .08);
}

.project-tabs__button .ui-icon,
.project-tabs__button .material-symbols-outlined {
    font-size: 19px;
}

.project-tab-content {
    position: relative;
}

.project-tab-panel {
    padding: 24px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
}

.project-tab-panel[hidden] {
    display: none !important;
}

.project-tab-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
    gap: 20px;
    align-items: start;
}

.project-tab-grid--even {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
    border: 1px solid var(--ww-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 3px 16px rgba(15, 23, 42, .025);
    overflow: hidden;
}

.project-card__head {
    padding: 18px 20px;
    border-bottom: 1px solid var(--ww-border);
    background: linear-gradient(180deg, #fff 0%, rgba(248, 249, 250, .78) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.project-card__title {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: -.02em;
    font-weight: 820;
}

.project-card__text {
    margin: 5px 0 0;
    color: var(--ww-muted);
    font-size: 13px;
}

.project-card__body {
    padding: 20px;
}

.project-card__body--soft {
    background: var(--ww-surface-soft);
}

.project-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.project-info-item {
    min-width: 0;
    border: 1px solid var(--ww-border);
    background: var(--ww-surface-soft);
    border-radius: 12px;
    padding: 12px 13px;
}

.project-info-item span {
    display: block;
    color: var(--ww-muted);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.project-info-item strong {
    display: block;
    margin-top: 5px;
    color: var(--ww-text);
    overflow-wrap: anywhere;
}

.project-copy-box {
    border: 1px solid var(--ww-border);
    border-radius: 14px;
    background: #fff;
    padding: 15px;
    color: var(--ww-soft-text);
    white-space: pre-wrap;
    min-height: 70px;
}

.project-next-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.project-action-card {
    border: 1px solid var(--ww-border);
    border-radius: 14px;
    background: #fff;
    padding: 14px;
    display: flex;
    gap: 11px;
    align-items: flex-start;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.project-action-card:hover {
    border-color: var(--ww-border-warm);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.project-action-card__icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--ww-primary-soft);
    color: var(--ww-primary-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.project-action-card strong {
    display: block;
    font-size: 13px;
    line-height: 1.2;
}

.project-action-card span {
    display: block;
    margin-top: 4px;
    color: var(--ww-muted);
    font-size: 12px;
}

.channel-status-board {
    display: grid;
    gap: 10px;
}

.channel-status-row {
    display: grid;
    grid-template-columns: minmax(120px, .9fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--ww-border);
    border-radius: 13px;
    background: #fff;
    padding: 12px;
}

.channel-status-row__platform {
    font-weight: 850;
}

.channel-status-row__meta {
    color: var(--ww-muted);
    font-size: 12px;
}

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

.channel-intent-row {
    display: grid;
    grid-template-columns: minmax(140px, .6fr) minmax(0, 1fr) minmax(180px, .7fr);
    gap: 12px;
    align-items: center;
    border: 1px solid var(--ww-border);
    border-radius: 14px;
    padding: 14px;
    background: #fff;
}

.channel-intent-row__title {
    font-weight: 850;
}

.channel-intent-row__status {
    color: var(--ww-muted);
    font-size: 12px;
}

.drive-map-grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 20px;
}

.drive-path-builder {
    border: 1px solid var(--ww-border-warm);
    border-radius: 16px;
    background: linear-gradient(135deg, #fffaf5, #fff);
    padding: 16px;
}

.drive-path-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    color: var(--ww-muted);
    font-size: 12px;
}

.drive-path-segment {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--ww-border);
    background: #fff;
    color: var(--ww-text);
    padding: 5px 9px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    font-weight: 760;
}

.drive-rules-list {
    display: grid;
    gap: 10px;
}

.drive-rule-card {
    border: 1px solid var(--ww-border);
    border-radius: 14px;
    padding: 14px;
    background: #fff;
}

.drive-rule-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.drive-rule-card__pattern {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 800;
    color: var(--ww-text);
}

.drive-rule-card__meta {
    margin-top: 7px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.drive-assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.drive-asset-card {
    border: 1px solid var(--ww-border);
    border-radius: 15px;
    background: #fff;
    overflow: hidden;
}

.drive-asset-card__thumb {
    aspect-ratio: 1 / .72;
    background: var(--ww-surface-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a5abb0;
    overflow: hidden;
}

.drive-asset-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.drive-asset-card__body {
    padding: 11px;
}

.drive-asset-card__name {
    font-size: 12px;
    font-weight: 850;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.drive-asset-card__meta {
    margin-top: 5px;
    color: var(--ww-muted);
    font-size: 11px;
    display: grid;
    gap: 2px;
}

.drive-asset-card__actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 9px;
}

.ai-draft-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
    gap: 20px;
    align-items: start;
}

.ai-status-matrix {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ai-status-card {
    border: 1px solid var(--ww-border);
    border-radius: 14px;
    background: #fff;
    padding: 15px;
}

.ai-status-card span {
    color: var(--ww-muted);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ai-status-card strong {
    display: block;
    margin-top: 7px;
    font-size: 18px;
}

.audit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
    gap: 20px;
    align-items: start;
}

.timeline-list {
    position: relative;
    display: grid;
    gap: 12px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
}

.timeline-item__dot {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--ww-border);
    background: var(--ww-surface-soft);
    color: var(--ww-primary-strong);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-item__box {
    border: 1px solid var(--ww-border);
    border-radius: 14px;
    background: #fff;
    padding: 13px 14px;
}

.timeline-item__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--ww-muted);
    font-size: 11px;
    margin-bottom: 5px;
}

.timeline-item__title {
    font-weight: 850;
}

.timeline-item__text {
    color: var(--ww-muted);
    font-size: 12px;
    margin-top: 4px;
}

.api-log-list {
    display: grid;
    gap: 10px;
}

.api-log-card {
    border: 1px solid var(--ww-border);
    border-radius: 14px;
    background: #fff;
    padding: 13px;
}

.api-log-card--error {
    border-color: var(--ww-red-border);
    background: var(--ww-red-soft);
}

.api-log-card--success {
    border-color: var(--ww-green-border);
    background: var(--ww-green-soft);
}

.api-log-card__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-weight: 850;
    font-size: 12px;
}

.api-log-card__meta {
    margin-top: 6px;
    color: var(--ww-muted);
    font-size: 11px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.api-log-card__details {
    margin-top: 8px;
    max-height: 170px;
    overflow: auto;
    border-radius: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, .76);
    border: 1px solid rgba(0, 0, 0, .045);
    color: var(--ww-soft-text);
    white-space: pre-wrap;
    font-size: 11px;
}

.tab-empty-state {
    border: 1px dashed var(--ww-border-warm);
    border-radius: 16px;
    background: #fffaf5;
    padding: 24px;
    color: var(--ww-muted);
    text-align: center;
}

.ajax-flash {
    position: fixed;
    z-index: 9999;
    top: 18px;
    right: 18px;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 36px));
}

.ajax-flash__item {
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid var(--ww-border);
    background: #fff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .12);
    font-weight: 750;
    transform: translateY(0);
    opacity: 1;
    transition: opacity .22s ease, transform .22s ease;
}

.ajax-flash__item--success { border-color: var(--ww-green-border); color: var(--ww-green); background: var(--ww-green-soft); }
.ajax-flash__item--error { border-color: var(--ww-red-border); color: var(--ww-red); background: var(--ww-red-soft); }
.ajax-flash__item--warning { border-color: var(--ww-yellow-border); color: var(--ww-yellow); background: var(--ww-yellow-soft); }
.ajax-flash__item.is-hiding { opacity: 0; transform: translateY(-6px); }

.is-loading {
    opacity: .72;
    pointer-events: none;
}

@media (max-width: 1280px) {
    .project-hero { grid-template-columns: 92px minmax(0, 1fr); }
    .project-hero__side { grid-column: 1 / -1; }
    .project-tab-grid,
    .project-tab-grid--even,
    .drive-map-grid,
    .ai-draft-layout,
    .audit-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .project-hero { grid-template-columns: 1fr; }
    .project-hero__media { width: 96px; height: 96px; }
    .project-health-grid,
    .project-info-grid,
    .project-next-actions,
    .ai-status-matrix { grid-template-columns: 1fr; }
    .channel-status-row,
    .channel-intent-row { grid-template-columns: 1fr; }
    .project-tab-panel { padding: 16px; }
}

/* Sidebar dropdown refresh */
.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sidebar-section__label {
    margin: 10px 20px 8px;
    display: block;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .13em;
    line-height: 1.2;
    text-transform: uppercase;
    color: rgba(206, 197, 188, .55);
}
.sidebar-group {
    margin: 0;
    border: 0;
}
.sidebar-group[open] {
    background: rgba(255, 255, 255, .025);
}
.sidebar-group__summary {
    min-height: 42px;
    padding: 11px 14px 11px 18px;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ww-sidebar-text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.sidebar-group__summary::-webkit-details-marker { display: none; }
.sidebar-group__summary::marker { content: ''; }
.sidebar-group__summary:hover {
    color: #fff;
    background: rgba(255, 255, 255, .055);
}
.sidebar-group.is-active > .sidebar-group__summary {
    color: var(--ww-primary);
    background: rgba(255, 157, 66, .10);
    border-left-color: var(--ww-primary);
}
.sidebar-group__chevron {
    margin-left: auto;
    width: 18px;
    font-size: 18px;
    opacity: .66;
    transition: transform .18s ease, opacity .18s ease;
}
.sidebar-group[open] > .sidebar-group__summary .sidebar-group__chevron {
    transform: rotate(180deg);
    opacity: .92;
}
.sidebar-subnav {
    display: grid;
    gap: 2px;
    padding: 5px 10px 9px 44px;
    position: relative;
}
.sidebar-subnav::before {
    content: '';
    position: absolute;
    left: 31px;
    top: 8px;
    bottom: 12px;
    width: 1px;
    background: rgba(206, 197, 188, .20);
}
.sidebar-subnav__link {
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(206, 197, 188, .78);
    font-size: 12px;
    font-weight: 700;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.sidebar-subnav__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .055);
    transform: translateX(1px);
}
.sidebar-subnav__link.is-active {
    color: var(--ww-primary);
    background: rgba(255, 157, 66, .115);
}
.sidebar-subnav__icon {
    width: 17px;
    font-size: 17px;
    opacity: .80;
}
.sidebar-subnav__label {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.sidebar-user__meta {
    min-width: 0;
    display: grid;
    gap: 1px;
}
@media (max-width: 860px) {
    .sidebar-section__label { margin-left: 18px; }
    .sidebar-subnav {
        padding-left: 42px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sidebar-subnav::before { display: none; }
}
@media (max-width: 560px) {
    .sidebar-subnav { grid-template-columns: 1fr; }
}

/* ==========================================================
   Project create/edit modal + form styles merged back after
   project detail/sidebar refresh.
   ========================================================== */
body.modal-open,
body.has-modal-open { overflow: hidden; }
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(25, 28, 29, .42);
    backdrop-filter: blur(10px);
}
.modal.is-open,
.modal[data-open-on-load="1"] { display: flex; }
.modal__dialog {
    width: min(720px, 100%);
    max-height: min(90vh, 860px);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.45);
    background: var(--ww-surface);
    box-shadow: 0 30px 90px rgba(15, 23, 42, .22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal__dialog--wide { width: min(1040px, 100%); }
.modal__header {
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--ww-border);
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 157, 66, .14), transparent 30%),
        #fff;
}
.modal__eyebrow { margin: 0 0 5px; color: var(--ww-primary-strong); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .09em; }
.modal__title { margin: 0; color: var(--ww-text); font-size: 22px; line-height: 1.2; font-weight: 820; letter-spacing: -.025em; }
.modal__subtitle { margin: 6px 0 0; color: var(--ww-muted); font-size: 13px; }
.modal__close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--ww-border);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--ww-muted);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}
.modal__close:hover { border-color: var(--ww-border-warm); color: var(--ww-text); background: var(--ww-surface-soft); }
.modal__body { padding: 24px; overflow: auto; }
.modal__body::-webkit-scrollbar { width: 7px; height: 7px; }
.modal__body::-webkit-scrollbar-track { background: transparent; }
.modal__body::-webkit-scrollbar-thumb { background: #d6d9dc; border-radius: 999px; }
.modal__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--ww-border);
    background: rgba(248,249,250,.92);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}
.project-form-head { margin-bottom: 24px; }
.project-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}
.project-form-panel { padding: 0; overflow: hidden; }
.project-form-panel__header { padding: 24px 26px; border-bottom: 1px solid var(--ww-border); margin: 0; background: #fff; }
.project-editor-aside { display: grid; gap: 16px; position: sticky; top: 22px; }
.project-help-card { padding: 20px; }
.project-help-card--soft { background: linear-gradient(180deg, #fff, var(--ww-surface-soft)); }
.project-help-card strong { color: var(--ww-primary-strong); }
.stack-form { display: grid; gap: 18px; }
.project-form { padding: 24px 26px 26px; }
.modal .project-form { padding: 0; }
.form-section {
    border: 1px solid var(--ww-border);
    border-radius: 16px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(15,23,42,.018);
}
.modal .form-section { box-shadow: none; }
.form-section__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ww-border);
}
.form-section__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ww-primary-soft);
    color: var(--ww-primary-strong);
    flex: 0 0 auto;
}
.form-section__title { margin: 0; font-size: 16px; line-height: 1.25; font-weight: 820; letter-spacing: -.02em; }
.form-section__text { margin: 4px 0 0; color: var(--ww-muted); font-size: 12px; }
.form-grid { display: grid; gap: 14px; }
.form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack-form > div:not(.form-section):not(.form-grid):not(.form-actions):not(.project-channel-picker):not(.form-upload-card),
.stack-form .form-grid > div,
.form-section > div:not(.form-section__head):not(.form-grid):not(.project-channel-picker):not(.form-upload-card) { min-width: 0; }
.stack-form label,
.form-upload-card label,
.project-channel-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ww-soft-text);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .065em;
    text-transform: uppercase;
}
.stack-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.stack-form select,
.stack-form textarea,
.stack-form .form-control {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--ww-border);
    border-radius: 11px;
    background: #fff;
    color: var(--ww-text);
    padding: 10px 12px;
    outline: 0;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.stack-form textarea { min-height: 92px; resize: vertical; }
.stack-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.stack-form select:focus,
.stack-form textarea:focus,
.stack-form .form-control:focus {
    border-color: var(--ww-primary);
    box-shadow: 0 0 0 4px rgba(255,157,66,.12);
    background: #fff;
}
.stack-form input[type="file"] {
    width: 100%;
    border: 1px dashed var(--ww-border-warm);
    border-radius: 12px;
    background: #fffaf5;
    padding: 10px;
    color: var(--ww-muted);
    cursor: pointer;
}
.stack-form input[type="file"]::file-selector-button {
    margin-right: 10px;
    border: 0;
    border-radius: 9px;
    background: var(--ww-primary);
    color: var(--ww-primary-text);
    padding: 8px 11px;
    font-weight: 800;
    cursor: pointer;
}
.stack-form ul {
    margin: 7px 0 0;
    padding: 0;
    list-style: none;
    color: var(--ww-red);
    font-size: 12px;
    font-weight: 700;
}
.stack-form .form-hint,
.form-hint,
.file-hint {
    display: block;
    margin-top: 7px;
    color: var(--ww-muted);
    font-size: 12px;
    line-height: 1.35;
}
.form-upload-card {
    border: 1px solid var(--ww-border);
    border-radius: 14px;
    background: var(--ww-surface-soft);
    padding: 14px;
    min-width: 0;
}
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.form-actions--sticky-safe { margin-top: 2px; }
.project-channel-picker {
    margin-top: 14px;
    border: 1px solid var(--ww-border);
    border-radius: 14px;
    background: var(--ww-surface-soft);
    overflow: hidden;
}
.project-channel-picker__header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--ww-border);
    background: #fff;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}
.project-channel-picker__header strong { font-size: 14px; letter-spacing: -.01em; }
.project-channel-picker__header span { color: var(--ww-muted); font-size: 12px; text-align: right; }
.project-channel-picker__grid { padding: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.project-channel-card { border: 1px solid var(--ww-border); border-radius: 12px; background: #fff; padding: 12px; }
.project-channel-card strong { color: var(--ww-text); margin-bottom: 8px; }
.form-control--small { min-height: 36px !important; padding: 7px 9px !important; border-radius: 9px !important; font-size: 12px; }
.catalog-page-head .page-head__actions .button--primary { min-width: 154px; }
.panel--catalog + .modal:not(.is-open):not([data-open-on-load="1"]) { display: none; }
@media (max-width: 1180px) {
    .project-editor-layout { grid-template-columns: 1fr; }
    .project-editor-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .modal { padding: 12px; align-items: stretch; }
    .modal__dialog { max-height: 100%; border-radius: 16px; }
    .modal__header, .modal__body, .modal__footer { padding-left: 16px; padding-right: 16px; }
    .modal__footer { align-items: stretch; flex-direction: column-reverse; }
    .form-grid--two, .form-grid--three { grid-template-columns: 1fr; }
    .project-form { padding: 18px; }
    .project-form-panel__header { padding: 20px; }
    .project-editor-aside { grid-template-columns: 1fr; }
    .project-channel-picker__header { align-items: flex-start; flex-direction: column; }
    .project-channel-picker__header span { text-align: left; }
}

/* AI Draft review refreshed layout */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }

.button--warning {
    background: var(--ww-primary);
    color: var(--ww-primary-text);
    border-color: rgba(144, 77, 0, .12);
    box-shadow: 0 8px 20px rgba(255, 157, 66, .16);
}
.button--warning:hover { background: #ff8d26; }
.button--danger {
    background: var(--ww-red-soft);
    color: var(--ww-red);
    border-color: var(--ww-red-border);
}
.button--danger:hover { background: #fee2e2; }
.button--success {
    background: var(--ww-green);
    color: #fff;
    border-color: var(--ww-green);
}
.button--success:hover { background: #166534; }

.ai-draft-review-page {
    display: grid;
    gap: 18px;
    padding-bottom: 112px;
}

.ai-draft-back-link {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ww-muted);
    font-size: 13px;
    font-weight: 750;
    transition: color .16s ease, transform .16s ease;
}
.ai-draft-back-link:hover {
    color: var(--ww-primary-strong);
    transform: translateX(-2px);
}
.ai-draft-back-link .ui-icon { font-size: 18px; }

.ai-draft-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
    gap: 22px;
    padding: 22px;
}
.ai-draft-overview__main {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}
.ai-draft-overview__image {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    border: 1px solid var(--ww-border);
    background: var(--ww-surface-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #9ca3af;
    font-weight: 850;
}
.ai-draft-overview__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.ai-draft-overview__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f0f1f2, #e4e6e8);
}
.ai-draft-overview__content { min-width: 0; }
.ai-draft-overview__badges {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.ai-draft-overview__title {
    margin: 0;
    color: var(--ww-text);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.16;
    letter-spacing: -.035em;
    font-weight: 820;
}
.ai-draft-overview__meta {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--ww-muted);
    font-size: 13px;
}
.ai-draft-overview__meta a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ww-primary-strong);
    font-weight: 750;
}
.ai-draft-overview__meta .ui-icon { font-size: 15px; }
.ai-draft-overview__side {
    justify-self: end;
    text-align: right;
    color: var(--ww-muted);
    display: grid;
    gap: 3px;
    align-content: start;
    padding-top: 6px;
}
.ai-draft-overview__side span,
.ai-draft-overview__side small {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .075em;
    text-transform: uppercase;
}
.ai-draft-overview__side strong {
    color: var(--ww-text);
    font-size: 14px;
}
.ai-draft-stats {
    grid-column: 1 / -1;
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    padding-top: 18px;
    border-top: 1px solid var(--ww-border);
}
.ai-draft-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid var(--ww-border);
    background: var(--ww-surface-soft);
    color: var(--ww-soft-text);
    font-size: 12px;
    font-weight: 760;
}
.ai-draft-stat-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: .78;
}
.ai-draft-stat-pill--warning {
    background: var(--ww-yellow-soft);
    color: var(--ww-yellow);
    border-color: var(--ww-yellow-border);
}
.ai-draft-stat-pill--muted {
    color: var(--ww-muted);
}
.ai-draft-stat-pill--status {
    background: var(--ww-primary-soft);
    color: var(--ww-primary-text);
    border-color: var(--ww-border-warm);
}

.ai-quality-compact {
    border: 1px solid var(--ww-border);
    border-radius: var(--ww-radius);
    background: #fff;
    box-shadow: var(--ww-shadow);
    overflow: hidden;
}
.ai-quality-compact summary {
    min-height: 54px;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 16px;
    cursor: pointer;
    list-style: none;
}
.ai-quality-compact summary::-webkit-details-marker { display: none; }
.ai-quality-compact[open] .ai-quality-compact__chevron { transform: rotate(180deg); }
.ai-quality-compact__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ww-text);
    font-weight: 850;
}
.ai-quality-compact__title .ui-icon { color: var(--ww-primary-strong); font-size: 20px; }
.ai-quality-compact__score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 28px;
    border-radius: 999px;
    font-weight: 850;
    background: var(--ww-surface-soft);
    color: var(--ww-muted);
}
.ai-quality-compact.is-good .ai-quality-compact__score { background: var(--ww-green-soft); color: var(--ww-green); }
.ai-quality-compact.is-warning .ai-quality-compact__score { background: var(--ww-yellow-soft); color: var(--ww-yellow); }
.ai-quality-compact.is-error .ai-quality-compact__score { background: var(--ww-red-soft); color: var(--ww-red); }
.ai-quality-compact__message {
    min-width: 0;
    color: var(--ww-muted);
    font-size: 13px;
}
.ai-quality-compact__chevron {
    color: var(--ww-muted);
    transition: transform .18s ease;
}
.ai-quality-compact__body {
    border-top: 1px solid var(--ww-border);
    padding: 14px 16px 16px;
    display: grid;
    gap: 12px;
    background: var(--ww-surface-soft);
}
.ai-quality-compact__refresh { justify-self: end; }
.ai-quality-list {
    border: 1px solid var(--ww-border);
    border-radius: 12px;
    background: #fff;
    padding: 12px 14px;
    color: var(--ww-soft-text);
}
.ai-quality-list strong {
    display: block;
    margin-bottom: 7px;
    color: var(--ww-text);
}
.ai-quality-list ul {
    margin: 0;
    padding-left: 18px;
}
.ai-quality-list--error { border-color: var(--ww-red-border); background: var(--ww-red-soft); }
.ai-quality-list--warning { border-color: var(--ww-yellow-border); background: var(--ww-yellow-soft); }

.ai-review-section {
    border: 1px solid var(--ww-border);
    border-radius: var(--ww-radius);
    background: #fff;
    box-shadow: var(--ww-shadow);
    overflow: hidden;
}
.ai-review-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--ww-border);
    background: linear-gradient(180deg, #fff, rgba(243, 244, 245, .72));
}
.ai-review-section__hint {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--ww-border);
    background: #fff;
    color: var(--ww-muted);
    font-size: 12px;
    font-weight: 780;
    white-space: nowrap;
}
.ai-review-rows {
    display: grid;
    gap: 0;
}
.ai-review-section > .ai-review-rows > .empty-state {
    border: 0;
}

.ai-review-row {
    border-bottom: 1px solid var(--ww-border);
    background: #fff;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.ai-review-row:last-child { border-bottom: 0; }
.ai-review-row:hover { background: #fffdfb; }
.ai-review-row.is-accepted,
.ai-review-row.is-preview.is-accepted {
    background: var(--ww-green-soft);
    border-color: var(--ww-green-border);
}
.ai-review-row.is-applied {
    background: var(--ww-green-soft);
}
.ai-review-row.is-regeneration {
    background: var(--ww-yellow-soft);
}
.ai-review-row.is-rejected {
    background: var(--ww-red-soft);
}
.ai-review-row.is-manual {
    background: #fffaf5;
}
.ai-review-row__header {
    min-height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 15px 18px;
}
.ai-review-row__title-group {
    min-width: 0;
    display: grid;
    gap: 6px;
}
.ai-review-row__title-group h4 {
    margin: 0;
    color: var(--ww-text);
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: -.018em;
    font-weight: 820;
}
.ai-review-row__badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}
.ai-review-status-badge { font-size: 11px; padding: 4px 8px; }
.ai-review-row.is-accepted .ai-review-status-badge,
.ai-review-row.is-applied .ai-review-status-badge {
    background: #fff;
    color: var(--ww-green);
    border-color: var(--ww-green-border);
}
.ai-review-row.is-regeneration .ai-review-status-badge {
    background: #fff;
    color: var(--ww-yellow);
    border-color: var(--ww-yellow-border);
}
.ai-review-row.is-rejected .ai-review-status-badge {
    background: #fff;
    color: var(--ww-red);
    border-color: var(--ww-red-border);
}
.ai-review-row__tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.ai-row-inline-status-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ai-row-tool {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ww-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.ai-row-tool:hover,
.ai-row-tool.is-active {
    background: var(--ww-surface-soft);
    color: var(--ww-text);
    border-color: var(--ww-border);
}
.ai-row-tool--edit:hover,
.ai-row-tool--edit.is-active {
    background: var(--ww-primary-soft);
    color: var(--ww-primary-text);
    border-color: var(--ww-border-warm);
}
.ai-row-tool--text {
    width: auto;
    gap: 6px;
    padding: 0 11px;
    font-size: 12px;
    font-weight: 780;
    background: #fff;
    border-color: var(--ww-border);
}
.ai-row-tool .ui-icon { font-size: 19px; }
.ai-review-row__content {
    padding: 0 18px 16px 18px;
}
.ai-rendered-content {
    color: var(--ww-soft-text);
    line-height: 1.55;
    font-size: 13px;
}
.ai-rendered-content > :first-child { margin-top: 0; }
.ai-rendered-content > :last-child { margin-bottom: 0; }
.ai-rendered-content p { margin: 0 0 8px; }
.ai-rendered-content h1,
.ai-rendered-content h2,
.ai-rendered-content h3,
.ai-rendered-content h4 {
    margin: 0 0 8px;
    color: var(--ww-text);
    letter-spacing: -.02em;
}
.ai-rendered-content ul,
.ai-rendered-content ol { margin-top: 6px; margin-bottom: 6px; }
.ai-rendered-content .technical-preview,
.technical-preview--light {
    border-radius: 12px;
    border: 1px solid var(--ww-border);
    background: var(--ww-surface-soft);
    padding: 12px;
    max-height: 320px;
    overflow: auto;
}
.ai-rendered-content pre,
.technical-preview pre {
    margin: 0;
    white-space: pre-wrap;
    font-size: 12px;
}
.ai-readable-list {
    display: grid;
    gap: 10px;
}
.ai-readable-list > div {
    border: 1px solid var(--ww-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .72);
    padding: 10px 12px;
}
.ai-readable-list span {
    display: block;
    margin-bottom: 4px;
    color: var(--ww-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 850;
}
.ai-readable-list strong { color: var(--ww-text); }
.ai-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.ai-readable-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    border: 1px solid var(--ww-border);
    background: #fff;
    color: var(--ww-soft-text);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 760;
}
.ai-row-panel {
    margin: 0 18px 16px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--ww-border);
    background: var(--ww-surface-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
.ai-row-panel--preview {
    background: rgba(255, 255, 255, .78);
}
.ai-row-panel--editor {
    border-color: var(--ww-border-warm);
    background: #fffaf5;
}
.ai-row-panel__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 12px;
}
.ai-row-panel__head strong {
    color: var(--ww-text);
    font-size: 14px;
}
.ai-row-panel__head span {
    color: var(--ww-muted);
    font-size: 12px;
    text-align: right;
}
.ai-row-panel__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.ai-row-secondary-action {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--ww-border);
}
.ai-row-feedback-link {
    margin: -2px 18px 16px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ww-muted);
    font-size: 12px;
    font-weight: 740;
    cursor: pointer;
}
.ai-row-feedback-link:hover { color: var(--ww-primary-strong); }
.ai-variant-editor-table { min-width: 780px; }
.ai-variant-editor-table .form-control { min-width: 130px; }
.ai-add-block-accordion {
    margin: 14px 18px 18px;
    border: 1px dashed var(--ww-border-warm);
    border-radius: 14px;
    background: #fffaf5;
    padding: 0;
    overflow: hidden;
}
.ai-add-block-accordion > summary {
    padding: 13px 15px;
    cursor: pointer;
    color: var(--ww-primary-strong);
    font-weight: 850;
    list-style: none;
}
.ai-add-block-accordion > summary::-webkit-details-marker { display: none; }
.ai-add-block-accordion .ai-add-form {
    padding: 0 15px 15px;
}
.ai-review-row--suggestions {
    padding: 18px;
}
.ai-review-row--suggestions .ai-review-row__content { padding: 0; }
.ai-review-row--suggestions .ai-row-panel { margin: 14px 0 0; }
.ai-review-row__panels { margin-top: 12px; }

.ai-draft-sticky-footer {
    position: sticky;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 -32px -32px;
    padding: 14px 32px;
    border-top: 1px solid var(--ww-border);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    box-shadow: 0 -8px 30px rgba(15, 23, 42, .06);
}
.ai-draft-sticky-footer__note {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ww-muted);
    font-size: 12px;
    font-weight: 700;
}
.ai-draft-sticky-footer__note .ui-icon { font-size: 18px; }
.ai-draft-final-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.ai-final-warning {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 360px;
    padding: 8px 10px;
    border-radius: 11px;
    border: 1px solid var(--ww-red-border);
    background: var(--ww-red-soft);
    color: var(--ww-red);
    font-size: 12px;
    font-weight: 760;
}
.ai-final-warning .ui-icon { font-size: 18px; }
.ai-final-disabled { opacity: .72; cursor: not-allowed; }

@media (max-width: 980px) {
    .ai-draft-overview,
    .ai-draft-overview__main {
        grid-template-columns: 1fr;
    }
    .ai-draft-overview__side {
        justify-self: start;
        text-align: left;
    }
    .ai-review-row__header,
    .ai-review-section__header,
    .ai-draft-sticky-footer {
        align-items: flex-start;
        flex-direction: column;
    }
    .ai-review-row__tools,
    .ai-draft-final-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .ai-quality-compact summary {
        grid-template-columns: 1fr auto;
    }
    .ai-quality-compact__message {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .ai-draft-review-page {
        padding-bottom: 170px;
    }
    .ai-draft-overview__image {
        width: 82px;
        height: 82px;
    }
    .ai-review-row__header,
    .ai-review-row__content,
    .ai-row-panel,
    .ai-review-section__header {
        padding-left: 14px;
        padding-right: 14px;
    }
    .ai-row-panel {
        margin-left: 14px;
        margin-right: 14px;
    }
    .ai-row-inline-status-form,
    .ai-row-inline-status-form .button,
    .ai-draft-final-actions,
    .ai-draft-final-actions form,
    .ai-draft-final-actions .button {
        width: 100%;
    }
    .ai-row-panel__head {
        display: grid;
    }
    .ai-row-panel__head span { text-align: left; }
    .ai-draft-sticky-footer {
        margin-left: -16px;
        margin-right: -16px;
        margin-bottom: -20px;
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* AI Studio index refreshed layout */
.ai-studio-index {
    display: grid;
    gap: 24px;
}

.ai-studio-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.ai-studio-stat-card {
    min-height: 116px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--ww-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(15, 23, 42, .025);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.ai-studio-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--ww-border-warm);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .055);
    background: #fffdfb;
}

.ai-studio-stat-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ww-surface-soft);
    color: var(--ww-text);
    font-size: 21px;
}

.ai-studio-stat-card--accent .ai-studio-stat-card__icon {
    background: rgba(255, 157, 66, .13);
    color: var(--ww-primary-strong);
}

.ai-studio-stat-card__label {
    display: block;
    color: var(--ww-soft-text);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .055em;
    text-transform: none;
}

.ai-studio-stat-card__value {
    color: var(--ww-text);
    font-size: 22px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: -.035em;
}

.ai-studio-section {
    border: 1px solid var(--ww-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--ww-shadow);
    overflow: hidden;
}

.ai-studio-section__head {
    min-height: 66px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--ww-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: rgba(255, 255, 255, .72);
}

.ai-studio-section__head--simple {
    align-items: center;
}

.ai-studio-section__title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ww-text);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 820;
    letter-spacing: -.025em;
}

.ai-studio-section__icon {
    color: var(--ww-primary-strong);
    font-size: 22px;
}

.ai-studio-section__actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.ai-studio-table th,
.ai-studio-table td {
    padding-left: 20px;
    padding-right: 20px;
}

.ai-studio-table th:last-child,
.ai-studio-table td:last-child {
    text-align: right;
}

.ai-studio-table__actions {
    width: 88px;
}

.ai-studio-profile-cell {
    display: grid;
    gap: 4px;
    min-width: 220px;
}

.ai-studio-profile-cell strong {
    color: var(--ww-text);
    font-weight: 850;
    line-height: 1.25;
}

.ai-studio-profile-cell__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--ww-muted);
    font-size: 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 750;
}

.ai-studio-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.ai-studio-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
}

.ai-studio-status--active {
    color: var(--ww-green);
    background: var(--ww-green-soft);
    border: 1px solid var(--ww-green-border);
}

.ai-studio-status--disabled {
    color: var(--ww-red);
    background: var(--ww-red-soft);
    border: 1px solid var(--ww-red-border);
}

.ai-studio-link-list {
    padding: 14px;
    display: grid;
    gap: 10px;
}

.ai-studio-link-card {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--ww-border);
    border-radius: 12px;
    background: var(--ww-surface-soft);
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.ai-studio-link-card:hover {
    transform: translateY(-1px);
    border-color: var(--ww-border-warm);
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .035);
}

.ai-studio-link-card__body {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.ai-studio-link-card__body strong {
    min-width: 0;
    color: var(--ww-text);
    font-size: 13px;
    line-height: 1.25;
    font-weight: 850;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ai-studio-link-card__body span {
    min-width: 0;
    color: var(--ww-muted);
    font-size: 12px;
    line-height: 1.3;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ai-studio-link-card__arrow {
    flex: 0 0 auto;
    color: var(--ww-muted);
    font-size: 18px;
}

.ai-studio-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.ai-studio-index .empty-state--compact {
    padding: 18px;
    text-align: left;
}

.ai-studio-index .empty-state--compact strong,
.ai-studio-index .empty-state--compact span {
    display: block;
}

.ai-studio-index .empty-state--compact code {
    border-radius: 7px;
    background: var(--ww-surface-soft);
    padding: 2px 5px;
    color: var(--ww-soft-text);
}

.ai-studio-index .text-badge {
    padding: 3px 7px;
    font-size: 10px;
    text-transform: none;
    letter-spacing: 0;
}

@media (max-width: 1240px) {
    .ai-studio-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
    .ai-studio-split { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .ai-studio-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-studio-section__head { align-items: flex-start; flex-direction: column; }
    .ai-studio-section__head--simple { align-items: stretch; }
    .ai-studio-section__head--simple .button { width: 100%; }
}

@media (max-width: 500px) {
    .ai-studio-stats { grid-template-columns: 1fr; }
}

/* AI Studio instructions view */
.ai-instructions-page {
    display: grid;
    gap: 24px;
    max-width: 1480px;
    margin: 0 auto;
}

.ai-instructions-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: stretch;
    padding: 26px;
    border: 1px solid rgba(218, 194, 177, .7);
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 157, 66, .15), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #fbfaf8 56%, #f6f1ec 100%);
    box-shadow: 0 14px 42px rgba(15, 23, 42, .05);
}

.ai-instructions-hero__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ai-instructions-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 10px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 157, 66, .34);
    border-radius: 999px;
    background: rgba(255, 220, 194, .45);
    color: var(--ww-primary-text);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ai-instructions-hero__eyebrow .ui-icon {
    color: var(--ww-primary-strong);
    font-size: 17px;
}

.ai-instructions-hero h2 {
    margin: 0;
    color: var(--ww-text);
    font-size: clamp(25px, 2.2vw, 36px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -.045em;
}

.ai-instructions-hero p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--ww-muted);
    font-size: 14px;
    line-height: 1.7;
}

.ai-instructions-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.ai-instructions-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(225, 227, 228, .9);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: var(--ww-text);
    font-size: 12px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .025);
}

.ai-instructions-hero__meta strong {
    color: var(--ww-muted);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ai-instructions-hero__side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(225, 227, 228, .85);
    border-radius: 18px;
    background: rgba(255, 255, 255, .76);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.ai-profile-switcher--panel {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.ai-profile-switcher--panel label {
    display: grid;
    gap: 7px;
    margin: 0;
    color: var(--ww-muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ai-profile-switcher--panel .form-control {
    text-transform: none;
    letter-spacing: 0;
}

.ai-instructions-hero__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: auto;
}

.ai-instructions-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.ai-instructions-stat {
    display: grid;
    gap: 7px;
    min-height: 118px;
    padding: 16px;
    border: 1px solid var(--ww-border);
    border-radius: 18px;
    background: var(--ww-surface);
    box-shadow: var(--ww-shadow);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.ai-instructions-stat:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 157, 66, .42);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .06);
}

.ai-instructions-stat .ui-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--ww-surface-soft);
    color: var(--ww-soft-text);
    font-size: 21px;
}

.ai-instructions-stat--accent .ui-icon {
    background: rgba(255, 220, 194, .7);
    color: var(--ww-primary-strong);
}

.ai-instructions-stat strong {
    color: var(--ww-text);
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.035em;
}

.ai-instructions-stat small {
    color: var(--ww-muted);
    font-size: 12px;
    font-weight: 750;
}

.ai-instructions-section {
    padding: 22px;
    border: 1px solid var(--ww-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--ww-shadow);
}

.ai-instructions-section--master {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .88)),
        radial-gradient(circle at 100% 0%, rgba(255, 157, 66, .11), transparent 34%);
}

.ai-instructions-section--compact {
    align-self: start;
}

.ai-instructions-section__head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.ai-instructions-section__head--inline {
    align-items: center;
}

.ai-instructions-section__head h3 {
    margin: 3px 0 0;
    color: var(--ww-text);
    font-size: 20px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -.025em;
}

.ai-instructions-section__head p {
    max-width: 780px;
    margin: 8px 0 0;
    color: var(--ww-muted);
    font-size: 13px;
    line-height: 1.55;
}

.ai-instructions-section__kicker {
    color: var(--ww-primary-strong);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.ai-instructions-count {
    display: inline-flex;
    align-items: center;
    height: fit-content;
    padding: 7px 10px;
    border: 1px solid var(--ww-border);
    border-radius: 999px;
    background: var(--ww-surface-soft);
    color: var(--ww-muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.ai-config-card,
.ai-rule-card,
.ai-style-card,
.ai-add-inline,
.ai-add-style-form {
    border: 1px solid var(--ww-border);
    border-radius: 16px;
    background: var(--ww-surface);
    box-shadow: 0 3px 14px rgba(15, 23, 42, .025);
}

.ai-config-card,
.ai-rule-card,
.ai-style-card {
    padding: 16px;
}

.ai-config-card.is-disabled,
.ai-style-card.is-disabled {
    background: #fbfbfb;
    opacity: .76;
}

.ai-config-card__top,
.ai-style-card__top,
.ai-rule-card__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 13px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--ww-border);
}

.ai-config-card__top > div:first-child,
.ai-style-card__top > div:first-child,
.ai-rule-card__top > div:last-child {
    min-width: 0;
}

.ai-config-card__top strong,
.ai-style-card__top strong,
.ai-rule-card__top strong {
    display: block;
    margin-top: 7px;
    color: var(--ww-text);
    font-size: 14px;
    line-height: 1.28;
    font-weight: 900;
}

.ai-style-card__top small,
.ai-rule-card__top small {
    display: block;
    margin-top: 5px;
    color: var(--ww-muted);
    font-size: 12px;
    line-height: 1.35;
}

.ai-rule-card__top {
    align-items: center;
    justify-content: flex-start;
}

.ai-rule-card__top .ui-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--ww-surface-soft);
    color: var(--ww-soft-text);
    font-size: 19px;
}

.ai-toggle-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    user-select: none;
}

.ai-toggle-pill input {
    width: 34px;
    height: 20px;
    appearance: none;
    border: 1px solid var(--ww-border);
    border-radius: 999px;
    background: var(--ww-surface-muted);
    position: relative;
    outline: none;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}

.ai-toggle-pill input::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
    transition: transform .16s ease;
}

.ai-toggle-pill input:checked {
    border-color: rgba(255, 157, 66, .65);
    background: var(--ww-primary);
}

.ai-toggle-pill input:checked::after {
    transform: translateX(14px);
}

.ai-toggle-pill span {
    color: var(--ww-muted);
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.ai-code-textarea,
.ai-config-card textarea,
.ai-rule-card textarea,
.ai-style-card textarea,
.ai-add-style-form textarea,
.ai-add-inline textarea {
    line-height: 1.55;
}

.ai-code-textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
}

.ai-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ai-block-list,
.ai-rule-list,
.ai-style-list {
    display: grid;
    gap: 14px;
}

.ai-block-card__prompts {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 14px;
}

.ai-mini-flags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.ai-mini-flags span {
    padding: 4px 7px;
    border: 1px solid var(--ww-border);
    border-radius: 999px;
    background: var(--ww-surface-soft);
    color: var(--ww-muted);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ai-add-inline,
.ai-add-style-form {
    margin-top: 16px;
    padding: 16px;
    border-style: dashed;
    background: rgba(255, 255, 255, .62);
}

.ai-add-inline__head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    color: var(--ww-text);
}

.ai-add-inline__head .ui-icon {
    color: var(--ww-primary-strong);
    font-size: 20px;
}

.ai-add-inline__head strong {
    font-size: 13px;
    font-weight: 900;
}

.ai-instructions-two-col {
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
    gap: 24px;
    align-items: start;
}

.ai-style-workbench {
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 220, 194, .46), transparent 34%),
        rgba(255, 255, 255, .9);
}

.ai-voice-principles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.ai-voice-principles article {
    padding: 13px;
    border: 1px solid rgba(225, 227, 228, .9);
    border-radius: 15px;
    background: rgba(255, 255, 255, .78);
}

.ai-voice-principles span {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--ww-primary-strong);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .12em;
}

.ai-voice-principles strong {
    display: block;
    color: var(--ww-text);
    font-size: 13px;
    font-weight: 900;
}

.ai-voice-principles p {
    margin: 5px 0 0;
    color: var(--ww-muted);
    font-size: 12px;
    line-height: 1.45;
}

.ai-suggested-styles {
    margin-bottom: 18px;
}

.ai-suggested-styles__head,
.ai-style-list__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 11px;
}

.ai-suggested-styles__head strong,
.ai-style-list__head strong {
    color: var(--ww-text);
    font-size: 13px;
    font-weight: 900;
}

.ai-suggested-styles__head span,
.ai-style-list__head span {
    color: var(--ww-muted);
    font-size: 12px;
    line-height: 1.35;
    text-align: right;
}

.ai-suggested-styles__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ai-suggested-style-card {
    padding: 14px;
    border: 1px solid rgba(225, 227, 228, .9);
    border-radius: 16px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 3px 16px rgba(15, 23, 42, .022);
}

.ai-suggested-style-card__top {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ai-suggested-style-card__top .ui-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(255, 220, 194, .66);
    color: var(--ww-primary-strong);
    font-size: 19px;
}

.ai-suggested-style-card strong {
    display: block;
    color: var(--ww-text);
    font-size: 13px;
    font-weight: 900;
}

.ai-suggested-style-card code {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 5px;
    border-radius: 6px;
    background: var(--ww-surface-soft);
    color: var(--ww-soft-text);
    font-size: 10px;
}

.ai-suggested-style-card dl {
    display: grid;
    gap: 9px;
    margin: 0;
}

.ai-suggested-style-card dl div {
    display: grid;
    gap: 2px;
}

.ai-suggested-style-card dt {
    color: var(--ww-primary-strong);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.ai-suggested-style-card dd {
    margin: 0;
    color: var(--ww-muted);
    font-size: 12px;
    line-height: 1.38;
}

.ai-style-card {
    border-left: 4px solid rgba(255, 157, 66, .46);
}

.ai-style-card.is-disabled {
    border-left-color: var(--ww-border);
}

@media (max-width: 1260px) {
    .ai-instructions-hero,
    .ai-instructions-two-col {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 980px) {
    .ai-field-grid,
    .ai-block-card__prompts,
    .ai-suggested-styles__grid,
    .ai-voice-principles {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 740px) {
    .ai-instructions-page {
        gap: 18px;
    }

    .ai-instructions-hero,
    .ai-instructions-section {
        padding: 18px;
        border-radius: 18px;
    }

    .ai-instructions-hero__actions,
    .ai-instructions-stats {
        grid-template-columns: 1fr;
    }

    .ai-instructions-section__head,
    .ai-instructions-section__head--inline,
    .ai-config-card__top,
    .ai-style-card__top,
    .ai-suggested-styles__head,
    .ai-style-list__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .ai-suggested-styles__head span,
    .ai-style-list__head span {
        text-align: left;
    }

    .ai-toggle-pill {
        width: 100%;
        justify-content: space-between;
    }
}

/* --------------------------------------------------------------------------
   Mapping / PrestaShop configuration refresh
   -------------------------------------------------------------------------- */
.ops-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 1280px;
    margin: 0 auto;
}

.ops-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 26px;
    border: 1px solid rgba(225, 227, 228, .9);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .82)),
        radial-gradient(circle at 0% 0%, rgba(255, 157, 66, .16), transparent 34%);
    box-shadow: 0 8px 26px rgba(15, 23, 42, .035);
}

.ops-hero__content {
    max-width: 820px;
}

.ops-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--ww-primary-strong);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.ops-kicker .ui-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(255, 220, 194, .78);
    color: var(--ww-primary-strong);
    font-size: 17px;
}

.ops-hero h1 {
    margin: 0;
    color: var(--ww-text);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.1;
    letter-spacing: -.035em;
    font-weight: 900;
}

.ops-hero p {
    margin: 10px 0 0;
    max-width: 760px;
    color: var(--ww-muted);
    font-size: 14px;
    line-height: 1.62;
}

.ops-hero code,
.ops-card code {
    padding: 2px 6px;
    border-radius: 7px;
    background: var(--ww-surface-soft);
    color: var(--ww-primary-strong);
    font-size: 12px;
}

.ops-hero__actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ops-stat-grid {
    display: grid;
    gap: 16px;
}

.ops-stat-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ops-stat-grid--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ops-stat-card {
    display: flex;
    flex-direction: column;
    min-height: 116px;
    padding: 17px;
    border: 1px solid rgba(225, 227, 228, .9);
    border-radius: 17px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 4px 18px rgba(15, 23, 42, .028);
}

.ops-stat-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: var(--ww-surface-soft);
    color: var(--ww-soft-text);
    font-size: 21px;
}

.ops-stat-card:first-child .ops-stat-card__icon {
    background: rgba(255, 220, 194, .72);
    color: var(--ww-primary-strong);
}

.ops-stat-card__label {
    margin-bottom: 4px;
    color: var(--ww-muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ops-stat-card strong {
    color: var(--ww-text);
    font-size: 22px;
    line-height: 1.1;
    font-weight: 950;
}

.ops-layout {
    display: grid;
    gap: 22px;
}

.ops-layout--main-aside {
    grid-template-columns: minmax(0, 1.75fr) minmax(300px, .72fr);
    align-items: start;
}

.ops-card,
.ops-subcard,
.ops-mapping-card {
    border: 1px solid rgba(225, 227, 228, .92);
    border-radius: 20px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 4px 20px rgba(15, 23, 42, .03);
}

.ops-card {
    padding: 22px;
}

.ops-card--compact {
    padding: 18px;
}

.ops-card__head {
    margin-bottom: 18px;
}

.ops-card__head--inline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.ops-card__eyebrow {
    display: inline-flex;
    margin-bottom: 5px;
    color: var(--ww-primary-strong);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.ops-card h2 {
    margin: 0;
    color: var(--ww-text);
    font-size: 20px;
    line-height: 1.22;
    font-weight: 900;
    letter-spacing: -.025em;
}

.ops-card h3,
.ops-mapping-card h3 {
    margin: 0;
    color: var(--ww-text);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -.02em;
}

.ops-card__head p,
.ops-subcard__head span {
    margin: 7px 0 0;
    color: var(--ww-muted);
    font-size: 13px;
    line-height: 1.55;
}

.ops-card--aside {
    position: sticky;
    top: 88px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(243, 244, 245, .84));
}

.ops-form,
.ops-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ops-form-grid {
    display: grid;
    gap: 14px;
}

.ops-form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-form-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ops-field,
.ops-form-row label,
.presta-config-form label {
    display: grid;
    gap: 7px;
    color: var(--ww-soft-text);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .035em;
}

.ops-field--wide {
    grid-column: span 2;
}

.ops-form-row > div,
.ops-form-row-group > div {
    width: 100%;
}

.ops-form-row input:not([type="checkbox"]),
.ops-form-row select,
.ops-form-row textarea,
.ops-form-row-group input:not([type="checkbox"]),
.ops-form-row-group select,
.ops-form-row-group textarea {
    width: 100%;
}

.ops-form-row .form-error-message,
.ops-form-row .invalid-feedback,
.ops-form-row-group .form-error-message,
.ops-form-row-group .invalid-feedback {
    color: var(--ww-red);
    font-size: 12px;
    font-weight: 700;
}

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

.ops-form-row-group .form-row--inline,
.presta-config-form .form-row--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.ops-form-row-group .form-row--inline > div,
.presta-config-form .form-row--inline > div {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid rgba(225, 227, 228, .92);
    border-radius: 12px;
    background: rgba(255, 255, 255, .78);
}

.ops-form-row-group .form-row--inline label,
.presta-config-form .form-row--inline label {
    margin: 0;
    color: var(--ww-soft-text);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.ops-check-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-height: 100%;
    padding: 12px;
    border: 1px solid rgba(225, 227, 228, .85);
    border-radius: 15px;
    background: rgba(248, 249, 250, .78);
}

.ops-form-actions,
.ops-action-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ops-form-actions .button,
.ops-action-row .button,
.ops-hero__actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.ops-form-actions .ui-icon,
.ops-action-row .ui-icon,
.ops-hero__actions .ui-icon {
    font-size: 18px;
}

.ops-guide-list {
    display: grid;
    gap: 12px;
}

.ops-guide-list > div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    padding: 12px;
    border: 1px solid rgba(225, 227, 228, .86);
    border-radius: 15px;
    background: rgba(255, 255, 255, .72);
}

.ops-guide-list .ui-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(255, 220, 194, .62);
    color: var(--ww-primary-strong);
    font-size: 18px;
}

.ops-guide-list p {
    margin: 0;
    color: var(--ww-muted);
    font-size: 12px;
    line-height: 1.45;
}

.ops-guide-list strong {
    color: var(--ww-text);
}

.ops-table-wrap {
    border: 1px solid rgba(225, 227, 228, .9);
    border-radius: 16px;
    overflow: auto;
    background: #fff;
}

.ops-table {
    min-width: 780px;
}

.ops-table thead th {
    background: rgba(248, 249, 250, .96);
    color: var(--ww-muted);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.ops-table tbody td {
    vertical-align: top;
}

.ops-soft-badge,
.ops-status,
.ops-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid rgba(225, 227, 228, .95);
    background: var(--ww-surface-soft);
    color: var(--ww-soft-text);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
}

.ops-chip {
    margin: 2px 4px 2px 0;
    background: #fff;
}

.ops-status.is-green {
    border-color: var(--ww-green-border);
    background: var(--ww-green-soft);
    color: var(--ww-green);
}

.ops-status.is-muted {
    color: var(--ww-muted);
}

.ops-status.is-red {
    border-color: var(--ww-red-border);
    background: var(--ww-red-soft);
    color: var(--ww-red);
}

.ops-meta-line,
.ops-mapping-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    color: var(--ww-muted);
    font-size: 12px;
}

.ops-meta-line > span,
.ops-mapping-card__meta > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(243, 244, 245, .82);
    color: var(--ww-soft-text);
}

.ops-note {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    padding: 13px;
    border: 1px solid rgba(225, 227, 228, .92);
    border-radius: 16px;
    background: rgba(243, 244, 245, .76);
}

.ops-note .ui-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #fff;
    color: var(--ww-soft-text);
    font-size: 18px;
}

.ops-note p {
    margin: 0;
    color: var(--ww-muted);
    font-size: 13px;
    line-height: 1.52;
}

.ops-note--warm {
    border-color: rgba(255, 183, 124, .55);
    background: rgba(255, 251, 235, .82);
}

.ops-note--warm .ui-icon {
    color: var(--ww-primary-strong);
    background: rgba(255, 220, 194, .65);
}

.ops-note--info {
    border-color: rgba(37, 99, 235, .15);
    background: rgba(239, 246, 255, .65);
}

.ops-note--info .ui-icon {
    color: var(--ww-blue);
    background: #fff;
}

.ops-note--error {
    border-color: var(--ww-red-border);
    background: var(--ww-red-soft);
}

.ops-note--error .ui-icon {
    color: var(--ww-red);
}

.ops-subcard {
    padding: 16px;
    border-radius: 17px;
    background: rgba(248, 249, 250, .78);
    box-shadow: none;
}

.ops-subcard--soft {
    background: rgba(248, 249, 250, .72);
}

.ops-subcard__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 14px;
}

.ops-subcard__head strong {
    color: var(--ww-text);
    font-size: 13px;
    font-weight: 950;
}

.ops-subcard__head span {
    max-width: 520px;
    text-align: right;
}

.ops-inline-form {
    display: grid;
    grid-template-columns: minmax(130px, .7fr) minmax(150px, .9fr) minmax(260px, 1.5fr) auto;
    gap: 10px;
    align-items: end;
}

.ops-details {
    border: 1px solid rgba(225, 227, 228, .92);
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
    overflow: hidden;
}

.ops-details summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    cursor: pointer;
    color: var(--ww-text);
    font-size: 13px;
    font-weight: 900;
    list-style: none;
}

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

.ops-details summary::after {
    content: 'expand_more';
    margin-left: auto;
    color: var(--ww-muted);
    font-family: 'Material Symbols Outlined';
    font-size: 20px;
    line-height: 1;
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.ops-details[open] summary::after {
    content: 'expand_less';
}

.ops-details > :not(summary) {
    margin: 0 14px 14px;
}

.ops-details--compact summary {
    padding: 11px 13px;
}

.ops-mapping-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
}

.ops-mapping-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(225, 227, 228, .9);
}

.ops-mapping-card__meta {
    margin-top: -4px;
}

.ops-expansion-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0;
    border: 0;
    background: transparent;
}

.ops-empty-state {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 180px;
    padding: 28px;
    border: 1px dashed rgba(135, 115, 101, .4);
    border-radius: 18px;
    background: rgba(248, 249, 250, .74);
    color: var(--ww-muted);
    text-align: center;
}

.ops-empty-state .ui-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255, 220, 194, .7);
    color: var(--ww-primary-strong);
    font-size: 26px;
}

.ops-empty-state strong {
    color: var(--ww-text);
    font-size: 16px;
    font-weight: 900;
}

.ops-empty-state p {
    max-width: 520px;
    margin: 0;
    color: var(--ww-muted);
    font-size: 13px;
    line-height: 1.5;
}

.ops-profile-card {
    overflow: hidden;
}

.ops-rule-details-row > td {
    background: rgba(248, 249, 250, .58);
}

.ops-variant-rules-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.ops-variant-rule-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border: 1px solid rgba(225, 227, 228, .92);
    border-radius: 999px;
    background: #fff;
}

.ops-variant-rule-pill span {
    color: var(--ww-text);
    font-size: 12px;
    font-weight: 850;
}

.ops-variant-rule-pill small {
    color: var(--ww-muted);
    font-size: 11px;
}

.ops-attribute-selection-grid {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.ops-attribute-selection-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(225, 227, 228, .82);
    border-radius: 14px;
    background: rgba(255, 255, 255, .68);
}

.ops-endpoint-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.ops-endpoint-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(225, 227, 228, .92);
    border-radius: 16px;
    background: rgba(248, 249, 250, .76);
    min-width: 0;
}

.ops-endpoint-card span {
    color: var(--ww-primary-strong);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ops-endpoint-card code {
    display: block;
    width: 100%;
    overflow: auto;
    padding: 9px;
    border-radius: 11px;
    background: #fff;
    color: var(--ww-soft-text);
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .ops-layout--main-aside,
    .ops-endpoint-grid {
        grid-template-columns: 1fr;
    }

    .ops-card--aside {
        position: static;
    }

    .ops-stat-grid--five {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .ops-stat-grid--four,
    .ops-stat-grid--five,
    .ops-form-grid--two,
    .ops-form-grid--three,
    .ops-inline-form,
    .ops-attribute-selection-row {
        grid-template-columns: 1fr;
    }

    .ops-field--wide {
        grid-column: auto;
    }

    .ops-subcard__head,
    .ops-card__head--inline,
    .ops-mapping-card__head,
    .ops-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .ops-subcard__head span {
        text-align: left;
    }

    .ops-hero__actions,
    .ops-form-actions,
    .ops-action-row {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .ops-page {
        gap: 16px;
    }

    .ops-hero,
    .ops-card,
    .ops-mapping-card {
        padding: 17px;
        border-radius: 18px;
    }

    .ops-stat-grid--four,
    .ops-stat-grid--five {
        grid-template-columns: 1fr;
    }

    .ops-form-actions .button,
    .ops-action-row .button,
    .ops-hero__actions .button {
        width: 100%;
    }
}
