@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rowdies:wght@400;700&display=swap');

:root{
  --accent1:#ff8a00;
  --accent2:#ffc24a;
  --accent3:#ff5a3d;
  --text:#e6edf7;
  --panel:rgba(15,23,42,0.62);
  --panel2:rgba(15,23,42,0.42);
  --border:rgba(148,163,184,0.18);
}

*{
margin:0;
padding:0;
box-sizing:border-box;
}

body{
font-family:'Poppins',sans-serif;
color:white;
min-height:100vh;
position:relative;
background:#0b1220;
overflow-x:hidden;
}

/* Background image (same as login) */
body::before{
content:'';
position:fixed;
inset:0;
background: url('fond.png') center/cover no-repeat;
filter:saturate(0.95) contrast(1.05);
transform:scale(1.02);
z-index:-2;
}
body::after{
content:'';
position:fixed;
inset:0;
/* Dark overlay (fond plus sombre, image visible) */
background:
  radial-gradient(1200px 700px at 50% 15%, rgba(10,20,40,0.20), rgba(10,20,40,0.72) 55%, rgba(5,10,20,0.90) 100%),
  linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.70));
z-index:-1;
}


/* ================= NAVBAR ================= */

.navbar{
display:flex;
align-items:center;
justify-content:space-between;
padding:10px 24px;
background:#0f172a;
box-shadow:0 10px 30px rgba(0,0,0,0.8);
min-height:70px;
position:sticky;
top:0;
z-index:50;
}

/* BRAND */
.brand{
display:flex;
align-items:center;
text-decoration:none;
margin-right:30px;
padding:10px 14px;
border-radius:16px;
background:rgba(15,23,42,0.55);
border:1px solid rgba(148,163,184,0.16);
backdrop-filter:blur(10px);
-webkit-backdrop-filter:blur(10px);
box-shadow:0 10px 30px rgba(0,0,0,0.30);
}


.brand-logo{
height:40px;
width:auto; /* IMPORTANT pour éviter étirement */
object-fit:contain;
margin-right:14px;
}

.brand-text{
font-family:'Rowdies',cursive;
font-weight:700;
font-size:18px;
color:#ff9900;
letter-spacing:0.8px;
}


/* MENU CENTER */
.nav-center{
display:flex;
gap:4px;
justify-content:center;
flex:1;
flex-wrap:wrap;
}

.nav-center a{
text-decoration:none;
color:#94a3b8;
padding:9px 14px;
border-radius:12px;
font-size:14px;
font-weight:600;
transition:0.2s ease;
}


.nav-user{
color:#e2e8f0;
font-weight:800;
font-size:13px;
max-width:220px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
padding:8px 12px;
border-radius:12px;
background:rgba(148,163,184,0.10);
border:1px solid rgba(148,163,184,0.14);
}


.nav-center a:hover{
background:rgba(148,163,184,0.10);
color:#e2e8f0;
}


