:root{
  --bg:#070a12;
  --bg2:#0d1220;
  --panel:rgba(17,24,39,.86);
  --panel2:rgba(11,18,32,.92);
  --line:rgba(255,255,255,.10);
  --text:#eef4ff;
  --muted:#9ba9c2;
  --muted2:#6e7b93;
  --accent:#ffcc33;
  --accent2:#8b5cf6;
  --accent3:#06b6d4;
  --danger:#ef4444;
  --ok:#22c55e;
  --warn:#f59e0b;
  --shadow:0 24px 80px rgba(0,0,0,.45);
  --radius:22px;
  --radius2:14px;
  --font:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0;font-family:var(--font);background:radial-gradient(circle at top left,rgba(139,92,246,.25),transparent 30%),radial-gradient(circle at top right,rgba(6,182,212,.14),transparent 35%),linear-gradient(135deg,#070a12,#0e1022 55%,#080b13);color:var(--text);overflow:hidden}
button,input,select{font:inherit}
button{cursor:pointer}
a{color:inherit}
.hidden{display:none!important}
.app-shell{height:100%;display:grid;grid-template-columns:300px 1fr;gap:0;position:relative}
.sidebar{height:100%;padding:22px 18px;background:rgba(3,7,18,.72);border-right:1px solid var(--line);backdrop-filter:blur(20px);display:flex;flex-direction:column;gap:18px;min-width:0}
.brand{display:flex;align-items:center;gap:12px;padding:6px 4px 16px;border-bottom:1px solid var(--line)}
.brand-logo{width:46px;height:46px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,#ff2d55,#ffcc33);box-shadow:0 12px 40px rgba(255,45,85,.25);font-size:24px;font-weight:900;color:white}
.brand-title{font-size:20px;font-weight:900;letter-spacing:.2px}
.brand-sub{font-size:12px;color:var(--muted);margin-top:2px}
.nav-card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:14px;box-shadow:var(--shadow)}
.nav-btn{width:100%;display:flex;align-items:center;gap:12px;padding:12px;border:0;border-radius:14px;background:transparent;color:var(--text);text-align:left;font-weight:700;transition:.16s}
.nav-btn:hover,.nav-btn.active{background:rgba(255,255,255,.08);transform:translateX(2px)}
.nav-btn .ico{width:28px;height:28px;border-radius:10px;display:grid;place-items:center;background:rgba(255,255,255,.08);flex:0 0 auto}
.user-card{margin-top:auto;background:linear-gradient(135deg,rgba(139,92,246,.22),rgba(6,182,212,.10));border:1px solid var(--line);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow)}
.user-row{display:flex;align-items:center;gap:12px;min-width:0}
.avatar{width:42px;height:42px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(135deg,var(--accent2),var(--accent3));font-weight:900;color:white;flex:0 0 auto}
.user-meta{min-width:0;flex:1}
.user-name{font-weight:900;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-role{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;margin-top:2px}
.storage-meter{margin-top:14px}
.storage-label{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px;margin-bottom:8px}
.progress{height:8px;background:rgba(255,255,255,.10);border-radius:999px;overflow:hidden}
.progress>span{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--accent2),var(--accent3),var(--accent));border-radius:999px;transition:width .25s}
.logout-btn{width:100%;margin-top:14px;border:1px solid var(--line);border-radius:14px;padding:11px 12px;background:rgba(255,255,255,.08);color:var(--text);font-weight:800}
.logout-btn:hover{background:rgba(239,68,68,.15);border-color:rgba(239,68,68,.35)}
.main{height:100%;display:flex;flex-direction:column;min-width:0}
.topbar{padding:20px 26px 14px;border-bottom:1px solid var(--line);background:rgba(7,10,18,.55);backdrop-filter:blur(20px);display:flex;align-items:center;gap:14px;min-height:92px}
.mobile-menu{display:none;width:44px;height:44px;border-radius:15px;border:1px solid var(--line);background:rgba(255,255,255,.08);color:var(--text);padding:0}
.search-box{height:48px;min-width:280px;max-width:560px;flex:1;display:flex;align-items:center;gap:12px;border:1px solid var(--line);background:rgba(255,255,255,.06);border-radius:16px;padding:0 14px;min-height:48px}
.search-box input{width:100%;border:0;background:transparent;outline:0;color:var(--text);font-weight:600}
.search-box input::placeholder{color:var(--muted2)}
.top-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.btn{border:0;border-radius:15px;padding:12px 16px;font-weight:900;color:#101320;background:var(--text);display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;transition:.15s;white-space:nowrap;max-width:100%}
.btn:hover{transform:translateY(-1px);filter:brightness(1.05)}
.btn.primary{background:linear-gradient(135deg,var(--accent),#fff3a3)}
.btn.purple{background:linear-gradient(135deg,var(--accent2),#c4b5fd);color:white}
.btn.cyan{background:linear-gradient(135deg,var(--accent3),#a5f3fc);color:#06101b}
.btn.ghost{background:rgba(255,255,255,.08);color:var(--text);border:1px solid var(--line)}
.btn.danger{background:linear-gradient(135deg,#ef4444,#fb7185);color:white}
.btn.small{min-height:34px;padding:8px 10px;border-radius:12px;font-size:13px}
.icon-svg{width:18px;height:18px;display:inline-grid;place-items:center;flex:0 0 auto}
.icon-svg svg,.ico svg,.search-icon svg,.mobile-menu svg,.empty-art svg{width:100%;height:100%;display:block}
.btn .icon-svg{width:18px;height:18px}
.nav-btn .ico svg{width:16px;height:16px}
.search-icon{width:18px;height:18px;display:grid;place-items:center;color:var(--muted)}
.mobile-menu svg{width:20px;height:20px;margin:auto}
.crumb{display:inline-flex;align-items:center;gap:8px}
.item-icon svg{width:20px;height:20px}
.item-actions .btn,.view-actions .btn,.admin-user-actions .btn{gap:8px}
.empty-art{width:62px;height:62px;margin:0 auto 12px;color:rgba(255,255,255,.88)}
.tree-btn .icon-svg,.admin-badge .icon-svg{width:16px;height:16px}

.content{flex:1;overflow:auto;padding:22px 26px 30px;position:relative}
.drop-zone{border:1px dashed rgba(255,255,255,.16);border-radius:var(--radius);padding:18px;background:rgba(255,255,255,.035);transition:.16s;min-height:100%}
.drop-zone.dragover{border-color:var(--accent);background:rgba(255,204,51,.10);box-shadow:0 0 0 4px rgba(255,204,51,.08) inset}
.breadcrumbs{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 16px;color:var(--muted)}
.crumb{border:1px solid var(--line);background:rgba(255,255,255,.06);color:var(--text);border-radius:999px;padding:8px 12px;font-weight:800;display:inline-flex;align-items:center;gap:8px}
.crumb:hover{background:rgba(255,255,255,.11)}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}
.section-title{font-size:22px;font-weight:950;letter-spacing:.2px}
.view-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.table-card{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel2);box-shadow:var(--shadow);overflow:hidden;-webkit-overflow-scrolling:touch}
table{width:100%;min-width:0;border-collapse:collapse;table-layout:fixed}
th,td{text-align:left;padding:14px 16px;border-bottom:1px solid rgba(255,255,255,.07);vertical-align:middle;min-width:0}
th{font-size:12px;color:var(--muted);font-weight:900;letter-spacing:.08em;text-transform:uppercase;background:rgba(255,255,255,.035);user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
th.sortable{cursor:pointer}
th.sortable:hover{color:var(--text)}
th:nth-child(2),td:nth-child(2){width:96px}
th:nth-child(3),td:nth-child(3){width:160px}
th:nth-child(4),td:nth-child(4){width:86px}
th:nth-child(5),td:nth-child(5){width:340px;text-align:right}
tr:last-child td{border-bottom:0}
tbody tr{transition:.14s;cursor:default;-webkit-user-select:none;user-select:none}
tbody tr:hover{background:rgba(255,255,255,.055)}
.item-name{display:flex;align-items:center;gap:12px;min-width:0;font-weight:850;cursor:default;-webkit-user-select:none;user-select:none}
.item-icon{width:38px;height:38px;border-radius:13px;display:grid;place-items:center;background:rgba(255,255,255,.08);flex:0 0 auto;color:#dbeafe}
.item-icon.folder{background:linear-gradient(135deg,rgba(255,204,51,.26),rgba(245,158,11,.18))}
.item-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:default;-webkit-user-select:none;user-select:none}
.item-actions{display:flex;gap:7px;justify-content:flex-end;flex-wrap:wrap;min-width:0}
.empty{padding:50px 20px;text-align:center;color:var(--muted)}
.empty .big{font-size:62px;margin-bottom:12px;filter:drop-shadow(0 10px 30px rgba(255,255,255,.1));display:grid;place-items:center}
.empty-title{font-weight:950;color:var(--text);font-size:20px;margin-bottom:6px}
.login-page{height:100%;min-height:100vh;min-height:100dvh;width:100%;max-width:100vw;display:grid;place-items:center;padding:24px;position:relative;overflow:hidden;background:radial-gradient(circle at 50% 0,rgba(255,204,51,.16),transparent 28%),radial-gradient(circle at 20% 100%,rgba(139,92,246,.24),transparent 32%),radial-gradient(circle at 90% 70%,rgba(6,182,212,.18),transparent 30%),linear-gradient(135deg,#050812 0%,#0b1022 48%,#050812 100%)}
.login-page:before{content:"";position:absolute;inset:18px;border:1px solid rgba(255,255,255,.07);border-radius:34px;pointer-events:none;background:linear-gradient(135deg,rgba(255,255,255,.035),transparent 38%,rgba(255,255,255,.025));max-width:calc(100vw - 36px)}
.login-page:after{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);background-size:42px 42px;mask-image:radial-gradient(circle at center,black,transparent 72%);pointer-events:none}
.login-bg-glow{position:absolute;border-radius:999px;filter:blur(8px);pointer-events:none;opacity:.72}
.login-bg-glow-one{width:240px;height:240px;left:-70px;top:-60px;background:radial-gradient(circle,rgba(255,204,51,.20),transparent 68%)}
.login-bg-glow-two{width:300px;height:300px;right:-105px;bottom:-95px;background:radial-gradient(circle,rgba(6,182,212,.20),transparent 70%)}
.login-card{width:min(560px,100%);max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);background:linear-gradient(180deg,rgba(18,25,43,.92),rgba(9,14,27,.90));border:1px solid rgba(255,255,255,.13);border-radius:32px;box-shadow:0 30px 90px rgba(0,0,0,.48);padding:30px;backdrop-filter:blur(24px);position:relative;z-index:1;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;-ms-overflow-style:none}
.login-card:before{content:"";position:absolute;left:0;right:0;top:0;height:4px;background:linear-gradient(90deg,var(--accent),var(--accent2),var(--accent3));opacity:.95}
.login-card:after{content:"";position:absolute;width:170px;height:170px;right:-75px;top:-85px;border-radius:999px;background:radial-gradient(circle,rgba(255,204,51,.18),transparent 68%);pointer-events:none}
.login-card::-webkit-scrollbar{width:0;height:0}
.login-card .brand{border-bottom:0;padding:0;margin:14px 0 18px;justify-content:flex-start;text-align:left;position:relative;z-index:1}
.auth-badge{width:max-content;max-width:100%;display:inline-flex;align-items:center;gap:8px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.07);border-radius:999px;padding:8px 12px;color:#dbeafe;font-size:12px;font-weight:950;letter-spacing:.02em;position:relative;z-index:1}
.auth-badge span{width:9px;height:9px;border-radius:50%;background:var(--ok);box-shadow:0 0 0 5px rgba(34,197,94,.12)}
.auth-logo{width:54px;height:54px;border-radius:19px;font-size:22px;color:#121725;background:linear-gradient(135deg,#fff4b0,var(--accent) 45%,#ff8a3d);box-shadow:0 18px 50px rgba(255,204,51,.22)}
.auth-logo i{font-size:22px}
.auth-title-block{position:relative;z-index:1;margin-bottom:18px}
.auth-title-block h1{margin:0;color:var(--text);font-size:clamp(30px,4vw,46px);line-height:1.02;letter-spacing:-.055em;font-weight:1000}
.auth-title-block p{margin:12px 0 0;color:#b9c5da;font-weight:800;line-height:1.58;font-size:15px;max-width:470px}
.auth-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 20px;position:relative;z-index:1}
.auth-stats div{border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.055);border-radius:18px;padding:13px 12px;min-width:0}
.auth-stats strong{display:block;color:#ffe174;font-size:22px;line-height:1;font-weight:1000;white-space:nowrap}
.auth-stats span{display:block;margin-top:6px;color:#aebbd1;font-size:12px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.auth-field{position:relative;z-index:1;margin-bottom:13px}
.auth-input-wrap{height:52px;display:flex;align-items:center;gap:10px;border:1px solid rgba(255,255,255,.12);border-radius:17px;background:rgba(255,255,255,.065);padding:0 14px;transition:.16s}
.auth-input-wrap i{width:18px;text-align:center;color:#ffe174;flex:0 0 auto}
.auth-input-wrap .input{height:100%;border:0;border-radius:0;background:transparent;box-shadow:none;padding:0;color:var(--text);min-width:0}
.auth-input-wrap:focus-within{border-color:rgba(255,204,51,.62);box-shadow:0 0 0 4px rgba(255,204,51,.09);background:rgba(255,255,255,.085)}
.auth-actions{display:grid;grid-template-columns:1fr;gap:10px;margin-top:4px;position:relative;z-index:1}
.auth-actions .btn{width:100%;min-height:50px;border-radius:17px}
.auth-actions .btn.ghost{margin-top:0}
.auth-features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px;position:relative;z-index:1}
.auth-feature{min-width:0;border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.045);border-radius:16px;padding:12px 10px;display:flex;align-items:center;justify-content:center;gap:8px;color:#cbd5e1;font-size:12px;font-weight:950;text-align:center;line-height:1.2}
.auth-feature i{color:#ffe174;flex:0 0 auto}
.field{display:flex;flex-direction:column;gap:8px;margin-bottom:14px}
.field label{font-size:13px;font-weight:900;color:var(--muted);letter-spacing:.04em;text-transform:uppercase}
.input,.select{width:100%;height:46px;border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.07);color:var(--text);outline:0;padding:0 14px;font-weight:700}
.input:focus,.select:focus{border-color:rgba(255,204,51,.55);box-shadow:0 0 0 4px rgba(255,204,51,.08)}
.select option{background:#111827;color:white}
.error{background:rgba(239,68,68,.14);border:1px solid rgba(239,68,68,.35);color:#fecaca;padding:11px 13px;border-radius:14px;margin-bottom:14px;font-weight:800}
.success{background:rgba(34,197,94,.14);border:1px solid rgba(34,197,94,.35);color:#bbf7d0;padding:11px 13px;border-radius:14px;margin-bottom:14px;font-weight:800}
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.62);display:grid;place-items:center;z-index:1000;padding:18px;backdrop-filter:blur(10px)}
.modal{width:min(560px,100%);max-height:88vh;overflow:auto;background:linear-gradient(135deg,rgba(17,24,39,.98),rgba(9,13,24,.98));border:1px solid var(--line);border-radius:26px;box-shadow:var(--shadow);padding:20px}
.modal.big{width:min(920px,100%)}
.modal-head{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:14px}
.modal-title{font-size:20px;font-weight:950}
.close-btn{width:40px;height:40px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.08);color:var(--text);font-size:22px}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px;flex-wrap:wrap}
.folder-tree{max-height:360px;overflow:auto;border:1px solid var(--line);border-radius:18px;padding:10px;background:rgba(255,255,255,.04)}
.tree-btn{width:100%;border:0;background:transparent;color:var(--text);padding:9px 10px;border-radius:12px;text-align:left;font-weight:800;display:flex;gap:9px;align-items:center}
.tree-btn:hover,.tree-btn.active{background:rgba(255,255,255,.09)}
.preview-box{display:grid;place-items:center;background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:18px;min-height:240px;overflow:hidden}
.preview-box img,.preview-box video{max-width:100%;max-height:64vh;border-radius:14px}
.preview-box audio{width:min(100%,620px)}
.preview-frame{width:100%;height:65vh;border:0;background:white;border-radius:14px}
.upload-box{display:flex;flex-direction:column;gap:14px}
.upload-summary{color:var(--muted);font-weight:800;line-height:1.6}
.upload-destination-card{border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.05);padding:14px}
.upload-destination-title{font-size:13px;font-weight:900;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px}
.upload-destination-path{font-weight:800;word-break:break-word}
.link-action{border:0;background:transparent;color:var(--text);font-weight:900;text-decoration:underline;padding:0;align-self:flex-start}
.inline-create{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.inline-create .input{flex:1;min-width:220px}
.tree-icon svg{width:16px;height:16px}
.admin-badge{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;padding:5px 9px;font-size:12px;font-weight:900;color:var(--muted);margin-top:6px}
.admin-wrap{height:100%;display:flex;flex-direction:column;overflow:auto;padding:24px;background:radial-gradient(circle at 20% 0,rgba(139,92,246,.18),transparent 28%),radial-gradient(circle at 80% 0,rgba(255,204,51,.12),transparent 30%)}
.admin-top{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px}
.admin-title{display:flex;align-items:center;gap:13px}
.admin-title h1{margin:0;font-size:28px}
.admin-sub{color:var(--muted);font-weight:700;margin-top:3px}
.admin-grid{display:grid;grid-template-columns:360px 1fr;gap:18px;min-height:0}
.panel-card{background:rgba(13,18,32,.84);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px;min-width:0}
.user-list-admin{display:grid;gap:12px}
.admin-user-row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.04);padding:14px}
.admin-badge{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;padding:5px 9px;font-size:12px;font-weight:900;color:var(--muted);margin-top:6px}
.admin-user-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.full{grid-column:1/-1}
.checkbox-line{display:flex;align-items:center;gap:10px;font-weight:900;color:var(--text);padding:10px 0}
.checkbox-line input{width:18px;height:18px;accent-color:#ffcc33}
.toast-wrap{position:fixed;right:18px;bottom:18px;display:grid;gap:10px;z-index:2000}
.toast{background:rgba(17,24,39,.95);border:1px solid var(--line);border-left:4px solid var(--accent);box-shadow:var(--shadow);border-radius:16px;padding:12px 14px;max-width:380px;font-weight:800;color:var(--text)}
.toast.error{border-left-color:var(--danger);color:#fecaca;margin:0}
.toast.success{border-left-color:var(--ok);color:#bbf7d0;margin:0}

@media (max-width:1300px){
  th:nth-child(2),td:nth-child(2){width:86px}
  th:nth-child(3),td:nth-child(3){width:145px}
  th:nth-child(4),td:nth-child(4){width:70px}
  th:nth-child(5),td:nth-child(5){width:220px}
  .item-actions .btn{width:36px;height:34px;min-height:34px;padding:7px;border-radius:11px}
  .item-actions .btn span:not(.icon-svg){display:none}
  .item-actions .btn .icon-svg{width:18px;height:18px}
}
@media (max-width:1120px){
  .app-shell{grid-template-columns:280px 1fr}
  .sidebar{padding:18px 12px}
  .topbar{padding:14px 16px;gap:10px}
  .content{padding:16px}
  .search-box{min-width:220px}
  th:nth-child(3),td:nth-child(3){width:132px}
}
@media (max-width:980px){
  html,body{overflow:auto}
  .app-shell{grid-template-columns:1fr;height:auto;min-height:100%}
  .sidebar{position:fixed;z-index:900;inset:0 auto 0 0;width:300px;transform:translateX(-105%);transition:.2s}
  .sidebar.open{transform:translateX(0)}
  .mobile-menu{display:grid;place-items:center}
  .main{min-height:100vh}
  .topbar{padding:14px;flex-wrap:wrap;min-height:auto}
  .search-box{order:2;min-width:100%;max-width:none}
  .top-actions{order:3;width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .top-actions .btn{width:100%;min-width:0}
  .content{padding:14px}
  .drop-zone{padding:12px}
  .section-head{align-items:flex-start;flex-direction:column}
  .view-actions{width:100%}
  .btn{padding:11px 12px;font-size:14px}
  th:nth-child(3),td:nth-child(3){display:none}
  th,td{padding:12px 10px}
  .item-actions .btn{min-height:32px;font-size:12px;padding:7px 8px}
  table{min-width:0}
  .admin-grid{grid-template-columns:1fr}
  .admin-wrap{padding:14px}
  .admin-top{flex-direction:column;align-items:flex-start}
  .form-grid{grid-template-columns:1fr}
}

@media (max-width:760px){
  .table-card{background:transparent;border:0;box-shadow:none;overflow:visible}
  table,thead,tbody,tr,td{display:block;width:100%!important}
  table{border-collapse:separate;table-layout:auto}
  thead{display:none}
  tbody{display:grid;gap:12px}
  tbody tr{border:1px solid var(--line);border-radius:18px;background:var(--panel2);box-shadow:var(--shadow);overflow:hidden}
  tbody tr:hover{background:var(--panel2)}
  td{border-bottom:1px solid rgba(255,255,255,.07);padding:11px 14px}
  td:first-child{padding-top:14px}
  td:nth-child(2),td:nth-child(3),td:nth-child(4){display:flex!important;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-weight:800}
  td:nth-child(2)::before{content:"Taille";font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted2)}
  td:nth-child(3)::before{content:"Modification";font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted2)}
  td:nth-child(4)::before{content:"Type";font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted2)}
  td:last-child{border-bottom:0;text-align:left;padding:12px 14px 14px}
  .item-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;justify-content:stretch}
  .item-actions .btn{width:100%;height:38px;min-height:38px;padding:8px}
  .item-actions .btn span:not(.icon-svg){display:none}
}
@media (max-width:620px){
  .topbar{gap:10px}
  .top-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
  .top-actions .btn{flex-direction:column;gap:6px;min-height:70px;padding:10px 8px;border-radius:16px}
  .top-actions .btn .txt{display:block;font-size:12px;line-height:1.1;white-space:normal;text-align:center}
  .search-box{height:46px;padding:0 12px}
  .view-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .view-actions .btn{width:100%;justify-content:center}
  table{min-width:0}
  .item-actions{min-width:0}
  .login-card{padding:22px;border-radius:24px}
  .admin-user-row{grid-template-columns:1fr}
  .admin-user-actions{justify-content:flex-start}
}
@media (max-width:420px){
  .brand-title{font-size:18px}
  .top-actions{grid-template-columns:1fr}
  .top-actions .btn{flex-direction:row;justify-content:center;min-height:46px}
  .top-actions .btn .txt{font-size:13px;white-space:nowrap}
}


.btn:disabled{opacity:.48;cursor:not-allowed;filter:saturate(.6)}
.btn:disabled:hover{transform:none;filter:saturate(.6)}
.drop-zone.is-trash{border-style:solid;background:rgba(255,255,255,.025)}
.item-subtext{-webkit-user-select:none;user-select:none;cursor:default;font-size:12px;color:var(--muted2);font-weight:700;margin-top:3px;white-space:normal;word-break:break-word}
.context-menu{position:fixed;z-index:2500;min-width:220px;border:1px solid var(--line);border-radius:16px;background:rgba(17,24,39,.98);box-shadow:var(--shadow);padding:8px;backdrop-filter:blur(14px)}
.context-menu button{width:100%;border:0;background:transparent;color:var(--text);border-radius:12px;padding:10px 12px;display:flex;align-items:center;gap:10px;font-weight:900;text-align:left}
.context-menu button:hover{background:rgba(255,255,255,.08)}
.duplicate-box{display:grid;gap:12px;color:var(--muted)}
.duplicate-intro{line-height:1.6;font-weight:800;color:var(--text)}
.duplicate-intro span{color:var(--muted)}
.duplicate-choice{width:100%;border:1px solid transparent;border-radius:18px;background:rgba(255,255,255,.045);padding:14px;text-align:left;color:var(--text);transition:.15s}
.duplicate-choice:hover{border-color:rgba(255,204,51,.36);background:rgba(255,204,51,.08);transform:translateY(-1px)}
.duplicate-title{font-size:18px;font-weight:950;color:#ff6b6b;margin-bottom:6px}
.duplicate-desc{color:var(--muted);font-weight:800;line-height:1.45;margin-bottom:12px}
.duplicate-file{display:flex;align-items:center;gap:12px;color:var(--text)}
.duplicate-file svg{width:42px;height:42px;flex:0 0 auto;background:rgba(255,255,255,.10);border-radius:12px;padding:8px;color:var(--muted)}
.duplicate-file b{display:block;font-weight:900;word-break:break-word}
.duplicate-file span{display:block;color:var(--muted);font-size:13px;margin-top:3px;font-weight:700}
@media (max-width:760px){
  .duplicate-title{font-size:16px}
  .duplicate-choice{padding:12px}
  .duplicate-file svg{width:38px;height:38px}
  .context-menu{max-width:calc(100vw - 20px)}
}

/* Correctif corbeille : onglet conservé + boutons sans scroll horizontal */
.drop-zone.is-trash .table-card{overflow:hidden}
.drop-zone.is-trash table{min-width:0;table-layout:fixed;width:100%}
.drop-zone.is-trash th:nth-child(5),.drop-zone.is-trash td:nth-child(5){width:220px;text-align:right}
.drop-zone.is-trash .item-actions{justify-content:flex-end;min-width:0}
.drop-zone.is-trash .item-actions .btn{max-width:100%}
@media (max-width:760px){
  .drop-zone.is-trash .item-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .drop-zone.is-trash .item-actions .btn{width:100%}
}
@media (max-width:420px){
  .drop-zone.is-trash .item-actions{grid-template-columns:1fr}
}

/* Sélection + barre d'actions propre */
th:nth-child(5),td:nth-child(5){width:74px;text-align:right}
.selection-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 14px;padding:10px 12px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.055);box-shadow:0 16px 50px rgba(0,0,0,.25)}
.selection-pill{display:inline-flex;align-items:center;max-width:min(420px,100%);border-radius:999px;padding:8px 12px;background:rgba(139,0,0,.42);color:#fff;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.selection-pill span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.selection-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.toolbar-btn{min-height:38px;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.07);color:var(--text);display:inline-flex;align-items:center;gap:8px;padding:8px 11px;font-weight:900;transition:.15s}
.toolbar-btn:hover{background:rgba(255,255,255,.12);transform:translateY(-1px)}
.toolbar-btn.danger{color:#fecaca;border-color:rgba(239,68,68,.30);background:rgba(239,68,68,.10)}
.toolbar-btn.icon-only{width:38px;padding:8px;justify-content:center}
.select-mark{width:22px;height:22px;border:1px solid rgba(255,255,255,.36);border-radius:6px;display:grid;place-items:center;flex:0 0 auto;font-size:14px;font-weight:950;background:rgba(255,255,255,.05)}
.selected-row{background:rgba(255,255,255,.10)!important;box-shadow:inset 4px 0 0 var(--accent)}
.selected-row .select-mark{background:var(--accent);color:#101320;border-color:var(--accent)}
.row-menu-btn{width:36px;height:36px;border:1px solid var(--line);border-radius:11px;background:rgba(255,255,255,.06);color:var(--text);display:inline-grid;place-items:center;padding:0}
.row-menu-btn:hover{background:rgba(255,255,255,.13)}
.compact-actions{display:flex!important;justify-content:flex-end!important;min-width:0!important}
.context-menu.action-menu{min-width:260px;padding:8px}
.context-menu .danger-line{color:#fecaca}
.share-panel{display:grid;gap:14px}
.share-target{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.045);padding:12px}
.share-target-name{font-weight:950;word-break:break-word}
.share-target-sub{font-size:12px;color:var(--muted);font-weight:800;margin-top:3px}
.share-link-row{display:flex;gap:10px;align-items:center}
.share-link-row .input{flex:1}
.share-note{border:1px solid rgba(34,197,94,.25);background:rgba(34,197,94,.10);color:#bbf7d0;border-radius:14px;padding:10px 12px;font-weight:800}
.share-page{min-height:100%;overflow:auto;padding:28px;background:radial-gradient(circle at top left,rgba(139,92,246,.22),transparent 30%),linear-gradient(135deg,#070a12,#0e1022)}
.share-public-card{width:min(1050px,100%);margin:0 auto;background:rgba(13,18,32,.84);border:1px solid var(--line);border-radius:28px;box-shadow:var(--shadow);padding:22px}
.share-public-brand{border-bottom:1px solid var(--line);margin-bottom:18px}
.share-public-head{margin-top:6px}
.share-locked{width:min(480px,100%);margin:30px auto 10px;padding:22px;border:1px solid var(--line);border-radius:24px;background:rgba(255,255,255,.04)}
.share-locked h1{margin:0 0 10px;font-size:24px}
.share-locked p{color:var(--muted);font-weight:800;line-height:1.5}
.share-preview{border:1px solid var(--line);border-radius:20px;background:rgba(255,255,255,.04);padding:16px;min-height:260px;display:grid;place-items:center;overflow:auto}
.share-preview img,.share-preview video{max-width:100%;max-height:68vh;border-radius:14px}
.share-preview audio{width:min(100%,620px)}
@media (max-width:980px){
  .selection-toolbar{align-items:flex-start;flex-direction:column}
  .selection-actions{width:100%;justify-content:flex-start}
  .toolbar-btn span:not(.icon-svg){display:none}
  .toolbar-btn{width:40px;height:40px;justify-content:center;padding:8px}
  .toolbar-btn.icon-only{width:40px;height:40px}
  th:nth-child(5),td:nth-child(5){width:60px}
}
@media (max-width:760px){
  tbody tr.selected-row{box-shadow:inset 4px 0 0 var(--accent),var(--shadow)}
  td:last-child{display:block!important;text-align:right;padding:10px 14px 14px}
  .compact-actions{justify-content:flex-end!important}
  .selection-pill{max-width:100%}
  .share-link-row{flex-direction:column;align-items:stretch}
  .share-public-card{padding:14px;border-radius:22px}
  .share-page{padding:14px}
}

/* Ajustements sélection, multi-sélection et personnalisation */
.brand-logo{overflow:hidden}
.brand-logo img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}
.item-name,.item-text,.item-title-line,.item-subtext{cursor:default;-webkit-user-select:none;user-select:none}
.item-title-line{display:flex;align-items:center;gap:8px;min-width:0}
.item-title-line>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.select-mark{appearance:none;-webkit-appearance:none;cursor:pointer;color:inherit}
.select-mark:hover{border-color:var(--accent);background:rgba(255,204,51,.12)}
.share-badges{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto}
.share-badge{width:22px;height:22px;border:1px solid rgba(34,197,94,.35);border-radius:999px;display:grid;place-items:center;color:#bbf7d0;background:rgba(34,197,94,.10)}
.share-badge.locked{border-color:rgba(255,204,51,.45);color:#fde68a;background:rgba(255,204,51,.12)}
.share-badge svg{width:13px;height:13px}
.drop-zone.has-selection .section-head{margin-bottom:8px}
.selection-toolbar{margin:-2px 0 8px;padding:7px 9px;border-radius:15px;min-height:46px;box-shadow:0 10px 32px rgba(0,0,0,.20)}
.selection-pill{padding:6px 10px;font-size:14px;max-width:min(360px,100%)}
.selection-actions{gap:6px}
.toolbar-btn{min-height:34px;padding:7px 10px;border-radius:12px;font-size:13px}
.toolbar-btn.icon-only{width:34px;height:34px;padding:7px}
.settings-card{grid-column:1/-1}
.settings-card .form-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.settings-card .field.full{grid-column:1/-1}
@media (max-width:1180px){.settings-card .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){
  .settings-card .form-grid{grid-template-columns:1fr}
  .selection-toolbar{margin:0 0 8px;align-items:stretch}
  .selection-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;width:100%}
  .toolbar-btn,.toolbar-btn.icon-only{width:100%;height:36px;min-height:36px}
}

/* Correctif final : bandeau de sélection très compact + case tout sélectionner */
.name-head{display:flex;align-items:center;gap:12px;min-width:0}
.name-head>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
th .select-mark{margin:0;vertical-align:middle}
.select-all-mark{width:22px;height:22px;min-width:22px;border-radius:6px;background:rgba(255,255,255,.05);color:var(--text)}
.select-all-mark:disabled{opacity:.45;cursor:default}
.select-all-mark.is-all,.select-all-mark.is-partial{background:var(--accent);border-color:var(--accent);color:#101320}
.drop-zone.has-selection .section-head{margin-bottom:6px!important}
.selection-toolbar{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;flex-wrap:nowrap!important;gap:8px!important;margin:-4px 0 6px!important;padding:5px 8px!important;min-height:38px!important;border-radius:14px!important;overflow:visible!important}
.selection-pill{max-width:220px!important;min-width:0!important;padding:5px 9px!important;font-size:13px!important;line-height:1.15!important;flex:1 1 auto!important}
.selection-actions{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:nowrap!important;gap:5px!important;width:auto!important;min-width:0!important;flex:0 0 auto!important}
.toolbar-btn,.toolbar-btn.icon-only{width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;padding:6px!important;border-radius:11px!important;justify-content:center!important;font-size:0!important;line-height:1!important;flex:0 0 auto!important}
.toolbar-btn span:not(.icon-svg){display:none!important}
.toolbar-btn .icon-svg{width:17px!important;height:17px!important}
.toolbar-btn .icon-svg svg{width:17px!important;height:17px!important}
@media (max-width:760px){
  .selection-toolbar{align-items:center!important;flex-direction:row!important;flex-wrap:nowrap!important;margin:-3px 0 6px!important;padding:5px 7px!important}
  .selection-actions{display:flex!important;grid-template-columns:none!important;width:auto!important;overflow-x:auto!important;max-width:calc(100% - 132px)!important;padding-bottom:1px!important}
  .selection-pill{max-width:126px!important;font-size:12px!important}
  .toolbar-btn,.toolbar-btn.icon-only{width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;padding:5px!important}
}

/* Panel admin en onglets + personnalisation auto */
.admin-tabs-shell{display:flex;flex-direction:column;gap:16px;min-height:0}
.admin-tabs{display:flex;gap:10px;align-items:center;flex-wrap:wrap;border:1px solid var(--line);border-radius:var(--radius);background:rgba(13,18,32,.74);box-shadow:var(--shadow);padding:10px}
.admin-tab-btn{border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.055);color:var(--text);display:inline-flex;align-items:center;gap:9px;min-height:44px;padding:10px 14px;font-weight:950;transition:.15s}
.admin-tab-btn:hover{background:rgba(255,255,255,.10);transform:translateY(-1px)}
.admin-tab-btn.active{background:linear-gradient(135deg,rgba(255,204,51,.24),rgba(139,92,246,.18));border-color:rgba(255,204,51,.38);box-shadow:0 12px 34px rgba(0,0,0,.22)}
.admin-tab-panel[data-admin-panel]{display:none!important}
.admin-tab-panel[data-admin-panel].active{display:block!important}
.admin-tab-panel[data-admin-panel="bots"].active{display:flex!important}
.admin-tab-panel[data-admin-panel="bot-options"].active{display:block!important}
.bots-admin-panel:not(.active){display:none!important}
.admin-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.admin-panel-sub{color:var(--muted);font-weight:800;margin-top:4px;font-size:13px}
.admin-tabs-shell .settings-card{grid-column:auto}
.admin-tabs-shell .settings-card .form-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.admin-tabs-shell .settings-card .field.full{grid-column:1/-1}
@media (max-width:1180px){.admin-tabs-shell .settings-card .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){
  .admin-tabs{display:grid;grid-template-columns:1fr;gap:8px}
  .admin-tab-btn{width:100%;justify-content:flex-start}
  .admin-tabs-shell .settings-card .form-grid{grid-template-columns:1fr}
}

/* Corrections panel : bouton compact + upload logo/icône */
.create-user-submit-row{display:flex;justify-content:center;margin-top:14px}
.create-user-submit{width:auto!important;min-width:220px;max-width:100%;padding:11px 22px!important}
.setting-asset-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.settings-section-title{grid-column:1/-1;margin:10px 0 0;padding:14px 16px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(135deg,rgba(255,204,51,.12),rgba(139,92,246,.10));color:var(--text);font-size:16px;font-weight:1000}
.settings-section-title span{display:block;margin-top:5px;color:var(--muted);font-size:12px;font-weight:800;line-height:1.35}
.setting-textarea{height:auto;min-height:92px;resize:vertical;padding:12px 14px;line-height:1.45}
.setting-upload-btn{min-width:150px;white-space:nowrap}
@media (max-width:760px){
  .setting-asset-row{grid-template-columns:1fr}
  .setting-upload-btn{width:100%;min-width:0}
  .create-user-submit{width:100%!important;min-width:0}
}

/* Upload en arrière-plan : fermer la fenêtre ne coupe plus l'envoi */
.background-upload-wrap{position:fixed;right:18px;bottom:18px;z-index:2100;display:grid;gap:10px;width:min(390px,calc(100vw - 36px));pointer-events:none}
.background-upload-card{pointer-events:auto;border:1px solid var(--line);border-radius:18px;background:linear-gradient(135deg,rgba(17,24,39,.98),rgba(9,13,24,.98));box-shadow:var(--shadow);padding:14px;transition:.22s}
.background-upload-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.background-upload-title{font-weight:950;color:var(--text);font-size:15px}
.background-upload-sub{color:var(--muted);font-weight:800;font-size:12px;margin-top:3px;line-height:1.35}
.background-upload-close{width:32px;height:32px;border:1px solid var(--line);border-radius:11px;background:rgba(255,255,255,.08);color:var(--text);font-size:20px;line-height:1;display:grid;place-items:center}
.background-upload-close:hover{background:rgba(255,255,255,.14)}
.background-upload-progress{height:10px;margin-top:4px}
.background-upload-percent{font-weight:950;color:var(--muted);font-size:12px;margin-top:7px}
.background-upload-card.done{border-color:rgba(34,197,94,.38)}
.background-upload-card.done .background-upload-percent{color:#bbf7d0}
.background-upload-card.error{border-color:rgba(239,68,68,.42)}
.background-upload-card.error .background-upload-percent{color:#fecaca}
.select-mark svg{width:14px;height:14px;display:block;pointer-events:none}
.select-all-mark svg{width:14px;height:14px;display:block;pointer-events:none}
.selection-toolbar.hidden{display:none!important}
.drop-zone:not(.has-selection) .selection-toolbar{display:none!important}
@media (max-width:620px){.background-upload-wrap{right:10px;bottom:10px;width:calc(100vw - 20px)}}

/* Inscription, compte et stockage membres */
.profile-btn{margin-top:10px;background:rgba(255,255,255,.055)}
.account-delete-zone{margin-top:14px;border:1px solid rgba(239,68,68,.32);border-radius:16px;background:rgba(239,68,68,.08);padding:13px 14px;color:#fecaca;font-weight:850;line-height:1.45;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.account-delete-zone .btn{margin-left:auto}
.setting-checkbox{align-self:end;border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.045);padding:12px 14px;margin:0;min-height:46px}
.admin-badges-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:6px}
.admin-badge.expired{color:#fecaca;border-color:rgba(239,68,68,.35);background:rgba(239,68,68,.08)}
.storage-mini{border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.045);padding:12px 14px;color:var(--muted);font-weight:800;line-height:1.5}
.storage-summary-card{border:1px solid var(--line);border-radius:17px;background:rgba(255,255,255,.045);padding:14px;margin-bottom:12px;color:var(--muted);font-weight:800;line-height:1.55}
.storage-tree-modal{max-height:430px;overflow:auto;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.035);padding:8px}
.storage-tree-row{display:flex;align-items:center;gap:9px;border-radius:12px;padding:9px 10px;color:var(--text);font-weight:800}
.storage-tree-row:hover{background:rgba(255,255,255,.06)}
.storage-tree-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.storage-tree-size{color:var(--muted);font-size:12px;font-weight:900;white-space:nowrap}
@media (max-width:760px){.admin-badges-row{align-items:flex-start}.storage-tree-row{font-size:13px}.storage-tree-size{display:none}}
.field-help{color:var(--muted);font-size:12px;font-weight:800;line-height:1.35;margin-top:4px}


/* Quota Mo / Go + téléchargement stockage admin */
.quota-control{display:grid;grid-template-columns:minmax(0,1fr) 96px;gap:10px;align-items:center}
.storage-download-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--line);border-radius:11px;background:rgba(255,255,255,.07);color:var(--text);font-size:12px;font-weight:900;text-decoration:none;padding:7px 9px;white-space:nowrap}
.storage-download-btn:hover{background:rgba(255,255,255,.13)}
.storage-download-btn svg{width:15px;height:15px;display:block}
@media (max-width:760px){.quota-control{grid-template-columns:1fr}.storage-download-btn span{display:none}.storage-download-btn{padding:7px}}

/* Correctif : notifications au-dessus des uploads, annulation upload, aperçu stockage admin */
.toast-wrap{bottom:var(--toast-bottom,18px)!important;z-index:2300!important;transition:bottom .18s ease}
.background-upload-wrap{z-index:2100!important}
.background-upload-card{position:relative;overflow:hidden}
.background-upload-head{align-items:center!important;margin-bottom:10px!important}
.background-upload-copy{min-width:0;flex:1}
.background-upload-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.background-upload-minimize,.background-upload-cancel{width:30px;height:30px;border:1px solid var(--line);border-radius:11px;background:rgba(255,255,255,.08);color:var(--text);display:grid;place-items:center;padding:0;transition:.16s}
.background-upload-minimize svg,.background-upload-cancel svg{width:16px;height:16px;display:block}
.background-upload-minimize:hover{background:rgba(255,255,255,.14)}
.background-upload-cancel{border-color:rgba(239,68,68,.36);color:#fecaca;background:rgba(239,68,68,.10);opacity:0;transform:scale(.92);pointer-events:none}
.background-upload-card:hover .background-upload-cancel,.background-upload-card.done .background-upload-cancel,.background-upload-card.error .background-upload-cancel,.background-upload-card.cancelled .background-upload-cancel{opacity:1;transform:scale(1);pointer-events:auto}
.background-upload-cancel:hover{background:rgba(239,68,68,.20);border-color:rgba(239,68,68,.55)}
.background-upload-body{transition:.16s}
.background-upload-card.is-minimized{padding:11px 12px;max-width:280px;justify-self:end}
.background-upload-card.is-minimized .background-upload-head{margin-bottom:0!important}
.background-upload-card.is-minimized .background-upload-body{display:none}
.background-upload-card.is-minimized .background-upload-title{font-size:13px}
.background-upload-card.is-minimized .background-upload-sub{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.background-upload-card.cancelled{border-color:rgba(239,68,68,.42)}
.background-upload-card.cancelled .background-upload-percent{color:#fecaca}
.storage-preview-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--line);border-radius:11px;background:rgba(255,255,255,.07);color:var(--text);font-size:12px;font-weight:900;text-decoration:none;padding:7px 9px;white-space:nowrap}
.storage-preview-btn:hover{background:rgba(255,255,255,.13)}
.storage-preview-btn svg{width:15px;height:15px;display:block}
@media (max-width:760px){.storage-preview-btn span,.storage-download-btn span{display:none}.storage-preview-btn{padding:7px}.toast-wrap{right:10px!important;left:10px!important;bottom:var(--toast-bottom,10px)!important}.toast{max-width:none}}

/* Correctif : aperçu stockage admin au-dessus de la modal stockage */
.preview-modal-backdrop{z-index:1120}
.preview-modal{box-shadow:0 28px 90px rgba(0,0,0,.55)}
.preview-modal-body{min-width:0}

/* Correctif : aucun soulignement sur les liens affichés comme des boutons */
a.btn,a.btn:hover,a.btn:focus,a.btn:visited,
.btn,.btn:hover,.btn:focus,
a.toolbar-btn,a.toolbar-btn:hover,a.toolbar-btn:focus,a.toolbar-btn:visited,
.toolbar-btn,.toolbar-btn:hover,.toolbar-btn:focus,
a.storage-download-btn,a.storage-download-btn:hover,a.storage-download-btn:focus,a.storage-download-btn:visited,
a.storage-preview-btn,a.storage-preview-btn:hover,a.storage-preview-btn:focus,a.storage-preview-btn:visited,
.storage-download-btn,.storage-download-btn:hover,.storage-download-btn:focus,
.storage-preview-btn,.storage-preview-btn:hover,.storage-preview-btn:focus,
a.admin-tab,a.admin-tab:hover,a.admin-tab:focus,a.admin-tab:visited,
.admin-tab,.admin-tab:hover,.admin-tab:focus,
a.sidebar-link,a.sidebar-link:hover,a.sidebar-link:focus,a.sidebar-link:visited,
a[role="button"],a[role="button"]:hover,a[role="button"]:focus,a[role="button"]:visited{text-decoration:none!important}

/* Correctif : barre d'outils permanente et stable */
.drop-zone .section-head,
.drop-zone.has-selection .section-head{margin-bottom:14px!important}
#selectionToolbar.selection-toolbar,
#selectionToolbar.selection-toolbar.hidden,
.drop-zone:not(.has-selection) #selectionToolbar.selection-toolbar{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;flex-wrap:nowrap!important;gap:8px!important;margin:0 0 8px!important;padding:5px 8px!important;min-height:38px!important;height:38px!important;border-radius:14px!important;overflow:hidden!important;position:sticky;top:0;z-index:30;box-sizing:border-box}
#selectionToolbar .selection-pill{display:flex!important;align-items:center!important;min-width:0!important;flex:0 0 220px!important;max-width:220px!important;height:28px!important;padding:5px 9px!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;box-sizing:border-box!important}
#selectionToolbar #selectionName{display:block!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
#selectionToolbar:not(.has-selected-items) .selection-pill{visibility:hidden!important;pointer-events:none!important}
#selectionToolbar .selection-actions{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:nowrap!important;gap:5px!important;width:auto!important;min-width:0!important;flex:0 0 auto!important;overflow:visible!important}
#selectionToolbar .toolbar-btn.hidden{display:inline-flex!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important}
@media (max-width:760px){
  #selectionToolbar.selection-toolbar,
  #selectionToolbar.selection-toolbar.hidden,
  .drop-zone:not(.has-selection) #selectionToolbar.selection-toolbar{height:38px!important;min-height:38px!important;margin:0 0 8px!important;padding:5px 7px!important}
  #selectionToolbar .selection-pill{flex:0 0 126px!important;max-width:126px!important;height:28px!important;font-size:12px!important}
  #selectionToolbar .selection-actions{max-width:calc(100% - 134px)!important;overflow-x:auto!important;padding-bottom:1px!important}
}

/* Correctif : scroll des dossiers avec beaucoup de fichiers */
@media (min-width:761px){
  .app-shell{height:100vh!important;min-height:0!important;overflow:hidden!important}
  .main{min-height:0!important;overflow:hidden!important}
  .content{min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;scrollbar-gutter:stable}
  .drop-zone{height:auto!important;min-height:100%!important}
}

/* Service séparé : hébergement bots Discord admin */
.bot-create-card{border:1px solid var(--line);border-radius:var(--radius);background:rgba(255,255,255,.045);padding:16px;margin:0 0 16px;box-shadow:0 18px 50px rgba(0,0,0,.22)}
.bot-create-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.bot-create-title{font-size:18px;font-weight:950;color:var(--text)}
.bot-create-sub{color:var(--muted);font-size:13px;font-weight:800;line-height:1.4;margin-top:4px}

.bot-upload-picker{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.055);
  padding:8px;
}
.bot-upload-input{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.bot-upload-button{
  border:1px solid rgba(255,255,255,.16);
  border-radius:12px;
  background:linear-gradient(135deg,rgba(139,92,246,.95),rgba(124,58,237,.85));
  color:#fff;
  min-height:36px;
  padding:0 14px;
  font-weight:950;
  cursor:pointer;
  box-shadow:0 12px 24px rgba(0,0,0,.20);
}
.bot-upload-button:hover{
  filter:brightness(1.08);
}
.bot-upload-name{
  min-width:0;
  flex:1;
  color:var(--muted);
  font-weight:850;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.bot-upload-name.has-file{
  color:var(--text);
}
@media (max-width:640px){
  .bot-upload-picker{align-items:stretch;flex-direction:column}
  .bot-upload-button{width:100%}
}

.bots-list-admin{display:flex;flex-direction:column;gap:12px}
.bot-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.045);padding:14px;box-shadow:0 16px 42px rgba(0,0,0,.18)}
.bot-main{min-width:0;flex:1}
.bot-path{color:var(--muted);font-size:12px;font-weight:800;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bot-actions{flex-wrap:wrap;justify-content:flex-end;max-width:560px}
.bot-online{color:#bbf7d0;border-color:rgba(34,197,94,.35)!important;background:rgba(34,197,94,.08)!important}
.bot-stopped{color:#fecaca;border-color:rgba(239,68,68,.35)!important;background:rgba(239,68,68,.08)!important}
.command-output{border:1px solid var(--line);border-radius:18px;background:rgba(0,0,0,.28);padding:14px;max-height:520px;overflow:auto}
.command-output pre{margin:0;white-space:pre-wrap;word-break:break-word;color:var(--text);font-size:12px;line-height:1.45}
@media (max-width:860px){.bot-row{flex-direction:column}.bot-actions{justify-content:flex-start;max-width:none}.bot-actions .btn span{display:none}.bot-actions .btn{padding:8px 10px}.bot-create-card{padding:14px}}


/* MaevaBots - espace type Pterodactyl */
.bot-host-empty{
  min-height:220px;
  display:grid;
  place-items:center;
  text-align:center;
  color:var(--muted);
  border:1px solid var(--line);
  border-radius:22px;
  background:rgba(11,18,32,.52);
}
.bot-host-shell{
  margin-top:18px;
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
  gap:16px;
  min-height:560px;
}
.bot-host-sidebar{
  border:1px solid rgba(167,139,250,.22);
  border-radius:24px;
  background:linear-gradient(180deg,rgba(39,22,72,.70),rgba(11,18,32,.88));
  padding:16px;
  min-width:0;
  overflow:hidden;
}
.bot-host-brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 8px 16px;
  border-bottom:1px solid rgba(255,255,255,.10);
  margin-bottom:14px;
}
.bot-host-brand-icon{
  width:46px;
  height:46px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#7c3aed,#a78bfa);
  color:white;
  flex:0 0 auto;
}
.bot-host-brand-title{
  font-size:22px;
  font-weight:950;
  letter-spacing:.2px;
}
.bot-host-brand-sub{
  color:#bda7ff;
  font-size:12px;
  font-weight:800;
  margin-top:2px;
}
.bot-host-list{
  display:grid;
  gap:10px;
  max-height:720px;
  overflow:auto;
  padding-right:4px;
}
.bot-side-card{
  width:100%;
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  background:rgba(255,255,255,.05);
  color:var(--text);
  text-align:left;
  padding:12px;
  transition:.16s;
}
.bot-side-card:hover,
.bot-side-card.active{
  background:rgba(139,92,246,.22);
  border-color:rgba(167,139,250,.50);
  transform:translateX(2px);
}
.bot-side-top{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.bot-side-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#7c3aed,#9333ea);
  flex:0 0 auto;
}
.bot-side-meta{
  min-width:0;
}
.bot-side-name{
  font-weight:950;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.bot-side-id{
  margin-top:2px;
  color:var(--muted);
  font-size:11px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.bot-side-status{
  margin-top:12px;
  display:flex;
  align-items:center;
  gap:7px;
  color:#c7d2fe;
  font-size:12px;
  font-weight:850;
}
.bot-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
  background:#ef4444;
  box-shadow:0 0 0 3px rgba(239,68,68,.13);
}
.bot-dot.online{
  background:#22c55e;
  box-shadow:0 0 0 3px rgba(34,197,94,.14);
}
.bot-dot.offline{
  background:#ef4444;
  box-shadow:0 0 0 3px rgba(239,68,68,.13);
}
.bot-host-main{
  min-width:0;
  border:1px solid rgba(167,139,250,.20);
  border-radius:24px;
  background:rgba(11,18,32,.72);
  overflow:hidden;
}
.bot-host-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:20px;
  background:linear-gradient(135deg,rgba(31,27,52,.96),rgba(18,24,39,.88));
  border-bottom:1px solid rgba(255,255,255,.10);
}
.bot-host-title{
  font-size:28px;
  line-height:1.1;
  font-weight:950;
}
.bot-host-sub{
  margin-top:8px;
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-weight:800;
  flex-wrap:wrap;
}
.bot-sep{
  color:rgba(255,255,255,.25);
}
.bot-host-header-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.bot-host-tabs{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 18px;
  background:rgba(7,10,18,.42);
  border-bottom:1px solid rgba(255,255,255,.08);
  overflow:auto;
}
.bot-host-tab{
  border:0;
  color:#c4b5fd;
  background:transparent;
  border-radius:14px;
  padding:10px 14px;
  font-weight:950;
  display:inline-flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.bot-host-tab:hover,
.bot-host-tab.active{
  background:rgba(139,92,246,.24);
  color:white;
}
.bot-host-content{
  padding:16px;
  min-height:420px;
}
.bot-dashboard-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 210px;
  gap:16px;
}
.bot-console-card,
.bot-files-card,
.bot-settings-card{
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  background:rgba(15,23,42,.72);
  padding:16px;
  min-width:0;
}
.bot-panel-head,
.bot-files-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.bot-panel-title{
  font-size:18px;
  font-weight:950;
}
.bot-panel-sub{
  margin-top:4px;
  color:var(--muted);
  font-weight:750;
  font-size:13px;
}
.bot-console-output{
  min-height:380px;
  max-height:520px;
  margin:0;
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:#050811;
  color:#fef3c7;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size:12px;
  line-height:1.45;
  white-space:pre-wrap;
  overflow:auto;
}
.bot-stats-column{
  display:grid;
  gap:12px;
  align-content:start;
}
.bot-stat-card{
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  background:rgba(255,255,255,.06);
  padding:16px;
}
.bot-stat-card.online{
  border-color:rgba(34,197,94,.28);
}
.bot-stat-card.offline{
  border-color:rgba(239,68,68,.30);
}
.bot-stat-label{
  color:var(--muted);
  font-size:12px;
  font-weight:850;
}
.bot-stat-value{
  margin-top:6px;
  font-weight:950;
  font-size:18px;
}
.bot-files-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.bot-files-breadcrumbs{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  background:rgba(255,255,255,.04);
  margin-bottom:12px;
}
.bot-crumb{
  border:0;
  background:transparent;
  color:#c4b5fd;
  font-weight:900;
  padding:2px 4px;
}
.bot-crumb:hover{
  color:white;
  text-decoration:underline;
}
.bot-crumb-sep{
  color:rgba(255,255,255,.28);
}
.bot-files-table{
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  overflow:hidden;
}
.bot-files-row{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) 110px 150px 300px;
  gap:12px;
  align-items:center;
  padding:12px 14px;
  border-top:1px solid rgba(255,255,255,.08);
}
.bot-files-row:first-child{
  border-top:0;
}
.bot-files-head{
  background:rgba(139,92,246,.14);
  color:#d9caff;
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.bot-file-name{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.bot-file-open{
  border:0;
  background:transparent;
  color:var(--text);
  font-weight:900;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:left;
}
.bot-file-open:hover{
  color:#c4b5fd;
}
.bot-file-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.bot-files-loading{
  padding:30px;
  text-align:center;
  color:var(--muted);
  font-weight:850;
}
.bot-files-loading.error{
  color:#fecaca;
}
.bot-settings-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:16px;
}
.bot-settings-actions{
  display:grid;
  gap:10px;
  margin-top:14px;
}
.bot-settings-note{
  margin-top:16px;
  color:var(--muted);
  line-height:1.5;
  font-size:13px;
}
.bot-editor-path{
  color:#c4b5fd;
  font-weight:900;
  margin-bottom:10px;
  word-break:break-all;
}
.bot-editor-textarea{
  min-height:420px;
  width:100%;
  resize:vertical;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  line-height:1.45;
}
.btn.tiny{
  padding:6px 9px;
  min-height:0;
  border-radius:10px;
  font-size:12px;
  font-weight:900;
}

@media (max-width:1100px){
  .bot-host-shell{
    grid-template-columns:1fr;
  }
  .bot-host-sidebar{
    max-height:280px;
  }
  .bot-dashboard-grid,
  .bot-settings-grid{
    grid-template-columns:1fr;
  }
  .bot-stats-column{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .bot-files-row{
    grid-template-columns:minmax(0,1fr);
    gap:8px;
  }
  .bot-files-head{
    display:none;
  }
  .bot-file-actions{
    justify-content:flex-start;
  }
}

/* Correctif MaevaBots : empêche les sauts de page au clic sur console/fichiers/paramètres/actions */
#adminTabBots,
#botsList,
.bot-host-shell,
.bot-host-main,
.bot-host-content,
.bot-dashboard-grid,
.bot-files-card,
.bot-settings-grid{
  overflow-anchor:none;
}
#adminTabBots button,
#adminTabBots .btn,
#adminTabBots .bot-host-tab,
#adminTabBots .bot-side-card{
  scroll-margin:0!important;
}

/* MaevaBots : sélection fichiers + menu trois points type Pterodactyl */
.bot-files-row{
  grid-template-columns:38px minmax(0,1.45fr) 110px 150px 54px;
  position:relative;
}
.bot-files-row.selected{
  background:rgba(96,165,250,.13);
}
.bot-file-check-cell{
  display:flex;
  align-items:center;
  justify-content:center;
}
.bot-file-checkbox{
  width:16px;
  height:16px;
  accent-color:#60a5fa;
  cursor:pointer;
}
.bot-file-menu-cell{
  display:flex;
  justify-content:flex-end;
  position:relative;
}
.bot-file-menu-btn{
  width:34px;
  height:30px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#dbeafe;
  font-weight:950;
  letter-spacing:1px;
  cursor:pointer;
}
.bot-file-menu-btn:hover,
.bot-files-row.menu-open .bot-file-menu-btn{
  background:rgba(255,255,255,.10);
  color:white;
}
.bot-file-menu{
  position:absolute;
  right:0;
  top:34px;
  z-index:30;
  min-width:190px;
  padding:8px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:#f8fafc;
  color:#334155;
  box-shadow:0 18px 42px rgba(0,0,0,.35);
}
.bot-file-menu button,
.bot-file-menu a{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 11px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#334155;
  text-decoration:none;
  font-weight:850;
  font-size:14px;
  text-align:left;
  cursor:pointer;
}
.bot-file-menu button:hover,
.bot-file-menu a:hover{
  background:#e2e8f0;
  color:#0f172a;
}
.bot-file-menu .danger{
  color:#b91c1c;
}
.bot-file-menu .icon-svg{
  width:15px;
  height:15px;
  flex:0 0 15px;
}
.bot-files-bulk-bar{
  position:sticky;
  bottom:12px;
  z-index:25;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  width:min(520px, calc(100% - 24px));
  margin:14px auto 0;
  padding:12px 14px;
  border-radius:13px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(15,23,42,.96);
  box-shadow:0 18px 42px rgba(0,0,0,.35);
}
.bot-files-bulk-info{
  color:#cbd5e1;
  font-weight:900;
  white-space:nowrap;
}
.bot-files-bulk-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
@media (max-width:1100px){
  .bot-files-row{
    grid-template-columns:34px minmax(0,1fr) 54px;
  }
  .bot-files-row > div:nth-child(3),
  .bot-files-row > div:nth-child(4){
    grid-column:2 / 4;
    color:var(--muted);
    font-size:12px;
  }
  .bot-file-menu-cell{
    grid-column:3;
    grid-row:1;
  }
  .bot-files-bulk-bar{
    width:100%;
    flex-direction:column;
    align-items:stretch;
  }
  .bot-files-bulk-actions{
    justify-content:center;
  }
}

/* MaevaBots : panel dédié avec menu gauche + sans bouton actualiser */
.bots-admin-panel{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-height:calc(100vh - 170px);
}
.bots-admin-head{
  margin-bottom:0!important;
  flex:0 0 auto;
}
.bots-list-admin{
  min-height:0;
  flex:1 1 auto;
}
.bot-admin-workspace{
  margin-top:0!important;
  min-height:620px;
  height:calc(100vh - 260px);
  max-height:calc(100vh - 260px);
}
.bot-admin-workspace-sidebar{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.bot-admin-workspace-main{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.bot-admin-workspace-main .bot-host-header,
.bot-admin-workspace-main .bot-host-tabs{
  flex:0 0 auto;
}
.bot-admin-workspace-main .bot-host-content{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  scrollbar-gutter:stable;
}
.bot-admin-nav{
  display:grid;
  gap:8px;
  padding:0 0 14px;
  margin:0 0 14px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.bot-admin-nav-btn{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:15px;
  background:rgba(255,255,255,.045);
  color:var(--text);
  min-height:44px;
  padding:10px 12px;
  font-weight:950;
  cursor:pointer;
  text-align:left;
}
.bot-admin-nav-btn:hover,
.bot-admin-nav-btn.active{
  background:rgba(139,92,246,.24);
  border-color:rgba(167,139,250,.48);
  color:#fff;
}
.bot-admin-nav-btn span{
  flex:1;
  min-width:0;
}
.bot-admin-nav-btn b{
  min-width:26px;
  height:24px;
  padding:0 7px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.12);
  font-size:12px;
}
.bot-sidebar-label{
  color:#bda7ff;
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin:0 4px 10px;
}
.bot-admin-workspace .bot-host-list{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  overflow:auto;
}
.bot-host-mini-empty{
  border:1px dashed rgba(255,255,255,.16);
  border-radius:16px;
  padding:14px;
  color:var(--muted);
  font-weight:850;
  text-align:center;
}
.bot-host-empty-panel{
  height:100%;
  min-height:420px;
  border:0;
  border-radius:0;
  background:rgba(11,18,32,.44);
}
.bot-create-page{
  min-height:100%;
  overflow:auto;
  padding:22px;
  scrollbar-gutter:stable;
}
.bot-create-page-head{
  max-width:920px;
  margin:0 auto 14px;
}
.bot-create-card-compact{
  max-width:920px;
  margin:0 auto!important;
  padding:16px!important;
}
.bot-create-grid-compact{
  display:grid;
  grid-template-columns:repeat(2,minmax(240px,1fr));
  gap:14px;
}
.bot-upload-picker-compact{
  min-height:44px;
}
.bot-create-actions-row{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}
.bot-admin-workspace .bot-files-card,
.bot-admin-workspace .bot-console-card,
.bot-admin-workspace .bot-settings-card{
  box-shadow:none;
}
.bot-admin-workspace .bot-files-card{
  min-height:100%;
  display:flex;
  flex-direction:column;
}
.bot-admin-workspace .bot-files-table{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}
.bot-admin-workspace #botFilesRows{
  min-height:0;
}
.bot-admin-workspace .bot-dashboard-grid{
  min-height:100%;
}
.bot-admin-workspace .bot-console-card{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.bot-admin-workspace .bot-console-output{
  flex:1 1 auto;
  min-height:320px;
  max-height:none;
}
@media (max-width:1100px){
  .bot-admin-workspace{
    height:auto;
    max-height:none;
    min-height:0;
  }
  .bot-admin-workspace .bot-host-list{
    max-height:250px;
  }
  .bot-create-page{
    padding:16px;
  }
}
@media (max-width:700px){
  .bot-create-grid-compact{
    grid-template-columns:1fr;
  }
  .bot-create-actions-row .btn{
    width:100%;
  }
}

/* Correctif MaevaBots : panel adapté à la hauteur de la page, sans double scroll navigateur + contenu */
body.admin-bots-view{
  overflow:hidden!important;
}
body.admin-bots-view .admin-wrap{
  height:100dvh!important;
  max-height:100dvh!important;
  overflow:hidden!important;
  padding:14px 18px!important;
}
body.admin-bots-view .admin-top{
  flex:0 0 auto!important;
  margin-bottom:10px!important;
}
body.admin-bots-view .admin-title h1{
  font-size:24px!important;
}
body.admin-bots-view .brand-logo{
  width:42px!important;
  height:42px!important;
  border-radius:14px!important;
}
body.admin-bots-view #adminContent.admin-tabs-shell{
  flex:1 1 auto!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  overflow:hidden!important;
}
body.admin-bots-view .admin-tabs{
  flex:0 0 auto!important;
  padding:8px!important;
  gap:8px!important;
}
body.admin-bots-view .admin-tab-btn{
  min-height:40px!important;
  padding:8px 12px!important;
}
body.admin-bots-view #adminTabBots.active{
  flex:1 1 auto!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  padding:12px!important;
}
body.admin-bots-view #adminTabBots .bots-admin-head{
  flex:0 0 auto!important;
  margin-bottom:8px!important;
}
body.admin-bots-view #adminTabBots .section-title{
  font-size:20px!important;
}
body.admin-bots-view #botsInfo{
  font-size:13px!important;
  margin-top:2px!important;
}
body.admin-bots-view #botsList{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:hidden!important;
}
body.admin-bots-view .bot-admin-workspace{
  height:100%!important;
  max-height:none!important;
  min-height:0!important;
  margin-top:0!important;
  grid-template-columns:240px minmax(0,1fr)!important;
  gap:12px!important;
}
body.admin-bots-view .bot-host-sidebar{
  min-height:0!important;
  padding:12px!important;
  border-radius:18px!important;
  overflow:hidden!important;
}
body.admin-bots-view .bot-host-brand{
  gap:10px!important;
  padding:4px 4px 10px!important;
  margin-bottom:10px!important;
}
body.admin-bots-view .bot-host-brand-icon{
  width:38px!important;
  height:38px!important;
  border-radius:12px!important;
}
body.admin-bots-view .bot-host-brand-title{
  font-size:18px!important;
}
body.admin-bots-view .bot-host-brand-sub{
  font-size:11px!important;
}
body.admin-bots-view .bot-admin-nav{
  gap:6px!important;
  padding-bottom:10px!important;
  margin-bottom:10px!important;
}
body.admin-bots-view .bot-admin-nav-btn{
  min-height:38px!important;
  padding:8px 10px!important;
  border-radius:12px!important;
}
body.admin-bots-view .bot-sidebar-label{
  margin-bottom:8px!important;
}
body.admin-bots-view .bot-admin-workspace .bot-host-list{
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
  padding-right:3px!important;
}
body.admin-bots-view .bot-side-card{
  padding:10px!important;
  border-radius:14px!important;
}
body.admin-bots-view .bot-side-icon{
  width:34px!important;
  height:34px!important;
  border-radius:11px!important;
}
body.admin-bots-view .bot-side-status{
  margin-top:8px!important;
}
body.admin-bots-view .bot-host-main{
  min-height:0!important;
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  border-radius:18px!important;
  overflow:hidden!important;
}
body.admin-bots-view .bot-host-header{
  flex:0 0 auto!important;
  padding:12px 14px!important;
  gap:10px!important;
}
body.admin-bots-view .bot-host-title{
  font-size:22px!important;
}
body.admin-bots-view .bot-host-sub{
  margin-top:4px!important;
  font-size:13px!important;
}
body.admin-bots-view .bot-host-header-actions{
  gap:6px!important;
}
body.admin-bots-view .bot-host-header-actions .btn{
  min-height:34px!important;
  padding:7px 10px!important;
  border-radius:11px!important;
}
body.admin-bots-view .bot-host-tabs{
  flex:0 0 auto!important;
  padding:8px 12px!important;
  gap:8px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}
body.admin-bots-view .bot-host-tab{
  padding:8px 11px!important;
  border-radius:12px!important;
}
body.admin-bots-view .bot-host-content{
  flex:1 1 auto!important;
  min-height:0!important;
  padding:12px!important;
  overflow:hidden!important;
}
body.admin-bots-view .bot-dashboard-grid{
  height:100%!important;
  min-height:0!important;
  grid-template-columns:minmax(0,1fr) 180px!important;
  gap:12px!important;
}
body.admin-bots-view .bot-console-card,
body.admin-bots-view .bot-files-card,
body.admin-bots-view .bot-settings-card{
  padding:12px!important;
  border-radius:16px!important;
}
body.admin-bots-view .bot-console-card{
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
}
body.admin-bots-view .bot-panel-head,
body.admin-bots-view .bot-files-top{
  flex:0 0 auto!important;
  margin-bottom:8px!important;
}
body.admin-bots-view .bot-panel-title{
  font-size:17px!important;
}
body.admin-bots-view .bot-panel-sub{
  font-size:12px!important;
  margin-top:2px!important;
}
body.admin-bots-view .bot-console-output{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
  padding:12px!important;
  font-size:11.5px!important;
}
body.admin-bots-view .bot-stats-column{
  height:100%!important;
  min-height:0!important;
  overflow:auto!important;
  gap:8px!important;
}
body.admin-bots-view .bot-stat-card{
  padding:12px!important;
  border-radius:14px!important;
}
body.admin-bots-view .bot-stat-value{
  font-size:17px!important;
  margin-top:4px!important;
}
body.admin-bots-view .bot-files-card{
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
}
body.admin-bots-view .bot-files-actions{
  gap:6px!important;
}
body.admin-bots-view .bot-files-actions .btn{
  min-height:34px!important;
  padding:7px 10px!important;
  border-radius:11px!important;
}
body.admin-bots-view .bot-files-breadcrumbs{
  flex:0 0 auto!important;
  margin-bottom:8px!important;
  padding:8px 10px!important;
  border-radius:12px!important;
}
body.admin-bots-view .bot-files-table{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  border-radius:14px!important;
}
body.admin-bots-view .bot-files-row{
  padding:10px 12px!important;
}
body.admin-bots-view .bot-files-bulk-bar{
  flex:0 0 auto!important;
  bottom:auto!important;
  margin:8px auto 0!important;
}
body.admin-bots-view .bot-settings-grid{
  height:100%!important;
  min-height:0!important;
  overflow:auto!important;
  grid-template-columns:minmax(0,1fr) 290px!important;
  gap:12px!important;
}
body.admin-bots-view .bot-create-page{
  height:100%!important;
  min-height:0!important;
  overflow:auto!important;
  padding:16px!important;
}
body.admin-bots-view .bot-create-page-head,
body.admin-bots-view .bot-create-card-compact{
  max-width:820px!important;
}
body.admin-bots-view .bot-create-card-compact{
  padding:14px!important;
}
body.admin-bots-view .bot-create-grid-compact{
  gap:10px!important;
}
body.admin-bots-view .field{
  margin-bottom:10px!important;
}

@media (max-width:1100px){
  body.admin-bots-view{
    overflow:auto!important;
  }
  body.admin-bots-view .admin-wrap{
    height:auto!important;
    max-height:none!important;
    min-height:100dvh!important;
    overflow:auto!important;
  }
  body.admin-bots-view #adminContent.admin-tabs-shell,
  body.admin-bots-view #adminTabBots.active,
  body.admin-bots-view #botsList{
    overflow:visible!important;
  }
  body.admin-bots-view .bot-admin-workspace{
    height:auto!important;
    grid-template-columns:1fr!important;
  }
  body.admin-bots-view .bot-host-sidebar{
    max-height:260px!important;
  }
  body.admin-bots-view .bot-host-content{
    overflow:visible!important;
  }
  body.admin-bots-view .bot-dashboard-grid,
  body.admin-bots-view .bot-settings-grid{
    height:auto!important;
    grid-template-columns:1fr!important;
  }
  body.admin-bots-view .bot-console-output{
    min-height:360px!important;
  }
}

/* Correctif MaevaBots : liste bots propre, boutons sécurisés et survol fichiers */
.bot-sidebar-help{
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  background:rgba(255,255,255,.045);
  padding:12px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  line-height:1.45;
}
.bot-sidebar-help b{
  display:block;
  color:var(--text);
  font-size:13px;
  margin-bottom:4px;
}
.bot-sidebar-help span{
  display:block;
}
.bot-list-page{
  height:100%;
  min-height:0;
  overflow:auto;
  padding:18px;
  scrollbar-gutter:stable;
}
.bot-list-page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}
.bot-directory-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:14px;
}
.bot-directory-card{
  border:1px solid rgba(167,139,250,.20);
  border-radius:20px;
  background:linear-gradient(180deg,rgba(30,41,59,.74),rgba(15,23,42,.92));
  padding:14px;
  cursor:pointer;
  transition:background .16s ease,border-color .16s ease,transform .16s ease,box-shadow .16s ease;
  min-width:0;
}
.bot-directory-card:hover{
  border-color:rgba(167,139,250,.58);
  background:linear-gradient(180deg,rgba(76,29,149,.45),rgba(15,23,42,.96));
  transform:translateY(-2px);
  box-shadow:0 16px 34px rgba(0,0,0,.22);
}
.bot-directory-card-top{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.bot-directory-meta{
  min-width:0;
  flex:1;
}
.bot-directory-name{
  font-size:18px;
  font-weight:950;
  color:var(--text);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.bot-directory-id{
  margin-top:2px;
  color:#9fb7d6;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.bot-directory-status{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  padding:6px 9px;
  font-size:12px;
  font-weight:950;
  background:rgba(255,255,255,.06);
}
.bot-directory-status i{
  width:9px;
  height:9px;
  border-radius:999px;
  display:inline-block;
  background:#ef4444;
  box-shadow:0 0 0 3px rgba(239,68,68,.13);
}
.bot-directory-status.online i{
  background:#22c55e;
  box-shadow:0 0 0 3px rgba(34,197,94,.16);
}
.bot-directory-status.online{
  color:#bbf7d0;
}
.bot-directory-status.offline{
  color:#fecaca;
}
.bot-directory-path{
  margin:12px 0;
  border:1px solid rgba(255,255,255,.10);
  border-radius:13px;
  background:rgba(2,6,23,.42);
  padding:9px 10px;
  color:#c4b5fd;
  font-size:13px;
  font-weight:950;
  word-break:break-word;
}
.bot-directory-details{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:12px;
}
.bot-directory-details span{
  border:1px solid rgba(255,255,255,.09);
  border-radius:999px;
  background:rgba(255,255,255,.05);
  padding:5px 8px;
  color:#bcd2f0;
  font-size:12px;
  font-weight:850;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.bot-directory-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.bot-directory-actions .btn{
  flex:1 1 auto;
  justify-content:center;
}
.bot-admin-nav-btn{
  white-space:nowrap;
}
.bot-admin-nav-btn span{
  overflow:hidden;
  text-overflow:ellipsis;
}
.btn:disabled,
.btn.disabled{
  opacity:.48!important;
  cursor:not-allowed!important;
  filter:saturate(.7)!important;
  transform:none!important;
  box-shadow:none!important;
}
.btn:disabled:hover,
.btn.disabled:hover{
  transform:none!important;
  box-shadow:none!important;
}
.bot-files-row:not(.bot-files-head){
  transition:background .14s ease,border-color .14s ease,transform .14s ease;
}
.bot-files-row:not(.bot-files-head):hover{
  background:rgba(139,92,246,.14)!important;
  border-color:rgba(167,139,250,.24)!important;
}
.bot-files-row:not(.bot-files-head):hover .bot-file-open{
  color:#fff!important;
}
.bot-files-row:not(.bot-files-head):hover svg{
  color:#c4b5fd!important;
}
body.admin-bots-view .bot-list-page{
  height:100%!important;
  min-height:0!important;
  overflow:auto!important;
  padding:14px!important;
}
body.admin-bots-view .bot-list-page-head{
  margin-bottom:12px!important;
}
body.admin-bots-view .bot-directory-grid{
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr))!important;
  gap:12px!important;
}
body.admin-bots-view .bot-directory-card{
  padding:12px!important;
  border-radius:16px!important;
}
@media (max-width:700px){
  .bot-list-page-head{
    flex-direction:column;
  }
  .bot-directory-grid{
    grid-template-columns:1fr;
  }
  .bot-directory-actions .btn{
    width:100%;
  }
}

/* Correctif MaevaBots : empêche le panel fichiers de sauter pendant les rafraîchissements silencieux */
body.admin-bots-view #adminTabBots,
body.admin-bots-view #botsList,
body.admin-bots-view .bot-admin-workspace,
body.admin-bots-view .bot-host-main,
body.admin-bots-view .bot-host-content,
body.admin-bots-view .bot-files-card,
body.admin-bots-view .bot-files-table,
body.admin-bots-view #botFilesRows{
  overflow-anchor:none!important;
  overscroll-behavior:contain!important;
}
body.admin-bots-view .bot-files-card{
  contain:layout paint;
}
body.admin-bots-view .bot-files-table{
  scroll-behavior:auto!important;
}
body.admin-bots-view .bot-host-tab,
body.admin-bots-view .bot-directory-card,
body.admin-bots-view .bot-directory-actions .btn,
body.admin-bots-view .bot-file-open,
body.admin-bots-view .bot-file-menu-btn{
  scroll-margin-top:0!important;
  scroll-margin-bottom:0!important;
}

/* Hébergement bots côté membre */
.settings-group-title{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border:1px solid var(--line);border-radius:16px;background:rgba(124,58,237,.10)}
.settings-mini-title{font-weight:950;color:var(--text);font-size:16px}
.bot-hosting-page{width:100%;height:100%;min-height:0}
.bot-user-loading{border:1px solid var(--line);border-radius:22px;background:rgba(255,255,255,.04);padding:24px;font-weight:900;color:var(--muted)}
.bot-locked-card{min-height:520px;border:1px solid var(--line);border-radius:26px;background:linear-gradient(145deg,rgba(45,28,88,.78),rgba(10,15,28,.92));display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:34px;box-shadow:0 24px 70px rgba(0,0,0,.28)}
.bot-locked-icon{width:86px;height:86px;border-radius:28px;display:grid;place-items:center;background:linear-gradient(135deg,#7c3aed,#a855f7);color:white;box-shadow:0 20px 50px rgba(124,58,237,.35);margin-bottom:18px}
.bot-locked-icon svg{width:48px;height:48px}
.bot-locked-title{font-size:30px;font-weight:950;color:var(--text);margin-bottom:8px}
.bot-locked-text{color:var(--muted);font-weight:800;max-width:560px;line-height:1.6;margin-bottom:20px}
.bot-discord-join{display:inline-flex;align-items:center;gap:10px;text-decoration:none}.bot-discord-join svg{width:22px;height:22px}
.bot-user-shell{height:calc(100vh - 130px);min-height:560px;display:grid;grid-template-columns:255px minmax(0,1fr);gap:14px;overflow:hidden}
.bot-user-sidebar{height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column}
.bot-user-main{min-height:0;overflow:hidden}.bot-user-main .bot-host-content{min-height:0;overflow:hidden}.bot-user-main .bot-dashboard-grid{height:100%}
.bot-user-main .bot-console-output{height:calc(100vh - 365px);min-height:260px;max-height:none;overflow:auto}
.bot-user-main .bot-files-card{height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column}.bot-user-main .bot-files-table{min-height:0;overflow:hidden;display:flex;flex-direction:column}.bot-user-main #userBotFilesRows{min-height:0;overflow:auto}
.bot-user-limits{margin-top:auto;border:1px solid rgba(255,255,255,.10);border-radius:18px;background:rgba(255,255,255,.045);padding:12px;display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:12px;font-weight:850}.bot-user-limits b{color:var(--text);font-size:13px}.bot-user-cards{display:grid;gap:10px;margin:14px 0}.bot-user-card{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.045);padding:12px;transition:.18s ease}.bot-user-card:hover{background:rgba(124,58,237,.14);border-color:rgba(190,166,255,.35);transform:translateY(-1px)}.bot-user-card-main{min-width:0;flex:1;display:flex;flex-direction:column;gap:4px}.bot-user-card-main b{color:var(--text);font-size:16px}.bot-user-card-main span{color:var(--muted);font-size:12px;font-weight:800}.bot-create-page.is-disabled{opacity:.74}.bot-files-row{transition:background .16s ease,border-color .16s ease,transform .16s ease}.bot-files-row:hover{background:rgba(124,58,237,.13);border-color:rgba(190,166,255,.25)}.bot-files-row:not(.bot-files-head):hover{transform:translateX(2px)}
@media(max-width:980px){.bot-user-shell{grid-template-columns:1fr;height:auto;overflow:visible}.bot-user-sidebar{height:auto}.bot-user-main{overflow:visible}.bot-user-main .bot-console-output{height:360px}.bot-user-card{flex-wrap:wrap}}

/* Correctif MaevaBots : index.html aligné sur le panel admin + menu fichiers au-dessus du survol */
.bot-user-shell-identical{
  height:calc(100vh - 128px)!important;
  min-height:560px!important;
  display:grid!important;
  grid-template-columns:260px minmax(0,1fr)!important;
  gap:16px!important;
  overflow:hidden!important;
  margin-top:18px!important;
}
.bot-user-shell-identical .bot-user-sidebar{
  height:100%!important;
  overflow:hidden!important;
}
.bot-user-shell-identical .bot-user-main{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
.bot-user-shell-identical .bot-list-page,
.bot-user-shell-identical .bot-create-page{
  height:100%!important;
  min-height:0!important;
  overflow:auto!important;
  padding:18px!important;
  scrollbar-gutter:stable!important;
}
.bot-user-shell-identical .bot-host-content{
  min-height:0!important;
  height:calc(100% - 134px)!important;
  overflow:hidden!important;
}
.bot-user-shell-identical .bot-dashboard-grid{
  height:100%!important;
  min-height:0!important;
}
.bot-user-shell-identical .bot-console-card,
.bot-user-shell-identical .bot-files-card{
  min-height:0!important;
}
.bot-user-shell-identical .bot-console-output{
  height:calc(100% - 44px)!important;
  min-height:260px!important;
  max-height:none!important;
}
.bot-files-row.menu-open{
  z-index:1000!important;
  background:rgba(139,92,246,.18)!important;
  transform:none!important;
}
.bot-files-row.menu-open .bot-file-menu-cell{
  z-index:1001!important;
}
.bot-files-row.menu-open .bot-file-menu{
  z-index:1002!important;
  pointer-events:auto!important;
}
.bot-files-row:not(.bot-files-head):hover{
  transform:none!important;
}
.bot-files-row.menu-open:hover,
.bot-files-row.menu-open:hover .bot-file-open{
  color:var(--text)!important;
}
.bot-files-row.menu-open ~ .bot-files-row{
  z-index:1;
}
.bot-file-menu:hover,
.bot-file-menu button:hover,
.bot-file-menu a:hover{
  z-index:1003!important;
}
@media(max-width:980px){
  .bot-user-shell-identical{
    grid-template-columns:1fr!important;
    height:auto!important;
    overflow:visible!important;
  }
  .bot-user-shell-identical .bot-user-main,
  .bot-user-shell-identical .bot-host-content,
  .bot-user-shell-identical .bot-list-page,
  .bot-user-shell-identical .bot-create-page{
    height:auto!important;
    overflow:visible!important;
  }
}

/* Correctif MaevaBots : paramètres compacts admin + index, bouton Ajouter visible, sans grand scroll */
.bot-settings-compact{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 278px!important;
  gap:12px!important;
  align-items:start!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
}
.bot-settings-compact .bot-settings-form-card,
.bot-settings-compact .bot-settings-actions-card{
  min-height:0!important;
}
.bot-settings-compact .bot-settings-form-card{
  max-width:880px!important;
}
.bot-settings-compact .bot-panel-head.compact{
  margin-bottom:10px!important;
}
.bot-settings-mini-grid{
  display:grid!important;
  grid-template-columns:minmax(210px,320px) minmax(180px,230px) minmax(190px,260px)!important;
  gap:10px!important;
  align-items:end!important;
  max-width:840px!important;
}
.bot-settings-mini-grid .field{
  margin:0!important;
  min-width:0!important;
}
.bot-settings-mini-grid .input,
.bot-settings-mini-grid .select{
  width:100%!important;
  min-height:40px!important;
  height:40px!important;
  padding:8px 12px!important;
  border-radius:12px!important;
}
.bot-settings-save-row{
  max-width:840px!important;
  display:flex!important;
  justify-content:flex-end!important;
  margin-top:12px!important;
}
.bot-settings-save-row .btn{
  min-width:150px!important;
}
.bot-settings-actions-card .bot-settings-actions{
  display:grid!important;
  gap:10px!important;
}
.bot-settings-actions-card .btn{
  width:100%!important;
  justify-content:center!important;
}
.bot-admin-nav-btn[disabled],
.bot-admin-nav-btn.disabled{
  display:flex!important;
  opacity:.52!important;
  cursor:not-allowed!important;
}
.bot-admin-nav-btn[disabled]:hover,
.bot-admin-nav-btn.disabled:hover{
  transform:none!important;
}
body.user-bots-view .topbar{
  display:none!important;
}
body.user-bots-view .content{
  padding:14px 22px!important;
  overflow:hidden!important;
}
body.user-bots-view .bot-hosting-page{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
body.user-bots-view .bot-user-shell-identical{
  height:100%!important;
  min-height:0!important;
  margin-top:0!important;
}
body.user-bots-view .bot-host-main,
body.user-bots-view .bot-user-main{
  height:100%!important;
  min-height:0!important;
}
body.user-bots-view .bot-host-content{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:0!important;
  overflow:hidden!important;
}
body.user-bots-view .bot-settings-compact{
  height:100%!important;
  align-content:start!important;
  overflow:hidden!important;
}
body.user-bots-view .bot-list-page,
body.user-bots-view .bot-create-page{
  overflow:auto!important;
}
body.user-bots-view .bot-user-shell-identical .bot-host-content{
  height:auto!important;
}
body.user-bots-view .bot-files-card,
body.user-bots-view .bot-dashboard-grid{
  height:100%!important;
  min-height:0!important;
}
@media (min-width:1200px){
  body.user-bots-view .bot-user-shell-identical{
    grid-template-columns:240px minmax(0,1fr)!important;
    gap:12px!important;
  }
  body.user-bots-view .bot-host-sidebar{
    padding:14px!important;
  }
  body.user-bots-view .bot-host-header{
    padding:14px 18px!important;
  }
  body.user-bots-view .bot-host-tabs{
    padding:10px 16px!important;
  }
  body.user-bots-view .bot-host-content{
    padding:12px!important;
  }
}
@media (max-width:1100px){
  .bot-settings-compact{
    grid-template-columns:1fr!important;
    overflow:auto!important;
  }
  .bot-settings-mini-grid{
    grid-template-columns:1fr!important;
    max-width:none!important;
  }
  .bot-settings-save-row{
    max-width:none!important;
  }
  body.user-bots-view .content{
    overflow:auto!important;
  }
  body.user-bots-view .bot-user-shell-identical,
  body.user-bots-view .bot-hosting-page,
  body.user-bots-view .bot-host-main,
  body.user-bots-view .bot-user-main,
  body.user-bots-view .bot-host-content{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }
}


/* Correctif final MaevaBots : bouton Ajouter visible, icônes contenues, paramètres compacts et plein écran propre */
.bot-admin-nav-btn > svg,
.bot-admin-nav-btn > .icon-svg,
.bot-admin-nav-btn > .icon-svg svg{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  flex:0 0 18px!important;
  display:block!important;
}
.bot-host-brand-icon svg,
.bot-side-icon svg,
.bot-directory-card svg{
  max-width:100%!important;
  max-height:100%!important;
}
.bot-host-brand-icon svg{width:28px!important;height:28px!important}
.bot-side-icon svg{width:22px!important;height:22px!important}
.bot-admin-nav-btn{
  min-height:42px!important;
  height:auto!important;
  overflow:hidden!important;
}
.bot-admin-nav-btn span{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  line-height:1.15!important;
}
.bot-admin-nav-btn[disabled],
.bot-admin-nav-btn.disabled{
  display:flex!important;
  opacity:.58!important;
  pointer-events:auto!important;
}
.bot-admin-nav-btn[disabled]::after{
  content:"Complet";
  margin-left:auto;
  font-size:11px;
  color:#c9b8ff;
  background:rgba(255,255,255,.10);
  border-radius:999px;
  padding:3px 7px;
}
.bot-admin-nav-btn[disabled] b{display:none!important}

/* Paramètres bot : même présentation compacte admin + index */
.bot-settings-grid.bot-settings-compact,
body.admin-bots-view .bot-settings-grid.bot-settings-compact,
body.user-bots-view .bot-settings-grid.bot-settings-compact{
  display:grid!important;
  grid-template-columns:minmax(520px,760px) 268px!important;
  gap:12px!important;
  align-items:start!important;
  align-content:start!important;
  justify-content:start!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
}
.bot-settings-compact .bot-settings-card,
body.admin-bots-view .bot-settings-compact .bot-settings-card,
body.user-bots-view .bot-settings-compact .bot-settings-card{
  padding:14px!important;
  min-height:0!important;
}
.bot-settings-compact .bot-settings-form-card,
body.admin-bots-view .bot-settings-compact .bot-settings-form-card,
body.user-bots-view .bot-settings-compact .bot-settings-form-card{
  max-width:760px!important;
  width:100%!important;
}
.bot-settings-mini-grid,
body.admin-bots-view .bot-settings-mini-grid,
body.user-bots-view .bot-settings-mini-grid{
  display:grid!important;
  grid-template-columns:260px 200px 240px!important;
  gap:10px!important;
  max-width:720px!important;
  align-items:end!important;
}
.bot-settings-mini-grid .field,
body.admin-bots-view .bot-settings-mini-grid .field,
body.user-bots-view .bot-settings-mini-grid .field{
  margin:0!important;
  min-width:0!important;
  width:100%!important;
  grid-column:auto!important;
}
.bot-settings-mini-grid .input,
.bot-settings-mini-grid .select,
body.admin-bots-view .bot-settings-mini-grid .input,
body.admin-bots-view .bot-settings-mini-grid .select,
body.user-bots-view .bot-settings-mini-grid .input,
body.user-bots-view .bot-settings-mini-grid .select{
  height:39px!important;
  min-height:39px!important;
  padding:8px 12px!important;
  border-radius:12px!important;
  width:100%!important;
}
.bot-settings-save-row,
body.admin-bots-view .bot-settings-save-row,
body.user-bots-view .bot-settings-save-row{
  display:flex!important;
  justify-content:flex-end!important;
  max-width:720px!important;
  margin-top:12px!important;
}
.bot-settings-save-row .btn,
body.admin-bots-view .bot-settings-save-row .btn,
body.user-bots-view .bot-settings-save-row .btn{
  width:auto!important;
  min-width:150px!important;
}
.bot-settings-actions-card,
body.admin-bots-view .bot-settings-actions-card,
body.user-bots-view .bot-settings-actions-card{
  width:268px!important;
}
.bot-settings-actions-card .bot-settings-actions,
body.admin-bots-view .bot-settings-actions-card .bot-settings-actions,
body.user-bots-view .bot-settings-actions-card .bot-settings-actions{
  display:grid!important;
  gap:10px!important;
  margin-top:10px!important;
}
.bot-settings-actions-card .btn,
body.admin-bots-view .bot-settings-actions-card .btn,
body.user-bots-view .bot-settings-actions-card .btn{
  width:100%!important;
  justify-content:center!important;
}

/* Index Bots Discord : utilise toute la hauteur disponible sans grand scroll inutile */
body.user-bots-view .topbar{
  display:none!important;
}
body.user-bots-view .main{
  min-height:0!important;
  overflow:hidden!important;
}
body.user-bots-view .content{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:14px 22px!important;
}
body.user-bots-view .bot-hosting-page{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
body.user-bots-view .bot-user-shell-identical{
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  margin-top:0!important;
  display:grid!important;
  grid-template-columns:240px minmax(0,1fr)!important;
  gap:12px!important;
  overflow:hidden!important;
}
body.user-bots-view .bot-host-sidebar,
body.user-bots-view .bot-user-sidebar{
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
body.user-bots-view .bot-host-main,
body.user-bots-view .bot-user-main{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
body.user-bots-view .bot-host-header{
  padding:12px 18px!important;
  flex:0 0 auto!important;
}
body.user-bots-view .bot-host-tabs{
  padding:10px 16px!important;
  flex:0 0 auto!important;
}
body.user-bots-view .bot-host-content{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:12px!important;
}
body.user-bots-view .bot-create-page,
body.user-bots-view .bot-list-page{
  height:100%!important;
  min-height:0!important;
  overflow:auto!important;
  padding:18px!important;
}
body.user-bots-view .bot-create-page{
  display:flex!important;
  flex-direction:column!important;
}
body.user-bots-view .bot-create-card-compact{
  max-width:880px!important;
}
body.user-bots-view .bot-files-card,
body.user-bots-view .bot-dashboard-grid{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
body.user-bots-view .bot-console-output{
  height:calc(100% - 48px)!important;
  min-height:0!important;
  max-height:none!important;
}
body.user-bots-view .bot-files-table,
body.user-bots-view #userBotFilesRows{
  min-height:0!important;
}
body.user-bots-view #userBotFilesRows{
  overflow:auto!important;
}
@media (max-width:1100px){
  .bot-settings-grid.bot-settings-compact,
  body.admin-bots-view .bot-settings-grid.bot-settings-compact,
  body.user-bots-view .bot-settings-grid.bot-settings-compact{
    grid-template-columns:1fr!important;
    overflow:auto!important;
  }
  .bot-settings-mini-grid,
  body.admin-bots-view .bot-settings-mini-grid,
  body.user-bots-view .bot-settings-mini-grid{
    grid-template-columns:1fr!important;
    max-width:none!important;
  }
  .bot-settings-save-row,
  body.admin-bots-view .bot-settings-save-row,
  body.user-bots-view .bot-settings-save-row{
    max-width:none!important;
  }
  .bot-settings-actions-card,
  body.admin-bots-view .bot-settings-actions-card,
  body.user-bots-view .bot-settings-actions-card{
    width:100%!important;
  }
  body.user-bots-view .content{
    overflow:auto!important;
  }
  body.user-bots-view .bot-user-shell-identical{
    grid-template-columns:1fr!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }
  body.user-bots-view .bot-host-sidebar,
  body.user-bots-view .bot-user-sidebar,
  body.user-bots-view .bot-host-main,
  body.user-bots-view .bot-user-main,
  body.user-bots-view .bot-host-content{
    height:auto!important;
    overflow:visible!important;
  }
}


/* Correctif MaevaBots : chemin, console stable, paramètres compacts et accès bots déplacé */
.bot-files-breadcrumbs .bot-crumb,
.bot-files-breadcrumbs .bot-crumb-sep{
  white-space:nowrap;
}
.bot-console-output{
  white-space:pre-wrap!important;
  overflow-anchor:none!important;
  contain:content!important;
}
body.user-bots-view .bot-console-output,
body.admin-bots-view .bot-console-output{
  line-height:1.45!important;
}
body.user-bots-view .bot-host-main,
body.user-bots-view .bot-user-main,
body.admin-bots-view .bot-host-main{
  min-height:0!important;
}
body.user-bots-view .bot-host-content,
body.admin-bots-view .bot-host-content{
  min-height:0!important;
}
body.user-bots-view .bot-files-card,
body.admin-bots-view .bot-files-card{
  display:flex!important;
  flex-direction:column!important;
}
body.user-bots-view .bot-files-table,
body.admin-bots-view .bot-files-table{
  flex:1 1 auto!important;
  min-height:0!important;
}
body.user-bots-view #userBotFilesRows,
body.admin-bots-view #botFilesRows{
  min-height:0!important;
}
body.user-bots-view .bot-settings-grid.bot-settings-compact,
body.admin-bots-view .bot-settings-grid.bot-settings-compact{
  grid-template-columns:minmax(520px,820px) 270px!important;
  justify-content:start!important;
  align-items:start!important;
  height:auto!important;
  overflow:visible!important;
}
body.user-bots-view .bot-settings-compact .bot-settings-form-card,
body.admin-bots-view .bot-settings-compact .bot-settings-form-card{
  max-width:820px!important;
}
body.user-bots-view .bot-settings-mini-grid,
body.admin-bots-view .bot-settings-mini-grid{
  grid-template-columns:minmax(220px,300px) minmax(170px,220px) minmax(210px,260px)!important;
  max-width:800px!important;
}
body.user-bots-view .bot-settings-save-row,
body.admin-bots-view .bot-settings-save-row{
  max-width:800px!important;
}
body.user-bots-view .bot-admin-nav-btn,
body.admin-bots-view .bot-admin-nav-btn{
  display:grid!important;
  grid-template-columns:22px minmax(0,1fr) auto!important;
  align-items:center!important;
}
body.user-bots-view .bot-admin-nav-btn span,
body.admin-bots-view .bot-admin-nav-btn span{
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.bot-access-settings-card{
  margin-top:14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.045);
  padding:14px;
  max-width:1100px;
}
.bot-access-settings-grid{
  display:grid;
  grid-template-columns:minmax(180px,260px) minmax(170px,230px) minmax(240px,1fr) 150px 150px 150px;
  gap:10px;
  align-items:end;
  margin-top:10px;
}
.bot-access-settings-grid .field{margin:0!important;min-width:0!important}
.bot-access-settings-grid .input,
.bot-access-settings-grid .select{height:38px!important;min-height:38px!important;padding:8px 11px!important;border-radius:12px!important}
.bot-access-check{grid-column:1 / -1;margin:0!important;padding:10px!important;border-radius:12px!important;background:rgba(255,255,255,.035)}
.bot-access-settings-actions{display:flex;justify-content:flex-end;margin-top:10px}
@media(max-width:1250px){
  .bot-access-settings-grid{grid-template-columns:1fr 1fr!important}
  body.user-bots-view .bot-settings-grid.bot-settings-compact,
  body.admin-bots-view .bot-settings-grid.bot-settings-compact{grid-template-columns:1fr!important}
  body.user-bots-view .bot-settings-mini-grid,
  body.admin-bots-view .bot-settings-mini-grid{grid-template-columns:1fr!important;max-width:none!important}
  body.user-bots-view .bot-settings-actions-card,
  body.admin-bots-view .bot-settings-actions-card{width:100%!important}
}


/* Éditeur de fichiers Bots Discord façon panel hébergement */
.bot-editor-page {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: clamp(520px, calc(100vh - 270px), 760px);
  border: 1px solid rgba(184, 147, 255, .18);
  border-radius: 18px;
  background: rgba(9, 16, 31, .72);
  overflow: hidden;
}
.bot-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(17, 26, 44, .88);
}
.bot-editor-file-name {
  color: var(--text);
  font-weight: 950;
  font-size: 17px;
  line-height: 1.15;
}
.bot-editor-file-path {
  margin-top: 5px;
  color: #b8d3ff;
  font-weight: 800;
  font-size: 12px;
  word-break: break-all;
}
.bot-editor-actions-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.bot-code-editor-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #030811;
  overflow: hidden;
}
.bot-code-highlight,
.bot-code-textarea {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  padding: 14px 18px 96px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}
.bot-code-highlight {
  pointer-events: none;
  color: #eaf2ff;
  background: #030811;
}
.bot-code-textarea {
  z-index: 2;
  width: 100%;
  height: 100%;
  resize: none;
  outline: none;
  color: transparent;
  caret-color: #ffffff;
  background: transparent;
  -webkit-text-fill-color: transparent;
}
.bot-code-textarea::selection {
  background: rgba(129, 92, 255, .34);
}
.bot-code-line {
  display: block;
  min-height: 1.65em;
}
.bot-code-line-no {
  display: inline-block;
  width: 54px;
  padding-right: 16px;
  text-align: right;
  color: rgba(148, 163, 184, .48);
  user-select: none;
}
.bot-code-line-code {
  display: inline;
}
.bot-code-textarea {
  padding-left: 70px;
}
.bot-editor-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(52, 69, 84, .95);
}
.bot-editor-language {
  width: 155px;
  min-width: 155px;
  height: 44px;
}
.bot-editor-footer .btn {
  height: 44px;
  min-width: 142px;
}
.tok-keyword { color: #ff9b45; font-weight: 900; }
.tok-string { color: #d9ff5a; }
.tok-number { color: #8bd5ff; }
.tok-comment { color: #7d8da6; font-style: italic; }
.tok-punc { color: #c4b5fd; }
@media (max-width: 900px) {
  .bot-editor-page { height: calc(100vh - 230px); min-height: 480px; }
  .bot-editor-topbar { align-items: flex-start; flex-direction: column; }
  .bot-editor-footer { flex-direction: column; align-items: stretch; }
  .bot-editor-language, .bot-editor-footer .btn { width: 100%; min-width: 0; }
}


/* Correctif éditeur Bots Discord : dernières lignes visibles et chemin cliquable */
.bot-editor-file-breadcrumbs{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px;
  margin-top:6px;
  color:#b8d3ff;
}
.bot-editor-file-breadcrumbs .bot-crumb{
  cursor:pointer;
  font-size:12px;
  line-height:1.35;
  border-radius:8px;
}
.bot-editor-file-breadcrumbs .bot-crumb:hover{
  background:rgba(139,92,246,.18);
  text-decoration:none;
}
.bot-editor-file-breadcrumbs .bot-crumb-current{
  cursor:default;
  color:#dbeafe;
  padding:2px 4px;
}
.bot-code-highlight,
.bot-code-textarea{
  padding-bottom:96px!important;
  box-sizing:border-box!important;
  scroll-padding-bottom:96px;
}
.bot-code-editor-wrap{
  min-height:360px;
}
.bot-editor-footer{
  flex:0 0 auto;
}

/* Correctif éditeur Bots Discord : bas de fichier visible + logs console colorés */
body.user-bots-view .bot-editor-page,
body.admin-bots-view .bot-editor-page,
.bot-editor-page{
  height:clamp(560px, calc(100vh - 205px), 860px)!important;
  min-height:560px!important;
  max-height:none!important;
  overflow:hidden!important;
}
.bot-code-editor-wrap{
  flex:1 1 0!important;
  min-height:0!important;
  overflow:hidden!important;
  position:relative!important;
}
.bot-code-highlight,
.bot-code-textarea{
  padding-bottom:240px!important;
  scroll-padding-bottom:240px!important;
  min-height:100%!important;
}
.bot-code-textarea{
  overflow-y:scroll!important;
  overflow-x:auto!important;
}
.bot-code-highlight::after{
  content:"";
  display:block;
  height:150px;
}
.bot-editor-footer{
  position:relative!important;
  z-index:20!important;
  min-height:68px!important;
  flex:0 0 auto!important;
}
.bot-console-output{
  color:#eaf2ff!important;
  background:#030811!important;
}
.bot-log-line{
  display:block;
  min-height:1.45em;
  color:#eaf2ff;
}
.bot-log-line.info{color:#cfe4ff}
.bot-log-line.success{color:#dcffb4}
.bot-log-line.warning{color:#ffe7a3}
.bot-log-line.error{color:#ffc0c0}
.bot-log-date{color:#8bd5ff;font-weight:850}
.bot-log-info-word{color:#7dd3fc;font-weight:950}
.bot-log-warning-word{color:#ffd166;font-weight:950}
.bot-log-error-word{color:#ff6b7a;font-weight:950}
.bot-log-url{color:#c4b5fd;text-decoration:underline;text-underline-offset:2px}


/* Correctif final éditeur Bots Discord : scroll complet + saisie visible */
.bot-code-highlight,
.bot-code-textarea{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace!important;
  font-size:13px!important;
  line-height:1.65!important;
  padding-top:14px!important;
  padding-right:18px!important;
  padding-bottom:260px!important;
  box-sizing:border-box!important;
  white-space:pre!important;
  tab-size:2!important;
}
.bot-code-highlight{
  z-index:1!important;
  overflow:hidden!important;
  background:#030811!important;
}
.bot-code-highlight::after{
  content:none!important;
  display:none!important;
  height:0!important;
}
.bot-code-textarea{
  z-index:2!important;
  overflow:auto!important;
  color:rgba(234,242,255,.16)!important;
  -webkit-text-fill-color:rgba(234,242,255,.16)!important;
  caret-color:#fff!important;
  background:transparent!important;
  scrollbar-gutter:stable!important;
  resize:none!important;
}
.bot-code-line{
  display:block!important;
  min-height:1.65em!important;
  line-height:1.65!important;
  white-space:pre!important;
}
.bot-code-line-no{
  height:1.65em!important;
  line-height:1.65!important;
}
.bot-code-line-code{
  white-space:pre!important;
}
.bot-editor-page{
  min-height:620px!important;
}
.bot-code-editor-wrap{
  min-height:0!important;
}
.bot-editor-footer{
  flex:0 0 auto!important;
}

/* Correctif final console Bots Discord : logs colorés et stables */
.bot-console-output{
  color:#eaf2ff!important;
  background:#030811!important;
  white-space:pre-wrap!important;
}
.bot-log-line{display:block!important;min-height:1.45em!important;color:#eaf2ff!important;}
.bot-log-line.info{color:#cfe4ff!important;}
.bot-log-line.success{color:#dcffb4!important;}
.bot-log-line.warning{color:#ffe7a3!important;}
.bot-log-line.error{color:#ffc0c0!important;}
.bot-log-date{color:#8bd5ff!important;font-weight:850!important;}
.bot-log-info-word{color:#7dd3fc!important;font-weight:950!important;}
.bot-log-warning-word{color:#ffd166!important;font-weight:950!important;}
.bot-log-error-word{color:#ff6b7a!important;font-weight:950!important;}
.bot-log-url{color:#c4b5fd!important;text-decoration:underline!important;text-underline-offset:2px!important;}


/* Correctif éditeur Bots Discord : saisie sans texte gris + fin de fichier visible sans grand vide */
.bot-code-highlight,
.bot-code-textarea{
  padding-bottom:18px!important;
  scroll-padding-bottom:18px!important;
}
.bot-code-textarea{
  color:transparent!important;
  -webkit-text-fill-color:transparent!important;
  text-shadow:none!important;
  caret-color:#ffffff!important;
}
.bot-code-editor-wrap{
  padding-bottom:0!important;
}
.bot-code-highlight::after{
  content:none!important;
  display:none!important;
  height:0!important;
}
.bot-editor-page{
  min-height:560px!important;
}
.bot-code-line:last-child{
  margin-bottom:0!important;
}


/* Correctif MaevaDrive 59 : éditeur bots propre + responsive mobile sans chevauchement */
.bot-code-editor-wrap{
  min-height:0!important;
  overflow:hidden!important;
  background:#030811!important;
}
.bot-code-highlight,
.bot-code-textarea{
  inset:0!important;
  width:100%!important;
  height:100%!important;
  padding:14px 18px 18px 0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace!important;
  font-size:13px!important;
  font-weight:500!important;
  line-height:1.65!important;
  letter-spacing:0!important;
  word-spacing:0!important;
  tab-size:2!important;
  white-space:pre!important;
  box-sizing:border-box!important;
}
.bot-code-highlight{
  z-index:1!important;
  overflow:hidden!important;
  pointer-events:none!important;
  color:#eaf2ff!important;
  background:#030811!important;
  opacity:1!important;
}
.bot-code-textarea{
  z-index:2!important;
  padding-left:70px!important;
  overflow:auto!important;
  resize:none!important;
  outline:0!important;
  color:transparent!important;
  -webkit-text-fill-color:transparent!important;
  caret-color:#fff!important;
  background:transparent!important;
  text-shadow:none!important;
  scrollbar-gutter:auto!important;
}
.bot-code-editor-wrap.is-editing .bot-code-highlight,
.bot-code-editor-wrap:focus-within .bot-code-highlight{
  opacity:0!important;
}
.bot-code-editor-wrap.is-editing .bot-code-textarea,
.bot-code-editor-wrap:focus-within .bot-code-textarea{
  color:#eaf2ff!important;
  -webkit-text-fill-color:#eaf2ff!important;
  background:#030811!important;
  text-shadow:none!important;
}
.bot-code-line{
  display:block!important;
  min-height:1.65em!important;
  line-height:1.65!important;
  white-space:pre!important;
  font-weight:500!important;
  letter-spacing:0!important;
  word-spacing:0!important;
}
.bot-code-line-no{
  display:inline-block!important;
  width:54px!important;
  padding-right:16px!important;
  text-align:right!important;
  color:rgba(148,163,184,.50)!important;
  line-height:1.65!important;
  user-select:none!important;
}
.bot-code-line-code{
  display:inline!important;
  white-space:pre!important;
}
.bot-code-highlight::after{
  content:none!important;
  display:none!important;
}
.bot-editor-page{
  display:flex!important;
  flex-direction:column!important;
  min-height:520px!important;
  height:clamp(520px,calc(100vh - 235px),780px)!important;
  overflow:hidden!important;
}
.bot-editor-topbar,
.bot-editor-footer{
  flex:0 0 auto!important;
}
.bot-editor-footer{
  min-height:62px!important;
  padding:10px 14px!important;
}
.bot-editor-language{
  height:42px!important;
  min-height:42px!important;
}
.bot-editor-footer .btn{
  height:42px!important;
  min-height:42px!important;
}

@media (max-width:980px){
  html,body{
    overflow:auto!important;
    overflow-x:hidden!important;
  }
  .app-shell{
    width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
  }
  .main,
  .content,
  .drop-zone{
    width:100%!important;
    min-width:0!important;
  }
  body.user-bots-view .content{
    height:auto!important;
    min-height:100vh!important;
    overflow:visible!important;
    padding:10px!important;
  }
  body.user-bots-view .drop-zone{
    min-height:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
  }
  body.user-bots-view .bot-hosting-page,
  body.user-bots-view .bot-user-shell-identical,
  body.user-bots-view .bot-host-main,
  body.user-bots-view .bot-user-main,
  body.user-bots-view .bot-host-content{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body.user-bots-view .bot-user-shell-identical{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
    margin:0!important;
  }
  body.user-bots-view .bot-host-sidebar,
  body.user-bots-view .bot-user-sidebar{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    padding:12px!important;
  }
  body.user-bots-view .bot-host-brand{
    padding:6px 6px 12px!important;
    margin-bottom:10px!important;
  }
  body.user-bots-view .bot-host-brand-title{
    font-size:20px!important;
  }
  body.user-bots-view .bot-admin-nav-btn{
    min-height:42px!important;
    padding:9px 12px!important;
  }
  body.user-bots-view .bot-host-help-card{
    margin-top:10px!important;
  }
  body.user-bots-view .bot-host-main{
    border-radius:18px!important;
  }
  body.user-bots-view .bot-host-header,
  body.admin-bots-view .bot-host-header{
    display:grid!important;
    grid-template-columns:1fr!important;
    align-items:start!important;
    gap:12px!important;
    padding:14px!important;
  }
  body.user-bots-view .bot-host-title,
  body.admin-bots-view .bot-host-title{
    font-size:25px!important;
    word-break:break-word!important;
  }
  body.user-bots-view .bot-host-header-actions,
  body.admin-bots-view .bot-host-header-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    justify-content:stretch!important;
  }
  body.user-bots-view .bot-host-header-actions .btn,
  body.admin-bots-view .bot-host-header-actions .btn{
    width:100%!important;
    min-width:0!important;
    padding:9px 8px!important;
    font-size:13px!important;
  }
  body.user-bots-view .bot-host-tabs,
  body.admin-bots-view .bot-host-tabs{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    padding:10px!important;
    overflow:visible!important;
  }
  body.user-bots-view .bot-host-tab,
  body.admin-bots-view .bot-host-tab{
    width:100%!important;
    min-width:0!important;
    justify-content:center!important;
    padding:9px 5px!important;
    font-size:13px!important;
    gap:5px!important;
  }
  body.user-bots-view .bot-host-content,
  body.admin-bots-view .bot-host-content{
    padding:10px!important;
  }
  .bot-dashboard-grid{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  .bot-stats-column{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .bot-stat-card{
    padding:10px!important;
    min-height:0!important;
  }
  body.user-bots-view .bot-console-output,
  body.admin-bots-view .bot-console-output{
    height:420px!important;
    min-height:320px!important;
    max-height:60vh!important;
    overflow:auto!important;
    font-size:11px!important;
    line-height:1.45!important;
  }
  .bot-files-card,
  .bot-files-table{
    overflow:visible!important;
  }
  #userBotFilesRows,
  #botFilesRows{
    max-height:58vh!important;
    overflow:auto!important;
  }
  .bot-files-row{
    grid-template-columns:34px minmax(180px,1fr) 90px 120px 42px!important;
    min-width:520px!important;
  }
  .bot-files-table{
    overflow-x:auto!important;
  }
  .bot-editor-page{
    height:calc(100vh - 135px)!important;
    min-height:520px!important;
    max-height:none!important;
  }
  .bot-editor-topbar{
    padding:10px 12px!important;
  }
  .bot-editor-file-name{
    font-size:16px!important;
  }
  .bot-code-highlight,
  .bot-code-textarea{
    font-size:12px!important;
    line-height:1.62!important;
    padding-top:10px!important;
    padding-right:10px!important;
    padding-bottom:12px!important;
  }
  .bot-code-line-no{
    width:42px!important;
    padding-right:10px!important;
  }
  .bot-code-textarea{
    padding-left:52px!important;
  }
  .bot-editor-footer{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:8px!important;
    padding:9px!important;
    min-height:58px!important;
  }
  .bot-editor-language,
  .bot-editor-footer .btn{
    width:100%!important;
    min-width:0!important;
  }
}

@media (max-width:520px){
  .sidebar{
    width:min(300px,88vw)!important;
  }
  body.user-bots-view .content{
    padding:8px!important;
  }
  body.user-bots-view .bot-host-sidebar,
  body.user-bots-view .bot-user-sidebar{
    border-radius:18px!important;
  }
  body.user-bots-view .bot-host-header-actions,
  body.admin-bots-view .bot-host-header-actions{
    grid-template-columns:1fr!important;
  }
  body.user-bots-view .bot-host-tabs,
  body.admin-bots-view .bot-host-tabs{
    grid-template-columns:1fr!important;
  }
  .bot-stats-column{
    grid-template-columns:1fr!important;
  }
  .bot-files-head,
  .bot-files-row{
    font-size:12px!important;
  }
  .bot-editor-page{
    height:calc(100vh - 110px)!important;
    min-height:480px!important;
  }
  .bot-editor-footer{
    grid-template-columns:1fr!important;
  }
}


/* Correctif final : ordre du menu gauche + anti-chevauchements responsive */
.nav-card{display:flex!important;flex-direction:column!important;gap:6px!important}
.nav-card .nav-btn{min-width:0!important;overflow:hidden!important}
.nav-card .nav-btn span:not(.ico){min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}

.bot-host-shell,.bot-user-shell-identical,.bot-admin-workspace{min-width:0!important}
.bot-host-main,.bot-user-main,.bot-host-content,.bot-settings-card,.bot-settings-form-card,.bot-settings-actions-card{min-width:0!important}
.bot-host-header{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;flex-wrap:wrap!important;min-width:0!important}
.bot-host-header>div:first-child{min-width:0!important;max-width:100%!important}
.bot-host-header-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important;justify-content:flex-end!important;max-width:100%!important;min-width:0!important}
.bot-host-header-actions .btn{flex:0 1 auto!important;min-width:0!important;max-width:100%!important}
.bot-host-tabs{display:flex!important;flex-wrap:wrap!important;gap:10px!important;min-width:0!important}
.bot-host-tab{min-width:0!important;max-width:100%!important}
.bot-host-tab span{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.bot-settings-grid.bot-settings-compact{min-width:0!important;width:100%!important;max-width:100%!important}
.bot-settings-mini-grid{min-width:0!important;width:100%!important;max-width:100%!important}
.bot-settings-mini-grid .field{min-width:0!important}
.bot-settings-actions-card{max-width:100%!important}
.bot-settings-actions-card .btn{min-width:0!important;max-width:100%!important;white-space:normal!important;text-align:center!important}
.bot-files-card,.bot-dashboard-grid,.bot-editor-page{min-width:0!important;max-width:100%!important}
.bot-files-table{overflow:auto!important}
.bot-files-row,.bot-files-head{min-width:720px!important}
.bot-console-output{max-width:100%!important;overflow:auto!important}

@media (max-width:1500px){
  body.user-bots-view .bot-settings-grid.bot-settings-compact{
    grid-template-columns:1fr!important;
  }
  body.user-bots-view .bot-settings-actions-card{
    width:100%!important;
  }
  body.user-bots-view .bot-settings-mini-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    max-width:none!important;
  }
}

@media (max-width:1180px){
  .app-shell{grid-template-columns:minmax(240px,280px) minmax(0,1fr)!important}
  .topbar{padding:14px!important;gap:10px!important}
  .content{padding:14px!important}
  body.user-bots-view .bot-user-shell-identical{grid-template-columns:220px minmax(0,1fr)!important}
  body.user-bots-view .bot-settings-mini-grid,
  body.admin-bots-view .bot-settings-mini-grid{grid-template-columns:1fr!important}
}

@media (max-width:980px){
  html,body{overflow:auto!important}
  .app-shell{grid-template-columns:1fr!important;height:auto!important;min-height:100vh!important;overflow:visible!important}
  .main{height:auto!important;min-height:100vh!important;overflow:visible!important}
  .content{height:auto!important;min-height:calc(100vh - 80px)!important;overflow:visible!important}
  body.user-bots-view .topbar{display:flex!important}
  body.user-bots-view .bot-hosting-page{height:auto!important;overflow:visible!important}
  body.user-bots-view .bot-user-shell-identical,
  .bot-host-shell{grid-template-columns:1fr!important;height:auto!important;overflow:visible!important}
  body.user-bots-view .bot-host-sidebar,
  body.user-bots-view .bot-user-sidebar,
  body.user-bots-view .bot-host-main,
  body.user-bots-view .bot-user-main,
  body.user-bots-view .bot-host-content{height:auto!important;overflow:visible!important}
  .bot-host-header-actions{justify-content:flex-start!important;width:100%!important}
  .bot-host-header-actions .btn{flex:1 1 130px!important}
  .bot-settings-grid.bot-settings-compact{grid-template-columns:1fr!important}
  .bot-settings-mini-grid{grid-template-columns:1fr!important}
  .bot-settings-actions-card{width:100%!important}
}

@media (max-width:620px){
  .sidebar{width:min(320px,92vw)!important}
  .bot-host-brand{align-items:flex-start!important}
  .bot-host-brand-title{font-size:22px!important}
  .bot-host-header{padding:14px!important}
  .bot-host-title{font-size:24px!important}
  .bot-host-tabs{padding:10px!important}
  .bot-host-tab{flex:1 1 120px!important;justify-content:center!important}
  .bot-host-content{padding:10px!important}
  .bot-settings-card{padding:12px!important}
  .bot-files-row,.bot-files-head{min-width:640px!important}
  .bot-console-output{font-size:12px!important}
}

/* Réglages bots séparés + ordre menu gauche */
.bot-options-panel{min-height:520px}
.bot-options-content{min-width:0;width:100%}
.bot-options-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:16px;align-items:start}
.bot-options-card{border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.045);padding:16px;min-width:0;box-shadow:var(--shadow)}
.bot-options-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.bot-options-table{display:grid;gap:8px;min-width:0}
.bot-options-table-head,.bot-options-row{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(160px,1fr) minmax(170px,.8fr) minmax(90px,120px);gap:10px;align-items:center;min-width:0}
.bot-options-table-head{color:var(--muted);font-size:12px;font-weight:950;text-transform:uppercase;letter-spacing:.03em;padding:0 4px}
.bot-options-row{padding:10px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(13,18,32,.42)}
.bot-options-row b{display:flex;align-items:center;gap:9px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bot-options-row .input,.bot-options-row .select,.bot-options-grid-compact .input,.bot-options-grid-compact .select,.bot-user-slots-row .input{min-height:38px!important;height:38px!important;border-radius:12px!important;padding:8px 11px!important;min-width:0!important}
.bot-options-readonly{min-height:38px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.045);display:flex;align-items:center;padding:0 11px;color:var(--muted);font-weight:850;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bot-options-divider{height:1px;background:var(--line);margin:16px 0}
.bot-options-grid-compact{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:end}
.bot-options-grid-compact .field{margin:0!important;min-width:0!important}
.bot-options-grid-compact .field.full{grid-column:1/-1}
.bot-options-check{grid-column:1/-1;margin:0!important;padding:10px!important;border-radius:12px!important;background:rgba(255,255,255,.035)}
.bot-options-actions{display:flex;justify-content:flex-end;margin-top:14px;gap:10px;flex-wrap:wrap}
.bot-user-slots-list{display:grid;gap:8px;max-height:560px;overflow:auto;padding-right:4px}
.bot-user-slots-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(80px,110px);gap:10px;align-items:center;border:1px solid rgba(255,255,255,.08);background:rgba(13,18,32,.42);border-radius:14px;padding:10px}
.bot-user-slots-user{display:flex;align-items:center;gap:10px;min-width:0}
.bot-user-slots-user b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bot-user-slots-user span{display:block;color:var(--muted);font-size:12px;font-weight:850;margin-top:2px}
.small-avatar{width:34px!important;height:34px!important;min-width:34px!important;font-size:13px!important}
.bot-options-empty{color:var(--muted);font-weight:800;border:1px dashed rgba(255,255,255,.14);border-radius:14px;padding:16px;text-align:center}

/* Anti-chevauchements plus strict sur les panneaux Bots Discord */
.bot-settings-grid.bot-settings-compact,
body.admin-bots-view .bot-settings-grid.bot-settings-compact,
body.user-bots-view .bot-settings-grid.bot-settings-compact{gap:12px!important;align-items:start!important;grid-template-columns:minmax(0,1fr) minmax(240px,300px)!important}
.bot-settings-mini-grid,
body.admin-bots-view .bot-settings-mini-grid,
body.user-bots-view .bot-settings-mini-grid{grid-template-columns:minmax(0,220px) minmax(0,170px) minmax(0,220px)!important;max-width:680px!important}
.bot-settings-mini-grid .field,.bot-settings-mini-grid .input,.bot-settings-mini-grid .select{min-width:0!important;max-width:100%!important}
.bot-settings-actions-card{overflow:hidden!important}
.bot-settings-actions-card .btn{width:100%!important;white-space:normal!important;overflow:hidden!important;text-overflow:ellipsis!important}
.bot-host-main,.bot-user-main,.bot-admin-workspace-main{overflow:hidden!important}
.bot-host-content{overflow:auto!important;min-width:0!important}

@media(max-width:1500px){
  .bot-options-layout{grid-template-columns:1fr!important}
  .bot-settings-grid.bot-settings-compact,
  body.admin-bots-view .bot-settings-grid.bot-settings-compact,
  body.user-bots-view .bot-settings-grid.bot-settings-compact{grid-template-columns:1fr!important}
  .bot-settings-actions-card{width:100%!important;max-width:100%!important}
}
@media(max-width:980px){
  .bot-options-table-head{display:none!important}
  .bot-options-row{grid-template-columns:1fr!important;align-items:stretch!important}
  .bot-options-grid-compact{grid-template-columns:1fr!important}
  .bot-options-actions{justify-content:stretch!important}
  .bot-options-actions .btn{width:100%!important}
  .bot-user-slots-row{grid-template-columns:1fr 90px!important}
}
@media(max-width:620px){
  .bot-options-card{padding:12px!important;border-radius:16px!important}
  .bot-user-slots-row{grid-template-columns:1fr!important}
}

/* Correctif MaevaDrive 62 : suppression des scrolls horizontaux console / éditeur / fichiers */
body.user-bots-view,
body.admin-bots-view,
body.user-bots-view .bot-host-main,
body.admin-bots-view .bot-host-main,
body.user-bots-view .bot-host-content,
body.admin-bots-view .bot-host-content,
body.user-bots-view .bot-dashboard-grid,
body.admin-bots-view .bot-dashboard-grid,
body.user-bots-view .bot-files-card,
body.admin-bots-view .bot-files-card,
body.user-bots-view .bot-editor-page,
body.admin-bots-view .bot-editor-page{
  min-width:0!important;
  max-width:100%!important;
  overflow-x:hidden!important;
}

body.user-bots-view .bot-console-card,
body.admin-bots-view .bot-console-card{
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
}

body.user-bots-view .bot-console-output,
body.admin-bots-view .bot-console-output,
.bot-console-output{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  white-space:pre-wrap!important;
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
}

body.user-bots-view .bot-log-line,
body.admin-bots-view .bot-log-line,
.bot-log-line{
  white-space:pre-wrap!important;
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
  max-width:100%!important;
}

body.user-bots-view .bot-code-editor-wrap,
body.admin-bots-view .bot-code-editor-wrap,
.bot-code-editor-wrap{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
}

body.user-bots-view .bot-code-highlight,
body.user-bots-view .bot-code-textarea,
body.admin-bots-view .bot-code-highlight,
body.admin-bots-view .bot-code-textarea,
.bot-code-highlight,
.bot-code-textarea{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  white-space:pre-wrap!important;
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
}

body.user-bots-view .bot-code-line,
body.admin-bots-view .bot-code-line,
.bot-code-line,
body.user-bots-view .bot-code-line-code,
body.admin-bots-view .bot-code-line-code,
.bot-code-line-code{
  white-space:pre-wrap!important;
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
  max-width:100%!important;
}

body.user-bots-view .bot-code-textarea,
body.admin-bots-view .bot-code-textarea,
.bot-code-textarea{
  resize:none!important;
  wrap-option:wrap!important;
}

body.user-bots-view .bot-files-table,
body.admin-bots-view .bot-files-table,
.bot-files-table{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow-x:hidden!important;
  overflow-y:hidden!important;
}

body.user-bots-view #userBotFilesRows,
body.admin-bots-view #botFilesRows,
#userBotFilesRows,
#botFilesRows{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}

body.user-bots-view .bot-files-head,
body.user-bots-view .bot-files-row,
body.admin-bots-view .bot-files-head,
body.admin-bots-view .bot-files-row,
.bot-files-head,
.bot-files-row{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  grid-template-columns:34px minmax(0,1fr) minmax(72px,.32fr) minmax(108px,.36fr) 42px!important;
  overflow:visible!important;
}

body.user-bots-view .bot-file-name,
body.admin-bots-view .bot-file-name,
.bot-file-name,
body.user-bots-view .bot-file-open,
body.admin-bots-view .bot-file-open,
.bot-file-open{
  min-width:0!important;
  max-width:100%!important;
}

body.user-bots-view .bot-file-open,
body.admin-bots-view .bot-file-open,
.bot-file-open{
  white-space:normal!important;
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

body.user-bots-view .bot-files-row > *,
body.admin-bots-view .bot-files-row > *,
.bot-files-row > *{
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

body.user-bots-view .bot-file-menu-cell,
body.admin-bots-view .bot-file-menu-cell,
.bot-file-menu-cell{
  overflow:visible!important;
}

@media (max-width:760px){
  body.user-bots-view .bot-files-head,
  body.admin-bots-view .bot-files-head,
  .bot-files-head{
    display:none!important;
  }
  body.user-bots-view .bot-files-row,
  body.admin-bots-view .bot-files-row,
  .bot-files-row{
    grid-template-columns:28px minmax(0,1fr) 38px!important;
    grid-template-areas:
      "check name menu"
      "check size menu"
      "check date menu"!important;
    gap:6px 8px!important;
    padding:10px!important;
  }
  body.user-bots-view .bot-files-row > div:nth-child(1),
  body.admin-bots-view .bot-files-row > div:nth-child(1),
  .bot-files-row > div:nth-child(1){grid-area:check!important;align-self:start!important;}
  body.user-bots-view .bot-files-row > div:nth-child(2),
  body.admin-bots-view .bot-files-row > div:nth-child(2),
  .bot-files-row > div:nth-child(2){grid-area:name!important;}
  body.user-bots-view .bot-files-row > div:nth-child(3),
  body.admin-bots-view .bot-files-row > div:nth-child(3),
  .bot-files-row > div:nth-child(3){grid-area:size!important;color:var(--muted)!important;font-size:12px!important;}
  body.user-bots-view .bot-files-row > div:nth-child(4),
  body.admin-bots-view .bot-files-row > div:nth-child(4),
  .bot-files-row > div:nth-child(4){grid-area:date!important;color:var(--muted)!important;font-size:12px!important;}
  body.user-bots-view .bot-files-row > div:nth-child(5),
  body.admin-bots-view .bot-files-row > div:nth-child(5),
  .bot-files-row > div:nth-child(5){grid-area:menu!important;align-self:start!important;justify-self:end!important;}
}

/* Correctif MaevaDrive 63 : Accueil + responsive Bots */
.home-page{width:100%;min-height:100%;display:block;min-width:0;overflow-x:hidden}
.home-page.hidden{display:none!important}
.home-panel{width:100%;min-height:calc(100vh - 150px);border:1px solid var(--line);border-radius:24px;background:linear-gradient(135deg,rgba(18,24,43,.88),rgba(8,13,27,.82));padding:22px;box-shadow:var(--shadow);overflow:hidden;min-width:0}
.home-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:18px;min-width:0}
.home-sub{color:var(--muted);font-weight:800;margin-top:4px}
.home-post-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px;min-width:0}
.home-post-card{border:1px solid rgba(255,255,255,.1);background:rgba(13,18,32,.66);border-radius:20px;overflow:hidden;min-width:0;box-shadow:0 18px 36px rgba(0,0,0,.18)}
.home-post-media{display:block;width:100%;max-width:100%;height:240px;object-fit:cover;background:#050914}
.home-post-body{padding:16px;min-width:0}
.home-post-body h3{margin:0 0 8px;font-size:20px;line-height:1.2;color:var(--text);word-break:break-word}
.home-post-body p{margin:0;color:var(--muted);font-weight:750;line-height:1.55;word-break:break-word;overflow-wrap:anywhere}
.home-empty{min-height:360px;display:flex;align-items:center;justify-content:center;flex-direction:column}
.topbar.home-or-bots .search-box,.topbar.home-or-bots .top-actions{visibility:hidden;pointer-events:none}

body.user-home-view .topbar.home-or-bots .top-actions{display:none!important}
body.user-home-view .topbar.home-or-bots .discord-top-btn{visibility:visible!important;pointer-events:auto!important}

.home-admin-content{min-width:0}
.home-admin-layout{display:grid;grid-template-columns:minmax(320px,.75fr) minmax(0,1fr);gap:18px;align-items:start;min-width:0}
.home-admin-form,.home-admin-list-card{border:1px solid rgba(255,255,255,.1);background:rgba(13,18,32,.58);border-radius:20px;padding:16px;min-width:0}
.home-admin-grid{display:grid;grid-template-columns:1fr 110px;gap:12px;align-items:end;min-width:0;margin-top:12px}
.home-admin-grid .field.full{grid-column:1/-1}
.home-admin-list{display:grid;gap:10px;margin-top:12px;min-width:0;max-height:620px;overflow:auto;padding-right:4px}
.home-admin-post-row{display:grid;grid-template-columns:120px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px;border:1px solid rgba(255,255,255,.09);border-radius:16px;background:rgba(255,255,255,.035);min-width:0}
.home-admin-post-media{width:120px;height:78px;border-radius:12px;background:rgba(0,0,0,.25);overflow:hidden;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:12px;font-weight:850}
.home-admin-post-media img,.home-admin-post-media video{width:100%;height:100%;object-fit:cover;display:block}
.home-admin-post-main{min-width:0}
.home-admin-post-main b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.home-admin-post-main p{margin:4px 0;color:var(--muted);font-weight:700;line-height:1.35;word-break:break-word}
.home-admin-post-main span{color:var(--muted);font-size:12px;font-weight:850}
.home-admin-post-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.home-admin-no-media{padding:8px;text-align:center}

/* Le panneau aide Bots ne doit plus chevaucher sur mobile */
.bot-sidebar-help{position:relative!important;z-index:1!important;flex:0 0 auto!important;max-height:none!important;overflow:visible!important}
.bot-admin-workspace-sidebar,.bot-host-sidebar,.bot-user-sidebar{min-width:0!important}
@media(max-width:980px){
  .home-panel{min-height:auto;padding:16px;border-radius:20px}
  .home-post-grid{grid-template-columns:1fr}
  .home-post-media{height:auto;max-height:420px}
  .home-admin-layout{grid-template-columns:1fr}
  .home-admin-post-row{grid-template-columns:90px minmax(0,1fr);align-items:start}
  .home-admin-post-actions{grid-column:1/-1;justify-content:stretch}
  .home-admin-post-actions .btn{flex:1 1 120px}
  body.user-bots-view .bot-host-sidebar,
  body.user-bots-view .bot-user-sidebar,
  body.admin-bots-view .bot-host-sidebar,
  body.admin-bots-view .bot-admin-workspace-sidebar{height:auto!important;min-height:0!important;overflow:visible!important;align-self:stretch!important}
  body.user-bots-view .bot-sidebar-help,
  body.admin-bots-view .bot-sidebar-help{margin-top:12px!important;margin-bottom:8px!important;display:block!important;clear:both!important}
}
@media(max-width:620px){
  .home-admin-grid{grid-template-columns:1fr}
  .home-admin-post-row{grid-template-columns:1fr}
  .home-admin-post-media{width:100%;height:auto;min-height:120px}
  .home-post-media{max-height:none}
  .topbar.home-or-bots{display:none!important}
  body.user-bots-view .bot-host-brand,
  body.admin-bots-view .bot-host-brand{margin-bottom:8px!important}
  body.user-bots-view .bot-admin-nav,
  body.admin-bots-view .bot-admin-nav{margin-bottom:10px!important}
  body.user-bots-view .bot-sidebar-help,
  body.admin-bots-view .bot-sidebar-help{font-size:13px!important;line-height:1.45!important;padding:12px!important}
}


/* Organisation panel admin + anti bascule après vider corbeille */
.admin-tabs-clean{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;
  align-items:stretch!important;
  gap:10px!important;
}
.admin-tabs-clean .admin-tab-btn{
  width:100%!important;
  justify-content:center!important;
  min-width:0!important;
  text-align:center!important;
}
.admin-tabs-clean .admin-tab-btn span:last-child{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.bot-options-panel .section-head{
  border-bottom:1px solid rgba(255,255,255,.08);
  padding-bottom:12px;
  margin-bottom:12px;
}
.bot-options-layout{align-items:stretch!important}
.bot-options-card{overflow:hidden!important}
@media (max-width:760px){
  .admin-tabs-clean{grid-template-columns:1fr!important}
  .admin-tabs-clean .admin-tab-btn{justify-content:flex-start!important;text-align:left!important}
}


/* Bouton Discord connecté uniquement */
.discord-top-btn,.home-discord-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:10px 15px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:linear-gradient(135deg,#5865f2,#8b5cf6);
  color:#fff;
  font-weight:950;
  text-decoration:none!important;
  box-shadow:0 14px 34px rgba(0,0,0,.28);
  margin-left:auto;
  flex:0 0 auto;
  white-space:nowrap;
  line-height:1;
  transition:.15s ease;
}
.discord-top-btn:hover,.home-discord-btn:hover{transform:translateY(-1px);filter:brightness(1.08)}
.discord-top-btn i,.home-discord-btn i{font-size:15px;line-height:1}
.discord-top-btn.hidden,.home-discord-btn.hidden{display:none!important}
@media (max-width:760px){
  .discord-top-btn,.home-discord-btn{min-height:38px;padding:9px 12px;font-size:13px}
  .discord-top-btn span,.home-discord-btn span{display:none}
  .discord-top-btn i,.home-discord-btn i{font-size:16px}
}




@media (max-height:860px){
  .login-page{padding:16px}
  .login-page:before{inset:10px;border-radius:26px;max-width:calc(100vw - 20px)}
  .login-card{max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:22px;border-radius:28px}
  .login-card .brand{margin:10px 0 14px}
  .auth-title-block{margin-bottom:14px}
  .auth-title-block h1{font-size:clamp(28px,3vw,40px)}
  .auth-title-block p{margin-top:8px;font-size:14px;line-height:1.45}
  .auth-stats{margin-bottom:14px}
  .auth-stats div{padding:10px 12px}
  .auth-stats strong{font-size:20px}
  .auth-stats span{margin-top:4px;font-size:11px}
  .auth-field{margin-bottom:10px}
  .field{gap:6px;margin-bottom:12px}
  .auth-input-wrap{height:48px}
  .auth-actions{gap:8px}
  .auth-actions .btn{min-height:46px}
  .auth-features{margin-top:12px}
  .auth-feature{padding:10px 8px;font-size:11px}
}

@media (max-height:760px){
  .login-page{padding:12px}
  .login-page:before{inset:6px;border-radius:20px;max-width:calc(100vw - 12px)}
  .login-card{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:18px;border-radius:24px}
  .auth-badge{padding:7px 10px}
  .auth-logo{width:48px;height:48px;border-radius:16px;font-size:20px}
  .auth-logo i{font-size:20px}
  .brand-title{font-size:18px}
  .brand-sub{font-size:11px}
  .auth-title-block h1{font-size:clamp(24px,2.6vw,34px);line-height:1.02}
  .auth-title-block p{font-size:13px;line-height:1.38}
  .auth-stats{gap:8px;margin-bottom:12px}
  .auth-stats div{padding:9px 10px}
  .auth-stats strong{font-size:18px}
  .auth-stats span{font-size:11px}
  .auth-input-wrap{height:44px;border-radius:15px}
  .auth-actions .btn{min-height:42px;border-radius:15px}
  .auth-features{gap:8px;margin-top:10px}
  .auth-feature{padding:9px 6px;font-size:10px}
}

@media (max-height:680px){
  .auth-title-block p{display:none}
  .auth-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
  .auth-feature{font-size:10px}
}

@media (max-width:620px){
  .login-page{padding:14px;align-items:start;padding-top:18px;padding-bottom:18px}
  .login-page:before{inset:8px;border-radius:24px;max-width:calc(100vw - 16px)}
  .login-card{max-width:calc(100vw - 28px);padding:22px;border-radius:26px}
  .auth-title-block h1{font-size:31px;letter-spacing:-.04em}
  .auth-title-block p{font-size:14px;line-height:1.5}
  .auth-stats{grid-template-columns:1fr;gap:8px}
  .auth-stats div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px}
  .auth-stats strong{font-size:19px}
  .auth-stats span{margin-top:0;text-align:right}
  .auth-features{grid-template-columns:1fr;gap:8px}
  .auth-feature{justify-content:flex-start;text-align:left;padding:11px 12px}
}

@media (max-width:380px){
  .login-card{padding:18px}
  .auth-brand{gap:10px}
  .auth-logo{width:48px;height:48px;border-radius:17px}
  .auth-title-block h1{font-size:28px}
}


/* Liens légaux + pages CGU / confidentialité */
.auth-legal-links{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;gap:10px;margin-top:16px;color:var(--muted);font-size:12px;font-weight:900;line-height:1.2}
.auth-legal-links a,.sidebar-legal-links a,.legal-nav a{color:inherit;text-decoration:none}
.auth-legal-links a:hover,.sidebar-legal-links a:hover,.legal-nav a:hover{color:var(--text);text-decoration:none}
.sidebar-legal-links{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:12px;color:var(--muted2);font-size:12px;font-weight:900;line-height:1.2;flex-wrap:wrap}
.legal-page{min-height:100vh;min-height:100dvh;width:100%;position:relative;overflow:auto;padding:28px;background:radial-gradient(circle at 50% 0,rgba(255,204,51,.16),transparent 28%),radial-gradient(circle at 20% 100%,rgba(139,92,246,.24),transparent 32%),radial-gradient(circle at 90% 70%,rgba(6,182,212,.18),transparent 30%),linear-gradient(135deg,#050812 0%,#0b1022 48%,#050812 100%)}
.legal-page:before{content:"";position:fixed;inset:18px;border:1px solid rgba(255,255,255,.07);border-radius:34px;pointer-events:none;background:linear-gradient(135deg,rgba(255,255,255,.035),transparent 38%,rgba(255,255,255,.025));max-width:calc(100vw - 36px)}
.legal-shell{width:min(980px,100%);margin:0 auto;position:relative;z-index:1;display:grid;gap:18px}
.legal-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px;border:1px solid rgba(255,255,255,.10);border-radius:24px;background:rgba(17,24,39,.62);box-shadow:0 18px 60px rgba(0,0,0,.30);backdrop-filter:blur(20px)}
.legal-brand{display:flex;align-items:center;gap:12px;min-width:0;text-decoration:none;color:var(--text)}
.legal-logo{flex:0 0 auto}
.legal-nav{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:13px;font-weight:950}
.legal-nav a{border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.055);border-radius:999px;padding:9px 12px;white-space:nowrap}
.legal-nav a:hover{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.18)}
.legal-card{position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.13);border-radius:30px;background:linear-gradient(180deg,rgba(18,25,43,.93),rgba(9,14,27,.91));box-shadow:0 30px 90px rgba(0,0,0,.48);padding:34px;backdrop-filter:blur(24px)}
.legal-card:before{content:"";position:absolute;left:0;right:0;top:0;height:4px;background:linear-gradient(90deg,var(--accent),var(--accent2),var(--accent3));opacity:.95}
.legal-kicker{width:max-content;max-width:100%;display:inline-flex;align-items:center;gap:8px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.07);border-radius:999px;padding:8px 12px;color:#dbeafe;font-size:12px;font-weight:950;letter-spacing:.02em;margin-bottom:16px}
.legal-kicker span{width:9px;height:9px;border-radius:50%;background:var(--ok);box-shadow:0 0 0 5px rgba(34,197,94,.12)}
.legal-card h1{margin:0;color:var(--text);font-size:clamp(30px,4vw,48px);line-height:1.04;letter-spacing:-.05em;font-weight:1000}
.legal-updated{margin:12px 0 22px;color:var(--muted);font-weight:850}
.legal-content{display:grid;gap:12px;color:#cbd5e1;font-weight:750;line-height:1.72}
.legal-content h2{margin:18px 0 0;color:#ffe174;font-size:20px;line-height:1.25;font-weight:1000;letter-spacing:-.01em}
.legal-content h3{margin:12px 0 0;color:var(--text);font-size:17px;font-weight:950}
.legal-content p{margin:0}
.legal-admin-textarea{min-height:260px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;font-size:13px;line-height:1.5}
@media (max-width:760px){
  .legal-page{padding:14px}
  .legal-page:before{inset:8px;border-radius:24px;max-width:calc(100vw - 16px)}
  .legal-header{align-items:flex-start;flex-direction:column;border-radius:22px}
  .legal-nav{justify-content:flex-start;width:100%}
  .legal-card{padding:24px;border-radius:24px}
  .legal-card h1{font-size:30px}
  .legal-content{font-size:14px;line-height:1.65}
  .legal-content h2{font-size:18px}
}
@media (max-width:420px){
  .auth-legal-links{font-size:11px;gap:7px;flex-wrap:wrap}
  .legal-nav a{width:100%;text-align:center}
  .legal-card{padding:20px}
}


/* Correctif pages légales : lecture complète jusqu'en bas */
body[data-legal-page]{
  height:auto;
  min-height:100%;
  overflow-x:hidden;
  overflow-y:auto;
}
body[data-legal-page] .legal-page{
  height:auto;
  min-height:100vh;
  min-height:100dvh;
  overflow:visible;
  padding-bottom:110px;
}
body[data-legal-page] .legal-shell{
  padding-bottom:10px;
}
@media (max-width:760px){
  body[data-legal-page] .legal-page{
    padding-bottom:90px;
  }
}


/* Correctif définitif pages CGU / Confidentialité : pas de scroll horizontal + lecture complète */
html:has(body[data-legal-page]){
  height:100%;
  overflow:hidden!important;
}
body[data-legal-page]{
  height:100%;
  min-height:100%;
  width:100%;
  max-width:100%;
  margin:0;
  overflow:hidden!important;
  background:#050812;
}
body[data-legal-page] .legal-page{
  position:fixed;
  inset:0;
  width:auto;
  max-width:none;
  height:auto;
  min-height:0;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  padding:28px 28px 140px;
  box-sizing:border-box;
  scrollbar-gutter:stable;
}
body[data-legal-page] .legal-page:before{
  inset:18px;
  right:18px;
  width:auto;
  max-width:none;
}
body[data-legal-page] .legal-bg-glow,
body[data-legal-page] .login-bg-glow{
  max-width:100vw;
}
body[data-legal-page] .legal-shell{
  width:100%;
  max-width:980px;
  min-width:0;
  margin:0 auto;
  padding-bottom:0;
}
body[data-legal-page] .legal-header,
body[data-legal-page] .legal-card,
body[data-legal-page] .legal-content{
  min-width:0;
  max-width:100%;
}
body[data-legal-page] .legal-content,
body[data-legal-page] .legal-content *{
  overflow-wrap:anywhere;
  word-break:break-word;
}
@media (max-width:760px){
  body[data-legal-page] .legal-page{
    padding:14px 14px 120px;
  }
  body[data-legal-page] .legal-page:before{
    inset:8px;
    right:8px;
  }
}


/* Correctif petit écran pages légales : éviter le débordement en haut au scroll */
body[data-legal-page] .legal-page{
  overscroll-behavior-y:contain;
  scroll-padding-top:22px;
}
body[data-legal-page] .legal-shell{
  padding-top:18px;
  padding-bottom:18px;
}
body[data-legal-page] .legal-header,
body[data-legal-page] .legal-card{
  scroll-margin-top:22px;
}
@media (max-width:760px){
  body[data-legal-page] .legal-page{
    padding-top:18px!important;
    padding-bottom:120px;
  }
  body[data-legal-page] .legal-shell{
    padding-top:18px;
    gap:14px;
  }
}
@media (max-width:420px){
  body[data-legal-page] .legal-page{
    padding-top:16px!important;
  }
  body[data-legal-page] .legal-shell{
    padding-top:16px;
  }
}
