*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: var(--green-800); }

img { max-width: 100%; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 10px;
}

.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--green-700);
  outline-offset: 2px;
}

.app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 14px 16px;
  background: linear-gradient(180deg, #24512c 0%, #3b693c 58%, #2d4f2f 100%);
  color: #fff;
}

.sidebar :focus-visible { outline-color: var(--yellow-500); }

.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 12px; }

.brand-mark,
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--green-800);
  font-family: var(--display);
  font-weight: 800;
  flex: none;
}

.brand-mark {
  border-radius: 50%;
  overflow: hidden;
  padding: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-title { margin: 0; font-family: var(--display); font-size: 1.35rem; font-weight: 800; line-height: 1; }

.brand p { margin: 2px 0 0; color: #e7f3dc; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }

.side-nav {
  display: grid;
  align-content: start;
  gap: 4px;
  overflow: auto;
  padding-right: 2px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease;
}

.nav-link:hover { background: rgba(255, 255, 255, 0.1); transform: translateX(4px); }

.nav-link.is-active { background: #fff; color: var(--green-800); }

.nav-badge {
  margin-left: auto;
  min-width: 22px;
  text-align: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--yellow-500);
  color: var(--ink);
  font-size: 0.75rem;
}

.side-user {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.side-user strong { display: block; }

.side-user span { color: #e7f3dc; font-size: 0.85rem; }

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 32, 20, 0.5);
  z-index: 25;
}

.workspace {
  min-width: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 22px 12px;
  background: rgba(244, 247, 243, 0.94);
  backdrop-filter: blur(10px);
}

.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b693c, #6ead3b);
}

.topbar h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1.2;
}

