:root{
  --primary:#E96B08;
  --primary-700:#c85a07;

  /* Ancho oficial desktop (igual a /tickets) */
  --page-max:1100px;

  --bg:#ffffff;
  --text:#0b0b0b;
  --muted:#5f6368;
  --border: rgba(0,0,0,.12);
  --surface:#ffffff;

  --radius:16px;
  --radius-sm:12px;

  --shadow-sm: 0 6px 16px rgba(0,0,0,.08);
  --shadow: 0 14px 30px rgba(0,0,0,.10);

  --ring: 0 0 0 4px rgba(233,107,8,.18);

  --ok:#16a34a;
  --warn:#f59e0b;
  --bad:#dc2626;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);

  /* Fondo global del portal */
  background:
    /* velo suave para que el texto y tarjetas sigan siendo legibles */
    linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,.62) 260px),
    url("../img/1a.jpg"),
    var(--bg);

  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}

a{ color:var(--primary); text-decoration:none; }
a:hover{ text-decoration:underline; }

/* Contenedor base */
.container{
  max-width:var(--page-max);
  margin:0 auto;
  padding:18px;
}

/* ===== Topbar ===== */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(1.2) blur(6px);
  border-bottom:1px solid var(--border);
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
}

.topbar .inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 18px;
  max-width:var(--page-max);
  margin:0 auto;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.2px;
}
.brand .dot{
  width:12px;
  height:12px;
  border-radius:999px;
  background:var(--primary);
  box-shadow:0 0 0 4px rgba(233,107,8,.15);
}

.nav{
  display:flex;
  gap:14px;
  align-items:center;
}
.nav a{
  color:var(--text);
  padding:10px 10px;
  border-radius:10px;
}
.nav a.active{ background:rgba(233,107,8,.10); color:var(--primary-700); }
.nav a:hover{ background:rgba(0,0,0,.04); text-decoration:none; }

.nav-toggle{
  display:none;
  border:1px solid var(--border);
  background:#fff;
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
}

/* Menú móvil (una sola versión, sin duplicados) */
.nav-mobile{
  display:none;
  border-top:1px solid var(--border);
  padding:10px 18px 14px;
  max-width:var(--page-max);
  margin:0 auto;
}
.nav-mobile.show{ display:block; }
.nav-mobile a{
  display:block;
  padding:10px 10px;
  border-radius:10px;
  color:var(--text);
}
.nav-mobile a.active{ background:rgba(233,107,8,.10); color:var(--primary-700); }
.nav-mobile a:hover{ background:rgba(0,0,0,.04); text-decoration:none; }

@media (max-width: 820px){
  .nav{ display:none; }
  .nav-toggle{ display:inline-flex; align-items:center; gap:8px; }
}

/* ===== Cards / Typography ===== */
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  overflow:hidden;
}
.card .card-h{
  padding:16px 16px 12px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap; /* evita cortes en móvil */
}
.card .card-b{ padding:16px; }

.h1{ font-size:26px; margin:0; }
.h2{ font-size:18px; margin:0; color:var(--text); }
.small{ font-size:13px; color:var(--muted); }

/* ===== Grids ===== */
.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
@media (max-width: 820px){
  .grid{ grid-template-columns:1fr; }
}

/* ===== Buttons ===== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  cursor:pointer;
  font-weight:600;
  transition: background .15s ease, transform .05s ease, box-shadow .15s ease;
}
.btn:hover{ background:rgba(0,0,0,.03); }
.btn:active{ transform: translateY(1px); }

.btn.primary{
  background:var(--primary);
  border-color:transparent;
  color:#fff;
  box-shadow: 0 10px 20px rgba(233,107,8,.18);
}
.btn.primary:hover{ background:var(--primary-700); }
.btn.danger{ background:var(--bad); border-color:transparent; color:#fff; }
.btn.ghost{ background:transparent; }

/* ===== Inputs ===== */
.input, .select, .textarea{
  width:100%;
  padding:11px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  outline:none;
  font-size:14px;
}
.textarea{ min-height:120px; resize:vertical; }
.input:focus, .select:focus, .textarea:focus{
  box-shadow:var(--ring);
  border-color:rgba(233,107,8,.35);
}

.form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media (max-width: 820px){
  .form-row{ grid-template-columns:1fr; }
}

