/* ================================================================
   Soporte IT AMAR — Mesa de Ayuda · diseño moderno
   ================================================================ */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #fafbfe;
  --ink: #0f1b3d;
  --muted: #6b7690;
  --faint: #9aa3ba;
  --line: #e9edf6;
  --brand: #2b4bd4;
  --brand-d: #1e37a8;
  --brand-soft: #eef1fe;
  --amber: #f5a623;
  --amber-d: #d98200;
  --nuevo: #2f7fe0;
  --nuevo-bg: #e7f0fd;
  --curso: #b8860b;
  --curso-bg: #fbf1d8;
  --espera: #d97706;
  --espera-bg: #fdeede;
  --fin: #1c9c63;
  --fin-bg: #e2f6ec;
  --shadow: 0 1px 2px rgba(16, 27, 61, .04), 0 8px 24px rgba(16, 27, 61, .06);
  --shadow-lg: 0 20px 60px rgba(16, 27, 61, .22);
  --r: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

.hide {
  display: none !important;
}

/* ---------------- LOGIN ---------------- */
.login-bg {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
}

.login-hero {
  background: linear-gradient(135deg, #2b4bd4 0%, #16307a 60%, #0e1a4a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh 6vw;
  position: relative;
  overflow: hidden;
}

.login-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 166, 35, .35), transparent 70%);
}

.login-hero .mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.login-hero .mark .owl {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: linear-gradient(145deg, #ffd34d, #f5a623);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 8px 22px rgba(245, 166, 35, .45);
}

.login-hero .mark b {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .3px;
}

.login-hero h1 {
  font-size: 38px;
  line-height: 1.15;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -.5px;
}

.login-hero p {
  font-size: 16px;
  opacity: .85;
  max-width: 420px;
  margin: 0;
}

.login-hero .dots {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.login-hero .dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
}

.login-hero .dots span:first-child {
  background: var(--amber);
  width: 26px;
  border-radius: 6px;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--surface);
}

.login-card {
  width: 100%;
  max-width: 360px;
}

.login-card h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 4px;
}

.login-card .lead {
  color: var(--muted);
  margin: 0 0 28px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #54608a;
  margin-bottom: 7px;
}

.field input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 15px;
  outline: none;
  background: var(--surface-2);
  transition: .15s;
  font-family: inherit;
}

.field input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(180deg, var(--brand), var(--brand-d));
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(43, 75, 212, .3);
  transition: .15s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(43, 75, 212, .38);
}

.login-err {
  color: #c0392b;
  font-size: 13px;
  margin-top: 12px;
  font-weight: 600;
  background: #fdecea;
  border: 1px solid #f7c7c1;
  border-radius: 10px;
  padding: 9px 12px;
}

.login-hint {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 22px;
  line-height: 1.6;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.login-hint b {
  color: var(--ink);
}

@media(max-width:820px) {
  .login-bg {
    grid-template-columns: 1fr;
  }

  .login-hero {
    display: none;
  }
}

/* ---------------- APP SHELL ---------------- */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  flex: 0 0 250px;
  background: linear-gradient(180deg, #17306f, #0f1f4d);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 8px 20px;
}

.sb-brand .owl {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(145deg, #ffd34d, #f5a623);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  box-shadow: 0 6px 16px rgba(245, 166, 35, .4);
}

.sb-brand .txt {
  line-height: 1.1;
}

.sb-brand .txt b {
  font-size: 15px;
  font-weight: 800;
}

.sb-brand .txt small {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  opacity: .6;
  margin-top: 2px;
}

.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.sb-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  color: #c8d2ee;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: .15s;
  position: relative;
}

.sb-nav a .ico {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

.sb-nav a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.sb-nav a.active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--amber);
}

.sb-nav a .tag {
  margin-left: auto;
  font-size: 9px;
  background: rgba(245, 166, 35, .22);
  color: #ffd89a;
  border-radius: 6px;
  padding: 2px 6px;
  font-weight: 800;
}

.sb-spacer {
  flex: 1;
}

.sb-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
}

.sb-user .av {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #3a5bd6, #2b4bd4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex: 0 0 auto;
}

.sb-user .who {
  line-height: 1.15;
  min-width: 0;
}

