/* =========================
   1) Variables + base
========================= */
:root {
  --bg: #f2f4f7;
  --panel: #ffffff;
  --panel-2: #f7f6f3;

  --text: #0b0f14;
  --muted: #6b7280;
  --border: #e5e7eb;

  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #d97706;

  --r: 18px;

  --shadow: 0 16px 40px rgba(11, 15, 20, 0.1);
  --shadow2: 0 10px 22px rgba(11, 15, 20, 0.08);

  --corp-grad: linear-gradient(
    135deg,
    #0b1f4d 0%,
    #0b2f78 35%,
    #08255e 70%,
    #061b45 100%
  );
  --corp-border: rgba(5, 57, 145, 0.55);
  --corp-shadow: 0 14px 30px rgba(5, 57, 145, 0.22);

  --ring: 0 0 0 4px rgba(5, 57, 145, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  font:
    15px/1.45 "Urbanist",
    system-ui,
    sans-serif;
  font-weight: 500;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.wrap {
  max-width: 1020px;
  margin: 28px auto;
  padding: 0 16px 40px;
}

/* =========================
   2) Banner superior
========================= */
.banner {
  background: var(--corp-grad);
  color: #fff;
  border-radius: 18px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 10px 26px rgba(11, 15, 20, 0.18);
}

.bannerInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brandBox {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.bannerLogo {
  height: 30px;
  width: auto;
  display: block;
  border-right: 1px solid #eee;
  padding-right: 10px;
}

.bannerText {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.bannerTitle {
  margin: 0;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0.25px;
}

.bannerTagline {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.85);
}

.bannerMeta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: rgba(255, 255, 255, 0.92);
}

.mItem {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 13px;
}

.mItem i {
  font-size: 16px;
  opacity: 0.95;
}

.mItem b {
  font-weight: 850;
  letter-spacing: 0.2px;
}

.mMuted {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 650;
}

.mSep {
  color: rgba(255, 255, 255, 0.25);
  user-select: none;
}

@media (max-width: 760px) {
  .bannerInner {
    flex-direction: column;
    align-items: flex-start;
  }

  .bannerMeta {
    justify-content: flex-start;
  }

  .mSep {
    display: none;
  }
}

/* =========================
   3) Hero (bienvenida)
========================= */
.hero {
  margin: 0 0 14px;
  padding: 20px 24px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.55)
  );
  box-shadow: 0 16px 34px rgba(11, 15, 20, 0.08);
}

.welcome {
  padding: 0;
  margin: 0;
}

.welcome::before {
  content: none !important;
}

.welcomeKicker {
  margin: 0 0 8px;
  font-weight: 950;
  font-size: 14.4px;
  letter-spacing: 0.22px;
  color: var(--text);
}

.welcomeLead {
  margin: 0;
  font-size: 14.4px;
  line-height: 1.5;
  color: var(--text);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.95);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

/* hero logeado */
.heroUserRow {
  display: flex;
  align-items: center;
  /* centrado vertical */
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.heroUserInfo {
  min-width: 0;
}

.heroUserActions {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .heroUserActions {
    width: 100%;
    justify-content: center;
    /* o flex-start si prefieres */
  }
}

/* =========================
   4) Card / Panel
========================= */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel {
  background: var(--panel);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 10px 18px rgba(11, 15, 20, 0.06);
}

.panel--primary {
  border-color: rgba(11, 15, 20, 0.18);
  box-shadow: 0 16px 30px rgba(11, 15, 20, 0.1);
}

#contentArea {
  margin-top: 2px;
}

/* Encabezado dentro del contentArea */
#contentArea .panelHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
}

#contentArea .panelTitle {
  margin: 0;
  font-weight: 950;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0.2px;
}

#contentArea .panelSub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
}

/* =========================
   5) Formularios
========================= */
label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.fieldLabel {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 750;
  color: var(--text);
}

.reqStar {
  color: var(--danger);
  font-weight: 900;
  line-height: 1;
}

.hint {
  color: var(--muted);
  font-size: 12.8px;
  line-height: 1.35;
  margin-top: 2px;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 12px;
  font: inherit;
  outline: none;
  background: #fff;
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(11, 15, 20, 0.55);
  box-shadow: var(--ring);
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.35;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

/* bloque RUT */
.rutBlock {
  display: grid;
  gap: 6px;
}

.rutControls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 22%);
  gap: 10px;
  align-items: stretch;
}

.bigInput {
  font-size: 16px;
  padding: 13px 14px;
}

.rutControls input,
.rutControls button {
  height: 48px;
}

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

  .rutControls button {
    width: 100%;
  }
}

/* =========================
   6) Botones
========================= */
button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 11px 12px;
  font: inherit;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.06s,
    opacity 0.15s,
    box-shadow 0.15s,
    filter 0.15s;
  box-shadow: 0 10px 18px rgba(11, 15, 20, 0.06);
}

button:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