/* ===== Alerts ===== */
.alert{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.02);
  margin:0 0 14px;
}
.alert.ok{ border-color:rgba(22,163,74,.35); background:rgba(22,163,74,.08); }
.alert.warn{ border-color:rgba(245,158,11,.35); background:rgba(245,158,11,.10); }
.alert.bad{ border-color:rgba(220,38,38,.35); background:rgba(220,38,38,.08); }

/* ===== Tables ===== */
.table-wrap{
  overflow:auto;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
}
table{
  width:100%;
  border-collapse:collapse;
  min-width:760px;
  background:#fff;
}
th, td{
  padding:12px 12px;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align:top;
}
th{
  background:rgba(0,0,0,.02);
  font-size:13px;
  color:var(--muted);
  font-weight:700;
}
tr:hover td{ background:rgba(233,107,8,.05); }

/* ===== Badges ===== */
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  font-size:12px;
  font-weight:700;
  background:#fff;
}
.badge.open{ border-color:rgba(245,158,11,.35); background:rgba(245,158,11,.12); }
.badge.in_process{ border-color:rgba(233,107,8,.35); background:rgba(233,107,8,.12); }
.badge.closed{ border-color:rgba(22,163,74,.35); background:rgba(22,163,74,.10); }
.badge.reopened{ border-color:rgba(99,102,241,.35); background:rgba(99,102,241,.10); }
.badge.rejected{ border-color:rgba(220,38,38,.35); background:rgba(220,38,38,.10); }

/* ===== Threads / Messages ===== */
.thread{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.msg{
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px 14px;
  background:#fff;
}
.msg .meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  color:var(--muted);
  font-size:12px;
  margin-bottom:6px;
}

.attachments{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.attachment{
  border:1px solid var(--border);
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  background:rgba(0,0,0,.02);
}

/* ===== Small utilities ===== */
.kbd{
  font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  font-size:12px;
  border:1px solid var(--border);
  border-bottom-width:2px;
  border-radius:10px;
  padding:2px 8px;
  background:#fff;
  color:var(--text);
}

/* ===== Login pro (lo mantengo porque lo usas) ===== */
.auth-wrap{
  padding:26px 0;
  display:flex;
  justify-content:center;
}
.auth-card{
  width:100%;
  max-width:980px;
  border:1px solid var(--border);
  border-radius:22px;
  background:var(--surface);
  box-shadow:var(--shadow);
  overflow:hidden;
  display:grid;
  grid-template-columns: 1.1fr .9fr;
}
.auth-brand{
  padding:22px 22px;
  background:
    radial-gradient(800px 300px at 20% 0%, rgba(233,107,8,.10), rgba(233,107,8,0)),
    #fff;
  border-right:1px solid var(--border);
}
.auth-logo{
  max-width:320px;
  width:100%;
  height:auto;
  display:block;
  margin-bottom:14px;
}
.auth-kicker{
  font-weight:900;
  font-size:18px;
  letter-spacing:.2px;
  color:var(--text);
  margin-bottom:6px;
}
.auth-desc{
  color:var(--muted);
  font-size:14px;
  margin-bottom:14px;
  line-height:1.45;
}
.auth-list{
  margin:0;
  padding-left:18px;
  color:var(--text);
  font-size:13px;
  line-height:1.55;
}
.auth-note{ margin-top:12px; }

.auth-form{ padding:22px 22px; }
.auth-title{ margin:0 0 6px; font-size:28px; }
.auth-submit{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
}
@media (max-width: 820px){
  .auth-card{ grid-template-columns: 1fr; }
  .auth-brand{ border-right:none; border-bottom:1px solid var(--border); }
  .auth-logo{ max-width:260px; }
}

/* ===== NORMALIZAR ANCHO EN TODAS LAS PÁGINAS (PC) ===== */
/* Esto garantiza que el contenido principal quede igual de ancho que /tickets
   aunque alguna página haya metido max-width inline o wrappers raros. */
@media (min-width: 821px){
  /* Caso normal: una card principal dentro del main */
  main.container > .card,
  main > .container > .card{
    width:100%;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }

  /* Si alguien metió max-width inline en wrappers inmediatos */
  main.container > div[style*="max-width"],
  main.container > section[style*="max-width"]{
    max-width:none !important;
    width:100% !important;
  }

  /* Si una página creó un wrapper centrado extra */
  main.container > .wrap,
  main.container > .wrapper{
    max-width:none !important;
    width:100% !important;
  }
}
.login-brand{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  margin-bottom: 1.75rem;
}

.login-brand-text{
  width:100%;
}
/* ============================
   DASHBOARD / DASHBOARD SETTINGS
   ============================ */

:root{
  --dash-accent: #E96B08;
  --dash-muted: #7f7f7f;
  --dash-muted-2: #5f5f5f;
  --dash-bg: #f3f5f7;
}

/* Si tu layout usa <main class="dashboard-main"> */
.dashboard-main{
  background: transparent;
  min-height: calc(100vh - 60px);
}

/* HERO */
.dash-hero{
  position: relative;
  min-height: 370px;
  padding: 54px 0 96px 0;
  background-image: url('../img/1login-bg.jpg'); /* relativo a assets/css/ */
  background-size: cover;
  background-position: top;
  background-repeat: no-repeat;
  display:flex;
  align-items:flex-end;
  overflow: hidden;
}

.dash-hero__overlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.28);
}

