@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --hominis-purple-900: #3d1a66;
  --hominis-purple-700: #5b2a8c;
  --hominis-purple-500: #7c4dbe;
  --hominis-purple-100: #f1eafa;
  --hominis-green: #2bb673;
  --hominis-green-dark: #1f8f58;
  --ink: #1f1b2e;
  --ink-soft: #6b6478;
  --paper: #faf9fc;
  --card: #ffffff;
  --line: #e7e2f0;
  --danger: #d64545;
  --ok: var(--hominis-green-dark);
  --accent: #ef6a3b;
  --shadow: 0 16px 30px rgba(91, 42, 140, 0.12);
  --font: "Poppins", "Segoe UI", sans-serif;

  /* aliases usados en parciales */
  --purple: var(--hominis-purple-500);
  --purple-deep: var(--hominis-purple-700);
  --purple-soft: var(--hominis-purple-100);
  --purple-sidebar: var(--hominis-purple-900);
  --text: var(--ink);
  --muted: var(--ink-soft);
  --bg: var(--paper);
  --white: var(--card);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }

/* ===== LOGIN ===== */
/* Relación como image (5).png: ~68% imagen | ~32% formulario */
.login-page {
  min-height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(320px, 1fr);
  background: var(--card);
}
.login-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #1a0f2e;
  min-height: 100vh;
}
.login-slides { position: absolute; inset: 0; }
.login-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .7s ease;
  overflow: hidden;
}
.login-slide.active { opacity: 1; }
.login-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.login-slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,8,40,.05) 35%, rgba(20,8,40,.55) 100%);
  pointer-events: none;
}
.login-caption-wrap {
  position: absolute;
  left: clamp(1.5rem, 3vw, 2.5rem);
  bottom: clamp(3rem, 6vh, 4.2rem);
  z-index: 2;
  max-width: min(22ch, 70%);
}
.login-caption-arrow { display: none; }
.login-caption {
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.45rem);
  font-weight: 600;
  line-height: 1.35;
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
}
.login-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(2px);
}
.login-nav.prev { left: 1rem; }
.login-nav.next { right: 1rem; }
.login-nav:hover { background: rgba(255,255,255,.3); }
.login-dots {
  position: absolute; z-index: 2;
  left: 0; right: 0;
  bottom: 1.35rem;
  display: flex; gap: .5rem; justify-content: center;
}
.login-dots button {
  width: .55rem; height: .55rem; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.85);
  background: transparent; cursor: pointer; padding: 0;
}
.login-dots button.active {
  background: #fff;
  border-color: #fff;
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.2rem 1.8rem;
  background: #fff;
  min-height: 100vh;
}
.login-card { width: min(100%, 340px); text-align: center; }
.brand {
  display: inline-flex; align-items: center; gap: .7rem;
  margin-bottom: 1.5rem; font-weight: 700; letter-spacing: .04em; font-size: 1.45rem;
  color: var(--ink);
}
.brand-mark-img {
  width: 40px;
  height: 40px;
  display: block;
  flex-shrink: 0;
}
.brand-text {
  font-weight: 700;
  letter-spacing: .04em;
  font-size: 1.45rem;
  line-height: 1;
}
.brand-login {
  margin-bottom: 1.35rem;
  justify-content: center;
  width: 100%;
  gap: .7rem;
}
.brand-login .brand-text { color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--hominis-purple-500);
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.25rem; font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.login-card h1 {
  margin: 0 0 .35rem;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.login-card .sub { margin: 0 0 1.5rem; color: var(--ink-soft); font-weight: 400; }
.field { position: relative; margin-bottom: .9rem; }
.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .9rem 2.7rem .9rem 1.15rem;
  outline: none;
  background: #fff;
}
.field input:focus {
  border-color: var(--hominis-purple-500);
  box-shadow: 0 0 0 3px rgba(124,77,190,.14);
}
.field .fi {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  color: #9aa0b5;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.field .fi .ico { width: 1.1rem; height: 1.1rem; }
.login-actions {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: .75rem; margin-top: 1.1rem;
}
.btn {
  border: 0; border-radius: 999px; padding: .78rem 1.1rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font-weight: 700; transition: .15s ease;
}
.btn-primary { background: var(--hominis-purple-700); color: #fff; }
.btn-primary:hover { background: var(--hominis-purple-900); }
.btn-muted { background: #c9c5d4; color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: var(--hominis-purple-100); color: var(--hominis-purple-700); }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; border-radius: 10px; }

/* ===== APP SHELL (PDF diseño interior) ===== */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}
.sidebar {
  background: #7b5cff;
  color: #fff;
  padding: 1.4rem 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 250px;
  width: 250px;
  position: relative;
  transform: none;
  z-index: 30;
}
.sidebar .brand,
.brand-sidebar {
  color: #fff;
  margin: .1rem .35rem .45rem;
  gap: .7rem;
  display: flex;
  align-items: center;
}
.brand-sidebar .brand-mark-img {
  width: 34px;
  height: 34px;
}
.brand-sidebar .brand-copy {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}
.brand-sidebar .brand-text {
  color: #fff;
  font-size: 1.25rem;
  letter-spacing: .05em;
  line-height: 1.1;
}
.sidebar-prov {
  margin: 0 .85rem .85rem;
  padding: .7rem .8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
}
.sidebar-prov-name {
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}
.sidebar-prov-cuit {
  margin-top: .25rem;
  color: rgba(255, 255, 255, .78);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.sidebar-prov-cuit:empty { display: none; }
.brand-sidebar .brand-sub {
  color: rgba(255, 255, 255, .88);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.2;
}

.topbar-user-label {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  max-width: min(220px, 36vw);
  line-height: 1.15;
  padding-right: .1rem;
}
.topbar-user-label .name {
  font-weight: 700;
  font-size: .86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.topbar-user-label .role {
  font-size: .7rem;
  color: rgba(255,255,255,.8);
  white-space: nowrap;
}
.topbar .user-box {
  position: relative;
  flex-shrink: 0;
}
.topbar .user-avatar-btn {
  list-style: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}
.topbar .user-avatar-btn::-webkit-details-marker { display: none; }
.topbar .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 2px solid rgba(255,255,255,.55);
  display: grid;
  place-items: center;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
}
.topbar .user-box[open] .user-avatar {
  background: rgba(255,255,255,.3);
}
.topbar .user-box:not([open]) > .user-menu { display: none; }
.topbar .user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + .45rem);
  z-index: 80;
  min-width: 190px;
  background: #fff;
  color: #2b2140;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(40, 20, 70, .22);
  padding: .35rem;
  display: grid;
  gap: .15rem;
}
.topbar .user-menu button {
  background: transparent;
  border: 0;
  color: #2b2140;
  text-align: left;
  padding: .55rem .7rem;
  cursor: pointer;
  border-radius: 8px;
  font-size: .875rem;
  width: 100%;
}
.topbar .user-menu button:hover { background: #f3eef8; }

.menu-label {
  margin: .2rem .55rem 0;
  font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.75); font-weight: 700;
}
#main-nav { display: grid; gap: .2rem; margin-top: .35rem; }
.nav-item, .nav-sub button, .nav-group > summary {
  width: 100%; background: transparent; border: 0; color: #fff;
  text-align: left; padding: .75rem .85rem; border-radius: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  font-weight: 500; font-size: .9rem;
}
.nav-left { display: inline-flex; align-items: center; gap: .7rem; }
.nav-ico {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-grid;
  place-items: center;
  opacity: .95;
}
.nav-ico .ico { width: 1.15rem; height: 1.15rem; }
.nav-group > summary { list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-item:hover, .nav-sub button:hover, .nav-group > summary:hover {
  background: rgba(61,26,102,.18);
}
.nav-item.active,
.nav-sub button.active {
  background: #3d1a66;
  color: #fff;
  box-shadow: none;
}
/* El padre solo se marca si su sección está activa, no por estar abierto */
.nav-group.is-active > summary {
  background: rgba(61, 26, 102, .35);
  color: #fff;
}
.nav-group > summary .nav-chev {
  transition: transform .15s ease;
  opacity: .85;
}
.nav-group[open] > summary .nav-chev {
  transform: rotate(90deg);
}
.nav-sub {
  display: grid; gap: .1rem;
  padding: .15rem 0 .2rem .35rem;
}
.nav-sub button {
  padding: .55rem .85rem .55rem 2.1rem;
  font-size: .85rem;
  color: rgba(255,255,255,.9);
}
.sidebar-footer { display: none; }

.main {
  display: flex; flex-direction: column; min-width: 0;
  background: #eef0f5;
}
/* Barra superior redondeada del PDF */
.topbar {
  margin: 1.1rem 1.25rem 0;
  min-height: 54px;
  background: #3d1a66;
  border-radius: 18px;
  padding: .7rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 0; gap: 1rem;
  color: #fff;
  overflow: visible;
  position: relative;
  z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.topbar h1 { display: none; }
.topbar p, .topbar .sub { display: none; }
.topbar-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #fff;
  font-size: .9rem;
  margin-left: auto;
  position: relative;
  z-index: 21;
  overflow: visible;
}
.top-search { display: none; }
.menu-toggle {
  display: none;
  border: 0; background: transparent; color: #fff;
  cursor: pointer; line-height: 1;
  padding: .15rem;
}
.menu-toggle .ico { width: 1.35rem; height: 1.35rem; }
.bell {
  width: auto; height: auto; border-radius: 0;
  background: transparent; color: #fff;
  border: 0; display: grid; place-items: center; position: relative; cursor: pointer;
  padding: .15rem;
}
.bell .ico { width: 1.2rem; height: 1.2rem; }
.bell .dot { display: none; }
.content {
  padding: 1.1rem 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.breadcrumb {
  display: block !important;
  color: #fff;
  font-size: .9rem;
  margin: 0;
  font-weight: 500;
}
.breadcrumb.visible { display: block; }
.panel {
  background: #fff;
  border-radius: 20px;
  box-shadow: none;
  border: 0;
  padding: 1.4rem 1.5rem;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.panel-head h2 {
  margin: 0; font-size: 1.05rem; font-weight: 700;
  display: flex; gap: .5rem; align-items: center; color: var(--ink);
}
.panel-head h2 .ico {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--hominis-purple-700);
}
/* Iconos SVG flat */
.ico {
  width: 1.15rem;
  height: 1.15rem;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: -0.2em;
  color: inherit;
}
.moe-seek-btn .ico {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--hominis-purple-700);
}
.toolbar {
  display: flex; gap: .65rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center;
}
.toolbar input[type="search"], .toolbar select,
.form-grid input, .form-grid select, .form-grid textarea {
  border: 1px solid #d7d7e5;
  border-radius: 12px;
  padding: .7rem .85rem;
  background: #fff;
}
.toolbar input[type="search"] { flex: 1; min-width: 220px; }
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 1px solid #ececf3;
}
.pager-info {
  color: var(--ink-soft);
  font-size: .875rem;
}
.pager-actions {
  display: flex;
  gap: .5rem;
}
.pager-actions .btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: .8rem .75rem; border-bottom: 1px solid #ececf3; text-align: left; font-size: .875rem; }
th {
  color: var(--ink-soft); font-weight: 700; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .04em;
}
td.num, th.num, th.col-num, td.col-num { text-align: right; white-space: nowrap; }
.table-comprobantes { min-width: 980px; table-layout: fixed; }
.table-comprobantes th,
.table-comprobantes td {
  padding: .7rem .55rem;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table-comprobantes .col-tipo { width: 7%; }
.table-comprobantes .col-comp { width: 12%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-comprobantes .col-date { width: 9%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-comprobantes .col-num { width: 10%; font-variant-numeric: tabular-nums; }
.table-comprobantes .col-total { font-weight: 700; }
.table-comprobantes .col-period { width: 7%; white-space: nowrap; text-align: center; }
.table-comprobantes .col-status { width: 10%; text-align: center; }
.table-comprobantes .col-status .badge { max-width: 100%; }

.table-nuevo { min-width: 1100px; table-layout: fixed; }
.table-nuevo th,
.table-nuevo td {
  padding: .65rem .5rem;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table-nuevo .col-action { width: 7%; white-space: nowrap; }
.table-nuevo .col-tipo { width: 5%; text-align: center; }
.table-nuevo .col-pv,
.table-nuevo .col-nro { width: 8%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-nuevo .col-date { width: 8%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-nuevo .col-cuit { width: 10%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-nuevo .col-cae { width: 11%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-nuevo .col-emisor { width: 16%; }
.table-nuevo .col-num { width: 9%; font-variant-numeric: tabular-nums; }
.table-nuevo .col-status { width: 9%; text-align: center; white-space: nowrap; }
.empty { text-align: center; color: var(--ink-soft); padding: 1.4rem !important; }
.badge {
  display: inline-block; padding: .25rem .65rem; border-radius: 999px;
  background: var(--hominis-purple-100); color: var(--hominis-purple-700);
  font-size: .72rem; font-weight: 600;
}
.badge-ok { background: #e8fbf1; color: var(--hominis-green-dark); }
.badge-off { background: #f3f4f6; color: #6b7280; }
.alert {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.alert-error { background: #fde8e8; color: var(--danger); border-color: #f2b8b8; }
.alert-ok { background: #e8fbf1; color: var(--hominis-green-dark); border-color: #b7e8c9; }
.hint { color: var(--ink-soft); margin-top: 0; }
.footer {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .9rem 1.25rem 1.2rem; color: var(--ink-soft); font-size: .75rem;
  background: transparent; border-top: 0;
}
.footer .brand-apertura { color: #c9a227; font-weight: 700; }
.footer .brand-sistmed { color: var(--hominis-green-dark); font-weight: 700; }

/* Home del PDF */
.home-stack { display: grid; gap: 1rem; }
.home-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}
.home-panel {
  display: block;
  background: #fff;
  border: 0;
  border-radius: 20px;
  padding: 1.35rem 1.4rem 1.2rem;
}
.home-panel h2 {
  margin: 0 0 .85rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.home-panel .lead {
  margin: 0 0 .55rem;
  color: #555;
  font-size: .9rem;
  line-height: 1.45;
}
.home-panel .lead strong { color: #333; }
.doc-list { display: grid; gap: .55rem; margin-top: .35rem; }
.doc-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .15rem 0;
}
.doc-ico { color: #7b5cff; flex-shrink: 0; }
.doc-name {
  flex: 1; min-width: 0;
  color: #333; font-size: .86rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 0;
  background: #7b5cff;
  color: #fff;
  font-weight: 700;
  font-size: .78rem;
  border-radius: 999px;
  padding: .45rem .9rem;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-download:hover { background: #6848e8; }
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.module-card {
  background: #e7e9f0;
  border: 0;
  border-radius: 18px;
  padding: 1.25rem 1.15rem;
  display: flex; flex-direction: column; gap: .85rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  text-align: left;
  width: 100%;
  color: inherit;
  min-height: 150px;
}
.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(61,26,102,.12);
}
.module-card h3 {
  margin: 0;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.module-card p { display: none; }
.module-card .go { display: none; }
.module-card .module-icon { display: none; }
.module-card .btn-download { margin-top: auto; align-self: flex-start; }
.home-hero, .stat-grid, .stat-card, .section-title, .hero-cta { display: none !important; }

/* MODAL */
#modal-root:empty { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(31, 27, 46, .55);
  display: grid; place-items: center; padding: 1rem; z-index: 50;
}
.modal {
  background: #fff; width: min(100%, 720px); border-radius: 18px; overflow: hidden;
  max-height: calc(100vh - 2rem); display: flex; flex-direction: column;
  box-shadow: 0 30px 60px rgba(0,0,0,.3);
}
.modal-lg { width: min(100%, 980px); }
.modal-sm { width: min(100%, 420px); }
.datos-list {
  display: grid;
  gap: .85rem;
  margin: 0 0 .4rem;
}
.datos-list > div { display: grid; gap: .2rem; }
.datos-list dt {
  margin: 0;
  font-size: .75rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.datos-list dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}
.modal-head {
  background: var(--hominis-purple-700); color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  padding: .9rem 1.1rem;
}
.modal-head h3 { margin: 0; font-weight: 700; }
.icon-btn {
  background: transparent; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer;
}
.modal-body { padding: 1.1rem; overflow: auto; }
.file-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
}
.file-field .file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.file-field .file-name {
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 500;
  min-width: 0;
  word-break: break-all;
}
.form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem;
}
.form-grid label { display: grid; gap: .3rem; font-size: .85rem; color: var(--ink-soft); font-weight: 600; }
.form-grid label.full, .form-grid .full { grid-column: 1 / -1; }
.form-grid .roles {
  grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 12px; padding: .7rem;
}
.form-grid .check { display: flex; align-items: center; gap: .45rem; color: var(--ink); font-weight: 500; }
.field-hint {
  font-size: .75rem;
  font-weight: 500;
  color: var(--ink-soft);
}
/* Finder Moebius (proveedor) */
#lookup-root:empty { display: none; }
.lookup-backdrop { z-index: 60; }
.modal-search { width: min(100%, 720px); }
.moe-search-group { display: grid; gap: .35rem; min-width: 0; }
.moe-search-9 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .4rem;
  align-items: stretch;
}
.moe-search-9 .moe-ref {
  min-width: 0;
  width: 100%;
}
.moe-seek-btn {
  min-width: 2.4rem;
  padding: 0 .7rem;
  font-size: 1.15rem;
  line-height: 1;
  border: 1px solid #d7d7e5;
  background: #f7f5fb;
  color: var(--hominis-purple-700);
  border-radius: 10px;
  cursor: pointer;
}
.moe-seek-btn:hover {
  background: #efe8f8;
}
.moe-ref-L {
  min-height: 1.1rem;
  color: var(--ink-soft);
  font-size: .8rem;
  font-weight: 500;
}
.moe-search-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  padding: .85rem 1.1rem 0;
}
.moe-search-q {
  flex: 1 1 14rem;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .45rem;
  border: 1px solid #d7d7e5;
  border-radius: 10px;
  padding: .35rem .65rem;
  background: #fff;
}
.moe-search-q-ico {
  color: var(--ink-soft);
  display: grid;
  place-items: center;
}
.moe-search-q-ico .ico { width: 1rem; height: 1rem; }
.moe-search-q input {
  border: 0;
  outline: none;
  width: 100%;
  padding: .35rem 0;
  background: transparent;
}
.moe-search-meta {
  color: var(--ink-soft);
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: .55rem;
}
.moe-search-table-wrap {
  max-height: min(50vh, 360px);
  overflow: auto;
}
.moe-search-table { min-width: 0; width: 100%; border-collapse: collapse; }
.moe-search-table th,
.moe-search-table td {
  padding: .65rem .7rem;
  border-bottom: 1px solid #ececf3;
  text-align: left;
  font-size: .85rem;
}
.moe-search-table th {
  position: sticky;
  top: 0;
  background: #f7f5fb;
  color: var(--ink-soft);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.moe-search-table tr.clickable { cursor: pointer; }
.moe-search-table tr.clickable:hover { background: #f3eef8; }
.moe-search-table td.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 1.2rem .8rem;
}
.modal-actions {
  display: flex; justify-content: space-between; gap: .7rem; margin-top: .4rem;
}
.row-disabled { opacity: .55; }

@media (max-width: 960px) {
  .login-page {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(38vh, 42vh) auto;
  }
  .login-hero { min-height: 38vh; }
  .login-panel { min-height: auto; }
  .login-caption-wrap { max-width: 26ch; }
  .login-nav { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(84vw, 280px);
    min-width: 0;
    transform: translateX(-105%);
    transition: transform .2s ease;
    z-index: 60;
    box-shadow: 8px 0 24px rgba(40, 20, 70, .2);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-block; }
  .home-top { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .content { padding: 1rem; }
  .topbar { margin: 1rem 1rem 0; }
  .footer { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 640px) {
  .module-grid { grid-template-columns: 1fr; }
}
