:root {
    color-scheme: dark;
    --bg: #090b10;
    --panel: #12151d;
    --panel-2: #181c26;
    --line: #272d3a;
    --text: #f6f7fb;
    --muted: #9ca5b7;
    --accent: #7c5cff;
    --accent-2: #38d8ff;
    --danger: #ff6376;
    --success: #4ce0a1;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 15% 0%, #17142b 0, var(--bg) 34%); color: var(--text); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif; }
a { color: #b9abff; text-decoration: none; }
a:hover { color: #fff; }
.landing { display: grid; place-items: center; padding: 24px; }
.hero { width: min(660px, 100%); text-align: center; padding: 72px 32px; }
.mark { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 28px; border: 1px solid #8068ff66; border-radius: 20px; background: linear-gradient(145deg, #8a6bff, #5234c8); box-shadow: 0 20px 70px #6d4cff55; font-size: 23px; font-weight: 900; }
h1, h2 { margin: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(38px, 8vw, 68px); line-height: 1; }
h2 { font-size: 22px; }
.eyebrow { margin: 0 0 14px; color: var(--accent-2); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.lead { max-width: 540px; margin: 24px auto 34px; color: var(--muted); font-size: 18px; }
.button, button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 0; border-radius: 10px; padding: 0 17px; background: linear-gradient(135deg, var(--accent), #5f3cdd); color: #fff; font: inherit; font-weight: 750; cursor: pointer; }
button:hover, .button:hover { filter: brightness(1.12); color: #fff; }
.auth-card { width: min(440px, calc(100% - 32px)); margin: 10vh auto; padding: 36px; border: 1px solid var(--line); border-radius: 20px; background: #10131bcc; box-shadow: 0 25px 90px #0008; }
.auth-card h1 { margin-bottom: 30px; font-size: 34px; }
form { margin: 0; }
label { display: grid; gap: 7px; color: #c9cfdb; font-size: 13px; font-weight: 700; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; outline: none; background: #0c0f15; color: var(--text); font: inherit; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #7c5cff22; }
textarea { resize: vertical; font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.auth-card form, .stack { display: grid; gap: 18px; }
.alert { padding: 12px 14px; border: 1px solid #7d6c31; border-radius: 10px; background: #2b2511; color: #ffe69b; }
.alert.error { border-color: #6e3038; background: #2a1317; color: #ffb3bd; }
.alert.success { border-color: #256046; background: #10281d; color: #8df2c4; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 66px; padding: 0 max(24px, calc((100vw - 1320px) / 2)); border-bottom: 1px solid var(--line); background: #0c0f15dd; }
.brand { color: #fff; font-size: 19px; font-weight: 900; }
.ghost { min-height: 36px; background: transparent; border: 1px solid var(--line); }
.dashboard { width: min(1320px, calc(100% - 32px)); margin: 42px auto 80px; }
.page-title { display: flex; justify-content: space-between; margin-bottom: 28px; }
.page-title h1 { font-size: 42px; }
.panel { margin-bottom: 22px; padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); box-shadow: 0 18px 50px #0002; }
.section-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-head p, .panel > p { margin: 5px 0 0; color: var(--muted); }
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-two .panel { min-width: 0; }
.table-wrap { overflow-x: auto; margin-top: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
td { font-size: 13px; }
code, .secret { overflow-wrap: anywhere; color: #bfeeff; font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.secret { padding: 16px; border: 1px dashed #4ce0a177; border-radius: 10px; background: #0c1713; }
.badge { display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 800; }
.badge.on { background: #153b2b; color: var(--success); }
.badge.off { background: #3c1b21; color: #ff98a5; }
.actions { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.link { min-height: 0; padding: 0; border: 0; background: transparent; color: #b9abff; font-size: 13px; font-weight: 500; }
.link.danger { color: var(--danger); }
.editor { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 10px; margin-top: 20px; }
@media (max-width: 850px) { .grid-two { grid-template-columns: 1fr; } .inline-form { grid-template-columns: 1fr; } .panel { padding: 18px; } }

/* Administration LunarWare */
.admin-body {
    --sidebar: #0b0e16;
    --surface: #111621;
    --surface-2: #171d2a;
    --surface-3: #0d121b;
    margin: 0;
    background:
        radial-gradient(circle at 82% -10%, #271b5a66 0, transparent 31%),
        radial-gradient(circle at 35% 105%, #0b425344 0, transparent 28%),
        #080b12;
    color: #f7f8fc;
}
.admin-shell { min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    width: 270px;
    padding: 24px 18px 18px;
    border-right: 1px solid #252b3a;
    background: linear-gradient(180deg, #0d111a 0%, #090c13 100%);
    box-shadow: 20px 0 70px #0003;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 2px 10px 28px; }
.sidebar-logo {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(145deg, #9679ff, #5a35d7);
    box-shadow: 0 10px 30px #7451ef55;
    color: white;
    font-size: 20px;
    font-weight: 950;
}
.sidebar-brand strong, .sidebar-brand small, .admin-profile strong, .admin-profile small { display: block; }
.sidebar-brand strong { color: white; font-size: 17px; letter-spacing: -.02em; }
.sidebar-brand small { color: #7f899e; font-size: 11px; }
.sidebar-nav { display: grid; gap: 5px; }
.sidebar-nav p { margin: 20px 12px 7px; color: #626c81; font-size: 9px; font-weight: 850; letter-spacing: .16em; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 47px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0 13px;
    color: #8f99ad;
    font-size: 14px;
    font-weight: 700;
    transition: .18s ease;
}
.sidebar-nav a span { display: grid; place-items: center; width: 23px; color: #69748a; font-size: 18px; }
.sidebar-nav a:hover { background: #151a26; color: #fff; }
.sidebar-nav a.active { border-color: #8066ff44; background: linear-gradient(100deg, #7757ec2b, #35246b10); color: #fff; box-shadow: inset 3px 0 #886cff; }
.sidebar-nav a.active span { color: #9d88ff; }
.sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid #202635; }
.admin-profile { display: flex; align-items: center; gap: 10px; padding: 8px 9px 15px; }
.admin-profile > span { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; background: #202638; color: #bcafff; font-weight: 850; }
.admin-profile strong { color: #e8eaf0; font-size: 13px; }
.admin-profile small { color: #6f798e; font-size: 10px; }
.sidebar-logout { width: 100%; min-height: 39px; border: 1px solid #272e3d; background: #111620; color: #8993a8; font-size: 12px; }
.admin-main { min-height: 100vh; margin-left: 270px; padding: 42px clamp(24px, 4vw, 62px) 80px; }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin: 0 0 30px; }
.admin-header h1 { margin: 0; font-size: clamp(32px, 4vw, 46px); line-height: 1.05; letter-spacing: -.045em; }
.admin-header > div > p:last-child { margin: 10px 0 0; color: #8993a7; font-size: 14px; }
.live-pill { display: flex; align-items: center; gap: 8px; margin-top: 4px; border: 1px solid #263443; border-radius: 999px; padding: 8px 12px; background: #101721; color: #9aa7b7; font-size: 11px; font-weight: 750; white-space: nowrap; }
.live-pill span { width: 7px; height: 7px; border-radius: 50%; background: #48e3a1; box-shadow: 0 0 12px #48e3a1; }
.admin-main .alert { margin-bottom: 22px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { position: relative; overflow: hidden; min-height: 150px; border: 1px solid #252c3b; border-radius: 17px; padding: 22px; background: linear-gradient(145deg, #151a25, #10141d); box-shadow: 0 18px 50px #0002; }
.stat-card::after { content: ''; position: absolute; top: -32px; right: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--card-color); opacity: .12; filter: blur(3px); }
.stat-card span, .stat-card small, .stat-card strong { position: relative; z-index: 1; display: block; }
.stat-card span { color: #8e98ac; font-size: 12px; font-weight: 750; }
.stat-card strong { margin: 10px 0 2px; color: #fff; font-size: 38px; line-height: 1; letter-spacing: -.05em; }
.stat-card small { color: #626e83; font-size: 10px; }
.stat-card.purple { --card-color: #8e6fff; border-top-color: #7359db88; }
.stat-card.cyan { --card-color: #38d8ff; border-top-color: #38d8ff77; }
.stat-card.green { --card-color: #45dda1; border-top-color: #45dda177; }
.stat-card.red { --card-color: #ff6376; border-top-color: #ff637677; }
.admin-main .panel { border-color: #252c3a; border-radius: 17px; background: linear-gradient(150deg, #121722 0, #0f141e 100%); box-shadow: 0 18px 55px #0002; }
.admin-main .panel h2 { font-size: 19px; }
.admin-main .section-head p { margin: 5px 0 0; color: #788399; font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.event-bars { display: grid; gap: 18px; margin-top: 24px; }
.event-bar > div { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 7px; color: #aeb6c6; font-size: 12px; }
.event-bar strong { color: #fff; }
.event-bar progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 999px; overflow: hidden; background: #242a37; }
.event-bar progress::-webkit-progress-bar { border-radius: 999px; background: #242a37; }
.event-bar progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, #7355eb, #a38eff); }
.event-bar progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, #7355eb, #a38eff); }
.rank-list { display: grid; gap: 7px; margin-top: 18px; }
.rank-list > div { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; min-height: 53px; border-bottom: 1px solid #242b39; }
.rank-list > div > span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: #1c2230; color: #9d89ff; font-size: 11px; font-weight: 850; }
.rank-list strong { color: #dce0e9; font-size: 13px; }
.rank-list small { color: #6f7a8e; font-size: 10px; }
.rank-list > .empty-state { display: block; min-height: 90px; padding-top: 36px; }
.admin-main table { min-width: 620px; }
.admin-main th { color: #647087; }
.admin-main td { border-bottom-color: #232a37; color: #b7becd; }
.admin-main tr:last-child td { border-bottom: 0; }
.event-tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.event-tag.success { background: #15382a; color: #6de6af; }
.event-tag.warning { background: #3b3016; color: #f4cc67; }
.event-tag.danger { background: #3c1c23; color: #ff8d9b; }
.event-tag.neutral { background: #252b39; color: #adb6c8; }
.script-workspace { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 20px; align-items: start; }
.script-catalog { min-width: 0; }
.mini-button, .outline-button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; border: 1px solid #343c4d; border-radius: 9px; padding: 0 11px; background: #171c28; color: #c8c0ff; font-size: 11px; font-weight: 750; }
.outline-button { min-height: 37px; }
.script-list { display: grid; gap: 7px; margin-top: 17px; }
.script-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) 9px; align-items: center; gap: 11px; min-height: 64px; border: 1px solid transparent; border-radius: 12px; padding: 8px 10px; color: inherit; transition: .15s ease; }
.script-item:hover, .script-item.active { border-color: #3c365c; background: #191d2a; }
.file-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(145deg, #31295b, #1e1b36); color: #b6a7ff; font-size: 9px; font-weight: 900; }
.script-item strong, .script-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.script-item strong { color: #e2e5ed; font-size: 12px; }
.script-item small { margin-top: 3px; color: #6d788d; font-size: 9px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; }
.status-dot.on { background: #44d99c; box-shadow: 0 0 9px #44d99c; }
.status-dot.off { background: #677084; }
.script-editor-panel textarea { min-height: 390px; border-color: #2b3343; background: #090d14; color: #d6e4ee; tab-size: 4; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-actions { display: flex; justify-content: flex-end; }
.endpoint-box { display: grid; gap: 7px; border: 1px solid #293246; border-radius: 11px; padding: 12px 14px; background: #0b1018; }
.endpoint-box span { color: #758096; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.endpoint-box code { color: #86def4; }
.panel-note { margin-top: 16px !important; border-top: 1px solid #252c39; padding-top: 14px; font-size: 10px !important; }
.error-message { max-width: 370px; white-space: pre-wrap; overflow-wrap: anywhere; color: #efb2ba !important; }
.keys-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.key-form-panel, .key-info-panel { min-height: 100%; }
select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; outline: none; background: #0c0f15; color: var(--text); font: inherit; }
.info-steps { display: grid; gap: 19px; margin-top: 25px; }
.info-steps > div { display: flex; gap: 12px; }
.info-steps > div > span { display: grid; flex: 0 0 auto; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #241d45; color: #ab99ff; font-size: 11px; font-weight: 850; }
.info-steps p, .info-steps strong, .info-steps small { display: block; margin: 0; }
.info-steps strong { color: #d9dce5; font-size: 12px; }
.info-steps small { margin-top: 3px; color: #717c90; font-size: 10px; }
.generated-key-card { display: grid; grid-template-columns: 58px 1fr; gap: 18px; margin-bottom: 21px; border: 1px solid #2d765b; border-radius: 18px; padding: 24px; background: linear-gradient(135deg, #102a20, #101721 60%); box-shadow: 0 22px 60px #0003; }
.generated-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: #1f6248; color: #92f2c7; font-size: 22px; font-weight: 900; }
.generated-content > p { margin: 0 0 4px; color: #60dca8; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.generated-content h2 { font-size: 22px; }
.generated-content > span { color: #81a092; font-size: 11px; }
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; margin-top: 17px; }
.copy-row code { display: flex; align-items: center; min-height: 45px; border: 1px solid #285c48; border-radius: 10px; padding: 9px 12px; background: #091711; color: #a9efd0; }
.copy-row button { min-height: 45px; background: #1d7956; }
.copy-row.secondary code { border-color: #2c3d50; background: #0b121b; color: #98dceb; }
.copy-row.secondary button { background: #28384c; }
.generated-meta { display: flex; gap: 28px; margin-top: 14px; }
.generated-meta small, .generated-meta strong { display: block; }
.generated-meta small { color: #6e897c; font-size: 9px; text-transform: uppercase; }
.generated-meta strong { margin-top: 3px; color: #cbdad3; font: 11px ui-monospace, Consolas, monospace; }
.badge.warn { background: #3e3217; color: #f2ca67; }
.table-note { display: block; max-width: 300px; margin-top: 4px; color: #69758a; font-size: 9px; white-space: normal; }
.security-warning { margin-bottom: 20px; border: 1px solid #674e25; border-radius: 15px; padding: 17px 19px; background: linear-gradient(100deg, #2a2112, #171512); color: #e8ce91; }
.security-warning strong { display: block; margin-bottom: 4px; color: #f6d98f; }
.security-warning p { margin: 0; color: #ab976b; font-size: 11px; }
.client-kind { display: inline-block; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 7px; padding: 4px 7px; background: #202634; color: #aeb7c8; font-size: 10px; }
.empty-state { padding: 28px 10px; color: #657084; text-align: center; font-size: 11px; }
.mobile-menu { display: none; position: fixed; top: 13px; left: 13px; z-index: 40; width: 42px; min-height: 42px; padding: 0; border: 1px solid #31394a; background: #111722; }

@media (max-width: 1150px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .script-workspace { grid-template-columns: 280px minmax(0, 1fr); }
}
@media (max-width: 960px) {
    .sidebar { transform: translateX(-102%); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; padding-top: 76px; }
    .mobile-menu { display: inline-flex; }
    .dashboard-grid, .keys-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .admin-main { padding-right: 16px; padding-left: 16px; }
    .admin-header { display: block; }
    .live-pill { display: inline-flex; margin-top: 17px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .script-workspace { grid-template-columns: 1fr; }
    .script-editor-panel textarea { min-height: 300px; }
    .form-grid { grid-template-columns: 1fr; }
    .generated-key-card { grid-template-columns: 1fr; }
    .copy-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .admin-header h1 { font-size: 34px; }
    .generated-meta { display: grid; gap: 10px; }
}

/* Thème professionnel monochrome */
:root {
    --bg: #050505;
    --panel: #101010;
    --panel-2: #171717;
    --line: #2b2b2b;
    --text: #f5f5f5;
    --muted: #979797;
    --accent: #ffffff;
    --accent-2: #d6d6d6;
    --danger: #d8d8d8;
    --success: #ffffff;
}
body { background: radial-gradient(circle at 50% -15%, #252525 0, #070707 33%, #030303 100%); }
a { color: #d8d8d8; }
a:hover { color: #fff; }
.mark { border-color: #555; background: linear-gradient(145deg, #fff, #bdbdbd); box-shadow: 0 20px 70px #ffffff22; color: #050505; }
.eyebrow { color: #c9c9c9; }
.button, button { background: #f2f2f2; color: #080808; }
.button:hover, button:hover { color: #080808; background: #fff; }
input:focus, textarea:focus, select:focus { border-color: #f1f1f1; box-shadow: 0 0 0 3px #ffffff18; }
.alert, .alert.success, .alert.error { border-color: #3c3c3c; background: #151515; color: #e9e9e9; }

.admin-body {
    --sidebar: #050505;
    --surface: #101010;
    --surface-2: #171717;
    --surface-3: #0a0a0a;
    background:
        radial-gradient(circle at 88% -10%, #303030 0, transparent 28%),
        radial-gradient(circle at 30% 110%, #191919 0, transparent 24%),
        #050505;
}
.lucide { width: 17px; height: 17px; stroke-width: 1.8; }
.sidebar { border-right-color: #252525; background: linear-gradient(180deg, #080808 0%, #030303 100%); }
.sidebar-logo { border: 1px solid #fff; background: #f5f5f5; box-shadow: 0 10px 30px #ffffff16; color: #050505; }
.sidebar-logo .lucide { width: 21px; height: 21px; }
.sidebar-brand small, .admin-profile small { color: #777; }
.sidebar-nav p { color: #666; }
.sidebar-nav a { color: #8d8d8d; }
.sidebar-nav a span { color: #707070; }
.sidebar-nav a:hover { background: #151515; color: #fff; }
.sidebar-nav a.active { border-color: #ededed; background: #f1f1f1; color: #080808; box-shadow: none; }
.sidebar-nav a.active span { color: #080808; }
.sidebar-footer { border-top-color: #242424; }
.admin-profile > span { background: #202020; color: #fff; }
.sidebar-logout { display: flex; gap: 8px; border-color: #292929; background: #0d0d0d; color: #a9a9a9; }
.sidebar-logout:hover { border-color: #555; background: #171717; color: #fff; }
.sidebar-footer form + form { margin-top: 7px; }
.sidebar-lock-form .sidebar-logout { border-color: #484848; color: #ededed; }
.admin-main .section-head p, .admin-main .stat-card small { display: none; }
.admin-header > div > p:last-child { color: #8b8b8b; }
.live-pill { border-color: #383838; background: #0d0d0d; color: #c3c3c3; }
.live-pill .lucide { width: 14px; height: 14px; color: #fff; }
.admin-main .panel { border-color: #292929; background: linear-gradient(150deg, #121212 0, #0b0b0b 100%); }
.admin-main .section-head p { color: #858585; }
.stat-card { border-color: #2e2e2e; background: linear-gradient(145deg, #151515, #0d0d0d); }
.stat-card.purple, .stat-card.cyan, .stat-card.green, .stat-card.red { --card-color: #ffffff; border-top-color: #696969; }
.stat-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.stat-card-head .lucide { width: 19px; height: 19px; color: #d8d8d8; }
.stat-card span { color: #a2a2a2; }
.stat-card small { color: #747474; }
.event-bar progress::-webkit-progress-bar { background: #292929; }
.event-bar progress::-webkit-progress-value { background: linear-gradient(90deg, #777, #fff); }
.event-bar progress::-moz-progress-bar { background: linear-gradient(90deg, #777, #fff); }
.rank-list > div > span { background: #202020; color: #fff; }
.rank-list strong { color: #ededed; }
.rank-list small, .table-note { color: #777; }
.admin-main th { color: #777; }
.admin-main td { border-bottom-color: #272727; color: #c3c3c3; }
code, .secret, .endpoint-box code { color: #e4e4e4; }
.event-tag.success, .event-tag.warning, .event-tag.danger, .event-tag.neutral { background: #252525; color: #e5e5e5; }
.mini-button, .outline-button { gap: 7px; border-color: #3a3a3a; background: #171717; color: #e5e5e5; }
.mini-button:hover, .outline-button:hover { background: #f2f2f2; color: #080808; }
.script-item:hover, .script-item.active { border-color: #464646; background: #191919; }
.file-icon { background: linear-gradient(145deg, #2b2b2b, #151515); color: #f4f4f4; }
.file-icon .lucide { width: 18px; height: 18px; }
.status-dot.on { background: #fff; box-shadow: 0 0 9px #fff; }
.status-dot.off { background: #666; }
.script-editor-panel textarea { border-color: #303030; background: #070707; color: #efefef; }
.endpoint-box { border-color: #303030; background: #080808; }
.endpoint-box span { color: #818181; }
.generated-key-card { border-color: #5b5b5b; background: linear-gradient(135deg, #1c1c1c, #0b0b0b 65%); }
.generated-icon { border: 1px solid #fff; background: #f2f2f2; color: #080808; }
.generated-content > p { color: #d4d4d4; }
.generated-content > span, .generated-meta small { color: #888; }
.generated-meta strong { color: #e1e1e1; }
.copy-row code, .copy-row.secondary code { border-color: #3b3b3b; background: #070707; color: #ededed; }
.copy-row button, .copy-row.secondary button { gap: 7px; background: #f1f1f1; color: #080808; }
.info-steps > div > span { background: #202020; color: #fff; }
.info-steps > div > span .lucide { width: 15px; height: 15px; }
.info-steps strong { color: #e4e4e4; }
.info-steps small { color: #7c7c7c; }
.badge.on, .badge.off, .badge.warn { background: #252525; color: #ececec; }
.security-warning { display: flex; align-items: flex-start; gap: 13px; border-color: #414141; background: linear-gradient(100deg, #181818, #0d0d0d); color: #e1e1e1; }
.security-warning > .lucide { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; }
.security-warning strong { color: #fff; }
.security-warning p { color: #929292; }
.client-kind { background: #222; color: #d2d2d2; }
.ua-preview { display: block; max-width: 210px; margin-top: 5px; overflow: hidden; color: #777; font: 9px ui-monospace, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.link, .link.danger { color: #d4d4d4; }
.link:hover, .link.danger:hover { color: #fff; }
.mobile-menu { border-color: #3a3a3a; background: #101010; color: #fff; }
.mobile-menu:hover { background: #f1f1f1; color: #080808; }

.key-list-head { align-items: center; }
.key-search { position: relative; display: flex; align-items: center; gap: 8px; width: min(620px, 100%); }
.key-search > .lucide { position: absolute; left: 12px; z-index: 1; width: 16px; height: 16px; color: #777; pointer-events: none; }
.key-search input { min-width: 0; padding-left: 38px; }
.key-search button { flex: 0 0 auto; min-height: 41px; }
.key-search a { flex: 0 0 auto; padding: 8px 2px; font-size: 11px; }
.hash-preview { display: block; width: 260px; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ededed; }
.check-row { display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: 11px; border: 1px solid #303030; border-radius: 11px; padding: 13px; background: #0b0b0b; cursor: pointer; }
.check-row input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: #fff; }
.check-row span, .check-row strong, .check-row small { display: block; }
.check-row strong { color: #e8e8e8; font-size: 12px; }
.check-row small { margin-top: 3px; color: #777; font-size: 10px; font-weight: 500; }
.device-cell { min-width: 190px; }
.device-fingerprint { display: block; margin-top: 7px; color: #ededed; }
.device-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 8px; }
.key-expiration-cell { min-width: 190px; }
.key-expiration-cell > strong { display: block; margin-bottom: 7px; color: #eee; font: 10px ui-monospace, Consolas, monospace; }
.key-time-form { display: grid; grid-template-columns: minmax(100px, 1fr) auto; gap: 7px; align-items: center; }
.key-time-form select { min-height: 32px; padding: 5px 8px; font-size: 10px; }
.dashboard-grid .table-wrap table { min-width: 100%; }
.api-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.api-console-panel { min-width: 0; }
.console-legend { color: #777; font: 10px ui-monospace, Consolas, monospace; white-space: nowrap; }
.request-console { max-height: 560px; overflow-y: auto; border: 1px solid #292929; border-radius: 11px; background: #050505; }
.console-line { display: grid; grid-template-columns: 28px 135px 125px 145px minmax(90px, 1fr) 125px; gap: 10px; align-items: center; min-height: 34px; border-bottom: 1px solid #181818; padding: 6px 10px; color: #a7a7a7; font: 10px ui-monospace, Consolas, monospace; }
.console-line:last-child { border-bottom: 0; }
.console-line span { color: #fff; font-weight: 900; }
.console-line time { color: #606060; }
.console-line code { overflow: hidden; color: #bcbcbc; text-overflow: ellipsis; white-space: nowrap; }
.console-line strong { overflow: hidden; color: #e7e7e7; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.console-line em, .console-line small { overflow: hidden; color: #777; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.console-block span { color: #9b9b9b; }
.console-warn span { color: #c7c7c7; }
.console-empty { padding: 80px 20px; color: #555; font: 11px ui-monospace, Consolas, monospace; text-align: center; }
.ip-rank { display: grid; margin-top: 15px; }
.ip-rank > div { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; min-height: 42px; border-bottom: 1px solid #252525; }
.ip-rank > div > span { color: #666; font: 10px ui-monospace, Consolas, monospace; }
.ip-rank > div > strong { color: #fff; }
.api-limits { display: grid; gap: 9px; margin-top: 22px; }
.api-limits > div { display: flex; justify-content: space-between; gap: 16px; border-radius: 8px; padding: 9px 10px; background: #181818; color: #888; font-size: 10px; }
.api-limits strong { color: #e6e6e6; }
.docs-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.docs-nav { position: sticky; top: 24px; display: grid; gap: 5px; }
.docs-nav p { margin: 0 10px 8px; color: #666; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.docs-nav a { border-radius: 9px; padding: 9px 10px; color: #999; font-size: 12px; }
.docs-nav a:hover { background: #1c1c1c; color: #fff; }
.docs-content { display: grid; gap: 18px; }
.docs-section { scroll-margin-top: 20px; }
.docs-kicker { display: inline-block; margin-bottom: 8px; color: #888; font: 9px ui-monospace, Consolas, monospace; letter-spacing: .15em; }
.docs-section > p { color: #888; font-size: 11px; }
.docs-code { overflow-x: auto; margin: 17px 0 0; border: 1px solid #2d2d2d; border-radius: 10px; padding: 14px; background: #050505; color: #e8e8e8; font: 11px/1.65 ui-monospace, Consolas, monospace; white-space: pre; }
.docs-code code { color: inherit; }
.response-list { display: grid; gap: 1px; margin-top: 16px; border: 1px solid #292929; border-radius: 10px; overflow: hidden; background: #292929; }
.response-list > div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 11px 13px; background: #0c0c0c; }
.response-list span { color: #999; font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@media (max-width: 900px) {
    .key-list-head { display: grid; }
    .key-search { width: 100%; margin-top: 14px; }
    .hash-preview { max-width: 260px; }
    .api-grid, .docs-grid { grid-template-columns: 1fr; }
    .docs-nav { position: static; }
}
@media (max-width: 560px) {
    .key-search { display: grid; grid-template-columns: 1fr auto; }
    .key-search > .lucide { top: 13px; }
    .key-search a { grid-column: 1 / -1; }
}

/* Portail client */
.client-auth-body { display: grid; place-items: center; min-height: 100vh; padding: 26px; background: radial-gradient(circle at 50% -20%, #292929 0, #080808 36%, #030303 100%); }
.client-auth-card { width: min(470px, 100%); border: 1px solid #303030; border-radius: 18px; padding: 32px; background: #0d0d0ded; box-shadow: 0 28px 90px #0009; }
.client-auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 38px; }
.client-auth-brand > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: #f2f2f2; color: #080808; font-size: 12px; font-weight: 950; }
.client-auth-brand strong, .client-auth-brand small { display: block; }
.client-auth-brand strong { color: #fff; font-size: 15px; }
.client-auth-brand small { color: #777; font-size: 9px; }
.client-auth-head { margin-bottom: 25px; }
.client-auth-head p, .client-dashboard-title p { margin: 0 0 8px; color: #888; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.client-auth-head h1 { font-size: 36px; }
.client-auth-card .alert { margin-bottom: 18px; }
.client-auth-switch { margin: 22px 0 0; color: #777; font-size: 11px; text-align: center; }
.client-auth-switch a { color: #fff; font-weight: 750; }
.client-dashboard-body { min-height: 100vh; background: #050505; }
.client-topbar { display: flex; align-items: center; justify-content: space-between; min-height: 66px; border-bottom: 1px solid #272727; padding: 0 max(22px, calc((100vw - 1100px) / 2)); background: #090909; }
.client-topbar > a { color: #fff; font-size: 17px; font-weight: 900; }
.client-topbar button { min-height: 35px; border: 1px solid #333; background: #121212; color: #bbb; font-size: 11px; }
.client-topbar button:hover { background: #f2f2f2; color: #080808; }
.client-dashboard { width: min(1100px, calc(100% - 36px)); margin: 55px auto; }
.client-dashboard-title { margin-bottom: 30px; }
.client-dashboard-title h1 { font-size: clamp(36px, 6vw, 58px); }
.client-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.client-account-grid article { min-height: 125px; border: 1px solid #2d2d2d; border-radius: 15px; padding: 21px; background: linear-gradient(145deg, #141414, #0b0b0b); }
.client-account-grid span, .client-account-grid strong, .client-account-grid code { display: block; }
.client-account-grid span { margin-bottom: 16px; color: #777; font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.client-account-grid strong, .client-account-grid code { color: #eee; font-size: 13px; }
.client-claim-panel, .client-keys-panel { margin-top: 20px; border: 1px solid #2d2d2d; border-radius: 15px; padding: 22px; background: linear-gradient(145deg, #121212, #090909); }
.client-claim-panel h2, .client-keys-panel h2 { margin-bottom: 16px; font-size: 19px; }
.client-claim-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.client-claim-form button { min-width: 110px; }
.client-key-list { display: grid; gap: 10px; }
.client-key-list article { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(130px, .8fr) minmax(130px, .8fr); gap: 18px; align-items: center; border: 1px solid #292929; border-radius: 11px; padding: 16px; background: #090909; }
.client-key-list article > div strong, .client-key-list article > div code, .client-key-list article > div span, .client-key-list article > div small { display: block; }
.client-key-list article > div span { margin-bottom: 5px; color: #777; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.client-key-list article > div strong { color: #eee; font-size: 12px; }
.client-key-list article > div code, .client-key-list article > div small { margin-top: 4px; color: #777; font-size: 9px; }
.client-key-list article > p { grid-column: 1 / -1; margin: 0; border-top: 1px solid #222; padding-top: 10px; color: #999; font-size: 10px; }
@media (max-width: 620px) {
    .client-auth-card { padding: 24px; }
    .client-account-grid { grid-template-columns: 1fr; }
    .client-claim-form, .client-key-list article { grid-template-columns: 1fr; }
}

/* Key management */
select {
    appearance: none;
    padding-right: 38px;
    background-image:
        linear-gradient(45deg, transparent 50%, #9b9b9b 50%),
        linear-gradient(135deg, #9b9b9b 50%, transparent 50%);
    background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.admin-login-card { width: min(390px, calc(100% - 36px)); padding: 28px; }
.admin-login-card form { margin-top: 0; }
.admin-login-card input { min-height: 48px; }
.admin-login-card button { width: 100%; min-height: 48px; }
.toast-alert {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 100;
    width: min(360px, calc(100vw - 44px));
    margin: 0;
    box-shadow: 0 18px 60px #000b;
    pointer-events: none;
    animation: toast-out .25s ease 4.75s forwards;
}
@keyframes toast-out { to { opacity: 0; transform: translateY(12px); visibility: hidden; } }
.key-create-panel { margin-bottom: 22px; }
.key-create-form { display: grid; gap: 14px; }
.key-create-grid { display: grid; grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(130px, .7fr)); gap: 12px; }
.key-create-form > button { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-width: 150px; }
.key-registry { border: 1px solid #292929; border-radius: 16px; padding: 21px; background: linear-gradient(150deg, #111, #090909); }
.key-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.key-card { min-width: 0; overflow: hidden; border: 1px solid #303030; border-radius: 14px; background: #080808; }
.key-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid #262626; padding: 17px; }
.key-card > header strong, .key-card > header small { display: block; }
.key-card > header strong { color: #f2f2f2; font-size: 14px; }
.key-card > header small { margin-top: 4px; color: #777; font-size: 10px; }
.key-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
.key-field-box { min-width: 0; border: 1px solid #252525; border-radius: 10px; padding: 12px; background: #101010; }
.key-field-box > span { display: block; margin-bottom: 8px; color: #686868; font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.key-field-box > strong, .key-field-box > code { display: block; overflow: hidden; color: #e8e8e8; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.key-field-box > code { font-family: ui-monospace, Consolas, monospace; }
.key-field-wide { grid-column: 1 / -1; }
.key-secret-box > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.key-secret-box > div code { overflow: hidden; border: 1px solid #2c2c2c; border-radius: 8px; padding: 9px 10px; background: #070707; color: #f0f0f0; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.key-secret-box > div button { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 10px; font-size: 10px; }
.field-action { min-height: 0; margin-top: 10px; padding: 0; background: transparent; color: #aaa; font-size: 10px; text-decoration: underline; }
.field-action:hover { background: transparent; color: #fff; }
.key-field-box .key-time-form { margin-top: 9px; }
.key-field-box .key-time-form select { min-width: 0; }
.key-card > footer { display: flex; justify-content: flex-end; border-top: 1px solid #252525; padding: 11px 14px; }
.key-delete-button { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; border: 1px solid #343434; padding: 6px 10px; background: #141414; color: #aaa; font-size: 10px; }
.key-delete-button:hover { border-color: #666; background: #1d1d1d; color: #fff; }
.block-ip-button { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; border: 1px solid #484848; padding: 6px 10px; background: #f1f1f1; color: #080808; font-size: 10px; white-space: nowrap; }
.block-ip-button:hover { border-color: #fff; background: #fff; color: #000; }
.generated-batch-card { align-items: start; }
.generated-batch-list { display: grid; gap: 7px; max-height: 420px; margin-top: 16px; overflow-y: auto; }
.generated-key-row { display: grid; grid-template-columns: minmax(130px, .45fr) minmax(260px, 1fr) auto; gap: 8px; align-items: stretch; }
.generated-key-row > div { min-width: 0; border: 1px solid #343434; border-radius: 9px; padding: 9px 11px; background: #090909; }
.generated-key-row span, .generated-key-row code { display: block; }
.generated-key-row span { margin-bottom: 5px; color: #666; font-size: 8px; font-weight: 900; }
.generated-key-row code { overflow: hidden; color: #eee; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.generated-key-row button { min-width: 88px; }
@media (max-width: 1100px) {
    .key-create-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .key-card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .key-create-grid, .key-fields, .generated-key-row { grid-template-columns: 1fr; }
    .key-field-wide { grid-column: auto; }
}

/* Accounts */
.account-toolbar { margin-bottom: 18px; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-card { overflow: hidden; border: 1px solid #2d2d2d; border-radius: 15px; background: linear-gradient(145deg, #111, #080808); }
.account-card.is-blacklisted { border-color: #555; opacity: .88; }
.account-card > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid #282828; padding: 17px; }
.account-avatar { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid #3a3a3a; border-radius: 11px; background: #1c1c1c; color: #fff; font-weight: 900; }
.account-card > header strong, .account-card > header code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card > header strong { color: #f2f2f2; font-size: 14px; }
.account-card > header code { margin-top: 4px; color: #777; font-size: 9px; }
.account-meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; }
.account-meta-grid > div, .account-blacklist-reason { border: 1px solid #272727; border-radius: 9px; padding: 10px; background: #0c0c0c; }
.account-meta-grid span, .account-blacklist-reason span { display: block; margin-bottom: 5px; color: #666; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.account-meta-grid strong, .account-blacklist-reason strong, .account-blacklist-reason small { display: block; color: #ddd; font-size: 9px; }
.account-blacklist-reason { margin: 0 12px 12px; }
.account-blacklist-reason small { margin-top: 5px; color: #777; }
.account-key-list { display: grid; gap: 7px; padding: 0 12px 12px; }
.account-key-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(100px, .7fr) auto; gap: 10px; align-items: center; border: 1px solid #292929; border-radius: 9px; padding: 11px; background: #0b0b0b; }
.account-key-row strong, .account-key-row code, .account-key-row span { display: block; }
.account-key-row strong { color: #eee; font-size: 11px; }
.account-key-row code { margin-top: 3px; overflow: hidden; color: #777; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.account-key-row > div > span { color: #666; font-size: 8px; font-weight: 900; }
.account-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; border-top: 1px solid #242424; padding: 12px; }
.account-actions-grid form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: end; }
.account-actions-grid label { min-width: 0; }
.account-actions-grid input, .account-actions-grid select { min-height: 36px; padding-top: 7px; padding-bottom: 7px; font-size: 10px; }
.account-actions-grid button { min-height: 36px; padding: 7px 10px; font-size: 10px; }
.account-card > footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 9px; border-top: 1px solid #282828; padding: 12px; }
.account-card > footer form { display: flex; gap: 7px; }
.account-card > footer button { display: inline-flex; align-items: center; gap: 7px; min-height: 35px; font-size: 10px; }
.account-blacklist-form { flex: 1; justify-content: flex-end; }
.account-blacklist-form input { width: min(240px, 100%); min-height: 35px; padding: 7px 9px; font-size: 10px; }
@media (max-width: 1100px) { .account-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
    .account-meta-grid, .account-actions-grid, .account-key-row { grid-template-columns: 1fr; }
    .account-actions-grid form { grid-template-columns: 1fr; }
    .account-card > footer, .account-card > footer form { display: grid; width: 100%; }
}