.dash-hero__inner{
  position: relative;
  width: min(1100px, calc(100vw - 44px));
  margin: 0 auto;
  padding: 0 22px;
  box-sizing: border-box;
  color: #fff;
}

.dash-hero__title h1{
  margin: 0 0 6px 0;
  font-size: clamp(22px, 2.6vw, 36px);
  font-weight: 900;
}

.dash-hero__title p{
  margin: 0 0 16px 0;
  opacity: .92;
  font-size: 14px;
}

/* SEARCH */
.dash-search{
  display:flex;
  align-items:center;
  gap: 10px;
  background: rgba(255,255,255,0.96);
  border-radius: 12px;
  padding: 10px 10px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.20);
  max-width: 980px;
}

.dash-search__icon{
  color: #8a8a8a;
  display:flex;
  align-items:center;
  padding-left: 8px;
}

.dash-search input{
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  padding: 10px 6px;
  color: #111;
}

.dash-search button{
  border: 0;
  cursor: pointer;
  background: var(--dash-accent);
  color: #fff;
  font-weight: 900;
  padding: 10px 18px;
  border-radius: 10px;
  transition: transform .06s ease, filter .2s ease;
}

.dash-search button:hover{
  filter: brightness(0.95);
  transform: translateY(-1px);
}

/* chips bajo buscador */
.dash-chips{
  margin-top: 12px;
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}

.dash-chip{
  display:inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-decoration:none;
  color:#fff;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.18);
}

.dash-chip:hover{ background: rgba(255,255,255,0.22); }

.dash-searchhint{
  margin-top: 10px;
  font-size: 13px;
  opacity: .95;
}

/* SECTION */
.dash-section{
  width: min(1100px, 94vw);
  margin: 0 auto;
  padding: 22px 0 70px 0; /* deja espacio para tooltips abajo */
}

/* CARDS GRID */
.dash-cards{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
  margin-top: 18px;
  overflow: visible;
}

/* CARD */
.dash-card{
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 20px 18px;
  display:flex;
  gap: 14px;
  align-items:flex-start;
  min-height: 138px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.10);
  transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
  text-decoration:none;
  color: inherit;
  position: relative;
  z-index: 1;
}

.dash-card:hover,
.dash-card:focus-within{
  z-index: 50;
}

.dash-card--disabled:hover{
  z-index: 60;
}

.dash-card__icon{
  color: var(--dash-accent);
  width: 54px;
  height: 54px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(233,107,8,0.10);
  border-radius: 14px;
  flex: 0 0 54px;
}

.dash-card__title{
  font-weight: 900;
  color: #222;
  margin-top: 2px;
  font-size: 16px;
}

.dash-card__desc{
  margin-top: 8px;
  font-size: 13px;
  color: #666;
  line-height: 1.3rem;
}

/* Active hover */
.dash-card--active:hover{
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0,0,0,0.14);
  border-color: rgba(233,107,8,0.28);
}

/* Disabled look */
.dash-card--disabled{
  opacity: 0.95;
  cursor: not-allowed;
}

