/* ABGrowth — source centrale du design.
 * Modifier ici la structure, les rayons et les valeurs par défaut.
 * Les couleurs enregistrées dans Paramètres > Apparence surchargent ces bases.
 * Les feuilles métier utilisent ces variables : ne pas y ajouter de couleurs fixes.
 */
:root {
    color-scheme: dark;
    --crm-accent: #ff7a2f;
    --crm-secondary: #ff9b61;
    --crm-background: #070707;
    --crm-surface: #1c1c1c;
    --crm-text: #f6f6f3;
    --crm-muted: #989894;
    --crm-success: #43bf8b;
    --crm-warning: #ffb15f;
    --crm-danger: #e76868;
    --crm-info: #7fa8d6;
    --crm-like: #e596ae;
    --crm-ink: #171717;
    --crm-white: #ffffff;
    --crm-black: #000000;
    --crm-font: 'Plus Jakarta Sans', sans-serif;
    --crm-radius-card: 16px;
    --crm-radius-control: 10px;
    --crm-radius-pill: 999px;
    --crm-border: color-mix(in srgb, var(--crm-text) 10%, transparent);
    --crm-accent-soft: color-mix(in srgb, var(--crm-accent) 10%, transparent);
    --crm-accent-border: color-mix(in srgb, var(--crm-accent) 30%, transparent);
    --crm-control: color-mix(in srgb, var(--crm-surface) 94%, var(--crm-text));
    --crm-card: linear-gradient(145deg, color-mix(in srgb, var(--crm-surface) 94%, var(--crm-text)), var(--crm-surface));
    --crm-page: radial-gradient(720px 540px at 88% 2%, var(--crm-accent-soft), transparent 68%), var(--crm-background);
    --bg-primary: var(--crm-background);
    --bg-secondary: var(--crm-surface);
    --bg-sidebar: color-mix(in srgb, var(--crm-background) 90%, var(--crm-surface));
    --bg-card: var(--crm-card);
    --bg-card-hover: color-mix(in srgb, var(--crm-surface) 93%, var(--crm-text));
    --border-color: var(--crm-border);
    --border-accent: var(--crm-accent-border);
    --accent-primary: var(--crm-accent);
    --accent-twitter: var(--crm-accent);
    --accent-secondary: var(--crm-secondary);
    --accent-gradient: linear-gradient(135deg, var(--crm-secondary), var(--crm-accent));
    --accent-glow: color-mix(in srgb, var(--crm-accent) 20%, transparent);
    --text-main: var(--crm-text);
    --text-primary: var(--crm-text);
    --text-muted: var(--crm-muted);
    --text-secondary: var(--crm-muted);
    --success: var(--crm-success);
    --warning: var(--crm-warning);
    --danger: var(--crm-danger);
}
html{background:var(--crm-background)}
body,body.geelark-background{color:var(--crm-text);background:var(--crm-page);font-family:var(--crm-font);background-attachment:fixed}
body.geelark-background main.main-content{background:transparent}
body.geelark-background::before{background:none}
aside.sidebar{background:var(--bg-sidebar);border-color:var(--crm-border)}
:is(.card,.twitter-card,.feed-post-card,.xfy-card,.geelark-widget){border-radius:var(--crm-radius-card)}
:is(.btn-scrape,.btn-secondary-action,.btn-secondary,.tag-filter,input:not([type=color]):not([type=checkbox]):not([type=radio]),select,textarea){border-radius:var(--crm-radius-control)}
:is(button,a,input,select,textarea):focus-visible{outline:2px solid var(--crm-accent);outline-offset:3px}
#view-geelark{
 --geelark-accent:var(--crm-accent);--geelark-accent-soft:var(--crm-accent-soft);--geelark-accent-border:var(--crm-accent-border);
 --geelark-panel:var(--crm-surface);--geelark-field:var(--crm-background);--geelark-surface:var(--crm-card);--geelark-surface-soft:var(--crm-surface);--geelark-surface-field:var(--crm-background)
}
#view-geelark :is(.geelark-dashboard-widget,.geelark-widget,.geelark-agent-panel,.geelark-agent-card,.geelark-live-card,.warmup-bank-card,.geelark-resource-import-card,.warmup-campaign-center){background:var(--crm-card);border-color:var(--crm-border);border-radius:var(--crm-radius-card)}
#view-geelark :is(.geelark-widget-icon,.geelark-agent-icon){background:var(--crm-accent-soft);color:var(--crm-accent)}
#view-geelark :is(input:not([type=color]):not([type=checkbox]):not([type=radio]),select,textarea){background:var(--crm-control);color:var(--crm-text);border-color:var(--crm-border)}
.crm-appearance{margin-bottom:20px;padding:20px;background:var(--crm-card);border:1px solid var(--crm-border);border-radius:var(--crm-radius-card)}
.crm-appearance h3{margin:0 0 6px}.crm-appearance p{color:var(--crm-muted);font-size:12px;line-height:1.6}
.crm-palette{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin:18px 0}
.crm-palette label{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--crm-border);border-radius:var(--crm-radius-control);font-size:12px}
.crm-palette input{width:38px;height:38px;border:0;padding:0;background:transparent;cursor:pointer}
.crm-theme-preview{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:14px;background:var(--crm-background);border:1px solid var(--crm-border);border-radius:var(--crm-radius-control)}
.crm-theme-preview strong{margin-right:auto}.crm-theme-preview span{padding:5px 9px;border-radius:var(--crm-radius-pill);font-size:11px}
.crm-theme-preview .success{color:var(--crm-success);background:color-mix(in srgb,var(--crm-success) 12%,transparent)}
.crm-theme-preview .warning{color:var(--crm-warning);background:color-mix(in srgb,var(--crm-warning) 12%,transparent)}
.crm-theme-preview .danger{color:var(--crm-danger);background:color-mix(in srgb,var(--crm-danger) 12%,transparent)}
.crm-theme-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
@media(max-width:600px){.crm-appearance{padding:14px}.crm-palette{grid-template-columns:1fr 1fr}.crm-theme-actions button{min-height:44px}}

