/* CFN - CoopFinNetwork : design system (dark). Tailwind (CDN) fournit les utilitaires, ici seulement ce qu'il ne couvre pas. */
:root {
  --bg: #050506;
  --panel: #0e0e10;
  --panel-2: #131316;
  --line: #222226;
  --muted: #8b8b94;
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --info: #3b82f6;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: #fff; font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: #fff; color: #000; }

/* Scrollbars */
.thin-scroll::-webkit-scrollbar, body::-webkit-scrollbar { width: 8px; height: 8px; }
.thin-scroll::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb { background: #2a2a2f; border-radius: 8px; }
.thin-scroll::-webkit-scrollbar-track, body::-webkit-scrollbar-track { background: transparent; }

/* Surfaces */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.panel-2 { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.muted { color: var(--muted); }
.hr { border-color: var(--line); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 10px; padding: .55rem 1rem; font-size: .8125rem; font-weight: 600; transition: all .15s; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-white { background: #fff; color: #000; }
.btn-white:hover { background: #e4e4e7; }
.btn-ghost { background: transparent; color: #fff; border-color: #34343a; }
.btn-ghost:hover { background: #17171a; border-color: #4a4a52; }
.btn-lg { padding: .8rem 1.4rem; font-size: .9rem; border-radius: 12px; }

/* Inputs */
.field { width: 100%; background: #0b0b0d; border: 1px solid var(--line); color: #fff; border-radius: 10px; padding: .6rem .8rem; font-size: .8125rem; outline: none; transition: border-color .15s; }
.field:focus { border-color: #5b5b66; }
.field::placeholder { color: #5d5d66; }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238b8b94' stroke-width='2'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; padding-right: 2rem; }
.label { display: block; font-size: .72rem; color: #b4b4bc; margin-bottom: .35rem; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .68rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { color: var(--ok); background: rgba(34,197,94,.12); }
.badge-warn { color: var(--warn); background: rgba(245,158,11,.12); }
.badge-bad { color: var(--bad); background: rgba(239,68,68,.12); }
.badge-info { color: var(--info); background: rgba(59,130,246,.12); }
.badge-plain::before { display: none; }

/* Tables */
.tbl { width: 100%; font-size: .78rem; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 500; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: .7rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: .75rem 1rem; border-bottom: 1px solid #17171a; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #121215; }

/* Tabs */
.tabs { display: inline-flex; gap: .25rem; padding: .25rem; background: #0b0b0d; border: 1px solid var(--line); border-radius: 10px; }
.tab { font-size: .72rem; font-weight: 600; padding: .35rem .8rem; border-radius: 8px; color: var(--muted); cursor: pointer; transition: all .15s; }
.tab.active { color: #000; background: #fff; }
.tab:not(.active):hover { color: #fff; background: #1a1a1e; }
.utabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line); font-size: .8rem; overflow-x: auto; }
.utab { padding: .75rem 0; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.utab.active { color: #fff; border-color: #fff; }

/* Toggle switch */
.switch { position: relative; width: 38px; height: 22px; flex: none; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #34343a; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(16px); }

/* Sidebar */
.side-link { display: flex; align-items: center; gap: .7rem; padding: .45rem .7rem; border-radius: 8px; font-size: .78rem; color: #b8b8c0; transition: all .12s; }
.side-link:hover { background: #151518; color: #fff; }
.side-link.active { background: #1c1c20; color: #fff; }
.side-group { font-size: .62rem; letter-spacing: .12em; color: #62626b; padding: 1rem .7rem .4rem; text-transform: uppercase; }
.ico { width: 16px; height: 16px; flex: none; opacity: .9; }

/* Hero backgrounds */
.grid-bg { background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 70%); }
.globe { background: radial-gradient(circle at 35% 30%, #2b2b30, #0a0a0b 62%); border: 1px solid #26262a; border-radius: 50%; box-shadow: 0 0 120px rgba(255,255,255,.05) inset; }
.dots { background-image: radial-gradient(#3a3a40 1px, transparent 1.2px); background-size: 14px 14px; -webkit-mask-image: radial-gradient(circle, #000 40%, transparent 72%); mask-image: radial-gradient(circle, #000 40%, transparent 72%); }

/* Bank cards */
.bcard { position: relative; aspect-ratio: 1.586; border-radius: 16px; padding: 1.1rem 1.2rem; overflow: hidden; color: #fff; background: linear-gradient(135deg, #2c2c31 0%, #0c0c0e 60%, #1b1b1f 100%); border: 1px solid #34343a; box-shadow: 0 25px 60px -20px rgba(0,0,0,.9); }
.bcard.light { background: linear-gradient(135deg, #fafafa, #c9c9cf); color: #111; border-color: #e4e4e7; }
.bcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.08) 45%, transparent 60%); pointer-events: none; }
.chip { width: 34px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #d9d9de, #8f8f97); }
.mc { display: flex; }
.mc i { width: 22px; height: 22px; border-radius: 50%; display: block; }
.mc i:first-child { background: #eb001b; }
.mc i:last-child { background: #f79e1b; margin-left: -8px; opacity: .92; }

/* Phone mock (hero) */
.phone { width: 230px; border-radius: 34px; background: #0b0b0d; border: 2px solid #2d2d33; padding: 14px; box-shadow: 0 40px 80px -20px #000; }

/* Code */
.code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .72rem; line-height: 1.6; background: #0a0a0c; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; color: #c8c8d0; overflow-x: auto; }
.code .k { color: #7dd3fc; }
.code .s { color: #86efac; }
.code .m { color: #fbbf24; }

/* Charts */
.chart-bar { fill: #e4e4e7; transition: opacity .15s; }
.chart-bar:hover { opacity: .6; }
.tooltip { position: fixed; z-index: 100; pointer-events: none; background: #fff; color: #000; font-size: .7rem; font-weight: 600; padding: .3rem .55rem; border-radius: 6px; transform: translate(-50%, -130%); opacity: 0; transition: opacity .1s; white-space: nowrap; }

/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); z-index: 60; display: none; align-items: center; justify-content: center; padding: 1rem; }
.overlay.open { display: flex; }

/* Utilities */
.fade-in { animation: fade .5s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.flag { width: 22px; height: 15px; border-radius: 3px; display: inline-block; vertical-align: middle; }
.toast { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 90; background: #fff; color: #000; font-size: .8rem; font-weight: 600; padding: .7rem 1rem; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
@media (max-width: 1023px) { .side { transform: translateX(-100%); transition: transform .2s; } .side.open { transform: none; } }

/* app2 */
.menu { box-shadow: 0 20px 50px -10px rgba(0,0,0,.8); }
.hidden { display: none; }
.menu.hidden { display: none; }
.flash-in { animation: fade .4s ease both; }
code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .8em; background: #17171a; padding: .1rem .35rem; border-radius: 4px; }
.dz { border: 1px dashed #34343a; border-radius: 12px; }
input[type=file].field { padding: .45rem; }
