:root{font-family:system-ui,sans-serif;color:#18202a;background:#f4f6f8}body{margin:0}header{display:flex;justify-content:space-between;align-items:center;background:#132238;color:white;padding:14px 5vw}header a{color:white;text-decoration:none;font-weight:700}main{max-width:1100px;margin:30px auto;padding:0 18px}.card{background:white;border-radius:14px;padding:22px;margin:18px 0;box-shadow:0 3px 16px #0001}.narrow{max-width:460px;margin:60px auto}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}label{display:block;font-weight:650;margin:12px 0}input,select,textarea{width:100%;box-sizing:border-box;padding:11px;margin-top:6px;border:1px solid #ccd3dc;border-radius:8px;font:inherit}button,.button{display:inline-block;background:#1769aa;color:white;border:0;border-radius:8px;padding:11px 16px;text-decoration:none;cursor:pointer;margin:6px 6px 6px 0}.flash{padding:12px;border-radius:8px}.flash.error{background:#ffe4e4}.flash.success{background:#e3f6e7}table{width:100%;border-collapse:collapse}th,td{text-align:left;border-bottom:1px solid #e4e7eb;padding:10px}.result img{max-width:100%;max-height:520px;object-fit:contain;border-radius:10px}.recorder{padding:12px;background:#f7f9fb;border-radius:10px}pre{white-space:pre-wrap}

.tenant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
}

.button.secondary {
    background: #e5e7eb;
    color: #111827;
}

.button.secondary:hover {
    background: #d1d5db;
}

.member-card {
    border: 1px solid #e1e6ec;
    border-radius: 12px;
    padding: 18px;
    margin-top: 16px;
    background: #fafbfc;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 18px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 16px;
}

.checkbox-label input {
    width: auto;
    margin: 0;
}

.member-actions {
    margin-top: 12px;
}

.button-danger {
    display: inline-block;
    background: #b42318;
    color: white;
    border: 0;
    border-radius: 8px;
    padding: 11px 16px;
    cursor: pointer;
    margin-top: 4px;
}

.button-danger:hover {
    background: #912018;
}

.button-danger:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.member-note {
    font-size: 0.9rem;
    color: #667085;
}

.client-card {
    margin-bottom: 26px;
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.client-header h2 {
    margin: 0;
}

.client-meta {
    margin: 6px 0 0;
    color: #667085;
}

.client-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e8edf3;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-active,
.billing-active {
    background: #dcfce7;
    color: #166534;
}

.status-paused,
.billing-paused {
    background: #fef3c7;
    color: #92400e;
}

.status-suspended,
.billing-suspended,
.billing-past_due {
    background: #fee2e2;
    color: #991b1b;
}

.status-cancelled,
.status-archived,
.billing-cancelled {
    background: #e5e7eb;
    color: #374151;
}

.billing-trial {
    background: #dbeafe;
    color: #1e40af;
}

.client-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.client-summary > div {
    padding: 14px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #f8fafc;
}

.client-summary span {
    display: block;
    margin-bottom: 5px;
    color: #667085;
    font-size: 0.85rem;
}

.client-summary strong {
    display: block;
}

.client-section {
    margin-top: 14px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    padding: 14px;
}

.client-section summary {
    cursor: pointer;
    font-weight: 750;
}

.client-section form,
.client-section .table-responsive,
.client-section > p {
    margin-top: 16px;
}

.client-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 18px;
}

.client-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e4e7ec;
}

.client-actions form {
    margin: 0;
}

.button-warning,
.button-success,
.button-danger,
.button-dark {
    border: 0;
    border-radius: 8px;
    padding: 11px 16px;
    color: white;
    cursor: pointer;
}

.button-warning {
    background: #b7791f;
}

.button-success {
    background: #15803d;
}

.button-danger {
    background: #b42318;
}

.button-dark {
    background: #344054;
}

.client-help {
    color: #667085;
    font-size: 0.92rem;
}

.table-responsive {
    overflow-x: auto;
}

@media (max-width: 700px) {
    .client-header {
        flex-direction: column;
    }
}

.tenant-unavailable {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #f0c36d;
    border-radius: 10px;
    background: #fff7e6;
    color: #7a4b00;
}

.tenant-unavailable strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.tenant-unavailable p {
    margin: 0;
    line-height: 1.5;
}

.status-past_due,
.billing-past_due {
    background: #fee2e2;
    color: #991b1b;
}

.client-section summary {
    list-style: none;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f4f6f8;
    color: #18202a;
    font-weight: 750;
    cursor: pointer;
    outline: none;
}

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

.client-section summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 9px;
    transition: transform 0.2s ease;
}

.client-section[open] summary::before {
    transform: rotate(90deg);
}

.client-section summary:focus,
.client-section summary:focus-visible {
    outline: 2px solid #1769aa;
    outline-offset: 2px;
}