.sb-user .who b {
  font-size: 13px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.sb-user .who small {
  font-size: 10px;
  opacity: .6;
  letter-spacing: .6px;
}

.sb-user .out {
  margin-left: auto;
  color: #c8d2ee;
  font-size: 17px;
  padding: 6px;
  border-radius: 9px;
}

.sb-user .out:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 26px 30px 60px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-head h1 {
  font-size: 23px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -.4px;
}

.page-head .sub {
  color: var(--muted);
  margin: 3px 0 0;
  font-size: 13.5px;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 10px 15px;
  min-width: 280px;
  box-shadow: var(--shadow);
}

.search input {
  border: 0;
  outline: none;
  font-size: 14px;
  flex: 1;
  background: transparent;
  font-family: inherit;
}

.search .ic {
  color: var(--faint);
  font-size: 15px;
}

/* stat cards */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.stat .ic {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex: 0 0 auto;
}

.stat .n {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.stat .t {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
}

.ic-total {
  background: var(--brand-soft);
}

.ic-nuevo {
  background: var(--nuevo-bg);
}

.ic-proceso {
  background: var(--curso-bg);
}

.ic-fin {
  background: var(--fin-bg);
}

/* grid */
.grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.panel-head .count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 11px;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 18px 4px;
}

.chip {
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  cursor: pointer;
  color: #54608a;
  font-weight: 600;
  transition: .15s;
}

.chip:hover {
  border-color: #cfd8ee;
}

.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ticket rows */
.list {
  padding: 8px 10px 12px;
  max-height: 560px;
  overflow: auto;
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: .13s;
}

.row:hover {
  background: var(--surface-2);
}

.row+.row {
  border-top: 1px solid var(--line);
}

.row .idbox {
  flex: 0 0 auto;
  width: 54px;
  height: 44px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand-d);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
}

.row .idbox small {
  font-size: 9px;
  color: var(--brand);
  opacity: .75;
  margin-top: 2px;
  font-weight: 700;
}

.row .body {
  flex: 1;
  min-width: 0;
}

.row .body .as {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row .body .meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.row .chev {
  color: var(--faint);
  font-size: 20px;
}

.pill {
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.p-Nuevo {
  background: var(--nuevo-bg);
  color: var(--nuevo);
}

.p-Encurso {
  background: var(--curso-bg);
  color: var(--curso);
}

.p-Enespera {
  background: var(--espera-bg);
  color: var(--espera);
}

.p-Finalizado {
  background: var(--fin-bg);
  color: var(--fin);
}

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--faint);
}

/* servicios chart */
.chart {
  padding: 16px 18px 20px;
}

.bar-row {
  margin: 12px 0;
}

.bar-row .lbl {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 6px;
}

.bar-row .lbl b {
  color: var(--ink);
  font-weight: 700;
}

.bar-row .lbl span {
  color: var(--muted);
}

.bar-track {
  background: var(--surface-2);
  border-radius: 8px;
  height: 9px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--brand), #5b78e8);
  transition: width .8s ease;
}

.bar-row:nth-child(2n) .bar-fill {
  background: linear-gradient(90deg, var(--amber-d), var(--amber));
}

.side-note {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------------- CHAT ---------------- */
.chat-fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  border: 0;
  background: linear-gradient(145deg, #2b4bd4, #16307a);
  color: #fff;
  font-size: 27px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(22, 48, 122, .45);
  z-index: 50;
  transition: .15s;
}

.chat-fab:hover {
  transform: translateY(-2px) scale(1.03);
}

.chat {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 370px;
  height: 560px;
  background: var(--surface);
  border-radius: 20px;
  z-index: 60;
  display: none;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}

.chat.open {
  display: flex;
}

.chat-head {
  background: linear-gradient(135deg, #1f3f97, #16307a);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 16px;
}

.chat-head .owl {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, #ffd34d, #f5a623);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.chat-head .title {
  flex: 1;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.1;
}

.chat-head .title small {
  display: block;
  font-size: 10.5px;
  opacity: .7;
  font-weight: 500;
}

.chat-head button {
  background: rgba(255, 255, 255, .15);
  border: 0;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.chat-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-2);
}

.msg {
  max-width: 84%;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: var(--shadow);
}

.msg.bot {
  background: #fff;
  color: var(--ink);
  border-bottom-left-radius: 3px;
  align-self: flex-start;
}

.msg.me {
  background: var(--brand);
  color: #fff;
  border-bottom-right-radius: 3px;
  align-self: flex-end;
}

.msg.bot b {
  color: var(--brand-d);
}

.link {
  cursor: pointer;
  text-decoration: underline;
  font-weight: 600;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-input input {
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  padding: 11px 15px;
  outline: none;
  font-family: inherit;
}

.chat-input input:focus {
  border-color: var(--brand);
}

.chat-input button {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* ---------------- MODAL ---------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 61, .5);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 20px;
}

.overlay.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: 20px;
  max-width: 660px;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
}

