/* Capa final de estilo: compacta, verde-azul oscura y sin espacios entre botones */

.sidebar{
  background:linear-gradient(180deg,#10221d 0%,#12362f 55%,#15423b 100%) !important;
}

.sidebar nav{
  gap:0 !important;
}

.sidebar nav>small,
.sidebar .sidebar-group{
  margin:8px 0 0 !important;
  padding:9px 12px !important;
  border-left-color:#4fd08a !important;
  background:linear-gradient(180deg,#17382d,#132f27) !important;
  color:#eaf7ee !important;
}

.sidebar nav>small + a,
.sidebar .sidebar-group + a{
  margin-top:-1px !important;
}

.sidebar nav a,
.sidebar-bottom a{
  margin:0 !important;
  min-height:38px !important;
  padding:8px 10px !important;
  border-radius:0 !important;
  background:#1b6548 !important;
  border-top:1px solid rgba(255,255,255,.06) !important;
  border-bottom:1px solid rgba(6,18,12,.28) !important;
  border-left:0 !important;
  border-right:0 !important;
}

.sidebar nav a + a{
  margin-top:-1px !important;
}

.sidebar nav a:hover,
.sidebar-bottom a:hover{
  background:#1d6f86 !important;
}

.sidebar nav a.active{
  background:#1d57d6 !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 8px 18px rgba(29,87,214,.22) !important;
}

.sidebar nav a:first-of-type{
  border-top-left-radius:10px !important;
  border-top-right-radius:10px !important;
}

.sidebar nav a:last-of-type{
  border-bottom-left-radius:10px !important;
  border-bottom-right-radius:10px !important;
}

.sidebar-bottom a{
  border-bottom-left-radius:10px !important;
  border-bottom-right-radius:10px !important;
}

.sidebar-bottom{
  text-align:left !important;
}

.sidebar-bottom small{
  display:block !important;
  width:100% !important;
  text-align:left !important;
  padding-left:2px !important;
}

.sidebar nav a .nav-icon,
.sidebar-bottom a .nav-icon{
  width:22px !important;
  height:22px !important;
  border-radius:6px !important;
  background:rgba(255,255,255,.1) !important;
}

.sidebar nav a.active .nav-icon{
  background:rgba(255,255,255,.18) !important;
}

.welcome,
.page-heading,
.upload-panel>header,
.results-header,
.user-form h2{
  background:linear-gradient(105deg,#123d63 0%,#155d5d 55%,#18493a 100%) !important;
}

.section-title{
  color:#174b49 !important;
}

.section-title:before{
  background:#1a6a62 !important;
}

.upload-panel>header strong,
.results-header h2,
.user-form h2,
.topbar-left strong,
.downloads-heading h3,
.table-panel th{
  color:#f7fbff !important;
}

.user-form h2{
  font-size:13px !important;
  font-weight:800 !important;
  letter-spacing:.02em !important;
  text-transform:none !important;
}

.table-panel th{
  font-size:13px !important;
  font-weight:800 !important;
  letter-spacing:.02em !important;
  text-transform:none !important;
  padding:14px 13px !important;
}

.pill{
  background:#e8f4f2 !important;
  color:#155d5a !important;
  border-color:#cfe5e2 !important;
}

.topbar{
  background:#fff !important;
  border-bottom:1px solid #dfe7e4 !important;
}

.topbar-left strong{
  color:#16392b !important;
  background:transparent !important;
  font-size:15px !important;
  font-weight:800 !important;
}

/* Usuarios: distribución fluida para monitores medianos y grandes */
.users-admin-grid{
  grid-template-columns:1fr !important;
  min-width:0;
}

.users-admin-grid>*{
  min-width:0;
}

.users-table-panel{
  width:100%;
  max-width:100%;
  overflow-x:auto !important;
}

.users-table-panel table{
  width:100%;
  table-layout:fixed;
}

.users-table-panel th:nth-child(1){width:15%}
.users-table-panel th:nth-child(2){width:28%}
.users-table-panel th:nth-child(3){width:11%}
.users-table-panel th:nth-child(4){width:16%}
.users-table-panel th:nth-child(5){width:30%}
.expiry-note{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.expiry-note form{margin:0}
.clean-tables-button{padding:8px 13px;background:#fff;color:#a32323;border:1px solid #e7b7b7}
.clean-tables-button:hover{background:#fff0f0;border-color:#d98f8f}

#generateButton{
  min-height:44px !important;
  border-radius:9px !important;
  letter-spacing:.01em !important;
  transition:transform .18s ease,box-shadow .2s ease,background .2s ease,filter .2s ease !important;
}

#generateButton.disabled,
#generateButton:disabled{
  background:linear-gradient(105deg,#1f5f55 0%,#2b7b70 48%,#1d5f8f 100%) !important;
  color:#f8fffd !important;
  border:1px solid rgba(255,255,255,.16) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 14px 28px -22px rgba(15,71,72,.75) !important;
  opacity:1 !important;
  cursor:not-allowed !important;
}

#generateButton.primary:not(:disabled){
  background:linear-gradient(105deg,#0b5f56 0%,#0f8a7d 46%,#1d4ed8 100%) !important;
  color:#fff !important;
  border:0 !important;
  box-shadow:0 15px 30px -18px rgba(15,118,110,.7),0 10px 24px -18px rgba(29,87,214,.65) !important;
}

#generateButton.primary:not(:disabled):hover{
  background:linear-gradient(105deg,#0b625d 0%,#0f7f75 46%,#1e4fc1 100%) !important;
  transform:translateY(-2px) !important;
  box-shadow:0 18px 34px -18px rgba(15,118,110,.8),0 12px 28px -18px rgba(29,87,214,.75) !important;
}

.users-table-panel td{
  overflow-wrap:anywhere;
  vertical-align:top;
}

.users-table-panel .button{
  padding:8px 10px;
  white-space:nowrap;
}

.users-actions,
.user-form-actions{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}

.users-actions form{
  margin:0;
}

.user-form input::placeholder,
.user-form textarea::placeholder{
  color:#9aa8b8 !important;
  opacity:.55 !important;
  font-weight:500 !important;
}

.status-inactive{
  background:#f4e8e8 !important;
  border-color:#e7caca !important;
  color:#9b3434 !important;
}

.admin-protected{
  display:inline-block;
  padding:6px 9px;
  border-radius:999px;
  background:#eef2f5;
  color:#667783;
  font-size:10px;
  font-weight:800;
}

.app-confirm-overlay{
  position:fixed;
  inset:0;
  z-index:9999;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(3px);
}

.app-confirm-dialog{
  width:min(440px,100%);
  display:flex;
  gap:16px;
  padding:22px;
  border-radius:16px;
  background:#fff;
  border:1px solid #e2e8f0;
  box-shadow:0 24px 70px -28px rgba(15,23,42,.55);
}

.app-confirm-icon{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#ecfdf5;
  color:#059669;
  font-size:22px;
  font-weight:900;
}

.app-confirm-icon.is-danger{
  background:#fef2f2;
  color:#dc2626;
}

.app-confirm-content{
  min-width:0;
  flex:1;
}

.app-confirm-content h3{
  margin:0 0 6px;
  color:#0f172a;
  font-size:18px;
  line-height:1.2;
}

.app-confirm-content p{
  margin:0;
  color:#64748b;
  font-size:13px;
  font-weight:600;
}

.app-confirm-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:20px;
}

.app-confirm-actions .button{
  padding:10px 18px;
  border-radius:10px;
  font-size:13px;
}

.app-confirm-accept.is-danger{
  background:#dc2626 !important;
  color:#fff !important;
}

.app-confirm-accept.is-danger:hover{
  background:#b91c1c !important;
}

@media(min-width:1700px){
  .content{
    width:min(1500px,calc(100% - 48px)) !important;
  }

  .users-admin-grid{
    grid-template-columns:minmax(300px,340px) minmax(0,1fr) !important;
  }
}

@media(max-width:900px){
  .users-table-panel table{
    min-width:850px;
  }
}