.nav-center a.active{
background:linear-gradient(135deg,#2563eb,#22c55e);
color:white;
box-shadow:0 10px 26px rgba(0,0,0,0.35);
}


/* RIGHT */
.nav-right{
display:flex;
align-items:center;
gap:15px;
}

/* Ajoute ceci */
.nav-right .separator{
width:1px;
height:20px;
background:rgba(255,255,255,0.2);
}


.user-role{
color:#facc15;
font-weight:600;
}

.logout-btn{
background:#ef4444;
padding:6px 14px;
border-radius:8px;
color:white;
text-decoration:none;
}

.logout-btn:hover{
background:#dc2626;
}


/* ================= PAGE ================= */

.page-container{
padding:34px;
}

.page-title{
font-size:34px;
font-weight:700;
margin-bottom:40px;
}

/* ================= STAT BOX ================= */

.stat-box{
background:#1e293b;
padding:40px;
border-radius:18px;
width:320px;
margin-bottom:25px;
box-shadow:0 15px 35px rgba(0,0,0,0.7);
}

.stat-number{
font-size:32px;
font-weight:700;
margin-top:10px;
}

/* ================= SEARCH ================= */

.search-container{
position:relative;
width:320px; /* même largeur que stat-box */
margin-bottom:35px;
}

.search-container input{
width:100%;
padding:14px 45px 14px 15px;
border-radius:18px;
border:none;
outline:none;
font-size:14px;
background:#1e293b;
color:white;
box-shadow:0 15px 35px rgba(0,0,0,0.7);
transition:0.2s;
}

.search-container input::placeholder{
color:#94a3b8;
}

.search-container input:focus{
box-shadow:0 18px 40px rgba(0,0,0,0.9);
}

/* Engrenage */
.gear{
position:absolute;
right:14px;
top:50%;
transform:translateY(-50%);
font-size:18px;
display:none;
animation:spinGear 1s linear infinite;
}

@keyframes spinGear{
from{transform:translateY(-50%) rotate(0deg);}
to{transform:translateY(-50%) rotate(360deg);}
}

.check{
position:absolute;
right:14px;
top:50%;
transform:translateY(-50%);
display:none;
font-size:18px;
}

/* ================= TABLE ================= */

table{
width:100%;
margin-top:30px;
border-collapse:collapse;
background:#1e293b;
border-radius:18px;
overflow:hidden;
box-shadow:0 15px 35px rgba(0,0,0,0.7);
}

th{
background:#334155;
padding:16px;
text-align:left;
font-size:13px;
letter-spacing:1px;
text-transform:uppercase;
}

td{
padding:15px;
}

tr:nth-child(even){
background:#273449;
}

tr:hover{
background:#2563eb;
transition:0.2s;
}

/* ================= ACTION COLORS ================= */

.action-green{
color:#22c55e;
font-weight:600;
}

.action-red{
color:#ef4444;
font-weight:600;
}

/* ================= DASHBOARD CARDS ================= */

.dashboard-container{
padding:50px;
}

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

.card{
background:#1e293b;
padding:40px;
border-radius:18px;
text-align:center;
text-decoration:none;
color:white;
box-shadow:0 15px 35px rgba(0,0,0,0.7);
transition:0.3s ease;
}

.card:hover{
transform:translateY(-6px);
background:#2563eb;
}

/* ================= DASHBOARD TILES (clean) ================= */
.tiles{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:18px;
  align-items:stretch;
}

.tile{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:22px 22px;
  border-radius:18px;
  background:rgba(15,23,42,0.55);
  border:1px solid rgba(148,163,184,0.14);
  text-decoration:none;
  color:#e2e8f0;
  box-shadow:0 14px 40px rgba(0,0,0,0.45);
  transition:transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.tile:hover{
  transform:translateY(-3px);
  background:rgba(37,99,235,0.22);
  border-color:rgba(37,99,235,0.35);
}

.tile-title{
  font-size:20px;
  font-weight:800;
  letter-spacing:0.2px;
}

.tile-sub{
  font-size:13px;
  color:#94a3b8;
  font-weight:600;
}

.tile.tile-accent{
  background:rgba(37,99,235,0.18);
  border-color:rgba(37,99,235,0.35);
}

/* ================= LOGIN ================= */

.login-body{
min-height:100vh;
background:
  radial-gradient(1200px 600px at 20% 10%, rgba(37,99,235,0.18), transparent 60%),
  radial-gradient(900px 500px at 80% 20%, rgba(245,158,11,0.12), transparent 55%),
  linear-gradient(135deg,#0b1220,#0f172a 40%,#111b2d);
}

.login-container{
min-height:100vh;
display:flex;
align-items:center;
justify-content:center;
padding:28px;
}

.login-panel{
width:100%;
max-width:460px;
background:rgba(30,41,59,0.82);
border:1px solid rgba(148,163,184,0.18);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-radius:22px;
padding:26px;
box-shadow:0 30px 80px rgba(0,0,0,0.6);
}

.login-header{
display:flex;
align-items:center;
gap:16px;
margin-bottom:18px;
}

.login-logo{
width:56px;
height:56px;
object-fit:contain;
border-radius:14px;
background:rgba(15,23,42,0.6);
padding:8px;
}

.login-kicker{
font-size:12px;
letter-spacing:0.12em;
text-transform:uppercase;
color:#94a3b8;
}

.login-h1{
font-size:28px;
line-height:1.1;
margin:4px 0 2px;
}

.login-sub{
font-size:13px;
color:#94a3b8;
}

.login-alert{
background:rgba(239,68,68,0.14);
border:1px solid rgba(239,68,68,0.35);
color:#fecaca;
padding:10px 12px;
border-radius:12px;
margin:10px 0 14px;
font-size:13px;
}

.login-form{
display:flex;
flex-direction:column;
gap:12px;
}

.login-field label{
display:block;
font-size:13px;
color:#cbd5e1;
margin-bottom:6px;
}

.login-field input{
width:100%;
padding:12px 14px;
border-radius:14px;
border:1px solid rgba(148,163,184,0.18);
background:rgba(15,23,42,0.7);
color:white;
outline:none;
transition:0.2s;
}

.login-field input:focus{
border-color:rgba(37,99,235,0.65);
box-shadow:0 0 0 4px rgba(37,99,235,0.18);
}

.login-btn{
margin-top:6px;
width:100%;
padding:12px 14px;
border:none;
border-radius:14px;
background:linear-gradient(135deg,#2563eb,#1d4ed8);
color:white;
font-weight:700;
cursor:pointer;
transition:transform 0.15s ease, filter 0.15s ease;
}

.login-btn:hover{
filter:brightness(1.08);
transform:translateY(-1px);
}

.login-foot{
margin-top:16px;
font-size:12px;
color:#94a3b8;
text-align:center;
}

@media (max-width: 880px) {
  .navbar{ padding:10px 14px; }
  .brand-text{
font-family:'Rowdies',cursive;
font-weight:700;
font-size:18px;
color:#ff9900;
letter-spacing:0.8px;
}

  .nav-right .separator{ display:none; }
  .nav-user{
color:#e2e8f0;
font-weight:800;
font-size:13px;
max-width:220px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
padding:8px 12px;
border-radius:12px;
background:rgba(148,163,184,0.10);
border:1px solid rgba(148,163,184,0.14);
}

}

/* ================= USERS PAGE ================= */

.user-form{
background:#1e293b;
padding:30px;
border-radius:18px;
box-shadow:0 15px 35px rgba(0,0,0,0.7);
margin-bottom:40px;
max-width:600px;
}

.user-form input{
width:100%;
padding:12px;
margin-bottom:15px;
border-radius:10px;
border:none;
background:#0f172a;
color:white;
}

.permissions{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
gap:10px;
margin-bottom:20px;
}

.permissions .perm{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background:#0f172a;
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-size:13px;
  transition:0.2s;
  border:1px solid rgba(148,163,184,0.10);
}

.permissions .perm span{
  color:#e2e8f0;
  font-weight:700;
}

.permissions .perm:hover{
  background:rgba(37,99,235,0.18);
  border-color:rgba(37,99,235,0.35);
}

.permissions .perm input[type="checkbox"]{
  width:18px;
  height:18px;
  accent-color:#2563eb;
}

.user-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 12px;
  border-radius:10px;
  text-decoration:none;
  font-weight:800;
  font-size:12px;
  color:white;
  border:1px solid rgba(255,255,255,0.10);
}
.btn-ok{ background:rgba(34,197,94,0.22); }
.btn-ok:hover{ background:rgba(34,197,94,0.32); }
.btn-warn{ background:rgba(245,158,11,0.22); }
.btn-warn:hover{ background:rgba(245,158,11,0.32); }
.btn-danger{ background:rgba(239,68,68,0.22); }
.btn-danger:hover{ background:rgba(239,68,68,0.32); }

.user-form button{
background:#2563eb;
padding:10px 20px;
border:none;
border-radius:10px;
color:white;
cursor:pointer;
font-weight:600;
transition:0.2s;
}

.user-form button:hover{
background:#1d4ed8;
}

/* Update button */
table form button{
background:#f59e0b;
padding:6px 12px;
border:none;
border-radius:6px;
color:white;
font-size:12px;
cursor:pointer;
margin-top:5px;
}

table form button:hover{
background:#d97706;
}

/* Delete button */
.delete-btn{
background:#ef4444;
padding:6px 12px;
border-radius:6px;
color:white;
text-decoration:none;
font-size:12px;
}

.delete-btn:hover{
background:#dc2626;
}


/* ================= LOGIN (v3 - clean centered card) ================= */
body.login-body{
  min-height:100vh;
  /* Fond image + voile sombre pour éviter l'éblouissement */
  background:
    linear-gradient(180deg, rgba(5,10,18,0.72), rgba(5,10,18,0.72)),
    url('fond.png');
  background-size:cover;
  background-position:center;
  background-attachment:fixed;
  color:#eaf0ff;
  overflow-x:hidden;
}

.login-pill{
  position:fixed;
  top:18px;
  left:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px;
  border-radius:14px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.14);
  color:#eaf0ff;
  text-decoration:none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:0 12px 30px rgba(0,0,0,0.25);
}
.login-pill:hover{ background:rgba(255,255,255,0.12); }

.login-pill-logo{
  width:34px;
  height:34px;
  object-fit:contain;
  border-radius:10px;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.35));
}

