/* Base interna COMMADIS. Se carga después de Bootstrap y AdminLTE. */
body.dark-mode, body.acrd-light-mode {
    --acrd-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --acrd-font-sm: .8125rem; --acrd-font-base: .9375rem; --acrd-font-lg: 1.125rem;
    --acrd-primary: #426ee8; --acrd-primary-hover: #3158c8;
    --acrd-success-color: #16874b; --acrd-danger-color: #d6324a;
    --acrd-warning-color: #e8a000; --acrd-info-color: #087f9e;
    --acrd-space-1: .25rem; --acrd-space-2: .5rem; --acrd-space-3: .75rem;
    --acrd-space-4: 1rem; --acrd-space-6: 1.5rem;
    --acrd-radius-sm: 6px; --acrd-radius-md: 10px; --acrd-radius-lg: 14px;
}
body.dark-mode .acrd-shell, body.acrd-light-mode .acrd-shell { font-family: var(--acrd-font); font-size: var(--acrd-font-base); line-height: 1.5; }
body.dark-mode .acrd-shell button, body.acrd-light-mode .acrd-shell button,
body.dark-mode .acrd-shell input, body.acrd-light-mode .acrd-shell input,
body.dark-mode .acrd-shell select, body.acrd-light-mode .acrd-shell select,
body.dark-mode .acrd-shell textarea, body.acrd-light-mode .acrd-shell textarea { font-family: var(--acrd-font); }
body.dark-mode .acrd-shell .btn, body.acrd-light-mode .acrd-shell .btn { border-radius: var(--acrd-radius-sm); font-weight: 600; }
body.dark-mode .acrd-shell .btn-primary, body.acrd-light-mode .acrd-shell .btn-primary { background: var(--acrd-primary); border-color: var(--acrd-primary); color: #fff; }
body.dark-mode .acrd-shell .btn-primary:hover, body.acrd-light-mode .acrd-shell .btn-primary:hover { background: var(--acrd-primary-hover); border-color: var(--acrd-primary-hover); }
body.dark-mode .acrd-shell .btn-success, body.acrd-light-mode .acrd-shell .btn-success { background: var(--acrd-success-color); border-color: var(--acrd-success-color); color: #fff; }
body.dark-mode .acrd-shell .btn-danger, body.acrd-light-mode .acrd-shell .btn-danger { background: var(--acrd-danger-color); border-color: var(--acrd-danger-color); color: #fff; }
body.dark-mode .acrd-shell .btn-warning, body.acrd-light-mode .acrd-shell .btn-warning { background: var(--acrd-warning-color); border-color: var(--acrd-warning-color); color: #17233b; }
body.dark-mode .acrd-shell .btn-info, body.acrd-light-mode .acrd-shell .btn-info { background: var(--acrd-info-color); border-color: var(--acrd-info-color); color: #fff; }
.acrd-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.25em; line-height: 1; }
.acrd-tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--acrd-border); }
.acrd-tabs button { flex: none; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--acrd-text-muted); padding: .75rem 1rem; font: inherit; cursor: pointer; }
.acrd-tabs button[aria-pressed="true"] { color: var(--acrd-primary); border-bottom-color: var(--acrd-primary); font-weight: 600; }
.acrd-tabs button:focus-visible, .acrd-shell .btn:focus-visible { outline: 2px solid var(--acrd-primary); outline-offset: 2px; }
@media (min-width: 992px) {
  body.acrd-light-mode .main-sidebar { width: 290px !important; }
  body.acrd-light-mode .main-header, body.acrd-light-mode .content-wrapper, body.acrd-light-mode .main-footer { margin-left: 290px !important; }
}
body.acrd-light-mode .main-header { min-height: 103px !important; height: 103px !important; padding: 0 2rem !important; display: flex; align-items: center; }
body.acrd-light-mode .content-wrapper > .content { padding: 1.55rem 2.05rem 2.5rem !important; }
@media (max-width: 768px) {
  body.acrd-light-mode .main-header { height: 64px !important; min-height: 64px !important; padding: 0 1rem !important; }
  body.acrd-light-mode .content-wrapper > .content { padding: .8rem !important; }
}

/* Encabezados y listas reutilizables */
.acrd-module-header .acrd-header-content { min-width: 0; }
.acrd-header-meta { display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; margin-top:.35rem; }
.acrd-header-subtitle { color:var(--acrd-text-muted); font-size:var(--acrd-font-sm); margin-top:.3rem; }
.acrd-header-actions { align-items:center; }
.acrd-record-list { list-style:none; margin:0; padding:0; }
.acrd-record-list-item { padding:.8rem 1rem; border-bottom:1px solid var(--acrd-border); }
.acrd-record-list-item:last-child { border-bottom:0; }
.acrd-empty-state, .acrd-list-loading { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.5rem; padding:2rem 1rem; color:var(--acrd-text-muted); text-align:center; }
.acrd-empty-state strong { color:var(--acrd-text); }
.acrd-empty-state p { margin:0; }
.acrd-empty-state-icon { font-size:1.5rem; }
.acrd-empty-state-actions { margin-top:.5rem; }
@media(max-width:575px) { .acrd-module-header .acrd-header-actions { justify-content:flex-start!important; width:100%; margin-top:.75rem; } }

/* Formularios y tablas de la base compartida */
.acrd-field { margin-bottom: 1rem; }
.acrd-field .form-label { font-size:var(--acrd-font-sm); font-weight:600; color:var(--acrd-text); }
.acrd-field-hint { margin-top:.25rem; font-size:var(--acrd-font-sm); color:var(--acrd-text-muted); }
.acrd-static-table { overflow-x:auto; }
.acrd-static-table .table { --bs-table-bg:transparent; --bs-table-color:var(--acrd-text); --bs-table-border-color:var(--acrd-border); }
@media print { .acrd-static-table { overflow:visible; } .acrd-static-table .table { color:#000; } }
body.acrd-light-mode { --acrd-grid-header:#f5f7fc; --acrd-input-bg:#fff; }
body.dark-mode { --acrd-grid-header:#121827; --acrd-input-bg:#121827; }

/* Estructura de navegación basada en AdminLTE 3. */
body.dark-mode { --acrd-bg:#252d3a; --acrd-sidebar:#283545; --acrd-card:#303b4c; --acrd-card-hdr:#344052; --acrd-border:#4b5b70; --acrd-text:#f1f4f8; --acrd-text-muted:#c0ccda; --acrd-grid-header:#283545; --acrd-input-bg:#283545; }
body.dark-mode .main-sidebar { background:#283545 !important; border-right:0; }
body.dark-mode .main-sidebar .brand-link { background:#283545 !important; border-bottom:1px solid #4b5b70 !important; }
body.dark-mode .main-header { background:#303b4c !important; border-bottom:1px solid #4b5b70 !important; }
body.dark-mode .page-header { background:#303b4c !important; border-color:#4b5b70 !important; }
body.dark-mode .main-sidebar .nav-sidebar > .nav-item > .nav-link { margin:.12rem 0; border-radius:.25rem; }
body.dark-mode .main-sidebar .nav-sidebar > .nav-item > .nav-link.active { background:#426ee8 !important; box-shadow:none; }
body.dark-mode .main-sidebar .nav-treeview > .nav-item > .nav-link { margin:.12rem 0; }
body.acrd-light-mode .main-sidebar { background:#343a40 !important; }
body.acrd-light-mode .main-sidebar .brand-link { background:#343a40 !important; border-color:#4b545c; }
body.dark-mode .main-sidebar .brand-link, body.acrd-light-mode .main-sidebar .brand-link { height:auto; min-height:57px; padding:.8125rem .5rem !important; }
body.dark-mode .main-header, body.acrd-light-mode .main-header { height:auto !important; min-height:57px !important; padding:.5rem 1rem !important; }
body.dark-mode .content-wrapper > .content, body.acrd-light-mode .content-wrapper > .content { padding:1rem 1rem 2rem !important; }
@media (min-width:992px) {
  body.dark-mode .main-sidebar, body.acrd-light-mode .main-sidebar { width:250px !important; }
  body.dark-mode.sidebar-collapse .main-sidebar:not(:hover), body.acrd-light-mode.sidebar-collapse .main-sidebar:not(:hover) { width:4.6rem !important; }
  body.dark-mode:not(.sidebar-collapse) .main-header, body.dark-mode:not(.sidebar-collapse) .content-wrapper, body.dark-mode:not(.sidebar-collapse) .main-footer,
  body.acrd-light-mode:not(.sidebar-collapse) .main-header, body.acrd-light-mode:not(.sidebar-collapse) .content-wrapper, body.acrd-light-mode:not(.sidebar-collapse) .main-footer { margin-left:250px !important; }
  body.dark-mode.sidebar-collapse .main-header, body.dark-mode.sidebar-collapse .content-wrapper, body.dark-mode.sidebar-collapse .main-footer,
  body.acrd-light-mode.sidebar-collapse .main-header, body.acrd-light-mode.sidebar-collapse .content-wrapper, body.acrd-light-mode.sidebar-collapse .main-footer { margin-left:4.6rem !important; }
}
@media (max-width:991.98px) {
  body.dark-mode .main-header, body.dark-mode .content-wrapper, body.dark-mode .main-footer,
  body.acrd-light-mode .main-header, body.acrd-light-mode .content-wrapper, body.acrd-light-mode .main-footer { margin-left:0 !important; }
}

/* Navbar y marca comparten altura en ambos temas. */
body.dark-mode .main-header, body.acrd-light-mode .main-header { height:64px !important; min-height:64px !important; padding:0 1rem !important; align-items:center; }
body.dark-mode .main-header .navbar-nav, body.acrd-light-mode .main-header .navbar-nav { align-items:center; }
body.dark-mode .main-header .navbar-nav > .nav-item, body.acrd-light-mode .main-header .navbar-nav > .nav-item { display:flex; align-items:center; }
body.dark-mode .main-header .nav-link, body.acrd-light-mode .main-header .nav-link { height:auto; display:flex; align-items:center; }
body.dark-mode .main-sidebar .brand-link, body.acrd-light-mode .main-sidebar .brand-link { height:64px; min-height:64px; box-sizing:border-box; }

/* Geometría compartida: el tema solo cambia colores y superficies. */
body.dark-mode .acrd-shell .page-header, body.acrd-light-mode .acrd-shell .page-header { min-height:84px; padding:1.05rem 1.25rem !important; border:1px solid var(--acrd-border) !important; border-radius:var(--acrd-radius-lg) !important; box-shadow:var(--acrd-shadow) !important; }
body.dark-mode .acrd-shell .page-header h4, body.acrd-light-mode .acrd-shell .page-header h4 { font-size:1.28rem; letter-spacing:-.02em; color:var(--acrd-text) !important; }
body.dark-mode .acrd-module-header .acrd-page-icon, body.acrd-light-mode .acrd-module-header .acrd-page-icon { flex:none; width:52px; height:52px; background:linear-gradient(135deg,#3478f6,#7c3aed) !important; color:#fff; box-shadow:0 8px 20px rgba(79,124,255,.25) !important; }
body.dark-mode .acrd-shell .card, body.acrd-light-mode .acrd-shell .card,
body.dark-mode .acrd-shell .info-box, body.acrd-light-mode .acrd-shell .info-box { border-radius:var(--acrd-radius-lg) !important; border:1px solid var(--acrd-border) !important; box-shadow:var(--acrd-shadow) !important; }
body.dark-mode .acrd-shell .card-header, body.acrd-light-mode .acrd-shell .card-header { border-bottom:1px solid var(--acrd-border) !important; }
body.dark-mode .acrd-shell .card-header:first-child, body.acrd-light-mode .acrd-shell .card-header:first-child { border-radius:calc(var(--acrd-radius-lg) - 1px) calc(var(--acrd-radius-lg) - 1px) 0 0; }
body.dark-mode .acrd-shell .acrd-module-card, body.acrd-light-mode .acrd-shell .acrd-module-card { padding:0 !important; overflow:hidden; }
body.dark-mode .acrd-shell .acrd-module-card .card-body, body.acrd-light-mode .acrd-shell .acrd-module-card .card-body { padding:1.25rem 1.35rem 1.4rem; }
body.dark-mode .main-sidebar .nav-sidebar > .nav-item > .nav-link, body.acrd-light-mode .main-sidebar .nav-sidebar > .nav-item > .nav-link { margin:.12rem 0; border-radius:.25rem; }
body.dark-mode .main-sidebar .nav-treeview > .nav-item > .nav-link, body.acrd-light-mode .main-sidebar .nav-treeview > .nav-item > .nav-link { margin:.12rem 0; }
body.dark-mode .acrd-shell .acrd-data-grid .rz-column-header, body.acrd-light-mode .acrd-shell .acrd-data-grid .rz-column-header { background:var(--acrd-grid-header) !important; color:var(--acrd-text) !important; }
body.dark-mode .acrd-shell .acrd-data-grid .rz-data-row td, body.acrd-light-mode .acrd-shell .acrd-data-grid .rz-data-row td { background:var(--acrd-card) !important; color:var(--acrd-text) !important; border-color:var(--acrd-border) !important; }
@media(max-width:768px) { body.dark-mode .acrd-shell .page-header, body.acrd-light-mode .acrd-shell .page-header { padding:.85rem !important; } }

/* Los controles del navbar comparten una misma caja y eje vertical. */
body.dark-mode .main-header .navbar-nav, body.acrd-light-mode .main-header .navbar-nav { display:flex; flex-direction:row; align-items:center; margin-top:0; margin-bottom:0; }
body.dark-mode .main-header .navbar-nav > .nav-item > .nav-link, body.acrd-light-mode .main-header .navbar-nav > .nav-item > .nav-link { height:40px !important; min-height:40px; margin:0 !important; display:flex; align-items:center; }
body.dark-mode .main-header #acrd-theme-toggle, body.acrd-light-mode .main-header #acrd-theme-toggle { width:40px; padding:0; justify-content:center; line-height:1; }
.acrd-loading { display:flex; align-items:center; justify-content:center; gap:.65rem; padding:2rem 1rem; color:var(--acrd-text-muted); }
.acrd-data-toolbar .ms-auto { flex-wrap:wrap; }
@media(max-width:575px) { .acrd-data-toolbar .ms-auto { width:100%; margin-left:0 !important; } .acrd-data-toolbar .input-group { max-width:none !important; } }
/* Igualdad de medidas y contraste en controles compartidos. */
body.acrd-light-mode .acrd-module-header .btn { min-height:38px; padding:.5rem .85rem; }
body.dark-mode .acrd-shell .btn-outline-secondary { color:#d4deec; border-color:#8c9bb0; }
body.dark-mode .acrd-shell .btn-outline-secondary:hover { color:#fff; background:#52647c; border-color:#a4b3c7; }
.acrd-data-toolbar .ms-auto > .form-select { width:auto; max-width:100%; }
/* Las tablas de informe deben imprimirse legibles en ambos temas. */
@media print {
  body.dark-mode .acrd-static-table, body.acrd-light-mode .acrd-static-table { overflow:visible !important; }
  body.dark-mode .acrd-static-table .table, body.acrd-light-mode .acrd-static-table .table {
    --bs-table-color:#000; --bs-table-bg:#fff; --bs-table-border-color:#888;
    width:100%; color:#000 !important; background:#fff !important; border-color:#888 !important;
  }
  body.dark-mode .acrd-static-table .table > :not(caption) > * > *, body.acrd-light-mode .acrd-static-table .table > :not(caption) > * > * {
    color:#000 !important; background:#fff !important; border-color:#888 !important; box-shadow:none !important;
  }
  .acrd-static-table thead { display:table-header-group; }
  .acrd-static-table tr { break-inside:avoid; page-break-inside:avoid; }
}

/* El contenedor de tablas anchas también se puede desplazar con teclado. */
.acrd-static-table:focus-visible { outline:2px solid var(--acrd-primary); outline-offset:2px; border-radius:var(--acrd-radius-sm); }
/* Superficies comunes y colores de Radzen para la paleta vigente. */
body.dark-mode { --acrd-hover-row:#3a485b; --acrd-grid-header:#344052; --acrd-input-bg:#283545; }
body.dark-mode .acrd-filter-bar { background:var(--acrd-input-bg); }
body.dark-mode .acrd-shell .rz-data-grid, body.dark-mode .acrd-shell .rz-data-grid-scrollable-wrapper,
body.dark-mode .acrd-shell .rz-data-grid-scrollable, body.dark-mode .acrd-shell .rz-data-grid .rz-grid-table-wrapper,
body.dark-mode .acrd-shell .rz-data-grid .rz-grid-table, body.dark-mode .acrd-shell .rz-data-grid tbody { background:var(--acrd-card) !important; color:var(--acrd-text) !important; border-color:var(--acrd-border) !important; }
body.dark-mode .acrd-shell .rz-data-grid tbody tr:not(.table-success):not(.table-secondary) td { background:var(--acrd-card) !important; color:var(--acrd-text) !important; border-color:var(--acrd-border) !important; }
body.dark-mode .acrd-shell .rz-data-grid thead, body.dark-mode .acrd-shell .rz-data-grid thead tr,
body.dark-mode .acrd-shell .rz-data-grid thead th { background:var(--acrd-grid-header) !important; color:var(--acrd-text) !important; border-color:var(--acrd-border) !important; }
body.dark-mode .acrd-shell .rz-data-grid thead th * { color:var(--acrd-text) !important; }
body.dark-mode .acrd-shell .rz-data-grid tbody tr:hover td { background:var(--acrd-hover-row) !important; }
body.dark-mode .acrd-shell .acrd-donation-kpi { background:var(--acrd-card); border-color:var(--acrd-border); border-top-color:var(--donation-color); }
body.dark-mode .acrd-shell .acrd-quick-grid a { background:var(--acrd-card-hdr); border-color:var(--acrd-border); color:var(--acrd-text) !important; }
body.dark-mode .acrd-shell .acrd-panel, body.dark-mode .acrd-shell .acrd-kpi { background:var(--acrd-card); border-color:var(--acrd-border); }
body.dark-mode .acrd-shell .table-hover tbody tr:hover > * { background:var(--acrd-hover-row) !important; }

/* KpiCard existente se comparte entre temas y conserva su API. */
body.dark-mode .acrd-shell .acrd-kpi-v2, body.acrd-light-mode .acrd-shell .acrd-kpi-v2 { position:relative; overflow:hidden; height:100%; padding:1.15rem 1.3rem; border:1px solid var(--acrd-border); border-radius:var(--acrd-radius-lg); background:var(--acrd-card); color:var(--acrd-text); box-shadow:var(--acrd-shadow); }
body.dark-mode .acrd-shell .acrd-kpi-v2::before, body.acrd-light-mode .acrd-shell .acrd-kpi-v2::before { display:none; }
body.dark-mode .acrd-shell .acrd-kpi-v2-top, body.acrd-light-mode .acrd-shell .acrd-kpi-v2-top { display:flex; align-items:flex-start; justify-content:space-between; gap:.75rem; margin-bottom:.6rem; }
body.dark-mode .acrd-shell .acrd-kpi-v2-label, body.acrd-light-mode .acrd-shell .acrd-kpi-v2-label { font-size:.72rem; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--acrd-text-muted); }
body.dark-mode .acrd-shell .acrd-kpi-v2-icon i, body.acrd-light-mode .acrd-shell .acrd-kpi-v2-icon i { font-size:1.6rem; }
body.dark-mode .acrd-shell .acrd-kpi-v2-value, body.acrd-light-mode .acrd-shell .acrd-kpi-v2-value { font-size:1.85rem; font-weight:800; line-height:1.15; color:var(--acrd-text); }
body.dark-mode .acrd-shell .acrd-kpi-v2-sub, body.acrd-light-mode .acrd-shell .acrd-kpi-v2-sub { margin-top:.2rem; font-size:.78rem; color:var(--acrd-text-muted); }
body.dark-mode .acrd-shell .acrd-kpi-v2-footer, body.acrd-light-mode .acrd-shell .acrd-kpi-v2-footer { margin-top:.6rem; text-align:right; }
.acrd-chart-canvas { position:relative; height:250px; min-width:0; }
.acrd-chart-data { color:var(--acrd-text-muted); font-size:var(--acrd-font-sm); margin-top:.5rem; }
.acrd-chart-data summary { cursor:pointer; }

/* El icono de búsqueda comparte la superficie del campo. */
body.dark-mode .acrd-shell .acrd-data-grid .input-group-text { background:var(--acrd-input-bg) !important; border-color:var(--acrd-border) !important; color:var(--acrd-text) !important; }
/* Campo flotante compacto, exclusivo del sistema interno. */
body.dark-mode .acrd-shell .acrd-floating > .form-control,
body.dark-mode .acrd-shell .acrd-floating > .form-select,
body.acrd-light-mode .acrd-shell .acrd-floating > .form-control,
body.acrd-light-mode .acrd-shell .acrd-floating > .form-select {
    height:48px !important; min-height:48px; padding:1.15rem .75rem .2rem !important;
    border:1px solid var(--acrd-border) !important; border-radius:var(--acrd-radius-sm) !important;
    background-color:var(--acrd-input-bg) !important; color:var(--acrd-text) !important;
    font-size:.875rem; line-height:1.25;
}
body.dark-mode .acrd-shell .acrd-floating > textarea.form-control,
body.acrd-light-mode .acrd-shell .acrd-floating > textarea.form-control { height:auto !important; min-height:80px; }
body.dark-mode .acrd-shell .acrd-floating > .form-select,
body.acrd-light-mode .acrd-shell .acrd-floating > .form-select { padding-right:2.25rem !important; }
body.dark-mode .acrd-shell .acrd-floating > label,
body.acrd-light-mode .acrd-shell .acrd-floating > label {
    height:auto; padding:0; position:absolute; left:.75rem; top:14px;
    color:var(--acrd-text-muted) !important; font-size:.875rem; font-weight:400;
    line-height:1.2; transform-origin:left top; pointer-events:none;
    transition:transform .15s ease, top .15s ease, color .15s ease;
}
body.dark-mode .acrd-shell .acrd-floating > .form-control:focus ~ label,
body.dark-mode .acrd-shell .acrd-floating > .form-control:not(:placeholder-shown) ~ label,
body.dark-mode .acrd-shell .acrd-floating > .form-select ~ label,
body.acrd-light-mode .acrd-shell .acrd-floating > .form-control:focus ~ label,
body.acrd-light-mode .acrd-shell .acrd-floating > .form-control:not(:placeholder-shown) ~ label,
body.acrd-light-mode .acrd-shell .acrd-floating > .form-select ~ label { top:5px; transform:scale(.78) !important; opacity:1; }
body.dark-mode .acrd-shell .acrd-floating > .form-control:focus ~ label::after,
body.dark-mode .acrd-shell .acrd-floating > .form-control:not(:placeholder-shown) ~ label::after,
body.dark-mode .acrd-shell .acrd-floating > .form-select ~ label::after,
body.acrd-light-mode .acrd-shell .acrd-floating > .form-control:focus ~ label::after,
body.acrd-light-mode .acrd-shell .acrd-floating > .form-control:not(:placeholder-shown) ~ label::after,
body.acrd-light-mode .acrd-shell .acrd-floating > .form-select ~ label::after { display:none; }
body.dark-mode .acrd-shell .acrd-floating > .form-control:focus,
body.dark-mode .acrd-shell .acrd-floating > .form-select:focus,
body.acrd-light-mode .acrd-shell .acrd-floating > .form-control:focus,
body.acrd-light-mode .acrd-shell .acrd-floating > .form-select:focus { border-color:var(--acrd-primary) !important; box-shadow:0 0 0 3px rgba(66,110,232,.16); }
body.dark-mode .acrd-shell .acrd-floating > .form-control:focus ~ label,
body.dark-mode .acrd-shell .acrd-floating > .form-select:focus ~ label { color:var(--acrd-text) !important; }
/* Dashboard y pie institucional compartidos por ambos temas. */
.acrd-dashboard-head.acrd-dashboard-head-compact { min-height:0; display:flex; align-items:center; gap:1rem; margin-bottom:1.25rem; }
.acrd-dashboard-head-compact h1 { margin:0; }
.acrd-dashboard-status { display:flex; flex-direction:column; align-items:flex-end; gap:.2rem; text-align:right; }
.acrd-dashboard-status time { color:var(--acrd-text-muted); font-size:var(--acrd-font-sm); text-transform:capitalize; }
.acrd-dashboard-card { margin:0 !important; min-width:0; height:100%; }
.acrd-dashboard-card .card-header { display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
.acrd-dashboard-card .card-title { float:none; font-size:1rem; font-weight:650; }
.acrd-dashboard-card .card-title i { color:#42a5ff; }
.acrd-dashboard-card .card-body { padding:1rem; }
.acrd-dashboard-card .acrd-request-list { padding:0; }
.acrd-dashboard-card .acrd-quick-grid { padding:0; }
.acrd-dashboard-card .acrd-record-list-item { padding:.5rem 0; }
.acrd-dashboard-card .acrd-list-row { padding:.25rem; border:0; }
.acrd-dashboard-event { display:flex; align-items:center; gap:.8rem; color:var(--acrd-text) !important; }
.acrd-dashboard-event > span:last-child { display:flex; flex-direction:column; gap:.2rem; }
.acrd-dashboard-event strong { font-size:.8rem; }
.acrd-dashboard-event small { color:var(--acrd-text-muted); }
body.dark-mode .main-sidebar, body.acrd-light-mode .main-sidebar { display:flex; flex-direction:column; }

body.dark-mode .main-sidebar > .sidebar, body.acrd-light-mode .main-sidebar > .sidebar { flex:1 1 auto; min-height:0; height:auto !important; overflow-y:auto; }
.acrd-sidebar-footer { flex:none; display:flex; align-items:center; gap:.7rem; margin:.3rem .75rem .7rem; padding:.9rem .4rem .2rem; border-top:1px solid rgba(190,204,224,.3); color:#e0e7f2; }
.acrd-sidebar-footer i { font-size:1.2rem; width:1.5rem; text-align:center; }
.acrd-sidebar-footer span { display:flex; flex-direction:column; line-height:1.2; white-space:nowrap; }
.acrd-sidebar-footer small { color:#b6c3d5; font-size:.72rem; }
body.sidebar-collapse .main-sidebar:not(:hover) .acrd-sidebar-footer span { display:none; }
@media(max-width:768px) { .acrd-dashboard-head.acrd-dashboard-head-compact { flex-direction:row; align-items:center; } .acrd-dashboard-status time { font-size:.72rem; } }

/* Alineación común de los iconos del menú principal. */
.main-sidebar .nav-sidebar .nav-link > .nav-icon { display:inline-block; width:1.65rem; margin-right:.5rem; text-align:center; }

/* Fecha de nacimiento compacta en el formulario interno de beneficiarios. */
.acrd-shell .beneficiary-form .date-select { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr); gap:.5rem; }
.acrd-shell .beneficiary-form .date-select > div { min-width:0; }
.acrd-shell .beneficiary-form .date-select-cap { margin-bottom:.25rem; color:var(--acrd-text-muted); font-size:.8rem; }

/* Expedientes: jerarquía de la propuesta aprobada, misma geometría en ambos temas. */
.acrd-record-detail { --record-blue-soft:#e9efff; --record-blue-text:#315ccc; --record-success-bg:#e5f7e9; --record-success-text:#187d35; --record-purple-bg:#f0edfc; --record-purple-text:#7842d1; --record-teal:#0d9692; font-size:.875rem; }
body.dark-mode .acrd-record-detail { --record-blue-soft:#32486d; --record-blue-text:#b3cbff; --record-success-bg:#284e40; --record-success-text:#9ce2b4; --record-purple-bg:#403958; --record-purple-text:#d0b6ff; --record-teal:#6cdbd4; }
.acrd-record-breadcrumb { display:flex; align-items:center; gap:.7rem; margin:.1rem 0 1rem; color:var(--acrd-text-muted); font-size:.8125rem; }
.acrd-record-breadcrumb a { color:var(--acrd-primary); }
.acrd-record-code, .acrd-record-status, .acrd-verification { display:inline-flex; align-items:center; gap:.35rem; padding:.3rem .6rem; border-radius:999px; font-size:.75rem; font-weight:600; line-height:1.2; white-space:nowrap; }
.acrd-record-code { background:var(--record-blue-soft); color:var(--record-blue-text); }
.acrd-record-status.bg-success { background:var(--record-success-bg) !important; color:var(--record-success-text) !important; }
.acrd-record-demographics { display:inline-flex; flex-wrap:wrap; gap:.5rem; color:var(--acrd-text-muted); margin-left:.35rem; font-size:.8125rem; }
.acrd-record-demographics span + span::before { content:'·'; margin-right:.5rem; }
.acrd-record-more .dropdown-menu { background:var(--acrd-card); border:1px solid var(--acrd-border); border-radius:8px; padding:.35rem; }
.acrd-record-more .dropdown-item { color:var(--acrd-text); font-size:.8125rem; padding:.6rem .75rem; border-radius:4px; }
.acrd-record-more .dropdown-item:hover, .acrd-record-more .dropdown-item:focus { background:var(--record-blue-soft); color:var(--record-blue-text); }
body.dark-mode .acrd-shell .acrd-record-header, body.acrd-light-mode .acrd-shell .acrd-record-header { min-height:128px; padding:1.3rem 1.35rem !important; margin-bottom:1rem !important; background:var(--acrd-card) !important; border-radius:10px !important; }
.acrd-record-header > .row { row-gap:1rem; }
body.dark-mode .acrd-module-header.acrd-record-header .acrd-page-icon, body.acrd-light-mode .acrd-module-header.acrd-record-header .acrd-page-icon { width:70px; height:70px; background:var(--record-blue-soft) !important; color:var(--acrd-primary) !important; box-shadow:none !important; }
.acrd-record-header > .row > .col-auto:first-child { padding-right:1.3rem; border-right:1px solid var(--acrd-border); margin-right:.8rem; }
body.dark-mode .acrd-shell .acrd-record-header h4, body.acrd-light-mode .acrd-shell .acrd-record-header h4 { font-size:1.5rem; font-weight:750 !important; line-height:1.2; }
.acrd-record-header .acrd-header-meta { gap:.45rem; margin-top:.45rem; }
.acrd-record-header .acrd-header-subtitle { font-size:.8125rem; margin-top:.55rem; }
.acrd-record-header .acrd-header-actions { gap:.65rem !important; }
body.dark-mode .acrd-shell .acrd-record-header .btn, body.acrd-light-mode .acrd-shell .acrd-record-header .btn { min-height:38px; padding:.5rem .85rem; font-size:.8125rem; line-height:1.25; }
.acrd-record-detail .acrd-record-tabs { display:flex; align-items:stretch; gap:0; margin-bottom:1.25rem; padding:0 .75rem; background:var(--acrd-card); border:1px solid var(--acrd-border); border-radius:8px; box-shadow:var(--acrd-shadow); scrollbar-width:thin; }
.acrd-record-detail .acrd-record-tabs button { display:flex; align-items:center; justify-content:center; gap:.5rem; flex:1 0 auto; padding:1rem .8rem; font-size:.8125rem; border-bottom-width:3px; }
.acrd-record-detail .acrd-record-tabs .badge { background:var(--record-blue-soft) !important; color:var(--acrd-text) !important; border-radius:999px; min-width:20px; font-size:.7rem; }
.acrd-profile-layout { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); gap:1.25rem; align-items:stretch; margin-bottom:1.25rem; }
.acrd-profile-main { display:flex; flex-direction:column; gap:1.25rem; min-width:0; }
body.dark-mode .acrd-shell .acrd-record-detail .card, body.acrd-light-mode .acrd-shell .acrd-record-detail .card { border-radius:10px !important; }
.acrd-record-detail .acrd-profile-card { margin-bottom:0; min-width:0; }
.acrd-record-detail .acrd-profile-card .card-header { padding:1rem 1.2rem .8rem; background:var(--acrd-card) !important; }
.acrd-record-detail .acrd-profile-card .card-title { float:none; color:var(--acrd-text); font-size:1.05rem; font-weight:700; }
.acrd-record-detail .acrd-profile-card .card-title > i { color:var(--acrd-primary); font-size:1.2rem; }
.acrd-record-detail .acrd-profile-disability .card-title > i { color:var(--record-purple-text); }
.acrd-record-detail .acrd-profile-health .card-title > i { color:var(--record-teal); }
.acrd-record-detail .acrd-profile-card .card-body { padding:.9rem 1.2rem 1rem; }
.acrd-profile-disability { flex:1; }
.acrd-verification.is-verified { background:var(--record-success-bg); color:var(--record-success-text); }
.acrd-verification.is-pending { background:var(--record-blue-soft); color:var(--acrd-text-muted); }
.acrd-detail-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:1rem 1.5rem; margin:0; }
.acrd-detail-field { min-width:0; }
.acrd-detail-field dt { color:var(--acrd-text-muted); font-size:.8125rem; font-weight:400; margin-bottom:.2rem; line-height:1.35; }
.acrd-detail-field dd { color:var(--acrd-text); font-size:.875rem; font-weight:500; margin:0; overflow-wrap:anywhere; line-height:1.5; }
.acrd-detail-full { grid-column:1 / -1; }
.acrd-diagnosis-field { background:var(--record-purple-bg); padding:.65rem .8rem; border-radius:6px; }
.acrd-detail-rows { margin:0; }
.acrd-detail-rows .acrd-detail-field { display:grid; grid-template-columns:minmax(105px,.8fr) minmax(0,1.2fr); gap:.75rem; padding:.55rem 0; border-bottom:1px solid var(--acrd-border); }
.acrd-detail-rows .acrd-detail-field:first-child { padding-top:0; }
.acrd-detail-rows .acrd-detail-field:last-child { border-bottom:0; padding-bottom:0; }
.acrd-detail-rows dt { margin:0; padding-top:.1rem; }
.acrd-detail-subheading { margin:1rem 0 .75rem; padding-top:1rem; border-top:1px solid var(--acrd-border); color:var(--acrd-text); font-size:1rem; font-weight:700; }
.acrd-detail-notes { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--acrd-text); }
.acrd-detail-source { margin-top:.65rem; color:var(--acrd-text-muted); font-size:.75rem; }
@media(max-width:1199px) { .acrd-record-header .acrd-header-actions { width:100%; justify-content:flex-end !important; } }
@media(max-width:900px) { .acrd-profile-layout { grid-template-columns:minmax(0,1fr); } }
@media(max-width:575px) {
  .acrd-record-header > .row > .col-auto:first-child { margin-right:0; padding-right:.75rem; border-right:0; }
  body.dark-mode .acrd-module-header.acrd-record-header .acrd-page-icon, body.acrd-light-mode .acrd-module-header.acrd-record-header .acrd-page-icon { width:48px; height:48px; }
  .acrd-record-demographics { margin-left:0; }
  .acrd-record-header .acrd-header-actions { justify-content:flex-start !important; gap:.45rem !important; }
  .acrd-detail-grid { grid-template-columns:minmax(0,1fr); gap:.85rem; }
  .acrd-profile-card .card-header { gap:.65rem !important; }
  .acrd-detail-rows .acrd-detail-field { grid-template-columns:minmax(95px,.8fr) minmax(0,1.2fr); }
}

/* Ajustes de la ficha compartida y resumen del tutor. */
.acrd-record-detail .acrd-profile-card .card-header::after { display:none; }
.acrd-record-detail .acrd-profile-card .card-header > .d-flex { margin-left:auto; }
.acrd-record-header .acrd-page-icon > i { font-size:1.75rem; }
.acrd-record-photo { display:block; width:100%; height:100%; border-radius:50%; object-fit:cover; cursor:zoom-in; }
.acrd-record-summary { display:flex; align-items:center; flex-wrap:wrap; gap:.65rem 1.25rem; margin:-.25rem 0 1rem; padding:.65rem .15rem; color:var(--acrd-text-muted); font-size:.75rem; }
.acrd-record-summary > span { display:inline-flex; align-items:center; gap:.35rem; }
.acrd-record-tags { display:flex; flex-wrap:wrap; gap:.5rem; }
.acrd-record-tags > span { padding:.35rem .65rem; border-radius:6px; background:var(--record-blue-soft); color:var(--record-blue-text); font-size:.8125rem; }
.acrd-tutor-support-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:1.25rem; }
.acrd-tutor-support-grid > div { min-width:0; }
.acrd-tutor-detail .acrd-tutor-support-grid .card-header { background:var(--acrd-card); color:var(--acrd-text); font-size:1rem; padding:.9rem 1rem; }
.acrd-tutor-detail .acrd-tutor-support-grid .card-header::after { display:none; }
body.dark-mode .acrd-record-detail .acrd-record-breadcrumb a,
body.dark-mode .acrd-record-detail .acrd-record-tabs button[aria-pressed="true"],
body.dark-mode .acrd-record-detail .acrd-profile-card:not(.acrd-profile-disability):not(.acrd-profile-health) .card-title > i,
body.dark-mode .acrd-record-detail .acrd-record-header .acrd-page-icon { color:var(--record-blue-text) !important; }
body.dark-mode .acrd-record-detail .btn-outline-primary { color:var(--record-blue-text); border-color:var(--record-blue-text); }
body.dark-mode .acrd-record-detail .btn-outline-primary:hover { background:var(--record-blue-soft); color:var(--acrd-text); }
@media(max-width:900px) { .acrd-tutor-support-grid { grid-template-columns:minmax(0,1fr); } }

/* Jerarquía explícita: grupos y enlaces secundarios del sidebar. */
.main-sidebar .nav-sidebar > .nav-item > .nav-link { display:flex; align-items:center; }
.main-sidebar .nav-sidebar .nav-link > .nav-icon { flex:none; }
.main-sidebar .nav-sidebar .nav-link > p { min-width:0; width:auto !important; flex:1; }
.main-sidebar .nav-sidebar > .has-treeview > .nav-link { font-weight:600; }
.main-sidebar .nav-sidebar > .has-treeview.menu-open > .nav-link { background:rgba(174,195,225,.15) !important; color:#f4f7fb !important; }
.main-sidebar .nav-sidebar > .has-treeview.menu-open > .nav-link > .nav-icon { color:#c6d7f1; }
.main-sidebar .nav-sidebar .nav-treeview { margin:.2rem .2rem .65rem .85rem; padding:.25rem .2rem .25rem .65rem; border-left:2px solid rgba(167,190,222,.4); background:rgba(0,0,0,.1); border-radius:0 6px 6px 0; }
.main-sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link { display:flex; align-items:center; width:auto !important; margin:.1rem 0 !important; padding:.55rem .55rem; font-size:.8125rem; border-radius:5px; color:#c6d0dd; }
.main-sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link > .nav-icon { font-size:.95rem; }
.main-sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link.active { background:#426ee8 !important; color:#fff !important; }
.main-sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link.active .nav-icon { color:#fff !important; }
.main-sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link > p { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding-right:1.1rem; }
.main-sidebar .nav-sidebar .nav-treeview .nav-link > p > .right.badge { right:.45rem; }
.acrd-navbar-chat { position:relative; width:40px; justify-content:center; }
.acrd-navbar-chat > i { font-size:1.15rem; }
.acrd-navbar-chat-count { position:absolute; right:0; top:0; min-width:17px; border-radius:999px; font-size:.6rem; line-height:1.15; padding:.2rem .3rem; }
body.sidebar-collapse .main-sidebar:not(:hover) .nav-treeview { margin-left:0; padding-left:0; border-left:0; }

/* Controles internos: medidas, tipografía y color uniformes. */
.acrd-shell .acrd-date-field { position:relative; width:100%; height:48px; min-width:0; margin:0; padding:0; border:1px solid var(--acrd-border); border-radius:6px; background:var(--acrd-input-bg); }
.acrd-shell .acrd-date-field > legend { position:absolute; float:none; width:auto; max-width:calc(100% - 24px); left:12px; top:4px; z-index:1; margin:0; padding:0; color:var(--acrd-text-muted); font-size:.68rem; line-height:1.2; font-weight:400; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; pointer-events:none; }
.acrd-shell .acrd-date-parts { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.45fr) minmax(0,1fr); height:100%; }
body.dark-mode .acrd-shell .acrd-date-field .form-select, body.acrd-light-mode .acrd-shell .acrd-date-field .form-select { width:100%; min-width:0; height:46px !important; min-height:0 !important; padding:1.1rem 1.6rem .2rem .75rem !important; border:0 !important; border-radius:0 !important; box-shadow:none; background-color:transparent !important; color:var(--acrd-text) !important; font-size:.8125rem; line-height:1.3; }
.acrd-shell .acrd-date-field .form-select + .form-select { border-left:1px solid var(--acrd-border) !important; }
.acrd-shell .acrd-date-field:focus-within { border-color:var(--acrd-primary); box-shadow:0 0 0 3px rgba(66,110,232,.14); }
.acrd-shell .acrd-date-field .form-select option { background:var(--acrd-input-bg); color:var(--acrd-text); }
.acrd-shell .acrd-switch { min-height:48px !important; height:auto !important; padding:.65rem .8rem !important; border:1px solid var(--acrd-border) !important; border-radius:6px !important; background:var(--acrd-input-bg) !important; }
.acrd-shell .acrd-switch .form-check.form-switch { display:flex; align-items:center; gap:.7rem; padding:0; min-height:22px; }
.acrd-shell .acrd-switch .form-check-label { flex:1; margin:0; color:var(--acrd-text); font-size:.8125rem; font-weight:500; line-height:1.3; cursor:pointer; }
.acrd-shell .acrd-switch-label { display:block; }
.acrd-shell .acrd-switch-hint { display:block; margin-top:.2rem; color:var(--acrd-text-muted); font-size:.72rem; font-weight:400; }
.acrd-shell .acrd-switch .form-check-input, .acrd-shell .acrd-record-form .form-switch .form-check-input { appearance:none; position:static !important; flex:0 0 36px; float:none !important; width:36px !important; height:22px !important; margin:0 !important; border:1px solid #9aa9bc !important; border-radius:999px !important; background-color:#a9b5c5 !important; background-image:radial-gradient(circle at center,#fff 0 7px,transparent 7.5px) !important; background-size:18px 18px !important; background-repeat:no-repeat !important; background-position:1px center !important; transition:background-color .15s,background-position .15s; cursor:pointer; }
.acrd-shell .acrd-switch .form-check-input:checked, .acrd-shell .acrd-record-form .form-switch .form-check-input:checked { background-color:var(--acrd-primary) !important; border-color:var(--acrd-primary) !important; background-position:15px center !important; }
.acrd-shell .acrd-switch .form-check-input:focus-visible, .acrd-shell .acrd-record-form .form-switch .form-check-input:focus-visible { outline:2px solid var(--acrd-primary); outline-offset:3px; box-shadow:none; }
.acrd-shell .acrd-switch .form-check-input:disabled { opacity:.5; cursor:not-allowed; }
.acrd-shell .acrd-switch-sm { min-height:38px !important; padding:.45rem .65rem !important; }
.acrd-shell .acrd-record-form .form-check.form-switch { display:flex; align-items:center; gap:.6rem; padding:.6rem .7rem; border:1px solid var(--acrd-border); border-radius:6px; background:var(--acrd-input-bg); }
.acrd-shell .acrd-record-form .form-switch label { margin:0; font-size:.8125rem; color:var(--acrd-text); }
.acrd-shell .acrd-record-form .form-switch:has(input:checked) { border-color:var(--acrd-primary); }
.acrd-record-form { row-gap:1rem; }
.acrd-record-form .acrd-field { margin-bottom:0; }
.acrd-record-form .form-floating > label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.acrd-record-detail .acrd-inline-form { padding:1rem; margin-bottom:1rem; border:1px solid var(--acrd-border); border-radius:8px; background:var(--acrd-input-bg); }
.acrd-record-detail .acrd-profile-section .card-title > span > i { color:var(--acrd-primary); }
.acrd-record-detail .acrd-profile-section .card-header > h3 { font-size:1rem; }
.acrd-record-detail .acrd-profile-section .card-header::after { display:none; }
.acrd-record-detail .acrd-profile-section .card-body { padding:1rem 1.2rem; }
.acrd-record-detail .acrd-record-list-item { padding:.85rem 0; }
.acrd-record-detail .acrd-record-list-item > div { border-bottom:0 !important; padding:0 !important; min-width:0; }
.acrd-record-detail .acrd-record-list-item strong, .acrd-record-detail .acrd-record-list-item b { font-size:.875rem; font-weight:600; }
.acrd-record-detail .acrd-record-list-item .text-muted { color:var(--acrd-text-muted) !important; }
.acrd-record-detail .acrd-profile-card .card-header > h3 > i { color:var(--acrd-primary); }
.acrd-record-detail .acrd-profile-card .card-header > .d-flex { margin-left:auto; }
.acrd-record-detail .acrd-profile-card .card-header::after { display:none; }
.acrd-document-row { display:flex; align-items:center; gap:.85rem; min-width:0; }
.acrd-document-icon, .acrd-document-preview { display:flex; align-items:center; justify-content:center; flex:none; width:44px; height:48px; padding:0; border:1px solid var(--acrd-border); border-radius:6px; background:var(--record-blue-soft); color:var(--record-blue-text); font-size:1.3rem; overflow:hidden; }
.acrd-document-preview img { width:100%; height:100%; object-fit:cover; }
.acrd-document-text { min-width:0; flex:1; }
.acrd-document-text > a { display:block; font-weight:600; overflow-wrap:anywhere; }
.acrd-document-text small { display:block; margin-top:.2rem; color:var(--acrd-text-muted); font-size:.75rem; overflow-wrap:anywhere; }
.acrd-audit-entry { display:flex; gap:.85rem; }
.acrd-audit-marker { display:flex; align-items:center; justify-content:center; flex:none; width:34px; height:34px; border-radius:50%; background:var(--record-blue-soft); color:var(--record-blue-text); }
/* Una sola presentación para tablas estáticas e interactivas de los expedientes. */
.acrd-shell .acrd-static-table { border:1px solid var(--acrd-border); border-radius:8px; overflow:auto; }
.acrd-shell .acrd-static-table .table { width:100%; margin:0 !important; border-collapse:collapse; background:var(--acrd-card); }
.acrd-shell .acrd-static-table .table > thead > tr > th { padding:.8rem 1rem !important; border:0 !important; border-bottom:1px solid var(--acrd-border) !important; background:var(--acrd-grid-header) !important; color:var(--acrd-text-muted) !important; font-size:.7rem; font-weight:650; text-transform:uppercase; letter-spacing:.04em; white-space:nowrap; }
.acrd-shell .acrd-static-table .table > tbody > tr > td { padding:.85rem 1rem !important; border:0 !important; border-bottom:1px solid var(--acrd-border) !important; background:var(--acrd-card) !important; color:var(--acrd-text); vertical-align:middle; font-size:.8125rem; }
.acrd-shell .acrd-static-table .table > tbody > tr:last-child > td { border-bottom:0 !important; }
.acrd-shell .acrd-static-table .table > tbody > tr:hover > td { background:var(--acrd-card-hdr) !important; }
.acrd-record-detail .acrd-data-grid { min-width:0; }
.acrd-record-detail .acrd-data-grid .rz-grid-table { border-radius:8px; }
.acrd-record-detail .acrd-data-grid .rz-cell-data { font-size:.8125rem; }
.acrd-record-detail .acrd-record-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:1rem; margin:0; }
.acrd-record-detail .acrd-record-metrics .acrd-detail-field { padding:.8rem; border:1px solid var(--acrd-border); border-radius:8px; background:var(--acrd-input-bg); }
.acrd-shell .acrd-record-dialog .modal-title { color:var(--acrd-text) !important; font-size:1.1rem; font-weight:650; }
.acrd-shell .acrd-record-dialog .modal-header, .acrd-shell .acrd-record-dialog .modal-footer { padding:1rem 1.25rem; border-color:var(--acrd-border); }
.acrd-shell .acrd-record-dialog .modal-body { padding:1.25rem; }
@media(max-width:575px) { .acrd-document-row { gap:.6rem; } .acrd-record-detail .acrd-profile-card .card-header { align-items:flex-start !important; } .acrd-record-detail .acrd-static-table { max-width:100%; } }

.acrd-shell .acrd-date-picker { position:relative; width:100%; min-width:0; }
.acrd-shell .acrd-date-trigger { position:relative; display:block; width:100%; height:48px; padding:1.15rem 2.5rem .2rem .75rem; border:1px solid var(--acrd-border); border-radius:6px; background:var(--acrd-input-bg); color:var(--acrd-text); text-align:left; cursor:pointer; }
.acrd-date-trigger-label { position:absolute; left:.75rem; top:5px; max-width:calc(100% - 2rem); font-size:.68rem; line-height:1.2; color:var(--acrd-text-muted); white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.acrd-date-trigger-value { display:block; font-size:.875rem; line-height:1.25; }
.acrd-date-trigger > i { position:absolute; right:.8rem; top:16px; color:var(--acrd-text-muted); }
.acrd-date-trigger:focus-visible { outline:2px solid var(--acrd-primary); outline-offset:2px; }
.acrd-date-trigger:disabled { opacity:.6; cursor:not-allowed; }
.acrd-date-dismiss { position:fixed; inset:0; z-index:1045; border:0; background:transparent; cursor:default; }
.acrd-shell .acrd-date-popup { position:absolute; z-index:1046; top:calc(100% + 6px); left:0; width:340px; max-width:min(340px,calc(100vw - 48px)); padding:1rem; border:1px solid var(--acrd-border); border-radius:10px; background:var(--acrd-card); color:var(--acrd-text); box-shadow:0 12px 35px rgba(16,30,52,.22); }
.acrd-date-popup-title { display:flex; align-items:center; gap:.5rem; margin-bottom:.75rem; font-size:.8125rem; }
.acrd-date-popup-title > i { color:var(--acrd-primary); }
.acrd-date-popup-title .btn { margin-left:auto; padding:0 .25rem; color:var(--acrd-text-muted); }
.acrd-date-wheels { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.4fr) minmax(0,1fr); gap:.6rem; }
.acrd-date-wheels > div { min-width:0; }
.acrd-date-wheels label { display:block; margin-bottom:.4rem; color:var(--acrd-text-muted); font-size:.72rem; font-weight:500; text-align:center; }
.acrd-shell .acrd-date-wheels select { display:block; width:100%; height:156px; padding:.25rem; border:1px solid var(--acrd-border); border-radius:7px; background:var(--acrd-input-bg); color:var(--acrd-text); font-size:.8125rem; scrollbar-width:thin; }
.acrd-date-wheels option { padding:.4rem .25rem; border-radius:4px; text-align:center; }
.acrd-date-wheels option:checked { background:var(--acrd-primary); color:white; font-weight:600; }
.acrd-date-wheels select:focus { outline:2px solid var(--acrd-primary); outline-offset:1px; }
.acrd-date-popup-footer { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem; margin-top:.85rem; }
.acrd-date-popup-footer > span { flex:1 1 100%; text-align:center; color:var(--acrd-text-muted); font-size:.75rem; }
.acrd-date-popup-footer > .btn:first-of-type { margin-left:auto; }
.acrd-shell .acrd-record-dialog .acrd-date-popup { position:relative; top:6px; }

/* AdminLTE posiciona los checkboxes de forma absoluta. En los switches internos,
   el control participa en el flex para reservar su espacio antes del texto. */
.acrd-shell .acrd-record-form .form-check.form-switch > .form-check-label { flex:1; min-width:0; margin:0; line-height:1.3; cursor:pointer; }
.acrd-shell .acrd-record-form .acrd-switch > .form-check.form-switch,
.acrd-shell .acrd-switch > .form-check.form-switch { width:100%; min-width:0; padding:0 !important; border:0 !important; border-radius:0; background:transparent !important; box-shadow:none; }
/* La revisión de solicitudes conserva la escala y superficies del expediente. */
.acrd-shell .acrd-requests .acrd-request-facts dt { color:var(--acrd-text-muted); font-size:.8125rem; font-weight:500; margin-bottom:.5rem; }
.acrd-shell .acrd-requests .acrd-request-facts dd { color:var(--acrd-text); font-size:.875rem; margin-bottom:1rem; overflow-wrap:anywhere; }
.acrd-shell .acrd-requests .acrd-profile-card { min-width:0; }
/* Verificación de solicitudes: mismo contenido y geometría en ambos temas. */
.acrd-shell .acrd-review-panel > .card-body { padding:0 !important; }
.acrd-shell .acrd-review-heading { display:flex; align-items:center; gap:1rem; }
.acrd-shell .acrd-review-heading strong { display:block; font-size:1.05rem; color:var(--acrd-text); }
.acrd-shell .acrd-review-heading p { margin:.3rem 0 0; font-size:.8125rem; font-weight:400; color:var(--acrd-text-muted); }
.acrd-shell .acrd-review-symbol { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; border-radius:8px; color:#a66b08; background:rgba(245,158,11,.13); font-size:1.35rem; }
.acrd-shell .acrd-review-symbol.is-danger { color:var(--bs-danger,#dc3545); background:rgba(220,53,69,.09); }
.acrd-shell .acrd-review-progress { display:flex; flex-direction:column; align-items:flex-end; gap:.4rem; }
.acrd-shell .acrd-review-progress small { color:var(--acrd-text-muted); font-size:.78rem; }
.acrd-shell .acrd-review-checks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; padding:1.2rem; }
.acrd-shell .acrd-review-check { display:flex; align-items:center; gap:1rem; min-width:0; border:1px solid var(--acrd-border); border-radius:8px; padding:1.1rem; background:var(--acrd-card); }
.acrd-shell .acrd-review-check.is-verified { border-color:rgba(25,135,84,.45); }
.acrd-shell .acrd-review-check-icon { flex:0 0 34px; font-size:1.85rem; color:var(--acrd-text-muted); text-align:center; }
.acrd-shell .acrd-review-check-text { flex:1; min-width:0; }
.acrd-shell .acrd-review-check-text strong { font-size:.9375rem; color:var(--acrd-text); }
.acrd-shell .acrd-review-check-text p { margin:.3rem 0 .45rem; font-size:.8125rem; color:var(--acrd-text-muted); }
.acrd-shell .acrd-review-check-text .btn-link { font-size:.8125rem; text-decoration:none; }
.acrd-shell .acrd-switch.acrd-review-toggle { position:relative; flex:0 0 36px; width:36px; min-height:22px !important; height:22px !important; padding:0 !important; border:0 !important; background:transparent !important; border-radius:0 !important; box-shadow:none; }
.acrd-shell .acrd-review-toggle .form-check-label { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.acrd-shell .acrd-review-decisions { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1rem; border-top:1px solid var(--acrd-border); padding:1rem 1.2rem; }
.acrd-shell .acrd-review-guidance { display:flex; align-items:center; gap:.6rem; font-size:.8125rem; color:var(--acrd-text-muted); }
.acrd-shell .acrd-review-audit { border-top:1px solid var(--acrd-border); padding:.65rem 1.2rem; font-size:.75rem; color:var(--acrd-text-muted); }
.acrd-shell .acrd-review-content { padding:1.2rem; }
.acrd-shell .acrd-review-rejection textarea.form-control { min-height:96px; }
@media(max-width:767.98px) { .acrd-shell .acrd-review-checks { grid-template-columns:1fr; } .acrd-shell .acrd-review-progress { align-items:flex-start; } }
/* Un solo estado para lista y flecha; sin animaciones inline del Treeview JS. */
.acrd-sidebar [data-acrd-treeview] > .has-treeview > .nav-treeview { display:none; }
.acrd-sidebar [data-acrd-treeview] > .has-treeview.menu-open > .nav-treeview { display:block; }
.acrd-sidebar [data-acrd-treeview] > .has-treeview > .nav-link .right.fa-angle-left { transform:rotate(0deg); }
.acrd-sidebar [data-acrd-treeview] > .has-treeview.menu-open > .nav-link .right.fa-angle-left { transform:rotate(-90deg); }
/* Campo flotante único para el buscador de todas las tablas internas. */
.acrd-shell .acrd-grid-search { display:flex; align-items:center; gap:.5rem; width:100%; max-width:400px; min-width:0; }
.acrd-shell .acrd-grid-search-field { flex:1; min-width:0; }
.acrd-shell .acrd-grid-search-field > label { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.acrd-shell .acrd-grid-search-icon { flex:0 0 36px; display:grid; place-items:center; color:var(--acrd-text); }
@media(max-width:575.98px) { .acrd-shell .acrd-grid-search { max-width:none; } }
/* Buscador de tablas: campo único con lupa, sin etiqueta flotante. */
.acrd-shell .acrd-grid-search { position:relative; gap:0; }
.acrd-shell .acrd-grid-search-icon { position:absolute; left:12px; top:0; height:48px; width:20px; z-index:1; pointer-events:none; color:var(--acrd-text-muted); }
.acrd-shell .acrd-grid-search-field > input.form-control { height:48px !important; min-height:48px !important; padding:.65rem .85rem .65rem 2.5rem !important; border:1px solid var(--acrd-border) !important; border-radius:6px !important; background:var(--acrd-input-bg) !important; color:var(--acrd-text) !important; font-size:.875rem; line-height:1.4; }
.acrd-shell .acrd-grid-search-field > input.form-control::placeholder { color:var(--acrd-text-muted); opacity:1; }
.acrd-shell .acrd-grid-search > button { margin-left:.5rem; }
/* Formularios guiados: ocupan el ancho disponible con secciones y ayudas breves. */
.acrd-shell .acrd-form-section-heading { display:flex; align-items:center; gap:.8rem; }
.acrd-shell .acrd-form-step { display:grid; place-items:center; flex:0 0 32px; width:32px; height:32px; border-radius:50%; color:var(--acrd-primary); background:rgba(67,97,238,.12); font-size:.875rem; font-weight:700; }
.acrd-shell .acrd-form-section-heading strong { display:block; color:var(--acrd-text); font-size:.9375rem; }
.acrd-shell .acrd-form-section-heading p { margin:.2rem 0 0; color:var(--acrd-text-muted); font-size:.8125rem; line-height:1.45; font-weight:400; }
.acrd-shell .acrd-form-help { color:var(--acrd-text-muted); font-size:.8125rem; line-height:1.5; }
.acrd-shell .acrd-form-lookup { min-height:48px; white-space:nowrap; }
.acrd-shell .acrd-form-confirmation { display:flex; align-items:center; gap:.65rem; padding:.6rem .85rem; border:1px solid var(--acrd-border); border-radius:6px; }
.acrd-shell .acrd-form-confirmation strong,.acrd-shell .acrd-form-confirmation small { display:block; }
.acrd-shell .acrd-form-confirmation small { margin-top:.2rem; color:var(--acrd-text-muted); font-size:.75rem; }
.acrd-shell .acrd-form-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:1rem; padding:1rem 1.2rem; border:1px solid var(--acrd-border); border-radius:8px; background:var(--acrd-card); }
.acrd-shell .acrd-form-actions > span { color:var(--acrd-text-muted); font-size:.8125rem; }
.acrd-shell .acrd-guided-form fieldset { min-width:0; border:0; padding:0; margin:0; }
.acrd-shell .acrd-guided-form textarea.form-control { min-height:100px; }
.acrd-shell .acrd-recipient-list { display:flex; flex-direction:column; gap:.6rem; }
.acrd-shell .acrd-recipient { display:flex; align-items:center; gap:.9rem; width:100%; padding:.9rem 1rem; text-align:left; color:var(--acrd-text); background:var(--acrd-input-bg); border:1px solid var(--acrd-border); border-radius:8px; }
.acrd-shell .acrd-recipient > i { flex:0 0 32px; text-align:center; color:var(--acrd-primary); font-size:1.3rem; }
.acrd-shell .acrd-recipient strong,.acrd-shell .acrd-recipient small { display:block; }
.acrd-shell .acrd-recipient small { margin-top:.2rem; color:var(--acrd-text-muted); font-size:.75rem; }
.acrd-shell .acrd-recipient.is-selected { border-color:var(--acrd-primary); box-shadow:inset 3px 0 var(--acrd-primary); }
.acrd-shell .acrd-recipient-choice { margin-left:auto; font-size:.8125rem; color:var(--acrd-primary); }
.acrd-shell .acrd-recipient:focus-visible { outline:2px solid var(--acrd-primary); outline-offset:2px; }
@media(max-width:575.98px) { .acrd-shell .acrd-recipient { flex-wrap:wrap; } .acrd-shell .acrd-recipient-choice { width:100%; margin-left:41px; } }
/* Expedientes de Programas: estructura común en ambos temas. */
.acrd-program-workspace { display:grid; grid-template-columns:210px minmax(0,1fr); gap:1.5rem; align-items:start; }
.acrd-program-navigation { background:var(--acrd-card); border:1px solid var(--acrd-border); border-radius:10px; padding:.75rem; }
.acrd-program-content { min-width:0; }
.acrd-workspace-tabs.acrd-tabs { display:flex; flex-direction:column; gap:.35rem; border:0; margin:0; padding:0; background:transparent; overflow:visible; }
.acrd-workspace-tabs.acrd-tabs button { width:100%; display:flex; align-items:center; justify-content:flex-start; text-align:left; white-space:normal; border:0; border-radius:7px; padding:.85rem .75rem; }
.acrd-workspace-tabs.acrd-tabs button[aria-pressed="true"] { background:var(--acrd-primary-soft,#e9efff); color:var(--acrd-primary); }
body.dark-mode .acrd-workspace-tabs.acrd-tabs button[aria-pressed="true"] { background:#35435b; color:#c6d6ff; }
.acrd-workspace-tabs .badge { margin-left:auto !important; }
.acrd-program-description { white-space:pre-line; overflow-wrap:anywhere; margin:0; }
.acrd-program-description-more summary { color:var(--acrd-primary); cursor:pointer; margin-top:1rem; }
.acrd-program-header .acrd-header-actions { flex-wrap:wrap; }
.acrd-program-header h4 { overflow-wrap:anywhere; }
.acrd-form-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.75rem; margin-top:1.25rem; }
.acrd-program-media { display:block; width:100%; max-height:280px; object-fit:cover; border-radius:8px; }
.acrd-program-context { color:var(--acrd-text-muted); margin-bottom:1rem; overflow-wrap:anywhere; }
@media(max-width:991px) { .acrd-program-workspace { grid-template-columns:1fr; } .acrd-workspace-tabs.acrd-tabs { flex-direction:row; flex-wrap:wrap; } .acrd-workspace-tabs.acrd-tabs button { width:auto; flex:1 0 auto; } }

.acrd-media-list.acrd-record-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:1rem; }
.acrd-media-list .acrd-record-list-item { border:0; padding:0; min-width:0; }

.acrd-program-header { background:var(--acrd-card); border:1px solid var(--acrd-border); border-radius:10px; padding:1.5rem !important; }
.acrd-program-header .acrd-page-icon { box-shadow:none !important; }
.acrd-program-header .acrd-header-meta { display:flex; flex-wrap:wrap; align-items:center; gap:.75rem 1.25rem; color:var(--acrd-text-muted); }
.acrd-program-header .acrd-header-subtitle { color:var(--acrd-text-muted); margin-top:.5rem; }
.acrd-dialog .dropdown-wrapper { z-index:30; }