.modal-head {
  background: linear-gradient(135deg, #1f3f97, #16307a);
  color: #fff;
  padding: 20px 24px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.modal-head .mk {
  font-size: 12px;
  opacity: .8;
  font-weight: 600;
}

.modal-head h3 {
  margin: 5px 0 0;
  font-size: 19px;
  font-weight: 800;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, .18);
  border: 0;
  color: #fff;
  font-size: 19px;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: .15s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, .32);
}

.modal-head h3,
.modal-head .mk {
  padding-right: 44px;
}

.modal-body {
  padding: 22px 24px;
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 9px 14px;
  margin-bottom: 20px;
  font-size: 14px;
}

.kv .k {
  color: var(--muted);
  font-weight: 600;
}

.lbl-h {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 800;
  letter-spacing: .6px;
  margin: 0 0 7px;
}

.desc {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  margin-bottom: 20px;
}

.cmt {
  border-left: 3px solid var(--amber);
  background: var(--surface-2);
  padding: 11px 15px;
  margin: 9px 0;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  border-radius: 0 10px 10px 0;
}

.stars {
  color: var(--amber);
  font-size: 17px;
  letter-spacing: 1px;
}

.seg {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.seg textarea {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  min-height: 70px;
  resize: vertical;
  background: #fff;
}

.seg textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.seg-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-d);
  cursor: pointer;
  background: var(--brand-soft);
  border-radius: 10px;
  padding: 8px 13px;
  width: fit-content;
}

.seg-file input {
  display: none;
}

.seg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.seg-msg {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.seg-msg.err {
  color: #c0392b;
}

.seg .btn-solid {
  border: 0;
}

.seg-msg.ok {
  color: var(--fin);
}

.gestion {
  background: #eff3ff;
  border: 1px solid #d4defb;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
}

.gestion-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.gestion-row label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #54608a;
}

.gestion-row select {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  outline: none;
  min-width: 150px;
}

.gestion-row select:focus {
  border-color: var(--brand);
}

.gestion-row .btn-solid {
  border: 0;
  padding: 10px 20px;
}

.soon-box {
  text-align: center;
  padding: 44px 20px;
  color: var(--muted);
}

.soon-box .em {
  font-size: 48px;
}

/* ---------------- FORMULARIO (Crear) ---------------- */
.grid-single {
  max-width: 760px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #54608a;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface-2);
  outline: none;
  transition: .15s;
  color: var(--ink);
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.form-grid textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 4px 20px 20px;
}

.btn-ghost {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 700;
  color: #54608a;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-ghost:hover {
  border-color: #cfd8ee;
}

.btn-solid {
  background: linear-gradient(180deg, var(--brand), var(--brand-d));
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 8px 20px rgba(43, 75, 212, .28);
}

.btn-solid:hover {
  transform: translateY(-1px);
}

.alert-err {
  margin: 16px 20px 0;
  background: #fdecea;
  border: 1px solid #f7c7c1;
  color: #c0392b;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
}

.success-box {
  padding: 44px 24px;
  text-align: center;
}

.success-box .big {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--fin-bg);
  color: var(--fin);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 16px;
  font-weight: 800;
}

.success-box h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
}

.success-box p {
  color: var(--muted);
  margin: 0 0 22px;
}

.form-grid .hint {
  font-weight: 500;
  color: var(--faint);
  font-size: 11.5px;
}

.form-grid input[type=file] {
  background: var(--surface-2);
  border: 1.5px dashed #c7d2ec;
  cursor: pointer;
  padding: 11px 14px;
}