.dash-card--disabled .dash-card__icon{
  color: var(--dash-muted);
  background: rgba(127,127,127,0.16);
}

.dash-card--disabled .dash-card__title{ color: var(--dash-muted-2); }
.dash-card--disabled .dash-card__desc{ color: var(--dash-muted); }

/* Tooltip */
.dash-card--disabled[data-tip]::after{
  content: attr(data-tip);
  position: absolute;
  left: 18px;
  top: calc(100% + 10px);
  background: rgba(0,0,0,0.86);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 9999;
}

.dash-card--disabled:hover::after{
  opacity: 1;
  transform: translateY(0px);
}

/* Back bar */
.dash-backbar{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 10px 0;
}

.dash-back{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #ececec;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
  text-decoration:none;
  color: #222;
  font-weight: 900;
  transition: transform .12s ease, box-shadow .18s ease;
}

.dash-back:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0,0,0,0.10);
}

.dash-back__hint{
  color:#666;
  font-size: 13px;
}

.dash-back__hint strong{
  color: var(--dash-accent);
}

/* RESULTS */
.dash-results{
  margin-top: 22px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
}

.dash-results__h{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.dash-results__h h2{
  margin:0;
  font-size: 16px;
  font-weight: 900;
  color:#222;
}

.dash-results__links{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-results__links a{
  color: var(--dash-accent);
  font-weight: 900;
  text-decoration:none;
  font-size: 13px;
}

.dash-results__links a:hover{ text-decoration: underline; }

.dash-results__grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}

.dash-results__title{
  font-weight: 900;
  margin-bottom: 8px;
  color:#333;
}

.dash-results__list{
  margin:0;
  padding-left: 16px;
}

.dash-results__list li{ margin-bottom: 10px; }

.dash-results__list a{
  color:#222;
  font-weight: 900;
  text-decoration:none;
}

.dash-results__list a:hover{ text-decoration: underline; }

.dash-results__meta{
  font-size: 12px;
  color:#777;
  margin-top: 2px;
}

.dash-results__empty{
  color:#888;
  font-size: 13px;
}

.dash-empty{
  padding: 16px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px dashed #ddd;
}

.dash-empty__title{
  font-weight: 900;
  color:#333;
  margin-bottom: 6px;
}

.dash-empty__text{
  color:#666;
  font-size: 13px;
  line-height: 1.35rem;
}

/* Responsive */
@media (max-width: 980px){
  .dash-cards{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dash-results__grid{ grid-template-columns: 1fr; }
}

@media (max-width: 640px){
  .dash-cards{ grid-template-columns: 1fr; }
  .dash-search{ flex-wrap: wrap; }
  .dash-search button{ width: 100%; }
}
/* ============================
   TOPBAR ESPECIAL: TICKETS (DESKTOP)
   ============================ */

@media (min-width: 901px){
  .topbar--tickets{
    background-image: url('../img/1login-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
  }

  .topbar--tickets::before{
    content:"";
    position:absolute;
    inset:0;
    background: rgba(0,0,0,0.35); /* overlay para contraste */
    pointer-events:none;
  }

  .topbar--tickets .inner{
    position: relative;
    z-index: 1;
  }

  .topbar--tickets .brand span{
    color: #fff;
    font-weight: 800;
  }

  .topbar--tickets .dot{
    background: var(--dash-accent, #E96B08);
  }

  .topbar--tickets .nav a{
    color: rgba(255,255,255,0.92);
    font-weight: 800;
  }

  .topbar--tickets .nav a:hover{
    color: #fff;
  }

  .topbar--tickets .nav a.active{
    color: #fff;
    background: rgba(255,255,255,0.14);
    border-radius: 10px;
  }

  /* Oculta hamburguesa en desktop si tu CSS ya lo hace, esto solo refuerza */
  .topbar--tickets .nav-toggle{
    display: none;
  }

  /* Oculta menú mobile en desktop */
  .topbar--tickets .nav-mobile{
    display: none;
  }
}

/* En móvil, NO aplicamos el look especial: se usa el hamburguesa normal */
@media (max-width: 900px){
  .topbar--tickets{
    background: #fff; /* o tu estilo normal */
  }
  .topbar--tickets::before{ display:none; }
  .topbar--tickets .nav{ display:none; } /* se usa nav-mobile */
  .topbar--tickets .nav-toggle{ display:inline-flex; }
  .topbar--tickets .brand span{ color:#111; }
}
/* Brand con imagen bannerti.png */
.brand--img{
  display:flex;
  align-items:center;
}

.brand-link{
  display:flex;
  align-items:center;
  text-decoration:none;
}

/* Ajusta la imagen al alto del header sin deformarla */
.topbar .brand-img{
  height: 78px !important;
  width: auto;
  display:block;
  object-fit: contain;
}

/* Si el header es más alto, la imagen puede crecer un poco */
@media (min-width: 901px){
  .topbar .inner{
    min-height: 56px;    /* mantiene altura consistente */
  }
  .brand-img{
    height: 30px;
  }
}

/* En móvil: evita que el logo empuje el botón hamburguesa */
@media (max-width: 900px){
  .brand-img{
    height: 24px;
    max-width: 68vw;     /* no invade el espacio del menú */
  }
}
/* ===== Settings: mejorar layout de grid ===== */
.grid{
  align-items: start;
}

/* La card de Categorías ocupa todo el ancho en pantallas grandes */
@media (min-width: 1000px){
  .settings-categories{
    grid-column: 1 / -1;
  }
}
/* ===== Settings: tabla de categorías con scroll interno ===== */
.settings-categories .table-wrap{
  max-height: 420px;       /* ajusta si quieres más/menos */
  overflow: auto;
  border-radius: 14px;
}

/* Sticky header de la tabla para que "Nombre/Estado/Acciones" no se pierda */
.settings-categories .table thead th{
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.settings-categories .table td,
.settings-categories .table th{
  padding-top: 10px;
  padding-bottom: 10px;
}

.settings-categories .input{
  height: 42px;
}
.dash-results__actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin: 8px 0 16px 0;
  padding-bottom:12px;
  border-bottom:1px solid var(--border);
}

.btn.btn--soft{
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(233,107,8,.08);
  color: var(--primary);
  font-weight:800;
  text-decoration:none;
  transition: all .15s ease;
}

.btn.btn--soft:hover{
  background: rgba(233,107,8,.15);
  border-color: rgba(233,107,8,.35);
}
/* Header horizontal de resultados */
.dash-results__header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:14px;
}

/* Botones alineados a la derecha */
.dash-results__actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
}

/* Botón suave */
.btn.btn--soft{
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(233,107,8,.08);
  color: var(--primary);
  font-weight:800;
  text-decoration:none;
  transition: all .15s ease;
}

.btn.btn--soft:hover{
  background: rgba(233,107,8,.18);
  border-color: rgba(233,107,8,.35);
}
/* ======================================
   ESTILOS PROFESIONALES PARA RESULTADOS
   ====================================== */

/* Variables de color (ajústalas a tu paleta) */
:root {
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-light: #e2e8f0;
  --primary-color: #e96b08; /* Tu color naranja */
  --primary-light: rgba(233, 107, 8, 0.1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* Header (lo dejamos casi igual, solo un poco más de margen) */
.dash-results__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px; /* Un poco más de espacio */
}

.dash-results__heading {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dash-results__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

/* Botón suave (ligeramente retocado) */
.btn.btn--soft {
  padding: 10px 16px;
  border-radius: 30px; /* Más redondeado, más moderno */
  border: 1px solid var(--border-light);
  background: var(--primary-light);
  color: var(--primary-color);
  font-weight: 600; /* Un poco menos de peso */
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.btn.btn--soft:hover {
  background: rgba(233, 107, 8, 0.15);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

/* ======================================
   CONTENEDOR PRINCIPAL DE TARJETAS
   ====================================== */
.dash-results__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 10px;
}

/* Tarjeta individual */
.dash-results__card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.dash-results__card:hover {
  box-shadow: var(--shadow-md);
}

/* Título de la tarjeta */
.dash-results__card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-results__card-title span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Lista de resultados dentro de la tarjeta */
.dash-results__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Cada item de la lista */
.dash-results__item {
  border-bottom: 1px dashed var(--border-light);
  padding-bottom: 10px;
}

.dash-results__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Enlace principal del resultado */
.dash-results__link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
  transition: color 0.15s ease;
}

.dash-results__link:hover {
  color: var(--primary-color);
}

/* Estilo especial para el subject de tickets */
.dash-results__subject {
  font-weight: 400;
}

.dash-results__id {
  color: var(--primary-color);
  font-weight: 600;
  margin-right: 6px;
}

/* Metadatos (estado, prioridad, etc) */
.dash-results__meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

/* Badges para estado y prioridad */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
  background: #f1f5f9; /* Gris muy claro por defecto */
  color: #334155;
}

/* Ejemplo de colores para badges (puedes personalizarlos) */
.badge--status[data-status="abierto"],
.badge--status:contains("Abierto") {
  background: #dbeafe;
  color: #1e40af;
}
.badge--status[data-status="pendiente"],
.badge--status:contains("Pendiente") {
  background: #fed7aa;
  color: #9a3412;
}
.badge--status[data-status="cerrado"],
.badge--status:contains("Cerrado") {
  background: #e2e8f0;
  color: #334155;
}

.badge--priority[data-priority="alta"],
.badge--priority:contains("Alta") {
  background: #fee2e2;
  color: #b91c1c;
}
.badge--priority[data-priority="media"],
.badge--priority:contains("Media") {
  background: #fef9c3;
  color: #854d0e;
}
.badge--priority[data-priority="baja"],
.badge--priority:contains("Baja") {
  background: #dcfce7;
  color: #166534;
}

/* Mensaje de vacío */
.dash-results__empty {
  color: var(--text-secondary);
  font-style: italic;
  padding: 20px 10px;
  text-align: center;
  background: #f8fafc;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

/* ======================================
   ESTILOS RESPONSIVOS
   ====================================== */
@media (max-width: 720px) {
  .dash-results__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .dash-results__actions {
    justify-content: flex-start;
    width: 100%;
  }
  .dash-results__cards {
    grid-template-columns: 1fr; /* Una columna en móviles */
  }
}

/* Estilo para la pantalla vacía (sin resultados) - lo mantenemos funcional */
.dash-empty {
  text-align: center;
  padding: 40px 20px;
  background: #f8fafc;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-light);
}
.dash-empty__title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.dash-empty__text {
  color: var(--text-secondary);
  line-height: 1.6;
}
.reports-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 18px 10px; /* ajusta si tu card ya tiene padding */
}

.reports-head__left{
  min-width: 240px;
}

.reports-head__right{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap; /* si se hace pequeño, bajan ordenados */
}

/* En pantallas pequeñas, botones debajo sin huecos raros */
@media (max-width: 720px){
  .reports-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .reports-head__right{
    width:100%;
    justify-content:flex-start;
  }
}
/* ============================= */
/* TICKETS - Rediseño Visual     */
/* ============================= */

.tickets-table {
  width: 100%;
  border-collapse: collapse;
}

.tickets-table thead {
  display: none; /* ocultamos encabezado clásico */
}

.tickets-table tbody tr {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.tickets-table tbody tr:hover {
  background: rgba(255,255,255,0.95);
  transform: scale(1.002);
}

.tickets-table td {
  padding: 16px 18px;
  vertical-align: middle;
  font-size: 14px;
}

.tickets-table td:first-child {
  width: 60px;
}

.tickets-table td:last-child {
  text-align: right;
}

/* Estado como badge moderno */

.ticket-status {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-block;
}

/* Estados respetando tu sistema actual */

.ticket-status.open {
  background: rgba(233,107,8,0.15);
  color: #E96B08;
}

.ticket-status.closed {
  background: rgba(34,197,94,0.15);
  color: #16a34a;
}

.ticket-status.onhold {
  background: rgba(245,158,11,0.15);
  color: #d97706;
}

/* Separación visual entre tickets */

.tickets-table tbody tr + tr {
  margin-top: 8px;
}

/* Número de ticket más discreto */

.ticket-id {
  font-size: 12px;
  color: #777;
}

/* Nombre del solicitante */

.ticket-user {
  font-size: 13px;
  color: #666;
}
/* ================================ */
/* TICKETS - Estilo profesional Helpdesk */
/* ================================ */

.tickets-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tickets-table thead {
  display: none;
}

/* Filas con efecto de tarjetas elevadas */
.tickets-table tbody tr {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.tickets-table tbody tr:hover {
  box-shadow: 0 8px 20px rgba(233, 107, 8, 0.12), 0 2px 4px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

/* Celdas */
.tickets-table td {
  padding: 18px 20px;
  vertical-align: middle;
  background: inherit;
  border: none;
  line-height: 1.5;
  color: #1e293b;
}

/* REDUCCIÓN DE GROSOR GENERAL */
.tickets-table td {
  font-weight: 400; /* antes venía más grueso por defecto */
}

.tickets-table td:first-child {
  width: 90px;
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.tickets-table td:last-child {
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

/* Columnas con texto sin wrap */
.tickets-table td:nth-child(4),
.tickets-table td:nth-child(5),
.tickets-table td:nth-child(6),
.tickets-table td:nth-child(7) {
  white-space: nowrap;
  font-weight: 450; /* ligeramente más destacado pero sin exceso */
}

/* Enlace del ID: más destacado pero equilibrado */
.tickets-table td:first-child a {
  font-weight: 600; /* reducido de 800 a 600 */
  font-size: 0.95rem;
  text-decoration: none;
  color: #E96B08;
  background: rgba(233, 107, 8, 0.08);
  padding: 4px 10px;
  border-radius: 40px;
  display: inline-block;
  transition: background 0.2s ease, color 0.2s ease;
}

.tickets-table td:first-child a:hover {
  background: #E96B08;
  color: #ffffff;
}

/* Asunto - título principal con grosor moderado */
.tickets-table td:nth-child(2) {
  font-weight: 500; /* antes era más grueso (700/800), ahora equilibrado */
}

/* Metadatos del asunto (categoría, etc) */
.tickets-table td:nth-child(2) .small {
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 400; /* delgado pero legible */
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Prioridad - reducir grosor */
.tickets-table td:nth-child(4) {
  font-weight: 500;
}

/* Estado - mantener badges con su estilo pero texto interno delgado */
.tickets-table .badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 500; /* reducido de 700 a 500 */
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: capitalize;
  border: 1px solid rgba(0, 0, 0, 0.04);
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Colores específicos de cada estado */
.tickets-table .badge.open {
  background: rgba(233, 107, 8, 0.12);
  color: #b35500;
  border-color: rgba(233, 107, 8, 0.2);
  font-weight: 500;
}

.tickets-table .badge.in_process {
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.2);
  font-weight: 500;
}

.tickets-table .badge.closed {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.2);
  font-weight: 500;
}

.tickets-table .badge.reopened {
  background: rgba(168, 85, 247, 0.1);
  color: #6b21a8;
  border-color: rgba(168, 85, 247, 0.2);
  font-weight: 500;
}

.tickets-table .badge.rejected {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.2);
  font-weight: 500;
}

/* Fechas con grosor normal */
.tickets-table td:nth-child(6),
.tickets-table td:nth-child(7) {
  font-weight: 400;
  color: #475569;
}

/* Ajuste responsive */
@media screen and (max-width: 700px) {
  .tickets-table td {
    padding: 14px 12px;
  }
  .tickets-table td:first-child a {
    padding: 4px 8px;
    font-size: 0.85rem;
    font-weight: 500;
  }
}
/* ================================ */
/* USERS - 1 línea + expandir en Acciones */
/* ================================ */

/* Compactar tabla */
.users-table th,
.users-table td{
  padding: 10px 14px;      /* reduce alto de fila */
  vertical-align: middle;
  line-height: 1.2;
}

/* Evita que “Acciones” crezca por defecto */
.users-actions-cell{
  width: 220px;
  white-space: nowrap;
}

/* Details/summary como botón */
.users-expand{
  display: inline-block;
}

.users-expand__summary{
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
}

.users-expand__summary::-webkit-details-marker{
  display:none;
}

/* Panel interno solo cuando está abierto */
.users-expand__panel{
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Si está cerrado, el panel no ocupa nada */
.users-expand:not([open]) .users-expand__panel{
  display:none;
}

/* Filas de forms dentro del panel */
.users-expand__row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
}

.users-expand__input{
  max-width: 220px;
}

/* Extra: hover suave con color del proyecto */
.users-table tbody tr:hover{
  background: rgba(233, 107, 8, 0.04);
}