/* Basic responsive styles for GestFit */
:root{
  --bg:#f4f7fb;
  --card:#ffffff;
  --primary:#0d6efd;
  --muted:#6c757d;
  --danger:#dc3545;
  --radius:8px;
  --max-width:420px;
  --gap:16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background:linear-gradient(180deg,var(--bg),#eef3fb);
  color:#222;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.login-container{
  width:100%;
  max-width:var(--max-width);
  margin:6vh auto;
  padding:28px;
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:0 6px 24px rgba(20,30,60,0.08);
  text-align:center;
}

.login-container h1{margin:0 0 18px;font-size:22px}
.login-logo{display:block;margin:0 auto 14px;width:96px;height:auto}
.login-container input[type="text"],
.login-container input[type="password"],
.login-container textarea, select, .form-control{
  width:100%;
  padding:10px 12px;
  margin-bottom:12px;
  border:1px solid #e4e8ef;
  border-radius:6px;
  font-size:15px;
  background:#fff;
}

.login-container button{
  width:100%;
  padding:10px 14px;
  background:var(--primary);
  color:#fff;
  border:none;
  border-radius:6px;
  font-weight:600;
  cursor:pointer;
}
.login-container button:hover{filter:brightness(0.95)}

.error{color:var(--danger);margin-top:8px;font-size:14px}

/* vehicles/check.php form layout */
body > h2{max-width:900px;margin:28px auto 8px;padding:0 18px;font-size:20px}
form{max-width:900px;margin:0 auto;background:transparent;padding:18px}
form label{display:block;margin-top:8px;font-weight:600;color:var(--muted)}
form select{max-width:320px}

.radio-group{display:flex;gap:12px;align-items:center;margin:6px 0}
.radio-group label{font-weight:500}

.file-input{margin-top:8px}
.file-input input[type=file]{display:block}

textarea[name="commentaire"]{min-height:100px}

/* Small helpers */
.muted{color:var(--muted);font-size:13px}
.hr{height:1px;background:#eef2f7;margin:12px 0;border-radius:2px}

@media (min-width:900px){
  .login-container{margin-top:12vh}
  form{display:block;padding:24px}
}

/* Accessibility focus */
input:focus, select:focus, textarea:focus, button:focus{
  outline:3px solid rgba(13,110,253,0.12);
  outline-offset:2px;
}

/* simple file preview area */
.preview{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.preview img{width:96px;height:64px;object-fit:cover;border-radius:6px;border:1px solid #e6ebf5}

/* Dashboard visuals */
.badge{display:inline-block;padding:6px 8px;border-radius:8px;font-weight:800;color:#fff}
.badge-warning{background:#f59e0b}
.badge-danger{background:#dc3545}
.status-dot{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:8px;vertical-align:middle;box-shadow:0 1px 2px rgba(0,0,0,0.06)}
.status-dot.ok{background:linear-gradient(90deg,#2ecc71,#28a745)}
.status-dot.late{background:linear-gradient(90deg,#ff6b6b,#dc3545)}
.status-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-weight:800;color:#fff}
.status-pill.ok{background:linear-gradient(90deg,#2ecc71,#28a745)}
.status-pill.late{background:linear-gradient(90deg,#ff6b6b,#dc3545)}

.vehicle-row:hover{background:rgba(13,110,253,0.04)}
.progress{background:#eef3fb;border-radius:8px;height:10px;overflow:hidden;border:1px solid #e6edf5}
.progress-bar{height:100%;background:linear-gradient(90deg,#2a7cff,#0d6efd);width:0}
.summary-card h3{font-size:16px;margin-bottom:6px}
.summary-card ul{max-height:320px;overflow:auto}

/* Admin dashboard layout */
/* layout: left-aligned container to match screenshot */
.admin-container{width:100%;max-width:none;margin:24px 0;padding:0 18px;display:flex;gap:24px;align-items:flex-start}
/* sidebar as vertical left column */
.admin-sidebar{width:260px;flex:0 0 260px;background:var(--card);padding:18px;border-radius:var(--radius);box-shadow:0 6px 18px rgba(20,30,60,0.06);display:flex;flex-direction:column;justify-content:space-between;min-height:calc(100vh - 80px)}
.admin-main{flex:1 1 auto;background:transparent;padding-left:24px;padding-right:24px;min-width:0}
.admin-sidebar h2{font-size:20px;margin:0 0 12px;color:#111}

/* Menu links as pill buttons */
.menu-list{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
.menu-link{display:block;padding:10px 12px;border-radius:8px;border:1px solid transparent;background:transparent;color:var(--muted);text-decoration:none;font-weight:700;font-size:15px;text-align:left}
.menu-link:hover{background:#f4f7fb;color:var(--primary);border-color:#e6edf9}
.menu-link.primary{background:linear-gradient(90deg,var(--primary),#2a7cff);color:#fff;border-color:transparent}

.admin-main h1{font-size:36px;margin:6px 0 18px;font-weight:800}
.admin-main p{color:var(--muted);margin-bottom:12px}

/* user box at bottom of sidebar */
.sidebar-bottom{margin-top:12px}
.user-box{display:block;padding:12px;border:1px solid #e6edf9;border-radius:8px;background:#fff;color:#111;text-decoration:none;font-weight:700}
.user-box .small{display:block;color:var(--muted);font-size:13px;margin-top:6px;font-weight:500}

@media (max-width:900px){
  .admin-container{flex-direction:column;padding:12px;margin-left:12px}
  .admin-sidebar{width:100%;display:flex;flex-direction:row;gap:8px;align-items:center;flex-wrap:wrap}
  .menu-list{flex-direction:row}
  .admin-main{padding-top:12px}
}

/* Force vertical admin sidebar (override mobile breakpoint when needed) */
/* Use !important to ensure the desktop vertical menu stays even if viewport rules apply */
.admin-container{flex-direction:row !important}
.admin-sidebar{width:260px !important;display:flex !important;flex-direction:column !important;align-items:stretch !important;flex-wrap:nowrap !important}
.menu-list{flex-direction:column !important}
.admin-main{padding-left:24px !important}
.sidebar-bottom{margin-top:auto !important}

/* Keep ability to collapse on very small devices (override less specific force rules) */
@media (max-width:420px){
  .admin-container{flex-direction:column !important}
  .admin-sidebar{width:100% !important;flex-direction:row !important;flex-wrap:wrap !important}
  .menu-list{flex-direction:row !important}
  .admin-main{padding-left:0 !important}
}

/* User form styles inside admin area */
.admin-main .user-form{
  width:100%;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  background:var(--card);
  padding:18px;
  border-radius:10px;
  box-shadow:0 8px 22px rgba(20,30,60,0.06);
  margin:0 0 18px 0;
}
.admin-main .user-form .field{display:flex;flex-direction:column}
.admin-main .user-form .field.full{grid-column:1 / -1}
.admin-main .user-form label{font-weight:700;margin-bottom:8px;color:var(--muted);font-size:14px}
.admin-main .user-form input,.admin-main .user-form select,.admin-main .user-form textarea{padding:12px 16px;border:1px solid #e6edf9;border-radius:10px;background:var(--card);font-size:16px;box-shadow:inset 0 1px 0 rgba(255,255,255,0.6)}
.admin-main .user-form .form-actions{display:flex;gap:12px;align-items:center}
.admin-main .user-form .form-actions.full{grid-column:1 / -1}
.btn-primary{background:linear-gradient(90deg,var(--primary),#2a7cff);color:#fff;border:none;padding:12px 18px;border-radius:10px;font-weight:800;cursor:pointer;font-size:15px}
.btn-primary:hover{filter:brightness(0.95)}
.cancel-link{color:var(--primary);text-decoration:underline}

@media (max-width:900px){
  .admin-main .user-form{grid-template-columns:1fr}
}

/* form niceties */
.user-form .required{color:#dc3545;margin-left:6px;font-weight:700}
.password-row{display:flex;gap:10px;align-items:center}
.password-row input{flex:1;padding:12px 14px}
.password-toggle{background:#f1f5fb;border:1px solid #e6edf5;padding:10px 12px;border-radius:10px;cursor:pointer;font-weight:700}
.strength{height:8px;background:#eef7fc;border-radius:6px;margin-top:10px;overflow:hidden}
.strength-bar{height:100%;width:0;background:#dc3545;transition:width .18s ease, background .18s ease;box-shadow:inset 0 -1px 0 rgba(255,255,255,0.2)}
.user-form small.muted{display:block;margin-top:6px}
/* Fallback: if page doesn't include admin-container/admin-sidebar, render the menu as a fixed left column */
@media (min-width:900px){
  body .menu-list:not(.in-sidebar){
    position:fixed !important;
    left:18px !important;
    top:18px !important;
    width:260px !important;
    padding:18px !important;
    background:var(--card) !important;
    border-radius:var(--radius) !important;
    box-shadow:0 6px 18px rgba(20,30,60,0.06) !important;
    display:flex !important;
    flex-direction:column !important;
    gap:10px !important;
    z-index:50 !important;
  }
  /* fallback removed: prevent extra left margin when admin layout is present */
}

/* Extra fallback: menu links placed directly under body (no wrapper) */
@media (min-width:900px){
  body > .menu-link{display:block !important;position:fixed !important;left:18px !important;top:18px !important;width:260px !important;padding:10px 12px !important;border-radius:8px !important;background:var(--card) !important;box-shadow:0 6px 18px rgba(20,30,60,0.06) !important;z-index:60 !important;color:var(--muted) !important;text-align:left !important}
  body > .menu-link.primary{background:linear-gradient(90deg,var(--primary),#2a7cff) !important;color:#fff !important}
  /* stack subsequent links below the first */
  body > .menu-link + .menu-link{top:64px !important}
  body > .menu-link + .menu-link + .menu-link{top:112px !important}
  body > .menu-link + .menu-link + .menu-link + .menu-link{top:160px !important}
  /* fallback removed: prevent extra left margin when admin layout is present */

/* Ensure tables and lists inside admin-main expand to available width */
.admin-main table{width:100%;max-width:100%;box-shadow:none}
.admin-main .user-form, .admin-main table, .admin-main > *{margin-left:0}

/* Product card grid */
.top-actions{display:flex;gap:12px;align-items:center;margin:18px 0}
.btn-create{background:#28a745;color:#fff;padding:10px 16px;border-radius:8px;font-weight:700;text-decoration:none;display:inline-block}
.search-bar{display:flex;gap:8px;align-items:center;margin:12px 0}
.search-bar input[type=text]{padding:10px 12px;border-radius:8px;border:1px solid #e6edf5;min-width:360px}

/* ── Panneau de filtres stock ── */
.stock-filter-panel{background:#fff;border:1px solid #e6edf5;border-radius:12px;padding:16px 20px;margin-bottom:18px;box-shadow:0 2px 8px rgba(20,30,60,0.05)}
.stock-filter-row{display:flex;gap:16px;flex-wrap:wrap;align-items:flex-end}
.stock-filter-group{display:flex;flex-direction:column;gap:4px;min-width:180px}
.stock-filter-label{font-size:12px;font-weight:700;color:#888;text-transform:uppercase;letter-spacing:.5px}
.stock-select{padding:8px 12px;border-radius:8px;border:1px solid #dde3ef;background:#f8fafc;font-size:14px;color:#333;cursor:pointer;min-width:180px}
.stock-select:focus{outline:none;border-color:#0d6efd;box-shadow:0 0 0 3px rgba(13,110,253,.12)}
.stock-search-input{padding:8px 12px;border-radius:8px;border:1px solid #dde3ef;font-size:14px;flex:1;min-width:160px}
.stock-search-input:focus{outline:none;border-color:#0d6efd;box-shadow:0 0 0 3px rgba(13,110,253,.12)}

/* Sous-stock pills */
.substock-pill-list{display:flex;flex-wrap:wrap;gap:6px}
.substock-bar{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.substock-group-row{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:4px}
.substock-pill{display:inline-flex;align-items:center;gap:4px;padding:5px 12px;border-radius:20px;border:1.5px solid #dde3ef;background:#f8fafc;color:#444;text-decoration:none;font-size:13px;font-weight:600;transition:all .15s ease;white-space:nowrap}
.substock-pill:hover{border-color:#0d6efd;color:#0d6efd;background:#eef4ff}
.substock-pill.active{background:#0d6efd;border-color:#0d6efd;color:#fff;box-shadow:0 2px 8px rgba(13,110,253,.25)}

/* Boutons de groupe (sur la même ligne) */
.substock-group-toggle{display:inline-flex;align-items:center;gap:6px;padding:5px 12px 5px 10px;border-radius:20px;border:1.5px solid #dde3ef;background:#f8fafc;color:#555;font-size:13px;font-weight:700;cursor:pointer;transition:all .15s ease;white-space:nowrap;line-height:1}
.substock-group-toggle:hover{border-color:#0d6efd;color:#0d6efd;background:#eef4ff}
.substock-group-toggle.active{background:#e8f0fe;border-color:#0d6efd;color:#0d6efd}
.substock-group-toggle.active .substock-group-arrow{transform:rotate(90deg)}
.substock-group-arrow{font-size:10px;transition:transform .2s ease;display:inline-block}
.substock-group-count{background:#dde3ef;color:#666;border-radius:10px;padding:1px 7px;font-size:11px;font-weight:700}
.substock-group-toggle.active .substock-group-count{background:#c7d9fd;color:#0d6efd}

/* Panel de pills (affiché en dessous de la barre) */
.substock-group-panel{display:flex;flex-wrap:wrap;gap:6px;padding:10px 12px;margin-top:8px;background:#f0f5ff;border-radius:10px;border:1.5px solid #d0e1fd}
.substock-group-panel-label{font-size:12px;font-weight:700;color:#0d6efd;width:100%;margin-bottom:4px;text-transform:uppercase;letter-spacing:.4px}

/* Lot cards */
.lots-grid{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}
.lot-card{background:#fff;border:1px solid #e6edf5;border-radius:12px;padding:14px 16px;min-width:180px;flex:0 0 auto;box-shadow:0 2px 10px rgba(20,30,60,0.05)}
.lot-card--expired{border-color:#ffd0d0;background:#fff8f8}
.lot-card__top{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;gap:8px}
.lot-card__num{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;font-weight:700;color:#1a2a4a;letter-spacing:.5px;word-break:break-all}
.lot-badge{font-size:10px;font-weight:700;padding:3px 9px;border-radius:20px;text-transform:uppercase;letter-spacing:.3px;white-space:nowrap;flex-shrink:0}
.lot-badge--ok{background:#e6ffed;color:#0d7030}
.lot-badge--expired{background:#ffebee;color:#d1242f}
.lot-card__row{display:flex;justify-content:space-between;align-items:flex-end}
.lot-card__label{font-size:11px;color:#8a9bb0;display:block;margin-bottom:2px;font-weight:500}
.lot-card__value{font-size:13px;color:#3a4a6a;font-weight:600}
.lot-card__qty{text-align:right}
.lot-card__qty-num{display:block;font-size:28px;font-weight:800;color:#1e3a5f;line-height:1}
.lot-card__qty-unit{font-size:11px;color:#8a9bb0}

/* Legacy (conservé pour compatibilité) */
.category-filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.category-filters a{padding:8px 10px;border-radius:8px;background:#fff;border:1px solid #e6edf5;color:#0d6efd;text-decoration:none;font-weight:600}
.category-filters a.active{background:#0d6efd;color:#fff}
.substock-filters{margin-top:8px}
.substock-filters .substock-btn{padding:8px 10px;border-radius:8px;background:#fff;border:1px solid #e6edf5;color:#0d6efd;text-decoration:none;font-weight:700}
.substock-filters .substock-btn.active{background:#0d6efd;color:#fff}

.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:18px;margin-top:18px}
.product-card{background:var(--card);padding:18px;border-radius:12px;box-shadow:0 8px 28px rgba(20,30,60,0.06);display:flex;flex-direction:column;align-items:stretch}
.product-card img{width:100%;height:160px;object-fit:contain;border-radius:8px;background:#fff;border:1px solid #eef3fb}
.product-card .title{font-weight:800;color:#0b2b4a;margin:12px 0 8px}
.product-card .meta{color:var(--muted);font-size:14px;margin-bottom:8px}
.product-card .stock{font-weight:800;margin-top:auto}
.product-card .card-actions{display:flex;gap:8px;margin-top:12px}
.product-card .btn{padding:8px 12px;border-radius:8px;text-decoration:none;font-weight:700}
.btn-primary.small{background:linear-gradient(90deg,var(--primary),#2a7cff);color:#fff}
.btn-outline{background:transparent;border:1px solid #e6edf5;color:var(--primary)}

/* Product view (hero) styles */
.summary-cards{display:flex;gap:12px;margin:8px 0 20px}
.summary-card{flex:1;padding:14px;border-radius:10px;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:0 8px 22px rgba(20,30,60,0.04);display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.summary-card .label{font-weight:700;color:var(--muted)}
.summary-card .value{font-weight:900;font-size:20px;color:#0b2b4a}

.product-hero{display:flex;gap:18px;align-items:flex-start;background:var(--card);padding:22px;border-radius:12px;box-shadow:0 10px 30px rgba(20,30,60,0.06);margin-bottom:18px}
.product-hero .hero-image{flex:0 0 260px}
.product-hero .hero-image img{width:260px;height:200px;object-fit:contain;border-radius:8px;border:1px solid #eef3fb;background:#fff}
.product-hero .hero-body{flex:1;min-width:0}
.product-hero .hero-title{font-size:28px;font-weight:900;color:#0b2b4a;margin:0 0 8px}
.product-hero .hero-meta{color:var(--muted);margin-bottom:8px}
.product-hero .hero-stats{display:flex;gap:24px;margin-top:8px}
.product-hero .hero-stats strong{font-weight:900}

.action-buttons{display:flex;flex-direction:column;gap:10px;align-items:flex-end}
.action-buttons .btn{min-width:120px}
.btn-edit{background:#0d6efd;color:#fff}
  .btn-delete{background:#dc3545;color:#fff}
  /* Red variant for links/buttons that should appear as destructive actions */
  .btn-red{background:#dc3545;color:#fff}
.btn-green{background:#28a745;color:#fff}
.btn-orange{background:#f59e0b;color:#fff}
.btn-blue{background:#0d6efd;color:#fff}

/* Ensure button-like links do not show underline and have consistent padding */
.btn, .btn-create, .btn-green, .btn-blue, .btn-orange, .btn-edit, .btn-delete, .btn-entry, .btn-exit, .btn-primary, .btn-outline {
  text-decoration: none !important;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
}
.btn-outline{background:transparent;border:1px solid #e6edf5;color:var(--primary)}
.btn-entry, .btn-exit{padding:6px 10px}

/* Lots table niceties */
.lots-table{margin-top:18px;background:transparent}
.lots-table table{width:100%;border-collapse:collapse}
.lots-table th,.lots-table td{padding:10px;border-bottom:1px solid #eef3f9;text-align:left}
.lots-table .btn-entry{background:#28a745;color:#fff;padding:6px 10px;border-radius:6px;text-decoration:none}
.lots-table .btn-exit{background:#dc3545;color:#fff;padding:6px 10px;border-radius:6px;text-decoration:none}
.status-ok{color:#28a745;font-weight:700}
.status-expired{color:#dc3545;font-weight:900}

@media (max-width:900px){
  .product-hero{flex-direction:column;align-items:stretch}
  .product-hero .hero-image{width:100%;flex:0 0 auto}
  .action-buttons{flex-direction:row;justify-content:flex-start}
}

/* ========== USERS PAGE STYLES ========== */
.users-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin-bottom:28px;
  padding-bottom:20px;
  border-bottom:2px solid #f0f4f9;
}

.users-header h1{
  margin:0;
  font-size:32px;
  font-weight:800;
  color:#0b2b4a;
}

.subtitle{
  margin:6px 0 0;
  color:var(--muted);
  font-size:15px;
}

.btn-create{
  background:linear-gradient(90deg, #28a745, #20c997);
  color:#fff;
  padding:12px 20px;
  border-radius:10px;
  font-weight:700;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
  box-shadow:0 4px 12px rgba(40, 167, 69, 0.2);
  transition:all 0.2s ease;
}

.btn-create:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 16px rgba(40, 167, 69, 0.3);
  filter:brightness(1.05);
}

.alert{
  padding:16px 18px;
  border-radius:10px;
  margin-bottom:20px;
  font-weight:600;
  border-left:4px solid;
}

.alert-danger{
  background:#fff5f5;
  color:#c41e3a;
  border-left-color:#dc3545;
}

.alert-success{
  background:#f0fdf4;
  color:#065f46;
  border-left-color:#28a745;
}

.users-grid{
  background:var(--card);
  border-radius:12px;
  box-shadow:0 8px 24px rgba(20, 30, 60, 0.08);
  overflow:hidden;
}

.search-box{
  padding:20px;
  border-bottom:1px solid #f0f4f9;
  background:#fafbfc;
}

.search-input{
  width:100%;
  max-width:400px;
  padding:12px 16px;
  font-size:15px;
  border:2px solid #e6edf9;
  border-radius:10px;
  background:#fff;
  transition:all 0.2s ease;
}

.search-input:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(13, 110, 253, 0.1);
}

.table-responsive{
  overflow-x:auto;
}

.users-table{
  width:100%;
  border-collapse:collapse;
  background:var(--card);
}

.users-table thead{
  background:#f8fafc;
  border-bottom:2px solid #e6edf9;
}

.users-table th{
  padding:8px 10px;
  text-align:left;
  font-weight:700;
  color:#0b2b4a;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:0.5px;
}

.user-row{
  border-bottom:1px solid #f0f4f9;
  transition:background-color 0.15s ease;
}

.user-row:hover{
  background:#f8fafc;
}

.user-row:last-child{
  border-bottom:none;
}

.users-table td{
  padding:8px 10px;
  vertical-align:middle;
  font-size:13px;
}

.user-info{
  display:flex;
  align-items:center;
  gap:6px;
}

.user-avatar{
  width:28px;
  height:28px;
  border-radius:6px;
  background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:10px;
  flex-shrink:0;
}

.user-details{
  display:flex;
  flex-direction:column;
  gap:1px;
}

.user-name{
  font-weight:700;
  color:#0b2b4a;
  font-size:12px;
}

.user-id{
  font-size:10px;
  color:var(--muted);
}

.email-badge,
.vehicle-badge,
.empty-badge{
  display:inline-block;
  padding:3px 6px;
  border-radius:4px;
  font-size:11px;
  font-weight:600;
}

.email-badge{
  background:#e7f1ff;
  color:#0d6efd;
}

.vehicle-badge{
  background:#e8f5e9;
  color:#2e7d32;
}

.empty-badge{
  color:var(--muted);
  font-style:italic;
}

.role-badge{
  display:inline-flex;
  align-items:center;
  gap:3px;
  padding:3px 6px;
  border-radius:4px;
  font-weight:600;
  font-size:11px;
  white-space:nowrap;
}

.role-admin{
  background:#fff3cd;
  color:#856404;
}

.role-responsable{
  background:#cfe2ff;
  color:#084298;
}

.role-user{
  background:#e8e9ea;
  color:#383d41;
}

.role-blocked{
  background:#ffebee;
  color:#c41e3a;
}

/* Checkbox styles */
.checkbox-label{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:600;
  cursor:pointer;
  margin-bottom:8px;
}

.checkbox-label input[type="checkbox"]{
  width:18px;
  height:18px;
  cursor:pointer;
  accent-color:var(--primary);
}

.action-buttons{
  display:flex;
  gap:2px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
  flex-direction:row;
  min-width:fit-content;
}

.btn-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 6px;
  border-radius:4px;
  border:1px solid;
  cursor:pointer;
  text-decoration:none;
  font-size:10px;
  font-weight:600;
  transition:all 0.2s ease;
  white-space:nowrap;
  flex-shrink:0;
  background:none;
  font-family:inherit;
}

.btn-action.btn-edit{
  background:#e7f1ff;
  color:#0d6efd;
  border-color:#0d6efd;
}

.btn-action.btn-edit:hover{
  background:#0d6efd;
  color:#fff;
}

.btn-action.btn-block{
  background:#fff3cd;
  color:#856404;
  border-color:#856404;
}

.btn-action.btn-block:hover{
  background:#856404;
  color:#fff;
}

.btn-action.btn-delete{
  background:#ffe7e7;
  color:#dc3545;
  border-color:#dc3545;
}

.btn-action.btn-delete:hover{
  background:#dc3545;
  color:#fff;
}

.empty-state{
  padding:60px 40px;
  text-align:center;
  background:linear-gradient(135deg, #f5f7fa 0%, #f8fafc 100%);
  border-radius:12px;
}

.empty-icon{
  font-size:64px;
  margin-bottom:16px;
}

.empty-state h3{
  font-size:22px;
  font-weight:800;
  color:#0b2b4a;
  margin:0 0 8px;
}

.empty-state p{
  color:var(--muted);
  margin:0 0 20px;
  font-size:15px;
}

@media (max-width:900px){
  .users-header{
    flex-direction:column;
    align-items:stretch;
  }
  
  .btn-create{
    justify-content:center;
    width:100%;
  }
  
  .search-input{
    max-width:100%;
  }
  
  .users-table{
    font-size:14px;
  }
  
  .users-table th,
  .users-table td{
    padding:12px 14px;
  }
  
  .user-info{
    gap:10px;
  }
  
  .user-avatar{
    width:36px;
    height:36px;
    font-size:12px;
  }
  
  .action-buttons{
    gap:6px;
  }
  
  .btn-action{
    width:32px;
    height:32px;
    font-size:14px;
  }
}

@media (max-width:900px){
  .search-bar input[type=text]{min-width:100%}
}

/* Modal styles */
.modal{position:fixed;left:0;top:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;z-index:120}
.modal-backdrop{position:absolute;left:0;top:0;width:100%;height:100%;background:rgba(10,20,40,0.45)}
.modal-panel{position:relative;background:var(--card);padding:18px;border-radius:10px;box-shadow:0 18px 60px rgba(20,30,60,0.2);max-width:820px;width:100%;z-index:121}
.modal-panel h3{margin-top:0}
.modal-panel input,.modal-panel select{width:100%;padding:10px 12px;border:1px solid #e6edf9;border-radius:8px;margin-top:6px}

