:root {
    --expres-ink: #102f4c;
    --expres-muted: #587087;
    --expres-border: #d4dfe8;
    --expres-surface: #ffffff;
    --expres-page: #f3f6f8;
    --expres-soft: #eef3f6;
    --expres-green: #087f5b;
    --expres-green-dark: #066747;
    --expres-focus: #0b63ce;
}

.samai-expres__activity:empty { display: none; }

.samai-expres {
    background: var(--expres-page);
    color: var(--expres-ink);
    min-height: 36rem;
    padding: 1.5rem 0 2.5rem;
}

.samai-expres__workspace { display: grid; gap: 1.5rem; min-width: 0; }

.samai-expres__query,
.samai-expres__results {
    background: var(--expres-surface);
    border: 1px solid var(--expres-border);
    border-radius: .75rem;
    box-shadow: 0 .65rem 1.8rem rgba(16, 47, 76, .06);
    min-width: 0;
    padding: 1.5rem;
}

.samai-expres__query-heading,
.samai-expres__results-heading,
.samai-expres__section-heading {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.samai-expres__query-heading {
    border-bottom: 1px solid #e5ebf0;
    margin-bottom: 1.35rem;
    padding-bottom: 1.1rem;
}

.samai-expres__eyebrow {
    color: var(--expres-green);
    display: block;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .075em;
    margin-bottom: .25rem;
    text-transform: uppercase;
}

.samai-expres h1,
.samai-expres h2,
.samai-expres h3 { color: #0e2941; font-weight: 800; margin-top: 0; }
.samai-expres h1 { font-size: clamp(1.65rem, 3vw, 2.05rem); margin-bottom: .3rem; }
.samai-expres h2 { font-size: 1.25rem; margin-bottom: .25rem; }
.samai-expres h3 { font-size: 1rem; margin-bottom: .35rem; }
.samai-expres p { color: var(--expres-muted); margin-bottom: 0; }

.samai-expres__security {
    align-items: center;
    background: #edf8f3;
    border: 1px solid #c8e7da;
    border-radius: 999px;
    color: #075f45;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .78rem;
    font-weight: 700;
    gap: .45rem;
    padding: .5rem .75rem;
}

.samai-expres .form-label { color: #173854; font-size: .82rem; font-weight: 800; margin-bottom: .4rem; }
.samai-expres .form-control,
.samai-expres .form-select,
.samai-expres .input-group-text { border-color: #c9d7e2; }
.samai-expres .form-control:focus,
.samai-expres .form-select:focus,
.samai-expres .form-check-input:focus { border-color: var(--expres-focus); box-shadow: 0 0 0 .2rem rgba(11, 99, 206, .15); }

.samai-expres__type-row { align-items: center; display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.samai-expres__radio-options { align-items: center; display: flex; flex-wrap: wrap; gap: .55rem 1.2rem; }
.samai-expres__radio-options label,
.samai-expres__exact { align-items: center; color: #173854; cursor: pointer; display: inline-flex; font-size: .88rem; gap: .45rem; margin: 0; }
.samai-expres__exact { border-left: 1px solid var(--expres-border); padding-left: 1rem; }
.samai-expres__mobile-select { display: none; }

.samai-expres__primary-search {
    align-items: end;
    display: flex;
    gap: 1rem;
    margin-top: 1.15rem;
}

.samai-expres__criterion { flex: 1 1 42rem; max-width: 52rem; }
.samai-expres__criterion .input-group-text { background: #fff; color: #16486e; }
.samai-expres__search-button {
    align-items: center;
    background: var(--expres-green);
    border: 1px solid var(--expres-green);
    color: #fff;
    display: inline-flex;
    font-weight: 700;
    gap: .65rem;
    justify-content: center;
    min-height: 3rem;
    min-width: 8.5rem;
}
.samai-expres__search-button:hover,
.samai-expres__search-button:focus { background: var(--expres-green-dark); border-color: var(--expres-green-dark); color: #fff; }

.samai-expres__validation { margin: 1rem 0 0; }
.samai-expres__filters {
    display: grid;
    gap: 1rem;
    margin-top: .25rem;
}
.samai-expres__scope { min-width: 0; }
.samai-expres__scope .samai-expres__radio-options { flex-wrap: nowrap; }
.samai-expres__scope-fields { align-items: end; display: flex; flex-wrap: wrap; gap: 1rem; min-width: 0; }
.samai-expres__corporation-field { flex: 2 1 28rem; min-width: 0; }
.samai-expres__scope-field { flex: 1 1 16rem; min-width: 0; }

.samai-expres__filter-selector {
    border-top: 1px solid #e5ebf0;
    margin-top: 1.25rem;
    padding-top: 1.1rem;
}
.samai-expres__filter-options { align-items: center; display: flex; flex-wrap: wrap; gap: .55rem 1.2rem; }
.samai-expres__filter-options label {
    align-items: center;
    color: #173854;
    cursor: pointer;
    display: inline-flex;
    font-size: .88rem;
    gap: .45rem;
    margin: 0;
}

.samai-expres__advanced-grid {
    display: grid;
    gap: 1.15rem;
    margin-top: 1rem;
}
.samai-expres__filter-panel { align-items: start; display: grid; gap: 1rem; grid-template-columns: repeat(12, minmax(0, 1fr)); min-width: 0; }
.samai-expres__filter-panel[hidden] { display: none; }
.samai-expres__filter-panel--single > div { grid-column: 1 / -1; }
.samai-expres__filter-panel--internal > div:first-child { grid-column: span 4; }
.samai-expres__filter-panel--internal > div:last-child { grid-column: span 8; }
.samai-expres__filter-panel--party > div:first-child { grid-column: span 6; }
.samai-expres__filter-panel--party > div:nth-child(2) { grid-column: span 3; }
.samai-expres__filter-panel--party > div:last-child { grid-column: span 3; }
.samai-expres__filter-panel--dates > div { grid-column: span 6; }
.samai-expres__filter-panel--status > div { grid-column: span 4; }
.samai-expres__exact-field { align-self: end; }
.samai-expres__exact-field label { align-items: center; color: #173854; cursor: pointer; display: flex; font-size: .88rem; gap: .45rem; min-height: 2.35rem; }
.samai-expres__form-actions { align-items: center; border-top: 1px solid #e5ebf0; display: flex; gap: 1rem; justify-content: flex-end; margin-top: 1.25rem; padding-top: 1rem; }

.samai-expres__more-filters { border-top: 1px solid #e5ebf0; margin-top: 1.15rem; padding-top: .9rem; }
.samai-expres__more-filters summary { color: #172f45; cursor: pointer; font-size: .86rem; font-weight: 800; text-decoration: underline; text-underline-offset: .2rem; width: fit-content; }
.samai-expres__filter-grid { align-items: end; display: grid; gap: 1rem; grid-template-columns: repeat(4, minmax(10rem, 1fr)) auto; padding-top: 1rem; }
.samai-expres__clear { color: #172f45; font-size: .84rem; text-decoration: underline; text-underline-offset: .2rem; white-space: nowrap; }
.samai-expres__clear:hover { color: #000; }

.samai-expres__results-heading { align-items: center; border-bottom: 1px solid #e5ebf0; margin: -1.5rem -1.5rem 0; padding: 1rem 1.5rem; }
.samai-expres__report-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem .75rem; justify-content: flex-end; }
.samai-expres__report-actions .btn { align-items: center; display: inline-flex; font-size: .82rem; font-weight: 700; gap: .45rem; }
.samai-expres__export-status { color: #40576d; font-size: .82rem; max-width: 24rem; }
.samai-expres__export-status--error { color: #9f2d2d; }

.samai-expres__state { align-items: center; color: var(--expres-muted); display: flex; gap: .75rem; justify-content: center; min-height: 9rem; padding: 1.5rem; text-align: center; }
.samai-expres__state .spinner-border { color: var(--expres-green); height: 1.7rem; width: 1.7rem; }
.samai-expres__empty { flex-direction: column; }
.samai-expres__empty i { color: #7890a5; font-size: 2rem; }

.samai-expres__table { font-size: .82rem; margin-bottom: 0; table-layout: fixed; }
.samai-expres__table thead th { background: var(--expres-soft); border-bottom: 1px solid #cbd8e2; color: #173854; font-size: .72rem; font-weight: 800; letter-spacing: .02em; padding: .8rem .7rem; position: relative; text-align: center; vertical-align: middle; }
.samai-expres__table tbody td { border-color: #dde6ed; color: #2a4359; padding: .9rem .7rem; vertical-align: top; }
.samai-expres__table tbody tr:hover { background: #f8fafb; }
.samai-expres__table th:nth-child(1) { width: 27%; }
.samai-expres__table th:nth-child(2) { width: 25%; }
.samai-expres__table th:nth-child(3) { width: 29%; }
.samai-expres__table th:nth-child(4) { width: 7rem; }
.samai-expres__table th:last-child { width: 8.5rem; }
.samai-expres__select-column { width: 2.8rem; }
.samai-expres__docket { color: #0c3556; display: inline-block; font-size: .86rem; font-weight: 800; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: .18rem; }
.samai-expres__meta { color: var(--expres-muted); display: block; font-size: .73rem; line-height: 1.45; margin-top: .3rem; }
.samai-expres__meta strong { color: #2b465e; }
.samai-expres__party { display: block; line-height: 1.35; }
.samai-expres__party + .samai-expres__party { margin-top: .45rem; }
.samai-expres__activity-title { color: #173854; display: block; font-weight: 700; line-height: 1.35; }
.samai-expres__status { background: #eaf6f1; border-radius: 999px; color: #086347; display: inline-block; font-size: .72rem; font-weight: 800; padding: .3rem .55rem; white-space: nowrap; }
.samai-expres__status--archived { background: #edf0f3; color: #536779; }
.samai-expres__view { background: var(--expres-green); border-color: var(--expres-green); color: #fff; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.samai-expres__view:hover,
.samai-expres__view:focus { background: var(--expres-green-dark); border-color: var(--expres-green-dark); color: #fff; }

.samai-expres__pagination { align-items: center; border-top: 1px solid #e5ebf0; display: flex; gap: 1rem; justify-content: flex-end; margin-top: .85rem; padding-top: .9rem; }
.samai-expres__pagination span { color: #3c566c; font-size: .82rem; font-weight: 700; }
.samai-expres__pagination .btn { font-size: .8rem; font-weight: 700; }

.samai-expres__modal .modal-content { border: 0; border-radius: .75rem; overflow: hidden; }
.samai-expres__modal .modal-header { align-items: flex-start; background: #fff; border-bottom-color: var(--expres-border); padding: 1.1rem 1.4rem; }
.samai-expres__modal .modal-body { background: var(--expres-page); padding: 1.35rem; }
.samai-expres__detail-summary { background: #fff; border: 1px solid var(--expres-border); border-radius: .6rem; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; overflow: hidden; }
.samai-expres__detail-summary div { border-bottom: 1px solid #e2e9ef; min-width: 0; padding: .8rem 1rem; }
.samai-expres__detail-summary div:not(:nth-child(3n)) { border-right: 1px solid #e2e9ef; }
.samai-expres__detail-summary dt { color: #647b8f; font-size: .67rem; font-weight: 800; letter-spacing: .035em; margin-bottom: .2rem; text-transform: uppercase; }
.samai-expres__detail-summary dd { color: #173854; font-size: .85rem; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.samai-expres__detail-section { margin-top: 1.25rem; min-width: 0; }
.samai-expres__subjects { background: #fff; border: 1px solid var(--expres-border); border-radius: .6rem; overflow: hidden; }
.samai-expres__subject { align-items: start; display: grid; gap: .7rem; grid-template-columns: minmax(8rem, .65fr) minmax(14rem, 1.6fr) minmax(12rem, 1fr); padding: .75rem 1rem; }
.samai-expres__subject + .samai-expres__subject { border-top: 1px solid #e3eaf0; }
.samai-expres__subject span { color: var(--expres-muted); font-size: .78rem; }
.samai-expres__subject strong { color: #173854; }

.samai-expres__activities { display: grid; gap: .75rem; margin-top: .8rem; min-width: 0; }
.samai-expres__activity-card { background: #fff; border: 1px solid var(--expres-border); border-left: .24rem solid var(--expres-green); border-radius: .55rem; min-width: 0; padding: 1rem; }
.samai-expres__activity-head { align-items: start; display: flex; gap: .8rem; justify-content: space-between; min-width: 0; }
.samai-expres__activity-head strong { color: #173854; }
.samai-expres__activity-dates { color: var(--expres-muted); display: flex; flex-wrap: wrap; font-size: .73rem; gap: .4rem .9rem; margin-top: .35rem; }
.samai-expres__annotation { background: #f5f8fa; border-radius: .35rem; color: #405a70; font-size: .8rem; line-height: 1.5; margin: .75rem 0 0; overflow-wrap: anywhere; padding: .65rem .75rem; white-space: pre-line; }
.samai-expres__documents { border-top: 1px solid #e2e9ef; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; min-width: 0; padding-top: .75rem; }
.samai-expres__document { align-items: center; border: 1px solid #b9ccdb; border-radius: .4rem; color: #123f61; display: inline-flex; font-size: .75rem; font-weight: 700; gap: .4rem; max-width: 100%; min-width: 0; overflow: hidden; padding: .42rem .6rem; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.samai-expres__document:hover { background: #edf4f8; color: #092f4b; }
.samai-expres__document span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1199.98px) {
    .samai-expres__filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .samai-expres__clear { justify-self: start; }
}

@media (max-width: 991.98px) {
    .samai-expres__scope .samai-expres__radio-options { flex-wrap: wrap; }
    .samai-expres__table { min-width: 60rem; }
    .samai-expres__detail-summary { grid-template-columns: repeat(2, 1fr); }
    .samai-expres__detail-summary div:not(:nth-child(3n)) { border-right: 0; }
    .samai-expres__detail-summary div:nth-child(odd) { border-right: 1px solid #e2e9ef; }
}

@media (max-width: 767.98px) {
    .samai-expres { padding: .9rem 0 1.5rem; }
    .samai-expres__query,
    .samai-expres__results { border-radius: .55rem; padding: 1rem; }
    .samai-expres__query-heading,
    .samai-expres__results-heading,
    .samai-expres__section-heading { align-items: stretch; flex-direction: column; }
    .samai-expres__security { align-self: flex-start; white-space: normal; }
    .samai-expres__radio-options { display: none; }
    .samai-expres__mobile-select { display: block; }
    .samai-expres__type-row { align-items: stretch; display: grid; gap: .7rem; }
    .samai-expres__exact { border-left: 0; padding-left: 0; }
    .samai-expres__primary-search { align-items: stretch; flex-direction: column; }
    .samai-expres__criterion { max-width: none; width: 100%; }
    .samai-expres__search-button { width: 100%; }
    .samai-expres__filters,
    .samai-expres__filter-grid { grid-template-columns: 1fr; }
    .samai-expres__scope-fields { align-items: stretch; flex-direction: column; }
    .samai-expres__corporation-field,
    .samai-expres__scope-field { flex: 1 1 auto; width: 100%; }
    .samai-expres__filter-options { align-items: flex-start; display: grid; grid-template-columns: 1fr 1fr; }
    .samai-expres__filter-panel { grid-template-columns: 1fr; }
    .samai-expres__filter-panel--single > div,
    .samai-expres__filter-panel--internal > div:first-child,
    .samai-expres__filter-panel--internal > div:last-child,
    .samai-expres__filter-panel--party > div:first-child,
    .samai-expres__filter-panel--party > div:nth-child(2),
    .samai-expres__filter-panel--party > div:last-child,
    .samai-expres__filter-panel--dates > div,
    .samai-expres__filter-panel--status > div { grid-column: auto; }
    .samai-expres__form-actions { align-items: stretch; flex-direction: column-reverse; }
    .samai-expres__form-actions .btn { justify-content: center; width: 100%; }
    .samai-expres__scope { grid-column: auto; }
    .samai-expres__results-heading { margin: -1rem -1rem 0; padding: 1rem; }
    .samai-expres__report-actions { display: grid; grid-template-columns: 1fr; }
    .samai-expres__report-actions .btn { justify-content: center; }
    .samai-expres__pagination { justify-content: space-between; }
    .samai-expres__pagination span { text-align: center; }
    .samai-expres__modal .modal-dialog { margin: .5rem; }
    .samai-expres__modal .modal-body { padding: .85rem; }
    .samai-expres__detail-summary { grid-template-columns: 1fr; }
    .samai-expres__detail-summary div,
    .samai-expres__detail-summary div:nth-child(odd) { border-right: 0; }
    .samai-expres__subject { grid-template-columns: 1fr; gap: .25rem; }
    .samai-expres__activity-head { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .samai-expres *, .samai-expres *::before, .samai-expres *::after { scroll-behavior: auto !important; transition: none !important; }
}