/* Restrained surfaces; color identifies actions and useful statuses. */
#view-geelark .geelark-dashboard-widget::after{display:none}
#view-geelark .proxies .geelark-widget-icon{color:var(--crm-info);background:color-mix(in srgb,var(--crm-info) 10%,transparent);border-color:color-mix(in srgb,var(--crm-info) 20%,transparent)}
#view-geelark .active-profiles .geelark-widget-icon{color:var(--crm-success);background:color-mix(in srgb,var(--crm-success) 10%,transparent);border-color:color-mix(in srgb,var(--crm-success) 20%,transparent)}
#view-geelark .geelark-widget-handle{color:var(--crm-muted)}
#view-geelark .geelark-widget-metric strong{color:var(--crm-text)}
@media(max-width:900px){
 #view-settings .settings-grid{grid-template-columns:minmax(0,1fr)}
 #view-settings .view-header{flex-wrap:wrap}
 #view-geelark{min-width:0}
}
#view-geelark .geelark-dashboard-widget:is(.fleet,.proxies,.campaign,.active-profiles){background:var(--crm-card);border-color:var(--crm-border);border-radius:var(--crm-radius-card)}

/* Prepared palettes: edit their colors here as well. */
:root{
 --crm-preset-violet-accent:#b49aff;--crm-preset-violet-secondary:#d0b9ff;
 --crm-preset-rose-accent:#ef97b6;--crm-preset-rose-secondary:#ffc0d7;
 --crm-preset-emerald-accent:#63d8ad;--crm-preset-emerald-secondary:#a0ead0;
 --crm-preset-amber-accent:#edc06c;--crm-preset-amber-secondary:#ffdda2;
 --crm-preset-neutral-accent:#d0d0d0;--crm-preset-neutral-secondary:#f0f0ed;
}
.crm-theme-presets{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:20px 0}
.crm-theme-preset{position:relative;display:flex;flex-direction:column;align-items:center;gap:9px;padding:12px 8px;background:var(--crm-background);border:1px solid var(--crm-border);border-radius:var(--crm-radius-control);color:var(--crm-text);font:inherit;font-size:12px;cursor:pointer}
.crm-theme-preset:hover{border-color:var(--crm-muted)}
.crm-theme-preset[aria-pressed=true]{border-color:var(--crm-accent);box-shadow:0 0 0 1px var(--crm-accent)}
.crm-theme-preset[aria-pressed=true]::after{content:'✓';position:absolute;right:7px;top:5px;color:var(--crm-accent);font-weight:800}
.crm-theme-swatch{display:block;width:42px;height:42px;border-radius:10px;background:var(--swatch-accent);border:1px solid color-mix(in srgb,var(--crm-white) 15%,transparent)}
.crm-theme-custom{margin:12px 0 18px}.crm-theme-custom summary{cursor:pointer;color:var(--crm-muted);font-size:12px;padding:10px 0}.crm-theme-custom[open] summary{color:var(--crm-text)}
@media(max-width:650px){.crm-theme-presets{grid-template-columns:repeat(3,minmax(0,1fr))}.crm-theme-preset{min-height:88px}.crm-theme-custom summary{min-height:44px;box-sizing:border-box}}