.page-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap}.page-heading h1{margin-bottom:4px}.muted{color:#667085}.status-line{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:14px;color:#667085}.action-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.no-image{padding:28px;border:1px dashed #cbd5e1;border-radius:10px;background:#f8fafc;color:#64748b;text-align:center;margin-bottom:18px}.compact{padding:7px 10px;font-size:.88rem;margin:2px}.inline-form{display:inline}.highlight-row{background:#eff6ff}.error-details{margin-top:8px}.error-details pre{max-width:520px;color:#991b1b}.draft-status-draft{background:#dbeafe;color:#1e40af}.draft-status-publishing{background:#fef3c7;color:#92400e}.draft-status-published,.publication-status-published{background:#dcfce7;color:#166534}.draft-status-failed,.publication-status-failed{background:#fee2e2;color:#991b1b}.button.warning{background:#b7791f}


.facebook-health-card { margin-bottom: 1rem; }
.health-badge { display:inline-flex; padding:.4rem .75rem; border-radius:999px; font-weight:700; font-size:.85rem; }
.health-healthy { background:#dcfce7; color:#166534; }
.health-warning, .health-unknown { background:#fef3c7; color:#92400e; }
.health-reconnect_required, .health-error { background:#fee2e2; color:#991b1b; }
.health-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:1rem; margin:1rem 0; }
.health-grid > div { display:flex; flex-direction:column; gap:.35rem; padding:.9rem; border:1px solid #e5e7eb; border-radius:.75rem; }
.page-choice{display:flex;gap:.8rem;align-items:flex-start;padding:1rem;border:1px solid #d8dee8;border-radius:10px;margin:.7rem 0;background:#fff}.page-choice input{width:auto;margin-top:.25rem}.page-choice small{color:#667085}

/* LegacyTech V5 - modules d'automatisation */
.automation-module { margin-bottom: 24px; }
.module-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.module-header h2 { margin:0 0 5px; }
.form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:14px 18px; margin-bottom:16px; }
.form-grid label, .asset-card label, .content-card label, .publish-now-form label { display:flex; flex-direction:column; gap:6px; }
.asset-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:16px; margin:18px 0; }
.weather-assets { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
.asset-card, .content-card { border:1px solid #e4e7ec; border-radius:12px; background:#f8fafc; padding:14px; }
.asset-card img, .content-card img { width:100%; aspect-ratio:4/5; object-fit:cover; border-radius:9px; margin:10px 0 14px; background:#e5e7eb; }
.asset-title { min-height:44px; display:flex; align-items:center; }
.asset-missing { min-height:180px; display:flex; align-items:center; justify-content:center; margin:10px 0 14px; padding:16px; border:1px dashed #cbd5e1; border-radius:9px; color:#64748b; background:#fff; text-align:center; }
.card-content-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(290px,1fr)); gap:18px; margin:18px 0; }
.content-card h3 { margin:0 0 8px; }
.content-card textarea { min-height:180px; }
.toggle-row { display:flex; flex-wrap:wrap; gap:14px; margin:14px 0; }
.checkbox-label { display:flex !important; flex-direction:row !important; align-items:center; gap:8px !important; font-weight:650; }
.checkbox-label input, .feature-toggle-card input { width:auto; margin:0; }
.publish-now-form { display:flex; align-items:flex-end; flex-wrap:wrap; gap:12px; margin-top:16px; padding-top:16px; border-top:1px solid #e4e7ec; }
.publish-now-form label { min-width:220px; margin:0; }
.feature-admin-card { margin-bottom:20px; }
.feature-toggle-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:14px; margin:16px 0; }
.feature-toggle-card { display:flex; flex-direction:row; align-items:flex-start; gap:12px; border:1px solid #d8dee8; border-radius:12px; padding:15px; background:#fff; cursor:pointer; }
.feature-toggle-card:hover { border-color:#1769aa; background:#f8fbff; }
.feature-toggle-card span { display:flex; flex-direction:column; gap:4px; }
.feature-toggle-card small { color:#667085; line-height:1.4; }
.run-status { display:inline-block; border-radius:999px; padding:5px 9px; font-weight:700; font-size:.8rem; }
.run-published { background:#dcfce7; color:#166534; }
.run-simulated { background:#dbeafe; color:#1e40af; }
.run-running, .run-pending { background:#fef3c7; color:#92400e; }
.run-failed { background:#fee2e2; color:#991b1b; }
.error-text { color:#b42318; overflow-wrap:anywhere; }
code { padding:2px 5px; border-radius:5px; background:#eef2f6; }
button:disabled, .button:disabled { opacity:.5; cursor:not-allowed; }

@media (max-width:700px) {
  .asset-grid, .weather-assets, .card-content-grid, .feature-toggle-grid, .form-grid { grid-template-columns:1fr; }
  .publish-now-form { align-items:stretch; }
  .publish-now-form label { min-width:0; width:100%; }
}
.dry-run-banner { border-color:#93c5fd; background:#eff6ff; color:#1e3a8a; }
.dry-run-banner p { margin-bottom:0; }

/* =========================================================
   LegacyTech V5.1 - interface moderne et tableaux de bord
   ========================================================= */
:root {
    --lt-bg: #f5f7fb;
    --lt-panel: #ffffff;
    --lt-panel-soft: #f8fafc;
    --lt-sidebar: #111827;
    --lt-sidebar-soft: #1f2937;
    --lt-text: #172033;
    --lt-muted: #697386;
    --lt-line: #e6eaf0;
    --lt-primary: #2563eb;
    --lt-primary-dark: #1d4ed8;
    --lt-primary-soft: #eff6ff;
    --lt-success: #15803d;
    --lt-success-soft: #ecfdf3;
    --lt-warning: #b45309;
    --lt-warning-soft: #fff7ed;
    --lt-danger: #b42318;
    --lt-danger-soft: #fff1f2;
    --lt-violet: #7c3aed;
    --lt-violet-soft: #f5f3ff;
    --lt-radius-lg: 22px;
    --lt-radius: 16px;
    --lt-shadow: 0 18px 45px rgba(15, 23, 42, .08);
    --lt-shadow-soft: 0 8px 24px rgba(15, 23, 42, .06);
}

html { min-height: 100%; }
body { min-height: 100vh; background: var(--lt-bg); color: var(--lt-text); }
.app-body { overflow-x: hidden; }

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 18px;
    color: #e5e7eb;
    background:
        radial-gradient(circle at 20% -5%, rgba(59, 130, 246, .24), transparent 34%),
        linear-gradient(180deg, #111827 0%, #0f172a 100%);
    overflow-y: auto;
    z-index: 20;
}

.sidebar-brand,
.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 13px;
    color: white;
    font-size: .9rem;
    font-weight: 850;
    letter-spacing: .06em;
    background: linear-gradient(135deg, #3b82f6, #7c3aed);
    box-shadow: 0 10px 24px rgba(59, 130, 246, .28);
}

.brand-copy,
.auth-brand > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.18;
}
.brand-copy strong,
.auth-brand strong { font-size: 1rem; letter-spacing: -.01em; }
.brand-copy small,
.auth-brand small { color: #9ca3af; margin-top: 3px; font-size: .78rem; }

.sidebar-workspace {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    background: rgba(255,255,255,.055);
}
.workspace-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(59, 130, 246, .22);
    color: #bfdbfe;
    font-weight: 850;
}
.sidebar-workspace > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.sidebar-workspace strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.sidebar-workspace small { margin-top: 3px; color: #9ca3af; font-size: .76rem; }

.sidebar-nav { display: flex; flex-direction: column; gap: 5px; }
.sidebar-label {
    margin: 17px 11px 5px;
    color: #6b7280;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.sidebar-label:first-child { margin-top: 0; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 650;
    font-size: .91rem;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(2px); }
.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(37,99,235,.95), rgba(79,70,229,.92));
    box-shadow: 0 10px 24px rgba(37,99,235,.24);
}
.nav-icon {
    width: 22px;
    flex: 0 0 22px;
    display: inline-grid;
    place-items: center;
    font-size: 1.05rem;
}
.sidebar-footer { margin-top: auto; padding: 14px 10px 2px; border-top: 1px solid rgba(255,255,255,.08); }
.platform-indicator { color: #9ca3af; font-size: .76rem; display: flex; align-items: center; gap: 8px; }
.platform-indicator i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.12); }

.app-stage { min-width: 0; }
.app-topbar {
    min-height: 76px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 34px;
    border-bottom: 1px solid rgba(226,232,240,.92);
    background: rgba(255,255,255,.84);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 15;
}
.topbar-context { display: flex; flex-direction: column; gap: 2px; }
.topbar-context strong { color: #111827; font-size: .98rem; }
.topbar-eyebrow { color: var(--lt-muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .09em; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center;
    border-radius: 50%; color: #1e40af; background: #dbeafe; font-weight: 850;
}
.user-copy { display: flex; flex-direction: column; line-height: 1.2; }
.user-copy strong { font-size: .84rem; }
.user-copy small { color: var(--lt-muted); font-size: .72rem; }
.topbar-user form { margin: 0; }
.logout-button {
    margin: 0 0 0 7px;
    padding: 8px 11px;
    border: 1px solid var(--lt-line);
    border-radius: 10px;
    color: #475569;
    background: #fff;
    font-size: .78rem;
}
.logout-button:hover { border-color: #cbd5e1; background: #f8fafc; }

.app-content {
    width: min(1480px, calc(100% - 56px));
    box-sizing: border-box;
    margin: 0 auto;
    padding: 34px 0 56px;
}
.flash-stack { display: grid; gap: 10px; margin-bottom: 20px; }
.flash { border: 1px solid transparent; box-shadow: var(--lt-shadow-soft); }
.flash.success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.flash.error { border-color: #fecaca; background: #fff1f2; color: #9f1239; }

.dashboard-heading,
.panel-heading,
.workspace-card-head,
.workspace-hero,
.metric-card,
.facebook-page-item,
.activity-item {
    box-sizing: border-box;
}
.dashboard-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 25px;
}
.dashboard-heading h1,
.workspace-hero h1 { margin: 4px 0 8px; color: #101828; letter-spacing: -.035em; }
.dashboard-heading h1 { font-size: clamp(1.8rem, 3vw, 2.45rem); }
.dashboard-heading p,
.workspace-hero p,
.panel-heading p { max-width: 760px; margin: 0; color: var(--lt-muted); line-height: 1.55; }
.section-kicker {
    display: inline-block;
    color: var(--lt-primary);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.admin-launch-grid,
.workspace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.launch-card {
    min-height: 126px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--lt-line);
    border-radius: var(--lt-radius-lg);
    color: var(--lt-text);
    text-decoration: none;
    background: #fff;
    box-shadow: var(--lt-shadow-soft);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.launch-card:hover { transform: translateY(-3px); border-color: #bfdbfe; box-shadow: var(--lt-shadow); }
.launch-card-primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, #2563eb, #4f46e5); }
.launch-card-primary small { color: #dbeafe !important; }
.launch-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--lt-primary-soft); color: var(--lt-primary); font-size: 1.3rem; }
.launch-card-primary .launch-icon { background: rgba(255,255,255,.16); color: #fff; }
.launch-card > span:nth-child(2) { display: flex; flex-direction: column; gap: 5px; }
.launch-card small { color: var(--lt-muted); line-height: 1.35; }
.launch-card b { font-size: 1.25rem; }

.workspace-card {
    display: flex;
    flex-direction: column;
    min-height: 310px;
    padding: 22px;
    border: 1px solid var(--lt-line);
    border-radius: var(--lt-radius-lg);
    background: #fff;
    box-shadow: var(--lt-shadow-soft);
    overflow: hidden;
}
.workspace-card-disabled { opacity: .8; }
.workspace-card-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; }
.workspace-logo { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: #1e40af; background: #dbeafe; font-size: 1.15rem; font-weight: 850; }
.workspace-card-head h2 { margin: 0 0 3px; font-size: 1.1rem; }
.workspace-card-head p { margin: 0; color: var(--lt-muted); font-size: .82rem; }
.workspace-card-body { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 20px 0 14px; }
.workspace-info-block { min-width: 0; padding: 14px; border-radius: 14px; background: var(--lt-panel-soft); border: 1px solid #eef2f6; }
.workspace-info-block span { display: block; color: var(--lt-muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.workspace-info-block strong { display: block; margin: 5px 0; font-size: 1.4rem; }
.workspace-info-block small { display: block; color: #667085; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.module-chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.module-chip-row span { padding: 5px 9px; border-radius: 999px; color: #4338ca; background: #eef2ff; font-size: .72rem; font-weight: 750; }
.workspace-open { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-radius: 13px; color: #fff; background: #111827; text-decoration: none; font-weight: 750; }
.workspace-open:hover { background: #1f2937; }
.workspace-unavailable { margin-top: auto; padding: 13px; border-radius: 12px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; font-size: .87rem; }
.empty-dashboard-state { grid-column: 1 / -1; display: grid; justify-items: center; text-align: center; padding: 64px 20px; border: 1px dashed #cbd5e1; border-radius: var(--lt-radius-lg); background: rgba(255,255,255,.62); }
.empty-dashboard-state > span { font-size: 2.4rem; color: #94a3b8; }
.empty-dashboard-state h2 { margin: 12px 0 5px; }
.empty-dashboard-state p { margin: 0; color: var(--lt-muted); }

.workspace-hero {
    min-height: 210px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 32px;
    margin-bottom: 20px;
    border-radius: 26px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 0%, rgba(129,140,248,.42), transparent 32%),
        radial-gradient(circle at 15% 110%, rgba(14,165,233,.28), transparent 35%),
        linear-gradient(135deg, #111827 0%, #1e293b 53%, #312e81 100%);
    box-shadow: 0 24px 55px rgba(15,23,42,.2);
}
.workspace-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3.15rem); }
.workspace-hero p { color: #cbd5e1; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-badge { padding: 6px 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; color: #e2e8f0; background: rgba(255,255,255,.08); font-size: .74rem; font-weight: 750; }
.hero-badge-success { color: #bbf7d0; background: rgba(34,197,94,.12); border-color: rgba(134,239,172,.22); }
.button-hero { margin: 0; white-space: nowrap; background: #fff; color: #111827; box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.button-hero:hover { background: #f8fafc; transform: translateY(-1px); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.metric-card { display: flex; align-items: center; gap: 14px; min-height: 116px; padding: 19px; border: 1px solid var(--lt-line); border-radius: var(--lt-radius); background: #fff; box-shadow: var(--lt-shadow-soft); }
.metric-icon { width: 45px; height: 45px; flex: 0 0 45px; display: grid; place-items: center; border-radius: 14px; font-size: 1.2rem; font-weight: 800; }
.metric-blue { color: #1d4ed8; background: #dbeafe; }
.metric-green { color: #15803d; background: #dcfce7; }
.metric-violet { color: #6d28d9; background: #ede9fe; }
.metric-amber { color: #b45309; background: #ffedd5; }
.metric-card > div { min-width: 0; }
.metric-card small { display: block; color: var(--lt-muted); font-size: .76rem; font-weight: 700; }
.metric-card strong { display: block; margin: 2px 0; color: #101828; font-size: 1.65rem; letter-spacing: -.03em; }
.metric-card p { margin: 0; color: #8a94a6; font-size: .72rem; }

.dashboard-main-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(380px, .88fr); gap: 20px; align-items: start; }
.dashboard-panel { padding: 24px; border: 1px solid var(--lt-line); border-radius: var(--lt-radius-lg); background: #fff; box-shadow: var(--lt-shadow-soft); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.panel-heading h2 { margin: 3px 0 5px; color: #101828; font-size: 1.25rem; letter-spacing: -.02em; }
.panel-heading p { font-size: .86rem; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }

.facebook-page-list { display: grid; gap: 10px; }
.facebook-page-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 14px; border: 1px solid #edf0f4; border-radius: 15px; background: #fbfcfe; }
.facebook-page-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: #1877f2; font-family: Arial, sans-serif; font-weight: 900; font-size: 1.35rem; }
.facebook-page-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.facebook-page-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facebook-page-copy small { color: var(--lt-muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection-state { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 999px; font-size: .71rem; font-weight: 750; white-space: nowrap; }
.connection-state i { width: 7px; height: 7px; border-radius: 50%; }
.connection-good { color: #166534; background: #dcfce7; }.connection-good i { background: #22c55e; }
.connection-warning { color: #92400e; background: #fef3c7; }.connection-warning i { background: #f59e0b; }
.connection-bad { color: #991b1b; background: #fee2e2; }.connection-bad i { background: #ef4444; }
.connection-neutral { color: #475569; background: #e2e8f0; }.connection-neutral i { background: #94a3b8; }
.empty-panel-state { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 20px; border: 1px dashed #cbd5e1; border-radius: 15px; background: #f8fafc; }
.empty-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: #64748b; background: #e2e8f0; font-size: 1.25rem; }
.empty-panel-state h3 { margin: 0 0 4px; }.empty-panel-state p { margin: 0; color: var(--lt-muted); font-size: .82rem; }

.function-grid { display: grid; gap: 10px; }
.function-card { min-height: 69px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #e9edf2; border-radius: 15px; color: var(--lt-text); background: #fff; text-decoration: none; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.function-card:hover { transform: translateX(3px); border-color: #bfdbfe; background: #f8fbff; }
.function-primary { border-color: #c7d2fe; background: linear-gradient(135deg, #eff6ff, #eef2ff); }
.function-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #1d4ed8; background: #dbeafe; font-size: 1.08rem; }
.function-card > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.function-card small { color: var(--lt-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.function-card b { color: #94a3b8; }

.activity-panel { margin-top: 20px; }
.activity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.activity-column { min-width: 0; }
.activity-column + .activity-column { padding-left: 22px; border-left: 1px solid var(--lt-line); }
.activity-column-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: #344054; font-size: .86rem; }
.activity-column-title span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; color: #1d4ed8; background: #eff6ff; }
.activity-list { display: grid; }
.activity-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 13px 4px; border-bottom: 1px solid #edf0f4; }
.activity-item:last-child { border-bottom: 0; }
.activity-status { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 4px #f1f5f9; }
.activity-published { background: #22c55e; box-shadow: 0 0 0 4px #dcfce7; }
.activity-failed { background: #ef4444; box-shadow: 0 0 0 4px #fee2e2; }
.activity-draft, .activity-pending, .activity-running { background: #f59e0b; box-shadow: 0 0 0 4px #fef3c7; }
.activity-simulated { background: #3b82f6; box-shadow: 0 0 0 4px #dbeafe; }
.activity-item > div { min-width: 0; }
.activity-item strong { display: block; margin-bottom: 3px; font-size: .84rem; }
.activity-item p { margin: 0 0 4px; color: #566074; font-size: .79rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-item small { color: #98a2b3; font-size: .69rem; }
.activity-item > a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #1d4ed8; background: #eff6ff; text-decoration: none; }
.activity-post-id { padding: 4px 6px; border-radius: 7px; color: #166534; background: #dcfce7; font-size: .62rem; font-weight: 800; }
.mini-empty-state { padding: 22px; border-radius: 14px; color: var(--lt-muted); background: #f8fafc; text-align: center; font-size: .82rem; }

/* Harmonisation des pages existantes dans le nouveau shell */
.app-content > h1,
.app-content .page-heading h1 { color: #101828; letter-spacing: -.025em; }
.app-content .card {
    border: 1px solid var(--lt-line);
    border-radius: var(--lt-radius-lg);
    box-shadow: var(--lt-shadow-soft);
}
.app-content input,
.app-content select,
.app-content textarea {
    border-color: #d9e0e8;
    border-radius: 11px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.app-content input:focus,
.app-content select:focus,
.app-content textarea:focus {
    outline: 0;
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}
.app-content button,
.app-content .button {
    border-radius: 11px;
    font-weight: 720;
    transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.app-content button:hover,
.app-content .button:hover { transform: translateY(-1px); filter: brightness(.98); }

.auth-body { background: #0f172a; }
.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 26px;
    padding: 28px;
    box-sizing: border-box;
    background:
        radial-gradient(circle at 20% 10%, rgba(59,130,246,.26), transparent 34%),
        radial-gradient(circle at 90% 85%, rgba(124,58,237,.22), transparent 35%),
        #0f172a;
}
.auth-brand { color: #fff; }
.auth-main { width: min(460px, 100%); margin: 0; padding: 0; }
.auth-main .card { margin: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 22px; box-shadow: 0 28px 70px rgba(0,0,0,.28); }
.auth-main .narrow { max-width: none; }

@media (max-width: 1180px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-main-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .app-sidebar { position: relative; height: auto; padding: 15px 18px; gap: 12px; overflow: visible; }
    .sidebar-brand { margin-right: auto; }
    .sidebar-workspace { display: none; }
    .sidebar-nav { flex-direction: row; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
    .sidebar-label, .sidebar-footer { display: none; }
    .nav-link { flex: 0 0 auto; min-height: 38px; padding: 0 11px; font-size: .8rem; }
    .nav-link:hover { transform: none; }
    .app-topbar { position: relative; padding: 12px 20px; }
    .app-content { width: min(100% - 32px, 1480px); padding-top: 24px; }
}

@media (max-width: 700px) {
    .user-copy { display: none; }
    .logout-button { padding: 7px 9px; }
    .workspace-hero { min-height: 0; align-items: flex-start; flex-direction: column; padding: 24px; }
    .metric-grid { grid-template-columns: 1fr; }
    .workspace-card-body, .activity-grid { grid-template-columns: 1fr; }
    .activity-column + .activity-column { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--lt-line); }
    .panel-heading { flex-direction: column; }
    .panel-actions { justify-content: flex-start; }
    .facebook-page-item { grid-template-columns: auto minmax(0,1fr); }
    .facebook-page-item .connection-state { grid-column: 1 / -1; justify-self: start; }
    .empty-panel-state { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .workspace-card-head { grid-template-columns: auto 1fr; }
    .workspace-card-head .status-badge { grid-column: 1 / -1; justify-self: start; }
    .topbar-context strong { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* =========================================================
   LegacyTech V5.2 - centre de fonctionnalités séparé
   ========================================================= */
.feature-center-hero,
.feature-detail-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
}
.feature-center-hero h1,
.feature-detail-heading h1 {
    margin: 5px 0 9px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -.045em;
    line-height: 1.03;
}
.feature-center-hero p,
.feature-detail-heading p {
    max-width: 820px;
    margin: 0;
    color: var(--lt-muted);
    font-size: 1rem;
    line-height: 1.65;
}
.feature-center-actions,
.feature-detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
.feature-center-actions .button,
.feature-detail-actions .button { margin: 0; }

.feature-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding: 17px 18px;
    border: 1px solid;
    border-radius: var(--lt-radius);
    box-shadow: var(--lt-shadow-soft);
}
.feature-alert > div { min-width: 0; flex: 1; }
.feature-alert strong { display: block; margin-bottom: 3px; }
.feature-alert p { margin: 0; line-height: 1.5; }
.feature-alert .button { margin: 0 0 0 auto; white-space: nowrap; }
.feature-alert-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    font-weight: 900;
}
.feature-alert-info { border-color: #bfdbfe; background: #eff6ff; color: #1e3a8a; }
.feature-alert-info .feature-alert-icon { background: #dbeafe; color: #1d4ed8; }
.feature-alert-warning { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.feature-alert-warning .feature-alert-icon { background: #ffedd5; color: #c2410c; }

.feature-section { margin: 34px 0; }
.feature-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 17px;
}
.feature-section-heading h2 { margin: 4px 0 5px; font-size: 1.55rem; letter-spacing: -.025em; }
.feature-section-heading p { margin: 0; color: var(--lt-muted); }
.feature-count {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--lt-line);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: .8rem;
    font-weight: 750;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}
.feature-grid-manual { grid-template-columns: minmax(0, 620px); }
.feature-product-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 21px;
    border: 1px solid var(--lt-line);
    border-radius: 20px;
    background: var(--lt-panel);
    box-shadow: var(--lt-shadow-soft);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feature-product-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: var(--lt-shadow);
}
.feature-product-primary {
    border-color: #bfdbfe;
    background:
        radial-gradient(circle at 100% 0%, rgba(59,130,246,.14), transparent 34%),
        linear-gradient(145deg, #fff, #f8fbff);
}
.feature-product-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 17px;
}
.feature-product-icon,
.feature-title-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 1.35rem;
    font-weight: 900;
}
.feature-icon-prayer { color: #7c2d12; background: #ffedd5; }
.feature-icon-weather { color: #a16207; background: #fef9c3; }
.feature-icon-cards { color: #6d28d9; background: #ede9fe; }
.feature-state {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.2;
}
.feature-state-ready { background: var(--lt-success-soft); color: var(--lt-success); }
.feature-state-attention { background: var(--lt-warning-soft); color: var(--lt-warning); }
.feature-state-warning,
.feature-state-blocked { background: var(--lt-danger-soft); color: var(--lt-danger); }
.feature-product-copy h3 { margin: 0 0 7px; font-size: 1.2rem; letter-spacing: -.018em; }
.feature-product-copy p { margin: 0; color: var(--lt-muted); line-height: 1.55; }
.feature-product-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 19px 0;
}
.feature-product-meta > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 11px;
    border: 1px solid #edf0f4;
    border-radius: 12px;
    background: #fafbfc;
    color: #475569;
    font-size: .78rem;
    overflow-wrap: anywhere;
}
.feature-product-meta b { color: #94a3b8; font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; }
.feature-product-stats {
    display: flex;
    gap: 16px;
    margin-top: auto;
    padding: 14px 0;
    border-top: 1px solid var(--lt-line);
    color: #64748b;
    font-size: .78rem;
}
.feature-product-stats strong { color: #0f172a; font-size: .95rem; }
.feature-stat-error strong { color: var(--lt-danger); }
.feature-product-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 -21px -21px;
    padding: 15px 21px;
    border-top: 1px solid var(--lt-line);
    background: #fbfcfe;
    color: var(--lt-primary-dark);
    text-decoration: none;
    font-weight: 800;
}
.feature-product-action:hover { background: var(--lt-primary-soft); }
.feature-product-action span { font-size: 1.15rem; }
.feature-empty-state {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 24px;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: rgba(255,255,255,.65);
}
.feature-empty-state > span { font-size: 1.8rem; color: #64748b; }
.feature-empty-state h3 { margin: 0 0 4px; }
.feature-empty-state p { margin: 0; color: var(--lt-muted); }

.feature-recent-panel { margin-top: 32px; }
.feature-run-list { display: grid; }
.feature-run-row {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto auto 24px;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 14px 2px;
    border-top: 1px solid var(--lt-line);
}
.feature-run-row:first-child { border-top: 0; }
.feature-run-row > a { color: var(--lt-primary); text-decoration: none; font-size: 1.15rem; font-weight: 800; }
.feature-run-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.feature-run-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feature-run-main small { color: var(--lt-muted); }
.feature-run-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; }
.feature-run-dot-published { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.1); }
.feature-run-dot-simulated { background: #3b82f6; box-shadow: 0 0 0 4px rgba(59,130,246,.1); }
.feature-run-dot-failed { background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.1); }
.feature-run-dot-running,
.feature-run-dot-pending { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.1); }
.feature-run-source,
.feature-post-id {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: .7rem;
    font-weight: 750;
    white-space: nowrap;
}

.feature-back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 13px;
    color: #475569;
    text-decoration: none;
    font-size: .83rem;
    font-weight: 700;
}
.feature-back-link:hover { color: var(--lt-primary); }
.feature-title-line { display: flex; align-items: flex-start; gap: 16px; }
.feature-detail-heading h1 { margin-top: 4px; font-size: clamp(1.9rem, 3vw, 2.7rem); }
.feature-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 23px;
    padding: 6px;
    border: 1px solid var(--lt-line);
    border-radius: 15px;
    background: #fff;
    box-shadow: var(--lt-shadow-soft);
    overflow-x: auto;
}
.feature-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 13px;
    border-radius: 10px;
    color: #64748b;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 750;
    white-space: nowrap;
}
.feature-tab:hover { color: #0f172a; background: #f8fafc; }
.feature-tab.active { color: #1d4ed8; background: #eff6ff; box-shadow: inset 0 0 0 1px #dbeafe; }
.feature-context-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 22px;
    border: 1px solid var(--lt-line);
    border-radius: 17px;
    background: var(--lt-line);
    overflow: hidden;
    box-shadow: var(--lt-shadow-soft);
}
.feature-context-bar > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px 16px;
    background: #fff;
}
.feature-context-bar small { color: #94a3b8; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.feature-context-bar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.feature-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    align-items: start;
    gap: 20px;
}
.feature-detail-main { min-width: 0; display: grid; gap: 20px; }
.feature-detail-aside { display: grid; gap: 15px; position: sticky; top: 96px; }
.feature-side-card {
    padding: 18px;
    border: 1px solid var(--lt-line);
    border-radius: 17px;
    background: #fff;
    box-shadow: var(--lt-shadow-soft);
}
.feature-side-card h2 { margin: 5px 0 8px; font-size: 1rem; }
.feature-side-card p { margin: 0; color: var(--lt-muted); font-size: .84rem; line-height: 1.55; }
.feature-side-card-accent { border-color: #bfdbfe; background: #f8fbff; }
.feature-side-list { display: grid; gap: 10px; margin: 17px 0 0; }
.feature-side-list > div { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid #eef2f6; }
.feature-side-list dt { color: #94a3b8; font-size: .73rem; }
.feature-side-list dd { margin: 0; text-align: right; color: #334155; font-size: .75rem; font-weight: 750; }
.feature-config-panel,
.feature-publish-panel,
.feature-history-panel { margin: 0; }
.feature-history-panel { margin-top: 22px; }
.feature-form-section {
    margin-top: 18px;
    padding-top: 19px;
    border-top: 1px solid var(--lt-line);
}
.feature-form-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.feature-form-section > h3,
.feature-form-heading h3 { margin: 0 0 13px; font-size: 1rem; }
.feature-form-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.feature-form-heading p { margin: -7px 0 0; color: var(--lt-muted); font-size: .82rem; }
.feature-save-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 22px -22px -22px;
    padding: 17px 22px;
    border-top: 1px solid var(--lt-line);
    border-radius: 0 0 var(--lt-radius) var(--lt-radius);
    background: #f8fafc;
}
.feature-save-bar > div { display: flex; flex-direction: column; gap: 3px; }
.feature-save-bar small { color: var(--lt-muted); }
.feature-save-bar button { margin: 0; min-width: 130px; }
.feature-asset-card,
.feature-content-card { border-radius: 15px; background: #fbfcfe; }
.feature-publish-form { margin-top: 0; padding-top: 0; border-top: 0; }
.feature-api-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 14px 15px;
    border: 1px solid;
    border-radius: 14px;
}
.feature-api-status p { margin: 3px 0 0; font-size: .8rem; }
.feature-api-ready { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.feature-api-warning { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.feature-api-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.feature-api-pills span {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(148,163,184,.18);
    color: #64748b;
    font-size: .7rem;
    font-weight: 800;
}
.feature-api-pills span.ok { background: #dcfce7; color: #166534; }
.feature-toggle-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.feature-schedule-toggle {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 10px !important;
    padding: 13px;
    border: 1px solid var(--lt-line);
    border-radius: 13px;
    background: #fbfcfe;
    cursor: pointer;
}
.feature-schedule-toggle:hover { border-color: #bfdbfe; background: #f8fbff; }
.feature-schedule-toggle input { width: auto; margin: 0; }
.feature-schedule-toggle span { display: flex; flex-direction: column; gap: 2px; }
.feature-schedule-toggle small { color: var(--lt-muted); }
.feature-content-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feature-content-title h3 { margin: 0; }
.feature-content-title span { padding: 4px 7px; border-radius: 999px; background: #eef2ff; color: #4338ca; font-size: .65rem; font-weight: 800; }
.feature-history-table td:last-child { min-width: 180px; }
.feature-history-table .feature-post-id { margin-left: 5px; }

@media (max-width: 1180px) {
    .feature-detail-layout { grid-template-columns: 1fr; }
    .feature-detail-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-context-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .feature-center-hero,
    .feature-detail-heading,
    .feature-section-heading { align-items: stretch; flex-direction: column; }
    .feature-center-actions,
    .feature-detail-actions { justify-content: flex-start; }
    .feature-product-meta { grid-template-columns: 1fr; }
    .feature-run-row { grid-template-columns: 12px minmax(0, 1fr) auto; }
    .feature-run-row .feature-run-source { display: none; }
    .feature-run-row > a { display: none; }
    .feature-toggle-cards { grid-template-columns: 1fr; }
    .feature-save-bar { align-items: stretch; flex-direction: column; }
    .feature-save-bar button { width: 100%; }
}
@media (max-width: 620px) {
    .feature-grid { grid-template-columns: 1fr; }
    .feature-grid-manual { grid-template-columns: 1fr; }
    .feature-alert { align-items: flex-start; flex-wrap: wrap; }
    .feature-alert .button { width: 100%; margin: 4px 0 0; text-align: center; }
    .feature-context-bar { grid-template-columns: 1fr; }
    .feature-detail-aside { grid-template-columns: 1fr; }
    .feature-title-line { align-items: center; }
    .feature-title-icon { width: 42px; height: 42px; flex-basis: 42px; }
}

/* BEGIN LEGACYTECH V5.2.1 MOBILE RESPONSIVE */

/* Prevent flex children from forcing the page wider than the viewport. */
.topbar-context,
.feature-center-hero > div:first-child,
.feature-detail-heading > div:first-child,
.feature-title-line > div:last-child {
    min-width: 0;
}

.topbar-user {
    flex: 0 0 auto;
}

.feature-center-hero h1,
.feature-detail-heading h1,
.feature-center-hero p,
.feature-detail-heading p {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

@media (max-width: 900px) {
    .app-sidebar,
    .sidebar-nav,
    .app-topbar,
    .app-content {
        min-width: 0;
        max-width: 100%;
    }

    .sidebar-nav {
        width: 100%;
        box-sizing: border-box;
        overscroll-behavior-inline: contain;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .nav-link {
        scroll-snap-align: start;
    }
}

@media (max-width: 700px) {
    .app-content {
        width: calc(100% - 24px);
        padding-top: 18px;
        padding-bottom: 34px;
    }

    .app-topbar {
        min-height: 64px;
        gap: 10px;
        padding: 10px 12px;
    }

    .topbar-context {
        flex: 1 1 auto;
    }

    .topbar-context strong {
        width: 100%;
        max-width: none;
    }

    .topbar-user {
        gap: 6px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .logout-button {
        margin-left: 0;
        padding: 7px 8px;
        font-size: .72rem;
    }

    .feature-detail-heading {
        gap: 18px;
        margin-bottom: 18px;
    }

    .feature-title-line {
        align-items: flex-start;
        gap: 11px;
    }

    .feature-title-line > div:last-child {
        flex: 1 1 auto;
    }

    .feature-detail-heading h1 {
        margin-top: 2px;
        font-size: clamp(1.55rem, 7vw, 2rem);
        line-height: 1.12;
        letter-spacing: -.035em;
    }

    .feature-detail-heading p {
        font-size: .9rem;
        line-height: 1.5;
    }

    .feature-detail-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
    }

    .feature-detail-actions .button {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 10px 8px;
        text-align: center;
        white-space: normal;
    }

    /* Full-width module selector on phones: no cut-off labels. */
    .feature-tabs {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        overflow: visible;
        margin-bottom: 18px;
        padding: 6px;
    }

    .feature-tab {
        width: 100%;
        box-sizing: border-box;
        justify-content: flex-start;
        white-space: normal;
        line-height: 1.3;
    }

    .feature-context-bar > div {
        padding: 13px 14px;
    }

    .feature-context-bar strong {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.35;
    }
}

@media (max-width: 480px) {
    .app-sidebar {
        gap: 10px;
        padding: 12px 12px 10px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 12px;
    }

    .brand-copy strong {
        font-size: .94rem;
    }

    .brand-copy small {
        font-size: .71rem;
    }

    .sidebar-nav {
        margin: 0 -4px;
        padding: 0 4px 4px;
    }

    .nav-link {
        min-height: 36px;
        gap: 7px;
        padding: 0 9px;
        font-size: .76rem;
    }

    .nav-icon {
        width: 18px;
        flex-basis: 18px;
        font-size: .95rem;
    }

    .topbar-eyebrow {
        font-size: .64rem;
    }

    .topbar-context strong {
        font-size: .9rem;
    }

    .user-avatar {
        display: none;
    }

    .logout-button {
        width: 34px;
        height: 34px;
        padding: 0;
        font-size: 0;
    }

    .logout-button::before {
        content: "↪";
        font-size: 1rem;
        line-height: 1;
    }

    .feature-back-link {
        margin-bottom: 10px;
    }

    .feature-title-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 12px;
        font-size: 1.05rem;
    }

    .section-kicker {
        font-size: .66rem;
    }

    .feature-detail-heading h1 {
        font-size: 1.48rem;
    }

    .feature-detail-actions .button {
        font-size: .78rem;
    }

    .feature-context-bar {
        border-radius: 14px;
    }
}

/* END LEGACYTECH V5.2.1 MOBILE RESPONSIVE */

/* BEGIN LEGACYTECH V5.3.0 EDITORIAL CALENDAR */
.heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.calendar-heading {
  margin-bottom: 22px;
}

.calendar-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.calendar-summary-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dfe5ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.calendar-summary-card span,
.calendar-summary-card small {
  display: block;
  color: #667085;
}

.calendar-summary-card strong {
  display: block;
  margin: 7px 0 4px;
  color: #101828;
  font-size: 1.9rem;
  line-height: 1;
}

.calendar-summary-card.is-alert {
  border-color: #fecaca;
  background: #fff7f7;
}

.calendar-summary-card.is-success {
  border-color: #bbf7d0;
  background: #f7fff9;
}

.calendar-panel {
  overflow: hidden;
  padding: 0;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid #e4e7ec;
  text-align: center;
}

.calendar-toolbar h2 {
  margin: 3px 0 0;
}

.calendar-arrow {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fff;
  color: #344054;
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
}

.calendar-arrow:hover {
  border-color: #6172f3;
  color: #3538cd;
}

.calendar-weekdays,
.editorial-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  border-bottom: 1px solid #e4e7ec;
  background: #f8fafc;
}

.calendar-weekdays span {
  padding: 10px;
  color: #667085;
  font-size: .76rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.calendar-day {
  min-width: 0;
  min-height: 152px;
  padding: 9px;
  border-right: 1px solid #e4e7ec;
  border-bottom: 1px solid #e4e7ec;
  background: #fff;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day.outside-month {
  background: #f9fafb;
  color: #98a2b3;
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px #6172f3;
}

.calendar-day-number {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 7px;
}

.calendar-day-number strong {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #344054;
}

.calendar-day.today .calendar-day-number strong {
  background: #3538cd;
  color: #fff;
}

.mobile-day-name {
  display: none;
}

.calendar-events {
  display: grid;
  gap: 5px;
}

.calendar-event {
  display: block;
  min-width: 0;
  padding: 7px 8px;
  border-left: 3px solid #6172f3;
  border-radius: 8px;
  background: #eef4ff;
  color: #1d2939;
  text-decoration: none;
}

.calendar-event span,
.calendar-event strong,
.calendar-event small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event span {
  color: #475467;
  font-size: .68rem;
}

.calendar-event strong {
  margin: 2px 0;
  font-size: .76rem;
}

.calendar-event small {
  color: #475467;
  font-size: .67rem;
}

.calendar-event.event-published {
  border-left-color: #16a34a;
  background: #ecfdf3;
}

.calendar-event.event-failed,
.calendar-event.event-manual_check {
  border-left-color: #dc2626;
  background: #fff1f2;
}

.calendar-event.event-processing {
  border-left-color: #d97706;
  background: #fffbeb;
}

.section-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-heading-row h2 {
  margin: 3px 0 0;
}

.queue-count {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-size: .78rem;
  font-weight: 800;
}

.editorial-queue-table td {
  vertical-align: top;
}

.empty-editorial-state {
  padding: 30px 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  text-align: center;
}

.empty-editorial-state p {
  margin-bottom: 0;
  color: #667085;
}

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

.recent-editorial-list a {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 14px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  color: #1d2939;
  text-decoration: none;
}

.recent-editorial-list a:hover {
  border-color: #a4bcfd;
  background: #f8faff;
}

.recent-editorial-list span,
.recent-editorial-list small {
  color: #667085;
}

.schedule-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .55fr);
  gap: 18px;
  align-items: end;
  margin: 20px 0;
  padding: 18px;
  border: 1px solid #d6e4ff;
  border-radius: 14px;
  background: #f8faff;
}

.schedule-editor h2 {
  margin: 4px 0;
}

.schedule-date-field {
  margin: 0;
}

.editorial-actions {
  align-items: stretch;
}

.calendar-button {
  background: #4f46e5;
}

.cancel-schedule-form {
  margin-top: 12px;
}

.schedule-alert {
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff1f2;
  color: #991b1b;
}

.schedule-alert.warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.schedule-alert p {
  margin: 5px 0 0;
  white-space: pre-wrap;
}

.published-draft-note {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
}

.settings-form {
  display: grid;
  gap: 20px;
}

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

.settings-form small {
  display: block;
  margin-top: 6px;
  color: #667085;
}

.draft-status-scheduled {
  background: #e0e7ff;
  color: #3730a3;
}

.draft-status-processing {
  background: #fef3c7;
  color: #92400e;
}

.draft-status-manual_check {
  background: #ffedd5;
  color: #9a3412;
}

button:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

@media (max-width: 1180px) {
  .calendar-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .recent-editorial-list,
  .settings-grid,
  .schedule-editor {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays {
    display: none;
  }

  .editorial-calendar-grid {
    display: block;
  }

  .calendar-day {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: 0;
    gap: 10px;
    border-right: 0;
    padding: 12px;
  }

  .calendar-day.outside-month {
    display: none;
  }

  .calendar-day-number {
    align-items: flex-start;
    justify-content: flex-start;
    gap: 7px;
    margin: 0;
  }

  .mobile-day-name {
    display: inline;
    color: #667085;
    font-size: .76rem;
    font-weight: 800;
  }

  .calendar-events {
    min-width: 0;
  }

  .calendar-event span,
  .calendar-event strong,
  .calendar-event small {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
}

@media (max-width: 620px) {
  .calendar-summary-grid {
    grid-template-columns: 1fr;
  }

  .calendar-toolbar {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    padding: 16px 12px;
  }

  .calendar-arrow {
    width: 36px;
    height: 36px;
  }

  .calendar-toolbar h2 {
    font-size: 1.08rem;
  }

  .calendar-day {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .heading-actions,
  .heading-actions .button,
  .editorial-actions,
  .editorial-actions .button,
  .cancel-schedule-form .button {
    width: 100%;
    box-sizing: border-box;
  }

  .heading-actions,
  .editorial-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
/* END LEGACYTECH V5.3.0 EDITORIAL CALENDAR */

/* BEGIN LEGACYTECH V5.4.0 INCIDENT RECOVERY */
.incident-aware-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.calendar-summary-card.is-warning {
  border-color: #fedf89;
  background: #fffaeb;
}

.draft-status-retry_wait {
  background: #fff3cd;
  color: #7a4d00;
}

.draft-status-publishing {
  background: #e0f2fe;
  color: #075985;
}

.event-retry_wait {
  border-color: #f59e0b;
  background: #fffbeb;
}

.retry-date {
  display: block;
  margin-top: 5px;
  color: #b54708;
  font-weight: 700;
}

.incident-code {
  display: inline-flex;
  margin: 5px 0 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #344054;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .72rem;
  font-weight: 800;
}

.incident-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.incident-summary-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .04);
}

.incident-summary-card span,
.incident-summary-card small {
  color: #667085;
}

.incident-summary-card strong {
  color: #101828;
  font-size: 1.65rem;
}

.incident-summary-card.retry {
  border-color: #fedf89;
  background: #fffaeb;
}

.incident-summary-card.processing {
  border-color: #b2ddff;
  background: #eff8ff;
}

.incident-summary-card.failed {
  border-color: #fecdca;
  background: #fef3f2;
}

.incident-summary-card.manual {
  border-color: #fed7aa;
  background: #fff7ed;
}

.incident-table td {
  min-width: 150px;
  vertical-align: top;
}

.incident-table td:first-child {
  min-width: 245px;
}

.incident-table td:nth-child(4) {
  min-width: 300px;
}

.incident-table td > small,
.incident-table td > strong {
  display: block;
}

.incident-table td > small {
  margin-top: 5px;
  color: #667085;
}

.incident-actions-cell {
  min-width: 210px;
}

.incident-resolution {
  margin-top: 8px;
  min-width: 310px;
}

.incident-resolution > summary {
  cursor: pointer;
  color: #b54708;
  font-weight: 800;
}

.resolution-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.resolution-grid form {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #f9fafb;
}

.resolution-grid label {
  margin: 0;
}

.confirm-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: .82rem;
  font-weight: 600;
}

.confirm-row input {
  flex: 0 0 auto;
  width: auto;
  margin-top: 2px;
}

.incident-history-list {
  display: grid;
  gap: 10px;
}

.incident-history-list article {
  display: grid;
  grid-template-columns: 150px minmax(190px, .7fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
}

.incident-history-list time {
  color: #667085;
  font-size: .82rem;
  font-weight: 700;
}

.incident-history-list details,
.incident-history-list pre {
  min-width: 0;
  margin: 0;
}

.incident-history-list summary {
  cursor: pointer;
  color: #475467;
  font-weight: 700;
}

.incident-history-list pre {
  margin-top: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.incident-note {
  border-color: #fedf89;
  background: #fffaeb;
}

.incident-empty-state {
  border-color: #abefc6;
  background: #ecfdf3;
}

@media (max-width: 1180px) {
  .incident-aware-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .incident-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .incident-history-list article {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .incident-aware-grid,
  .incident-summary-grid {
    grid-template-columns: 1fr;
  }

  .incident-resolution {
    min-width: 0;
  }

  .resolution-grid form,
  .resolution-grid .button {
    width: 100%;
    box-sizing: border-box;
  }
}
/* END LEGACYTECH V5.4.0 INCIDENT RECOVERY */

/* BEGIN LEGACYTECH V5.5.0 UNIFIED SUPERVISION */
.supervision-hero {
  align-items: center;
}

.supervision-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.supervision-kpi {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  padding: 20px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.supervision-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #64748b;
}

.supervision-kpi.state-healthy::before { background: #16a34a; }
.supervision-kpi.state-warning::before,
.supervision-kpi.state-stale::before { background: #d97706; }
.supervision-kpi.state-error::before { background: #dc2626; }
.supervision-kpi.state-running::before { background: #2563eb; }

.supervision-kpi > span,
.supervision-detail-grid span {
  display: block;
  margin-bottom: 9px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.supervision-kpi strong {
  display: block;
  color: #0f172a;
  font-size: 1.45rem;
  line-height: 1.15;
}

.supervision-kpi small {
  display: block;
  margin-top: 12px;
  color: #64748b;
  line-height: 1.45;
}

.supervision-panel {
  margin-bottom: 20px;
}

.supervision-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
}

.supervision-badge.state-healthy { background: #dcfce7; color: #166534; }
.supervision-badge.state-warning,
.supervision-badge.state-stale { background: #fef3c7; color: #92400e; }
.supervision-badge.state-error { background: #fee2e2; color: #991b1b; }
.supervision-badge.state-running { background: #dbeafe; color: #1d4ed8; }
.supervision-badge.state-unknown { background: #e2e8f0; color: #475569; }

.supervision-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.supervision-detail-grid > div {
  padding: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.supervision-detail-grid strong {
  color: #0f172a;
  font-size: 0.96rem;
}

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

.supervision-page-card {
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #64748b;
  border-radius: 16px;
  background: #fff;
}

.supervision-page-card.state-healthy { border-left-color: #16a34a; }
.supervision-page-card.state-warning,
.supervision-page-card.state-stale { border-left-color: #d97706; }
.supervision-page-card.state-error { border-left-color: #dc2626; }

.supervision-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.supervision-page-heading strong,
.supervision-page-heading small {
  display: block;
}

.supervision-page-heading small {
  margin-top: 4px;
  color: #64748b;
}

.supervision-page-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.supervision-page-card dl > div {
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
}

.supervision-page-card dt {
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
}

.supervision-page-card dd {
  margin: 5px 0 0;
  color: #0f172a;
  font-weight: 700;
}

.supervision-error {
  margin: 14px 0 0;
  padding: 11px 13px;
  border-radius: 12px;
  background: #fff1f2;
  color: #9f1239;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.supervision-table {
  width: 100%;
  border-collapse: collapse;
}

.supervision-table th,
.supervision-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.supervision-table th {
  color: #64748b;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.supervision-table td small {
  display: block;
  margin-top: 5px;
  color: #64748b;
}

.supervision-message {
  min-width: 220px;
  max-width: 420px;
  color: #475569;
  overflow-wrap: anywhere;
}

.supervision-actions form {
  margin: 0 0 8px;
}

.supervision-resolution {
  min-width: 240px;
}

.supervision-resolution summary {
  cursor: pointer;
  color: #1d4ed8;
  font-weight: 800;
}

.supervision-resolution form {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.supervision-resolution label {
  display: block;
  margin-bottom: 8px;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
}

.supervision-resolution input[type="text"],
.supervision-resolution input:not([type]) {
  width: 100%;
  margin-top: 5px;
}

.supervision-resolution .check-line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.run-retry_wait { background: #fef3c7; color: #92400e; }
.run-manual_check { background: #fee2e2; color: #991b1b; }
.run-running { background: #dbeafe; color: #1d4ed8; }
.feature-run-dot-retry_wait { background: #d97706; }
.feature-run-dot-manual_check { background: #dc2626; }
.feature-run-dot-running { background: #2563eb; }

@media (max-width: 1100px) {
  .supervision-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supervision-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .supervision-kpis,
  .supervision-detail-grid,
  .supervision-page-grid,
  .supervision-page-card dl {
    grid-template-columns: 1fr;
  }

  .supervision-page-heading {
    align-items: stretch;
    flex-direction: column;
  }
}
/* END LEGACYTECH V5.5.0 UNIFIED SUPERVISION */


/* BEGIN LEGACYTECH V5.6.0 PROACTIVE ALERTS */
.nav-badge{margin-left:auto;min-width:1.45rem;height:1.45rem;padding:0 .4rem;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:#dc2626;color:#fff;font-size:.75rem;font-weight:800}.alert-center-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:1rem}.alert-card{border:1px solid var(--border,#d9dee8);border-left-width:5px;border-radius:14px;padding:1.15rem;background:#fff}.alert-card h2{font-size:1.05rem;margin:.35rem 0}.alert-card p{color:#52606d;min-height:3rem}.alert-level{text-transform:uppercase;letter-spacing:.08em;font-size:.72rem;font-weight:800}.alert-critical{border-left-color:#dc2626}.alert-warning{border-left-color:#d97706}.alert-info{border-left-color:#2563eb}.alert-inline-list{display:flex;flex-wrap:wrap;gap:.55rem}.alert-chip{border-radius:999px;padding:.4rem .7rem;font-size:.78rem;font-weight:700;background:#eef2f7}.alert-chip.alert-critical{background:#fee2e2;color:#991b1b}.alert-chip.alert-warning{background:#fef3c7;color:#92400e}.alert-chip.alert-info{background:#dbeafe;color:#1e40af}@media(max-width:700px){.alert-center-grid{grid-template-columns:1fr}}
/* END LEGACYTECH V5.6.0 PROACTIVE ALERTS */
/* BEGIN LEGACYTECH V5.7 ALERT LIFECYCLE */
.alert-actions{display:flex;flex-wrap:wrap;gap:.55rem;align-items:center;margin-top:1rem}.alert-actions form{display:flex;gap:.45rem;align-items:center;margin:0}.alert-actions select{min-height:38px;border:1px solid var(--border,#d8dee8);border-radius:8px;background:var(--surface,#fff);padding:.35rem .55rem}.alert-history-panel{margin-top:1.25rem}.alert-lifecycle-list{display:grid;gap:.75rem}.alert-lifecycle-row{display:flex;justify-content:space-between;gap:1rem;align-items:center;padding:.9rem 0;border-bottom:1px solid var(--border,#e5e7eb)}.alert-lifecycle-row:last-child{border-bottom:0}.alert-lifecycle-row p{margin:.25rem 0}.alert-lifecycle-row small{opacity:.7}@media(max-width:720px){.alert-actions,.alert-actions form,.alert-lifecycle-row{align-items:stretch;flex-direction:column}.alert-actions .button,.alert-actions select,.alert-lifecycle-row .button{width:100%}}
/* END LEGACYTECH V5.7 ALERT LIFECYCLE */
/* BEGIN LEGACYTECH V5.8 ALERT REPORTING */
.alert-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;margin:0 0 1.2rem}.alert-summary-grid>div{display:flex;flex-direction:column;padding:1rem;border:1px solid var(--border,#e5e7eb);border-radius:14px;background:var(--surface,#fff)}.alert-summary-grid strong{font-size:1.5rem}.alert-summary-grid span{font-size:.8rem;color:#64748b}.alert-meta{margin-top:.75rem;font-size:.76rem;color:#64748b;line-height:1.4}@media(max-width:700px){.alert-summary-grid{grid-template-columns:1fr}}
/* END LEGACYTECH V5.8 ALERT REPORTING */
/* BEGIN LEGACYTECH V5.9 ALERT FILTERS */
.alert-filter-bar{display:grid;grid-template-columns:minmax(220px,2fr) repeat(2,minmax(150px,1fr)) auto;gap:.8rem;align-items:end;margin:0 0 .6rem;padding:1rem;border:1px solid var(--border,#e5e7eb);border-radius:14px;background:var(--surface,#fff)}.alert-filter-bar label{display:grid;gap:.35rem;color:#475569;font-size:.78rem;font-weight:800}.alert-filter-bar input,.alert-filter-bar select{width:100%;min-height:40px;border:1px solid var(--border,#d8dee8);border-radius:9px;background:#fff;padding:.45rem .65rem}.alert-filter-actions{display:flex;gap:.5rem;align-items:center}.alert-filter-result{margin:.25rem 0 1rem;color:#64748b;font-size:.85rem}@media(max-width:900px){.alert-filter-bar{grid-template-columns:1fr 1fr}.alert-filter-bar label:first-child{grid-column:1/-1}}@media(max-width:620px){.alert-filter-bar{grid-template-columns:1fr}.alert-filter-bar label:first-child{grid-column:auto}.alert-filter-actions{align-items:stretch;flex-direction:column}.alert-filter-actions .button{width:100%}}
/* END LEGACYTECH V5.9 ALERT FILTERS */
/* BEGIN LEGACYTECH V5.10 ALERT PAGINATION */
.alert-filter-bar{grid-template-columns:minmax(220px,2fr) repeat(4,minmax(135px,1fr)) auto}.alert-pagination{display:flex;align-items:center;justify-content:center;gap:.8rem;margin:1rem 0;padding:.8rem}.alert-pagination span{color:#64748b;font-size:.85rem;font-weight:700;text-align:center}@media(max-width:1180px){.alert-filter-bar{grid-template-columns:repeat(3,minmax(0,1fr))}.alert-filter-bar label:first-child{grid-column:1/-1}.alert-filter-actions{grid-column:1/-1}}@media(max-width:700px){.alert-filter-bar{grid-template-columns:1fr}.alert-filter-bar label:first-child,.alert-filter-actions{grid-column:auto}.alert-pagination{align-items:stretch;flex-direction:column}.alert-pagination .button{width:100%}}
/* END LEGACYTECH V5.10 ALERT PAGINATION */

/* V6.0 - espace editorial */
.editorial-filter-bar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:18px 0}.editorial-filter-bar label{display:grid;gap:6px;min-width:210px}.editorial-filter-bar input,.editorial-filter-bar select,.reschedule-form input{padding:9px 11px;border:1px solid #cbd5e1;border-radius:8px;background:#fff}.draft-board{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}.draft-card{border:1px solid #e2e8f0;border-radius:12px;padding:15px;background:#fff;display:flex;flex-direction:column;gap:10px}.draft-card-top{display:flex;justify-content:space-between;gap:10px;align-items:center}.draft-card p{margin:0;color:#475569;line-height:1.45}.draft-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto}.reschedule-details{display:inline-block;margin:3px}.reschedule-details summary{cursor:pointer;color:#334155;font-weight:600}.reschedule-form{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:7px;min-width:260px}@media(max-width:700px){.editorial-filter-bar label{min-width:100%;width:100%}.editorial-filter-bar input,.editorial-filter-bar select{width:100%}.draft-board{grid-template-columns:1fr}}

/* V5.11 workflow editorial */
.review-decision-panel{margin-top:1.25rem;padding:1rem;border:1px solid var(--border,#d8dee9);border-radius:14px;background:#fff}
.review-decision-panel textarea{width:100%;margin-top:.4rem}
.draft-status-pending_review{background:#fff3cd;color:#7a5200}
.draft-status-approved{background:#d1fae5;color:#065f46}
.draft-status-rejected{background:#fee2e2;color:#991b1b}
.schedule-alert.success{background:#ecfdf5;border-color:#a7f3d0;color:#065f46}

/* V6.2 Bibliothèque et identité visuelle */
.filter-grid,.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;align-items:end}.filter-actions,.library-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.library-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px;margin-top:18px}.library-card{display:flex;flex-direction:column;gap:14px}.library-card h3{margin:7px 0 2px}.library-preview{width:100%;height:220px;object-fit:cover;border-radius:14px;border:1px solid var(--border)}.library-content{white-space:pre-wrap;font-family:inherit;background:var(--surface-soft);padding:14px;border-radius:12px;max-height:220px;overflow:auto}.library-actions{margin-top:auto}.library-actions form:first-child{display:flex;gap:8px;flex:1}.library-actions select{min-width:120px}.brand-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:20px}.brand-preview{border-top:8px solid var(--brand-primary);box-shadow:inset 0 -8px 0 var(--brand-secondary)}.brand-preview h2{color:var(--brand-primary)}.brand-preview strong{color:var(--brand-secondary)}@media(max-width:800px){.brand-layout{grid-template-columns:1fr}}

/* V6.3 - Statistiques et rapports */
.stats-page{display:grid;gap:20px}.page-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.page-heading h1{margin:4px 0 6px}.page-heading p{margin:0;color:#64748b}.eyebrow{font-size:.76rem;text-transform:uppercase;letter-spacing:.09em;color:#64748b;font-weight:700}.heading-actions,.period-tabs{display:flex;gap:10px;flex-wrap:wrap}.period-tab{padding:8px 14px;border:1px solid #dbe3ee;border-radius:999px;text-decoration:none;color:#334155;background:#fff;font-weight:650}.period-tab.active{background:#111827;color:#fff;border-color:#111827}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.metric-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:18px;box-shadow:0 6px 18px rgba(15,23,42,.04)}.metric-card span,.metric-card small{display:block;color:#64748b}.metric-card strong{display:block;font-size:2rem;margin:8px 0}.stats-two-columns{display:grid;grid-template-columns:2fr 1fr;gap:16px}.panel{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:18px}.panel h2{margin:0 0 16px;font-size:1.05rem}.mini-bars{height:150px;display:flex;align-items:flex-end;gap:4px;border-bottom:1px solid #cbd5e1;padding-top:10px}.mini-bar{flex:1;height:100%;display:flex;align-items:flex-end}.mini-bar i{display:block;width:100%;min-height:2px;background:#2563eb;border-radius:3px 3px 0 0}.chart-caption{display:flex;justify-content:space-between;margin-top:8px;color:#64748b;font-size:.78rem}.stats-facts{display:grid;gap:12px;margin:0}.stats-facts div{padding-bottom:10px;border-bottom:1px solid #eef2f7}.stats-facts dt{color:#64748b;font-size:.8rem}.stats-facts dd{margin:4px 0 0;font-weight:700}.table-wrap{overflow:auto}.table-wrap table{width:100%;border-collapse:collapse}.table-wrap th,.table-wrap td{text-align:left;padding:11px 10px;border-bottom:1px solid #edf2f7;vertical-align:top}.table-wrap th{font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;color:#64748b}.empty-cell{text-align:center!important;color:#64748b;padding:28px!important}.error-text{max-width:460px;word-break:break-word}@media(max-width:900px){.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stats-two-columns{grid-template-columns:1fr}.page-heading{display:grid}}@media(max-width:560px){.metric-grid{grid-template-columns:1fr}}@media print{.app-sidebar,.app-topbar,.heading-actions,.period-tabs{display:none!important}.app-stage,.app-content{margin:0!important;padding:0!important}.panel,.metric-card{box-shadow:none;break-inside:avoid}.stats-page{font-size:11pt}}

/* V6.4 Onboarding et abonnements */
.subscription-progress{height:12px;background:#e5e7eb;border-radius:999px;overflow:hidden;margin:12px 0}.subscription-progress-bar{height:100%;background:linear-gradient(90deg,#111827,#2563eb)}.onboarding-steps{display:grid;gap:10px;margin-top:18px}.onboarding-step{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #e5e7eb;border-radius:12px}.onboarding-step>span{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#e5e7eb}.onboarding-step.done{border-color:#bbf7d0;background:#f0fdf4}.onboarding-step.done>span{background:#16a34a;color:white}.metric-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin:16px 0}.metric-grid article{padding:16px;border:1px solid #e5e7eb;border-radius:14px;background:#fff}.metric-grid article span,.metric-grid article small{display:block;color:#6b7280}.metric-grid article strong{display:block;font-size:1.35rem;margin:4px 0}.button-row{display:flex;gap:10px;flex-wrap:wrap}.tag-list{display:flex;gap:8px;flex-wrap:wrap}.page-heading.compact{margin-bottom:10px}.subscription-admin-card details{margin-top:14px}

.email-preview-frame{margin-top:16px;border:1px solid #dbe3ee;border-radius:14px;overflow:auto;background:#f4f6f8;max-height:620px}.email-preview-frame>div{min-width:520px}.tag-list .badge{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.card details{margin:12px 0}.card details pre{max-height:360px;overflow:auto;background:#f8fafc;padding:14px;border-radius:10px}

/* =========================================================
   LegacyTech V8.4 - UX/UI simplifiée et interface FR/AR
   ========================================================= */
:root {
  --lt-sidebar-width: 276px;
  --lt-topbar-height: 72px;
  --lt-bg: #f4f7fb;
  --lt-panel: #ffffff;
  --lt-border: #e2e8f0;
  --lt-text: #172033;
  --lt-muted: #667085;
  --lt-accent: #2563eb;
  --lt-accent-soft: #eff6ff;
  --lt-sidebar: #0f172a;
  --lt-sidebar-hover: rgba(255,255,255,.08);
}
html[dir="rtl"] body { font-family: Tahoma, Arial, sans-serif; }
.app-body { background: var(--lt-bg); color: var(--lt-text); }
.app-shell { min-height:100vh; display:grid; grid-template-columns:var(--lt-sidebar-width) minmax(0,1fr); }
.app-sidebar { width:auto; min-width:0; background:var(--lt-sidebar); color:#fff; position:sticky; top:0; height:100vh; overflow:auto; padding:16px 12px; z-index:50; }
.sidebar-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.sidebar-brand { min-width:0; }
.sidebar-close { display:none; border:0; background:transparent; color:#fff; font-size:1.7rem; padding:4px 8px; }
.sidebar-workspace { margin:14px 4px 10px; padding:12px; border:1px solid rgba(255,255,255,.1); background:rgba(255,255,255,.05); border-radius:14px; }
.sidebar-nav { display:flex; flex-direction:column; gap:5px; padding:4px 0 16px; }
.nav-link-home { margin:4px 0 8px; }
.nav-group { border:0; margin:0; }
.nav-group > summary { list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; color:#94a3b8; font-size:.73rem; font-weight:800; letter-spacing:.07em; text-transform:uppercase; border-radius:10px; user-select:none; }
.nav-group > summary::-webkit-details-marker { display:none; }
.nav-group > summary:hover { color:#fff; background:rgba(255,255,255,.04); }
.nav-group > summary b { transition:transform .2s ease; font-size:1rem; }
.nav-group[open] > summary b { transform:rotate(180deg); }
.nav-group-links { display:flex; flex-direction:column; gap:3px; padding:2px 0 7px; }
.app-sidebar .nav-link { min-height:42px; display:flex; align-items:center; gap:11px; padding:9px 12px; border-radius:11px; color:#d7deea; text-decoration:none; font-weight:600; line-height:1.2; }
.app-sidebar .nav-link:hover { background:var(--lt-sidebar-hover); color:#fff; }
.app-sidebar .nav-link.active { color:#fff; background:#2563eb; box-shadow:0 8px 20px rgba(37,99,235,.22); }
.nav-icon { width:21px; min-width:21px; text-align:center; opacity:.9; }
.nav-badge { margin-inline-start:auto; min-width:20px; text-align:center; padding:2px 6px; border-radius:999px; background:#ef4444; color:#fff; font-size:.72rem; }
.sidebar-footer { position:static; margin-top:8px; padding:10px 8px; }
.platform-indicator { display:flex; align-items:center; gap:8px; color:#94a3b8; font-size:.78rem; }
.platform-indicator i { width:8px; height:8px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 4px rgba(34,197,94,.12); }
.app-stage { min-width:0; }
.app-topbar { min-height:var(--lt-topbar-height); height:auto; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:12px 24px; background:rgba(255,255,255,.96); border-bottom:1px solid var(--lt-border); position:sticky; top:0; z-index:35; backdrop-filter:blur(10px); }
.topbar-left,.topbar-actions { display:flex; align-items:center; gap:14px; min-width:0; }
.topbar-context { min-width:0; }
.topbar-context strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mobile-menu-button { display:none; border:1px solid var(--lt-border); background:#fff; width:42px; height:42px; border-radius:11px; font-size:1.15rem; }
.language-switcher { display:inline-flex; align-items:center; padding:3px; border:1px solid var(--lt-border); background:#f8fafc; border-radius:10px; white-space:nowrap; }
.language-switcher a { padding:7px 10px; border-radius:7px; text-decoration:none; color:#475467; font-size:.82rem; font-weight:800; }
.language-switcher a.active { background:#fff; color:var(--lt-accent); box-shadow:0 1px 4px rgba(15,23,42,.12); }
.account-menu { position:relative; }
.account-menu > summary { list-style:none; display:flex; align-items:center; gap:9px; cursor:pointer; padding:4px 7px; border-radius:12px; }
.account-menu > summary::-webkit-details-marker { display:none; }
.account-menu > summary:hover { background:#f1f5f9; }
.account-menu > summary b { color:#667085; }
.account-dropdown { position:absolute; inset-inline-end:0; top:calc(100% + 9px); width:245px; padding:8px; border:1px solid var(--lt-border); background:#fff; border-radius:14px; box-shadow:0 18px 45px rgba(15,23,42,.15); display:flex; flex-direction:column; z-index:70; }
.account-dropdown a,.account-dropdown button { display:block; width:100%; text-align:start; padding:9px 10px; border-radius:9px; color:#344054; background:transparent; border:0; text-decoration:none; font:inherit; cursor:pointer; }
.account-dropdown a:hover,.account-dropdown button:hover { background:#f1f5f9; }
.account-email { padding:8px 10px 10px; margin-bottom:4px; border-bottom:1px solid var(--lt-border); font-size:.78rem; color:var(--lt-muted); overflow-wrap:anywhere; }
.account-dropdown form { margin:4px 0 0; padding-top:4px; border-top:1px solid var(--lt-border); }
.account-dropdown .logout-button { color:#b42318; }
.app-content { width:100%; max-width:1500px; margin:0 auto; padding:26px clamp(16px,3vw,38px) 48px; }
.compact-heading { margin-bottom:20px; }
.compact-heading h1 { max-width:760px; }
.compact-heading p { max-width:720px; }
.compact-launch-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.card, .workspace-card, .launch-card { border-color:var(--lt-border); box-shadow:0 8px 24px rgba(15,23,42,.045); }
.card { border-radius:16px; }
.auth-shell { min-height:100vh; background:radial-gradient(circle at 15% 10%,#e8f0ff 0,transparent 34%),linear-gradient(145deg,#f8fafc,#eef3f9); }
.auth-header { width:100%; max-width:1180px; margin:0 auto; padding:22px clamp(18px,4vw,36px); display:flex; justify-content:space-between; align-items:center; }
.auth-main { min-height:calc(100vh - 92px); display:grid; place-items:center; padding:24px; }
.login-card { width:min(100%,430px); padding:30px; }
.login-heading { margin-bottom:22px; }
.login-heading h1 { margin:5px 0 0; }
.auth-form { display:grid; gap:16px; }
.button-wide { width:100%; min-height:46px; }
.auth-help { text-align:center; margin:18px 0 0; }
.mobile-sidebar-backdrop { display:none; }

html[dir="rtl"] .brand-copy,
html[dir="rtl"] .topbar-context,
html[dir="rtl"] .user-copy,
html[dir="rtl"] .workspace-card,
html[dir="rtl"] .card,
html[dir="rtl"] label,
html[dir="rtl"] th,
html[dir="rtl"] td { text-align:right; }
html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] select { text-align:right; }
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="url"], html[dir="rtl"] input[type="number"], html[dir="rtl"] code { direction:ltr; text-align:left; }
html[dir="rtl"] .workspace-open span, html[dir="rtl"] .launch-card > b { transform:rotate(180deg); }
html[dir="rtl"] .table-wrap { direction:rtl; }

@media (max-width:1100px) {
  .app-shell { grid-template-columns:1fr; }
  .app-sidebar { position:fixed; inset-block:0; inset-inline-start:0; width:min(88vw,var(--lt-sidebar-width)); transform:translateX(-110%); transition:transform .22s ease; box-shadow:20px 0 50px rgba(15,23,42,.25); }
  html[dir="rtl"] .app-sidebar { transform:translateX(110%); box-shadow:-20px 0 50px rgba(15,23,42,.25); }
  .sidebar-visible .app-sidebar { transform:translateX(0); }
  .sidebar-visible .mobile-sidebar-backdrop { display:block; position:fixed; inset:0; background:rgba(15,23,42,.52); z-index:45; }
  .sidebar-close,.mobile-menu-button { display:inline-grid; place-items:center; }
  .compact-launch-grid { grid-template-columns:1fr; }
}
@media (max-width:720px) {
  .app-topbar { padding:10px 13px; }
  .topbar-eyebrow,.user-copy { display:none; }
  .language-switcher a { padding:6px 8px; }
  .app-content { padding:18px 13px 36px; }
  .login-card { padding:23px 20px; }
  .auth-header { padding:16px; }
  .account-dropdown { position:fixed; inset-inline:12px; top:70px; width:auto; }
}

/* V8.4.1 - complete Arabic interface */
html[dir="rtl"] body.full-arabic-ui { font-family: Tahoma, Arial, sans-serif; }
html[dir="rtl"] body.full-arabic-ui .app-content,
html[dir="rtl"] body.full-arabic-ui .auth-main { text-align: right; }
html[dir="rtl"] body.full-arabic-ui table { direction: rtl; text-align: right; }
html[dir="rtl"] body.full-arabic-ui th,
html[dir="rtl"] body.full-arabic-ui td { text-align: right; }
html[dir="rtl"] body.full-arabic-ui input,
html[dir="rtl"] body.full-arabic-ui select,
html[dir="rtl"] body.full-arabic-ui textarea { text-align: right; direction: rtl; }
html[dir="rtl"] body.full-arabic-ui input[type="email"],
html[dir="rtl"] body.full-arabic-ui input[type="url"],
html[dir="rtl"] body.full-arabic-ui input[type="number"],
html[dir="rtl"] body.full-arabic-ui input[type="datetime-local"] { direction: ltr; text-align: left; }
html[dir="rtl"] body.full-arabic-ui .button-row,
html[dir="rtl"] body.full-arabic-ui .actions,
html[dir="rtl"] body.full-arabic-ui .toolbar { flex-direction: row-reverse; }
html[dir="rtl"] body.full-arabic-ui .flash,
html[dir="rtl"] body.full-arabic-ui .card,
html[dir="rtl"] body.full-arabic-ui .panel { text-align: right; }

/* =========================================================
   LegacyTech V8.5 - Dashboard clair et parcours prioritaires
   ========================================================= */
.focus-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:18px;padding:26px 28px;border:1px solid #dbe5f3;border-radius:22px;background:linear-gradient(135deg,#fff 0%,#f5f9ff 68%,#e9f2ff 100%);box-shadow:0 14px 34px rgba(15,23,42,.06)}
.focus-hero-copy{max-width:790px}.focus-hero h1{margin:6px 0 7px;font-size:clamp(1.7rem,3vw,2.45rem);line-height:1.1}.focus-hero p{margin:0;color:#5f6c80;max-width:720px}.action-priority-panel{margin-bottom:18px;padding:22px;border:1px solid var(--lt-border);border-radius:20px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.045)}
.action-priority-heading h2{margin:4px 0 5px}.action-priority-heading p{margin:0;color:var(--lt-muted)}.priority-action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}.priority-action{position:relative;display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;align-items:center;gap:12px;min-height:100px;padding:16px;border:1px solid #dbe3ee;border-radius:16px;background:#fff;color:#1e293b;text-decoration:none;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}.priority-action:hover{transform:translateY(-2px);border-color:#93b4f5;box-shadow:0 12px 26px rgba(37,99,235,.1)}.priority-action-primary{background:linear-gradient(135deg,#1d4ed8,#2563eb);border-color:#2563eb;color:#fff;box-shadow:0 12px 26px rgba(37,99,235,.22)}.priority-action-primary:hover{border-color:#1d4ed8}.priority-number{position:absolute;top:9px;inset-inline-start:10px;width:20px;height:20px;display:grid;place-items:center;border-radius:999px;background:rgba(100,116,139,.12);font-size:.69rem;font-weight:900}.priority-action-primary .priority-number{background:rgba(255,255,255,.17)}.priority-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:13px;background:#eff6ff;color:#2563eb;font-size:1.2rem}.priority-action-primary .priority-icon{background:rgba(255,255,255,.15);color:#fff}.priority-copy{display:grid;gap:4px}.priority-copy strong{font-size:1rem}.priority-copy small{color:#64748b;line-height:1.35}.priority-action-primary .priority-copy small{color:#dbeafe}.priority-action>b{font-size:1.1rem}
.compact-metric-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}.compact-metric{display:flex;align-items:center;gap:12px;padding:15px 16px;border:1px solid var(--lt-border);border-radius:16px;background:#fff;box-shadow:0 7px 20px rgba(15,23,42,.035)}.compact-metric .metric-icon{width:38px;height:38px;min-width:38px;border-radius:12px;display:grid;place-items:center}.compact-metric div{min-width:0}.compact-metric small{display:block;color:#667085;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.compact-metric strong{font-size:1.45rem;line-height:1.15}.compact-metric p{margin:1px 0 0;color:#94a3b8;font-size:.76rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-focus-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,.75fr);gap:18px;margin-bottom:18px}.compact-panel-heading{margin-bottom:14px}.compact-panel-heading h2{margin:3px 0 4px}.compact-panel-heading p{margin:0}.connection-summary{display:grid;grid-template-columns:130px minmax(0,1fr);gap:16px;align-items:start}.connection-score{aspect-ratio:1;border-radius:18px;display:grid;place-content:center;text-align:center;background:#f8fafc;border:1px solid #e2e8f0}.connection-score strong{font-size:1.9rem}.connection-score span{max-width:90px;color:#64748b;font-size:.75rem}.connection-score.is-good{background:#ecfdf3;border-color:#bbf7d0;color:#15803d}.connection-score.is-warning{background:#fffbeb;border-color:#fde68a;color:#a16207}.connection-score.is-bad{background:#fff1f2;border-color:#fecdd3;color:#be123c}.compact-page-list{gap:8px}.compact-page-list .facebook-page-item{padding:11px 12px}.quick-link-list{display:grid;gap:8px}.quick-link-list>a{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px;border:1px solid #e5eaf1;border-radius:13px;color:#1f2937;text-decoration:none;background:#fff}.quick-link-list>a:hover{border-color:#93b4f5;background:#f8fbff}.quick-link-list>a>span{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#f1f5f9;color:#2563eb}.quick-link-list strong,.quick-link-list small{display:block}.quick-link-list small{margin-top:2px;color:#7c8799;line-height:1.25}.simplified-activity-panel .activity-grid{gap:16px}.simplified-activity-panel .activity-item{padding:11px 0}.simplified-activity-panel .activity-list{max-height:410px;overflow:auto;padding-inline-end:4px}.action-empty-state{min-height:180px}
html[dir="rtl"] .priority-action>b,html[dir="rtl"] .quick-link-list>a>b{transform:rotate(180deg)}
@media(max-width:1180px){.priority-action-grid{grid-template-columns:1fr}.compact-metric-row{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-focus-grid{grid-template-columns:1fr}.connection-summary{grid-template-columns:110px minmax(0,1fr)}}
@media(max-width:720px){.focus-hero{align-items:stretch;flex-direction:column;padding:20px}.focus-hero .button{width:100%}.compact-metric-row{grid-template-columns:1fr}.connection-summary{grid-template-columns:1fr}.connection-score{aspect-ratio:auto;min-height:100px}.priority-action{grid-template-columns:auto minmax(0,1fr) auto;padding:15px 13px}.priority-number{display:none}.activity-grid{grid-template-columns:1fr}.panel-heading.compact-panel-heading{align-items:stretch;flex-direction:column}.panel-heading.compact-panel-heading .panel-actions{width:100%;display:grid;grid-template-columns:1fr}.panel-heading.compact-panel-heading .button{width:100%}}

/* LegacyTech V8.6.0 — Visual identity and unified design system */
:root {
  --lt-bg: #f5f7fb;
  --lt-surface: #ffffff;
  --lt-surface-soft: #f8fafc;
  --lt-surface-strong: #eef2f7;
  --lt-text: #182230;
  --lt-muted: #667085;
  --lt-border: #e4e7ec;
  --lt-border-strong: #d0d5dd;
  --lt-primary: #155eef;
  --lt-primary-dark: #004eeb;
  --lt-primary-soft: #eff4ff;
  --lt-success: #067647;
  --lt-success-soft: #ecfdf3;
  --lt-warning: #b54708;
  --lt-warning-soft: #fffaeb;
  --lt-danger: #b42318;
  --lt-danger-soft: #fef3f2;
  --lt-info: #026aa2;
  --lt-info-soft: #f0f9ff;
  --lt-radius-sm: 9px;
  --lt-radius: 14px;
  --lt-radius-lg: 20px;
  --lt-shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --lt-shadow: 0 8px 24px rgba(16,24,40,.07);
  --lt-shadow-lg: 0 18px 48px rgba(16,24,40,.12);
  --lt-transition: 160ms ease;
  color: var(--lt-text);
  background: var(--lt-bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--lt-bg); color: var(--lt-text); line-height: 1.55; }
body, input, select, textarea, button { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
::selection { background: #c7d7fe; color: #102a56; }

.app-sidebar { background: #101828; border-inline-end: 1px solid rgba(255,255,255,.08); box-shadow: 8px 0 30px rgba(16,24,40,.13); }
.sidebar-head { min-height: 72px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { background: linear-gradient(135deg,#528bff,#155eef); box-shadow: 0 7px 18px rgba(21,94,239,.34); }
.sidebar-brand, .sidebar-brand:hover { color: #fff; }
.brand-copy small, .sidebar-workspace small { color: #98a2b3; }
.sidebar-workspace { margin: 12px; padding: 11px 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 13px; }
.workspace-avatar { background: #fff; color: #155eef; box-shadow: var(--lt-shadow-sm); }
.nav-group { margin: 4px 8px; }
.nav-group > summary { color: #98a2b3; text-transform: uppercase; letter-spacing: .07em; font-size: .72rem; font-weight: 800; border-radius: 9px; }
.nav-group > summary:hover { color: #eaecf0; background: rgba(255,255,255,.04); }
.nav-link { min-height: 42px; color: #d0d5dd; border-radius: 10px; transition: background var(--lt-transition),color var(--lt-transition),transform var(--lt-transition); }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(2px); }
[dir="rtl"] .nav-link:hover { transform: translateX(-2px); }
.nav-link.active { color: #fff; background: linear-gradient(90deg,rgba(21,94,239,.95),rgba(21,94,239,.72)); box-shadow: 0 8px 18px rgba(21,94,239,.22); }
.nav-icon { width: 25px; height: 25px; display: inline-grid; place-items: center; border-radius: 7px; background: rgba(255,255,255,.07); font-size: .85rem; }
.nav-link.active .nav-icon { background: rgba(255,255,255,.16); }
.nav-badge { background: #f04438; color: #fff; box-shadow: 0 0 0 2px #101828; }

.app-topbar { min-height: 72px; padding: 0 28px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--lt-border); backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(16,24,40,.02); }
.topbar-eyebrow { color: var(--lt-muted); letter-spacing: .06em; font-weight: 800; }
.topbar-context strong { color: var(--lt-text); }
.language-switcher, .user-menu { border-color: var(--lt-border); background: var(--lt-surface); box-shadow: var(--lt-shadow-sm); }
.language-switcher a.active { background: var(--lt-primary-soft); color: var(--lt-primary); }

.app-content { max-width: 1500px; padding: 30px clamp(18px,3vw,42px) 54px; }
.app-content > :first-child { margin-top: 0; }

h1,h2,h3 { color: #101828; letter-spacing: -.025em; line-height: 1.2; }
h1 { font-size: clamp(1.75rem,2.5vw,2.35rem); }
h2 { font-size: clamp(1.2rem,1.7vw,1.55rem); }
p { color: #475467; }
a { color: var(--lt-primary); text-underline-offset: 3px; }
a:hover { color: var(--lt-primary-dark); }

.card,.dashboard-panel,.action-priority-panel,.member-card,.client-card,.client-section,.focus-hero { border: 1px solid var(--lt-border); background: var(--lt-surface); box-shadow: var(--lt-shadow-sm); border-radius: var(--lt-radius-lg); }
.card,.dashboard-panel,.member-card,.client-card { padding: clamp(18px,2vw,26px); }
.card:hover,.dashboard-panel:hover { border-color: #d6dbe4; }
.focus-hero { background: radial-gradient(circle at 92% 15%,rgba(82,139,255,.16),transparent 32%),linear-gradient(135deg,#fff,#f8faff); }
.section-kicker { color: var(--lt-primary); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; font-size: .72rem; }
.hero-badge,.status-badge,.badge { border: 1px solid transparent; font-weight: 750; }

button,.button,.button-success,.button-warning,.button-danger,.button-dark { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border-radius: var(--lt-radius-sm); font-weight: 750; line-height: 1.2; box-shadow: var(--lt-shadow-sm); transition: transform var(--lt-transition),box-shadow var(--lt-transition),background var(--lt-transition),border-color var(--lt-transition); }
button,.button { background: var(--lt-primary); color: #fff; }
button:hover,.button:hover { background: var(--lt-primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 5px 12px rgba(21,94,239,.2); }
button:active,.button:active { transform: translateY(0); }
.button.secondary { background: #fff; color: #344054; border: 1px solid var(--lt-border-strong); }
.button.secondary:hover { background: var(--lt-surface-soft); color: #101828; border-color: #98a2b3; box-shadow: var(--lt-shadow-sm); }
.button-danger { background: var(--lt-danger); }
.button-success { background: var(--lt-success); }
.button-warning { background: var(--lt-warning); }
button:disabled,.button:disabled,[aria-disabled="true"] { opacity: .52; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

label { color: #344054; font-size: .92rem; font-weight: 720; }
input,select,textarea { min-height: 43px; margin-top: 7px; padding: 10px 12px; border: 1px solid var(--lt-border-strong); border-radius: var(--lt-radius-sm); background: #fff; color: #101828; box-shadow: 0 1px 2px rgba(16,24,40,.02); transition: border-color var(--lt-transition),box-shadow var(--lt-transition),background var(--lt-transition); }
textarea { min-height: 116px; resize: vertical; }
input:hover,select:hover,textarea:hover { border-color: #98a2b3; }
input:focus,select:focus,textarea:focus { outline: 0; border-color: #84adff; box-shadow: 0 0 0 4px rgba(21,94,239,.12); }
input::placeholder,textarea::placeholder { color: #98a2b3; }
input[type="checkbox"],input[type="radio"] { width: 18px; min-height: 18px; accent-color: var(--lt-primary); }

.table-responsive,.lt-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--lt-border); border-radius: 13px; background: #fff; }
table { min-width: 680px; border-collapse: separate; border-spacing: 0; }
th { padding: 11px 14px; background: #f9fafb; color: #475467; font-size: .76rem; font-weight: 850; text-transform: uppercase; letter-spacing: .045em; border-bottom: 1px solid var(--lt-border); white-space: nowrap; }
td { padding: 13px 14px; color: #344054; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfe; }
[dir="rtl"] th,[dir="rtl"] td { text-align: right; }

.flash { margin: 0 0 16px; padding: 13px 16px; border: 1px solid; border-radius: 12px; font-weight: 650; box-shadow: var(--lt-shadow-sm); }
.flash.success { background: var(--lt-success-soft); border-color: #abefc6; color: #05603a; }
.flash.error { background: var(--lt-danger-soft); border-color: #fecdca; color: #912018; }
.flash.warning { background: var(--lt-warning-soft); border-color: #fedf89; color: #93370d; }
.flash.info { background: var(--lt-info-soft); border-color: #b9e6fe; color: #065986; }

.compact-metric,.client-summary > div { background: #fff; border: 1px solid var(--lt-border); border-radius: 14px; box-shadow: var(--lt-shadow-sm); }
.compact-metric:hover,.client-summary > div:hover { border-color: #cfd5df; box-shadow: var(--lt-shadow); transform: translateY(-1px); }
.compact-metric,.client-summary > div { transition: transform var(--lt-transition),box-shadow var(--lt-transition),border-color var(--lt-transition); }
.priority-action { border: 1px solid var(--lt-border); background: #fff; border-radius: 15px; box-shadow: var(--lt-shadow-sm); }
.priority-action:hover { border-color: #a4bcfd; background: #f8faff; box-shadow: var(--lt-shadow); }
.priority-action-primary { background: linear-gradient(135deg,#155eef,#004eeb); border-color: transparent; color: #fff; }
.quick-link-list a,.facebook-page-item,.activity-item { border-color: var(--lt-border); border-radius: 12px; transition: background var(--lt-transition),border-color var(--lt-transition),transform var(--lt-transition); }
.quick-link-list a:hover { background: var(--lt-primary-soft); border-color: #b2ccff; transform: translateX(2px); }
[dir="rtl"] .quick-link-list a:hover { transform: translateX(-2px); }

.empty-panel-state,.mini-empty-state { border: 1px dashed #cfd5df; background: #fafbfc; border-radius: 14px; color: var(--lt-muted); }
pre,code { font-family: "SFMono-Regular",Consolas,"Liberation Mono",monospace; }
pre { border: 1px solid var(--lt-border); background: #101828; color: #e4e7ec; border-radius: 12px; padding: 15px; overflow: auto; }

:focus-visible { outline: 3px solid rgba(21,94,239,.32); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto !important; transition:none !important; animation:none !important; } }

@media (max-width: 900px) {
  .app-topbar { padding: 0 16px; }
  .app-content { padding: 20px 14px 42px; }
  .card,.dashboard-panel,.member-card,.client-card { border-radius: 15px; padding: 17px; }
  .focus-hero { border-radius: 16px; }
  .client-header,.panel-heading,.compact-panel-heading { align-items: stretch; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.7rem; }
  .topbar-context strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .panel-actions,.tenant-actions,.client-actions { width: 100%; }
  .panel-actions .button,.tenant-actions .button,.client-actions .button { flex: 1 1 auto; }
  button,.button { min-height: 44px; }
  .compact-metric-row { grid-template-columns: 1fr 1fr; }
}


/* V8.7 guided experience bundle */
.guided-next-card{display:flex;align-items:center;justify-content:space-between;gap:1.25rem;padding:1.15rem 1.3rem;margin-bottom:1rem;border:1px solid var(--border,#dbe3ef);border-radius:18px;background:linear-gradient(135deg,rgba(37,99,235,.08),rgba(124,58,237,.05))}
.guided-next-card h2{margin:.15rem 0 .35rem;font-size:1.15rem}.guided-next-card p{margin:0;color:var(--muted,#64748b)}
.guided-next-actions{display:flex;gap:.65rem;flex-wrap:wrap}.guide-dismiss{border:0;background:transparent;font-size:1.2rem;cursor:pointer;color:var(--muted,#64748b)}
.help-search-panel{margin:0 0 1rem}.help-search-panel label{display:block;font-weight:700;margin-bottom:.4rem}.help-search-panel input{width:100%;max-width:680px}
.help-topic-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem}.help-topic-card{display:flex;gap:1rem;padding:1.15rem;border:1px solid var(--border,#dbe3ef);border-radius:18px;background:var(--surface,#fff);box-shadow:0 8px 24px rgba(15,23,42,.05)}
.help-topic-card h2{font-size:1rem;margin:0 0 .35rem}.help-topic-card p{margin:0;color:var(--muted,#64748b);line-height:1.55}.help-topic-icon{display:grid;place-items:center;min-width:42px;height:42px;border-radius:12px;background:rgba(37,99,235,.1);font-weight:800}
.help-contact-panel{margin-top:1rem;display:flex;justify-content:space-between;gap:1rem;align-items:center}.activity-feed{display:grid;gap:.7rem}.activity-feed-item{display:flex;gap:.9rem;padding:.9rem;border-bottom:1px solid var(--border,#e2e8f0)}.activity-feed-item:last-child{border-bottom:0}.activity-feed-item p{margin:.2rem 0;color:var(--text,#1e293b)}.activity-feed-item small{color:var(--muted,#64748b)}
.activity-kind{display:grid;place-items:center;min-width:38px;height:38px;border-radius:11px;background:rgba(37,99,235,.1)}.activity-kind-automation{background:rgba(124,58,237,.1)}.activity-kind-security{background:rgba(245,158,11,.14)}
.assistant-launcher{position:fixed;z-index:70;inset-inline-end:22px;bottom:22px;width:52px;height:52px;border:0;border-radius:50%;background:#2563eb;color:white;font-size:1.35rem;box-shadow:0 14px 36px rgba(37,99,235,.32);cursor:pointer}
.assistant-panel{position:fixed;z-index:71;inset-inline-end:22px;bottom:84px;width:min(360px,calc(100vw - 28px));padding:1rem;border:1px solid var(--border,#dbe3ef);border-radius:18px;background:var(--surface,#fff);box-shadow:0 22px 55px rgba(15,23,42,.2)}.assistant-panel[hidden]{display:none}.assistant-panel-head{display:flex;justify-content:space-between;gap:1rem}.assistant-panel-head h2{font-size:1rem;margin:0}.assistant-panel-head button{border:0;background:transparent;font-size:1.2rem;cursor:pointer}.assistant-panel p{color:var(--muted,#64748b)}.assistant-panel-links{display:grid;gap:.55rem}.assistant-panel-links a{padding:.7rem .8rem;border-radius:11px;background:rgba(37,99,235,.07);font-weight:700;text-decoration:none}
@media(max-width:720px){.guided-next-card,.help-contact-panel{align-items:flex-start;flex-direction:column}.assistant-launcher{inset-inline-end:14px;bottom:14px}.assistant-panel{inset-inline-end:14px;bottom:76px}}

/* V16.18 automation readiness */
.feature-readiness-alert{align-items:flex-start}.feature-readiness-list{margin:8px 0 0;padding-inline-start:20px;color:inherit}.feature-readiness-list li+li{margin-top:4px}.feature-publish-form button:disabled{cursor:not-allowed;opacity:.55}

/* =========================================================
   Hallmark · structure: dense utility shell
   Direction: editorial operations desk
   ========================================================= */
:root {
  --lt-bg: #f1f2ef;
  --lt-surface: #fffefa;
  --lt-surface-soft: #f7f7f3;
  --lt-surface-strong: #e8e9e5;
  --lt-text: #1c2026;
  --lt-muted: #69717d;
  --lt-border: #dcdedb;
  --lt-border-strong: #c7cac6;
  --lt-primary: #2858d6;
  --lt-primary-dark: #1f46ae;
  --lt-primary-soft: #edf1ff;
  --lt-accent: #ef6a3a;
  --lt-sidebar: #171a1f;
  --lt-radius-sm: 7px;
  --lt-radius: 10px;
  --lt-radius-lg: 14px;
  --lt-shadow-sm: 0 1px 0 rgba(28,32,38,.05);
  --lt-shadow: 0 10px 28px rgba(28,32,38,.06);
}

body.app-body { background: var(--lt-bg); }
.app-shell { grid-template-columns: 248px minmax(0, 1fr); }
.app-sidebar {
  gap: 10px;
  padding: 18px 13px;
  background: var(--lt-sidebar);
  border-inline-end: 1px solid #08090b;
  box-shadow: none;
  scrollbar-color: #4a4f57 transparent;
}
.sidebar-head { min-height: 48px; padding: 0 7px 10px; border-bottom: 0; }
.sidebar-brand { gap: 10px; }
.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  border-radius: 7px;
  background: #f5f4ef;
  color: #171a1f;
  box-shadow: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .76rem;
  letter-spacing: -.03em;
}
.brand-mark::after { content: ""; position: absolute; inset-inline-end: -2px; bottom: -2px; width: 9px; height: 9px; background: var(--lt-accent); border: 2px solid var(--lt-sidebar); }
.brand-copy strong { font-size: .88rem; letter-spacing: .01em; }
.brand-copy small { margin-top: 1px; color: #858b94; font-size: .66rem; }
.sidebar-workspace {
  margin: 4px 3px 8px;
  padding: 10px;
  border-color: #34383f;
  border-radius: 8px;
  background: #202329;
}
.workspace-avatar { width: 32px; height: 32px; flex-basis: 32px; border-radius: 6px; background: #2c3037; color: #ff9a73; box-shadow: none; }
.sidebar-workspace strong { font-size: .78rem; }
.sidebar-workspace small { color: #858b94; font-size: .64rem; }
.sidebar-nav { gap: 2px; }
.nav-link-home { margin: 0 0 5px; }
.nav-group { margin: 0; }
.nav-group > summary { min-height: 34px; padding: 7px 10px; color: #747b85; border-radius: 5px; font-size: .62rem; letter-spacing: .11em; }
.nav-group > summary:hover { background: #202329; color: #bbc0c8; }
.nav-group-links { gap: 1px; padding: 0 0 5px; }
.app-sidebar .nav-link {
  position: relative;
  min-height: 37px;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 6px;
  color: #b8bec7;
  font-size: .79rem;
  font-weight: 620;
  transition: background 140ms ease, color 140ms ease;
}
.app-sidebar .nav-link:hover { transform: none; background: #22262c; color: #fff; }
.app-sidebar .nav-link.active { background: #f4f3ee; color: #171a1f; box-shadow: none; }
.app-sidebar .nav-link.active::before { content: ""; position: absolute; inset-inline-start: -4px; top: 9px; bottom: 9px; width: 3px; background: var(--lt-accent); }
.nav-icon { width: 21px; height: 21px; flex-basis: 21px; border-radius: 4px; background: #282c33; color: #9ca3ad; font-size: .75rem; }
.app-sidebar .nav-link.active .nav-icon { background: #e3e2dd; color: #1c2026; }
.nav-badge { box-shadow: 0 0 0 2px var(--lt-sidebar); }
.sidebar-footer { padding: 12px 8px 2px; border-color: #30343b; }

.app-topbar {
  min-height: 62px;
  padding: 10px clamp(16px, 2.6vw, 34px);
  border-bottom-color: var(--lt-border);
  background: rgba(255,254,250,.92);
  box-shadow: none;
  backdrop-filter: blur(14px);
}
.topbar-eyebrow { color: #9298a0; font-size: .63rem; letter-spacing: .1em; }
.topbar-context strong { color: var(--lt-text); font-size: .84rem; }
.language-switcher,
.user-menu { border-color: var(--lt-border); border-radius: 7px; background: transparent; box-shadow: none; }
.language-switcher a.active { background: var(--lt-text); color: #fff; }
.user-avatar { border-radius: 7px; background: #e6e8e4; color: var(--lt-text); }
.logout-button { border-radius: 7px; background: transparent; }

.app-content { width: min(1480px, calc(100% - clamp(32px, 5vw, 72px))); padding: 34px 0 64px; }
h1, h2, h3 { color: var(--lt-text); }
.section-kicker { color: var(--lt-accent); letter-spacing: .12em; font-size: .66rem; }
.card,
.dashboard-panel,
.action-priority-panel,
.member-card,
.client-card,
.client-section,
.focus-hero { border-color: var(--lt-border); border-radius: var(--lt-radius-lg); background: var(--lt-surface); box-shadow: var(--lt-shadow-sm); }
button,
.button,
.button-success,
.button-warning,
.button-danger,
.button-dark { border-radius: var(--lt-radius-sm); box-shadow: none; }
button:hover,
.button:hover { box-shadow: none; }
input,
select,
textarea { border-radius: var(--lt-radius-sm); background: var(--lt-surface); box-shadow: none; }
.table-responsive,
.lt-table-wrap { border-radius: var(--lt-radius); }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { width: min(286px, 88vw); }
  .app-content { width: calc(100% - 28px); padding: 22px 0 48px; }
}

@media (max-width: 640px) {
  .app-topbar { min-height: 58px; }
  .app-content { width: calc(100% - 24px); padding-top: 20px; }
}
