
:root {
    --acab-bg: #f3f6fb;
    --acab-surface: #ffffff;
    --acab-surface-soft: #eef3fb;
    --acab-border: #d8e0ee;
    --acab-text: #1e293b;
    --acab-muted: #64748b;
    --acab-primary: #224b90;
    --acab-primary-soft: #e8eefb;
    --acab-accent: #eff6ff;
    --acab-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --acab-radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; font-family: Inter, Segoe UI, Roboto, Arial, sans-serif; color:var(--acab-text); background:var(--acab-bg); }
a { color: var(--acab-primary); text-decoration:none; }
a:hover { text-decoration:none; }
.acab-shell { min-height:100vh; display:grid; grid-template-columns: 270px 1fr; }
.acab-sidebar { background: linear-gradient(180deg, #182235 0%, #101827 100%); color:#fff; padding:28px 20px; position:sticky; top:0; height:100vh; }
.acab-brand { margin-bottom:32px; }

.acab-brand--sidebar { margin-bottom:24px; }
.acab-brand__logo { display:block; max-width:100%; height:auto; background:#fff; border-radius:18px; padding:10px 12px; box-shadow:0 12px 30px rgba(15,23,42,.18); }
.acab-brand__sub--sidebar { margin-top:12px; color:rgba(255,255,255,.72); font-size:.88rem; line-height:1.35; }
.acab-brand--login { margin-bottom:8px; }
.acab-brand__logo--login { max-width:min(100%, 460px); margin:0 auto; border-radius:18px; background:#fff; padding:10px 12px; box-shadow:0 20px 60px rgba(15,23,42,.10); }
.acab-brand__siglas { font-size:1.8rem; font-weight:800; letter-spacing:.08em; }
.acab-brand__sub { margin-top:8px; font-size:.92rem; color:rgba(255,255,255,.72); }
.acab-nav { display:grid; gap:8px; }
.acab-nav__item { display:block; padding:12px 14px; border-radius:14px; color:rgba(255,255,255,.9); }
.acab-nav__item:hover, .acab-nav__item.is-active { background:rgba(255,255,255,.08); }
.acab-main { display:flex; flex-direction:column; }
.acab-topbar { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; padding:20px 28px; background:rgba(255,255,255,.78); border-bottom:1px solid rgba(216,224,238,.9); backdrop-filter: blur(10px); position:sticky; top:0; z-index:10; }
.acab-topbar__title { font-size:1.15rem; font-weight:700; }
.acab-topbar__subtitle { font-size:.92rem; color:var(--acab-muted); margin-top:4px; }
.acab-topbar__user { color:var(--acab-muted); white-space:nowrap; }
.acab-page { padding:28px; }
.acab-page-header { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; margin-bottom:22px; }
.acab-page-header__eyebrow, .acab-expediente-header__eyebrow { text-transform:uppercase; letter-spacing:.08em; color:var(--acab-muted); font-size:.75rem; font-weight:700; }
.acab-page-header__title, .acab-expediente-header__title { margin:6px 0 0; font-size:2rem; }
.acab-page-header__subtitle, .acab-expediente-header__subject { color:var(--acab-muted); margin-top:10px; font-size:1rem; max-width:900px; }
.acab-page-header__actions, .acab-actions-bar, .acab-stack-buttons { display:flex; gap:12px; flex-wrap:wrap; }
.acab-card, .acab-expediente-header, .acab-summary-strip, .acab-tabs__nav { background:var(--acab-surface); border:1px solid var(--acab-border); border-radius:var(--acab-radius); box-shadow:var(--acab-shadow); }
.acab-card { padding:22px; }
.acab-card--padless { padding:0; overflow:hidden; }
.acab-card--filters { margin-bottom:16px; }
.acab-breadcrumbs { color:var(--acab-muted); margin-bottom:14px; font-size:.92rem; }
.acab-expediente-header { padding:24px; display:flex; justify-content:space-between; gap:20px; align-items:flex-start; margin-bottom:16px; }
.acab-expediente-header__meta { display:flex; gap:10px; flex-wrap:wrap; }
.acab-badge { display:inline-flex; align-items:center; padding:8px 12px; border-radius:999px; background:var(--acab-surface-soft); color:var(--acab-text); font-size:.92rem; }
.acab-badge--state { background:var(--acab-primary-soft); color:var(--acab-primary); font-weight:700; }
.acab-summary-strip { display:grid; grid-template-columns:repeat(4,1fr); overflow:hidden; margin-bottom:16px; }
.acab-summary-strip__item { padding:18px 20px; border-right:1px solid var(--acab-border); }
.acab-summary-strip__item:last-child { border-right:0; }
.acab-summary-strip__label { display:block; color:var(--acab-muted); font-size:.88rem; margin-bottom:6px; }
.acab-summary-strip__value { font-weight:700; }
.acab-actions-bar { padding:16px; margin-bottom:16px; }
.acab-btn { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 16px; border-radius:12px; border:1px solid var(--acab-border); background:#fff; color:var(--acab-text); font-weight:700; }
.acab-btn:hover { border-color:#b9c5db; }
.acab-btn--primary { background:var(--acab-primary); color:#fff; border-color:var(--acab-primary); }
.acab-btn--small { min-height:34px; padding:0 12px; font-size:.92rem; }
.acab-tabs__nav { display:flex; gap:8px; padding:10px; margin-bottom:16px; overflow:auto; }
.acab-tab-btn { display:inline-flex; padding:12px 16px; border-radius:12px; color:var(--acab-muted); font-weight:700; white-space:nowrap; }
.acab-tab-btn.is-active, .acab-tab-btn:hover { background:var(--acab-primary-soft); color:var(--acab-primary); }
.acab-grid { display:grid; gap:16px; }
.acab-grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.acab-card--full { grid-column:1 / -1; }
.acab-section-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.acab-section-heading h2 { margin:0; font-size:1.1rem; }
.acab-stat-grid { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:16px; margin-bottom:16px; }
.acab-stat-card { background:linear-gradient(180deg, #fff 0%, #f8fbff 100%); border:1px solid var(--acab-border); border-radius:18px; box-shadow:var(--acab-shadow); padding:20px; }
.acab-stat-card__label { color:var(--acab-muted); font-size:.9rem; margin-bottom:8px; }
.acab-stat-card__value { font-size:2rem; font-weight:800; }
.acab-stat-card__note { color:var(--acab-muted); margin-top:6px; }
.acab-list { display:grid; gap:12px; }
.acab-list-item { display:flex; justify-content:space-between; gap:12px; padding:14px; border-radius:14px; background:var(--acab-surface-soft); color:var(--acab-text); }
.acab-list-item__title { font-weight:700; margin-bottom:4px; }
.acab-list-item__text, .acab-list-item__meta { color:var(--acab-muted); }
.acab-timeline { display:grid; gap:14px; }
.acab-timeline-item { display:grid; gap:4px; padding:12px 0; border-bottom:1px solid var(--acab-border); }
.acab-timeline-item:last-child { border-bottom:0; }
.acab-timeline-item__date, .acab-timeline-item__meta { color:var(--acab-muted); font-size:.9rem; }
.acab-keyfacts { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; }
.acab-keyfacts div { background:var(--acab-surface-soft); border-radius:14px; padding:14px; }
.acab-keyfacts span { display:block; color:var(--acab-muted); font-size:.88rem; margin-bottom:6px; }
.acab-keyfacts strong { font-size:1rem; }
.acab-checklist, .acab-steps { margin:0; padding-left:18px; display:grid; gap:10px; }
.acab-mini-table { display:grid; gap:10px; }
.acab-mini-table__row { display:flex; justify-content:space-between; gap:12px; padding:12px 14px; background:var(--acab-surface-soft); border-radius:14px; }
.acab-mini-table__main { font-weight:600; }
.acab-mini-table__side { color:var(--acab-muted); }
.acab-pills { display:flex; flex-wrap:wrap; gap:10px; }
.acab-pill { display:inline-flex; padding:10px 14px; border-radius:999px; background:var(--acab-surface-soft); }
.acab-table { width:100%; border-collapse:collapse; }
.acab-table th, .acab-table td { text-align:left; padding:16px 18px; border-bottom:1px solid var(--acab-border); vertical-align:top; }
.acab-table th { background:#f8fbff; color:var(--acab-muted); font-size:.88rem; text-transform:uppercase; letter-spacing:.04em; }
.acab-table tr:last-child td { border-bottom:0; }
.acab-table__muted { color:var(--acab-muted); font-size:.9rem; }
.acab-table__actions { width:110px; }
.acab-filter-row { display:grid; grid-template-columns:2fr 1fr 1fr auto; gap:16px; align-items:end; }
.acab-filter label, .acab-field label, .acab-field-read label { display:block; color:var(--acab-muted); font-size:.88rem; margin-bottom:6px; }
.acab-filter input, .acab-filter select, .acab-field input, .acab-field select, .acab-field textarea { width:100%; border:1px solid var(--acab-border); border-radius:12px; min-height:44px; padding:10px 12px; background:#fff; font:inherit; }
.acab-field textarea { min-height:120px; resize:vertical; }
.acab-form-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px; }
.acab-field--full, .acab-field-read--full { grid-column:1 / -1; }
.acab-form-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:18px; }
.acab-field-read { background:var(--acab-surface-soft); padding:14px; border-radius:14px; }
.acab-inline-note { margin-bottom:16px; background:var(--acab-accent); border:1px solid var(--acab-border); padding:14px 16px; border-radius:14px; }
@media (max-width: 1100px) {
    .acab-shell { grid-template-columns:1fr; }
    .acab-sidebar { position:relative; height:auto; }
    .acab-stat-grid, .acab-grid--2, .acab-summary-strip, .acab-filter-row, .acab-form-grid { grid-template-columns:1fr; }
    .acab-summary-strip__item { border-right:0; border-bottom:1px solid var(--acab-border); }
    .acab-summary-strip__item:last-child { border-bottom:0; }
    .acab-page-header, .acab-expediente-header, .acab-topbar { flex-direction:column; align-items:flex-start; }
}


.acab-topbar__right { display:flex; align-items:center; gap:12px; }
.acab-messages { display:grid; gap:10px; margin-bottom:18px; }
.acab-message { border-radius:12px; padding:12px 14px; font-size:14px; }
.acab-message--success { background:#e8f7ec; color:#1f6b2a; }
.acab-message--error { background:#fdecec; color:#8b1f1f; }
.acab-message--info { background:#edf4ff; color:#1a4b8f; }
.acab-help { font-size:13px; color:#6b7280; margin-top:6px; }
.acab-error { font-size:13px; color:#b42318; margin-top:6px; }
.acab-empty, .acab-empty-cell { color:#6b7280; padding:12px 0; }
.acab-empty-cell { text-align:center; }
.acab-inline-note { margin-bottom:16px; padding:12px 14px; border-radius:12px; background:#f6f7fb; color:#334155; }
.acab-login-body { margin:0; min-height:100vh; display:flex; align-items:center; justify-content:center; background:#eef2f7; font-family:Inter, system-ui, sans-serif; }
.acab-login-card { width:min(440px, 92vw); background:#fff; border-radius:24px; padding:32px; box-shadow:0 20px 60px rgba(15,23,42,.12); }
.acab-login-title { margin:18px 0 18px; font-size:28px; }
.acab-login-form { display:grid; gap:14px; }
.acab-brand--center { text-align:center; }
.acab-btn--full { width:100%; justify-content:center; }
.acab-field input, .acab-field textarea, .acab-field select { width:100%; box-sizing:border-box; }


.acab-results-bar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:12px 0 14px; padding:0 2px; }
.acab-results-bar__count { font-size:.98rem; }
.acab-results-bar__range, .acab-results-bar__meta { color:var(--acab-muted); }
.acab-pagination { margin-top:16px; display:flex; justify-content:space-between; align-items:center; gap:16px; }
.acab-pagination__summary, .acab-pagination__status { color:var(--acab-muted); }
.acab-pagination__controls { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.acab-btn--disabled { background:#f8fafc; color:#94a3b8; border-color:#dbe3f0; pointer-events:none; }
@media (max-width: 1100px) {
  .acab-results-bar, .acab-pagination { flex-direction:column; align-items:flex-start; }
}

.acab-badge--firm { background:#eef2ff; color:#3730a3; }
.acab-badge--firm.preparado, .acab-badge--firm.preparado_para_firma { background:#fff7ed; color:#9a3412; }
.acab-badge--firm.en_proceso { background:#eff6ff; color:#1d4ed8; }
.acab-badge--firm.firmado { background:#ecfdf3; color:#166534; }
.acab-badge--firm.error { background:#fef2f2; color:#b91c1c; }
.acab-badge--firm.cancelado { background:#f8fafc; color:#475569; }
.acab-badge--firm.no_iniciado { background:#f1f5f9; color:#475569; }
.acab-card-header-lite { padding:16px 18px; border-bottom:1px solid var(--acab-border); background:#f8fbff; }
.acab-card-header-lite h2 { margin:0; font-size:1rem; }
.acab-space-bottom { margin-bottom:16px; }
.acab-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:.95rem; word-break: break-all; }
.acab-form-grid--single { grid-template-columns:1fr; }
.acab-form-actions--left { justify-content:flex-start; }
.acab-actions-bar--compact { padding:0; margin-top:16px; }
.acab-table code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:.88rem; }
.acab-message--warning { background:#fff7ed; color:#9a3412; }
.acab-help--error { color:#b42318; }

.acab-subtabs {
  display: flex;
  gap: .75rem;
  margin: 0 0 1rem;
  border-bottom: 1px solid #d9dde7;
  padding-bottom: .5rem;
}

.acab-subtabs__item {
  display: inline-flex;
  align-items: center;
  padding: .6rem .9rem;
  border-radius: .75rem;
  text-decoration: none;
  color: #334155;
  background: #f8fafc;
  border: 1px solid transparent;
}

.acab-subtabs__item.is-active {
  background: #eef4ff;
  color: #163e8c;
  border-color: #bfd0f7;
  font-weight: 600;
}

.acab-card--editor {
  min-height: 78vh;
}

.acab-editor-root {
  display: block;
  width: 100%;
  height: 78vh;
  min-height: 720px;
  border: 1px solid #d9dde7;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
}

@media (max-width: 1200px) {
  .acab-editor-root {
    height: 74vh;
    min-height: 640px;
  }
}

@media (max-width: 768px) {
  .acab-editor-root {
    height: 68vh;
    min-height: 520px;
  }
}


.acab-pdf-viewer-shell {
  width: 100%;
  height: 78vh;
  min-height: 720px;
  border: 1px solid #d9dde7;
  border-radius: 1rem;
  overflow: hidden;
  background: #f8fafc;
}

.acab-pdf-viewer-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

@media (max-width: 1200px) {
  .acab-pdf-viewer-shell {
    height: 74vh;
    min-height: 640px;
  }
}

@media (max-width: 768px) {
  .acab-pdf-viewer-shell {
    height: 68vh;
    min-height: 520px;
  }
}

.acab-reject-box {
  display: grid;
  gap: .5rem;
}

.acab-reject-box label {
  font-size: .9rem;
  color: #475569;
}

.acab-team-kpis {
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}

.acab-team-kpi {
  background:linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  border:1px solid var(--acab-border);
  border-radius:16px;
  padding:16px 18px;
}

.acab-team-kpi__label {
  display:block;
  color:var(--acab-muted);
  font-size:.88rem;
  margin-bottom:8px;
}

.acab-team-kpi__value {
  font-size:1.55rem;
  font-weight:800;
}

.acab-team-layout {
  display:grid;
  grid-template-columns:minmax(280px, 1.15fr) minmax(320px, 1fr);
  gap:16px;
  margin-bottom:18px;
}

.acab-team-hero,
.acab-team-group {
  border:1px solid var(--acab-border);
  border-radius:18px;
  background:#fff;
}

.acab-team-hero {
  padding:20px;
  background:linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.acab-team-hero__eyebrow {
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--acab-muted);
  font-size:.74rem;
  font-weight:700;
  margin-bottom:12px;
}

.acab-team-hero__header {
  margin-bottom:14px;
}

.acab-team-groups {
  display:grid;
  gap:16px;
}

.acab-team-group__head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:16px 18px;
  border-bottom:1px solid var(--acab-border);
  background:#f8fbff;
}

.acab-team-group__head h3 {
  margin:0;
  font-size:1rem;
}

.acab-team-group__list {
  display:grid;
  gap:10px;
  padding:16px;
}

.acab-team-person {
  padding:12px 14px;
  border-radius:14px;
  background:var(--acab-surface-soft);
}

.acab-team-person--hero {
  background:#edf4ff;
  border:1px solid #c9d9f8;
}

.acab-team-person__name {
  font-weight:700;
  margin-bottom:4px;
}

.acab-team-person__meta {
  color:var(--acab-muted);
  font-size:.9rem;
}

.acab-badge--role {
  font-weight:700;
}

.acab-badge--responsable {
  background:#e8eefb;
  color:#224b90;
}

.acab-badge--apoyo {
  background:#eefbf3;
  color:#166534;
}

.acab-badge--supervision {
  background:#f5f3ff;
  color:#6d28d9;
}

.acab-badge--active {
  background:#ecfdf3;
  color:#166534;
  font-weight:700;
}

.acab-team-empty {
  padding:24px;
  border:1px dashed #bfd0f7;
  border-radius:18px;
  background:#f8fbff;
  margin-bottom:16px;
}

.acab-team-empty__title {
  font-weight:800;
  margin-bottom:8px;
}

.acab-team-empty__text {
  color:var(--acab-muted);
}

@media (max-width: 1100px) {
  .acab-team-kpis,
  .acab-team-layout {
    grid-template-columns:1fr;
  }
}

.acab-tags{display:flex;flex-wrap:wrap;gap:.5rem}.acab-badge{display:inline-flex;align-items:center;padding:.35rem .65rem;border-radius:999px;font-size:.88rem;font-weight:600}.acab-badge--muted{background:#eef2f7;color:#35506b}
.acab-badge--link{text-decoration:none;border:1px solid var(--acab-border);transition:background .15s ease,color .15s ease,border-color .15s ease}.acab-badge--link:hover{background:var(--acab-primary-soft);color:var(--acab-primary);border-color:var(--acab-primary-soft)}


.acab-form-grid--tasks {
  grid-template-columns: 2fr 1fr 1fr;
  align-items: end;
}

.acab-field--checkbox {
  background: var(--acab-surface-soft);
  padding: 14px;
  border-radius: 14px;
}

.acab-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--acab-text);
}

.acab-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.acab-list--tasks {
  gap: 12px;
}

.acab-task-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--acab-border);
  border-radius: 16px;
  background: #fff;
}

.acab-task-item.is-done {
  background: #f8fbff;
}

.acab-task-item__main {
  display: grid;
  gap: 6px;
}

.acab-task-item__title {
  font-weight: 700;
}

.acab-task-item.is-done .acab-task-item__title {
  text-decoration: line-through;
  color: var(--acab-muted);
}

.acab-task-item__meta {
  color: var(--acab-muted);
  font-size: .92rem;
}

.acab-task-item__side {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.acab-checkbox-row--task {
  font-weight: 700;
}

.acab-task-toggle-form {
  margin: 0;
}

@media (max-width: 1100px) {
  .acab-form-grid--tasks {
    grid-template-columns: 1fr;
  }
  .acab-task-item {
    flex-direction: column;
    align-items: flex-start;
  }
}


.acab-card--editor-page {
  padding: 18px;
}

.acab-editor-toolbar {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.acab-editor-shell {
  position: relative;
  width: 100%;
  height: calc(100vh - 260px);
  min-height: 720px;
}

.acab-editor-root--full {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 720px;
  border: 1px solid #d9dde7;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
}

@media (max-width: 1100px) {
  .acab-editor-toolbar { flex-direction:column; align-items:flex-start; }
  .acab-editor-shell { height: calc(100vh - 220px); min-height: 640px; }
  .acab-editor-root--full { min-height: 640px; }
}
