/* Ajustes de integración para que la interfaz legal conserve el layout EKUDMIN. */
html,
body {
    min-height: 100%;
}

/* Clientes 360 y bandeja de comunicaciones */
.client-360-metrics,.communication-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
.client-360-metrics>div,.communication-overview>div{background:#f5f8fd;border:1px solid #e1e8f2;border-radius:12px;padding:14px 16px;display:flex;flex-direction:column;gap:3px}
.client-360-metrics small,.communication-overview small{color:#6d7889;font-size:12px}.client-360-metrics strong,.communication-overview strong{color:#24324a;font-size:22px}
.communication-overview .is-danger{background:#fff2f2;border-color:#f4b8bc}.communication-overview .is-danger strong{color:#cf3f4b}
.client-360-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}.client-360-columns>section{border:1px solid #e2e8f1;border-radius:12px;padding:15px}
.client-summary-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.client-summary-heading h5{margin:0}
.client-contact-list{display:flex;flex-direction:column;gap:8px}.client-contact-list article{background:#f8faff;border-radius:9px;padding:9px 11px}.client-contact-list strong,.client-contact-list small{display:block}.client-contact-list strong span{font-size:10px;color:#2c8b57;background:#e8f7ed;border-radius:10px;padding:2px 6px}.client-contact-list small{color:#768196;margin-top:3px}
.client-parties-section{margin-top:18px;border-top:1px solid #e2e8f1;padding-top:16px}
.client-360-toolbar{display:flex;justify-content:flex-end;margin-bottom:10px}.client-timeline-panel{max-height:280px;overflow:auto;border:1px solid #dfe6f0;border-radius:10px;padding:10px;margin-bottom:14px}.client-timeline-panel article{display:flex;gap:10px;padding:9px;border-bottom:1px solid #edf0f5}.client-timeline-panel article:last-child{border-bottom:0}.client-timeline-panel span,.client-timeline-panel strong,.client-timeline-panel small{display:block}.client-timeline-panel i{color:#4b83f0}.client-timeline-panel small{color:#798395;margin-top:2px}
.communication-inbox{display:flex!important;flex-direction:column;gap:12px}.communication-card{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:14px;padding:16px 18px}.communication-card.is-overdue{border-left:4px solid #e04b55}.communication-card-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#eaf1ff;color:#3974db;font-size:20px}.communication-card-heading{display:flex;justify-content:space-between;gap:12px;color:#69758a;font-size:12px}.communication-card-main h4{font-size:16px;margin:5px 0}.communication-card-main p{color:#667085;margin:0 0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:760px}.communication-card-main footer{display:flex;gap:18px;flex-wrap:wrap;color:#7b8494;font-size:12px}.communication-card-main footer strong{color:#cf3f4b}
.communication-thread{max-height:340px;overflow:auto;background:#f5f7fb;border-radius:12px;padding:14px;margin-bottom:18px;display:flex;flex-direction:column;gap:10px}.communication-message{align-self:flex-start;max-width:82%;background:#fff;border:1px solid #e2e7ef;border-radius:12px 12px 12px 3px;padding:10px 13px}.communication-message.is-outbound{align-self:flex-end;background:#edf4ff;border-color:#cbdcff;border-radius:12px 12px 3px 12px}.communication-message small{color:#7c8593}.communication-message p{margin:4px 0 0;white-space:pre-wrap}.communication-internal{display:flex;align-items:center;gap:8px;margin-bottom:14px;color:#5f6978}
@media(max-width:900px){.client-360-metrics,.communication-overview{grid-template-columns:repeat(2,minmax(0,1fr))}.client-360-columns{grid-template-columns:1fr}.communication-card{grid-template-columns:42px minmax(0,1fr)}.communication-card>.btn{grid-column:1/-1}.communication-card-heading{flex-direction:column}}

/* Centro de organización del estudio */
.organization-page{max-width:1480px;margin:0 auto}.organization-hero{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:22px}.organization-hero h2{margin:3px 0 5px}.organization-hero p{color:#70798a;margin:0}.organization-actions{display:flex;gap:8px;flex-wrap:wrap}
.organization-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:18px}.organization-metrics>article{background:#fff;border:1px solid #e2e8f1;border-radius:13px;padding:15px;display:flex;align-items:center;gap:13px;box-shadow:0 6px 18px rgba(33,48,74,.05)}.organization-metrics>article>i{width:40px;height:40px;border-radius:10px;background:#edf3ff;color:#477bd5;display:grid;place-items:center;font-size:20px}.organization-metrics span,.organization-metrics small,.organization-metrics strong{display:block}.organization-metrics small{color:#778195}.organization-metrics strong{font-size:23px;color:#26334b}
.organization-announcements{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}.organization-announcements article{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:12px;align-items:center;padding:11px 14px;border-radius:10px;background:#eef4ff;border:1px solid #d7e4fa}.organization-announcements article.priority-critical{background:#fff0f1;border-color:#f5c1c5}.organization-announcements p{margin:2px 0;color:#5f697a}.organization-announcements small{color:#768096}
.organization-dismiss{display:block;margin:2px 0 0 auto;border:0;background:transparent;color:#8b94a3;font-size:18px;line-height:1}
.organization-tabs{display:flex;overflow-x:auto;gap:5px;border-bottom:1px solid #dfe5ee;margin-bottom:16px}.organization-tabs button{border:0;background:transparent;padding:11px 15px;color:#687386;white-space:nowrap;border-bottom:3px solid transparent}.organization-tabs button.active{color:#3974d6;border-bottom-color:#4b83f0;font-weight:600}.organization-tabs i{margin-right:5px}.organization-panel{display:none;background:#fff;border:1px solid #e1e7f0;border-radius:14px;padding:20px;min-height:320px}.organization-panel.active{display:block}.organization-panel-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.organization-panel-head h3{font-size:20px;margin:0 0 3px}.organization-panel-head p{color:#778195;margin:0}.organization-panel-head input{max-width:320px}
.organization-config-guide{display:flex;align-items:flex-start;gap:12px;margin:-4px 0 18px;padding:13px 15px;border:1px solid #dce7f8;border-radius:10px;background:#f5f8fe;color:#40516c}.organization-config-guide>i{margin-top:2px;color:#467bd7;font-size:20px}.organization-config-guide>div{display:grid;gap:3px}.organization-config-guide strong{font-size:13px}.organization-config-guide span{color:#6e7b91;font-size:12px;line-height:1.55}
.organization-directory{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.organization-directory>article{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:13px;border:1px solid #e3e8f0;border-radius:12px;padding:15px}.organization-avatar{width:50px;height:50px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#4d86ed,#7967df);color:#fff;font-weight:700}.organization-person>div:first-child{display:flex;align-items:center;gap:8px}.organization-person h4{font-size:16px;margin:0}.organization-person p{margin:2px 0;color:#687386}.organization-person small{color:#7b8493}.organization-person-tags{display:flex;gap:5px;flex-wrap:wrap;margin:9px 0}.organization-person-tags span{font-size:10px;border-radius:10px;padding:3px 7px;background:color-mix(in srgb,var(--unit-color,#778195) 12%,white);color:var(--unit-color,#687386)}.organization-person footer{display:flex;gap:15px;flex-wrap:wrap;font-size:11px;color:#7b8493}.organization-person-load{text-align:right}.organization-person-load strong{display:block;font-size:20px;color:#3f73ce}.organization-person-load small{color:#7b8493}.availability-available{color:#278958;background:#e7f7ed}.availability-vacation,.availability-leave,.availability-training,.availability-unavailable,.availability-remote{color:#a46720;background:#fff3df}.organization-person>div:first-child>span{font-size:10px;padding:3px 7px;border-radius:10px}
.organization-structure-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:20px}.organization-structure-grid>div{background:#f8faff;border-radius:12px;padding:15px}.organization-structure-grid h4{font-size:14px;margin-bottom:12px}.organization-structure-item{display:flex;gap:11px;align-items:center;background:#fff;border:1px solid #e4e9f1;border-radius:10px;padding:11px;margin-bottom:8px}.organization-structure-item>div{flex:1}.organization-structure-item strong,.organization-structure-item small{display:block}.organization-structure-item strong b{font-size:9px;color:#34875b;background:#e7f7ed;border-radius:8px;padding:2px 5px}.organization-structure-item small{color:#7b8494;margin-top:2px}.organization-structure-icon{width:34px;height:34px;border-radius:9px;background:#edf3ff;color:#477bd5;display:grid;place-items:center}.organization-unit-dot{width:12px;height:12px;border-radius:50%;background:var(--unit-color,#4b83f0)}
.organization-workload{display:flex;flex-direction:column;gap:8px}.organization-workload article{display:grid;grid-template-columns:minmax(160px,1fr) 2fr 55px 150px;align-items:center;gap:15px;padding:12px;border:1px solid #e4e9f0;border-radius:10px}.organization-workload strong,.organization-workload small{display:block}.organization-workload small{color:#788294}.organization-load-bar{height:9px;border-radius:6px;background:#edf0f4;overflow:hidden}.organization-load-bar span{display:block;height:100%;background:#4b83f0;border-radius:6px}.load-high .organization-load-bar span{background:#ed922f}.load-critical .organization-load-bar span{background:#d94e5a}
.organization-list{display:flex;flex-direction:column;gap:9px}.organization-list>article{display:flex;align-items:center;gap:14px;border:1px solid #e3e8f0;border-radius:11px;padding:13px}.organization-list>article>div{flex:1}.organization-list strong,.organization-list small{display:block}.organization-list small{color:#758093}.organization-list p{margin:4px 0 0;color:#687386}.organization-date{width:48px;height:52px;border-radius:10px;background:#edf3ff;display:grid;place-items:center;align-content:center;color:#4476cf}.organization-date strong{font-size:19px}.organization-date small{text-transform:uppercase}.organization-list-actions{text-align:right}.organization-list-actions span{display:block;font-size:11px;color:#7b8493;margin-bottom:5px}.availability-icon{width:40px;height:40px;border-radius:10px;background:#fff2df;color:#b07126;display:grid;place-items:center}
.organization-procedures{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.organization-procedures>article{border:1px solid #e1e7ef;border-radius:12px;padding:16px}.organization-procedure-head{display:flex;justify-content:space-between;color:#778195;font-size:11px}.organization-procedure-head b{color:#b2424c;background:#fff0f1;border-radius:9px;padding:2px 6px}.organization-procedures h4{font-size:16px;margin:9px 0 5px}.organization-procedures p{color:#687386;min-height:42px}.organization-procedures footer{display:flex;justify-content:space-between;align-items:center;gap:10px}.organization-procedures footer small{color:#7b8493}.procedure-read{font-size:11px;color:#288858;margin-left:8px}.organization-procedure-content{white-space:pre-wrap;line-height:1.7;color:#39465c}.organization-check{display:flex;align-items:center;padding-top:28px}.organization-check label{display:flex;align-items:center;gap:8px}
@media(max-width:1100px){.organization-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.organization-directory{grid-template-columns:1fr}.organization-structure-grid{grid-template-columns:1fr}}@media(max-width:720px){.organization-hero,.organization-panel-head{align-items:flex-start;flex-direction:column}.organization-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.organization-directory>article{grid-template-columns:48px minmax(0,1fr)}.organization-person-load{grid-column:2}.organization-workload article{grid-template-columns:1fr 55px}.organization-load-bar{grid-column:1/-1}.organization-procedures{grid-template-columns:1fr}.organization-list>article{align-items:flex-start;flex-wrap:wrap}}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.header-area {
    flex: 0 0 auto;
}

/* El menú original es absoluto; mantenerlo fuera del flujo evita que empuje el footer. */
.navbar_dash_area {
    position: static;
    width: 0;
    height: 0;
    flex: 0 0 0;
}

.main-wraper-bg {
    flex: 1 0 auto;
    width: 100%;
    padding-bottom: 42px;
}

.homepage-sec1 {
    padding-bottom: 4px;
}

.dashboard-heading {
    align-items: flex-end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 26px;
}

.dashboard-heading h2 {
    margin-bottom: 6px;
}

.dashboard-heading p {
    color: #777b88;
    margin: 0;
}

.eyebrow {
    color: #9da2ad;
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .09em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.system-status {
    background: #e9f7ed;
    border-radius: 18px;
    color: #43a05b;
    font-size: 12px;
    padding: 8px 13px;
    white-space: nowrap;
}

.system-status i {
    margin-right: 4px;
}

.dashboard-content {
    padding-bottom: 18px;
}

.dashboard-chart-panel,
.dashboard-side-panel {
    margin-bottom: 20px;
}

.panel-link {
    color: #4b83f0;
    font-size: 12px;
    white-space: nowrap;
}

.panel-link:hover,
.dashboard-see-all:hover {
    color: #2f63cf;
}

.dashboard-mini-list {
    display: grid;
    gap: 2px;
}

.dashboard-subsection{border-top:1px solid #edf0f4;margin-top:18px;padding-top:15px}.dashboard-subsection-heading{align-items:center;display:flex;justify-content:space-between;margin-bottom:4px}.dashboard-subsection-heading strong{color:#3d4655;font-size:13px}.dashboard-subsection-heading a{color:#4b83f0;font-size:11px}.dashboard-deadline-item .mini-date{background:#fff6e9;color:#d88623}

.dashboard-mini-item {
    align-items: center;
    border-bottom: 1px solid #f0f1f4;
    display: flex;
    gap: 11px;
    padding: 10px 0;
}

.dashboard-mini-item:last-child {
    border-bottom: 0;
}

.mini-date {
    align-items: center;
    background: #f0f4ff;
    border-radius: 4px;
    color: #4b83f0;
    display: flex;
    flex: 0 0 44px;
    flex-direction: column;
    height: 46px;
    justify-content: center;
}

.mini-date strong {
    font-size: 17px;
    line-height: 18px;
}

.mini-date small {
    font-size: 9px;
    text-transform: uppercase;
}

.mini-info {
    flex: 1 1 auto;
    min-width: 0;
}

.mini-info strong,
.mini-info small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-info strong {
    color: #3d3c48;
    font-size: 13px;
}

.mini-info small {
    color: #999eaa;
    font-size: 11px;
    margin-top: 2px;
}

.mini-arrow {
    color: #a4a8b2;
}

.dashboard-see-all {
    border-top: 1px solid #f0f1f4;
    color: #4b83f0;
    display: block;
    font-size: 12px;
    margin-top: 8px;
    padding-top: 13px;
}

.dashboard-loading,
.dashboard-empty {
    align-items: center;
    color: #9a9eaa;
    display: flex;
    gap: 8px;
    justify-content: center;
    min-height: 120px;
    text-align: center;
}

.dashboard-loading i,
.dashboard-empty i {
    color: #4b83f0;
    font-size: 19px;
}

.dashboard-case-cards {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 18px;
}

.dashboard-case-card {
    border: 1px solid #edf0f4;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 14px;
    transition: border-color .2s, transform .2s;
}

.dashboard-case-card:hover {
    border-color: #cbd8f6;
    transform: translateY(-2px);
}

.dashboard-case-card .case-card-code {
    color: #4b83f0;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 7px;
}

.dashboard-case-card strong {
    color: #3d3c48;
    font-size: 13px;
    line-height: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-case-card small {
    color: #999eaa;
    font-size: 11px;
    margin: 4px 0 10px;
}

.dashboard-case-card .status-chip {
    align-self: flex-start;
}

.dashboard-table-fallback {
    border-top: 1px solid #f0f1f4;
    padding-top: 8px;
}

.dashboard-quick-actions {
    display: grid;
    gap: 10px;
}

.dashboard-onboarding-wrap {
    padding-bottom: 0;
}

.dashboard-onboarding .single-panel-title {
    align-items: flex-start;
}

.dashboard-panel-caption {
    color: #8b909b;
    font-size: 12px;
    margin: 5px 0 0;
}

.onboarding-steps {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.onboarding-step {
    align-items: center;
    background: #fbfcfe;
    border: 1px solid #edf0f4;
    border-radius: 4px;
    color: #3d3c48;
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 13px;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.onboarding-step:hover {
    border-color: #cbd9fb;
    box-shadow: 0 5px 16px rgba(46, 46, 58, .08);
    color: #3d3789;
    text-decoration: none;
    transform: translateY(-2px);
}

.onboarding-number {
    align-items: center;
    background: #eef3ff;
    border-radius: 50%;
    color: #4b83f0;
    display: flex;
    flex: 0 0 30px;
    font-size: 13px;
    font-weight: 700;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.onboarding-step > span:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
}

.onboarding-step strong,
.onboarding-step small {
    display: block;
}

.onboarding-step strong {
    font-size: 13px;
    line-height: 18px;
}

.onboarding-step small {
    color: #9297a3;
    font-size: 11px;
    line-height: 16px;
    margin-top: 2px;
}

.onboarding-step > i {
    color: #4b83f0;
    font-size: 16px;
}

.quick-action {
    align-items: center;
    border-radius: 4px;
    color: #fff;
    display: flex;
    gap: 10px;
    min-height: 56px;
    padding: 10px 13px;
    transition: transform .2s, box-shadow .2s;
}

.quick-action:hover {
    box-shadow: 0 6px 15px rgba(46, 46, 58, .13);
    color: #fff;
    transform: translateX(2px);
}

.quick-action > i:first-child {
    font-size: 21px;
}

.quick-action > i:last-child {
    font-size: 16px;
    margin-left: auto;
}

.quick-action span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.quick-action strong {
    font-size: 13px;
    font-weight: 500;
}

.quick-action small {
    font-size: 11px;
    opacity: .8;
}

.quick-primary { background: #4b83f0; }
.quick-info { background: #21a5b7; }
.quick-success { background: #48a868; }
.quick-warning { background: #ef9b3b; }

.dashboard-activity-list {
    display: grid;
}

.dashboard-activity-item {
    align-items: center;
    border-bottom: 1px solid #f0f1f4;
    display: flex;
    gap: 11px;
    padding: 11px 0;
}

.dashboard-activity-item:last-child {
    border-bottom: 0;
}

.activity-dot {
    align-items: center;
    background: #eef3ff;
    border-radius: 50%;
    color: #4b83f0;
    display: flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.dashboard-activity-item > span:nth-child(2) {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.dashboard-activity-item strong,
.dashboard-activity-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-activity-item strong {
    color: #3d3c48;
    font-size: 13px;
}

.dashboard-activity-item small,
.dashboard-activity-item time {
    color: #999eaa;
    font-size: 11px;
}

.homepage-sec1 .col-lg-3 {
    margin-bottom: 4px;
}

.homepage-sec1-single {
    min-height: 145px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.dashboard-stat-link {
    color: inherit;
    display: block;
    text-decoration: none;
}

.dashboard-stat-link:hover,
.dashboard-stat-link:focus {
    color: inherit;
    text-decoration: none;
}

.dashboard-stat-link:focus-visible {
    outline: 3px solid rgba(72, 128, 243, .35);
    outline-offset: 3px;
}

.homepage-sec1-single:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(46, 46, 58, .12);
}

.single-panel {
    height: 100%;
}

.single-panel-content.chart-area {
    height: 340px;
    position: relative;
}

.single-panel-content.chart-area canvas {
    height: 100% !important;
    width: 100% !important;
}

.single-panel-content .btn {
    margin-bottom: 10px;
    min-height: 42px;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar {
    height: 7px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c9cbd3;
    border-radius: 10px;
}

.dnl-nav li.active > a {
    background: #1c1b24;
    box-shadow: inset 3px 0 0 #4b83f0;
}

.dnl-nav li.active > a .dnl-link-text {
    color: #fff;
}

.dnl-nav li.active > a .dnl-link-icon {
    color: #4b83f0;
}

.module-toolbar .badge {
    background: #4b83f0;
    border-radius: 12px;
    font-weight: 500;
    padding: 5px 9px;
}

.module-toolbar .btn-primary,
.modal-footer .btn-primary {
    background-color: #4b83f0;
    border-color: #4b83f0;
}

.module-toolbar .btn-primary:hover,
.modal-footer .btn-primary:hover {
    background-color: #376edb;
    border-color: #376edb;
}

.footer-area {
    flex: 0 0 auto;
    width: 100%;
    margin-top: auto;
    padding-top: 22px;
    padding-bottom: 22px;
}

.footer-area h5 {
    line-height: 24px;
}

.footer-area .footer-divider {
    margin: 0 8px;
    color: #d4d4d4;
}

.footer-area a {
    padding-left: 0;
}

.footer-area .text-right a + a {
    padding-left: 14px;
}

/* Modales: deben quedar por encima del header y del menú EKUDMIN. */
.modal {
    z-index: 20000;
    padding: 16px !important;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-backdrop {
    z-index: 19990;
    background-color: #14131d;
}

.modal-backdrop.show {
    opacity: .72;
}

.modal-dialog {
    display: flex;
    width: calc(100% - 32px);
    max-width: 760px;
    max-height: calc(100vh - 32px);
    margin: 2rem auto;
}

.modal-dialog.modal-dialog-centered {
    min-height: calc(100% - 4rem);
}

.modal-content {
    width: 100%;
    min-height: 0;
    border: 0;
    border-radius: 3px;
    box-shadow: 0 18px 55px rgba(25, 25, 38, .28);
    overflow: hidden;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
}

/*
 * Bootstrap no convierte en contenedor flexible al formulario que suele
 * envolver el cuerpo y el pie del modal. En formularios extensos eso hacía
 * crecer el formulario fuera de .modal-content y dejaba las acciones debajo
 * del viewport. Esta capa intermedia conserva el encabezado y las acciones y
 * asigna el espacio restante únicamente al cuerpo desplazable.
 */
.modal-content > form,
.modal-content > .modal-form-shell {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.modal-content > form > .modal-body,
.modal-content > .modal-form-shell > .modal-body {
    min-height: 0;
}

.modal-header {
    background: #fd8e40;
    color: #fff;
    border-bottom: 0;
    padding: 20px 24px;
    flex: 0 0 auto;
}

.modal-header .modal-title {
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.modal-subtitle {
    color: rgba(255, 255, 255, .84);
    font-size: 13px;
    line-height: 20px;
    margin: 3px 0 0;
}

.modal-header .close {
    color: #fff;
    opacity: .95;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    margin: 0 0 0 20px;
    text-shadow: none;
}

.modal-header .close:hover {
    color: #fff;
    opacity: 1;
}

.modal-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 24px;
    flex: 1 1 auto;
}

.modal-body .form-group {
    margin-bottom: 18px;
}

.modal-body label {
    color: #3a3947;
    display: block;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    margin-bottom: 7px;
}

.modal-body .form-control {
    border: 1px solid #d9dce5;
    border-radius: 3px;
    color: #2e2e3a;
    font-size: 15px;
    min-height: 42px;
    padding: 8px 12px;
    transition: border-color .2s, box-shadow .2s;
}

.modal-body textarea.form-control {
    min-height: 92px;
    resize: vertical;
}

.modal-body .form-control:focus {
    border-color: #4b83f0;
    box-shadow: 0 0 0 3px rgba(75, 131, 240, .12);
}

.modal-footer {
    background: #fafafa;
    border-top: 1px solid #edf0f4;
    padding: 16px 24px;
    flex: 0 0 auto;
}

.modal-footer .btn {
    border-radius: 3px;
    font-size: 14px;
    min-width: 92px;
    padding: 9px 16px;
}

.modal-footer .btn + .btn {
    margin-left: 8px;
}

/* Panel de trabajo: los formularios con muchos datos necesitan contexto y
   recorrido vertical; en escritorio funcionan mejor como drawer que como una
   ventana flotante comprimida. Se aplica desde legal-ui.js según complejidad. */
@media (min-width: 768px) {
    .modal.legal-workspace-modal {
        padding: 0 !important;
        overflow: hidden;
    }

    .modal.legal-workspace-modal .legal-workspace-dialog {
        width: min(760px, calc(100vw - 72px));
        max-width: 760px;
        height: 100vh;
        max-height: 100vh;
        min-height: 100vh;
        margin: 0 0 0 auto;
        align-items: stretch;
        transform: translateX(48px);
        transition: transform .22s ease-out;
    }

    .modal.legal-workspace-modal .legal-workspace-dialog.modal-xl {
        width: min(920px, calc(100vw - 72px));
        max-width: 920px;
    }

    .modal.legal-workspace-modal.show .legal-workspace-dialog {
        transform: translateX(0);
    }

    .modal.legal-workspace-modal .modal-content {
        height: 100vh;
        max-height: 100vh;
        border: 0;
        border-left: 1px solid #e2e8f0;
        border-radius: 16px 0 0 16px;
        box-shadow: -20px 0 55px rgba(20, 32, 52, .22);
    }

    .modal.legal-workspace-modal .modal-header {
        position: relative;
        padding: 22px 28px 20px 32px;
        color: #24324a;
        border-bottom: 1px solid #e5eaf1;
        background: #fff;
    }

    .modal.legal-workspace-modal .modal-header::before {
        position: absolute;
        top: 22px;
        bottom: 20px;
        left: 0;
        width: 4px;
        border-radius: 0 4px 4px 0;
        background: #f28a45;
        content: "";
    }

    .modal.legal-workspace-modal .modal-header .modal-title,
    .modal.legal-workspace-modal .modal-header h4 {
        color: #24324a;
    }

    .modal.legal-workspace-modal .modal-subtitle {
        color: #748096;
    }

    .modal.legal-workspace-modal .modal-header .close {
        display: grid;
        width: 36px;
        height: 36px;
        margin-left: 22px;
        padding: 0;
        place-items: center;
        color: #536176;
        border-radius: 50%;
        background: #f2f5f9;
    }

    .modal.legal-workspace-modal .modal-header .close:hover {
        color: #24324a;
        background: #e8edf4;
    }

    .modal.legal-workspace-modal .modal-body {
        padding: 26px 30px;
        background: #fbfcfe;
    }

    .modal.legal-workspace-modal .modal-footer {
        padding: 14px 28px;
        box-shadow: 0 -8px 24px rgba(31, 45, 61, .06);
    }
}

/* Vistas de módulos: controles y tablas legibles en pantallas pequeñas. */
.page-container {
    padding-top: 28px;
    padding-bottom: 12px;
}

.page-title-area {
    margin-bottom: 26px;
}

.page-title-area h2 {
    color: #3d3789;
    font-size: 28px;
    margin-bottom: 8px;
}

.page-title-area p {
    color: #777b88;
    margin: 0;
}

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

.module-toolbar h3 {
    display: inline-block;
    margin: 0 12px 0 0;
    vertical-align: middle;
}

.module-toolbar .badge {
    vertical-align: middle;
}

.module-toolbar .btn {
    flex: 0 0 auto;
}

.module-filter-bar {
    align-items: center;
    background: #fbfcfe;
    border: 1px solid #e8ebf1;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 22px;
    padding: 10px;
}

.module-filter-input {
    align-items: center;
    background: #fff;
    border: 1px solid #dfe3eb;
    border-radius: 4px;
    color: #8d93a0;
    display: flex;
    flex: 1 1 280px;
    margin: 0;
    max-width: 390px;
    min-height: 40px;
    padding: 0 12px;
}

.module-filter-input:focus-within {
    border-color: #4b83f0;
    box-shadow: 0 0 0 3px rgba(75, 131, 240, .11);
}

.module-filter-input i {
    color: #4b83f0;
    font-size: 18px;
    margin-right: 9px;
}

.module-filter-input input {
    background: transparent;
    border: 0;
    color: #3d3c48;
    flex: 1 1 auto;
    font-size: 13px;
    min-width: 0;
    outline: 0;
}

.module-filter-input input::placeholder {
    color: #a1a6b2;
}

.module-status-filters {
    align-items: center;
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 5px;
}

.status-filter {
    background: #fff;
    border: 1px solid #e0e4ec;
    border-radius: 16px;
    color: #737987;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.2;
    padding: 7px 11px;
    transition: background .2s, border-color .2s, color .2s;
}

.status-filter:hover,
.status-filter.active {
    background: #eef3ff;
    border-color: #cbd9fb;
    color: #3d3789;
}

.module-filter-note {
    color: #9a9eaa;
    flex: 1 1 100%;
    font-size: 11px;
    margin: 0 2px;
}

#module-table {
    min-width: 700px;
}

#module-table th {
    white-space: nowrap;
}

#module-table td,
#module-table th {
    vertical-align: middle;
}

.module-loading,
.empty-state {
    color: #8b909b;
}

.module-loading i,
.empty-state i {
    color: #4b83f0;
    margin-right: 7px;
}

.empty-state span {
    display: inline-block;
}

.status-chip {
    background: #edf0f5;
    border-radius: 12px;
    color: #666c78;
    display: inline-block;
    font-size: 12px;
    line-height: 1.2;
    padding: 5px 10px;
    white-space: nowrap;
}

.status-activo,
.status-active,
.status-completed,
.status-completada {
    background: #e8f6df;
    color: #4f9c22;
}

.status-pendiente,
.status-pending,
.status-normal {
    background: #fff3df;
    color: #c47a16;
}

.status-inactivo,
.status-cancelled,
.status-overdue,
.status-vencido {
    background: #ffe6e4;
    color: #c6423b;
}

.status-chip.status-high,
.status-chip.status-urgente {
    background: #ffe6e4;
    color: #c6423b;
}

#module-table .btn-outline-primary {
    border-color: #d4ddf7;
    color: #4b83f0;
}

#module-table .btn-outline-primary:disabled {
    opacity: .8;
}

.module-toolbar-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.module-view-switcher {
    background: #f1f3f7;
    border: 1px solid #e4e7ed;
    border-radius: 4px;
    display: inline-flex;
    padding: 3px;
}

.module-view-switcher .btn {
    background: transparent;
    border: 0;
    border-radius: 3px;
    color: #737987;
    margin: 0;
    min-width: auto;
    padding: 7px 10px;
}

.module-view-switcher .btn i {
    margin-right: 5px;
}

.module-view-switcher .btn.active {
    background: #fff;
    box-shadow: 0 2px 6px rgba(46, 46, 58, .12);
    color: #3d3789;
}

.module-visual-view {
    min-height: 150px;
}

.visual-loading,
.visual-empty {
    align-items: center;
    color: #8b909b;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 250px;
    padding: 30px;
    text-align: center;
}

.visual-loading i {
    color: #4b83f0;
    font-size: 28px;
    margin-bottom: 12px;
}

.visual-empty-icon {
    align-items: center;
    background: #eef3ff;
    border-radius: 50%;
    color: #4b83f0;
    display: flex;
    font-size: 28px;
    height: 68px;
    justify-content: center;
    margin-bottom: 16px;
    width: 68px;
}

.visual-empty h4 {
    color: #3d3c48;
    margin-bottom: 6px;
}

.visual-empty p {
    margin-bottom: 16px;
    max-width: 390px;
}

.visual-error .visual-empty-icon {
    background: #fff0ef;
    color: #c6423b;
}

.profile-grid,
.case-grid,
.deadline-grid,
.document-grid,
.finance-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.module-card {
    background: #fff;
    border: 1px solid #edf0f4;
    border-radius: 4px;
    box-shadow: 0 4px 18px rgba(46, 46, 58, .05);
    min-width: 0;
    padding: 18px;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.module-card::after {
    background: linear-gradient(90deg, #4b83f0, #7768df);
    content: "";
    height: 2px;
    left: 18px;
    opacity: 0;
    position: absolute;
    right: 18px;
    top: 0;
    transition: opacity .2s;
}

.module-card {
    position: relative;
}

.module-card:hover {
    border-color: #d9e1f7;
    box-shadow: 0 9px 24px rgba(46, 46, 58, .1);
    transform: translateY(-2px);
}

.module-card:hover::after {
    opacity: 1;
}

.profile-card-top,
.case-card-head,
.deadline-card-top,
.timeline-heading,
.finance-card,
.profile-card-footer,
.case-card-footer,
.agenda-heading,
.kanban-card footer,
.document-card footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.profile-avatar {
    align-items: center;
    background: linear-gradient(135deg, #4b83f0, #7768df);
    border-radius: 50%;
    color: #fff;
    display: flex;
    flex: 0 0 46px;
    font-size: 14px;
    font-weight: 700;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.profile-card-top .status-chip {
    align-self: flex-start;
    margin-left: 8px;
}

.profile-card-title {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 10px;
}

.profile-card-title h4,
.module-card h4 {
    color: #3d3c48;
    font-size: 17px;
    line-height: 23px;
    margin: 0 0 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-card-title p,
.case-card p,
.module-card p {
    color: #858a96;
    font-size: 13px;
    line-height: 20px;
    margin: 0;
}

.profile-details {
    border-bottom: 1px solid #f0f1f4;
    border-top: 1px solid #f0f1f4;
    display: grid;
    gap: 8px;
    margin: 16px 0 12px;
    padding: 13px 0;
}

.profile-details span {
    color: #777d89;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-details i,
.case-type i,
.agenda-content p i,
.timeline-channel i {
    color: #4b83f0;
    margin-right: 6px;
}

.profile-card-footer,
.case-card-footer {
    color: #9a9eaa;
    font-size: 12px;
}

.icon-action {
    background: transparent;
    border: 0;
    color: #4b83f0;
    cursor: pointer;
    font-size: 17px;
    padding: 2px 0 2px 12px;
}

.icon-action:disabled {
    cursor: default;
    opacity: .65;
}

.case-code {
    color: #4b83f0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
}

.case-card h4 {
    margin-top: 18px;
    white-space: normal;
}

.case-type {
    margin-bottom: 18px !important;
}

.case-client {
    color: #4b83f0;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px !important;
}

.case-client i {
    margin-right: 6px;
}

.case-card-meta {
    background: #f8f9fb;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
    margin: 0 -18px 14px;
    padding: 13px 18px;
}

.case-card-meta span {
    color: #555b68;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.case-card-meta small {
    color: #9a9eaa;
    display: block;
    font-size: 11px;
    margin-bottom: 2px;
}

.agenda-list {
    display: grid;
    gap: 12px;
}

.agenda-item {
    align-items: stretch;
    background: #fff;
    border: 1px solid #edf0f4;
    border-left: 4px solid #4b83f0;
    border-radius: 4px;
    box-shadow: 0 4px 18px rgba(46, 46, 58, .04);
    display: flex;
    min-height: 94px;
    overflow: hidden;
}

.agenda-date {
    align-items: center;
    background: #f7f9ff;
    color: #4b83f0;
    display: flex;
    flex: 0 0 78px;
    flex-direction: column;
    justify-content: center;
}

.agenda-date strong {
    font-size: 25px;
    line-height: 28px;
}

.agenda-date span {
    font-size: 12px;
    text-transform: uppercase;
}

.agenda-content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 18px;
}

.agenda-heading h4 {
    margin-right: 10px;
    white-space: normal;
}

.agenda-content p {
    color: #737987;
    font-size: 13px;
    margin: 6px 0 2px;
}

.agenda-content p i + i {
    margin-left: 15px;
}

.agenda-content small {
    color: #a0a4ae;
}

.deadline-card {
    border-top: 3px solid #4b83f0;
}

.deadline-card.priority-high,
.deadline-card.priority-urgent,
.deadline-card.priority-alta {
    border-top-color: #ed5b50;
}

.deadline-card.priority-medium,
.deadline-card.priority-media {
    border-top-color: #ee9b35;
}

.deadline-card-top i {
    color: #4b83f0;
    font-size: 21px;
}

.deadline-card h4 {
    margin: 18px 0 8px;
    white-space: normal;
}

.deadline-card-footer {
    border-top: 1px solid #f0f1f4;
    margin-top: 17px;
    padding-top: 13px;
}

.kanban-board {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kanban-column {
    background: #f5f6f9;
    border-radius: 4px;
    min-height: 260px;
    padding: 12px;
}

.kanban-column > header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 11px;
}

.kanban-column h4 {
    color: #555a68;
    font-size: 14px;
    margin: 0;
}

.kanban-column h4 i {
    color: #4b83f0;
    margin-right: 6px;
}

.kanban-column > header span {
    background: #e4e8f1;
    border-radius: 12px;
    color: #707786;
    font-size: 12px;
    padding: 2px 8px;
}

.kanban-items {
    display: grid;
    gap: 10px;
}

.kanban-card {
    background: #fff;
    border: 1px solid #ebedf2;
    border-radius: 4px;
    box-shadow: 0 3px 9px rgba(46, 46, 58, .05);
    cursor: pointer;
    padding: 13px;
    position: relative;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.kanban-card:focus-visible {
    border-color: #4b83f0;
    box-shadow: 0 0 0 3px rgba(75, 131, 240, .16);
    outline: 0;
}

.kanban-card.is-selected {
    background: #f7faff;
    border-color: #4b83f0;
    box-shadow: 0 0 0 2px rgba(75, 131, 240, .14), 0 8px 18px rgba(46, 78, 140, .08);
}

.kanban-card-select {
    align-items: center;
    color: #718096;
    cursor: pointer;
    display: inline-flex;
    font-size: 11px;
    gap: 6px;
    margin: 0 0 9px;
}

.kanban-card-select input {
    accent-color: #4b83f0;
    cursor: pointer;
    height: 15px;
    width: 15px;
}

.kanban-card h5 {
    color: #3d3c48;
    font-size: 14px;
    line-height: 20px;
    margin: 0 0 6px;
}

.kanban-card p {
    display: -webkit-box;
    font-size: 12px;
    line-height: 18px;
    margin-bottom: 12px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.task-context {
    background: #f7f9fc;
    border: 1px solid #e8edf5;
    border-radius: 8px;
    display: grid;
    gap: 0;
    margin: 2px 0 12px;
    padding: 7px 8px;
}

.task-context-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: #52617a;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    padding: 0;
    text-align: left;
    width: 100%;
}

.task-context-toggle:focus-visible {
    border-radius: 5px;
    box-shadow: 0 0 0 3px rgba(75, 131, 240, .16);
    outline: 0;
}

.task-context-summary {
    align-items: center;
    display: grid;
    gap: 7px;
    grid-template-columns: 16px minmax(0, 1fr);
    min-width: 0;
}

.task-context-summary > i {
    color: #6683b4;
    text-align: center;
}

.task-context-summary > span {
    display: grid;
    min-width: 0;
}

.task-context-summary small {
    color: #8a96aa;
    font-size: 8px;
    line-height: 11px;
    text-transform: uppercase;
}

.task-context-summary strong {
    color: #35435b;
    font-size: 10px;
    line-height: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-context-toggle-label {
    color: #3f6fae;
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.task-context-toggle-label i {
    margin-left: 2px;
}

.task-context-details {
    border-top: 1px solid #e3e9f2;
    display: grid;
    gap: 7px;
    margin-top: 7px;
    padding: 8px 1px 1px;
}

.task-context-details[hidden] {
    display: none;
}

.task-ai-open {
    align-items: center;
    background: linear-gradient(135deg, #7256c8, #4b83f0);
    border: 0;
    box-shadow: 0 7px 16px rgba(91, 91, 190, .2);
    color: #fff;
    display: inline-flex;
    gap: 7px;
}

.task-ai-open:hover,
.task-ai-open:focus {
    color: #fff;
    box-shadow: 0 9px 20px rgba(91, 91, 190, .28);
}

.task-ai-open i {
    font-size: 17px;
}

@media (max-width: 575px) {
    .task-ai-open span {
        font-size: 0;
    }
    .task-ai-open span::after {
        content: "Tareas con IA";
        font-size: 12px;
    }
}

.task-context-row {
    align-items: center;
    color: #52617a;
    display: grid;
    gap: 7px;
    grid-template-columns: 16px minmax(0, 1fr);
    min-width: 0;
    text-decoration: none;
}

.task-context-row > i {
    color: #6683b4;
    font-size: 14px;
    text-align: center;
}

.task-context-row > span {
    display: grid;
    min-width: 0;
}

.task-context-row small {
    color: #8a96aa;
    font-size: 9px;
    line-height: 12px;
    text-transform: uppercase;
}

.task-context-row strong {
    color: #35435b;
    font-size: 11px;
    font-weight: 600;
    line-height: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-context-case:hover strong {
    color: #2f6fd0;
    text-decoration: underline;
}

.task-context-row.is-empty strong {
    color: #8a96aa;
    font-weight: 500;
}

.task-progress {
    background: #edf0f4;
    border-radius: 10px;
    height: 5px;
    overflow: hidden;
}

.task-progress span {
    background: #4b83f0;
    border-radius: inherit;
    display: block;
    height: 100%;
}

.kanban-card footer {
    margin-top: 11px;
}

.kanban-card footer small {
    color: #9a9eaa;
    font-size: 11px;
}

.kanban-card > .record-actions {
    border-top: 1px solid #edf1f6;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding-top: 11px;
}

.kanban-card > .record-actions .quick-status-label {
    flex: 1 1 100%;
    justify-content: space-between;
}

.kanban-card > .record-actions .quick-status {
    min-width: 120px;
}

.kanban-card > .record-actions .btn {
    flex: 1 1 auto;
    font-size: 11px;
    padding: 5px 7px;
}

.kanban-empty {
    border: 1px dashed #d6d9e1;
    border-radius: 4px;
    color: #a4a8b2;
    padding: 30px 8px;
    text-align: center;
}

.activity-timeline {
    margin: 0 auto;
    max-width: 900px;
    padding: 6px 12px;
}

.timeline-item {
    display: flex;
    min-height: 108px;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    background: #e2e6ee;
    content: "";
    left: 20px;
    position: absolute;
    top: 45px;
    bottom: -3px;
    width: 1px;
}

.timeline-icon {
    align-items: center;
    background: #eef3ff;
    border: 4px solid #fff;
    border-radius: 50%;
    color: #4b83f0;
    display: flex;
    flex: 0 0 42px;
    height: 42px;
    justify-content: center;
    position: relative;
    width: 42px;
    z-index: 1;
}

.timeline-content {
    background: #fff;
    border: 1px solid #edf0f4;
    border-radius: 4px;
    box-shadow: 0 3px 12px rgba(46, 46, 58, .04);
    flex: 1 1 auto;
    margin: 0 0 14px 14px;
    min-width: 0;
    padding: 14px 16px;
}

.timeline-heading h4 {
    font-size: 16px;
    margin: 0 10px 0 0;
}

.timeline-heading small {
    color: #9a9eaa;
    white-space: nowrap;
}

.timeline-content p {
    color: #747a87;
    font-size: 13px;
    margin: 7px 0 10px;
}

.timeline-channel {
    color: #9297a3;
    font-size: 12px;
    margin-left: 12px;
}

.document-card {
    align-items: flex-start;
    display: flex;
    gap: 13px;
}

.document-icon,
.finance-icon,
.generic-icon {
    align-items: center;
    background: #fff0ed;
    border-radius: 4px;
    color: #ed6a58;
    display: flex;
    flex: 0 0 46px;
    font-size: 22px;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.document-pdf { background: #fff0ed; color: #d84e42; }
.document-word { background: #edf3ff; color: #3673d3; }
.document-excel { background: #eaf8ec; color: #3c9d58; }
.document-text, .document-text-plain { background: #eef2f7; color: #536174; }
.document-audio { background: #f5edff; color: #8253c5; }
.document-video { background: #fff4df; color: #c98123; }

.document-content {
    flex: 1 1 auto;
    min-width: 0;
}

.document-start-card {
    align-items: center;
    background: linear-gradient(135deg, #f8faff, #fff);
    border: 1px dashed #cbd9fb;
    border-radius: 5px;
    display: flex;
    gap: 20px;
    margin: 12px auto;
    max-width: 760px;
    padding: 28px;
}

.document-start-icon {
    align-items: center;
    background: #eef3ff;
    border-radius: 50%;
    color: #4b83f0;
    display: flex;
    flex: 0 0 64px;
    font-size: 28px;
    height: 64px;
    justify-content: center;
    width: 64px;
}

.document-start-card h4 {
    color: #3d3c48;
    font-size: 19px;
    margin: 4px 0 5px;
}

.document-start-card p {
    color: #777d89;
    font-size: 13px;
    line-height: 21px;
    margin: 0 0 15px;
}

.document-dropzone {
    align-items: center;
    background: #fbfcfe;
    border: 1px dashed #cbd9fb;
    border-radius: 5px;
    color: #4b83f0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    margin-bottom: 18px;
    min-height: 135px;
    padding: 20px;
    position: relative;
    text-align: center;
    transition: background .2s, border-color .2s;
}

.document-dropzone:hover,
.document-dropzone.dragover {
    background: #eef3ff;
    border-color: #4b83f0;
}

.document-dropzone > i {
    font-size: 31px;
}

.document-dropzone strong {
    color: #555a68;
    font-size: 14px;
}

.document-dropzone small {
    color: #9a9eaa;
    font-size: 11px;
}

.document-dropzone input[type="file"] {
    cursor: pointer;
    height: 100%;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.document-file-name {
    background: #eef8ed;
    border-radius: 4px;
    color: #4f9c22;
    font-size: 12px;
    margin: -6px 0 17px;
    padding: 9px 11px;
}

.upload-flow-note {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.upload-step {
    color: #a0a4ae;
    font-size: 11px;
}

.upload-step strong {
    align-items: center;
    background: #edf0f4;
    border-radius: 50%;
    display: inline-flex;
    height: 22px;
    justify-content: center;
    margin-right: 4px;
    width: 22px;
}

.upload-step.active {
    color: #3d3789;
}

.upload-step.active strong {
    background: #eef3ff;
    color: #4b83f0;
}

.document-content h4 {
    font-size: 15px;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-content footer {
    color: #9a9eaa;
    font-size: 11px;
    margin-top: 13px;
}

.document-download {
    background: transparent;
    border: 0;
    color: #4b83f0;
    cursor: pointer;
    font-size: 12px;
    margin-top: 12px;
    padding: 0;
}

.record-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.record-actions .btn {
    border-radius: 7px;
    font-size: 12px;
}

.document-ai-status {
    color: #536dfe;
    font-size: 12px;
    margin: 8px 0;
    text-transform: capitalize;
}

.document-analysis-summary {
    color: #6d7485;
    display: block;
    line-height: 1.45;
    margin-bottom: 8px;
}

.document-download:hover {
    color: #3d3789;
    text-decoration: underline;
}

.document-download:disabled {
    cursor: wait;
    opacity: .65;
}

.finance-card {
    justify-content: flex-start;
    gap: 13px;
}

.finance-card > div:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
}

.finance-card small {
    color: #858a96;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-card h4 {
    margin: 3px 0;
}

.finance-card p {
    font-size: 12px;
}

.generic-card {
    text-align: center;
}

.generic-icon {
    margin: 0 auto 12px;
}

/* Ficha visual del expediente. Mantiene la lectura enfocada y evita modales interminables. */
.case-detail-body {
    padding: 0;
}

.case-detail-tabs {
    border-bottom: 1px solid #edf0f4;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 0 24px;
    scrollbar-width: thin;
}

.case-detail-tabs button {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #777d89;
    cursor: pointer;
    font-size: 14px;
    padding: 15px 12px 13px;
    white-space: nowrap;
}

.case-detail-tabs button:hover,
.case-detail-tabs button.active {
    border-bottom-color: #4b83f0;
    color: #3d3789;
}

.case-detail-content {
    min-height: 280px;
    padding: 24px;
}

.case-summary-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case-summary-item {
    background: #f8f9fb;
    border: 1px solid #edf0f4;
    border-radius: 4px;
    min-width: 0;
    padding: 13px 15px;
}

.case-summary-item small,
.case-detail-description small {
    color: #9a9eaa;
    display: block;
    font-size: 11px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.case-summary-item strong {
    color: #3d3c48;
    display: block;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.case-detail-description {
    background: #fff;
    border: 1px solid #edf0f4;
    border-radius: 4px;
    margin-top: 14px;
    padding: 15px;
}

.case-detail-description p {
    color: #6f7481;
    font-size: 14px;
    line-height: 22px;
    margin: 0;
}

.case-detail-link-card {
    align-items: flex-start;
    background: #f8f9fb;
    border: 1px solid #edf0f4;
    border-radius: 5px;
    display: flex;
    gap: 16px;
    margin: 18px auto;
    max-width: 640px;
    padding: 24px;
}

.case-detail-link-icon {
    align-items: center;
    background: #eef3ff;
    border-radius: 50%;
    color: #4b83f0;
    display: flex;
    flex: 0 0 52px;
    font-size: 24px;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.case-detail-link-card h4 {
    color: #3d3c48;
    font-size: 18px;
    margin: 0 0 6px;
}

.case-detail-link-card p {
    color: #777d89;
    font-size: 13px;
    line-height: 21px;
    margin: 0 0 16px;
}

@media (max-width: 767px) {
    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .dashboard-case-cards {
        grid-template-columns: 1fr;
    }

    .header-area .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .header-area .row {
        align-items: center;
        display: flex;
        flex-wrap: nowrap;
    }

    .header-area .col-md-2 {
        flex: 0 0 42%;
        max-width: 42%;
    }

    .header-area .search-area {
        flex: 0 0 12%;
        max-width: 12%;
        padding: 0;
    }

    .header-area .col-md-6 {
        flex: 1 1 auto;
        max-width: none;
        padding: 0;
    }

    .logo {
        padding-left: 4px;
        padding-top: 24px;
    }

    .logo a {
        font-size: 16px;
    }

    .header-right {
        white-space: nowrap;
    }

    .header-right .user-id {
        display: inline-block;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
    }

    .homepage-sec1-single {
        min-height: 132px;
    }

    .module-toolbar-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .module-view-switcher {
        display: flex;
        width: 100%;
    }

    .module-view-switcher .btn {
        flex: 1 1 50%;
    }

    .profile-grid,
    .case-grid,
    .deadline-grid,
    .document-grid,
    .finance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }

    .kanban-column {
        min-height: auto;
    }

    .single-panel-content.chart-area {
        height: 250px;
    }

    .modal {
        padding: 10px !important;
    }

    .modal-dialog,
    .modal-dialog.modal-dialog-centered {
        width: 100%;
        max-width: none;
        min-height: calc(100% - 20px);
        margin: 10px auto;
    }

    .modal-content {
        max-height: calc(100vh - 20px);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .modal-header .modal-title {
        font-size: 19px;
    }

    .modal-footer {
        display: flex;
        justify-content: flex-end;
    }

    .page-container {
        padding-top: 20px;
    }

    .page-title-area h2 {
        font-size: 24px;
    }

    .module-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .module-toolbar .btn {
        width: 100%;
    }

    .module-filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .module-filter-input {
        flex-basis: auto;
        max-width: none;
        width: 100%;
    }

    .module-status-filters {
        width: 100%;
    }

    .status-filter {
        flex: 1 1 auto;
    }

    .onboarding-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .document-start-card {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }
}

/* Encabezado unificado: elimina el placeholder del template y alinea sus acciones. */
.header-area .row {
    align-items: center;
    min-height: 76px;
}

.header-area {
    min-height: 76px;
}

.navbar_dash_area {
    margin-top: 0;
}

.logo {
    align-items: center;
    display: flex;
    height: 76px;
    padding-top: 0;
}

.search-area {
    align-items: center;
    display: flex;
    height: 76px;
    padding-top: 0;
}

.header-right {
    align-items: center;
    display: flex;
    height: 76px;
    justify-content: flex-end;
}

.header-right .cta3 > a {
    align-items: center;
    display: flex;
    gap: 10px;
}

.legal-avatar {
    align-items: center;
    background: #fff;
    border: 2px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
    color: #fd8e40;
    display: inline-flex;
    flex: 0 0 38px;
    font-size: 16px;
    font-weight: 700;
    height: 38px;
    justify-content: center;
    width: 38px;
}

@media (max-width: 767px) {
    .header-area,
    .header-area .row,
    .logo,
    .search-area,
    .header-right {
        height: 76px;
        min-height: 76px;
    }

    .logo a {
        font-size: 15px;
    }

    .legal-avatar {
        flex-basis: 34px;
        height: 34px;
        width: 34px;
    }
}

@media (max-width: 480px) {
    .dashboard-case-cards {
        grid-template-columns: 1fr;
    }

    .dashboard-activity-item time {
        display: none;
    }

    .profile-grid,
    .case-grid,
    .deadline-grid,
    .document-grid,
    .finance-grid {
        grid-template-columns: 1fr;
    }

    .agenda-item {
        min-height: 86px;
    }

    .agenda-date {
        flex-basis: 64px;
    }

    .agenda-content {
        padding: 12px;
    }

    .agenda-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .agenda-heading .status-chip {
        margin-top: 4px;
    }

    .timeline-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .timeline-heading small {
        margin-top: 3px;
    }

    .timeline-channel {
        display: block;
        margin: 6px 0 0;
    }

    .onboarding-steps {
        grid-template-columns: 1fr;
    }

    .upload-flow-note {
        align-items: flex-start;
        flex-direction: column;
    }

    .case-summary-grid {
        grid-template-columns: 1fr;
    }

    .case-detail-content {
        padding: 16px;
    }

    .case-detail-tabs {
        padding: 0 12px;
    }

    .case-detail-tabs button {
        padding-left: 8px;
        padding-right: 8px;
    }

    .case-detail-link-card {
        align-items: center;
        flex-direction: column;
        padding: 20px 16px;
        text-align: center;
    }

    .homepage-sec1 .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .homepage-sec1-single {
        min-height: 120px;
    }

    .homepage-sec1 h2 {
        font-size: 23px;
    }

    .single-panel-content.chart-area {
        height: 210px;
    }

    .footer-area h5 {
        font-size: 12px;
    }
}

/*
 * Legibilidad del contenido generado.
 *
 * Las respuestas de IA, el texto extraido, los borradores y los registros que
 * construye JavaScript son contenido de lectura, no microcopy de interfaz. Esta
 * capa mantiene una base comoda sin alterar botones, iconos ni controles.
 */
:root {
    --generated-prose-size: 16px;
    --generated-item-size: 15px;
    --generated-meta-size: 13px;
    --generated-heading-size: 17px;
    --generated-line-height: 1.65;
}

/* Resultados narrativos: IA, OCR, borradores, correo y mensajeria. */
.automation-insight-head p,
.automation-insight > section p,
.automation-answer p,
.automation-draft-result pre,
.ai-summary-hero p,
.document-text-content pre,
.email-body,
.email-ai p,
.wa-message p,
.request-note,
.request-review,
.closure-summary,
.portal-closure-summary,
.case-detail-description p,
#public-upload-message,
#public-upload-result {
    font-size: var(--generated-prose-size) !important;
    line-height: var(--generated-line-height) !important;
}

/* Elementos estructurados producidos por analisis o automatizaciones. */
.automation-insight > section h5,
.automation-suggestion-grid h5,
.ai-analysis-section h5,
.automation-draft-result-head,
.document-review-history strong {
    font-size: var(--generated-heading-size) !important;
    line-height: 1.45 !important;
}

.ai-analysis-list li,
.ai-empty-item,
.automation-suggestion strong,
.automation-rule strong,
.automation-run strong,
.document-review-history p,
.case-history-card h5 {
    font-size: var(--generated-item-size) !important;
    line-height: 1.55 !important;
}

.ai-analysis-section header small,
.ai-entity-group > span,
.ai-entity-group em,
.automation-suggestion small,
.automation-missing span,
.automation-approval-bar,
.automation-sources a,
.automation-save-document,
.automation-rule small,
.automation-rule-actions-list span,
.automation-run small,
.automation-run time,
.automation-run b,
.automation-run p,
.document-review-history span,
.email-ai small,
.wa-message small,
.case-history-card header span,
.case-history-card time,
.case-history-change > strong,
.case-history-before,
.case-history-after {
    font-size: var(--generated-meta-size) !important;
    line-height: 1.5 !important;
}

/* Tarjetas, tablas e historiales cuyo contenido se inserta desde JavaScript. */
.main-wraper-bg :is(
    #module-visual,
    #module-body,
    #case-detail-content,
    #case-history-content,
    [id$="-list"],
    [id$="-history"],
    [id$="-runs"],
    [id$="-rules"]
) :is(p, li, td, blockquote) {
    font-size: var(--generated-item-size) !important;
    line-height: 1.55 !important;
}

.main-wraper-bg :is(
    #module-visual,
    #module-body,
    #case-detail-content,
    #case-history-content,
    [id$="-list"],
    [id$="-history"],
    [id$="-runs"],
    [id$="-rules"]
) :is(small, time, em) {
    font-size: var(--generated-meta-size) !important;
    line-height: 1.5 !important;
}

.main-wraper-bg :is(
    #module-visual,
    #module-body,
    #case-detail-content,
    #case-history-content,
    [id$="-list"],
    [id$="-history"],
    [id$="-runs"],
    [id$="-rules"]
) :is(h4, h5) {
    font-size: var(--generated-heading-size) !important;
    line-height: 1.4 !important;
}

/* Resultados globales generados mientras el usuario busca. */
.global-search-result span { font-size: 15px !important; }
.global-search-result small { font-size: 13px !important; }
.global-search-empty { font-size: 15px !important; }

@media (max-width: 767px) {
    :root {
        --generated-prose-size: 16px;
        --generated-item-size: 14px;
        --generated-meta-size: 13px;
        --generated-heading-size: 17px;
    }
}

@media (max-width: 767px) {
    .footer-area {
        padding-left: 15px;
        padding-right: 15px;
    }

    .footer-area .text-right {
        text-align: left !important;
        margin-top: 8px;
    }
}

/* El layout original deja 267px para el sidebar incluso cuando este se oculta
   en pantallas pequeñas. En móvil el contenido debe ocupar todo el ancho. */
@media (max-width: 767px) {
    .mar_lft_282,
    .footer-area {
        padding-left: 12px;
        padding-right: 12px;
    }

    .main-wraper-bg {
        width: 100%;
        min-width: 0;
    }

    .header-area {
        overflow: visible;
    }

    .header-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-width: 0;
    }

    .header-right > ul {
        flex: 0 0 auto;
    }

    .header-right li.dropdown.header-left-flag.cta,
    .header-right li.dropdown.header-left-flag.cta3 {
        padding-left: 8px;
        padding-right: 8px;
    }

    .header-notification-menu {
        top: 64px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        min-width: 0 !important;
        max-height: min(420px, calc(100vh - 82px));
        overflow-y: auto;
    }
}
/* Automatizaciones y acciones contextuales */
.client-lookup-bar{display:grid;grid-template-columns:170px minmax(0,1fr);align-items:start;gap:.9rem 1.15rem;margin:0 0 1.25rem;padding:1.15rem 1.25rem;border:1px solid #dce5f5;border-radius:12px;background:#f7faff}.client-lookup-copy{grid-column:1/-1;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:baseline;gap:.2rem .8rem;padding-bottom:.85rem;border-bottom:1px solid #e2eaf7}.client-lookup-copy strong,.client-lookup-copy small{display:block}.client-lookup-copy strong{color:#27364b;font-size:15px;white-space:nowrap}.client-lookup-copy small{margin:0;color:#718096;line-height:1.45}.client-lookup-kicker{grid-column:1/-1;display:block;margin-bottom:.05rem;color:#4b83f0;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.client-type-control label,.client-lookup-controls label{display:block;margin-bottom:.35rem;color:#3d4655;font-size:12px;font-weight:600}.client-type-control{margin:0}.client-type-control .form-control{height:38px}.client-lookup-controls{min-width:0}.client-lookup-input{display:flex;gap:.55rem}.client-lookup-input .form-control{height:38px;min-width:0}.client-lookup-input button{white-space:nowrap}.client-lookup-status{display:block;min-height:17px;margin-top:.3rem;font-size:11px;color:#718096}.client-lookup-status.is-loading{color:#4b83f0}.client-lookup-status.is-success{color:#23814b}.client-lookup-status.is-error{color:#c53b3b}
.client-lookup-status.is-warning{color:#b46b13}
.document-card-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1rem}.document-card-actions button{border:0;border-radius:6px;padding:.55rem .75rem;background:#eef4ff;color:#2167d5}.document-card-actions .document-apply-ai{background:#e8f8ef;color:#16834b}
.case-card-meta span{min-width:0}.case-card-meta small{display:block;color:#8491a5;font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;margin-bottom:.2rem}
@media (max-width:767px){.client-lookup-bar{display:flex;align-items:stretch;flex-direction:column;gap:1rem}.client-lookup-copy{display:block}.client-lookup-copy strong{white-space:normal}.client-lookup-copy small{margin-top:.35rem}.client-lookup-controls{flex-basis:auto}.client-lookup-input{flex-direction:column}.client-lookup-bar button{width:100%}.document-card-actions button{flex:1 1 100%}}

/* Analisis IA de documentos: tarjeta compacta + lectura detallada en modal */
.document-grid{grid-template-columns:minmax(0,1fr);gap:16px}
.document-card{min-width:0;padding:18px 20px;box-shadow:0 6px 22px rgba(31,45,61,.06);border:1px solid #e8edf5}
.document-content{width:100%}
.document-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.document-card-heading>div{min-width:0}
.document-card-heading h4{font-size:16px;color:#29355c;margin-bottom:4px}
.document-card-heading p{margin:0;color:#8b93a6;font-size:12px}
.document-view-ai{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;border:1px solid #d7dfff;border-radius:9px;padding:8px 11px;background:#f5f7ff;color:#4d68d8;font-size:12px;cursor:pointer;transition:.2s}
.document-view-ai:hover{background:#4d68d8;color:#fff;border-color:#4d68d8;transform:translateY(-1px)}
.document-ai-status{display:flex;align-items:center;gap:7px;margin:15px 0 0;padding:9px 11px;border-radius:8px;background:#f7f8fc;color:#65718a;font-size:12px}
.document-ai-status>i{color:#6c63d9;font-size:16px}
.document-ai-status.is-completed{background:#f1f8f5;color:#267a54}.document-ai-status.is-completed>i{color:#2b9b68}
.document-ai-status.is-processing{background:#fff8e9;color:#a8751b}.document-ai-status.is-processing>i{color:#e3a92f}
.document-ai-inline{margin-left:auto;border:0;background:transparent;color:#4d68d8;font-size:11px;cursor:pointer}
.document-ai-inline:hover{text-decoration:underline}
.document-card-actions{margin-top:12px}
.document-card-actions .document-download{margin-top:0;padding:7px 10px;border-radius:7px;background:#eef4ff;text-decoration:none}
.document-card-actions .document-download:hover{background:#dfeaff;text-decoration:none}
.document-analysis-summary{display:none!important}

.ai-analysis-modal{border:0;border-radius:16px;overflow:hidden;box-shadow:0 18px 60px rgba(24,34,62,.25)}
.ai-analysis-header{align-items:center;background:linear-gradient(135deg,#3d3789,#536dfe);border:0;color:#fff;padding:20px 24px}
.ai-analysis-title-wrap{display:flex;align-items:center;gap:13px;min-width:0}.ai-analysis-title-wrap .modal-title{color:#fff;font-size:20px}.ai-analysis-title-wrap .modal-subtitle{color:rgba(255,255,255,.75);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:620px}
.ai-analysis-logo{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:13px;background:rgba(255,255,255,.18);font-size:22px}
.ai-analysis-header-meta{display:flex;align-items:center;gap:14px;margin-left:auto}.ai-analysis-header .close{color:#fff;opacity:.9;text-shadow:none}
.ai-analysis-status{border:1px solid rgba(255,255,255,.35);border-radius:99px;padding:6px 9px;font-size:10px;font-weight:700;letter-spacing:.04em;white-space:nowrap}
.ai-analysis-body{background:#f7f9fc;padding:22px 24px}.ai-summary-hero{display:flex;gap:14px;align-items:flex-start;background:#fff;border:1px solid #e6eaf3;border-radius:12px;padding:18px;margin-bottom:18px}.ai-summary-hero-icon{display:flex;align-items:center;justify-content:center;flex:0 0 38px;height:38px;border-radius:10px;background:#eef0ff;color:#536dfe;font-size:18px}.ai-section-eyebrow{display:block;color:#536dfe;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;margin-bottom:5px}.ai-summary-hero p{margin:0;color:#4c566b;line-height:1.6;font-size:14px}
.ai-analysis-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.ai-analysis-section{background:#fff;border:1px solid #e6eaf3;border-radius:12px;padding:16px;min-width:0}.ai-analysis-section>header{display:flex;align-items:center;gap:10px;margin-bottom:12px}.ai-analysis-section h5{margin:0;color:#303951;font-size:14px}.ai-analysis-section header small{display:block;color:#98a0b0;font-size:11px;margin-top:3px}.ai-section-icon{display:flex;align-items:center;justify-content:center;flex:0 0 34px;width:34px;height:34px;border-radius:10px;font-size:17px}.ai-blue{background:#edf3ff;color:#4b83f0}.ai-orange{background:#fff4e6;color:#ed922b}.ai-red{background:#fff0f0;color:#ee6262}.ai-green{background:#eaf8ef;color:#37a36a}
.ai-analysis-list{list-style:none;margin:0;padding:0;max-height:150px;overflow:auto}.ai-analysis-list li,.ai-empty-item{display:flex;align-items:flex-start;gap:7px;padding:8px 0;border-bottom:1px solid #f0f2f6;color:#626d81;font-size:12px;line-height:1.45}.ai-analysis-list li:last-child{border-bottom:0}.ai-analysis-list li>i,.ai-empty-item>i{color:#9ca8ba;margin-top:2px}.ai-analysis-list strong{color:#394875}.ai-empty-item{color:#a0a7b4;border-bottom:0;font-style:italic}.ai-entity-list{display:flex;flex-direction:column;gap:10px}.ai-entity-group>span{display:block;color:#98a0b0;font-size:10px;text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px}.ai-entity-group>div{display:flex;flex-wrap:wrap;gap:5px}.ai-entity-group em{font-style:normal;border-radius:99px;padding:5px 8px;background:#f3f5fa;color:#59657b;font-size:11px}.ai-analysis-footer{align-items:center;justify-content:space-between;gap:14px;background:#fff;border-top:1px solid #e8ebf2;padding:14px 24px}.ai-analysis-disclaimer{color:#8c95a5;font-size:11px}.ai-analysis-disclaimer i{margin-right:4px;color:#536dfe}.ai-analysis-footer .btn-primary{background:#536dfe;border-color:#536dfe}.ai-analysis-loading{align-items:center;gap:8px;color:#536dfe;margin-bottom:14px}.ai-analysis-loading:not(.d-none){display:flex!important}
@media(max-width:767px){.document-card-heading{flex-direction:column;gap:10px}.document-view-ai{width:100%;justify-content:center}.ai-analysis-header{padding:16px}.ai-analysis-title-wrap .modal-subtitle{max-width:210px}.ai-analysis-status{display:none}.ai-analysis-body{padding:14px}.ai-analysis-grid{grid-template-columns:1fr}.ai-analysis-footer{align-items:stretch;flex-direction:column;padding:14px}.ai-analysis-footer>div{display:flex;gap:8px}.ai-analysis-footer .btn{flex:1}.ai-analysis-disclaimer{line-height:1.4}}
.document-case-context{display:flex;flex:1 1 320px;flex-direction:column;gap:4px;min-width:260px;padding:3px 4px}.document-case-context label{color:#59657b;font-size:11px;font-weight:700;margin:0;text-transform:uppercase;letter-spacing:.04em}.document-case-context label i{color:#536dfe;margin-right:4px}.document-case-context select{background:#fff;border:1px solid #dfe3eb;border-radius:7px;color:#303951;font-size:13px;min-height:38px;padding:7px 10px}.document-case-context select:focus{border-color:#536dfe;box-shadow:0 0 0 3px rgba(83,109,254,.1);outline:0}.document-case-context small{color:#8f98a9;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.document-case-identity{display:flex;flex:1 0 100%;align-items:center;gap:15px;min-width:0;padding:14px 16px;border:1px solid #d8e4fa;border-left:4px solid #4b83f0;border-radius:10px;background:linear-gradient(100deg,#f7faff 0%,#fff 74%);box-shadow:0 3px 12px rgba(45,82,145,.06)}
.document-client-avatar{display:flex;flex:0 0 48px;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#4b83f0,#6d5de7);color:#fff;font-size:15px;font-weight:800;letter-spacing:.03em}
.document-client-main,.document-case-reference,.document-case-lawyer{display:flex;flex-direction:column;min-width:0}.document-client-main{flex:1.25 1 220px}.document-case-reference{flex:1 1 210px}.document-case-lawyer{flex:1 1 190px}
.document-case-identity small{margin-bottom:2px;color:#8190a7;font-size:9px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.document-case-identity strong{overflow:hidden;color:#243650;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.document-case-identity span{overflow:hidden;margin-top:2px;color:#6f7d91;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.document-case-identity span i{margin-right:4px;color:#4b83f0}.document-case-identity .btn{flex:0 0 auto;white-space:nowrap}
.case-direct-filter{display:flex;flex:1 0 100%;align-items:center;gap:12px;padding:11px 14px;border:1px solid #cfe0fb;border-left:4px solid #4b83f0;border-radius:9px;background:#f5f9ff;color:#29466f}.case-direct-filter>i{font-size:22px;color:#4b83f0}.case-direct-filter>div{display:flex;flex:1;flex-direction:column;min-width:0}.case-direct-filter small{font-size:9px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#7185a3}.case-direct-filter span{overflow:hidden;font-size:12px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.case-direct-filter .btn{flex:0 0 auto;white-space:nowrap}
@media(max-width:767px){.document-case-context{width:100%;min-width:0}.document-case-context select{width:100%}}
@media(max-width:900px){.document-case-identity{align-items:flex-start;flex-wrap:wrap}.document-client-main,.document-case-reference,.document-case-lawyer{flex:1 1 42%}.document-case-identity .btn{margin-left:63px}}
@media(max-width:575px){.document-case-identity{gap:10px}.document-client-avatar{flex-basis:40px;width:40px;height:40px}.document-client-main,.document-case-reference,.document-case-lawyer{flex:1 0 calc(100% - 55px)}.document-case-reference,.document-case-lawyer{margin-left:50px}.document-case-identity .btn{width:calc(100% - 50px);margin-left:50px}}
@media(max-width:575px){.case-direct-filter{align-items:flex-start;flex-wrap:wrap}.case-direct-filter .btn{width:100%}}

.form-control[multiple]{min-height:106px;padding:6px 9px;background-image:none}
.form-control[multiple] option{padding:5px 6px}
.case-quick-actions{display:flex;align-items:center;gap:6px}.case-quick-actions a{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid #dce5f5;border-radius:6px;color:#4b83f0;background:#f7faff}.case-quick-actions a:hover{background:#4b83f0;color:#fff}.profile-card-footer .btn{font-size:11px;padding:5px 8px}
.quick-status-label{align-items:center;color:#7d8798;display:inline-flex;font-size:11px;gap:5px;margin:0}.quick-status{background:#f7f9fc;border:1px solid #dfe5ef;border-radius:6px;color:#455166;font-size:11px;padding:4px 7px}.quick-status:focus{border-color:#4b83f0;outline:0;box-shadow:0 0 0 2px rgba(75,131,240,.12)}
.module-bulk-actions{align-items:center;background:#f7f9fc;border:1px solid #e8edf5;border-radius:8px;display:flex;gap:12px;justify-content:space-between;margin:-4px 0 12px;padding:8px 12px;color:#697589;font-size:12px}.module-bulk-actions strong{color:#3d3789}.module-bulk-actions button:disabled{cursor:not-allowed;opacity:.5}.module-bulk-controls{align-items:center;display:flex;gap:8px}.module-bulk-controls select{height:33px;min-width:190px}@media(max-width:600px){.module-bulk-actions{align-items:stretch;flex-direction:column}.module-bulk-controls{align-items:stretch;flex-direction:column}.module-bulk-controls select{width:100%}}
.report-grid{display:grid;gap:16px;grid-template-columns:repeat(3,minmax(0,1fr))}.report-card{padding:20px}.report-card strong{color:#3d3789;display:block;font-size:30px;line-height:1}.portal-case,.portal-document{align-items:center;border-bottom:1px solid #edf0f4;display:flex;gap:10px;padding:13px 0}.portal-case{flex-wrap:wrap}.portal-case strong{flex:1 1 55%;color:#3d4655}.portal-case small,.portal-document small{color:#8a94a5;display:block;flex-basis:100%;font-size:11px}.portal-document i{color:#4b83f0;font-size:21px}.portal-document span{display:flex;flex-direction:column;gap:3px}.portal-document strong{color:#3d4655;font-size:13px}@media(max-width:767px){.report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.header-notification-toggle{position:relative;display:flex!important;align-items:center;justify-content:center;min-width:42px;height:42px;color:#fff!important;font-size:21px}.header-notification-count{position:absolute;top:1px;right:1px;min-width:17px;height:17px;padding:0 4px;border-radius:10px;background:#e34848;color:#fff;font-size:10px;line-height:17px;text-align:center}.header-notification-menu{left:auto!important;right:0;min-width:340px;padding:0;overflow:hidden;border:0;border-radius:10px;box-shadow:0 12px 30px rgba(23,34,56,.18)}.header-notification-menu-title{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #edf0f5;color:#253653}.header-notification-menu-title a{color:#4b83f0;font-size:12px}.header-notification-item{display:flex;gap:10px;padding:12px 16px;border-bottom:1px solid #f0f2f6;color:#33415c!important;text-align:left;transition:background .15s}.header-notification-item:hover{background:#f7faff}.header-notification-item.is-read{opacity:.68}.header-notification-item strong,.header-notification-item small{display:block}.header-notification-item strong{font-size:13px}.header-notification-item small{margin-top:3px;color:#7c879a;font-size:11px;line-height:1.35}.header-notification-icon{display:flex;align-items:center;justify-content:center;width:30px;height:30px;flex:0 0 30px;border-radius:50%;background:#eef4ff;color:#4b83f0}.header-notification-empty{display:block;padding:22px 16px;color:#8993a4;font-size:13px;text-align:center}
.calendar-panel{overflow:hidden}.calendar-toolbar{align-items:center}.calendar-actions{display:flex;gap:.45rem}.calendar-actions .btn{min-width:40px}.calendar-legend{display:flex;gap:1.25rem;margin-bottom:1rem;color:#667085;font-size:12px}.calendar-legend span{display:inline-flex;align-items:center;gap:.4rem}.calendar-dot{width:9px;height:9px;border-radius:50%}.calendar-dot.hearing{background:#4b83f0}.calendar-dot.deadline{background:#f29b38}.legal-calendar{border:1px solid #e6eaf1;border-radius:10px;overflow:hidden}.calendar-weekdays,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.calendar-weekdays{background:#f5f7fb;border-bottom:1px solid #e6eaf1}.calendar-weekdays span{padding:.75rem;text-align:center;color:#718096;font-size:11px;font-weight:700;text-transform:uppercase}.calendar-day{min-height:115px;padding:.55rem;border-right:1px solid #edf0f4;border-bottom:1px solid #edf0f4;background:#fff}.calendar-day:nth-child(7n){border-right:0}.calendar-day.is-outside{background:#fafbfc}.calendar-day-number{display:block;margin-bottom:.4rem;color:#344054;font-size:12px;font-weight:700;text-align:right}.calendar-events{display:flex;flex-direction:column;gap:.3rem}.calendar-event{display:block;overflow:hidden;padding:.28rem .38rem;border-radius:4px;font-size:11px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.calendar-event:hover{text-decoration:none}.calendar-event.hearing{background:#eaf1ff;color:#3169c6}.calendar-event.deadline{background:#fff1df;color:#b56b15}.calendar-event b{font-size:10px}.calendar-empty{padding:1.5rem;color:#8993a4;text-align:center}.calendar-empty.d-none{display:none}
.module-sortable-header{cursor:pointer;user-select:none}.module-sortable-header::after{content:"↕";margin-left:.35rem;color:#a4adbb;font-size:11px}
.calendar-actions select{width:170px;height:38px}.calendar-agenda{display:grid;gap:.55rem}.calendar-agenda-item{display:flex;align-items:center;gap:1rem;padding:.8rem 1rem;border:1px solid #e6ebf3;border-radius:8px;color:#344054}.calendar-agenda-item:hover{background:#f7faff;text-decoration:none}.calendar-agenda-date{display:flex;flex-direction:column;align-items:center;justify-content:center;width:48px;height:48px;border-radius:8px;background:#eef4ff;color:#3169c6}.calendar-agenda-date b{font-size:18px;line-height:1}.calendar-agenda-date small{text-transform:uppercase;font-size:10px}.calendar-agenda-item strong,.calendar-agenda-item small{display:block}.calendar-agenda-item small{margin-top:.25rem;color:#8491a5;font-size:12px}
.client-summary-action{margin-left:.4rem}.client-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem;border:1px solid #e6ebf3;border-radius:10px;background:#f8faff}.client-summary-grid small,.client-summary-grid strong{display:block}.client-summary-grid small{margin-bottom:.25rem;color:#8491a5;font-size:11px;text-transform:uppercase}.client-summary-grid strong{color:#27364b;font-size:14px;word-break:break-word}.client-summary-section-title{margin:1.4rem 0 .75rem;color:#27364b}.client-summary-cases{display:grid;gap:.55rem}.client-summary-cases a{display:grid;grid-template-columns:120px 1fr 180px;gap:.75rem;align-items:center;padding:.75rem 1rem;border:1px solid #e6ebf3;border-radius:8px;color:#33415c}.client-summary-cases a:hover{background:#f7faff;text-decoration:none}.client-summary-cases strong{color:#4b83f0;font-size:12px}.client-summary-cases span{font-size:13px}.client-summary-cases small{color:#8491a5;text-align:right}@media (max-width:767px){.client-summary-grid{grid-template-columns:1fr}.client-summary-cases a{grid-template-columns:1fr}.client-summary-cases small{text-align:left}}
.module-table-tools{display:flex;align-items:center;gap:1rem;margin-bottom:.8rem;color:#718096;font-size:12px}.module-table-tools label{display:flex;align-items:center;gap:.45rem;margin:0}.module-table-tools select{width:70px}.module-table-info{margin-right:auto}.module-table-actions{margin-left:auto}@media (max-width:767px){.module-table-tools{align-items:stretch;flex-wrap:wrap}.module-table-info{width:100%;order:3}.module-table-actions{margin-left:0}}
.search-bar{position:relative}.global-search-results{position:absolute;z-index:1050;top:calc(100% + 8px);left:0;width:min(460px,calc(100vw - 30px));max-height:440px;overflow:auto;padding:.45rem;background:#fff;border:1px solid #e4e9f2;border-radius:10px;box-shadow:0 14px 35px rgba(31,44,70,.2)}.global-search-results section{padding:.3rem 0}.global-search-results section>strong{display:block;padding:.4rem .65rem;color:#8491a5;font-size:10px;letter-spacing:.08em;text-transform:uppercase}.global-search-result{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.55rem .65rem;border-radius:7px;color:#2f3e59!important}.global-search-result:hover{background:#f5f8fd;text-decoration:none}.global-search-result span{overflow:hidden;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.global-search-result small{color:#8491a5;font-size:11px;white-space:nowrap}.global-search-empty{padding:1rem;color:#8491a5;font-size:13px;text-align:center}
.case-advanced-filters{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}.case-advanced-filters .form-control{width:auto;min-width:145px;height:34px}.case-advanced-filters input{max-width:180px}@media (max-width:767px){.case-advanced-filters{display:grid;grid-template-columns:1fr 1fr}.case-advanced-filters .form-control{width:100%;min-width:0}.case-advanced-filters input{max-width:none}}
.module-advanced-filters{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin-top:.75rem}.module-advanced-filters .form-control{width:auto;min-width:155px;height:34px}.module-advanced-filters input[type="text"]{min-width:190px}.module-advanced-filters input[type="datetime-local"]{min-width:190px}.module-advanced-filters select:focus,.module-advanced-filters input:focus{border-color:#4b7bec;box-shadow:0 0 0 .12rem rgba(75,123,236,.12)}.filter-group-label{font-size:.72rem;font-weight:700;color:#667085;white-space:nowrap}.case-advanced-filters{padding-top:.1rem}.case-advanced-filters .form-control{min-width:165px}@media (max-width:767px){.module-advanced-filters{display:grid;grid-template-columns:1fr 1fr}.module-advanced-filters .form-control,.module-advanced-filters input[type="text"],.module-advanced-filters input[type="datetime-local"]{width:100%;min-width:0}.filter-group-label{grid-column:1/-1}}
.multi-select-source{display:none!important}.multi-select-control{position:relative}.multi-select-trigger{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:42px;padding:.55rem .75rem;border:1px solid #d7deea;border-radius:.35rem;background:#fff;color:#344054;font-size:.92rem;text-align:left}.multi-select-trigger:hover,.multi-select-control.is-open .multi-select-trigger{border-color:#4b7bec;box-shadow:0 0 0 .12rem rgba(75,123,236,.12)}.multi-select-trigger i{color:#667085}.multi-select-menu{display:none;position:absolute;z-index:20;left:0;right:0;max-height:210px;overflow:auto;margin-top:.25rem;padding:.35rem;background:#fff;border:1px solid #cfd8e6;border-radius:.4rem;box-shadow:0 10px 25px rgba(16,24,40,.16)}.multi-select-control.is-open .multi-select-menu{display:block}.multi-select-option{display:flex;align-items:center;gap:.55rem;padding:.5rem .55rem;margin:0;border-radius:.3rem;cursor:pointer;font-weight:400;color:#344054}.multi-select-option:hover{background:#f2f6ff}.multi-select-option input{accent-color:#4b7bec}.multi-select-empty{display:block;padding:.7rem;color:#98a2b3;font-size:.85rem}.multi-select-hint{display:block}@media (max-width:767px){.multi-select-menu{position:relative;max-height:180px}}
.module-search-tools{display:flex;align-items:center;gap:.5rem;margin-top:.65rem}.module-search-tools select{width:auto;min-width:175px}.module-search-tools .btn-link{padding-left:.25rem}@media (max-width:767px){.module-search-tools{flex-wrap:wrap}.module-search-tools select{flex:1;min-width:150px}}
.dashboard-workload-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.dashboard-workload-item{display:grid;grid-template-columns:38px minmax(130px,1fr) minmax(80px,1.2fr) 28px;align-items:center;gap:.65rem;padding:.65rem .75rem;border:1px solid #edf0f5;border-radius:10px;color:#2f3850;background:#fff}.dashboard-workload-item:hover{border-color:#4b83f0;text-decoration:none}.workload-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#e9f0ff;color:#3569c8;font-size:11px;font-weight:700}.workload-name{min-width:0}.workload-name strong,.workload-name small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workload-name small{color:#8791a5;margin-top:2px}.workload-meter{height:7px;background:#edf1f7;border-radius:99px;overflow:hidden}.workload-meter i{display:block;height:100%;border-radius:99px}.workload-low{background:#46b96b;color:#25804a}.workload-medium{background:#f2b84b;color:#a26a00}.workload-high{background:#e66b6b;color:#b52f2f}.workload-count{text-align:right;font-weight:700}@media (max-width:767px){.dashboard-workload-list{grid-template-columns:1fr}.dashboard-workload-item{grid-template-columns:38px minmax(120px,1fr) 28px}.workload-meter{display:none}}
.dashboard-operational-risks{margin-top:1rem;padding-top:1rem;border-top:1px solid #edf0f5}.operational-risk-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:.65rem}.operational-risk-heading a{font-size:12px;color:#4b83f0}.operational-risk-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.65rem}.risk-item{display:flex;align-items:center;gap:.6rem;padding:.65rem;border-radius:9px;text-decoration:none}.risk-item i{font-size:20px}.risk-item strong,.risk-item small{display:block}.risk-item small{font-size:11px;margin-top:2px}.risk-item.is-danger{background:#fff1f1;color:#c13c3c}.risk-item.is-warning{background:#fff8e7;color:#a26a00}.risk-item.is-ok{background:#eefaf1;color:#25804a}@media (max-width:767px){.operational-risk-grid{grid-template-columns:1fr}}
.document-versions-list{list-style:none;padding:0;margin:0}.document-version-item{display:grid;grid-template-columns:auto 1fr auto auto;gap:.75rem;align-items:center;padding:.75rem 0;border-bottom:1px solid #edf0f5}.document-version-item:last-child{border-bottom:0}.document-version-item strong{color:#3569c8}.document-version-item span,.document-version-item small{color:#718096;font-size:12px}.document-version-item small{text-align:right}.document-version-actions{display:flex;gap:.35rem}.document-version-actions .btn{font-size:11px;padding:.2rem .4rem}@media (max-width:600px){.document-version-item{grid-template-columns:1fr}.document-version-item small{text-align:left}.document-version-actions{justify-content:flex-start}}
.portal-extra-row{margin-top:1rem}.portal-event{display:flex;gap:.7rem;align-items:flex-start;padding:.7rem 0;border-bottom:1px solid #edf0f5}.portal-event:last-child{border-bottom:0}.portal-event>i{color:#4b83f0;font-size:20px}.portal-event strong,.portal-event small{display:block}.portal-event small{color:#718096;margin-top:.2rem;font-size:12px}
.portal-communications-row{margin-top:1rem}.portal-communication{padding:.8rem 0;border-bottom:1px solid #edf0f5}.portal-communication:last-child{border-bottom:0}.portal-communication strong,.portal-communication small{display:block}.portal-communication small{color:#718096;font-size:12px;margin-top:.2rem}.portal-communication p{margin:.45rem 0;color:#4b5568}.portal-response{margin-top:.5rem;padding:.6rem .75rem;background:#eef7ff;border-left:3px solid #4b83f0;border-radius:5px}.portal-response p{margin:.25rem 0 0}
.communication-template-picker{background:#f7f9fc;border:1px solid #e8edf5;border-radius:8px;padding:.8rem}.communication-template-picker label{font-weight:600;color:#40506a}
.portal-signatures-row{margin-top:1rem}.portal-signature{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0;border-bottom:1px solid #edf0f5}.portal-signature:last-child{border-bottom:0}.portal-signature strong,.portal-signature small{display:block}.portal-signature small{color:#718096;font-size:12px;margin-top:.2rem}
.report-filter-label{display:flex;align-items:center;gap:.4rem;margin:0;color:#718096;font-size:12px}.report-filter-label .form-control{min-width:145px}.report-breakdown-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-top:1rem}.report-breakdown-card{background:#fff;border:1px solid #e8edf5;border-radius:10px;padding:1rem}.report-breakdown-card h4{margin:0 0 .75rem;color:#2f3850}.report-breakdown-card>div{display:flex;justify-content:space-between;padding:.5rem 0;border-bottom:1px solid #edf0f5;font-size:13px}.report-breakdown-card>div:last-child{border-bottom:0}.report-breakdown-card strong{color:#3569c8}@media (max-width:767px){.report-breakdown-grid{grid-template-columns:1fr}.report-filter-label{justify-content:space-between}}
.report-productivity-card{margin-top:1rem}.report-productivity-heading{display:flex;justify-content:space-between;align-items:center}.report-productivity-heading h4{margin:0}.report-productivity-card .table{margin:0}.report-productivity-card th{font-size:11px;color:#718096;text-transform:uppercase}.report-productivity-card td{font-size:12px}
.report-goals-card{margin-top:1rem}.report-goal-row{display:grid;grid-template-columns:minmax(180px,1fr) 90px 120px 80px;gap:.6rem;align-items:center;padding:.65rem 0;border-bottom:1px solid #edf0f5}.report-goal-row:last-child{border-bottom:0}.report-goal-row strong,.report-goal-row small{display:block}.report-goal-row small{font-size:11px;color:#718096}@media (max-width:767px){.report-goal-row{grid-template-columns:1fr 1fr}.report-goal-row span{grid-column:1/-1}}
.dashboard-executive-alerts{margin-bottom:1rem}.executive-alerts-panel{background:#fff;border:1px solid #e8edf5;border-radius:10px;padding:1rem}.executive-alerts-panel .operational-risk-heading{margin-bottom:.5rem}.executive-alerts-panel .operational-risk-heading span{font-size:12px;color:#718096}.executive-alert{display:flex;align-items:center;gap:.7rem;padding:.7rem 0;border-top:1px solid #edf0f5;color:#344054}.executive-alert:hover{text-decoration:none}.executive-alert>i:first-child{font-size:20px}.executive-alert span{flex:1}.executive-alert strong,.executive-alert small{display:block}.executive-alert small{color:#718096;margin-top:2px}.executive-critical>i:first-child{color:#d04444}.executive-warning>i:first-child{color:#d99420}.executive-info>i:first-child{color:#3979cf}
.executive-success>i:first-child{color:#2d9b5c}
.dashboard-goals-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.dashboard-goal{display:grid;grid-template-columns:minmax(150px,1fr) minmax(100px,1.5fr) 42px;align-items:center;gap:.75rem;padding:.7rem;border:1px solid #edf0f5;border-radius:9px}.dashboard-goal strong,.dashboard-goal small{display:block}.dashboard-goal small{font-size:11px;color:#718096;margin-top:2px}.goal-progress{height:8px;border-radius:99px;background:#edf1f7;overflow:hidden}.goal-progress i{display:block;height:100%;border-radius:99px;background:#4b83f0}.dashboard-goal b{text-align:right;color:#3569c8}@media (max-width:767px){.dashboard-goals-list{grid-template-columns:1fr}.dashboard-goal{grid-template-columns:1fr 42px}.goal-progress{grid-column:1}.dashboard-goal b{grid-column:2;grid-row:1}}
@media (max-width:767px){.header-notification-menu{position:fixed!important;top:58px;right:12px;left:12px;min-width:0}.calendar-day{min-height:92px;padding:.35rem}.calendar-weekdays span{padding:.55rem .2rem;font-size:9px}.calendar-event{font-size:10px}.calendar-event b{display:none}.calendar-toolbar{align-items:flex-start;gap:.75rem;flex-direction:column}.calendar-actions{width:100%;justify-content:flex-end}}
.work-queue-actions { display: flex; align-items: center; gap: 12px; }
.work-queue-actions select { min-width: 150px; }
.dashboard-work-queue { display: grid; gap: 8px; }
.work-queue-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #edf0f5; border-radius: 10px; color: #24324a; background: #fff; transition: .18s ease; }
.work-queue-item:hover { border-color: #4b83f0; box-shadow: 0 5px 16px rgba(47, 76, 122, .08); text-decoration: none; transform: translateY(-1px); }
.work-queue-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; color: #4b83f0; background: #eef4ff; flex: 0 0 34px; }
.work-queue-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.work-queue-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-queue-main small { color: #8a94a6; }
.work-queue-status { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #7b8799; }
.work-queue-complete { flex: 0 0 auto; white-space: nowrap; border-radius: 7px; }
.work-queue-complete span { margin-left: 4px; }
.work-queue-open { align-items: center; display: inline-flex; flex: 0 0 auto; gap: 5px; justify-content: center; white-space: nowrap; border-radius: 7px; }
.legal-dialog-modal { z-index: 20020; }
.legal-dialog-modal + .modal-backdrop { backdrop-filter: blur(2px); z-index: 20010; }
.legal-dialog-modal .modal-dialog,
.legal-dialog-modal .modal-dialog.modal-dialog-centered {
    align-items: center;
    height: auto;
}
.legal-dialog-modal .legal-dialog {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 22px 60px rgba(20, 31, 52, .24);
    flex: 0 1 auto;
    height: auto;
    max-height: calc(100vh - 64px);
    min-height: 0;
    overflow: hidden;
}
.legal-dialog .modal-body { align-items: flex-start; display: flex; flex: 0 1 auto; gap: 16px; overflow-y: auto; padding: 24px 24px 17px; }
.legal-dialog-icon { align-items: center; background: #eef4ff; border-radius: 50%; color: #3979cf; display: inline-flex; flex: 0 0 46px; font-size: 25px; height: 46px; justify-content: center; }
.legal-dialog-success .legal-dialog-icon { background: #eaf8ef; color: #279654; }
.legal-dialog-warning .legal-dialog-icon { background: #fff5e7; color: #d88417; }
.legal-dialog-error .legal-dialog-icon { background: #fff0f0; color: #d64545; }
.legal-dialog-question .legal-dialog-icon { background: #fff4e8; color: #dd8127; }
.legal-dialog-copy { flex: 1; min-width: 0; padding-top: 2px; }
.legal-dialog-title { color: #24324a; font-size: 19px; font-weight: 700; margin: 0 0 7px; }
.legal-dialog-message { color: #667085; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }
.legal-dialog-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.legal-dialog-links .btn { white-space: normal; }
.legal-dialog-input-wrap { margin-top: 15px; }
.legal-dialog-input { border-color: #d6deea; min-height: 42px; resize: vertical; }
.legal-dialog-input:focus { border-color: #4b83f0; box-shadow: 0 0 0 3px rgba(75, 131, 240, .13); }
.legal-dialog-validation { color: #d64545; font-size: 12px; margin-top: 7px; }
.legal-dialog-actions { background: #f8fafc; border-top: 1px solid #edf1f6; gap: 8px; justify-content: flex-end; padding: 13px 24px; }
.legal-dialog-actions .btn { border-radius: 8px; min-width: 96px; }
@media (max-width: 575px) { .legal-dialog-modal .modal-dialog { margin: 14px; min-height: calc(100% - 28px); width: calc(100% - 28px); } .legal-dialog-modal .legal-dialog { max-height: calc(100dvh - 28px); } .legal-dialog .modal-body { padding: 20px 18px 15px; } .legal-dialog-icon { flex-basis: 40px; font-size: 22px; height: 40px; } .legal-dialog-actions { flex-wrap: wrap; padding: 12px 18px; } .legal-dialog-actions .btn { flex: 1 1 auto; } }
.work-queue-controls { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.work-queue-assignee { max-width: 150px; min-height: 30px; border: 1px solid #dfe5ee; border-radius: 6px; color: #5e6b80; font-size: 12px; padding: 3px 6px; }
.work-queue-progress { width: 52px; min-height: 30px; border: 1px solid #dfe5ee; border-radius: 6px; color: #5e6b80; font-size: 12px; padding: 3px 5px; }
.work-queue-assignee-label { color: #8a94a6; white-space: nowrap; }
.checklist-panel { border: 1px solid #edf0f5; border-radius: 12px; padding: 18px; background: #fff; }
.checklist-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.checklist-heading h4 { margin: 4px 0 0; }
.checklist-heading strong { color: #4b83f0; }
.checklist-items { display: grid; gap: 8px; }
.checklist-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #edf0f5; border-radius: 9px; cursor: pointer; }
.checklist-item input { margin-top: 4px; accent-color: #4b83f0; }
.checklist-item span { display: flex; flex-direction: column; gap: 3px; }
.checklist-item small { color: #8a94a6; }
.checklist-item.is-done { background: #f3fbf0; border-color: #bfe5b3; }
.checklist-item.is-done strong { text-decoration: line-through; color: #699b5e; }
.compliance-summary { display: flex; align-items: center; gap: 28px; margin-bottom: 18px; }
.compliance-score { min-width: 130px; padding: 16px 20px; border-radius: 12px; background: #eef4ff; color: #3e70d3; display: flex; flex-direction: column; }
.compliance-score strong { font-size: 30px; line-height: 1; }
.compliance-score small, .compliance-stat small { color: #8a94a6; margin-top: 5px; }
.compliance-stat { display: flex; flex-direction: column; }
.compliance-stat strong { font-size: 20px; color: #24324a; }
.compliance-danger strong { color: #e55353; }
.compliance-case-list { display: grid; gap: 8px; }
.compliance-case { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid #edf0f5; border-radius: 8px; color: #24324a; }
.compliance-case:hover { border-color: #4b83f0; text-decoration: none; }
.compliance-case span:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.compliance-case small { color: #8a94a6; }
.compliance-case-progress { min-width: 150px; display: flex; align-items: center; gap: 8px; }
.compliance-case-progress i { height: 6px; background: #65bd38; border-radius: 99px; min-width: 4px; }
.compliance-case-progress b { font-size: 12px; }
.compliance-case-progress em { color: #e55353; font-size: 11px; font-style: normal; white-space: nowrap; }
@media (max-width: 640px) { .compliance-summary { gap: 12px; flex-wrap: wrap; } .compliance-case-progress { min-width: 110px; } .compliance-case-progress em { display: none; } }
.work-queue-item.is-overdue { border-left: 4px solid #e55353; }
.work-queue-item.is-overdue .work-queue-icon { color: #e55353; background: #fff0f0; }
.work-queue-item.priority-critical { border-left: 4px solid #f58a3b; }
@media (max-width: 640px) { .work-queue-actions { align-items: stretch; flex-direction: column; gap: 6px; } .work-queue-actions select { min-width: 0; } .work-queue-status { display: none; } .work-queue-complete span, .work-queue-open span { display: none; } .work-queue-controls { flex-direction: column; align-items: stretch; } .work-queue-assignee { max-width: 115px; } }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 3000; padding: 10px 16px; border-radius: 8px; background: #24324a; color: #fff; font-weight: 700; transition: top .18s ease; }
.skip-link:focus { top: 12px; color: #fff; }
:focus-visible { outline: 3px solid rgba(75, 131, 240, .8); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Último ajuste responsive: prevalece sobre los estilos heredados del template. */
@media (max-width: 767px) {
    .mar_lft_282 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .header-notification-menu {
        position: fixed !important;
        top: 64px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        min-width: 0 !important;
        max-height: min(420px, calc(100vh - 82px));
        overflow-y: auto;
    }
}

/* Dropdown de notificaciones alineado con la composición original de EKUDMIN. */
.header-notification-menu {
    width: 280px !important;
    min-width: 280px !important;
    margin-top: 84px !important;
    padding: 0 !important;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: 0 8px 22px rgba(31, 35, 51, .18);
}
.header-notification-menu-title { display: none; }
.header-notification-menu-title strong { color: #3d3789; font: 600 15px 'Josefin Sans', sans-serif; }
.header-notification-menu-title a { color: #4b83f0; font-size: 11px; }
.header-notification-menu #header-notification-list { margin: 0; padding: 0; }
.header-notification-menu .header-notification-item {
    display: block;
    min-height: 74px;
    padding: 15px 20px 15px 80px;
    border-bottom: 1px solid #f2f2f2;
    color: inherit !important;
    background-repeat: no-repeat;
    background-position: 20px 15px;
    background-size: 35px 35px;
}
.header-notification-menu .header-notification-item:nth-child(4n+1) { background-image: url('../img/bell-icon1.png'); }
.header-notification-menu .header-notification-item:nth-child(4n+2) { background-image: url('../img/bell-icon2.png'); }
.header-notification-menu .header-notification-item:nth-child(4n+3) { background-image: url('../img/bell-icon3.png'); }
.header-notification-menu .header-notification-item:nth-child(4n+4) { background-image: url('../img/bell-icon4.png'); }
.header-notification-menu .header-notification-item:hover { background-color: #fafafa; }
.header-notification-menu .header-notification-icon { display: none; }
.header-notification-menu .header-notification-item > span { display: block; min-width: 0; }
.header-notification-menu .header-notification-item strong {
    display: block; overflow: hidden; color: #3d3789; font: 15px/20px 'Josefin Sans', sans-serif; text-overflow: ellipsis; white-space: nowrap;
}
.header-notification-menu .header-notification-item small {
    display: block; overflow: hidden; margin-top: 0; color: #999; font: 14px/20px 'Josefin Sans', sans-serif; text-overflow: ellipsis; white-space: nowrap;
}
.header-notification-menu .header-notification-empty { display: block; padding: 18px 20px; color: #999; font-size: 13px; text-align: center; }

/* El header mide 76px; el sidebar debe comenzar exactamente debajo, sin la
   franja de 8px que deja la regla top:84px del template. */
.dash-navbar-left { top: 76px !important; }
.responsive-bars { top: 76px !important; }

/* Un solo control de colapso, integrado en el encabezado. */
.header-sidebar-toggle {
    position: absolute;
    top: 84px;
    left: 210px;
    z-index: 10001;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 3px;
    background: rgba(0,0,0,.08);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.header-sidebar-toggle:hover { background: rgba(0,0,0,.18); }
.header-sidebar-toggle:focus { outline: 2px solid #fff; outline-offset: 2px; }
.responsive-bars { display: none !important; }
@media (max-width: 767px) {
    .header-sidebar-toggle { top: 76px; left: 210px; }
}
.dash-navbar-left.dnl-hide { left: -250px !important; }
.dash-navbar-left.dnl-show { left: 0 !important; }

/* Al colapsar, el contenido también recupera el ancho que ocupaba el aside. */
body.layout-sidebar-collapsed .mar_lft_282,
body.layout-sidebar-collapsed .footer-area {
    padding-left: 12px !important;
}
body.layout-sidebar-collapsed .homepage-sec1 .container-fluid,
body.layout-sidebar-collapsed .dashboard-content .container-fluid {
    max-width: none;
}

/* Segundo control del header original: correo/mensajes. */
.header-mail-nav { order: 2; margin-left: 0 !important; }
.header-notification-nav { order: 1; }
.header-right > ul:not(.header-notification-nav):not(.header-mail-nav) { order: 3; }
.header-mail-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #fff !important;
    font-size: 21px;
    text-decoration: none !important;
}
.header-mail-toggle:hover { background: #eb853b; }
.header-mail-toggle i { line-height: 1; }

/* Normalización del header: todos los controles comparten la misma celda.
   Evita que las reglas antiguas de .cta/.cta2 pinten bloques superpuestos. */
.header-right > ul.header-notification-nav,
.header-right > ul.header-mail-nav,
.header-right > ul:not(.header-notification-nav):not(.header-mail-nav) {
    display: inline-flex !important;
    align-items: stretch;
    height: 76px;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}
.header-right > ul.header-notification-nav > li,
.header-right > ul.header-mail-nav > li,
.header-right > ul:not(.header-notification-nav):not(.header-mail-nav) > li {
    display: flex;
    align-items: center;
    height: 76px;
    margin: 0;
    padding: 0 !important;
}
.header-right .header-notification-toggle,
.header-right .header-mail-toggle {
    width: 52px;
    height: 76px;
    margin: 0;
    padding: 0;
    background-color: transparent !important;
}
.header-right .header-notification-toggle:hover,
.header-right .header-mail-toggle:hover {
    background-color: rgba(0,0,0,.08) !important;
}
.header-right .header-mail-nav li.cta2:hover { background: transparent !important; }
.header-right .header-notification-toggle i,
.header-right .header-mail-toggle i { transform: none; }
.header-right .cta3 > a {
    height: 76px;
    margin: 0;
    padding: 0 16px 0 12px;
}
.header-right .cta3 .arrow-down { margin-left: 8px; }

/* Sistema de navegación y cabecera: reemplaza la geometría fragmentada del
   tema original por una barra consistente, con acciones de igual jerarquía. */
.header-area {
    background: #f5843b;
    box-shadow: 0 1px 0 rgba(53, 38, 25, .1);
    min-height: 72px;
    position: relative;
    z-index: 1100;
}
.header-shell {
    align-items: center;
    display: flex;
    gap: 20px;
    min-height: 72px;
    padding: 0 24px;
}
.header-brand, .header-tools, .header-right { align-items: center; display: flex; }
.header-brand { flex: 0 0 238px; justify-content: space-between; min-width: 0; }
.header-brand .logo {
    color: #fff;
    display: block;
    font-family: 'Open Sans', sans-serif;
    font-size: 19px;
    font-weight: 800;
    height: auto;
    letter-spacing: .01em;
    padding: 0;
    text-decoration: none;
    white-space: nowrap;
}
.header-sidebar-toggle {
    align-items: center;
    background: rgba(66, 43, 28, .12);
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-size: 20px;
    height: 36px;
    justify-content: center;
    left: auto;
    position: static;
    top: auto;
    width: 36px;
}
.header-sidebar-toggle:hover { background: rgba(66, 43, 28, .24); }
.header-tools { flex: 1 1 auto; gap: 8px; min-width: 160px; }
.header-icon-button, .header-language-toggle, .header-mail-toggle, .header-notification-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #fff !important;
    display: inline-flex !important;
    font-size: 18px;
    height: 40px;
    justify-content: center;
    text-decoration: none !important;
    width: 40px;
}
.header-icon-button:hover, .header-language-toggle:hover, .header-mail-toggle:hover, .header-notification-toggle:hover { background: rgba(66, 43, 28, .14) !important; }
.header-language-toggle { font-size: 12px; font-weight: 700; gap: 3px; width: 48px; }
.header-language-toggle .zmdi { font-size: 14px; }
.header-language .dropdown-menu, .header-user-menu .dropdown-menu {
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(25, 36, 54, .16);
    margin-top: 10px;
    min-width: 160px;
    padding: 6px;
}
.header-language .dropdown-item, .header-user-menu .dropdown-item { border-radius: 6px; color: #344054; font-size: 13px; padding: 9px 10px; }
.header-language .dropdown-item.active, .header-language .dropdown-item:active { background: #fff2e8; color: #b95118; }
.header-search {
    align-items: center;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 9px;
    color: #7b8494;
    display: flex;
    height: 40px;
    margin: 0 0 0 4px;
    max-width: 510px;
    min-width: 210px;
    padding: 0 10px;
    position: relative;
    width: min(100%, 510px);
}
.header-search > i { color: #58667a; font-size: 18px; margin-right: 8px; }
.header-search input { background: transparent; border: 0; color: #293649; flex: 1; font-size: 13px; min-width: 0; outline: 0; }
.header-search input::placeholder { color: #7b8494; }
.header-search:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .3); }
.header-search kbd { background: #f1f3f6; border-radius: 4px; color: #6f7988; font: 10px 'Open Sans', sans-serif; padding: 3px 5px; white-space: nowrap; }
.header-right { flex: 0 0 auto; gap: 4px; height: auto; margin-left: auto; padding: 0; }
.header-notification-nav, .header-user-menu { align-items: center; display: flex; position: relative; }
.header-notification-toggle { position: relative; }
.header-notification-count { background: #d83a45; border: 2px solid #f5843b; right: 2px; top: 2px; }
.header-user-toggle { align-items: center; border-radius: 9px; color: #fff !important; display: flex; gap: 8px; min-height: 40px; padding: 3px 8px; text-decoration: none !important; }
.header-user-toggle:hover { background: rgba(66, 43, 28, .14); }
.header-user-toggle > .zmdi { font-size: 15px; }
.header-right .user-id { font-size: 13px; margin: 0; }
.legal-avatar { border: 0; box-shadow: 0 0 0 2px rgba(255, 255, 255, .3); flex-basis: 32px; font-size: 14px; height: 32px; width: 32px; }
.header-user-menu .dropdown-menu { left: auto; right: 0; }
.header-user-menu .dropdown-item i { color: #69778a; font-size: 17px; margin-right: 8px; vertical-align: -1px; }
.header-user-menu .dropdown-item.text-danger i { color: inherit; }
.header-notification-menu {
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(25, 36, 54, .16);
    margin-top: 10px !important;
    min-width: 340px !important;
    overflow: hidden;
    padding: 0 !important;
    right: 0;
}
.header-notification-menu-title { display: flex; }
.header-notification-menu .header-notification-item { background-image: none !important; display: flex; min-height: 0; padding: 12px 14px; }
.header-notification-menu .header-notification-icon { display: flex; }
.header-notification-menu .header-notification-item strong { color: #344054; font: 600 13px/18px 'Open Sans', sans-serif; white-space: normal; }
.header-notification-menu .header-notification-item small { color: #7a8494; font: 11px/16px 'Open Sans', sans-serif; white-space: normal; }
/* La plantilla antigua usaba una especificidad mayor para estas dos acciones. */
.header-right .header-mail-toggle, .header-right .header-notification-toggle { height: 40px; width: 40px; }

.dash-navbar-left {
    background: #242936;
    bottom: 0;
    box-shadow: 4px 0 18px rgba(28, 36, 51, .08);
    padding: 12px 10px 28px;
    position: fixed;
    top: 72px !important;
    width: 260px;
    z-index: 1050;
}
.dash-navbar-left .dnl-nav > li { margin: 2px 0; }
.dash-navbar-left .dnl-nav > li > a {
    align-items: center;
    border-radius: 7px;
    color: #dce2ec;
    display: flex;
    font-size: 14px;
    font-weight: 600;
    gap: 11px;
    line-height: 20px;
    margin: 0;
    min-height: 45px;
    padding: 11px 12px;
}
.dash-navbar-left .dnl-nav > li > a > img, .dash-navbar-left .dnl-nav > li > a > i { flex: 0 0 20px; font-size: 20px; margin: 0; transform: none; width: 20px; }
.dash-navbar-left .dnl-nav > li > a:hover, .dash-navbar-left .dnl-nav > li > a:focus { background: #303746; box-shadow: none; color: #fff; }
.dash-navbar-left .dnl-nav > li.active-cta > a { background: #343b4d; box-shadow: inset 3px 0 0 #f5843b; color: #fff; }
.dash-navbar-left .dnl-nav .nav-arrow { margin-left: auto; }
.dash-navbar-left .dnl-nav li a span.nav-arrow img { height: 10px; margin: 0; transform: none; width: 12px; }
.dash-navbar-left .dnl-nav li a[aria-expanded="true"] span.nav-arrow img { transform: rotate(180deg); }
.dash-navbar-left .dnl-nav li .dnl-sub-one { background: transparent; margin: 3px 0 7px; padding: 0 0 0 12px; }
.dash-navbar-left .dnl-nav li .dnl-sub-one li a { border-radius: 6px; color: #b7c0d0; font-size: 13px; margin: 1px 0; padding: 9px 12px; }
.dash-navbar-left .dnl-nav li .dnl-sub-one li a:hover, .dash-navbar-left .dnl-nav li .dnl-sub-one li a:focus { background: #303746; box-shadow: none; color: #fff; }
.dash-navbar-left .dnl-nav li .dnl-sub-one li.active > a { background: #343b4d; box-shadow: inset 2px 0 0 #f5843b; color: #fff; }
.dash-navbar-left .dnl-nav li .dnl-sub-one li a span { padding-left: 0; }
.dash-navbar-left .dnl-nav li .dnl-link-icon { color: #f8a46d; font-size: 18px; line-height: 1; padding-right: 8px; }
.dash-navbar-left .dnl-nav li .dnl-sub-one li a > .badge { right: 10px; top: 7px; }
.mar_lft_282 { padding-left: 282px; padding-right: 24px; }
.footer-area { padding-left: 282px; padding-right: 24px; }
body.layout-sidebar-collapsed .mar_lft_282, body.layout-sidebar-collapsed .footer-area { padding-left: 24px !important; }

/* Cabecera y navegación usan el mismo punto de referencia al hacer scroll.
   Así no se deja una franja vacía cuando el aside continúa fijo. */
@media (min-width: 768px) {
    .header-area {
        position: sticky;
        top: 0;
    }
}

@media (max-width: 991px) {
    .header-shell { gap: 12px; padding: 0 16px; }
    .header-brand { flex-basis: 212px; }
    .header-search { max-width: 300px; }
    .header-search kbd, .header-language { display: none; }
}
@media (max-width: 767px) {
    .header-area, .header-shell, .header-brand { height: 64px !important; min-height: 64px !important; }
    .header-shell { padding: 0 12px; }
    .header-brand { flex: 1 1 auto; }
    .header-brand .logo { font-size: 15px; }
    .header-sidebar-toggle { height: 34px; width: 34px; }
    .header-tools { display: none; }
    .header-right { gap: 0; height: auto !important; margin: 0 !important; position: static !important; top: auto !important; }
    .header-icon-button, .header-mail-toggle, .header-notification-toggle { height: 38px; width: 38px; }
    .header-user-toggle { padding: 3px 2px 3px 7px; }
    .header-user-toggle .user-id, .header-user-toggle > .zmdi { display: none; }
    .dash-navbar-left { top: 64px !important; width: 260px; }
    .mar_lft_282, .footer-area { padding-left: 12px !important; padding-right: 12px !important; }
    .header-notification-menu { left: 10px !important; min-width: 0 !important; position: fixed !important; right: 10px !important; top: 54px !important; width: auto !important; }
}

/* Sistema visual compartido: paneles, tarjetas, formularios y modales. */
.main-wraper-bg {
    --ui-border: #e4eaf2;
    --ui-muted: #718096;
    --ui-surface: #fff;
    --ui-surface-soft: #f7f9fc;
    --ui-title: #24324a;
}

.single-panel {
    height: auto;
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: var(--ui-surface);
    box-shadow: 0 8px 24px rgba(31, 45, 61, .055);
}
.single-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 70px;
    margin: 0;
    padding: 17px 20px;
    border-bottom: 1px solid var(--ui-border);
    background: #fff;
}
.single-panel-title h3,
.single-panel-title h4 { margin: 0; color: var(--ui-title); }
.single-panel-content { padding: 20px; }

.module-toolbar { min-height: 78px; }
.module-toolbar h3 { color: var(--ui-title); font-size: 23px; font-weight: 650; }
.module-toolbar .badge { border-radius: 999px; font-size: 11px; padding: 5px 9px; }
.module-toolbar-actions { align-items: center; gap: 10px; }
.module-view-switcher {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #dce4f0;
    border-radius: 9px;
    background: #f7f9fc;
}
.module-view-switcher .btn {
    min-height: 36px;
    margin: 0;
    border: 0;
    border-radius: 0;
    color: #69778b;
    background: transparent;
    box-shadow: none;
}
.module-view-switcher .btn.active { color: #294f9a; background: #fff; box-shadow: 0 1px 5px rgba(31,45,61,.1); }

.module-filter-bar {
    gap: 12px;
    margin: 0 0 18px;
    padding: 16px;
    border-color: var(--ui-border);
    border-radius: 11px;
    background: var(--ui-surface-soft);
}
.module-filter-input { min-height: 42px; border-radius: 8px; }
.module-filter-note { flex-basis: 100%; color: var(--ui-muted); font-size: 12px; }
.module-bulk-actions {
    min-height: 58px;
    margin: 0 0 14px;
    padding: 10px 14px;
    border-color: #dce6f5;
    border-radius: 10px;
    background: #f6f9fe;
}

.profile-grid, .case-grid, .deadline-grid, .document-grid, .finance-grid { gap: 20px; }
.module-card {
    overflow: hidden;
    border-color: var(--ui-border);
    border-radius: 13px;
    box-shadow: 0 6px 18px rgba(31, 45, 61, .055);
}
.module-card:hover {
    border-color: #b9cdf1;
    box-shadow: 0 14px 30px rgba(31, 45, 61, .11);
    transform: translateY(-3px);
}
.module-card::after { right: 0; left: 0; height: 3px; }
.profile-card, .case-card, .deadline-card, .generic-card, .report-card {
    display: flex;
    flex-direction: column;
    min-height: 244px;
    padding: 19px;
}
.module-card h4 { color: var(--ui-title); font-size: 17px; font-weight: 650; }
.case-card h4 { margin-top: 17px; font-size: 18px; }
.case-code { color: #3973e6; }
.status-chip { border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .01em; padding: 5px 10px; }
.case-card p, .module-card p { color: var(--ui-muted); }
.case-type { margin-bottom: 14px !important; }
.case-card-meta {
    gap: 14px;
    margin: 0 -19px 16px;
    padding: 14px 19px;
    border-top: 1px solid #edf1f6;
    border-bottom: 1px solid #edf1f6;
    background: var(--ui-surface-soft);
}
.case-card-meta small { color: #8190a5; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.case-card-footer, .profile-card-footer {
    min-height: 40px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #edf1f6;
}
.case-quick-actions { gap: 7px; }
.case-quick-actions a, .case-quick-actions button {
    width: 31px;
    height: 31px;
    border-radius: 8px;
}
.deadline-card { min-height: 214px; }
.deadline-card-footer { margin-top: auto; padding-top: 14px; }
.document-card { padding: 0; }
.document-card .document-content { padding: 19px; }
.document-card footer {
    margin: 16px -19px 0;
    padding: 12px 19px;
    border-top: 1px solid #edf1f6;
    background: var(--ui-surface-soft);
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: flex-start;
}
.document-uploaded-at {
    align-items: center;
    display: inline-flex;
    gap: 5px;
    margin-left: auto;
    white-space: nowrap;
}
@media (max-width: 767px) {
    .document-uploaded-at {
        flex-basis: 100%;
        margin-left: 0;
    }
}
.finance-card { min-height: 145px; border-radius: 13px; }
.report-card strong { margin-top: 8px; color: #2c5fb8; font-size: 34px; }

.agenda-item, .timeline-item, .kanban-card, .portal-case, .portal-document {
    border-color: var(--ui-border);
    border-radius: 11px;
    box-shadow: 0 4px 14px rgba(31,45,61,.04);
}
.agenda-item:hover, .timeline-item:hover, .kanban-card:hover { border-color: #c3d3ed; box-shadow: 0 9px 20px rgba(31,45,61,.08); }

.form-control, .custom-select {
    min-height: 40px;
    border-color: #d7e0ec;
    border-radius: 8px;
    color: #334155;
    font-size: 13px;
}
.form-control:focus, .custom-select:focus {
    border-color: #6d98ec;
    box-shadow: 0 0 0 3px rgba(75,131,240,.13);
}
.btn { border-radius: 8px; font-weight: 600; }
.btn-primary { box-shadow: 0 5px 12px rgba(75,131,240,.18); }
.btn-light, .btn-outline-primary, .btn-outline-secondary, .btn-outline-danger { border-color: #d7e0ec; }

.table-responsive { border: 1px solid var(--ui-border); border-radius: 11px; }
.table { margin: 0; }
.table thead th {
    padding: 13px 14px;
    border-top: 0;
    border-bottom-color: var(--ui-border);
    color: #718096;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
    background: var(--ui-surface-soft);
}
.table td { padding: 14px; border-top-color: #edf1f6; color: #475569; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8fbff; }

.modal-dialog { max-width: 820px; }
.modal-content {
    border: 1px solid rgba(218,226,237,.9);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(20, 32, 52, .28);
}
.modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f5843b, #f39855);
}
.modal-header .modal-title { font-size: 20px; letter-spacing: -.01em; }
.modal-body { padding: 24px; background: #fff; }
.modal-body .row { row-gap: 2px; }
.modal-body .form-group { margin-bottom: 19px; }
.modal-body label { color: #435066; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.modal-footer { gap: 9px; padding: 15px 24px; background: #f8fafc; }
.modal-footer .btn { min-height: 40px; margin: 0 !important; }
#module-modal .modal-dialog { max-width: 980px; }
#module-modal .modal-body { max-height: min(68vh, 680px); overflow-y: auto; overscroll-behavior: contain; }
#module-modal .module-form-section { margin: 8px 0 4px; }
#module-modal .module-form-section > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 11px 13px; border: 1px solid #dce7f5; border-radius: 10px; background: #f6f9fe; }
#module-modal .module-form-section span { color: #233a67; font-size: 13px; font-weight: 800; }
#module-modal .module-form-section small { color: #71809a; font-size: 11px; text-align: right; }
.case-detail-tabs {
    gap: 6px;
    margin: -3px -3px 20px;
    padding: 5px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.case-detail-tabs button { border-radius: 7px; font-size: 12px; font-weight: 700; }
.case-detail-tabs button.active { box-shadow: 0 2px 7px rgba(31,45,61,.12); }

@media (max-width: 767px) {
    .single-panel-title, .single-panel-content { padding-right: 16px; padding-left: 16px; }
    .module-toolbar { align-items: flex-start; flex-direction: column; }
    .module-toolbar-actions { width: 100%; justify-content: space-between; }
    .module-toolbar-actions > .btn { flex: 1; }
    .module-filter-bar { padding: 12px; }
    .module-card { border-radius: 11px; }
    .profile-card, .case-card, .deadline-card, .generic-card, .report-card { min-height: 0; padding: 16px; }
    .case-card-meta { margin-right: -16px; margin-left: -16px; padding-right: 16px; padding-left: 16px; }
    .modal { padding: 8px !important; }
    .modal-body, .modal-header, .modal-footer { padding-right: 16px; padding-left: 16px; }

    .modal.legal-workspace-modal {
        padding: 0 !important;
    }

    .modal.legal-workspace-modal .legal-workspace-dialog,
    .modal.legal-workspace-modal .legal-workspace-dialog.modal-dialog-centered {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: 100%;
        min-height: 100%;
        margin: 0;
    }

    .modal.legal-workspace-modal .modal-content {
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .modal.legal-workspace-modal .modal-footer {
        flex-wrap: wrap;
        padding-top: 12px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .modal.legal-workspace-modal .modal-footer .btn {
        flex: 1 1 auto;
    }
}

/* Composición interna de tarjetas: información arriba, acciones agrupadas abajo. */
.profile-card {
    min-height: 352px;
    padding: 20px;
}
.profile-card-top { align-items: flex-start; gap: 12px; }
.profile-avatar {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    font-size: 14px;
    box-shadow: 0 5px 12px rgba(75,131,240,.2);
}
.profile-card-title { padding: 1px 0 0; }
.profile-card-title h4 {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 4px;
    font-size: 16px;
    line-height: 20px;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.profile-card-title p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 17px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.profile-details {
    flex: 1 1 auto;
    gap: 0;
    margin: 18px 0 14px;
    padding: 8px 0;
}
.profile-details span {
    display: flex;
    align-items: center;
    min-height: 38px;
    border-bottom: 1px solid #edf1f6;
    color: #65758a;
    font-size: 12px;
}
.profile-details span:last-child { border-bottom: 0; }
.profile-details i { width: 20px; margin-right: 7px; color: #4b83f0; text-align: center; }
.profile-card-footer {
    min-height: 36px;
    margin: 0;
    padding: 10px 0 0;
    color: #8592a5;
    font-size: 11px;
}
.profile-card-footer > span { font-weight: 600; }

/* Las acciones inyectadas por los módulos se convierten en un pie consistente. */
.module-card > .record-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px -20px -20px;
    padding: 13px 20px;
    border-top: 1px solid #e8eef5;
    background: #f8fafc;
}
.module-card > .record-actions .quick-status-label {
    flex: 1 1 100%;
    justify-content: space-between;
    padding-bottom: 4px;
    color: #728096;
}
.module-card > .record-actions .btn,
.profile-card-footer .btn {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 11px;
    white-space: nowrap;
}
.profile-card > .record-actions { margin-top: 12px; }
.profile-card > .record-actions .record-disable { margin-left: auto; }
.profile-card-footer .client-summary-action { margin-left: auto; }

.client-profile-card { min-height: 0; }
.client-profile-card .profile-details { flex: 0 0 auto; margin-bottom: 10px; }
.client-card-context { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.client-card-loading,
.client-card-error,
.client-card-empty { display: flex; align-items: center; gap: 7px; min-height: 44px; color: #8793a6; font-size: 11px; }
.client-card-error { color: #c54955; }
.client-representative {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid #e2e9f5;
    border-radius: 9px;
    background: #f7faff;
}
.client-context-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; background: #e8f0ff; color: #3569c8; }
.client-representative small,
.client-representative strong { display: block; }
.client-representative small { margin-bottom: 2px; color: #8491a5; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.client-representative strong { overflow: hidden; color: #34435a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.client-cases-section { min-width: 0; }
.client-cases-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: #4b5870; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.client-cases-title b { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #edf3ff; color: #3569c8; font-size: 10px; }
.client-card-cases { display: flex; flex-direction: column; gap: 6px; }
.client-card-case { display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid #e8edf5; border-radius: 8px; background: #fff; }
.client-case-main { flex: 1 1 auto; min-width: 0; }
.client-case-heading { display: flex; align-items: center; gap: 6px; min-width: 0; }
.client-case-heading strong { overflow: hidden; flex: 1 1 auto; color: #34435a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.client-case-status { flex: 0 0 auto; padding: 3px 6px; border-radius: 99px; background: #edf7e8; color: #518a32; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.client-case-status.status-closed,
.client-case-status.status-archived { background: #f0f2f5; color: #687386; }
.client-case-status.status-paused { background: #fff5df; color: #a56c10; }
.client-case-main small { display: block; margin-top: 4px; color: #929daf; font-size: 9px; }
.client-case-main small i { margin-right: 3px; color: #6e8fd3; }
.client-case-main .client-case-lawyer { color: #53647d; font-weight: 700; }
.client-case-view { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 5px 7px; border: 1px solid #cbdcf7; border-radius: 6px; background: #f7faff; color: #3569c8; cursor: pointer; font-size: 9px; font-weight: 700; }
.client-case-view:hover { border-color: #4b83f0; background: #4b83f0; color: #fff; }
.client-card-see-all { display: block; margin-top: 8px; color: #3569c8; font-size: 10px; text-align: right; }
.client-card-see-all:hover { text-decoration: underline; }
.client-profile-card > .record-actions { margin-top: auto; }

.case-card {
    min-height: 318px;
    padding: 20px;
}
.case-card-head { min-height: 24px; }
.case-card .case-client { min-height: 20px; margin: 0 0 4px !important; font-size: 12px; }
.case-card .case-lawyer { min-height: 20px; margin: 0 0 8px !important; color: #53647d; font-size: 11px; line-height: 1.35; }
.case-card .case-lawyer i { margin-right: 6px; color: #4b83f0; }.case-card .case-lawyer span { color: #8390a4; font-size: 9px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.case-card .case-type { min-height: 20px; margin-bottom: 15px !important; font-size: 12px; }
.case-card-footer { min-height: 44px; }
.case-workflow-progress { margin: 0 -20px; padding: 13px 20px 16px; border-bottom: 1px solid #e8eef5; background: #fbfcfe; }
.case-workflow-heading { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.case-workflow-heading > span { color: #8491a5; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.case-workflow-heading strong { overflow: hidden; flex: 1 1 auto; color: var(--stage-color); font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.case-workflow-heading small { flex: 0 0 auto; color: #98a2b3; font-size: 9px; }
.case-stage-track { position: relative; height: 5px; margin: 0 5px; border-radius: 99px; background: #dfe6f1; }
.case-stage-track > b { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 99px; background: var(--stage-color); transition: width .3s ease; }
.case-stage-node { position: absolute; top: 50%; width: 14px; height: 14px; transform: translate(-50%, -50%); }
.case-stage-node > i { display: block; width: 14px; height: 14px; border: 3px solid #dfe6f1; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #fff; }
.case-stage-node.is-complete > i,
.case-stage-node.is-current > i { border-color: var(--stage-color); background: var(--stage-color); }
.case-stage-node.is-current > i { box-shadow: 0 0 0 3px rgba(75,131,240,.16); }
.case-card > .record-actions { margin-top: 12px; }
.deadline-card, .generic-card { min-height: 220px; }
.deadline-card > .record-actions, .generic-card > .record-actions { margin-top: auto; }
.document-card > .record-actions { margin: 0; }
.document-card > .record-actions {
    align-content: flex-start;
    align-self: stretch;
    flex: 0 0 290px;
    padding: 13px 14px;
}
.document-card > .record-actions .btn {
    flex: 1 1 calc(50% - 4px);
    margin: 0;
    min-width: 125px;
}

.document-preview-modal { overflow: hidden; }
.document-preview-modal .modal-body { min-height: 65vh; padding: 0; background: #f3f6fa; }
.document-preview-loading { display: flex; align-items: center; justify-content: center; min-height: 65vh; gap: 9px; color: #536dfe; }
.document-preview-error { margin: 20px; }
.document-preview-content { display: flex; align-items: center; justify-content: center; min-height: 65vh; }
.document-preview-content iframe { width: 100%; height: 65vh; border: 0; background: #fff; }
.document-preview-content img { display: block; max-width: 100%; max-height: 65vh; object-fit: contain; }
.document-preview-content video { display: block; width: 100%; max-height: 65vh; background: #111; }
.document-preview-media { display: flex; align-items: center; flex-direction: column; width: min(620px, 90%); gap: 22px; padding: 42px; border-radius: 16px; background: #fff; box-shadow: 0 8px 30px rgba(31,45,61,.1); }
.document-preview-media > i { color: #536dfe; font-size: 54px; }
.document-preview-media audio { width: 100%; }
.document-preview-unsupported { max-width: 520px; padding: 42px 28px; color: #68758a; text-align: center; }
.document-preview-unsupported > i { display: block; margin-bottom: 14px; color: #536dfe; font-size: 58px; }
.document-preview-unsupported h5 { color: #2f3b52; }

/* Editor Word integrado */
.document-preview-modal .modal-body:has(.document-word-editor:not(.d-none)) { background: #e9edf3; }
.document-word-editor { display: flex; flex-direction: column; width: 100%; min-height: 65vh; }
.word-editor-toolbar { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid #d7dce5; background: #fff; box-shadow: 0 2px 9px rgba(31,45,61,.07); }
.word-toolbar-group { display: inline-flex; overflow: hidden; border: 1px solid #d7dce5; border-radius: 6px; }
.word-toolbar-group button { width: 34px; height: 34px; padding: 0; border: 0; border-right: 1px solid #e4e8ef; background: #fff; color: #3e4c63; cursor: pointer; }
.word-toolbar-group button:last-child { border-right: 0; }
.word-toolbar-group button:hover,.word-toolbar-group button:focus { background: #edf3ff; color: #376fe0; outline: 0; }
.word-toolbar-select { height: 36px; max-width: 148px; padding: 0 28px 0 9px; border: 1px solid #d7dce5; border-radius: 6px; background: #fff; color: #344054; font-size: 12px; }
.word-size-select { width: 70px; }
.word-color-control { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: 0; border: 1px solid #d7dce5; border-radius: 6px; background: #fff; color: #3e4c63; cursor: pointer; }
.word-color-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.word-color-control::after { position: absolute; right: 7px; bottom: 4px; left: 7px; height: 3px; border-radius: 2px; background: currentColor; content: ""; }
.word-editor-workspace { flex: 1; overflow: auto; max-height: 65vh; padding: 28px; }
.word-editor-page { width: 794px; min-height: 1058px; margin: 0 auto; padding: 76px 82px; border: 1px solid #dfe3ea; background: #fff; box-shadow: 0 9px 30px rgba(31,45,61,.14); color: #1f2937; font-family: Arial, sans-serif; font-size: 12pt; line-height: 1.55; outline: none; }
.word-editor-page:focus { border-color: #8aaaf0; box-shadow: 0 9px 34px rgba(55,111,224,.2); }
.word-editor-page h1 { font-size: 24pt; }.word-editor-page h2 { font-size: 18pt; }.word-editor-page h3 { font-size: 14pt; }
.word-editor-page p { margin: 0 0 10px; }.word-editor-page blockquote { margin: 12px 25px; padding-left: 14px; border-left: 3px solid #9eb5e7; color: #596579; }
.word-editor-page table { width: 100%; margin: 12px 0; border-collapse: collapse; }.word-editor-page td,.word-editor-page th { padding: 7px; border: 1px solid #aeb7c5; }
.word-editor-page img { max-width: 100%; height: auto; }
.word-editor-status { padding: 8px 16px; border-top: 1px solid #d7dce5; background: #fff; color: #6b778c; font-size: 12px; }
.word-editor-status.is-dirty { color: #a56308; }.word-editor-status.is-saving { color: #376fe0; }.word-editor-status.is-saved { color: #24834c; }
.document-word-version-note { margin-right: auto; color: #65738a; font-size: 12px; }
@media (max-width: 900px) {
    .word-editor-workspace { padding: 12px; }
    .word-editor-page { width: 100%; min-height: 70vh; padding: 38px 28px; }
    .word-editor-toolbar { max-height: 148px; overflow-y: auto; }
}

.workflow-stage-legend { margin-bottom: 12px; color: #7c8799; font-size: 11px; }
.workflow-stage-config-list { display: flex; flex-direction: column; gap: 8px; max-height: 430px; overflow-y: auto; padding-right: 3px; }
.workflow-stage-config-row { display: grid; grid-template-columns: 24px minmax(150px, 1fr) 76px 52px 72px auto; align-items: center; gap: 8px; padding: 9px; border: 1px solid #e4eaf3; border-radius: 9px; background: #f9fbfe; }
.workflow-stage-handle { color: #9aa5b6; text-align: center; }
.workflow-stage-config-row .form-control { min-height: 34px; height: 34px; padding: 5px 8px; font-size: 11px; }
.workflow-stage-config-row input[type="color"] { padding: 3px; }
.workflow-stage-active { display: flex; align-items: center; gap: 5px; margin: 0; color: #657187; font-size: 10px; }
.workflow-stage-active input { accent-color: #4b83f0; }
.workflow-stage-create-form { display: grid; grid-template-columns: minmax(160px, 1fr) 90px 70px auto; align-items: end; gap: 9px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #e5eaf2; }
.workflow-stage-create-form label { display: block; margin-bottom: 4px; color: #596579; font-size: 10px; font-weight: 700; }
.workflow-stage-create-form .form-control { height: 38px; }
.workflow-stage-create-form input[type="color"] { padding: 3px; }

.documents-filters .document-type-select { display: none; }
.document-type-shortcuts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: .65rem;
}
.document-type-label {
    margin-right: 2px;
    color: #667085;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.document-type-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #dce4f0;
    border-radius: 8px;
    background: #fff;
    color: #5e6c82;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.document-type-filter:hover { border-color: #94b4ee; color: #3569c8; }
.document-type-filter:focus-visible { outline: 3px solid rgba(75,131,240,.2); outline-offset: 2px; }
.document-type-filter.active {
    border-color: #4b83f0;
    background: #4b83f0;
    color: #fff;
    box-shadow: 0 4px 10px rgba(75,131,240,.2);
}

.document-card, .finance-card, .report-card, .generic-card, .deadline-card {
    position: relative;
}
.document-card .document-icon, .finance-card .finance-icon, .generic-card .generic-icon {
    border-radius: 12px;
}
.document-card .document-card-actions { padding-top: 2px; }
.document-card .document-card-actions button { min-height: 34px; border-radius: 8px; }

@media (max-width: 767px) {
    .profile-card, .case-card { min-height: 0; padding: 17px; }
    .module-card > .record-actions { margin-right: -17px; margin-bottom: -17px; margin-left: -17px; padding: 12px 17px; }
    .document-card { flex-wrap: wrap; }
    .document-card > .record-actions { flex: 1 1 100%; margin: 0 -17px -17px; }
    .document-card > .record-actions .btn { min-width: 0; }
    .document-type-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
    .document-type-label { grid-column: 1 / -1; }
    .document-type-filter { width: 100%; }
    .case-workflow-progress { margin-right: -17px; margin-left: -17px; padding-right: 17px; padding-left: 17px; }
    .workflow-stage-config-row { grid-template-columns: 22px minmax(120px, 1fr) 65px 46px; }
    .workflow-stage-active { grid-column: 2 / 3; }
    .workflow-stage-save { grid-column: 3 / 5; }
    .workflow-stage-create-form { grid-template-columns: 1fr 80px 62px; }
    .workflow-stage-create-form .btn { grid-column: 1 / -1; }
    .profile-card-footer { flex-wrap: wrap; gap: 8px; }
    .profile-card-footer .client-summary-action { margin-left: 0; }
}

/* Tarjetas de audiencia: fecha, detalle y acciones en áreas independientes. */
.agenda-list .agenda-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: stretch;
    min-height: 0;
    overflow: hidden;
    border: 1px solid #e1e8f2;
    border-left: 0;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(31,45,61,.055);
}
.agenda-list .agenda-item:hover {
    border-color: #bfd0ee;
    box-shadow: 0 12px 28px rgba(31,45,61,.1);
    transform: translateY(-2px);
}
.agenda-list .agenda-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 126px;
    padding: 16px 10px;
    border-right: 1px solid #e4ebf5;
    background: linear-gradient(180deg, #f3f7ff 0%, #f8faff 100%);
}
.agenda-list .agenda-date strong { color: #4b83f0; font-size: 27px; line-height: 1; }
.agenda-list .agenda-date span { margin-top: 7px; color: #6d7f9a; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.agenda-list .agenda-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 19px 22px;
}
.agenda-list .agenda-heading { gap: 14px; }
.agenda-list .agenda-heading h4 { overflow: hidden; margin: 0; color: #253652; font-size: 18px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.agenda-list .agenda-content p { margin: 9px 0 5px; color: #617087; font-size: 13px; }
.agenda-list .agenda-content small { color: #8a97a9; font-size: 12px; }
.agenda-list .agenda-item > .record-actions {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 12px 16px;
    border-top: 1px solid #e7edf5;
    background: #f8fafc;
}
.agenda-list .agenda-item > .record-actions .quick-status-label {
    flex: 0 1 auto;
    padding: 0;
}
.agenda-list .agenda-item > .record-actions .btn { min-height: 34px; padding: 6px 10px; font-size: 11px; }
.agenda-list .agenda-item > .record-actions .record-disable { margin-left: auto; }

@media (max-width: 767px) {
    .agenda-list .agenda-item { grid-template-columns: 72px minmax(0, 1fr); }
    .agenda-list .agenda-date { min-height: 112px; }
    .agenda-list .agenda-date strong { font-size: 23px; }
    .agenda-list .agenda-content { padding: 16px; }
    .agenda-list .agenda-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
    .agenda-list .agenda-item > .record-actions .record-disable { margin-left: 0; }
}

/* Tarjetas de plazos: prioridad, vencimiento, estado y acciones en secciones claras. */
.deadline-grid .deadline-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    border-radius: 13px;
}
.deadline-grid .deadline-card::after { right: 0; left: 0; }
.deadline-grid .deadline-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 15px 18px 8px;
}
.deadline-grid .deadline-card-top > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #4b83f0;
    font-size: 20px;
    background: #edf4ff;
}
.deadline-grid .deadline-card h4 {
    margin: 12px 18px 5px;
    color: #263650;
    font-size: 18px;
    line-height: 24px;
    white-space: normal;
}
.deadline-grid .deadline-card h4 + p {
    margin: 0 18px 17px;
    color: #687a93;
    font-size: 13px;
}
.deadline-grid .deadline-card-footer {
    display: flex;
    align-items: center;
    min-height: 52px;
    margin: 0;
    padding: 11px 18px;
    border-top: 1px solid #e8eef5;
    border-bottom: 1px solid #e8eef5;
    background: #f8fafc;
}
.deadline-grid .deadline-card > .record-actions {
    margin: 0;
    padding: 12px 18px;
    border-top: 0;
    background: #fff;
}
.deadline-grid .deadline-card > .record-actions .quick-status-label { flex: 1 1 100%; }
.deadline-grid .deadline-card > .record-actions .record-disable { margin-left: auto; }
.deadline-grid .priority-critical { border-color: #f0c9ce; }
.deadline-grid .priority-critical .deadline-card-top > i { color: #cf4350; background: #fff0f1; }
.deadline-grid .priority-high { border-color: #f1d6b8; }
.deadline-grid .priority-high .deadline-card-top > i { color: #d97d22; background: #fff5e9; }
.deadline-grid .priority-low .deadline-card-top > i { color: #2e9b69; background: #edf9f3; }

@media (max-width: 767px) {
    .deadline-grid .deadline-card-top { padding-right: 16px; padding-left: 16px; }
    .deadline-grid .deadline-card h4 { margin-right: 16px; margin-left: 16px; }
    .deadline-grid .deadline-card h4 + p { margin-right: 16px; margin-left: 16px; }
    .deadline-grid .deadline-card-footer, .deadline-grid .deadline-card > .record-actions { padding-right: 16px; padding-left: 16px; }
    .deadline-grid .deadline-card > .record-actions .record-disable { margin-left: 0; }
}

/* Tablero de tareas: cada columna conserva una altura de trabajo y desplaza
   únicamente su lista, evitando que la página crezca por cada tarea. */
.kanban-board {
    align-items: start;
    min-height: 0;
}
.kanban-column {
    display: flex;
    flex-direction: column;
    height: clamp(360px, 58vh, 560px);
    min-height: 0;
    padding: 12px;
    border: 1px solid #e3eaf3;
    border-radius: 13px;
    background: #f6f8fc;
}
.kanban-column > header {
    flex: 0 0 auto;
    margin: -2px 0 11px;
    padding: 3px 2px 10px;
    border-bottom: 1px solid #e2e9f2;
}
.kanban-items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    align-content: start;
    padding: 0 4px 2px 0;
    scrollbar-color: #bdc9dc transparent;
    scrollbar-width: thin;
}
.kanban-items::-webkit-scrollbar { width: 7px; }
.kanban-items::-webkit-scrollbar-track { background: transparent; }
.kanban-items::-webkit-scrollbar-thumb { border-radius: 8px; background: #bdc9dc; }
.kanban-items::-webkit-scrollbar-thumb:hover { background: #91a5c2; }
.kanban-card { border-radius: 10px; padding: 14px; }
.kanban-card h5 { color: #263650; font-weight: 650; }
.kanban-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kanban-empty { min-height: 90px; padding: 28px 12px; border-radius: 9px; background: rgba(255,255,255,.45); }

@media (max-width: 767px) {
    .kanban-board { grid-template-columns: 1fr; }
    .kanban-column { height: 420px; }
}

/* Reportes: métricas compactas y tablas con prioridad de ancho. */
.report-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
}
.report-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 118px !important;
    padding: 16px 18px !important;
    border-radius: 11px;
}
.report-card .eyebrow {
    margin: 0;
    color: #8290a5;
    font-size: 10px;
    line-height: 15px;
}
.report-card strong {
    margin: 7px 0 0;
    color: #2e66c3;
    font-size: 30px;
    line-height: 1;
}
.report-actions {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 8px;
    margin: 2px 0 0;
    padding: 2px 0;
}
.report-actions .btn { min-height: 36px; font-size: 12px; }
.report-breakdown-grid {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 2px;
}
.report-breakdown-card {
    min-height: 0;
    padding: 17px;
    border-radius: 11px;
}
.report-breakdown-card h4 { margin-bottom: 10px; font-size: 17px; }
.report-breakdown-card > div { padding: 9px 0; }
.report-productivity-card,
.report-goals-card {
    grid-column: 1 / -1;
    min-height: 0;
    margin-top: 0;
}
.report-productivity-card .table-responsive {
    max-height: 360px;
    overflow: auto;
}
.report-productivity-card .table { min-width: 850px; }
.report-productivity-card .table th,
.report-productivity-card .table td { padding: 12px 14px; white-space: nowrap; }
.report-productivity-card .table td:first-child { white-space: normal; min-width: 190px; }
.report-productivity-heading { margin-bottom: 10px; }
.report-goals-card { padding-bottom: 14px; }
.report-goal-row { padding: 10px 0; }

@media (max-width: 1200px) {
    .report-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .report-card { min-height: 104px !important; padding: 14px !important; }
    .report-breakdown-grid { grid-template-columns: 1fr; }
    .report-actions { flex-wrap: wrap; }
}

/* Historial auditable del expediente dentro del flujo de edición. */
#case-history-open { margin-right: auto; }
#case-history-modal .modal-body {
    max-height: min(70vh, 680px);
    overflow-y: auto;
    background: #f7f9fc;
}
.case-history-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.case-history-entry {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
}
.case-history-entry:not(:last-child)::before {
    position: absolute;
    top: 40px;
    bottom: -18px;
    left: 20px;
    width: 2px;
    background: #dce5f2;
    content: "";
}
.case-history-icon {
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #cddcf2;
    border-radius: 50%;
    color: #3973cf;
    font-size: 20px;
    background: #edf4ff;
}
.case-history-entry.is-created .case-history-icon {
    border-color: #bce3cd;
    color: #25895b;
    background: #ebf8f1;
}
.case-history-card {
    padding: 15px 17px;
    border: 1px solid #e0e7f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(40, 61, 91, .05);
}
.case-history-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
.case-history-card h5 {
    margin: 0 0 3px;
    color: #273a56;
    font-size: 14px;
    font-weight: 750;
}
.case-history-card header span,
.case-history-card time {
    color: #7b889b;
    font-size: 11px;
}
.case-history-card time { white-space: nowrap; }
.case-history-changes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid #edf1f6;
}
.case-history-change {
    display: grid;
    grid-template-columns: minmax(120px, .75fr) minmax(100px, 1fr) 20px minmax(100px, 1fr);
    align-items: center;
    gap: 9px;
    color: #526279;
    font-size: 12px;
}
.case-history-change > strong {
    color: #40516a;
    font-size: 11px;
}
.case-history-change > i { color: #92a1b6; text-align: center; }
.case-history-before,
.case-history-after {
    min-width: 0;
    padding: 7px 9px;
    overflow-wrap: anywhere;
    border-radius: 7px;
}
.case-history-before {
    color: #8a6570;
    text-decoration: line-through;
    background: #fff4f5;
}
.case-history-after {
    color: #246f4d;
    font-weight: 650;
    background: #eef9f3;
}
.case-history-empty-detail {
    margin: 12px 0 0;
    padding-top: 11px;
    border-top: 1px solid #edf1f6;
    color: #718096;
    font-size: 12px;
}

@media (max-width: 767px) {
    #module-modal .modal-footer { flex-wrap: wrap; }
    #case-history-open { flex: 1 0 100%; margin: 0 0 5px; }
    .case-history-entry { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; }
    .case-history-icon { width: 34px; height: 34px; font-size: 17px; }
    .case-history-entry:not(:last-child)::before { top: 32px; left: 16px; }
    .case-history-card { padding: 13px; }
    .case-history-card > header { flex-direction: column; gap: 5px; }
    .case-history-change { grid-template-columns: 1fr 18px 1fr; }
    .case-history-change > strong { grid-column: 1 / -1; }
}

/* Flujo prioritario: próxima acción, automatizaciones, riesgos y cronología. */
.case-next-action {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 12px 0 4px;
    padding: 10px 12px;
    border-left: 3px solid #4b83f0;
    border-radius: 8px;
    background: #f2f6ff;
}
.case-next-action small { color: #6f7f96; font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.case-next-action strong { color: #304d7d; font-size: 12px; }
.case-next-action span { color: #8290a4; font-size: 10px; }
.case-next-action.is-overdue { border-left-color: #d94b58; background: #fff2f3; }
.case-next-action.is-overdue strong { color: #b72f3d; }

.workflow-stage-automations { grid-column: 2 / -1; }
.workflow-stage-automations label { display: flex; justify-content: space-between; margin: 3px 0 5px; color: #53627a; font-size: 10px; font-weight: 700; }
.workflow-stage-automations label small { color: #8b97aa; font-weight: 400; }
.workflow-stage-config-row .workflow-stage-automation { height: auto; min-height: 54px; padding: 8px 10px; resize: vertical; line-height: 1.45; }

.case-unified-timeline { display: flex; flex-direction: column; gap: 9px; }
.case-timeline-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid #e6ebf3; border-radius: 10px; color: #30415c; background: #fff; }
.case-timeline-item:hover { border-color: #abc3eb; text-decoration: none; box-shadow: 0 5px 14px rgba(37, 57, 87, .06); }
.case-timeline-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #3c75cf; background: #edf4ff; }
.case-timeline-item strong, .case-timeline-item small { display: block; }
.case-timeline-item small { margin-top: 3px; color: #7d899b; font-size: 11px; }
.case-timeline-item time { color: #8995a7; font-size: 10px; white-space: nowrap; }
.timeline-deadline .case-timeline-icon { color: #c77818; background: #fff4e7; }
.timeline-hearing .case-timeline-icon { color: #6f57c7; background: #f1edff; }
.timeline-document .case-timeline-icon { color: #269665; background: #ecf9f2; }

.dashboard-case-risks { display: flex; flex-direction: column; gap: 10px; }
.case-risk-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.case-risk-summary span { padding: 7px 10px; border-radius: 8px; color: #65738a; font-size: 11px; background: #f3f6fa; }
.case-risk-summary strong { margin-right: 3px; color: #344762; }
.case-risk-list { display: flex; flex-direction: column; gap: 7px; }
.case-risk-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(160px, .55fr) 18px; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid #e7ecf3; border-left: 4px solid #e2a63f; border-radius: 9px; color: #33445f; background: #fff; }
.case-risk-row:hover { text-decoration: none; background: #fafcff; }
.case-risk-row.risk-critical { border-left-color: #d84a57; }
.case-risk-score { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #a26d18; font-size: 12px; font-weight: 800; background: #fff3df; }
.risk-critical .case-risk-score { color: #bb3442; background: #ffedef; }
.case-risk-main strong, .case-risk-main small, .case-risk-main em, .case-risk-next small, .case-risk-next strong { display: block; }
.case-risk-main small { margin-top: 2px; color: #8490a2; font-size: 10px; }
.case-risk-main em { margin-top: 4px; color: #b05a30; font-size: 10px; font-style: normal; }
.case-risk-next small { color: #8a96a8; font-size: 9px; text-transform: uppercase; }
.case-risk-next strong { margin-top: 3px; color: #435775; font-size: 11px; }

.calendar-dot.task { background: #35a36c; }
.calendar-dot.next-action { background: #8a62d3; }
.calendar-event.task { color: #24794f; background: #e9f8f0; }
.calendar-event.next-action { color: #6844ad; background: #f1ecfb; }
.calendar-task-cloud {
    --cloud-arrow-left: 50%;
    background: #fff;
    border: 1px solid #dce5f1;
    border-radius: 14px;
    box-shadow: 0 18px 46px rgba(28, 45, 75, .22);
    color: #344054;
    max-width: min(360px, calc(100vw - 24px));
    padding: 14px 15px 12px;
    pointer-events: none;
    position: fixed;
    width: 360px;
    z-index: 3000;
}
.calendar-task-cloud[hidden] { display: none; }
.calendar-task-cloud-backdrop {
    background: rgba(20, 32, 51, .48);
    inset: 0;
    position: fixed;
    z-index: 2999;
}
.calendar-task-cloud-backdrop[hidden] { display: none; }
.calendar-task-cloud::after {
    background: #fff;
    border-bottom: 1px solid #dce5f1;
    border-right: 1px solid #dce5f1;
    bottom: -7px;
    content: "";
    height: 13px;
    left: var(--cloud-arrow-left);
    position: absolute;
    transform: translateX(-50%) rotate(45deg);
    width: 13px;
}
.calendar-task-cloud.is-below::after {
    border: 0;
    border-left: 1px solid #dce5f1;
    border-top: 1px solid #dce5f1;
    bottom: auto;
    top: -7px;
}
.calendar-task-cloud > header { align-items: center; display: flex; justify-content: space-between; gap: 10px; }
.calendar-task-cloud > header > span { color: #5c7193; font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.calendar-task-cloud > header > span i { color: #35a36c; margin-right: 5px; }
.calendar-task-cloud > header em { background: #eef2f7; border-radius: 999px; color: #66758a; font-size: 9px; font-style: normal; font-weight: 700; padding: 4px 7px; }
.calendar-task-cloud > header em.status-in_progress { background: #eaf1ff; color: #3169c6; }
.calendar-task-cloud > header em.status-completed { background: #e9f8f0; color: #24794f; }
.calendar-task-cloud > header em.status-cancelled { background: #fdecef; color: #ad3e4d; }
.calendar-task-cloud h4 { color: #233552; font-size: 15px; line-height: 20px; margin: 9px 0 4px; }
.calendar-task-cloud > p { color: #6d798c; font-size: 11px; line-height: 16px; margin: 0 0 10px; max-height: 48px; overflow: hidden; }
.calendar-task-cloud-context { background: #f7f9fc; border-radius: 9px; display: grid; gap: 7px; padding: 9px 10px; }
.calendar-task-cloud-context > div { align-items: center; display: grid; gap: 8px; grid-template-columns: 17px minmax(0, 1fr); }
.calendar-task-cloud-context > div > i { color: #6883ad; text-align: center; }
.calendar-task-cloud-context > div > span { display: grid; min-width: 0; }
.calendar-task-cloud-context small { color: #8b96a8; font-size: 8px; line-height: 11px; text-transform: uppercase; }
.calendar-task-cloud-context strong { color: #36455e; font-size: 10px; line-height: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-task-cloud > footer { align-items: center; color: #738096; display: flex; font-size: 9px; gap: 10px; justify-content: space-between; margin-top: 10px; }
.calendar-task-cloud > footer i { margin-right: 4px; }
.calendar-task-cloud-actions { display: none; }
@media (max-width: 767px), (hover: none) {
    body.calendar-task-sheet-open { overflow: hidden; }
    .calendar-task-cloud {
        border: 0;
        border-radius: 20px 20px 0 0;
        bottom: 0;
        box-shadow: 0 -12px 42px rgba(20, 32, 51, .24);
        left: 0 !important;
        max-height: min(86dvh, 720px);
        max-width: none;
        overflow-y: auto;
        padding: 10px 18px max(16px, env(safe-area-inset-bottom));
        pointer-events: auto;
        right: 0;
        top: auto !important;
        width: 100%;
    }
    .calendar-task-cloud:focus { outline: 0; }
    .calendar-task-cloud::before {
        background: #d6dde8;
        border-radius: 99px;
        content: "";
        display: block;
        height: 4px;
        margin: 0 auto 13px;
        width: 44px;
    }
    .calendar-task-cloud::after { display: none; }
    .calendar-task-cloud > header > span { font-size: 11px; }
    .calendar-task-cloud > header em { font-size: 10px; padding: 5px 9px; }
    .calendar-task-cloud h4 { font-size: 18px; line-height: 24px; margin-top: 13px; }
    .calendar-task-cloud > p { font-size: 13px; line-height: 19px; max-height: none; }
    .calendar-task-cloud-context { gap: 10px; padding: 12px; }
    .calendar-task-cloud-context > div { gap: 10px; grid-template-columns: 20px minmax(0, 1fr); }
    .calendar-task-cloud-context > div > i { font-size: 17px; }
    .calendar-task-cloud-context small { font-size: 9px; line-height: 13px; }
    .calendar-task-cloud-context strong { font-size: 12px; line-height: 17px; text-overflow: initial; white-space: normal; }
    .calendar-task-cloud > footer { align-items: flex-start; flex-direction: column; font-size: 11px; gap: 5px; }
    .calendar-task-cloud-actions { display: grid; gap: 9px; grid-template-columns: 1fr 1.35fr; margin-top: 15px; }
    .calendar-task-cloud-actions button,
    .calendar-task-cloud-actions a { align-items: center; border: 1px solid #d9e1ec; border-radius: 11px; display: inline-flex; font-size: 13px; font-weight: 700; gap: 7px; justify-content: center; min-height: 46px; padding: 10px 12px; }
    .calendar-task-cloud-actions button { color: #5e6d82; background: #fff; }
    .calendar-task-cloud-actions a { border-color: #2f73d2; color: #fff; background: #2f73d2; }
    .calendar-task-cloud-actions a:hover { color: #fff; text-decoration: none; }
    .calendar-event[data-calendar-event-key] { min-height: 30px; padding: .42rem .48rem; touch-action: manipulation; }
}
.calendar-dot.appointment { background: #12a594; }
.calendar-event.appointment { color: #08766b; background: #e6f8f5; }
.calendar-agenda-type.appointment { color: #08766b; background: #e6f8f5; }
.calendar-day.is-today { box-shadow: inset 0 0 0 2px #4b83f0; background: #fbfdff; }
.calendar-agenda-type { margin-left: auto; padding: 4px 7px; border-radius: 6px; color: #68758a; font-size: 9px; font-style: normal; background: #f1f4f8; }
.calendar-agenda-type.hearing { color: #3169c6; background: #eaf1ff; }
.calendar-agenda-type.deadline { color: #b56b15; background: #fff1df; }
.calendar-agenda-type.task { color: #24794f; background: #e9f8f0; }
.calendar-agenda-type.next-action { color: #6844ad; background: #f1ecfb; }
.notification-digest-option { display: flex; align-items: center; gap: 8px; color: #4c5c73; }
.notification-digest-option input { accent-color: #4b83f0; }
.task-flow-badge { display: inline-flex; align-items: center; gap: 5px; margin: 0 5px 8px 0; padding: 4px 7px; border-radius: 6px; color: #526f9d; font-size: 9px; font-weight: 700; background: #edf4ff; }
.task-flow-badge.is-blocked { color: #a66a20; background: #fff3df; }

/* Gestión documental: requisitos, OCR, clasificación y revisión auditable. */
.document-requirements-panel { grid-column: 1 / -1; padding: 18px 20px; border: 1px solid #dfe7f3; border-radius: 14px; background: linear-gradient(135deg, #f8fbff, #fff); box-shadow: 0 8px 22px rgba(42, 72, 116, .06); }
.document-requirements-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 34%); align-items: end; gap: 18px; }
.document-requirements-heading h4 { margin: 2px 0 3px; color: #243653; font-size: 15px; }
.document-requirements-heading p { margin: 0; color: #758196; font-size: 11px; }
.document-requirements-configure { margin-top: 9px; }
.document-requirements-progress { height: 8px; overflow: hidden; border-radius: 999px; background: #e7edf6; }
.document-requirements-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4b83f0, #36a269); }
.document-requirements-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.document-requirement { display: grid; grid-template-columns: 18px auto; column-gap: 6px; padding: 8px 10px; border: 1px solid #e4e9f1; border-radius: 9px; color: #728096; background: #fff; }
.document-requirement i { grid-row: 1 / span 2; align-self: center; }
.document-requirement b { color: #42526b; font-size: 10px; }
.document-requirement small { font-size: 9px; }
.document-requirement.is-approved { border-color: #bce5ce; color: #23875a; background: #f1fbf5; }
.document-requirement.is-fulfilled { border-color: #f1d39f; color: #a06a1f; background: #fffaf0; }
.document-requirement.is-missing { border-color: #f0c3c7; color: #bb4651; background: #fff6f7; }
.document-review-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #66758b; font-size: 9px; font-weight: 700; background: #eef2f7; white-space: nowrap; }
.document-review-badge.status-en-revision, .document-review-badge.status-in-review { color: #3469bd; background: #eaf2ff; }
.document-review-badge.status-observado, .document-review-badge.status-observed { color: #ae6a16; background: #fff1dd; }
.document-review-badge.status-aprobado, .document-review-badge.status-approved, .document-review-badge.status-firmado, .document-review-badge.status-signed, .document-review-badge.status-presentado, .document-review-badge.status-presented { color: #238157; background: #e9f8ef; }
.document-index-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0; padding: 8px 10px; border-radius: 8px; color: #66758a; background: #f5f7fa; }
.document-index-status span { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; }
.document-index-status span.is-ready { color: #27815a; }
.document-index-status small { color: #8994a5; font-size: 9px; }
.document-card-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.document-card-actions button { border: 0; border-radius: 7px; color: #3e6fae; font-size: 10px; background: #eef4fd; }
.document-text-content { min-height: 260px; }
.document-text-content pre { max-height: 60vh; overflow: auto; padding: 18px; border: 1px solid #e2e7ef; border-radius: 10px; color: #31415a; font: 12px/1.65 Consolas, monospace; white-space: pre-wrap; background: #f8fafc; }
.document-review-history { display: grid; gap: 8px; max-height: 280px; overflow: auto; }
.document-review-history article { display: grid; grid-template-columns: 30px 1fr; gap: 9px; padding: 10px; border-left: 3px solid #6d8fe8; border-radius: 7px; background: #f6f8fc; }
.document-review-history article > i { color: #6083df; font-size: 18px; }
.document-review-history strong, .document-review-history span, .document-review-history p { display: block; margin: 0; }
.document-review-history strong { color: #344761; font-size: 11px; }
.document-review-history span { color: #8490a2; font-size: 9px; }
.document-review-history p { margin-top: 3px; color: #66748a; font-size: 10px; }
.template-placeholder-help { display: grid; gap: 4px; margin-bottom: 14px; padding: 10px; border-radius: 8px; color: #5d6e86; font-size: 10px; background: #f3f6fa; }

/* Centro de automatización e inteligencia artificial. */
.automation-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.automation-ai-state { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; color: #6b7280; font-size: 10px; font-weight: 700; background: #edf1f6; }
.automation-ai-state.is-online { color: #217a52; background: #e8f8ef; }
.automation-ai-state.is-local { color: #4b65a5; background: #edf3ff; }
.automation-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.automation-metrics article { display: flex; align-items: center; gap: 11px; min-height: 82px; padding: 14px; border: 1px solid #e4e9f1; border-radius: 12px; background: #fff; box-shadow: 0 7px 22px rgba(38, 58, 91, .05); }
.automation-metrics article > i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #4b74d8; font-size: 20px; background: #edf3ff; }
.automation-metrics strong, .automation-metrics small { display: block; }
.automation-metrics strong { color: #253753; font-size: 20px; line-height: 1; }
.automation-metrics small { margin-top: 5px; color: #7b8799; font-size: 9px; }
.automation-metrics article.is-danger > i { color: #bd3f4c; background: #fff0f2; }
.automation-metrics article.is-success > i { color: #24815a; background: #eaf8f0; }
.automation-governance { display: flex; align-items: center; gap: 9px; margin: -5px 0 18px; padding: 10px 13px; border: 1px solid #d9e5fa; border-radius: 9px; color: #5d6f8b; font-size: 9px; background: #f5f8ff; }
.automation-governance > i { color: #4b75d6; font-size: 18px; }
.automation-governance strong { color: #40587f; }
.automation-page .single-panel { height: calc(100% - 18px); margin-bottom: 18px; }
.automation-case-control { display: flex; gap: 7px; }
.automation-case-control select { min-width: 300px; height: 36px; }
.automation-insight-empty { display: grid; place-items: center; min-height: 230px; color: #8792a3; text-align: center; }
.automation-insight-empty > i { color: #7796df; font-size: 38px; }
.automation-insight-empty h4 { margin: 8px 0 3px; color: #42516a; }
.automation-insight-empty p { margin: 0; font-size: 11px; }
.automation-insight-head { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: linear-gradient(135deg, #f6f9ff, #fff); }
.automation-insight-head p { margin: 5px 0 0; color: #526177; font-size: 12px; line-height: 1.55; }
.automation-risk { display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; color: #3870c9; background: #eaf2ff; box-shadow: inset 0 0 0 6px rgba(75, 131, 240, .12); }
.automation-risk b { font-size: 23px; line-height: 1; }
.automation-risk small { font-size: 8px; font-weight: 700; text-transform: uppercase; }
.automation-risk.risk-medium { color: #9a681a; background: #fff4df; }
.automation-risk.risk-high, .automation-risk.risk-critical { color: #b83e4a; background: #ffedf0; }
.automation-insight > section { padding: 13px 4px 4px; }
.automation-insight > section h5, .automation-suggestion-grid h5 { margin: 0 0 7px; color: #354861; font-size: 11px; }
.automation-insight > section p { margin: 0; color: #68768a; font-size: 11px; }
.automation-missing div { display: flex; flex-wrap: wrap; gap: 6px; }
.automation-missing span { padding: 5px 8px; border-radius: 7px; color: #aa6420; font-size: 9px; background: #fff3e2; }
.automation-missing i { margin-right: 4px; }
.automation-suggestion-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.automation-suggestion-grid > section { padding: 11px; border: 1px solid #e6eaf1; border-radius: 10px; background: #fff; }
.automation-suggestion { display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 7px 0; border-bottom: 1px solid #eff2f6; cursor: pointer; }
.automation-suggestion:last-child { border-bottom: 0; }
.automation-suggestion input { margin-top: 2px; accent-color: #4b83f0; }
.automation-suggestion strong, .automation-suggestion small { display: block; }
.automation-suggestion strong { color: #46566e; font-size: 9px; }
.automation-suggestion small { margin-top: 2px; color: #8a95a5; font-size: 8px; }
.automation-approval-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 9px; color: #66758a; font-size: 9px; background: #f3f6fa; }
.automation-assistant-panel form { display: grid; gap: 9px; }
.automation-answer { margin-top: 12px; padding: 12px; border: 1px solid #dfe7f3; border-radius: 10px; background: #f9fbff; }
.automation-answer p { max-height: 300px; overflow: auto; margin: 6px 0; color: #46566e; font-size: 11px; line-height: 1.6; }
.automation-sources { display: flex; flex-wrap: wrap; gap: 5px; }
.automation-sources a { padding: 4px 7px; border-radius: 6px; color: #4269aa; font-size: 8px; background: #edf3ff; }
.automation-save-document { display: flex; align-items: center; gap: 7px; margin: 6px 0 11px; color: #596a82; font-size: 10px; }
.automation-save-document input { accent-color: #4b83f0; }
.automation-draft-result { margin-top: 12px; }
.automation-draft-result-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: #40516a; font-size: 10px; }
.automation-draft-result pre { max-height: 320px; overflow: auto; padding: 12px; border-radius: 9px; color: #384a62; font: 10px/1.55 Consolas, monospace; white-space: pre-wrap; background: #f5f7fa; }
.automation-rules { display: grid; gap: 8px; }
.automation-rule { display: grid; grid-template-columns: 34px minmax(0, 1fr) 38px 32px; align-items: center; gap: 8px; padding: 10px; border: 1px solid #e7ebf1; border-radius: 10px; }
.automation-rule.is-inactive { opacity: .58; }
.automation-rule-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #7657c7; background: #f1ecff; }
.automation-rule strong, .automation-rule small { display: block; }
.automation-rule strong { color: #3b4d66; font-size: 10px; }
.automation-rule small { color: #8994a4; font-size: 8px; }
.automation-rule-actions-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.automation-rule-actions-list span { padding: 3px 5px; border-radius: 5px; color: #5370a2; font-size: 7px; background: #eef3fb; }
.automation-rule-switch input { display: none; }
.automation-rule-switch span { display: block; position: relative; width: 32px; height: 18px; border-radius: 99px; cursor: pointer; background: #ced5df; }
.automation-rule-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: .2s; }
.automation-rule-switch input:checked + span { background: #45a96f; }
.automation-rule-switch input:checked + span::after { transform: translateX(14px); }
.automation-runs { display: grid; gap: 7px; }
.automation-run { display: grid; grid-template-columns: 32px minmax(0, 1fr) 100px 150px; align-items: center; gap: 10px; padding: 9px 11px; border-bottom: 1px solid #edf0f4; }
.automation-run-state { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #27815a; background: #eaf8ef; }
.automation-run.run-failed .automation-run-state { color: #b83e49; background: #ffedf0; }
.automation-run strong, .automation-run small { display: block; }
.automation-run strong { color: #40516a; font-size: 10px; }
.automation-run small, .automation-run time { color: #8994a4; font-size: 8px; }
.automation-run b { color: #526b98; font-size: 9px; text-align: right; }
.automation-run time { text-align: right; }
.automation-run p { margin: 3px 0 0; color: #b04852; font-size: 8px; }

@media (max-width: 767px) {
    .automation-title { align-items: flex-start; flex-direction: column; }
    .automation-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .automation-case-control { width: 100%; flex-direction: column; }
    .automation-case-control select { min-width: 0; }
    .automation-suggestion-grid { grid-template-columns: 1fr; }
    .automation-run { grid-template-columns: 30px minmax(0, 1fr); }
    .automation-run > b, .automation-run > time { grid-column: 2; text-align: left; }
    .document-requirements-heading { grid-template-columns: 1fr; }
    .document-index-status { align-items: flex-start; flex-direction: column; }
    .workflow-stage-automations { grid-column: 1 / -1; }
    .case-timeline-item { grid-template-columns: 34px minmax(0, 1fr); }
    .case-timeline-item time { grid-column: 2; white-space: normal; }
    .case-risk-row { grid-template-columns: 32px minmax(0, 1fr) 16px; }
    .case-risk-next { grid-column: 2; }
    .case-risk-row > i { grid-column: 3; grid-row: 1; }
    .calendar-legend { flex-wrap: wrap; gap: .6rem 1rem; }
    .calendar-agenda-type { display: none; }
}

/* Seguridad y control: sesiones, eventos, revisiones y cumplimiento. */
.security-page { padding-bottom: 24px; }
.security-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.security-hero h2 { margin: 3px 0 4px; color: #263853; font-size: 25px; }
.security-hero p { margin: 0; color: #7a8799; font-size: 12px; }
.security-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.security-self-card { display: grid; grid-template-columns: 48px minmax(220px, 1fr) auto auto auto; align-items: center; gap: 14px; margin-bottom: 16px; padding: 15px 17px; border: 1px solid #dfe7f3; border-left: 4px solid #4a82ed; border-radius: 12px; background: linear-gradient(125deg, #f8fbff, #fff); box-shadow: 0 7px 21px rgba(43, 65, 99, .05); }
.security-self-card.requires-action { border-left-color: #e39b2f; background: linear-gradient(125deg, #fffaf1, #fff); }
.security-self-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: #3f72d0; font-size: 25px; background: #eaf2ff; }
.security-self-main small { color: #7a89a0; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.security-self-main h3 { margin: 2px 0; color: #2e405c; font-size: 15px; }
.security-self-main p { margin: 0; color: #7b8799; font-size: 10px; }
.security-self-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.security-self-badges span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: 8px; font-weight: 750; }
.security-self-badges .is-good { color: #237d56; background: #eaf8f0; }
.security-self-badges .is-warning { color: #a66a18; background: #fff3df; }
.security-self-badges .is-danger { color: #b83e4a; background: #ffedf0; }
.security-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.security-metrics article { display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 12px; border: 1px solid #e5eaf2; border-radius: 11px; background: #fff; box-shadow: 0 5px 16px rgba(44, 62, 91, .04); }
.security-metrics article > i { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; color: #4978d6; font-size: 19px; background: #edf3ff; }
.security-metrics strong, .security-metrics small { display: block; }
.security-metrics strong { color: #293b57; font-size: 17px; }
.security-metrics small { margin-top: 2px; color: #8490a1; font-size: 8px; }
.security-metrics .is-danger > i { color: #bc404d; background: #ffedf0; }
.security-metrics .is-warning > i { color: #a56c1d; background: #fff3df; }
.security-metrics .is-success > i { color: #278158; background: #e9f8f0; }
.security-tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 12px; padding: 5px; border: 1px solid #e2e7ef; border-radius: 11px; background: #f7f9fc; }
.security-tabs button { flex: 0 0 auto; padding: 9px 12px; border: 0; border-radius: 8px; color: #6b788b; font-size: 9px; font-weight: 700; background: transparent; cursor: pointer; }
.security-tabs button i { margin-right: 5px; font-size: 14px; vertical-align: -1px; }
.security-tabs button.active { color: #fff; background: #477cde; box-shadow: 0 4px 10px rgba(71, 124, 222, .22); }
.security-panel { display: none; min-height: 220px; padding: 18px; border: 1px solid #e2e7ef; border-radius: 12px; background: #fff; box-shadow: 0 7px 22px rgba(39, 57, 85, .04); }
.security-panel.active { display: block; }
.security-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.security-panel-head h3 { margin: 0 0 3px; color: #30425d; font-size: 14px; }
.security-panel-head p { margin: 0; color: #8490a1; font-size: 10px; }
.security-subhead { margin-top: 22px; padding-top: 18px; border-top: 1px solid #edf0f4; }
.security-self-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 11px; }
.security-self-grid article { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid #e5eaf1; border-radius: 10px; }
.security-self-grid article > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #4877d3; font-size: 20px; background: #eef4ff; }
.security-self-grid h4 { margin: 0 0 3px; color: #394b64; font-size: 11px; }
.security-self-grid p { margin: 0 0 4px; color: #8490a2; font-size: 9px; }
.security-self-grid strong { font-size: 9px; }
.security-self-grid .is-good { color: #278058; }
.security-self-grid .is-warning { color: #a66a1b; }
.security-self-grid .is-danger { color: #bb3f4b; }
.security-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e7ebf1; border-radius: 9px; }
.security-table { width: 100%; min-width: 780px; border-collapse: collapse; background: #fff; }
.security-table th { padding: 9px 11px; color: #7f8b9e; font-size: 8px; letter-spacing: .03em; text-align: left; text-transform: uppercase; background: #f6f8fb; }
.security-table td { padding: 10px 11px; border-top: 1px solid #edf0f4; color: #526078; font-size: 9px; vertical-align: middle; }
.security-table td strong, .security-table td small { display: block; }
.security-table td strong { color: #344760; font-size: 10px; }
.security-table td small { margin-top: 2px; color: #8c97a7; font-size: 8px; }
.security-table tr.is-muted { opacity: .56; }
.security-level { display: inline-flex; margin-bottom: 3px; padding: 3px 6px; border-radius: 5px; color: #4d6da5; font-size: 8px; font-weight: 750; background: #edf3fd; }
.security-status { display: inline-flex; align-items: center; width: max-content; padding: 4px 7px; border-radius: 999px; color: #657387; font-size: 8px; font-weight: 750; background: #eef2f6; }
.security-status.status-pass, .security-status.status-resolved, .security-status.status-approved { color: #247a53; background: #e9f8f0; }
.security-status.status-warning, .security-status.status-investigating, .security-status.status-medium, .security-status.status-pending, .security-status.status-reduce { color: #a36a19; background: #fff3df; }
.security-status.status-high, .security-status.status-critical, .security-status.status-revoke { color: #b73c49; background: #ffebee; }
.security-status.status-low, .security-status.status-open { color: #426db8; background: #ebf2ff; }
.security-status.status-muted, .security-status.status-dismissed { color: #7d8796; background: #eef1f5; }
.security-filters { display: flex; gap: 7px; }
.security-filters select { width: 155px; height: 34px; font-size: 9px; }
.security-event-list { display: grid; gap: 8px; }
.security-event-list article { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 11px; padding: 12px; border: 1px solid #e7ebf1; border-left: 4px solid #7c9bdc; border-radius: 9px; }
.security-event-list article.severity-critical { border-left-color: #cf3f4d; background: #fffafb; }
.security-event-list article.severity-high { border-left-color: #df7650; }
.security-event-list article.severity-medium { border-left-color: #dda23f; }
.security-event-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: #b5741a; font-size: 20px; background: #fff3df; }
.severity-critical .security-event-icon { color: #bf3a47; background: #ffebee; }
.security-event-list header { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.security-event-list header strong { margin-right: 4px; color: #35475f; font-size: 10px; }
.security-event-list p { margin: 4px 0 3px; color: #647188; font-size: 9px; }
.security-event-list small { color: #8b96a6; font-size: 8px; }
.security-event-list em { display: block; margin-top: 5px; color: #52705f; font-size: 8px; font-style: normal; }
.security-event-actions { display: flex; align-items: center; gap: 5px; }
.security-switch { display: flex; align-items: center; gap: 7px; color: #647187; font-size: 9px; }
.security-switch input { display: none; }
.security-switch span { position: relative; width: 34px; height: 19px; border-radius: 99px; background: #cfd6e0; }
.security-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: .2s; }
.security-switch input:checked + span { background: #45a46f; }
.security-switch input:checked + span::after { transform: translateX(15px); }
.security-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.security-review-grid > article { padding: 13px; border: 1px solid #e5eaf1; border-radius: 10px; }
.security-review-grid header { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.security-review-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: #526fca; font-size: 18px; background: #edf2ff; }
.security-review-grid h4 { margin: 0; color: #394b64; font-size: 10px; }
.security-review-grid small { color: #8994a5; font-size: 8px; }
.security-review-progress { height: 6px; margin: 12px 0 9px; overflow: hidden; border-radius: 99px; background: #e8ecf2; }
.security-review-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4b82ea, #42a870); }
.security-review-grid footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.security-review-detail { margin-top: 18px; padding-top: 16px; border-top: 1px solid #e4e9f0; }
.security-review-actions { display: flex; gap: 4px; }
.security-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.security-control-grid article { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid #e5eaf1; border-radius: 9px; }
.security-control-grid article > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; font-size: 20px; }
.security-control-grid h4 { margin: 0 0 3px; color: #3a4d66; font-size: 10px; }
.security-control-grid p { margin: 0; color: #8290a3; font-size: 8px; }
.security-control-grid strong { font-size: 8px; text-transform: uppercase; }
.security-control-grid .control-pass > span, .security-control-grid .control-pass > strong { color: #24805a; }
.security-control-grid .control-pass > span { background: #e9f8ef; }
.security-control-grid .control-warning > span, .security-control-grid .control-warning > strong { color: #a76b19; }
.security-control-grid .control-warning > span { background: #fff3df; }
.security-control-grid .control-fail > span, .security-control-grid .control-fail > strong { color: #b83d49; }
.security-control-grid .control-fail > span { background: #ffebee; }
.security-seal-list { display: grid; gap: 7px; }
.security-seal-list article { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e6eaf1; border-radius: 9px; }
.security-seal-list article > i { color: #4b75c8; font-size: 21px; }
.security-seal-list strong, .security-seal-list small, .security-seal-list code { display: block; }
.security-seal-list strong { color: #40516a; font-size: 9px; }
.security-seal-list small { color: #8994a4; font-size: 8px; }
.security-seal-list code { max-width: 600px; overflow: hidden; color: #637289; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.security-policy-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.security-policy-form label { margin: 0; color: #56657b; font-size: 9px; font-weight: 700; }
.security-policy-form input, .security-policy-form textarea { margin-top: 5px; font-size: 10px; }
.security-policy-form small { display: block; margin-top: 4px; color: #8995a6; font-size: 8px; font-weight: 400; }
.security-policy-wide { grid-column: 1 / -1; }
.security-policy-form footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid #e8ecf2; color: #8792a2; font-size: 8px; }
.security-empty { display: grid; place-items: center; min-height: 120px; color: #8994a5; text-align: center; }
.security-empty i { color: #6c90dd; font-size: 28px; }
.security-empty p { margin: 5px 0 0; font-size: 10px; }

@media (max-width: 1100px) {
    .security-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .security-policy-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .security-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .security-self-card { grid-template-columns: 46px minmax(180px, 1fr) auto; }
    .security-self-card > button { grid-row: 2; }
}
@media (max-width: 767px) {
    .security-hero, .security-panel-head { align-items: flex-start; flex-direction: column; }
    .security-hero-actions, .security-hero-actions .btn { width: 100%; }
    .security-self-card { grid-template-columns: 42px minmax(0, 1fr); }
    .security-self-badges, .security-self-card > button { grid-column: 1 / -1; width: 100%; }
    .security-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .security-self-grid, .security-control-grid, .security-review-grid, .security-policy-form { grid-template-columns: 1fr; }
    .security-policy-wide, .security-policy-form footer { grid-column: 1; }
    .security-filters { width: 100%; }
    .security-filters select { width: 50%; }
    .security-event-list article { grid-template-columns: 34px minmax(0, 1fr); }
    .security-event-actions { grid-column: 2; }
}

/* Checklist template manager */
.checklist-page-title { align-items: center; display: flex; justify-content: space-between; gap: 20px; }
.checklist-page-title p { margin-bottom: 0; }
.checklist-flow-guide { align-items: center; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; margin-bottom: 20px; padding: 18px 22px; border: 1px solid #dfe7f3; border-radius: 13px; background: linear-gradient(135deg, #f8fbff, #fffaf6); }
.checklist-flow-guide > div { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center; }
.checklist-flow-guide > div > span { align-items: center; align-self: start; display: inline-flex; grid-row: 1 / 3; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #4b83f0; color: #fff; font-weight: 700; }
.checklist-flow-guide strong { color: #263653; font-size: 13px; }
.checklist-flow-guide small { color: #7d899b; font-size: 10px; line-height: 1.45; }
.checklist-flow-guide > i { color: #f08a3c; font-size: 21px; }
.checklist-library-heading { align-items: flex-end; }
.checklist-library-heading p { margin: 5px 0 0; color: #7d899b; font-size: 11px; }
.checklist-library-filters { align-items: center; display: flex; gap: 10px; }
.checklist-library-filters label { align-items: center; display: flex; min-width: 240px; margin: 0; padding: 0 11px; border: 1px solid #dfe5ee; border-radius: 8px; background: #fff; }
.checklist-library-filters label i { color: #608be5; }
.checklist-library-filters input { width: 100%; padding: 9px; border: 0; outline: 0; font-size: 11px; }
.checklist-library-filters select { width: 130px; height: 36px; font-size: 11px; }
.checklist-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; min-height: 180px; }
.checklist-template-grid > .visual-empty, .checklist-template-grid > .visual-loading { grid-column: 1 / -1; }
.checklist-template-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid #dfe6f1; border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(35, 54, 88, .05); }
.checklist-template-card.is-inactive { opacity: .68; background: #fafbfc; }
.checklist-template-card > header { align-items: center; display: flex; justify-content: space-between; gap: 10px; padding: 14px 16px 8px; }
.checklist-type-chip { align-items: center; display: inline-flex; gap: 6px; color: #416fca; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.checklist-state { padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; }
.checklist-state.is-active { background: #eaf7e5; color: #438330; }
.checklist-state.is-inactive { background: #f0f1f4; color: #747d8c; }
.checklist-template-card-title { align-items: flex-start; display: flex; justify-content: space-between; gap: 10px; padding: 5px 16px 13px; border-bottom: 1px solid #edf0f5; }
.checklist-template-card-title h4 { margin: 0 0 3px; color: #263653; font-size: 15px; line-height: 1.35; }
.checklist-template-card-title small { color: #8a94a3; font-size: 10px; }
.checklist-default-badge { flex: 0 0 auto; padding: 4px 7px; border-radius: 7px; background: #fff2df; color: #bd6b21; font-size: 8px; font-weight: 700; }
.checklist-template-card ol { flex: 1; margin: 0; padding: 13px 16px 13px 42px; }
.checklist-template-card li { padding: 6px 0 6px 3px; color: #34445f; font-size: 11px; }
.checklist-template-card li::marker { color: #4b83f0; font-weight: 700; }
.checklist-template-card li span, .checklist-template-card li small { display: block; }
.checklist-template-card li small { margin-top: 2px; color: #8a94a3; font-size: 9px; line-height: 1.4; }
.checklist-template-card > footer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #edf0f5; background: #fafbfe; }
.checklist-template-card > footer .btn { flex: 1; font-size: 10px; }
.checklist-template-form-body { max-height: calc(100vh - 190px); overflow-y: auto; }
.checklist-items-editor-heading { align-items: center; display: flex; justify-content: space-between; gap: 15px; margin: 6px 0 12px; padding-top: 14px; border-top: 1px solid #e9edf3; }
.checklist-items-editor-heading h5 { margin: 2px 0 0; color: #263653; }
.checklist-items-editor { display: grid; gap: 10px; }
.checklist-item-editor { align-items: stretch; display: grid; grid-template-columns: 42px minmax(0, 1fr) 38px; gap: 11px; padding: 13px; border: 1px solid #e2e8f1; border-radius: 10px; background: #f9fbfe; }
.checklist-item-order { align-items: center; display: flex; flex-direction: column; gap: 4px; }
.checklist-item-number { align-items: center; display: inline-flex; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #4b83f0; color: #fff; font-weight: 700; }
.checklist-item-order button, .checklist-item-remove { width: 28px; height: 25px; padding: 0; border: 1px solid #dce3ed; border-radius: 6px; background: #fff; color: #6c7c93; }
.checklist-item-order button:disabled, .checklist-item-remove:disabled { cursor: not-allowed; opacity: .35; }
.checklist-item-fields { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; }
.checklist-item-fields .form-group { margin-bottom: 0; }
.checklist-item-fields label { color: #56657b; font-size: 10px; font-weight: 600; }
.checklist-item-fields .form-control { font-size: 11px; }
.checklist-item-options { align-items: center; display: flex; grid-column: 1 / -1; gap: 18px; }
.checklist-item-options > label:first-child { align-items: center; display: flex; gap: 8px; margin: 0; }
.checklist-item-days { width: 110px; }
.checklist-required-option { align-items: center; display: inline-flex; gap: 7px; margin: 0; }
.checklist-required-option input { accent-color: #4b83f0; }
.checklist-item-remove { align-self: center; color: #d44a4a; }
.checklist-form-note { margin-right: auto; color: #7f8a9b; font-size: 10px; }
.checklist-heading-actions { align-items: center; display: flex; gap: 12px; }
.checklist-heading-actions .btn { white-space: nowrap; }
.case-template-picker { margin: 0 0 16px; padding: 15px; border: 1px solid #cfdcf2; border-radius: 10px; background: #f7faff; }
.case-template-picker-heading { align-items: flex-start; display: flex; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.case-template-picker-heading h5 { margin: 3px 0; color: #263653; }
.case-template-picker-heading p { margin: 0; color: #7e8999; font-size: 10px; }
.case-template-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.case-template-options > label { align-items: flex-start; display: flex; gap: 9px; margin: 0; padding: 11px; border: 1px solid #dde5f1; border-radius: 9px; background: #fff; cursor: pointer; }
.case-template-options > label:has(input:checked) { border-color: #6e98eb; background: #f1f6ff; box-shadow: 0 0 0 1px rgba(75, 131, 240, .12); }
.case-template-options input { margin-top: 3px; accent-color: #4b83f0; }
.case-template-options span, .case-template-options small { display: block; }
.case-template-options strong { color: #30415f; font-size: 11px; }
.case-template-options small { margin-top: 2px; color: #7d899b; font-size: 9px; }
.case-template-picker-footer { align-items: center; display: flex; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.case-template-picker-error { margin-right: auto; color: #d43f3f; font-size: 10px; }
.case-checklist-template-field .multi-select-option span { align-items: center; display: flex; justify-content: space-between; width: 100%; }

@media (max-width: 1100px) {
    .checklist-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .checklist-flow-guide { grid-template-columns: 1fr; }
    .checklist-flow-guide > i { display: none; }
}
@media (max-width: 767px) {
    .checklist-page-title, .checklist-library-heading, .checklist-heading { align-items: stretch; flex-direction: column; }
    .checklist-page-title .btn { width: 100%; }
    .checklist-library-filters { align-items: stretch; flex-direction: column; width: 100%; }
    .checklist-library-filters label, .checklist-library-filters select { width: 100%; min-width: 0; }
    .checklist-template-grid { grid-template-columns: 1fr; }
    .checklist-item-editor { grid-template-columns: 34px minmax(0, 1fr) 30px; gap: 7px; padding: 10px; }
    .checklist-item-fields { grid-template-columns: 1fr; }
    .checklist-item-options { align-items: flex-start; flex-direction: column; grid-column: 1; gap: 10px; }
    .checklist-heading-actions { align-items: stretch; flex-direction: column; }
    .case-template-picker-heading { flex-direction: column; }
    .case-template-options { grid-template-columns: 1fr; }
    .case-template-picker-footer { align-items: stretch; flex-direction: column; }
}
/* Usuarios: alta breve y perfiles de acceso configurables. */
.user-access-summary > div {
    display: grid;
    gap: 4px;
    margin: -4px 0 14px;
    padding: 12px 14px;
    border: 1px solid #dfe5f0;
    border-radius: 8px;
    background: #f7f9fd;
}

.user-access-summary strong { color: #26344d; }
.user-access-summary small,
.user-access-summary span { color: #6e788d; font-size: 12px; }
.user-access-summary .user-access-warning { color: #9a541f; }

#access-profile-config-modal .modal-dialog {
    display: flex;
    width: min(1580px, calc(100% - 12px));
    max-width: 1580px;
    height: calc(100vh - 12px);
    max-height: calc(100vh - 12px);
    margin: 6px auto;
    align-items: stretch;
}

#access-profile-config-modal .modal-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: calc(100vh - 12px);
    overflow: hidden;
}

#access-profile-config-modal .modal-header {
    flex: 0 0 auto;
    padding: 15px 20px;
}
#access-profile-config-modal .modal-header .modal-title { font-size: 21px; }
#access-profile-config-modal .modal-header .modal-subtitle { margin-top: 3px; font-size: 11px; }
#access-profile-config-modal form {
    display: grid;
    flex: 1 1 0;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 0;
    min-height: 0;
    overflow: hidden;
}
#access-profile-config-modal .modal-body {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
#access-profile-config-modal .modal-footer {
    display: flex;
    flex: 0 0 auto;
    padding: 10px 20px;
}

.access-profile-matrix-body {
    gap: 10px;
    padding: 12px 16px !important;
}
.access-profile-matrix-summary {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.access-profile-matrix-summary span,
.access-profile-matrix-summary small {
    padding: 5px 9px;
    border-radius: 14px;
    color: #516078;
    font-size: 12px;
    background: #f1f5fb;
}
.access-profile-matrix-summary i { margin-right: 4px; color: #477bd5; }
.access-profile-matrix-summary small { margin-left: auto; background: #f7f7f8; color: #7b8493; }
.access-profile-matrix-body .alert { flex: 0 0 auto; margin: 0; padding: 8px 12px; }

.access-profile-matrix-shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #dce3ed;
    border-radius: 9px;
    background: #fff;
}
.access-profile-matrix {
    width: 100%;
    min-width: 820px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}
.access-profile-matrix th,
.access-profile-matrix td {
    padding: 7px 9px;
    border-right: 1px solid #e2e7ef;
    border-bottom: 1px solid #e6eaf1;
    vertical-align: middle;
}
.access-profile-matrix tr > :last-child { border-right: 0; }
.access-profile-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    height: 58px;
    color: #334158;
    text-align: center;
    background: #eef3fb;
    box-shadow: 0 1px 0 #d7dfeb;
}
.access-profile-matrix thead th:first-child { width: 15%; text-align: left; }
.access-profile-matrix thead th:first-child { left: 0; z-index: 7; }
.access-profile-matrix thead th:nth-child(2) { width: 41%; text-align: left; }
.access-profile-matrix thead th:nth-child(n+3) { width: 11%; }
.access-profile-matrix thead th strong,
.access-profile-matrix thead th span,
.access-profile-matrix thead th small { display: block; }
.access-profile-matrix thead th strong { font-size: 14px; }
.access-profile-matrix thead th span { color: #56647b; font-size: 11px; }
.access-profile-matrix thead th small { margin-top: 1px; color: #278556; font-size: 10px; }
.access-profile-matrix thead th.is-readonly small { color: #8a94a3; }

.access-profile-section {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 15%;
    color: #283852;
    background: #f6f8fc;
    vertical-align: top !important;
}
.access-profile-section strong,
.access-profile-section small { display: block; }
.access-profile-section strong { font-size: 13px; }
.access-profile-section small { margin-top: 3px; color: #7b879a; font-size: 10px; font-weight: 500; }
.access-profile-subsection { width: 41%; background: #fff; }
.access-profile-subsection strong,
.access-profile-subsection small { display: block; }
.access-profile-subsection strong { color: #3d4a5f; font-size: 13px; font-weight: 600; line-height: 1.25; }
.access-profile-subsection small { margin-top: 2px; color: #7f8a9b; font-size: 10px; line-height: 1.2; }
.access-profile-level-cell { width: 11%; padding: 5px 8px !important; text-align: center; background: #fff; }
.access-profile-level-cell.is-readonly { background: #fafbfc; }
.access-profile-level-cell label {
    position: relative;
    display: inline-grid;
    width: 32px;
    height: 32px;
    margin: 0;
    cursor: pointer;
    place-items: center;
}
.access-profile-level-cell input {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    margin: -1px 0 0 -1px;
    opacity: 0;
    pointer-events: none;
}
.access-profile-level-cell label span {
    display: grid;
    width: 21px;
    height: 21px;
    border: 1px solid #aeb9c8;
    border-radius: 4px;
    color: transparent;
    background: #fff;
    place-items: center;
    transition: .15s ease;
    pointer-events: none;
}
.access-profile-level-cell label:hover span { border-color: #4b83f0; box-shadow: 0 0 0 3px rgba(75,131,240,.12); }
.access-profile-level-cell input:focus-visible + span { outline: 2px solid #80a8ee; outline-offset: 2px; }
.access-profile-level-cell input:checked + span { border-color: #4b83f0; color: #fff; background: #4b83f0; }
.access-profile-level-cell input:disabled + span { border-color: #d4dae3; color: transparent; background: #edf0f4; }
.access-profile-level-cell input:disabled:checked + span { color: #7c8797; background: #dce2ea; }
.access-profile-level-cell label span i { font-size: 15px; }
.access-profile-change-count { margin-right: auto; color: #778195; font-size: 13px; }
.access-profile-change-count.has-changes { color: #2d6cc7; font-weight: 700; }

@media (max-width: 991px) {
    .access-profile-matrix-summary small { margin-left: 0; }
    .access-profile-matrix thead th:first-child,
    .access-profile-section { width: 135px; }
    .access-profile-matrix thead th:nth-child(2),
    .access-profile-subsection { width: 305px; }
    .access-profile-matrix thead th:nth-child(n+3),
    .access-profile-level-cell { width: 95px; }
}

@media (max-width: 640px) {
    #access-profile-config-modal .modal-dialog {
        width: calc(100% - 8px);
        height: calc(100vh - 8px);
        max-height: calc(100vh - 8px);
        margin: 4px auto;
    }
    #access-profile-config-modal .modal-content { max-height: calc(100vh - 8px); }
    #access-profile-config-modal .modal-header { padding: 12px 14px; }
    .access-profile-matrix-body { padding: 8px !important; }
    .access-profile-matrix-summary { display: none; }
    #access-profile-config-modal .modal-footer { padding: 8px 10px; }
}

/* Fase 1: consultas, evaluación previa y agenda de citas. */
.intake-page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:20px; }
.intake-page-head h2 { margin:3px 0 5px; color:#26344d; font-size:28px; }
.intake-page-head p { margin:0; color:#778196; }
.intake-head-actions { display:flex; gap:9px; flex-wrap:wrap; }
.intake-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.intake-metrics > div { position:relative; overflow:hidden; padding:17px 19px; border:1px solid #e0e6ef; border-radius:12px; background:#fff; box-shadow:0 5px 18px rgba(40,55,80,.05); }
.intake-metrics > div::before { position:absolute; top:0; left:0; width:4px; height:100%; content:""; background:#4b83f0; }
.intake-metrics > div:nth-child(2)::before { background:#ee8b23; }.intake-metrics > div:nth-child(3)::before { background:#d95362; }.intake-metrics > div:nth-child(4)::before { background:#36a269; }
.intake-metrics small,.intake-metrics strong { display:block; }.intake-metrics small { color:#7b8698; font-size:12px; }.intake-metrics strong { margin-top:3px; color:#25344e; font-size:27px; }
.intake-toolbar,.intake-agenda-title { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.intake-toolbar > div:last-child { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.intake-toolbar small,.intake-agenda-title small { color:#7a8597; }
.intake-search { display:flex; align-items:center; width:280px; height:38px; padding:0 11px; border:1px solid #d9e0eb; border-radius:7px; background:#fff; }
.intake-search i { margin-right:7px; color:#8a95a8; }.intake-search input { width:100%; border:0; outline:0; color:#344159; background:transparent; }
#intake-specialty-filter { width:210px; }
.intake-pipeline { display:grid; grid-template-columns:repeat(8,minmax(260px,1fr)); gap:12px; overflow-x:auto; padding:3px 2px 16px; scroll-snap-type:x proximity; }
.intake-column { min-height:270px; overflow:hidden; border:1px solid #e0e6ef; border-radius:11px; background:#f7f9fc; scroll-snap-align:start; }
.intake-column > header { display:flex; align-items:center; justify-content:space-between; padding:12px 13px; border-top:3px solid #4b83f0; color:#35435a; background:#fff; }
.intake-column > header span { font-size:12px; font-weight:700; text-transform:uppercase; }.intake-column > header b { min-width:24px; padding:3px 7px; border-radius:13px; color:#526078; font-size:11px; text-align:center; background:#edf1f7; }
.intake-column.status-appointment_pending > header { border-color:#27a5ba; }.intake-column.status-evaluation > header { border-color:#7768df; }.intake-column.status-documents_pending > header { border-color:#ee8b23; }.intake-column.status-proposal_sent > header { border-color:#d09a2a; }.intake-column.status-accepted > header { border-color:#36a269; }.intake-column.status-rejected > header { border-color:#d95362; }.intake-column.status-converted > header { border-color:#687386; }
.intake-column > div { display:grid; gap:10px; padding:10px; }
.intake-card { position:relative; padding:13px; border:1px solid #e1e6ee; border-radius:9px; background:#fff; box-shadow:0 3px 10px rgba(39,55,80,.05); }
.intake-card header { display:flex; align-items:center; justify-content:space-between; gap:10px; }.intake-card header strong { overflow:hidden; color:#283750; font-size:14px; text-overflow:ellipsis; white-space:nowrap; }.intake-card header small { color:#8b95a6; font-size:10px; }
.intake-card h5 { margin:9px 0; color:#4b586d; font-size:13px; font-weight:600; line-height:1.4; }
.intake-specialty-chips { display:flex; gap:5px; flex-wrap:wrap; }.intake-specialty-chips span { padding:3px 7px; border-radius:10px; color:#3e6dbb; font-size:10px; font-weight:700; background:#edf4ff; }.intake-specialty-chips .is-muted { color:#8a94a5; background:#f1f2f4; }
.intake-card dl { display:grid; gap:5px; margin:11px 0 0; }.intake-card dl div { display:grid; grid-template-columns:18px minmax(0,1fr); color:#6f7a8d; font-size:11px; }.intake-card dt { color:#94a1b4; }.intake-card dd { margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.intake-card .is-danger { color:#c44350; font-weight:700; }.intake-card .is-success { color:#288659; }
.intake-followup { margin:9px 0 0; padding-top:8px; border-top:1px dashed #e2e6ed; color:#a06425; font-size:10px; }
.intake-card-actions { display:flex; gap:6px; margin-top:11px; }.intake-card-actions button,.intake-card-actions a { display:grid; width:30px; height:28px; border:1px solid #dce3ee; border-radius:6px; color:#477bd2; background:#f8faff; place-items:center; cursor:pointer; }.intake-card-actions button:hover,.intake-card-actions a:hover { border-color:#4b83f0; color:#fff; background:#4b83f0; }
.intake-column-empty { margin:20px 8px; color:#929cad; font-size:12px; text-align:center; }
.intake-agenda-panel { margin-top:18px; }.intake-agenda { display:grid; gap:9px; }
.appointment-row { display:grid; grid-template-columns:72px minmax(0,1fr) 170px; align-items:center; gap:15px; padding:11px 14px; border:1px solid #e1e6ee; border-radius:10px; background:#fff; }
.appointment-date { display:grid; grid-template-columns:auto auto; align-items:baseline; justify-content:center; gap:4px; padding-right:13px; border-right:1px solid #e5e9f0; text-align:center; }.appointment-date strong { color:#315fa7; font-size:24px; }.appointment-date span { color:#6a7588; font-size:11px; text-transform:uppercase; }.appointment-date small { grid-column:1/-1; color:#8d97a6; }
.appointment-main header { display:flex; align-items:center; gap:8px; }.appointment-main header strong { color:#26364f; }.appointment-main h5 { margin:4px 0; color:#48566d; font-size:14px; }.appointment-main p { margin:0; color:#7c8798; font-size:11px; }
.appointment-payment { display:grid; justify-items:end; gap:5px; }.appointment-payment strong { color:#2e3d54; }.appointment-payment span { padding:3px 8px; border-radius:10px; font-size:10px; }.payment-paid { color:#278556; background:#e9f7ef; }.payment-pending { color:#a06425; background:#fff3df; }.payment-partial { color:#3769b7; background:#ecf3ff; }.payment-waived { color:#6d7583; background:#eff1f4; }
.intake-form-section { display:flex; align-items:baseline; gap:10px; margin:2px 0 13px; padding:9px 12px; border-left:3px solid #4b83f0; color:#30415c; background:#f3f7fd; }.intake-form-section span { font-weight:700; }.intake-form-section small { color:#778399; }
.appointment-availability { margin:0 0 12px; padding:9px 12px; border-radius:7px; font-size:12px; }.appointment-availability.is-available { color:#257a50; background:#e9f7ef; }.appointment-availability.is-busy { color:#b33e49; background:#fdecee; }
.appointment-types-list { display:grid; gap:8px; margin-bottom:18px; }.appointment-types-list article { display:grid; grid-template-columns:minmax(0,1fr) 80px 100px auto auto auto; align-items:center; gap:9px; padding:10px 12px; border:1px solid #e0e5ed; border-radius:8px; }.appointment-types-list article.is-inactive { opacity:.58; background:#f5f6f8; }.appointment-types-list strong,.appointment-types-list small { display:block; }.appointment-types-list strong { color:#334158; }.appointment-types-list small { color:#808a9a; font-size:11px; }
.appointment-type-form { display:grid; grid-template-columns:1.4fr .7fr .7fr .5fr; align-items:end; gap:9px; padding-top:15px; border-top:1px solid #e1e5ec; }.appointment-type-form label { font-size:11px; font-weight:700; }.appointment-type-description { grid-column:1/-2; }.appointment-type-form > button { grid-column:-2/-1; }

@media (max-width:991px) { .intake-page-head,.intake-toolbar,.intake-agenda-title { align-items:stretch; flex-direction:column; }.intake-metrics { grid-template-columns:repeat(2,1fr); }.intake-toolbar > div:last-child,.intake-search,#intake-specialty-filter { width:100%; }.appointment-row { grid-template-columns:65px minmax(0,1fr); }.appointment-payment { grid-column:2; justify-items:start; }.appointment-type-form { grid-template-columns:repeat(2,1fr); }.appointment-type-description,.appointment-type-form > button { grid-column:auto; } }
@media (max-width:575px) { .intake-metrics { grid-template-columns:1fr; }.intake-head-actions { display:grid; }.appointment-row { grid-template-columns:1fr; }.appointment-date { grid-template-columns:auto auto auto; justify-content:start; border-right:0; border-bottom:1px solid #e5e9f0; }.appointment-date small { grid-column:auto; }.appointment-payment { grid-column:1; justify-items:start; }.appointment-types-list article { grid-template-columns:1fr auto; }.appointment-types-list article > span,.appointment-types-list article > b { display:none; }.appointment-type-form { grid-template-columns:1fr; } }

/* Fase 2: centro de correo Microsoft 365. */
.email-page { height:calc(100vh - 100px); padding-bottom:15px; }
.email-head { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-bottom:16px; }
.email-head h2 { margin:2px 0 4px; color:#25344d; font-size:28px; }.email-head p { margin:0; color:#778297; }.email-head > div:last-child { display:flex; gap:8px; flex-wrap:wrap; }
.email-layout { display:grid; grid-template-columns:210px minmax(300px,420px) minmax(440px,1fr); height:calc(100% - 90px); min-height:580px; overflow:hidden; border:1px solid #dde4ee; border-radius:12px; background:#fff; box-shadow:0 7px 24px rgba(38,52,77,.06); }
.email-sidebar { padding:14px; border-right:1px solid #e3e8f0; background:#f8fafd; }.email-sidebar select { margin-bottom:14px; }
#email-folders { display:grid; gap:4px; }#email-folders button { display:flex; align-items:center; gap:10px; padding:10px 11px; border:0; border-radius:7px; color:#526078; text-align:left; background:transparent; cursor:pointer; }#email-folders button:hover,#email-folders button.active { color:#2f67bd; background:#eaf2ff; }#email-folders i { width:17px; font-size:18px; text-align:center; }
.email-inbox { display:flex; min-width:0; flex-direction:column; border-right:1px solid #e3e8f0; }.email-toolbar { display:flex; align-items:center; gap:10px; padding:11px; border-bottom:1px solid #e3e8f0; flex-wrap:wrap; }.email-toolbar label:first-child { display:flex; min-width:170px; flex:1; align-items:center; gap:7px; padding:7px 9px; border:1px solid #dbe2ec; border-radius:7px; }.email-toolbar input { border:0; outline:0; background:transparent; }.email-toolbar label:not(:first-child) { margin:0; color:#707b8d; font-size:10px; white-space:nowrap; }
.email-list { overflow:auto; }.email-item { position:relative; display:grid; width:100%; grid-template-columns:36px minmax(0,1fr) auto; gap:9px; padding:13px 11px; border:0; border-bottom:1px solid #e8ecf2; color:#46536a; text-align:left; background:#fff; cursor:pointer; }.email-item:hover { background:#f5f8fd; }.email-item.unread { background:#f1f6ff; }.email-item.unread b { color:#275da9; }.email-avatar { display:grid; width:34px; height:34px; border-radius:50%; color:#fff; font-weight:700; background:#5b88d7; place-items:center; }.email-item span:nth-child(2) { min-width:0; }.email-item strong,.email-item b,.email-item small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.email-item strong { color:#344259; font-size:12px; }.email-item b { margin-top:2px; font-size:13px; }.email-item small { margin-top:3px; color:#8892a3; font-size:10px; }.email-item time { color:#8791a1; font-size:9px; }.email-item > i { position:absolute; right:10px; bottom:9px; }.email-item em { position:absolute; bottom:8px; left:56px; color:#b16a20; font-size:9px; font-style:normal; }
.email-detail { min-width:0; overflow:auto; }.email-empty { display:grid; min-height:220px; color:#929daf; text-align:center; place-items:center; align-content:center; }.email-empty i { font-size:42px; }.email-detail-head { padding:20px 22px 14px; border-bottom:1px solid #e6eaf0; }.email-detail-head > span { color:#4e79be; font-size:10px; font-weight:700; text-transform:uppercase; }.email-detail-head h3 { margin:6px 0; color:#293850; font-size:21px; }.email-detail-head p,.email-detail-head small { margin:0; color:#758094; font-size:11px; }.email-detail-actions { display:flex; gap:6px; padding:10px 22px; flex-wrap:wrap; }.email-body { min-height:150px; padding:18px 22px; overflow:auto; color:#3e4b60; font-size:13px; line-height:1.6; }.email-body img { max-width:100%; }.email-body table { max-width:100%; border-collapse:collapse; }.email-body td,.email-body th { padding:4px; border:1px solid #dfe4ec; }
.email-ai { margin:4px 22px 8px; padding:12px 14px; border:1px solid #b9d5ff; border-radius:8px; color:#31557f; background:#f0f6ff; }.email-ai p { margin:5px 0; }.email-ai small { color:#657b96; }
.email-attachments { margin:5px 22px 15px; padding:13px; border-radius:9px; background:#f7f9fc; }.email-attachments h5 { margin:0 0 9px; color:#39485f; }.email-attachments > div { display:flex; align-items:center; gap:8px; padding:7px 0; border-top:1px solid #e3e8ef; }.email-attachments > div > span { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; }.email-attachments small { display:block; color:#8993a3; font-size:9px; }
.email-classify { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:15px 22px 24px; padding:14px; border:1px solid #e0e6ef; border-radius:9px; }.email-classify h5,.email-classify > small { grid-column:1/-1; }.email-classify h5 { margin:0 0 3px; color:#35445c; }.email-classify > button { justify-self:start; }.email-classify > small { color:#8a541d; }
.email-accounts-list { display:grid; gap:7px; max-height:250px; overflow:auto; }.email-accounts-list article { display:grid; grid-template-columns:minmax(190px,1fr) auto 135px auto auto auto; align-items:center; gap:8px; padding:10px; border:1px solid #dfe5ed; border-radius:8px; }.email-accounts-list article.is-inactive { opacity:.6; background:#f5f6f8; }.email-accounts-list strong,.email-accounts-list small,.email-accounts-list em { display:block; }.email-accounts-list small { color:#7e899a; font-size:10px; }.email-accounts-list em { max-width:500px; color:#b3404c; font-size:9px; font-style:normal; }.email-state { padding:4px 8px; border-radius:12px; color:#765c27; font-size:10px; background:#fff1cc; }.email-state.connected { color:#267a50; background:#e5f6ec; }.email-state.error,.email-state.reconnect_required { color:#b33f4c; background:#fdebed; }
@media (max-width:1200px) { .email-layout { grid-template-columns:175px 340px minmax(400px,1fr); }.email-classify { grid-template-columns:1fr; }.email-classify h5,.email-classify > small { grid-column:1; } }
@media (max-width:850px) { .email-page { height:auto; }.email-head { align-items:stretch; flex-direction:column; }.email-layout { grid-template-columns:1fr; height:auto; min-height:0; overflow:visible; }.email-sidebar,.email-inbox { border-right:0; border-bottom:1px solid #e3e8f0; }.email-sidebar { padding:10px; }#email-folders { display:flex; overflow:auto; }.email-inbox { max-height:480px; }.email-detail { min-height:420px; }.email-accounts-list article { grid-template-columns:1fr auto; } }

/* Fase 3: centro de gestión judicial */
.judicial-page{padding:24px 30px 45px}.judicial-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.judicial-head h2{margin:3px 0 4px;color:#1d2d44;font-size:29px}.judicial-head p{margin:0;color:#758197}.judicial-head .eyebrow{color:#e87832;font-weight:700;text-transform:uppercase;letter-spacing:.08em;font-size:11px}.judicial-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.judicial-metrics article{background:#fff;border:1px solid #e6eaf0;border-radius:12px;padding:16px 18px;box-shadow:0 3px 14px rgba(37,54,75,.04);display:flex;align-items:center;justify-content:space-between}.judicial-metrics span{color:#6f7d90;font-size:13px}.judicial-metrics strong{font-size:26px;color:#22334b}.judicial-tabs{display:flex;gap:4px;background:#edf1f6;padding:5px;border-radius:11px;margin-bottom:12px;overflow:auto}.judicial-tabs button{border:0;background:transparent;border-radius:8px;padding:10px 18px;color:#607086;font-weight:700;white-space:nowrap;cursor:pointer}.judicial-tabs button.active{background:#fff;color:#e87832;box-shadow:0 2px 8px rgba(38,52,73,.09)}.judicial-toolbar{display:grid;grid-template-columns:minmax(230px,1.5fr) minmax(170px,.7fr) minmax(250px,1fr) auto;gap:10px;background:#fff;padding:12px;border:1px solid #e6eaf0;border-radius:10px;margin-bottom:12px}.judicial-toolbar label{display:flex;align-items:center;border:1px solid #dbe1ea;border-radius:5px;padding:0 11px;color:#9aa4b2}.judicial-toolbar input{border:0;outline:0;width:100%;padding:9px}.judicial-list{display:grid;gap:12px}.judicial-card{display:flex;justify-content:space-between;gap:20px;background:#fff;border:1px solid #e2e7ee;border-radius:12px;padding:18px 20px;box-shadow:0 3px 14px rgba(37,54,75,.035)}.judicial-card.is-current{border-left:4px solid #35a56f}.judicial-card-main{min-width:0;flex:1}.judicial-card-title{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.judicial-card-title h4{font-size:17px;margin:0;color:#203149}.judicial-source{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#4274a9;background:#edf5fe;padding:5px 8px;border-radius:6px}.judicial-status{font-size:11px;font-weight:700;padding:5px 9px;border-radius:999px;background:#eef1f5;color:#607086}.judicial-status.received,.judicial-status.draft{background:#eef1f5}.judicial-status.classified,.judicial-status.in_review{background:#e9f3ff;color:#2571b7}.judicial-status.assigned,.judicial-status.observed{background:#fff1dc;color:#a76004}.judicial-status.reviewed,.judicial-status.approved,.judicial-status.signed,.judicial-status.paid{background:#f0ebff;color:#6942a5}.judicial-status.attended,.judicial-status.presented{background:#e8f7ef;color:#238356}.judicial-card p{margin:10px 0;color:#5d697a}.judicial-meta{display:flex;gap:9px 18px;flex-wrap:wrap;color:#7b8798;font-size:12px}.judicial-meta i{margin-right:4px}.judicial-callout{margin-top:12px;border-left:3px solid #f08a49;background:#fff7f0;padding:9px 12px;color:#68452f;font-size:13px}.judicial-actions{width:235px;display:flex;align-content:flex-start;justify-content:flex-end;gap:6px;flex-wrap:wrap}.judicial-empty{text-align:center;background:#fff;border:1px dashed #ccd4df;border-radius:12px;padding:55px 20px;color:#8490a1}.judicial-empty i{font-size:42px;color:#f08a49}.judicial-flow{display:flex;gap:0;margin:14px 0}.judicial-flow span{flex:1;text-align:center;background:#eef1f5;color:#7b8798;padding:6px 3px;font-size:10px;border-right:2px solid #fff}.judicial-flow span:first-child{border-radius:6px 0 0 6px}.judicial-flow span:last-child{border-radius:0 6px 6px 0}.judicial-timeline article{display:flex;gap:14px;position:relative;padding-bottom:22px}.judicial-timeline article i{width:12px;height:12px;border-radius:50%;background:#ed8340;margin-top:5px;box-shadow:0 0 0 4px #ffede2}.judicial-timeline article:not(:last-child):before{content:"";position:absolute;left:5px;top:17px;bottom:0;border-left:2px solid #e2e7ee}.judicial-timeline article div{display:grid}.judicial-timeline small{color:#8b96a5}.judicial-timeline p{margin:4px 0 0}.judicial-page .modal-dialog{max-height:94vh}.judicial-page~.modal .modal-body{max-height:68vh;overflow:auto}
@media(max-width:1000px){.judicial-metrics{grid-template-columns:repeat(2,1fr)}.judicial-toolbar{grid-template-columns:1fr 1fr}.judicial-card{flex-direction:column}.judicial-actions{width:auto;justify-content:flex-start}}
@media(max-width:600px){.judicial-page{padding:16px}.judicial-head{align-items:stretch;flex-direction:column;gap:12px}.judicial-metrics,.judicial-toolbar{grid-template-columns:1fr}.judicial-card{padding:15px}.judicial-flow{overflow:auto}.judicial-flow span{min-width:80px}}

/* Fase 4: solicitudes y recepción segura de documentos */
.request-page{padding:24px 30px 45px}.request-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.request-head h2{margin:3px 0 4px;color:#1d2d44;font-size:29px}.request-head p{margin:0;color:#758197}.request-head .eyebrow{color:#e87832;font-weight:700;text-transform:uppercase;letter-spacing:.08em;font-size:11px}.request-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.request-metrics article{background:#fff;border:1px solid #e5eaf1;border-radius:12px;padding:17px 19px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 3px 14px rgba(37,54,75,.04)}.request-metrics span{color:#738094;font-size:13px}.request-metrics strong{font-size:27px;color:#22334b}.request-toolbar{display:grid;grid-template-columns:190px minmax(230px,1fr) minmax(260px,1fr) auto;gap:10px;background:#fff;border:1px solid #e5eaf1;border-radius:11px;padding:12px;margin-bottom:12px}.request-toolbar label{display:flex;align-items:center;border:1px solid #d9e0e9;border-radius:5px;padding:0 11px;color:#9aa4b2}.request-toolbar input{border:0;outline:0;width:100%;padding:9px}.request-list{display:grid;gap:12px}.request-card{background:#fff;border:1px solid #e3e8ef;border-radius:12px;padding:18px 20px;display:flex;gap:20px;justify-content:space-between}.request-card.is-overdue{border-left:4px solid #d95764}.request-card-main{min-width:0;flex:1}.request-title{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.request-title h4{margin:0;font-size:17px;color:#203149}.request-status{border-radius:999px;padding:5px 9px;font-size:10px;font-weight:800;text-transform:uppercase}.request-status.requested{background:#edf3fa;color:#4d6e92}.request-status.received{background:#e9f2ff;color:#2571b7}.request-status.observed{background:#fff0dc;color:#a66108}.request-status.approved{background:#e7f7ee;color:#238356}.request-overdue{background:#ffeaed;color:#b83040;font-size:10px;padding:5px 8px;border-radius:6px}.request-card p{margin:10px 0;color:#647186}.request-meta{display:flex;gap:9px 18px;flex-wrap:wrap;color:#7c8798;font-size:12px}.request-note,.request-review{margin-top:11px;padding:9px 12px;background:#f6f8fb;border-radius:7px;color:#566377;font-size:13px}.request-review{background:#fff8ef;border-left:3px solid #ef8948}.request-actions{display:flex;width:260px;justify-content:flex-end;align-content:flex-start;gap:6px;flex-wrap:wrap}.request-empty{text-align:center;padding:55px;background:#fff;border:1px dashed #cbd4df;border-radius:12px;color:#7c8898}.request-empty i{font-size:42px;color:#e97f3d}.request-target-switch{display:flex;gap:24px;padding:10px 12px;background:#f6f8fb;border-radius:7px}.request-link-days{position:relative}.request-link-days span{position:absolute;right:23px;top:36px;color:#8893a3}.request-link-box{display:flex;gap:8px}.request-link-box input{font-family:monospace;background:#f7f9fb}.public-upload-page{background:linear-gradient(135deg,#f5f7fb,#fff2e8);min-height:100vh;display:grid;place-items:center;padding:24px;color:#26364d}.public-upload-card{background:#fff;border:1px solid #e3e8ef;border-radius:18px;box-shadow:0 20px 55px rgba(33,49,72,.13);width:min(680px,100%);padding:30px}.public-upload-card>header{display:flex;gap:14px;align-items:center;border-bottom:1px solid #edf0f4;padding-bottom:20px;margin-bottom:22px}.public-upload-logo{display:grid;place-items:center;width:52px;height:52px;border-radius:14px;background:#f58a3c;color:#fff;font-weight:900;font-size:18px}.public-upload-card header small{color:#e87932;font-weight:700}.public-upload-card h1{font-size:23px;margin:2px 0}.public-upload-request>span{font-size:11px;text-transform:uppercase;color:#7c8898;font-weight:700}.public-upload-request h2{font-size:20px;margin:5px 0}.public-upload-request p{color:#69768a}.public-upload-request small{display:block;background:#fff7ef;color:#8e562f;padding:9px;border-radius:6px}.public-upload-drop{display:flex;flex-direction:column;align-items:center;text-align:center;border:2px dashed #bdc9d8;background:#f8fafc;padding:32px;margin:22px 0 10px;border-radius:12px;cursor:pointer}.public-upload-drop.dragover{border-color:#ef8642;background:#fff7f0}.public-upload-drop input{position:absolute;opacity:0;pointer-events:none}.public-upload-drop i{font-style:normal;font-size:30px;color:#ef8642}.public-upload-drop small{color:#8a95a5}.public-upload-file-name{min-height:25px;color:#41825e;margin-bottom:12px}.public-upload-security{text-align:center;font-size:11px;color:#8a95a5;margin:18px 0 0}
@media(max-width:900px){.request-metrics{grid-template-columns:repeat(2,1fr)}.request-toolbar{grid-template-columns:1fr 1fr}.request-card{flex-direction:column}.request-actions{width:auto;justify-content:flex-start}}
@media(max-width:600px){.request-page{padding:16px}.request-head{align-items:stretch;flex-direction:column;gap:12px}.request-metrics,.request-toolbar{grid-template-columns:1fr}.public-upload-card{padding:20px}.request-link-box{flex-direction:column}}
.portal-document-requests-row { margin-top: 18px; }
.portal-document-request { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border: 1px solid #e6eaf0; border-left: 4px solid #f58a3b; border-radius: 10px; background: #fff; margin-bottom: 10px; }
.portal-document-request.status-approved { border-left-color: #35a267; }
.portal-document-request.status-observed { border-left-color: #d14d5b; }
.portal-document-request > div { min-width: 0; }
.portal-document-request strong, .portal-document-request small { display: block; }
.portal-document-request small { color: #6f7887; margin-top: 4px; }
.portal-document-request p { margin: 8px 0 0; color: #485267; }
@media (max-width: 640px) { .portal-document-request { align-items: stretch; flex-direction: column; } }
.document-archive-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.document-archive-meta span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; background: #f1f4f8; color: #566174; font-size: 11px; }
.document-archive-meta span.is-protected { background: #fff1f2; color: #b63b4b; }

/* Fase 5: audiencias completas y recordatorios configurables. */
.hearing-agenda-item{align-items:flex-start}.hearing-agenda-meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}.hearing-agenda-meta span{padding:4px 8px;border-radius:999px;background:#f1f4f8;color:#5c687a;font-size:10px}.hearing-agenda-meta .is-confirmed{background:#e6f6ed;color:#257b50}.hearing-agenda-meta .is-pending{background:#fff2de;color:#a36008}.hearing-inline-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.hearing-inline-actions+.record-actions{margin-top:8px}
.reminder-rules-page{padding:24px 30px 45px}.reminder-rules-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:18px}.reminder-rules-head h2{margin:3px 0 4px;color:#1d2d44;font-size:29px}.reminder-rules-head p{margin:0;color:#758197}.reminder-rules-head .eyebrow{color:#e87832;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.reminder-recommended{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:13px 16px;margin-bottom:12px;border:1px solid #cfe4d7;border-radius:10px;color:#2c6f4b;background:#f1fbf5}.reminder-recommended span{padding:5px 9px;border-radius:999px;background:#dff3e7;font-size:11px;font-weight:700}.reminder-toolbar{display:flex;gap:9px;align-items:center;padding:12px;margin-bottom:12px;border:1px solid #e3e8ef;border-radius:10px;background:#fff}.reminder-toolbar select{max-width:260px}.reminder-rule-list{display:grid;gap:11px;margin-bottom:18px}.reminder-rule-card{display:grid;grid-template-columns:48px minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:16px 18px;border:1px solid #e2e7ee;border-radius:11px;background:#fff;box-shadow:0 3px 12px rgba(34,50,72,.035)}.reminder-rule-card.is-inactive{opacity:.65;background:#f7f8fa}.reminder-rule-icon{display:grid;width:44px;height:44px;border-radius:12px;color:#e87832;background:#fff0e6;font-size:21px;place-items:center}.reminder-rule-main>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.reminder-rule-main h4{margin:0;color:#26374f;font-size:16px}.reminder-rule-main>div>span{color:#4476b5;font-size:10px;font-weight:800;text-transform:uppercase}.reminder-rule-main p{margin:5px 0;color:#637084}.reminder-rule-main small,.reminder-rule-main em{display:block;color:#8a95a5;font-style:normal}.reminder-rule-main em{margin-top:5px;color:#a76018}.reminder-rule-actions{display:flex;gap:6px}.reminder-deliveries-panel{margin-top:18px}.reminder-deliveries-panel td small{display:block;color:#8a95a4}.reminder-deliveries-panel .status-failed{background:#feecef;color:#b43b4a}.reminder-deliveries-panel .status-sent{background:#e5f6ec;color:#287b51}.portal-hearing-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:7px}.portal-confirmed{color:#287d51;font-size:11px;font-style:normal;font-weight:700}
@media(max-width:800px){.reminder-rules-head{align-items:stretch;flex-direction:column}.reminder-toolbar{align-items:stretch;flex-direction:column}.reminder-toolbar select{max-width:none}.reminder-rule-card{grid-template-columns:45px 1fr}.reminder-rule-card>.status-chip,.reminder-rule-actions{grid-column:2}.reminder-rule-actions{justify-content:flex-start}}
@media(max-width:600px){.reminder-rules-page{padding:16px}.hearing-inline-actions{align-items:stretch;flex-direction:column}}

/* Fase 6: centro financiero. */
.finance-center{padding:24px 30px 45px}.finance-center-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.finance-center-head h2{margin:3px 0 4px;color:#1d2d44;font-size:29px}.finance-center-head p{margin:0;color:#758197}.finance-center-head .eyebrow{color:#e87832;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.finance-center-head>div:last-child{display:flex;gap:8px;flex-wrap:wrap}.finance-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:11px;margin-bottom:16px}.finance-metrics article{display:flex;align-items:center;gap:11px;padding:15px;border:1px solid #e3e8ef;border-radius:11px;background:#fff;box-shadow:0 3px 12px rgba(35,52,75,.035)}.finance-metrics i{display:grid;width:38px;height:38px;border-radius:10px;color:#e87832;background:#fff0e6;font-size:19px;place-items:center}.finance-metrics span,.finance-metrics small,.finance-metrics strong{display:block}.finance-metrics small{color:#7b8798;font-size:10px}.finance-metrics strong{color:#26364d;font-size:16px}.finance-tabs{display:flex;gap:4px;padding:5px;margin-bottom:11px;overflow:auto;border-radius:10px;background:#edf1f6}.finance-tabs button{padding:10px 16px;border:0;border-radius:7px;color:#637188;font-weight:700;white-space:nowrap;background:transparent;cursor:pointer}.finance-tabs button.active{color:#e87832;background:#fff;box-shadow:0 2px 8px rgba(35,52,75,.09)}.finance-toolbar{display:grid;grid-template-columns:240px 300px minmax(220px,1fr) auto;gap:9px;padding:11px;margin-bottom:11px;border:1px solid #e3e8ef;border-radius:10px;background:#fff}.finance-content{display:grid;gap:10px}.finance-row{display:grid;grid-template-columns:46px minmax(0,1fr) 190px auto;align-items:center;gap:14px;padding:15px 17px;border:1px solid #e2e7ee;border-radius:11px;background:#fff}.finance-row-icon{display:grid;width:42px;height:42px;border-radius:11px;color:#3479b8;background:#eaf4ff;font-size:20px;place-items:center}.finance-row-icon.expense{color:#b24452;background:#fdecef}.finance-row-main small{color:#7b8798}.finance-row-main h4{margin:3px 0;color:#26364d;font-size:16px}.finance-row-main p{margin:0;color:#758196;font-size:11px}.finance-amount{text-align:right}.finance-amount strong,.finance-amount small{display:block}.finance-amount strong{color:#26364d;font-size:16px}.finance-amount small{margin:2px 0 5px;color:#7c8797}.finance-row-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}.finance-empty{text-align:center;padding:55px;border:1px dashed #cbd4df;border-radius:12px;color:#8490a1;background:#fff}.finance-empty i{font-size:42px;color:#e87832}.portal-finance-row{margin-top:18px}.portal-finance-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}.portal-finance-summary article{padding:14px;border-radius:9px;background:#f5f8fc}.portal-finance-summary small,.portal-finance-summary strong{display:block}.portal-finance-summary small{color:#768195}.portal-finance-summary strong{margin-top:4px;color:#25364e;font-size:20px}
@media(max-width:1200px){.finance-metrics{grid-template-columns:repeat(3,1fr)}}@media(max-width:850px){.finance-center-head{align-items:stretch;flex-direction:column}.finance-toolbar{grid-template-columns:1fr 1fr}.finance-row{grid-template-columns:45px 1fr}.finance-amount,.finance-row-actions{grid-column:2;text-align:left;justify-content:flex-start}}@media(max-width:600px){.finance-center{padding:16px}.finance-metrics,.finance-toolbar,.portal-finance-summary{grid-template-columns:1fr}}

/* Fase 7: cierre, archivo y reapertura del expediente */
.closure-center{padding:24px 30px 45px}.closure-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.closure-head h2{margin:3px 0 4px;color:#1d2d44;font-size:29px}.closure-head p{margin:0;color:#758197}.closure-head .eyebrow{color:#e87832;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.closure-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:15px}.closure-metrics article{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid #e3e8ef;border-radius:11px;background:#fff;box-shadow:0 3px 12px rgba(35,52,75,.035)}.closure-metrics i{display:grid;width:39px;height:39px;place-items:center;border-radius:10px;color:#e87832;background:#fff0e6;font-size:20px}.closure-metrics small,.closure-metrics strong{display:block}.closure-metrics small{color:#7b8798}.closure-metrics strong{color:#26364d;font-size:21px}.closure-toolbar{display:grid;grid-template-columns:minmax(280px,1fr) 220px;gap:10px;padding:11px;margin-bottom:11px;border:1px solid #e3e8ef;border-radius:10px;background:#fff}.closure-toolbar label{display:flex;align-items:center;gap:8px;margin:0;padding:0 11px;border:1px solid #dfe4eb;border-radius:5px;color:#8b96a5}.closure-toolbar input{width:100%;padding:9px 0;border:0;outline:0}.closure-list{display:grid;gap:11px}.closure-card{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:14px;padding:17px 18px;border:1px solid #e1e6ed;border-left:4px solid #e3a04b;border-radius:11px;background:#fff}.closure-card.is-ready{border-left-color:#38a76e}.closure-card.is-closed{border-left-color:#59728e}.closure-card-icon{display:grid;width:40px;height:40px;place-items:center;border-radius:11px;color:#ac6a16;background:#fff4df;font-size:19px}.closure-card.is-ready .closure-card-icon{color:#27865a;background:#e9f8f0}.closure-card.is-closed .closure-card-icon{color:#4b617a;background:#ecf1f6}.closure-card-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.closure-card-title h4{margin:0;color:#26364d;font-size:16px}.closure-card-main p{margin:7px 0 3px;color:#68758a;font-size:12px}.closure-card-main small{color:#8490a1}.closure-readiness-chip{padding:4px 8px;border-radius:999px;font-size:10px;font-weight:800}.closure-readiness-chip.ready{color:#287d55;background:#e8f7ef}.closure-readiness-chip.blocked{color:#9c6217;background:#fff3df}.closure-summary{max-width:850px;margin-top:9px;padding:8px 10px;border-left:3px solid #71869c;color:#4f5d70;background:#f6f8fb;font-size:12px}.closure-actions{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap;max-width:390px}.closure-empty{text-align:center;padding:55px;border:1px dashed #cbd4df;border-radius:12px;color:#8490a1;background:#fff}.closure-empty i{font-size:42px;color:#e87832}.closure-readiness{margin-bottom:16px}.closure-check-summary{display:flex;align-items:center;justify-content:space-between;padding:11px 13px;border-radius:8px}.closure-check-summary.ready{color:#267d55;background:#eaf8f1}.closure-check-summary.blocked{color:#925b17;background:#fff3df}.closure-check-summary small{color:inherit}.closure-check-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px}.closure-check-grid article{display:flex;align-items:center;gap:9px;padding:10px;border:1px solid #e4e8ee;border-radius:8px}.closure-check-grid i{font-size:18px}.closure-check-grid span strong,.closure-check-grid span small{display:block}.closure-check-grid span small{color:#7b8798}.closure-check-grid .ok i{color:#2e9463}.closure-check-grid .blocking i{color:#d08322}.closure-check-grid .warning i{color:#407bb3}.closure-override{margin-top:13px;padding:12px;border:1px dashed #e2a052;border-radius:8px;background:#fffaf3}.closure-history article{position:relative;display:flex;gap:12px;padding:3px 0 23px}.closure-history article:not(:last-child):before{position:absolute;top:21px;bottom:1px;left:9px;border-left:2px solid #e2e7ee;content:""}.closure-history article>i{z-index:1;display:grid;width:20px;height:20px;place-items:center;border-radius:50%;color:#fff;background:#e88342;font-size:11px}.closure-history article div{display:grid}.closure-history small,.closure-history em{color:#7c8898;font-size:11px}.closure-history p{margin:5px 0}.portal-case.is-closed{border-left:4px solid #667d94}.portal-closure-summary{display:block;margin-top:8px;padding:9px;border-radius:7px;color:#566377;background:#f4f7fa;font-size:12px}.portal-closure-actions{display:flex;align-items:center;gap:8px;margin-top:8px}.portal-closure-confirmed{color:#2d875d;font-size:12px}
@media(max-width:1100px){.closure-metrics{grid-template-columns:repeat(3,1fr)}.closure-card{grid-template-columns:44px 1fr}.closure-actions{grid-column:2;justify-content:flex-start;max-width:none}.closure-check-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){.closure-center{padding:16px}.closure-head{align-items:stretch;flex-direction:column}.closure-metrics,.closure-toolbar,.closure-check-grid{grid-template-columns:1fr}.closure-card{grid-template-columns:1fr}.closure-card-icon{display:none}.closure-actions{grid-column:1}.closure-check-summary{align-items:flex-start;flex-direction:column;gap:5px}}

/* Fase 8: agenda conectada con Microsoft 365 */
.calendar-phase8-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}.calendar-phase8-head h2{margin:3px 0 4px;color:#1d2d44;font-size:29px}.calendar-phase8-head p{margin:0;color:#758197}.calendar-phase8-head .eyebrow,.calendar-conflicts .eyebrow{color:#e87832;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.calendar-sync-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;margin-bottom:15px}.calendar-sync-metrics article{display:flex;align-items:center;gap:11px;padding:14px 15px;border:1px solid #e3e8ef;border-radius:10px;background:#fff}.calendar-sync-metrics i{display:grid;width:37px;height:37px;place-items:center;border-radius:9px;color:#3479b8;background:#eaf4ff;font-size:18px}.calendar-sync-metrics small,.calendar-sync-metrics strong{display:block}.calendar-sync-metrics small{color:#7b8798;font-size:10px}.calendar-sync-metrics strong{color:#26364d;font-size:19px}.calendar-dot.external{background:#7357ba}.calendar-event.external{color:#6544ae;background:#f1ecfb}.calendar-agenda-type.external{color:#6544ae;background:#f1ecfb}.calendar-conflicts{margin-top:15px;padding:16px 18px;border:1px solid #efd7b8;border-radius:11px;background:#fffaf3}.calendar-conflicts header{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}.calendar-conflicts h4{margin:2px 0;color:#7f511a}.calendar-conflicts header small{color:#8e795f}.calendar-conflicts article{display:flex;gap:10px;padding:9px 0;border-top:1px solid #f2e2cd}.calendar-conflicts article>i{margin-top:3px;color:#d28324}.calendar-conflicts article strong,.calendar-conflicts article small{display:block}.calendar-conflicts article small{margin-top:2px;color:#8a7964}.calendar-config-list{display:grid;gap:8px}.calendar-config-row{display:grid;grid-template-columns:minmax(260px,1fr) auto 145px repeat(4,auto);align-items:center;gap:8px;padding:11px 13px;border:1px solid #e3e8ef;border-radius:9px}.calendar-config-row.is-inactive{opacity:.62}.calendar-config-row>div strong,.calendar-config-row>div small,.calendar-config-row>div em{display:block}.calendar-config-row>div small{color:#7d8898}.calendar-config-row>div em{color:#b64855;font-size:11px}.calendar-sync-state{padding:5px 8px;border-radius:999px;color:#637087;background:#eef1f5;font-size:10px;font-weight:800}.calendar-sync-state.connected{color:#278157;background:#e9f8f0}.calendar-sync-state.error{color:#ad3e4d;background:#fdecef}.calendar-sync-state.syncing{color:#2e6ead;background:#eaf4ff}.calendar-event-checks{display:flex;gap:20px;flex-wrap:wrap;padding:10px 12px;border:1px solid #e1e6ed;border-radius:7px;background:#f8fafc}.calendar-event-checks label{margin:0}.calendar-event-checks input{margin-right:5px}
@media(max-width:1100px){.calendar-sync-metrics{grid-template-columns:repeat(3,1fr)}.calendar-config-row{grid-template-columns:1fr auto}.calendar-config-row>button{justify-self:start}.calendar-conflicts header{align-items:flex-start;flex-direction:column;gap:4px}}@media(max-width:650px){.calendar-phase8-head{align-items:stretch;flex-direction:column}.calendar-sync-metrics{grid-template-columns:1fr}.calendar-config-row{grid-template-columns:1fr}.calendar-event-checks{flex-direction:column;gap:7px}}

/* Documentos: fila compacta, estados legibles y acciones secundarias plegables. */
.document-grid {
    gap: 10px;
}
.document-grid .document-card {
    display: grid;
    grid-template-columns: 48px minmax(240px, 1.25fr) minmax(205px, .8fr) minmax(185px, .65fr) 220px;
    align-items: center;
    gap: 14px;
    min-height: 0;
    padding: 13px 14px;
    overflow: visible;
}
.document-grid .document-card:hover {
    transform: translateY(-1px);
}
.document-grid .document-card > .document-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 11px;
}
.document-summary,
.document-processing {
    min-width: 0;
}
.document-grid .document-card-heading {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    justify-content: space-between;
}
.document-grid .document-card-heading > div {
    min-width: 0;
}
.document-grid .document-card-heading h4 {
    margin: 0 0 3px;
    overflow: hidden;
    color: #293750;
    font-size: 14px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.document-grid .document-card-heading p {
    margin: 0;
    color: #818da0;
    font-size: 10px;
}
.document-grid .document-review-badge {
    flex: 0 0 auto;
    padding: 4px 7px;
}
.document-grid .document-archive-meta {
    gap: 5px;
    margin: 8px 0 0;
}
.document-grid .document-archive-meta span {
    max-width: 170px;
    padding: 3px 7px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.document-processing {
    display: grid;
    gap: 6px;
}
.document-grid .document-index-status,
.document-grid .document-ai-status {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    margin: 0;
    padding: 7px 9px;
    border-radius: 7px;
}
.document-grid .document-index-status span,
.document-grid .document-ai-status > span {
    overflow: hidden;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.document-grid .document-index-status small {
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.document-grid .document-ai-status {
    position: relative;
    padding-left: 30px;
}
.document-grid .document-ai-status > i {
    position: absolute;
    top: 8px;
    left: 10px;
    font-size: 14px;
}
.document-grid .document-ai-inline {
    justify-self: start;
    margin-top: 2px;
    padding: 0;
    border: 0;
    color: inherit;
    font-size: 8px;
    font-weight: 700;
    background: transparent;
    cursor: pointer;
}
.document-grid .document-card > .document-card-meta {
    display: grid;
    align-content: center;
    align-items: start;
    justify-content: stretch;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 2px 14px;
    border-top: 0;
    border-right: 1px solid #e8edf4;
    border-bottom: 0;
    border-left: 1px solid #e8edf4;
    color: #7d899a;
    background: transparent;
    font-size: 9px;
}
.document-card-meta > span,
.document-card-meta > time {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.document-card-meta i {
    flex: 0 0 13px;
    color: #6e83a5;
    text-align: center;
}
.document-grid .document-download {
    justify-self: start;
    min-height: 28px;
    margin: 1px 0 0;
    padding: 5px 8px;
    border-radius: 6px;
    color: #3569c8;
    font-size: 9px;
    font-weight: 700;
    background: #edf4ff;
}
.document-grid .document-download:hover {
    color: #2859ad;
    background: #dfeaff;
    text-decoration: none;
}
.document-card > .document-record-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
    align-self: stretch;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.document-card > .document-record-actions > .btn {
    min-width: 0;
    min-height: 31px;
    padding: 5px 7px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.document-more-actions {
    grid-column: 1 / -1;
    min-width: 0;
}
.document-more-actions summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 29px;
    padding: 5px 8px;
    border: 1px solid #dce4ef;
    border-radius: 7px;
    color: #617086;
    font-size: 9px;
    font-weight: 700;
    background: #f8fafc;
    cursor: pointer;
    list-style: none;
}
.document-more-actions summary::-webkit-details-marker {
    display: none;
}
.document-more-actions[open] summary {
    border-color: #abc2e8;
    color: #3569c8;
    background: #eef4ff;
}
.document-more-actions > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-top: 6px;
}
.document-more-actions > div > .btn {
    min-width: 0;
    min-height: 29px;
    margin: 0;
    padding: 4px 6px;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.module-table .document-record-actions {
    min-width: 210px;
    margin: 0;
}
.module-table .document-record-actions > .btn {
    margin-bottom: 4px;
}

@media (max-width: 1199px) {
    .document-grid .document-card {
        grid-template-columns: 44px minmax(260px, 1fr) minmax(220px, .72fr);
    }
    .document-grid .document-card > .document-card-meta {
        grid-column: 2;
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: 8px 0 0;
        border: 0;
        border-top: 1px solid #e8edf4;
    }
    .document-card > .document-record-actions {
        grid-column: 3;
        grid-row: 2;
    }
}

@media (max-width: 767px) {
    .document-grid .document-card {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }
    .document-grid .document-card > .document-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        font-size: 18px;
    }
    .document-summary {
        grid-column: 2;
    }
    .document-processing,
    .document-grid .document-card > .document-card-meta,
    .document-card > .document-record-actions {
        grid-column: 1 / -1;
    }
    .document-grid .document-card > .document-card-meta {
        grid-template-columns: auto minmax(0, 1fr) auto;
        margin: 0;
        padding: 9px 0 0;
    }
    .document-card > .document-record-actions {
        grid-row: auto;
        margin: 0;
        padding: 0;
    }
}

@media (max-width: 480px) {
    .document-grid .document-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .document-grid .document-card > .document-card-meta {
        grid-template-columns: 1fr;
    }
    .document-card > .document-record-actions,
    .document-more-actions > div {
        grid-template-columns: 1fr;
    }
}
.document-origin-heading{grid-column:1/-1;margin:18px 0 0;padding:12px 16px;background:#f3f7f4;border-left:4px solid #3f6650;border-radius:7px;color:#304d3b;font-size:15px;font-weight:700}.document-origin-badge{display:inline-flex;align-items:center;width:max-content;padding:4px 8px;border-radius:999px;background:#edf5ef;color:#3b6649;font-size:11px;font-weight:700;line-height:1.3}.document-card-heading{align-items:flex-start;gap:8px}.document-card-heading>div{flex:1;min-width:0}