button:active {
  transform: translateY(1px);
}

button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

button.primary {
  background: var(--corp-grad) !important;
  border-color: var(--corp-border) !important;
  color: #fff !important;
  box-shadow: var(--corp-shadow) !important;
}

button.primary:hover {
  filter: brightness(1.02);
}

.link {
  display: inline-flex;
  align-items: center;
  border: 0 !important;
  background: rgba(11, 15, 20, 0.07) !important;
  color: var(--text) !important;
  padding: 9px 12px;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(11, 15, 20, 0.06);
}

.link:hover {
  background: rgba(11, 15, 20, 0.1) !important;
}

.link.danger {
  background: var(--corp-grad) !important;
  color: #fff !important;
  box-shadow: 0 10px 18px rgba(11, 15, 20, 0.14);
}

.link.danger:hover {
  filter: brightness(1.05);
}

/* =========================
   7) Menú (cards)
========================= */
.menuGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 980px) {
  .menuGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.menuCard {
  width: 100%;
  padding: 10px 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(11, 15, 20, 0.1);
  box-shadow: 0 10px 18px rgba(11, 15, 20, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.08s,
    filter 0.15s;
}

.menuCard:hover {
  background: rgba(11, 15, 20, 0.03);
  border-color: rgba(11, 15, 20, 0.18);
  box-shadow: 0 14px 24px rgba(11, 15, 20, 0.08);
  transform: translateY(-1px);
}

.menuCard.is-active {
  background: var(--corp-grad) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 18px 34px rgba(11, 15, 20, 0.22) !important;
}

.menuCard.is-active:hover {
  transform: none;
}

.iconBox {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(11, 15, 20, 0.1);
  background: rgba(11, 15, 20, 0.03);
  font-size: 20px;
  flex: 0 0 auto;
}

.menuCard.is-active .iconBox {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
}

.menuCard.is-active .iconBox i,
.menuCard.is-active .iconBox .icon {
  color: #fff !important;
  fill: #fff !important;
}

.menuTxt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  line-height: 1.1;
  min-width: 0;
}

.menuTxt b {
  font-size: 14.6px;
  font-weight: 950;
  letter-spacing: 0.15px;
  margin: 0;
}

.menuTxt span {
  display: block;
  font-size: 13.2px;
  color: var(--muted);
  margin: 0;
}

.menuCard.is-active .menuTxt b,
.menuCard.is-active .menuTxt span {
  color: #fff !important;
}

/* Badge contador */
.countBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  margin-left: 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  background: #dc2626; /* rojo */
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff !important;
  vertical-align: middle;
}

.menuCard.is-active .countBadge {
  background: #dc2626; /* rojo */
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.22);
}

/* =========================
   8) Bloques informativos
========================= */
.helpBlock {
  margin-top: 12px;
  border: 1px solid rgba(11, 15, 20, 0.12);
  background: rgba(11, 15, 20, 0.04);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.helpBlock b {
  font-size: 13px;
}

.helpBlock span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.helpBlock--danger {
  border: 1px solid rgba(220, 38, 38, 0.28);
  background: rgba(220, 38, 38, 0.1);
}

.helpBlock--danger b {
  color: #b91c1c;
}

.helpBlock--danger span {
  color: rgba(185, 28, 28, 0.9);
}

/* =========================
   9) Popover Términos
========================= */
.tcWrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tcTrigger {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: help;
  font: inherit;
  color: var(--text);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tcTrigger:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 8px;
}

.tcPopover {
  position: fixed;
  z-index: 9999;
  max-width: 420px;
  min-width: 260px;
  background: #fff;
  border: 1px solid rgba(11, 15, 20, 0.18);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(11, 15, 20, 0.18);
  padding: 12px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.tcPopover::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid rgba(11, 15, 20, 0.18);
  border-top: 1px solid rgba(11, 15, 20, 0.18);
  transform: rotate(45deg);
}

.tcPopover.is-bottom::before {
  top: -6px;
  left: 18px;
}

.tcPopover.is-top::before {
  bottom: -6px;
  left: 18px;
  transform: rotate(225deg);
}

/* =========================
   10) Skeleton loader
========================= */
.skeleton {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.skLine {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(11, 15, 20, 0.06),
    rgba(11, 15, 20, 0.1),
    rgba(11, 15, 20, 0.06)
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skLine.h42 {
  height: 42px;
  border-radius: 14px;
}

.skLine.h110 {
  height: 110px;
  border-radius: 14px;
}

.skLine.w40 {
  width: 40%;
}

.skLine.w60 {
  width: 60%;
}

.skLine.w80 {
  width: 80%;
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

/* ===== TABLA (estilo original CINDER) ===== */
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 10px;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
  font-size: 13.5px;
}

th {
  color: var(--muted);
  font-weight: 900;
  font-size: 12.8px;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.bannerTagline {
  line-height: 1.05;
}

.bannerTitle {
  line-height: 1.05;
}