.form-grid input[type=file]::file-selector-button {
  border: 0;
  background: var(--brand-soft);
  color: var(--brand-d);
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 9px;
  margin-right: 12px;
  cursor: pointer;
  font-family: inherit;
}

.req-nota {
  background: #fff6e6;
  border: 1px solid #f3d68a;
  color: #8a5a00;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
}

.req-nota a {
  color: var(--brand-d);
  text-decoration: underline;
  font-weight: 700;
  margin-left: 6px;
  white-space: nowrap;
}

.filechips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.filechip {
  background: var(--brand-soft);
  color: var(--brand-d);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
}

.filechip em {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
}

.adjs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adj {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 13px;
  color: var(--brand-d);
  font-weight: 600;
  text-decoration: none;
}

.adj:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.adj span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adj em {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
  font-size: 11.5px;
}

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

/* ---------------- VER (tabla detallada) ---------------- */
.stats-5 {
  grid-template-columns: repeat(5, 1fr);
}

.estado-card {
  cursor: pointer;
  transition: .15s;
  border: 1px solid var(--line);
}

.estado-card:hover {
  border-color: var(--brand2, #cfd8ee);
  transform: translateY(-1px);
}

.estado-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.filterbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px 4px;
  flex-wrap: wrap;
}

.filterbar .fb-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 11px;
  padding: 9px 13px;
  flex: 1;
  min-width: 220px;
  color: var(--faint);
}

.filterbar .fb-search input {
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  flex: 1;
  font-family: inherit;
  color: var(--ink);
}

.filterbar select {
  border: 1.5px solid var(--line);
  border-radius: 11px;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface-2);
  outline: none;
  color: var(--ink);
  cursor: pointer;
}

.filterbar select:focus,
.filterbar .fb-search:focus-within {
  border-color: var(--brand);
}

.filterbar .btn-solid,
.filterbar .btn-ghost {
  padding: 10px 18px;
}

.pager {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 16px;
  flex-wrap: wrap;
}

.pg {
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #54608a;
  text-decoration: none;
  background: #fff;
}

.pg:hover {
  border-color: var(--brand);
  color: var(--brand-d);
}

.pg.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.pg.disabled {
  opacity: .4;
  pointer-events: none;
}

.pg-dots {
  color: var(--faint);
  padding: 0 4px;
}

.tablewrap {
  width: 100%;
  overflow-x: auto;
  padding: 4px 4px 10px;
}

.vtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.vtable thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.vtable th.c,
.vtable td.c {
  text-align: center;
}

.vtable tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.vtable tbody tr {
  cursor: pointer;
  transition: .12s;
}

.vtable tbody tr:hover {
  background: var(--surface-2);
}

.vtable .tk {
  font-weight: 800;
  color: var(--brand-d);
  white-space: nowrap;
}

.vtable .as {
  font-weight: 600;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vtable .mut {
  color: var(--muted);
  white-space: nowrap;
}

.prio {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 16px;
  white-space: nowrap;
}

.prio-Baja {
  background: #eef7e9;
  color: #3b6d11;
}

.prio-Media {
  background: #fbf1d8;
  color: #8a6400;
}

.prio-Muyurgente {
  background: #fdeaea;
  color: #b02525;
}

.prio-SinAsignar {
  background: #eef1f6;
  color: #7a86a4;
}

@media(max-width:1080px) {
  .stats-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:720px) {
  .sidebar {
    display: none;
  }

  .main {
    padding: 18px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }
}
/* ---- Submenú desplegable del menú lateral (Admin) ---- */
.sb-gtoggle .sb-caret {
  margin-left: auto;
  font-size: 12px;
  transition: transform .2s;
}

.sb-group.open .sb-gtoggle .sb-caret {
  transform: rotate(180deg);
}

.sb-gtoggle.parent {
  color: #fff;
}

.sb-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 4px 14px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, .14);
}

.sb-group.open .sb-sub {
  display: flex;
}

.sb-nav .sb-sub a {
  padding: 8px 11px;
  font-size: 13px;
}

.sb-nav .sb-sub a .ico {
  font-size: 15px;
}

.sb-sublbl {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #8f9dc6;
  font-weight: 700;
  padding: 10px 11px 3px;
}

.sidebar {
  overflow-y: auto;
}