.page-kicker {
  margin: 0;
  color: var(--green-800);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-note { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.user-chip { text-align: right; }

.user-chip strong { display: block; }

.user-chip span { color: var(--muted); font-size: 0.85rem; }

.contenido { flex: 1; padding: 8px 22px 28px; }

.app-footer {
  margin-top: auto;
  padding: 16px 22px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.app-footer p {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero, .card, .panel, .stat, .module-card, .concepto {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.hero { position: relative; padding: 22px 22px 26px; overflow: hidden; }

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, #3b693c, #6ead3b);
}

.welcome {
  min-height: calc(100dvh - 190px);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 640px);
  gap: 32px;
  align-items: center;
  padding: 28px 8px 36px;
}

.welcome-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.welcome-mark {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #3b693c;
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  box-shadow: 0 16px 28px rgba(59, 105, 60, 0.28);
}

.welcome-date {
  margin: 22px 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.welcome h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
}

.welcome h2 span { color: #3b693c; }

.welcome-chip {
  margin: 16px 0 0;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid #3b693c;
  color: #3b693c;
  font-weight: 700;
}

.welcome-copy {
  max-width: 46ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.welcome-copy strong { color: #3b693c; }

.welcome-cta {
  margin-top: 22px;
  min-width: min(320px, 100%);
  min-height: 48px;
  border-radius: 999px;
  padding: 12px 22px;
}

.welcome-board {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 28px rgba(59, 105, 60, 0.12);
}

.welcome-board-frame {
  overflow: hidden;
  aspect-ratio: 600 / 336;
}

.welcome-board iframe {
  display: block;
  width: 100%;
  height: calc(100% + 40px);
  border: 0;
  background: var(--green-50);
}

.welcome-board figcaption {
  margin: 0;
  padding: 12px 16px;
  color: #3b693c;
  font-weight: 700;
}

.hub-head h2 {
  margin: 8px 0 6px;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.hub-head h2 span { color: #3b693c; }

.hub-head p { margin: 0; color: var(--muted); }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 210px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hub-card:hover {
  transform: translateY(-6px);
  border-color: #3b693c;
  box-shadow: 0 12px 22px rgba(59, 105, 60, 0.18);
}

.hub-card h3 { margin: 4px 0 0; font-family: var(--display); font-size: 1.15rem; }

.hub-card p { margin: 0; color: var(--muted); flex: 1; }

.hub-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(59, 105, 60, 0.1);
  color: #3b693c;
}

.hub-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.hub-chips span {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.hub-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.hub-request-copy { display: flex; align-items: flex-start; gap: 12px; }

.hub-request h3 { margin: 0 0 4px; font-family: var(--display); color: #3b693c; }

.hub-request p { margin: 0; color: var(--muted); }

.hub-request-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.hero h2 { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 8px; }

.hero p { margin: 0; max-width: 68ch; color: var(--muted); }

.stat-grid, .module-grid, .concepto-grid { display: grid; gap: 12px; margin-top: 16px; }

.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat { padding: 16px; }

.stat span { color: var(--muted); font-size: 0.9rem; }

.stat b { display: block; margin-top: 4px; font-family: var(--display); font-size: 1.7rem; color: var(--green-800); }

.module-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.module-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 190px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
}

.module-card { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }

.module-card:hover { transform: translateY(-6px); border-color: #3b693c; box-shadow: 0 12px 22px rgba(59, 105, 60, 0.18); }

.module-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--green-50);
  color: var(--green-700);
}

.module-card h3 { margin: 0; font-family: var(--display); font-size: 1.12rem; }

.module-card p { margin: 0; color: var(--muted); flex: 1; }

.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-800);
  font-size: 0.8rem;
  font-weight: 700;
}

.tag-wait { background: var(--yellow-50); color: var(--ink); }

.section-block { margin-top: 22px; }

.section-block h2 { font-family: var(--display); margin: 0 0 10px; font-size: 1.25rem; }

.banner {
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 16px;
}

.banner-wait { background: var(--yellow-50); border: 1px solid #e6c200; }

.banner-info { background: var(--green-50); border: 1px solid #c5ddb8; }

.banner p { margin: 4px 0 0; }

.concepto-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.concepto { padding: 14px; }

.concepto h3 { margin: 0 0 4px; font-size: 1rem; }

.concepto p { margin: 0; color: var(--muted); }

.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(180px, 1.3fr);
  gap: 12px;
  margin-bottom: 14px;
}

label { display: grid; gap: 6px; font-weight: 600; font-size: 0.92rem; }

input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #c5d4c6;
  border-radius: 12px;
  background: #fff;
}

textarea { min-height: 96px; resize: vertical; }

.filters-search { grid-column: auto; }

.panel { padding: 16px; margin-bottom: 16px; }

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

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

.choices { display: flex; flex-wrap: wrap; gap: 12px 18px; min-height: 44px; align-items: center; }

.choices label { display: flex; align-items: center; gap: 8px; font-weight: 600; }

.choices input { width: 18px; height: 18px; min-height: 0; }

.field-error {
  margin: 8px 0 0;
  color: var(--red-700);
  font-weight: 700;
}

.help { margin: 0; color: var(--muted); font-size: 0.9rem; }

.sol-head { margin: 4px 0 18px; }

.sol-head h2 { margin: 0 0 6px; font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 1.7rem); }

.sol-head p { margin: 0; color: var(--muted); }

.sol-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

.sol-card { display: grid; gap: 16px; margin: 0; padding: 20px; }

.sol-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #3b693c;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sol-title .icon { width: 18px; height: 18px; }

.sol-field { margin: 0; padding: 0; border: 0; min-width: 0; }

.sol-field legend { margin-bottom: 8px; padding: 0; font-weight: 600; font-size: 0.92rem; }

.sol-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.sol-chip, .sol-urg-card { position: relative; cursor: pointer; }

.sol-chip input, .sol-urg-card input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.sol-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid #c5d4c6;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sol-chip:hover span { border-color: #3b693c; }

.sol-chip:has(input:checked) span { background: #3b693c; border-color: #3b693c; color: #fff; }

.sol-chip:has(input:focus-visible) span,
.sol-urg-card:has(input:focus-visible) { outline: 3px solid #3b693c; outline-offset: 2px; }

.sol-urg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.sol-urg-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid #c5d4c6;
  border-radius: 12px;
  background: #fff;
  font-weight: 400;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sol-urg-card strong { display: block; font-size: 0.9rem; }

.sol-urg-card small { display: block; color: var(--muted); font-size: 0.8rem; }

.sol-dot { width: 10px; height: 10px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; }

.sol-urg-inmediata .sol-dot { background: #de3d25; }
.sol-urg-inmediata strong { color: #a52a17; }
.sol-urg-inmediata:has(input:checked) { background: var(--red-50); border-color: #de3d25; }

.sol-urg-alta .sol-dot { background: #f6d600; box-shadow: 0 0 0 1px #c9ae00; }
.sol-urg-alta strong { color: #6b5800; }
.sol-urg-alta:has(input:checked) { background: var(--yellow-50); border-color: #c9ae00; }

.sol-urg-media .sol-dot { background: #6ead3b; }
.sol-urg-media strong { color: #3b693c; }
.sol-urg-media:has(input:checked) { background: var(--green-100); border-color: #6ead3b; }

.sol-urg-baja .sol-dot { background: #3b693c; }
.sol-urg-baja strong { color: #2d4f2f; }
.sol-urg-baja:has(input:checked) { background: var(--green-50); border-color: #3b693c; }

.sol-flow { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }

.sol-flow .sol-title { margin-bottom: 12px; }

.sol-flow ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.sol-flow li { position: relative; padding-left: 22px; }

.sol-flow li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c5d4c6;
}

.sol-flow li.is-done::before { background: #3b693c; }

.sol-flow strong { display: block; font-size: 0.9rem; }

.sol-flow small { display: block; color: var(--muted); font-size: 0.82rem; }

.sol-submit { width: 100%; min-height: 52px; font-size: 1rem; }

.sol-exito {
  max-width: 560px;
  margin: 8px auto 0;
  padding: 28px 24px;
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.sol-exito-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #3b693c;
  color: #fff;
}

.sol-exito-icon .icon { width: 32px; height: 32px; }

.sol-exito h3 { margin: 0; font-family: var(--display); font-size: 1.4rem; }

.sol-exito h3:focus { outline: none; }

.sol-exito p { margin: 0; color: var(--muted); }

.sol-resumen { width: 100%; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }

.sol-resumen div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; }

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

.sol-resumen dt { color: var(--muted); font-weight: 600; }

.sol-resumen dd { margin: 0; font-weight: 700; text-align: right; }

.sol-seguimiento { margin-top: 28px; }

.sol-seguimiento .help { margin-bottom: 12px; }

.sol-filtros { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-bottom: 12px; }

.sol-cargando { display: flex; align-items: center; gap: 8px; padding: 16px 0; }

.zm-estado {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.zm-nuevo { background: var(--yellow-50); color: #6b5800; border: 1px solid #e6c200; }

.zm-abierto { background: var(--green-100); color: #2d4f2f; border: 1px solid #6ead3b; }

.zm-pendiente { background: #fff; color: #3b693c; border: 1px solid #3b693c; }

.zm-cerrado { background: #3b693c; color: #fff; border: 1px solid #3b693c; }

.zm-otro { background: #fff; color: var(--muted); border: 1px solid var(--line); }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; }

table { width: 100%; border-collapse: collapse; min-width: 720px; }

th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }

th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.acciones { display: flex; flex-wrap: wrap; gap: 8px; }

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.empty { padding: 28px 16px; text-align: center; }

.empty h3 { margin: 0 0 6px; font-family: var(--display); }

.empty p { margin: 0 0 12px; color: var(--muted); }

.btn {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 8px 14px;
  font-weight: 700;
  background: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-4px);
  box-shadow: 0 12px 22px rgba(59, 105, 60, 0.22);
}

.btn:active:not(:disabled) { transform: translateY(-1px); }

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn.is-busy { opacity: 0.85; cursor: progress; }

.spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: girar 0.7s linear infinite;
}

@keyframes girar { to { transform: rotate(360deg); } }

.btn-primary { background: var(--green-700); color: #fff; }

.btn-primary:hover { background: var(--green-800); }

.btn-ghost { border-color: var(--line); color: var(--green-800); }

.btn-danger { background: var(--red-50); color: #9f2a18; border-color: #f0b2a8; }

.menu-btn {
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green-800);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--green-50);
  color: var(--green-800);
}

.status-en-construccion { background: var(--yellow-50); color: var(--ink); }

.status-entregado { background: var(--green-700); color: #fff; }

.status-cancelado { background: var(--red-50); color: #9f2a18; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }

.stepper { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }

.stepper li {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
}

.stepper .is-done { background: var(--green-50); color: var(--green-800); border-color: #c5ddb8; }

.stepper .is-current { background: var(--green-700); color: #fff; border-color: var(--green-700); }

.thread { display: grid; gap: 10px; margin: 12px 0; }

.comment { background: var(--green-50); border-radius: 14px; padding: 12px 14px; }

.comment header { display: flex; justify-content: space-between; gap: 8px; font-size: 0.85rem; }

.comment p { margin: 6px 0 0; }

.comment-sistema { background: #f7f7f5; }

.stars { display: flex; gap: 6px; }

.star {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: #8aa18c;
}

.star.is-on { color: var(--green-700); background: var(--green-50); border-color: #b7cdb8; }

.star.is-on svg { fill: currentColor; }

.texto { white-space: pre-wrap; }

.star svg { width: 22px; height: 22px; }

.legend { padding: 16px; }

.legend ol { margin: 8px 0 0; padding-left: 18px; }

.legend li { margin: 6px 0; }

.link-row { margin-top: 18px; }

.icon { width: 20px; height: 20px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(18, 32, 20, 0.55);
}

.modal {
  width: min(480px, 100%);
  max-height: min(86dvh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 22px;
}

.modal h2 { font-family: var(--display); margin: 0 0 8px; }

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100% - 32px));
}

.toast {
  background: #fff;
  border-left: 4px solid var(--green-700);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.toast-error { border-left-color: var(--red-700); }

.toast-info { border-left-color: #8a6a00; }

.idle-banner {
  position: fixed;
  z-index: 85;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--yellow-50);
  color: var(--ink);
  border: 1px solid #e6c200;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.idle-banner p { margin: 0; }

body.modal-open { overflow: hidden; }

.recent { display: grid; gap: 8px; }

.recent a, .ticket-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.recent a:hover, .ticket-line:hover { border-color: #b7cdb8; }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .menu-btn { display: grid; }
  .sidebar {
    position: fixed;
    z-index: 30;
    width: min(300px, 88vw);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .sidebar.is-open { transform: none; }
  .welcome { grid-template-columns: 1fr; justify-items: center; }
  .welcome-intro { align-items: center; text-align: center; }
  .hub-grid { grid-template-columns: 1fr 1fr; }
  .sol-grid { grid-template-columns: 1fr; }
  .hub-request { flex-direction: column; align-items: stretch; }
  .hub-request-actions { justify-content: flex-start; }
}

@media (max-width: 700px) {
  .form-grid, .filters, .stat-grid, .hub-grid, .sol-urg, .sol-filtros { grid-template-columns: 1fr; }
  .contenido { padding: 8px 14px 24px; }
  .app-footer { padding: 14px 14px 16px; }
  .topbar { padding: 12px 14px; align-items: flex-start; }
  .top-actions { width: 100%; margin-left: 0; justify-content: flex-end; }
  .user-chip { display: none; }
  table { min-width: 0; }
  .table-wrap { overflow: visible; border: 0; background: transparent; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    padding: 6px 12px;
  }
  td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 8px 0;
  }
  td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--muted);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .module-card:hover, .hub-card:hover, .nav-link:hover, .btn:hover, .btn:active { transform: none; }
}