:root{
 --crm-preset-blue-accent:#60a5fa;--crm-preset-blue-secondary:#93c5fd;
 --crm-preset-cyan-accent:#22d3ee;--crm-preset-cyan-secondary:#a5f3fc;
 --crm-preset-teal-accent:#2dd4bf;--crm-preset-teal-secondary:#99f6e4;
 --crm-preset-lime-accent:#a3e635;--crm-preset-lime-secondary:#d9f99d;
 --crm-preset-red-accent:#fb7185;--crm-preset-red-secondary:#fda4af;
 --crm-preset-indigo-accent:#818cf8;--crm-preset-indigo-secondary:#c7d2fe;
 --crm-preset-white-accent:#f4f3ef;--crm-preset-white-secondary:#ffffff;
 --crm-preset-cream-accent:#efe2c6;--crm-preset-cream-secondary:#f8f0de;
 --crm-preset-sand-accent:#d9c4a0;--crm-preset-sand-secondary:#ecdfc6;
 --crm-light-background:#f4f5f7;
 --crm-light-surface:#ffffff;
 --crm-light-text:#20242b;
 --crm-light-muted:#5b6470;
 --crm-light-border:#dce0e6;
}
.crm-color-field{display:grid;grid-template-columns:40px minmax(0,1fr);gap:8px;align-items:center;border:1px solid var(--crm-border);border-radius:10px;padding:12px;min-width:0}
.crm-palette .crm-color-field label{grid-column:1/-1;border:0;padding:0;margin:0;font-size:12px}
.crm-palette .crm-color-field input[type=text]{width:100%;height:38px;box-sizing:border-box;padding:8px;font:12px monospace;min-width:0}
.crm-palette .crm-color-field input[type=color]{width:40px;height:38px}
.crm-palette input:invalid{outline:1px solid var(--crm-danger)}
.crm-mode-toggle{position:fixed;top:12px;right:16px;z-index:1100;width:40px;height:40px;border:1px solid var(--crm-border);border-radius:50%;background:var(--crm-surface);color:var(--crm-text);font-size:24px;line-height:1;cursor:pointer;box-shadow:0 2px 8px #00000012}
.main-content{padding-top:66px!important}.workspace-tabs{padding-right:60px!important}
@media(max-width:900px){.crm-mode-toggle{top:calc(8px + env(safe-area-inset-top,0px));right:10px;width:40px;height:40px}.sidebar-menu{width:calc(100% - 52px)!important;padding-right:0!important}.main-content{padding-top:12px!important}}