.login-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px 16px;
}

.login-card{
  width:min(520px, 92vw);
  padding:28px 28px 22px;
  border-radius:18px;
  background:rgba(8, 20, 40, 0.55);
  border:1px solid rgba(255,255,255,0.10);
  box-shadow:0 30px 90px rgba(0,0,0,0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.login-head{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:18px;
}

.login-logo{
  width:82px;
  height:auto;
  opacity:0.95;
  margin-bottom:6px;
  filter: drop-shadow(0 10px 25px rgba(0,0,0,0.35));
}

.login-head h1{
  font-size:30px;
  line-height:1.1;
  margin:0;
color:white;}
.login-head p{
  margin:0;
  color:rgba(234,240,255,0.8);
  font-weight:500;
}

.login-form{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:6px;
}

.login-field{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.login-field span{
  font-size:14px;
  color:rgba(234,240,255,0.78);
  font-weight:600;
}
.login-field input{
  width:100%;
  padding:14px 16px;
  border-radius:14px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.12);
  color:#eaf0ff;
  outline:none;
  font-size:15px;
}
.login-field input::placeholder{ color:rgba(234,240,255,0.55); }
.login-field input:focus{
  border-color:rgba(255,255,255,0.28);
  background:rgba(255,255,255,0.10);
  box-shadow:0 0 0 4px rgba(255,255,255,0.06);
}

.login-btn{
  margin-top:4px;
  width:100%;
  padding:14px 16px;
  border-radius:14px;
  border:0;
  background:rgba(255,255,255,0.16);
  color:#ffffff;
  font-weight:800;
  font-size:15px;
  cursor:pointer;
  box-shadow:0 16px 40px rgba(0,0,0,0.25);
}
.login-btn:hover{ background:rgba(255,255,255,0.22); }
.login-btn:active{ transform:translateY(1px); }

.login-alert{
  margin:10px 0 6px;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255, 80, 80, 0.12);
  border:1px solid rgba(255, 80, 80, 0.25);
  color:#ffd7d7;
  font-weight:700;
}

.login-foot{
  margin-top:16px;
  text-align:center;
  color:rgba(234,240,255,0.55);
  font-size:13px;
}

/* Mobile tweaks */
@media (max-width:520px){
  .login-card{ padding:22px 18px 18px; }
  .login-head h1{ font-size:26px; color:white;}
  .login-logo{ width:70px; }
}


.brand{cursor:default;}
.brand *{cursor:default;}

/* Login corner badge */
.corner-badge{
position:fixed;
left:22px;
top:18px;
display:flex;
align-items:center;
gap:12px;
padding:10px 14px;
border-radius:16px;
background:rgba(15,23,42,0.55);
border:1px solid rgba(148,163,184,0.16);
backdrop-filter:blur(10px);
-webkit-backdrop-filter:blur(10px);
box-shadow:0 10px 30px rgba(0,0,0,0.30);
z-index:60;
text-decoration:none;
}

.corner-badge img{
height:34px;
width:34px;
border-radius:10px;
object-fit:cover;
}
.corner-badge span{
font-family:'Poppins',sans-serif;
font-weight:700;
letter-spacing:0.2px;
color: var(--accent1);
}

/* Dashboard KPIs */
.kpi-grid{
display:grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap:16px;
margin: 18px 0 22px;
}
@media (max-width: 980px){
  .kpi-grid{grid-template-columns: 1fr;}
}
.kpi{
background:rgba(15,23,42,0.55);
border:1px solid rgba(255,255,255,0.08);
border-radius:18px;
padding:16px 18px;
box-shadow: 0 18px 40px rgba(0,0,0,0.35);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
.kpi-title{color:#94a3b8;font-size:13px;font-weight:600;margin-bottom:10px;}
.kpi-value{font-size:28px;font-weight:800;letter-spacing:-0.5px;}
.kpi-sub{color:#94a3b8;font-size:12px;margin-top:6px;}
.badge-up{color:#22c55e;}
.badge-down{color:#ef4444;}

/* Accounts permissions layout */
.permissions{
display:grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap:10px 18px;
margin-top:12px;
}
@media (max-width: 700px){
  .permissions{grid-template-columns: 1fr;}
}
.perm{
display:flex;
align-items:center;
justify-content:space-between;
gap:12px;
padding:12px 14px;
border-radius:14px;
background: rgba(15,23,42,0.35);
border:1px solid rgba(255,255,255,0.08);
}
.perm span{font-weight:600;color:#e2e8f0;}
.perm input[type="checkbox"]{width:18px;height:18px;accent-color:#2563eb;}

/* Service action pills */
.pill{
display:inline-flex;
align-items:center;
gap:8px;
padding:6px 10px;
border-radius:999px;
font-weight:700;
font-size:13px;
white-space:nowrap;
}
.pill-green{background:rgba(34,197,94,0.15);color:#22c55e;border:1px solid rgba(34,197,94,0.25);}
.pill-red{background:rgba(239,68,68,0.15);color:#ef4444;border:1px solid rgba(239,68,68,0.25);}


.btn-logout{
  background:#ef4444;
  padding:10px 16px;
  border-radius:12px;
  color:white;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  box-shadow:0 12px 30px rgba(0,0,0,0.35);
  transition:transform .15s ease, filter .15s ease, background .15s ease;
}
.btn-logout:hover{ background:#dc2626; transform:translateY(-1px); }

.btn-logout:hover{transform:translateY(-1px);filter:brightness(1.05);}

a{color:inherit;}

/* ===== THEME OVERRIDES v7 ===== */
.brand-text{
  font-family:'Rowdies', 'Poppins', sans-serif;
  font-weight:700;
  letter-spacing:0.3px;
  color:var(--accent1);
  text-shadow:0 6px 18px rgba(0,0,0,0.45);
}
.navbar{
  background:rgba(15,23,42,0.72);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(255,255,255,0.06);
}
.nav-center a{
  color:rgba(230,237,247,0.86);
  padding:10px 14px;
  border-radius:12px;
  text-decoration:none;
  transition:background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.nav-center a:hover{
  background:rgba(255,255,255,0.06);
  color:var(--text);
  transform:translateY(-1px);
}
.nav-center a.active{
  background:linear-gradient(135deg, var(--accent1), var(--accent2));
  color:#0b1220;
  box-shadow:0 14px 28px rgba(0,0,0,0.35);
}
.btn-logout{
  background:#ef4444;
  padding:10px 16px;
  border-radius:12px;
  color:white;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  box-shadow:0 12px 30px rgba(0,0,0,0.35);
  transition:transform .15s ease, filter .15s ease, background .15s ease;
}
.btn-logout:hover{ background:#dc2626; transform:translateY(-1px); }

.btn-logout:hover{ filter:brightness(1.05); }

.content-shell{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:22px;
  padding:26px;
  box-shadow:0 18px 60px rgba(0,0,0,0.55);
}

/* Dashboard tiles */
.tile{
  background:linear-gradient(180deg, rgba(15,23,42,0.62), rgba(15,23,42,0.42));
  border:1px solid var(--border);
}
.tile:hover{
  transform:translateY(-2px);
  border-color:rgba(255,194,74,0.35);
}
.tile-accent{
  background:linear-gradient(135deg, rgba(255,138,0,0.22), rgba(255,194,74,0.12));
  border-color:rgba(255,194,74,0.35);
}

/* Login headline color */

/* ===== Login (titre Connexion en blanc) ===== */
.login-card h1{
  color:#ffffff;
  font-family:'Poppins',sans-serif;
  font-weight:800;
}

/* ===== Dashboard (liens visibles) ===== */
.page-subtitle{
  color: rgba(230,237,247,0.78);
  margin-top: -28px;
  margin-bottom: 18px;
  font-size: 14px;
}

.dash-links{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:10px;
  max-width: 420px;
}

.dash-link{
  text-decoration:none;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(15,23,42,0.62), rgba(15,23,42,0.42));
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
  transition: transform .15s ease, border-color .15s ease, filter .15s ease;
}

.dash-link:hover{
  transform: translateY(-2px);
  border-color: rgba(255,194,74,0.35);
  filter: brightness(1.03);
}

.dash-link-title{
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
}

.dash-link-sub{
  margin-top: 4px;
  font-size: 13px;
  color: rgba(230,237,247,0.72);
}


/* === Dashboard section title === */
.section-title{font-size:18px;font-weight:800;margin:22px 0 12px;color:rgba(230,237,247,0.92);}


/* ================= DASHBOARD WIDGETS ================= */
.page-subtitle{
  margin-top:6px;
  color:rgba(226,232,240,0.75);
  max-width:900px;
}

.dash-grid-2{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:18px;
  margin-top:18px;
}

@media (max-width: 980px){
  .dash-grid-2{ grid-template-columns: 1fr; }
}

.dash-card{
  background: var(--panel);
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px 16px 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
  backdrop-filter: blur(10px);
}

.dash-card-title{
  font-weight:700;
  color:rgba(226,232,240,0.9);
  margin-bottom:10px;
}

.dash-hint{
  margin-top:10px;
  font-size:13px;
  color:rgba(226,232,240,0.65);
}

.dash-kpis{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  margin-top:4px;
}

.kpi{
  background: rgba(2,6,23,0.35);
  border:1px solid rgba(148,163,184,0.16);
  border-radius:14px;
  padding:12px 12px 10px;
}

.kpi-label{
  font-size:12px;
  color:rgba(226,232,240,0.7);
}

.kpi-value{
  margin-top:6px;
  font-size:26px;
  font-weight:800;
  letter-spacing:0.2px;
}

.mini-list{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:320px;
  overflow:auto;
  padding-right:4px;
}

.mini-row{
  display:flex;
  align-items:center;
  gap:10px;
  background: rgba(2,6,23,0.28);
  border:1px solid rgba(148,163,184,0.12);
  border-radius:14px;
  padding:10px 10px;
}

.mini-main{
  flex:1;
  font-weight:600;
  color:rgba(226,232,240,0.92);
}

.mini-muted{
  font-size:12px;
  color:rgba(226,232,240,0.55);
}

.mini-table{
  margin-top:12px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(148,163,184,0.12);
}

.mini-head{
  display:grid;
  grid-template-columns: 1fr 120px;
  gap:12px;
  padding:10px 12px;
  background: rgba(2,6,23,0.35);
  font-size:12px;
  letter-spacing:0.6px;
  text-transform:uppercase;
  color:rgba(226,232,240,0.7);
}

.mini-tr{
  display:grid;
  grid-template-columns: 1fr 120px;
  gap:12px;
  padding:10px 12px;
  background: rgba(15,23,42,0.30);
  border-top:1px solid rgba(148,163,184,0.10);
}

.mini-tr:nth-child(even){
  background: rgba(15,23,42,0.22);
}

.right{ text-align:right; }

.empty-state{
  margin-top:12px;
  padding:14px 14px;
  border-radius:14px;
  border:1px dashed rgba(148,163,184,0.22);
  color:rgba(226,232,240,0.7);
  background: rgba(2,6,23,0.20);
}

/* Dashboard charts */
.dash-chart{
  margin-top:14px;
  padding:16px;
  border-radius:16px;
  background:rgba(2,6,23,0.25);
  border:1px solid rgba(148,163,184,0.15);
  height: 280px;
}
.dash-chart--xl{ height: 340px; }
.dash-chart canvas{
  width:100% !important;
  height:100% !important;
}


/* ===== Accounts toggles & forms ===== */
.form-row{display:flex;gap:12px;flex-wrap:wrap}
.form-row input{flex:1;min-width:220px}
.table-wrap{overflow:auto;border-radius:14px}
.inline-form{margin:0}
.mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width: 900px){.mini-grid{grid-template-columns:1fr}}
.badge{display:inline-block;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700}
.badge.ok{background:rgba(46,204,113,.15);color:#2ecc71;border:1px solid rgba(46,204,113,.35)}
.badge.bad{background:rgba(231,76,60,.15);color:#e74c3c;border:1px solid rgba(231,76,60,.35)}
.badge.master{background:rgba(241,196,15,.15);color:#f1c40f;border:1px solid rgba(241,196,15,.35)}

.toggle{display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);padding:10px 12px;border-radius:12px}
.toggle.small{padding:7px 10px;border-radius:10px}
.toggle input{display:none}
.toggle .label{font-size:13px;color:#e8e8e8}
.toggle .slider{width:46px;height:26px;border-radius:999px;position:relative;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.14);transition:.2s}
.toggle.small .slider{width:42px;height:24px}
.toggle .slider:after{content:'';position:absolute;top:50%;left:4px;transform:translateY(-50%);width:20px;height:20px;border-radius:50%;background:#fff;transition:.2s}
.toggle.small .slider:after{width:18px;height:18px}
.toggle input:checked + .slider{background:rgba(46,204,113,.25);border-color:rgba(46,204,113,.35)}
.toggle input:checked + .slider:after{left:22px}
.toggle.small input:checked + .slider:after{left:20px}
.toggle input:disabled + .slider{opacity:.55;cursor:not-allowed}
.hint{margin-top:8px;font-size:12px;opacity:.8}


/* v19 accounts compact */

.accounts-table th, .accounts-table td{ padding: 12px 14px; }
.accounts-table td{ vertical-align: top; }
.account-editor{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 860px; }
.account-editor input[type="text"], .account-editor input[type="password"]{
  height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
}
.perms-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.perm-card{ padding: 10px 12px; border-radius: 14px; }
.perm-card .label{ font-size: 14px; }
.save-btn{ margin-top: 10px; padding: 10px 14px; border-radius: 12px; }
.actions-col{ white-space: nowrap; }
/* nice textarea (message blocks) */
.textarea-nice, textarea{
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
  color: rgba(255,255,255,.92);
  padding: 12px 14px;
  line-height: 1.35;
}
.textarea-nice:focus, textarea:focus{
  border-color: rgba(255, 170, 40, .55);
  box-shadow: 0 0 0 3px rgba(255, 170, 40, .12);
  outline: none;
}


/* Accounts page improvements */
.accounts-create-grid{
  display:flex;
  gap:18px;
  align-items:flex-start;
}
.accounts-create-grid .create-col{ flex: 1 1 520px; min-width: 420px; }
.accounts-create-grid .presence-col{ flex: 0 0 360px; }
@media (max-width: 1100px){
  .accounts-create-grid{ flex-direction: column; }
  .accounts-create-grid .presence-col{ width: 100%; flex: 1 1 auto; }
  .accounts-create-grid .create-col{ min-width: 0; width: 100%; }
}

.input-dark{
  width:100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
  padding: 10px 12px;
  border-radius: 12px;
  outline: none;
}
.input-dark::placeholder{ color: rgba(255,255,255,0.45); }
.input-dark:focus{
  border-color: rgba(255, 170, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 170, 0, 0.12);
}

.presence-card .presence-meta{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 6px;
  margin-bottom: 10px;
}
.presence-list{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.presence-pill{
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 13px;
}
.mini-table-wrap{
  max-height: 260px;
  overflow:auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.10);
}
.mini-table{
  width:100%;
  border-collapse: collapse;
}
.mini-table th, .mini-table td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
}
.mini-table th{
  color: rgba(255,255,255,0.75);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 12px;
  background: rgba(255,255,255,0.04);
  position: sticky;
  top:0;
}
.mini-table td.right, .mini-table th.right{ text-align: right; }

/* Make accounts list more compact */
.table-wrap .table th, .table-wrap .table td{
  padding-top: 14px;
  padding-bottom: 14px;
}
.table td .btn{ padding: 10px 14px; }

/* Switch: remove "white square" feel */
.switch input:checked + .slider{
  background: linear-gradient(135deg, #00C2A8 0%, #3BD16F 100%);
}
.slider:before{
  background: rgba(10,18,28,0.92);
  border: 1px solid rgba(255,255,255,0.18);
}
.switch input:checked + .slider:before{
  border-color: rgba(255,255,255,0.22);
}


/* Accounts page compact tweaks */
.users-table-compact td{padding:14px 16px;}
.users-table-compact .user-row td{vertical-align:top;}
.input-sm{height:38px;padding:10px 12px;border-radius:12px;font-size:14px;}
.input-dark.input-sm{background:rgba(15,23,42,.6);border:1px solid rgba(255,255,255,.12);color:#e5e7eb;}
.input-dark.input-sm::placeholder{color:rgba(229,231,235,.55);}

.toggle.small{transform:scale(.92);transform-origin:left center;}
.toggle.small .track{height:22px;width:44px;}
.toggle.small .thumb{width:18px;height:18px;left:3px;top:2px;}
.toggle.small input:checked + .track .thumb{transform:translateX(22px);}

.presence-list-compact{gap:10px;}
.presence-list-compact .presence-pill{padding:10px 12px;display:flex;justify-content:space-between;gap:10px;}
.presence-list-compact .presence-pill .u{font-weight:700;}
.presence-list-compact .presence-pill .t{opacity:.75;font-size:12px;white-space:nowrap;}

/* ============================
   Accounts stats grid (DB)
   ============================ */
.stats-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 1050px){
  .stats-grid{ grid-template-columns: 1fr; }
}

/* chips used in accounts stats */
.chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  font-weight: 800;
  font-size: 12px;
}

.chip-online{
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.18);
}

.chip-total{
  background: rgba(59,130,246,0.14);
  border-color: rgba(59,130,246,0.22);
}

.chip-user{ opacity: .95; }
.chip-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15,23,42,0.55);
  border: 1px solid rgba(255,255,255,0.14);
  font-weight: 900;
}

/* ============================
   Accounts layout upgrades
   ============================ */
.accounts-create-grid{
  display:grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  align-items: stretch;
}

@media (max-width: 1100px){
  .accounts-create-grid{ grid-template-columns: 1fr; }
}

.create-col, .presence-col{ height: 100%; }

/* Stack the 2 bubbles to match create form height */
.stats-stack{
  height: 100%;
  display:flex;
  flex-direction: column;
  gap: 18px;
}
.stats-stack .stats-card{
  flex: 1 1 0;
}

/* Cleaner bubbles like screen1 */
.stats-card{
  border-radius: 24px !important;
  padding: 22px 22px 18px 22px !important;
}
.stats-card h2{
  font-size: 34px;
  font-weight: 900;
  margin-bottom: 12px;
}
.stats-topline{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}
.statline{
  display:flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 900;
}
.statline #onlineCount{
  font-size: 36px;
}
.statline .unit{
  font-size: 15px;
  opacity: .85;
  font-weight: 800;
}
.stats-subtitle{
  margin-top: 16px;
  font-size: 24px;
  font-weight: 900;
}

/* chips styling (reuse existing palette) */
.chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.chips-online .chip{ background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.18); }
.chips-totals .chip{ background: rgba(59,130,246,0.14); border-color: rgba(59,130,246,0.22); }

/* Compact accordion user list */
.accounts-compact-table{ width:100%; border-collapse: separate; border-spacing:0; }
.accounts-compact-table thead th{
  font-size: 13px;
  letter-spacing: .8px;
}
.accounts-compact-table .acct-row td{
  padding: 14px 18px;
}
.accounts-compact-table .acct-name{
  font-weight: 900;
}
.accounts-compact-table .acct-row{
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.accounts-compact-table .acct-row:hover td{
  background: rgba(255,255,255,0.03);
}
.acct-details td{
  padding: 14px 18px 18px 18px;
  background: rgba(0,0,0,0.10);
}
.user-edit-form{
  display:flex;
  flex-direction: column;
  gap: 14px;
}
.edit-bars{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 900px){
  .edit-bars{ grid-template-columns: 1fr; }
}
.bar-input{
  height: 46px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(15,23,42,0.65);
  color: var(--text);
  font-weight: 800;
  outline: none;
}
.bar-input::placeholder{ opacity: .7; }
.bar-input:focus{
  border-color: rgba(255,138,0,0.35);
  box-shadow: 0 0 0 4px rgba(255,138,0,0.10);
}

.perm-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
@media (max-width: 980px){
  .perm-grid{ grid-template-columns: 1fr; }
}

.edit-actions{
  display:flex;
  align-items:center;
  gap: 12px;
  justify-content: flex-start;
}

.btn-manage{ background: rgba(255,255,255,0.06); }

/* ============================
   Switch (ensure consistent everywhere)
   ============================ */
.switch{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border-radius:14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}
.switch input{ display:none !important; }
.switch .label{
  font-weight:800;
  font-size:14px;
  color: var(--text);
}
.switch .slider{
  position:relative;
  width:44px;
  height:24px;
  border-radius:999px;
  background: rgba(255,255,255,0.12);
  border:1px solid rgba(255,255,255,0.14);
  flex:0 0 auto;
  transition: background .15s ease, border-color .15s ease;
}
.switch .slider:before{
  content:"";
  position:absolute;
  top:50%;
  left:4px;
  width:18px;
  height:18px;
  border-radius:999px;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  transition: transform .15s ease, background .15s ease;
}
.switch input:checked + .slider{
  background: rgba(34,197,94,0.20);
  border-color: rgba(34,197,94,0.28);
}
.switch input:checked + .slider:before{
  transform: translate(18px, -50%);
  background: rgba(255,255,255,0.95);
}
.switch input:disabled + .slider{
  opacity:.7;
}
.switch input:disabled ~ .label{
  opacity:.75;
}

/* ============================
   Smaller non-interactive stats bubbles
   ============================ */
.stats-stack{ gap: 14px; }
.stats-card{
  border-radius: 20px !important;
  padding: 16px 16px 14px 16px !important;
  cursor: default !important;
  transition: none !important;
}
.stats-card *{
  cursor: default !important;
}
/* prevent any card hover effects from global styles */
.stats-card:hover{
  transform: none !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.25) !important;
}
.stats-card h2{ font-size: 28px !important; margin-bottom: 10px !important; }
.statline #onlineCount{ font-size: 30px !important; }
.stats-subtitle{ font-size: 20px !important; }

/* chips should not look clickable */
.chip, .login-badge, .user-badge, .chip *{
  pointer-events: none !important;
}

.perm-grid{
  margin-top: 2px;
}
.perm-grid .switch{
  padding: 12px 14px;
}
