.dossier-root,
body {
    --dossier-card-bg: #ffffff;
    --dossier-card-border: #d9dde3;
    --dossier-text-strong: #111827;
    --dossier-text-body: #374151;
    --dossier-text-muted: #6b7280;
    --dossier-radius: 20px;
}

.text-primary {
    color: var(--brand-primary) !important;
}

.card {
    border-radius: var(--dossier-radius);
    background: var(--dossier-card-bg);
    border: 1px solid var(--dossier-card-border);
    box-shadow: none;
}

.card-dark {
    background-color: var(--brand-card-dark-bg);
    color: #ffffff;
}

.brand-navbar {
    background-color: var(--brand-navbar-bg) !important;
}

.brand-footer {
    background-color: var(--brand-footer-bg) !important;
    color: #ffffff;
}

.app-scope-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.app-scope-chip--scoped {
    background: rgba(245, 158, 11, 0.16);
    color: #fff7ed;
    border-color: rgba(245, 158, 11, 0.5);
}

.app-scope-chip--global {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.28);
}

.btn-brand-outline {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-brand-outline:hover,
.btn-brand-outline:focus,
.btn-brand-outline:active {
    color: var(--brand-on-primary) !important;
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.btn-brand-solid {
    color: var(--brand-on-primary);
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-brand-solid:hover,
.btn-brand-solid:focus,
.btn-brand-solid:active {
    color: var(--brand-on-primary) !important;
    background-color: var(--brand-primary-hover) !important;
    border-color: var(--brand-primary-hover) !important;
}

.link-brand {
    color: var(--brand-primary);
}

.link-brand:hover,
.link-brand:focus {
    color: var(--brand-primary-hover);
}

.login-page {
    --login-bg: #f8f7f2;
    --login-hero-text: #ffffff;
    --login-hero-muted: rgba(255, 255, 255, 0.68);
    --login-text: #1c1a17;
    --login-muted: #9a9894;
    --login-input-bg: #eef3ff;
    --login-input-border: #dbe2ef;
    --login-input-focus: rgba(245, 158, 11, 0.22);
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
    min-height: 100vh;
    background: var(--login-bg);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-hero-panel {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: clamp(48px, 7vw, 96px);
    color: var(--login-hero-text);
    background:
        radial-gradient(circle at 18% 12%, rgba(172, 111, 37, 0.3), transparent 32%),
        radial-gradient(circle at 88% 88%, rgba(245, 158, 11, 0.24), transparent 34%),
        linear-gradient(110deg, rgba(30, 22, 11, 0.92), rgba(10, 11, 11, 0.98)),
        url("/images/background_casp.jpg") center / cover;
    overflow: hidden;
}

.login-hero-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.34));
    pointer-events: none;
}

.login-hero-content {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
}

.login-hero-title {
    margin: 0;
    color: var(--login-hero-text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.8rem, 5vw, 5rem);
    font-weight: 400;
    line-height: 1.03;
    letter-spacing: 0;
}

.login-hero-title em {
    color: var(--brand-primary);
    font-style: italic;
}

.login-hero-text {
    width: min(560px, 100%);
    margin: 28px 0 0;
    color: var(--login-hero-muted);
    font-size: clamp(1rem, 1.4vw, 1.22rem);
    font-weight: 600;
    line-height: 1.55;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(32px, 6vw, 80px);
    background: var(--login-bg);
}

.login-form-shell {
    width: min(520px, 100%);
}

.login-brand-logo {
    display: block;
    width: min(150px, 42vw);
    height: auto;
    margin: 0 auto 62px;
}

.login-copy {
    margin-bottom: 34px;
}

.login-copy h2 {
    margin: 0;
    color: var(--login-text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3.2vw, 3rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0;
}

.login-copy h2 span {
    color: var(--brand-primary);
}

.login-copy p {
    margin: 10px 0 0;
    color: var(--login-muted);
    font-size: 1.02rem;
    line-height: 1.5;
}

.login-form {
    display: grid;
    gap: 22px;
}

.login-field label {
    display: block;
    margin-bottom: 8px;
    color: #625f5a;
    font-size: 0.92rem;
    font-weight: 700;
}

.login-field .form-control {
    min-height: 58px;
    padding: 0.8rem 1.25rem;
    border: 1px solid var(--login-input-border);
    border-radius: 18px;
    color: var(--login-text);
    background-color: var(--login-input-bg);
    font-size: 1.05rem;
    box-shadow: 0 8px 18px rgba(18, 24, 32, 0.05);
}

.login-field .form-control::placeholder {
    color: #8b94a3;
}

.login-field .form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.25rem var(--login-input-focus);
}

.login-submit-button {
    min-height: 58px;
    margin-top: 2px;
    border: 1px solid var(--brand-primary);
    border-radius: 999px;
    color: var(--brand-on-primary);
    background: var(--brand-primary);
    font-size: 1rem;
    font-weight: 700;
}

.login-submit-button:hover,
.login-submit-button:focus,
.login-submit-button:active,
.login-submit-button:disabled {
    color: var(--brand-on-primary) !important;
    background: var(--brand-primary-hover) !important;
    border-color: var(--brand-primary-hover) !important;
}

.login-submit-button:disabled {
    opacity: 0.78;
}

@media (max-width: 991.98px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-hero-panel {
        min-height: 44vh;
        padding: 40px 28px;
    }

    .login-form-panel {
        min-height: auto;
        padding: 40px 24px 56px;
    }

    .login-brand-logo {
        margin-bottom: 36px;
    }
}

@media (max-width: 575.98px) {
    .login-hero-panel {
        min-height: 36vh;
        padding: 32px 20px;
    }

    .login-hero-text {
        margin-top: 18px;
    }

    .login-form-panel {
        padding: 32px 18px 44px;
    }

    .login-field .form-control,
    .login-submit-button {
        min-height: 52px;
        border-radius: 14px;
    }
}

.api-docs-page {
    min-height: 100vh;
    padding: 48px 16px;
    background: #f4f6f8;
}

.api-docs-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.api-docs-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border: 1px solid #d9dde3;
    border-radius: 8px;
    background: #ffffff;
}

.api-docs-kicker {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--brand-primary);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.api-docs-title {
    margin: 0;
    color: var(--dossier-text-strong);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
}

.api-docs-lead {
    max-width: 680px;
    margin: 12px 0 0;
    color: var(--dossier-text-body);
    font-size: 1rem;
    line-height: 1.6;
}

.api-docs-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.api-docs-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.api-docs-summary-item {
    min-width: 0;
    padding: 18px;
    border: 1px solid #d9dde3;
    border-radius: 8px;
    background: #ffffff;
}

.api-docs-summary-item span {
    display: block;
    margin-bottom: 8px;
    color: var(--dossier-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.api-docs-summary-item code {
    white-space: normal;
    overflow-wrap: anywhere;
}

.api-docs-summary-item ul {
    margin: 0;
    padding-left: 18px;
}

.api-docs-content {
    margin-top: 16px;
    padding: 24px;
    border: 1px solid #d9dde3;
    border-radius: 8px;
    background: #ffffff;
}

.api-docs-content pre {
    max-height: none;
    margin: 0;
    overflow: auto;
    color: var(--dossier-text-strong);
    font-size: 0.92rem;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.api-docs-content code {
    color: inherit;
    font-family: Consolas, "Courier New", monospace;
}

@media (max-width: 767.98px) {
    .api-docs-page {
        padding: 24px 12px;
    }

    .api-docs-hero {
        flex-direction: column;
        padding: 20px;
    }

    .api-docs-title {
        font-size: 1.55rem;
    }

    .api-docs-summary {
        grid-template-columns: 1fr;
    }

    .api-docs-download {
        width: 100%;
        justify-content: center;
    }
}

.v2-body {
    --app-font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --app-bg: #f5f7fb;
    --app-surface: #ffffff;
    --app-surface-soft: #f8fafc;
    --app-border: #d9dde7;
    --app-text: #172033;
    --app-text-muted: #667085;
    --app-sidebar-width: 276px;
    --app-header-height: 68px;
    --app-radius-sm: 8px;
    --app-radius-md: 8px;
    min-height: 100vh;
    margin: 0;
    color: var(--app-text);
    background: var(--app-bg);
    font-family: var(--app-font-family);
}

.v2-body h1,
.v2-body h2,
.v2-body h3,
.v2-body h4,
.v2-body h5,
.v2-body h6 {
    margin-top: 0;
    color: var(--app-text);
    font-weight: 700;
    letter-spacing: 0;
}

.v2-body p {
    color: var(--app-text-muted);
    line-height: 1.55;
}

.v2-shell {
    display: grid;
    grid-template-columns: var(--app-sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.v2-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 22px 18px;
    background: var(--brand-navbar-bg);
    color: #ffffff;
}

.v2-brand {
    display: flex;
    align-items: center;
    min-height: 52px;
    margin-bottom: 22px;
}

.v2-brand img {
    max-width: 190px;
    max-height: 100px;
    object-fit: contain;
}

.v2-nav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 6px;
}

.v2-viewed-client {
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--app-radius-sm);
    background: rgba(255, 255, 255, 0.08);
}

.v2-viewed-client span,
.v2-viewed-client strong {
    display: block;
}

.v2-viewed-client span {
    margin-bottom: 3px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.v2-viewed-client strong {
    color: #ffffff;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.v2-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: var(--app-radius-sm);
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.v2-nav-link i {
    width: 20px;
    font-size: 1.05rem;
    text-align: center;
}

.v2-nav-link:hover,
.v2-nav-link:focus,
.v2-nav-link.active {
    color: var(--brand-on-primary);
    background: var(--brand-primary);
}

.v2-nav-divider {
    height: 1px;
    margin: 10px 8px;
    background: rgba(255, 255, 255, 0.16);
}

.v2-token-card {
    flex: 0 0 auto;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--app-radius-md);
    background: var(--brand-card-dark-bg);
}

.v2-token-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.v2-token-label {
    display: block;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.v2-token-view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--app-radius-sm);
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
}

.v2-token-view-link:hover,
.v2-token-view-link:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.v2-token-card strong {
    display: block;
    color: #ffffff;
    font-size: 1.9rem;
    line-height: 1.1;
}

.v2-token-card small {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.7);
}

.v2-main {
    min-width: 0;
}

.v2-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--app-header-height);
    padding: 0 28px;
    border-bottom: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.96);
}

.v2-breadcrumb {
    font-size: 0.9rem;
}

.v2-user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--app-text);
    font-size: 0.92rem;
    font-weight: 600;
}

.v2-user-menu span {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-content {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 28px;
}

.v2-page-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.v2-page-title {
    margin-bottom: 4px;
    font-size: 1.65rem;
    line-height: 1.2;
}

.v2-page-subtitle {
    margin-bottom: 0;
}

.v2-panel {
    padding: 20px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
}

.v2-panel + .v2-panel {
    margin-top: 16px;
}

.v2-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.v2-panel-header h2,
.v2-panel h2 {
    margin-bottom: 0;
    font-size: 1rem;
}

.v2-state {
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    color: var(--app-text-muted);
    background: var(--app-surface-soft);
}

.v2-list-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.v2-list-toolbar .v2-state {
    flex: 1 1 auto;
    margin-bottom: 0;
}

.v2-state.d-none + .table-responsive {
    margin-top: 0;
}

.v2-table {
    margin-bottom: 16px;
}

.v2-table thead th {
    color: var(--app-text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.v2-table td {
    color: var(--app-text);
    vertical-align: middle;
}

.v2-dossier-list {
    display: grid;
    gap: 28px;
    margin-bottom: 16px;
}

.v2-dossier-card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
    overflow: hidden;
}

.v2-dossier-card-main {
    display: grid;
    grid-template-columns: 88px minmax(220px, 1fr) minmax(160px, auto) auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
}

.v2-dossier-photo {
    width: 88px;
    height: 88px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: #eef2f7;
    overflow: hidden;
}

.v2-dossier-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-dossier-photo--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    background: #f2e8ff;
    font-size: 1.2rem;
    font-weight: 800;
}

.v2-dossier-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--brand-primary);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.v2-dossier-identity h3 {
    margin: 0 0 4px;
    font-size: 1.12rem;
    overflow-wrap: anywhere;
}

.v2-dossier-identity p,
.v2-dossier-status small {
    margin: 0;
    color: var(--app-text-muted);
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.v2-dossier-status {
    display: grid;
    gap: 5px;
    justify-items: start;
}

.v2-dossier-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.v2-dossier-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0 16px 16px;
}

.v2-progress-step {
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface-soft);
}

.v2-progress-step > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.v2-progress-step strong {
    font-size: 0.9rem;
}

.v2-progress-step .progress {
    height: 8px;
    background-color: #e6eaf0;
}

.v2-progress-step .progress-bar {
    background-color: var(--brand-primary);
}

.v2-progress-pill,
.v2-mini-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}

.v2-mini-status {
    color: var(--app-text-muted);
    background: #eef2f7;
}

.v2-progress-pill--success {
    color: #087443;
    background: #dcfae6;
}

.v2-progress-pill--primary {
    color: #175cd3;
    background: #dbeafe;
}

.v2-progress-pill--danger {
    color: #b42318;
    background: #fee4e2;
}

.v2-dossier-details {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 16px;
    padding: 16px;
    border-top: 1px solid var(--app-border);
    background: #fbfcfe;
}

.v2-dossier-details h4 {
    margin-bottom: 10px;
    font-size: 0.92rem;
}

.v2-dossier-details-full {
    grid-column: 1 / -1;
}

.v2-api-list {
    display: grid;
    gap: 8px;
}

.v2-api-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface);
}

.v2-api-row-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.v2-api-row-main strong,
.v2-api-row-main small {
    display: block;
}

.v2-api-row-main strong {
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.v2-api-row-main small {
    color: var(--app-text-muted);
    font-size: 0.78rem;
}

.v2-api-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 999px;
    background: #98a2b3;
}

.v2-api-dot--success {
    background: #12b76a;
}

.v2-api-dot--danger {
    background: #f04438;
}

.v2-api-dot--primary {
    background: #2e90fa;
}

.v2-api-dot--warning {
    background: #f79009;
}

.v2-api-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
}

.v2-api-error {
    margin-top: 6px;
    color: #b42318;
    font-size: 0.78rem;
}

.v2-api-summary-only,
.v2-empty-inline {
    padding: 12px;
    border: 1px dashed var(--app-border);
    border-radius: var(--app-radius-sm);
    color: var(--app-text-muted);
    background: var(--app-surface);
}

.v2-api-summary-only {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.v2-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 8px;
}

.v2-section-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    color: var(--app-text);
    background: var(--app-surface);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: left;
}

.v2-section-chip span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-section-chip:disabled {
    opacity: 1;
}

.v2-section-chip--success {
    border-color: #abefc6;
    color: #087443;
    background: #ecfdf3;
}

.v2-section-chip--danger {
    border-color: #fecdca;
    color: #b42318;
    background: #fffbfa;
}

.v2-section-chip--primary {
    border-color: #b2ddff;
    color: #175cd3;
    background: #eff8ff;
}

.v2-section-chip--warning {
    border-color: #fedf89;
    color: #b54708;
    background: #fffaeb;
}

.v2-section-chip--secondary {
    color: var(--app-text-muted);
    background: #f8fafc;
}

.v2-pdf-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface);
}

.v2-pdf-box strong,
.v2-pdf-box small {
    display: block;
}

.v2-pdf-box small {
    color: var(--app-text-muted);
    font-size: 0.82rem;
}

.v2-pdf-box--success {
    border-color: #abefc6;
    background: #f6fef9;
}

.v2-pdf-box--danger {
    border-color: #fecdca;
    background: #fffbfa;
}

.v2-pdf-box--primary {
    border-color: #b2ddff;
    background: #eff8ff;
}

.v2-pdf-box--warning {
    border-color: #fedf89;
    background: #fffaeb;
}

.v2-transaction-groups {
    display: grid;
    gap: 18px;
    margin-bottom: 16px;
}

.v2-transaction-group,
.v2-transaction-loose {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface);
    overflow: hidden;
}

.v2-transaction-group-main {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(160px, auto) auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
}

.v2-transaction-group-main h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.v2-transaction-group-main p {
    margin: 0;
    font-size: 0.86rem;
}

.v2-transaction-total {
    display: grid;
    justify-items: end;
    gap: 2px;
}

.v2-transaction-total span {
    color: var(--app-text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.v2-transaction-total strong {
    color: var(--brand-primary);
    font-size: 1.35rem;
    line-height: 1.1;
}

.v2-transaction-details {
    display: grid;
    gap: 8px;
    padding: 0 16px 16px;
}

.v2-transaction-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface-soft);
}

.v2-transaction-row strong,
.v2-transaction-row small {
    display: block;
}

.v2-transaction-row strong {
    font-size: 0.9rem;
}

.v2-transaction-row small {
    color: var(--app-text-muted);
    font-size: 0.78rem;
}

.v2-transaction-row span {
    flex: 0 0 auto;
    color: var(--app-text);
    font-weight: 800;
    white-space: nowrap;
}

.v2-transaction-loose {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.v2-transaction-loose h2 {
    margin-bottom: 4px;
    font-size: 0.98rem;
}

.v2-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.v2-token-box {
    min-height: 96px;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface-soft);
}

.v2-token-box span,
.v2-token-box small {
    display: block;
    color: var(--app-text-muted);
}

.v2-token-box span {
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.v2-token-box strong {
    display: block;
    color: var(--app-text);
    font-size: 1.45rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.v2-token-box small {
    margin-top: 4px;
    font-size: 0.82rem;
}

.v2-token-box code {
    display: block;
    color: var(--app-text);
    white-space: normal;
    overflow-wrap: anywhere;
}

.v2-grok-summary {
    margin-bottom: 16px;
}

.v2-grok-transaction-description {
    max-width: 420px;
    overflow-wrap: anywhere;
}

.v2-muted {
    color: var(--app-text-muted);
}

.v2-settings-list {
    display: grid;
    gap: 12px;
}

.v2-user-form,
.v2-token-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1fr) minmax(140px, 0.7fr) auto;
    gap: 12px;
    align-items: end;
}

.v2-user-actions {
    white-space: nowrap;
}

.v2-user-actions .btn {
    margin-left: 4px;
}

.v2-user-token-row td {
    background: var(--app-surface-soft);
}

.v2-token-form {
    grid-template-columns: minmax(140px, 0.7fr) minmax(220px, 1.5fr) minmax(140px, 0.7fr) auto;
    padding: 12px;
}

.v2-settings-item {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(240px, 2fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface-soft);
}

.v2-settings-item h3 {
    margin-bottom: 4px;
    font-size: 0.98rem;
}

.v2-settings-item p {
    margin-bottom: 0;
    font-size: 0.84rem;
}

.v2-error-log-filters {
    display: grid;
    grid-template-columns: minmax(240px, 1.6fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) auto;
    gap: 12px;
    align-items: end;
}

.v2-error-log-filter-actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.v2-error-log-message {
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-error-log-detail {
    display: grid;
    gap: 12px;
}

.v2-error-log-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.v2-error-log-detail-item {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface-soft);
}

.v2-error-log-detail-item--full {
    grid-column: 1 / -1;
}

.v2-error-log-detail-item strong {
    display: block;
    margin-bottom: 6px;
    color: var(--app-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.v2-error-log-detail-item span {
    overflow-wrap: anywhere;
}

.v2-code-block {
    max-height: 300px;
    margin: 0;
    padding: 10px;
    border-radius: var(--app-radius-sm);
    color: var(--app-text);
    background: #0f172a;
    overflow: auto;
    white-space: pre-wrap;
}

.v2-error-log-resolution {
    display: grid;
    grid-template-columns: minmax(160px, 0.5fr) minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

@media (max-width: 991.98px) {
    .v2-shell {
        grid-template-columns: 1fr;
    }

    .v2-sidebar {
        position: static;
        height: auto;
        min-height: 0;
    }

    .v2-nav {
        flex: 0 0 auto;
    }

    .v2-token-card {
        margin-top: 14px;
    }

    .v2-topbar {
        position: static;
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .v2-content {
        padding: 18px 14px;
    }

    .v2-page-title-row,
    .v2-grid-2,
    .v2-settings-item,
    .v2-error-log-filters,
    .v2-error-log-detail-grid,
    .v2-error-log-resolution,
    .v2-user-form,
    .v2-token-form,
    .v2-dossier-card-main,
    .v2-dossier-progress,
    .v2-dossier-details,
    .v2-transaction-group-main {
        grid-template-columns: 1fr;
    }

    .v2-dossier-actions {
        justify-content: flex-start;
    }

    .v2-dossier-photo {
        width: 76px;
        height: 76px;
    }

    .v2-transaction-total {
        justify-items: start;
    }
}

@media (max-width: 575.98px) {
    .v2-user-menu {
        width: 100%;
        justify-content: space-between;
    }

    .v2-user-menu span {
        max-width: 190px;
    }

    .v2-page-title-row {
        flex-direction: column;
    }

    .v2-api-row,
    .v2-api-summary-only {
        align-items: flex-start;
        flex-direction: column;
    }

    .v2-api-actions {
        width: 100%;
    }

    .v2-pdf-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .v2-transaction-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

.v2-body {
    --app-bg: #f8f7f2;
    --app-surface: #ffffff;
    --app-surface-soft: #f4f2ec;
    --app-border: #e5e1d7;
    --app-text: #22211f;
    --app-text-muted: #8d8980;
    --app-sidebar-width: 270px;
    --app-header-height: 70px;
    --app-radius-sm: 8px;
    --app-radius-md: 8px;
    --app-shadow-soft: 0 18px 44px rgba(25, 22, 18, 0.08);
}

.v2-shell {
    background: var(--app-bg);
}

.v2-sidebar {
    padding: 22px 16px 16px;
    border-right: 1px solid var(--app-border);
    background: #ffffff;
    color: var(--app-text);
}

.v2-brand--casp {
    gap: 12px;
    min-height: 160px;
    margin: 0 12px 34px;
    text-decoration: none;
}

.v2-brand--casp img {
    width: 192px;
    max-width: 192px;
    max-height: 160px;
}

.v2-brand--casp span {
    color: var(--brand-primary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.v2-nav {
    gap: 18px;
}

.v2-nav-section {
    display: grid;
    gap: 8px;
}

.v2-nav-section--account {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--app-border);
}

.v2-nav-section-label {
    display: block;
    padding: 0 12px;
    color: #9a948a;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.v2-nav-link {
    width: 100%;
    min-height: 50px;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    color: #59564f;
    background: transparent;
    font-size: 1rem;
    font-weight: 700;
    text-align: left;
}

.v2-nav-button {
    cursor: pointer;
}

.v2-nav-button:disabled,
.v2-nav-button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.48;
}

.v2-nav-button:disabled:hover,
.v2-nav-button:disabled:focus,
.v2-nav-button[aria-disabled="true"]:hover,
.v2-nav-button[aria-disabled="true"]:focus {
    color: #59564f;
    background: transparent;
}

.v2-nav-link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #6d6960;
    background: #f2f0eb;
    font-size: 0.98rem;
}

.v2-nav-link:hover,
.v2-nav-link:focus {
    color: var(--app-text);
    background: #f6f4ef;
}

.v2-nav-link:hover i,
.v2-nav-link:focus i {
    color: var(--brand-primary);
}

.v2-nav-link.active {
    color: #ffffff;
    background: #121211;
    box-shadow: 0 14px 28px rgba(18, 18, 17, 0.14);
}

.v2-nav-link.active::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: auto;
    border-radius: 999px;
    background: var(--brand-primary);
}

.v2-nav-link.active i {
    color: var(--brand-primary);
    background: rgba(245, 158, 11, 0.16);
}

.v2-topbar {
    min-height: var(--app-header-height);
    padding: 0 28px;
    border-bottom: 1px solid var(--app-border);
    background: #ffffff;
}

.v2-topbar-spacer {
    flex: 1 1 auto;
}

.v2-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.v2-credit-pill,
.v2-user-chip {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(25, 22, 18, 0.05);
}

.v2-credit-pill {
    gap: 8px;
    padding: 6px 16px 6px 7px;
    color: #7d766b;
}

.v2-credit-pill strong {
    color: var(--app-text);
    font-size: 1rem;
}

.v2-credit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--brand-primary);
    background: rgba(245, 158, 11, 0.12);
}

.v2-user-chip {
    gap: 8px;
    padding: 6px 14px 6px 7px;
    color: var(--app-text);
    text-decoration: none;
}

.v2-user-chip:hover,
.v2-user-chip:focus {
    color: var(--app-text);
    border-color: rgba(245, 158, 11, 0.45);
}

.v2-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #ffffff;
    background: #121211;
    font-size: 0.82rem;
    font-weight: 900;
}

.v2-user-chip-text {
    display: grid;
    line-height: 1.05;
}

.v2-user-chip-text strong {
    max-width: 160px;
    overflow: hidden;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-user-chip-text small {
    color: var(--brand-primary);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.v2-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #6d6960;
    text-decoration: none;
}

.v2-icon-button:hover,
.v2-icon-button:focus {
    color: var(--brand-primary);
    background: #f3f1ec;
}

.v2-content {
    width: min(1224px, 100%);
    padding: 58px 52px;
}

.v2-home-page {
    min-height: calc(100vh - var(--app-header-height) - 116px);
}

.v2-home-hero {
    margin-bottom: 54px;
}

.v2-home-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin-bottom: 16px;
    padding: 4px 14px;
    border-radius: 999px;
    color: var(--brand-primary);
    background: rgba(245, 158, 11, 0.12);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.v2-home-hero h1 {
    margin: 0;
    color: var(--app-text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 5vw, 4.25rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: 0;
}

.v2-home-hero h1 em {
    color: var(--brand-primary);
    font-style: italic;
}

.v2-home-hero p {
    margin: 14px 0 0;
    color: var(--app-text-muted);
    font-size: 1.08rem;
}

.v2-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr)) minmax(300px, 1.1fr);
    gap: 20px;
}

.v2-home-balance {
    position: relative;
    grid-column: 1 / 3;
    min-height: 246px;
    padding: 38px 42px;
    border-radius: 30px;
    color: #ffffff;
    background:
        radial-gradient(circle at 86% 16%, rgba(245, 158, 11, 0.2), transparent 30%),
        linear-gradient(115deg, #141412, #252016);
    box-shadow: var(--app-shadow-soft);
}

.v2-home-balance-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    padding: 5px 12px;
    border-radius: 999px;
    color: var(--brand-primary);
    background: rgba(245, 158, 11, 0.14);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.v2-home-balance strong {
    display: block;
    margin-top: 32px;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(4rem, 7vw, 5.8rem);
    font-weight: 400;
    line-height: 0.95;
}

.v2-home-balance > span {
    display: block;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.v2-home-action {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 96px;
    padding: 24px 26px;
    border: 1px solid var(--app-border);
    border-radius: 28px;
    color: var(--app-text);
    background: #ffffff;
    box-shadow: var(--app-shadow-soft);
    text-align: left;
}

.v2-home-action--tall {
    grid-column: 3;
    grid-row: 1 / 3;
    align-content: start;
    min-height: 246px;
}

.v2-home-action:hover,
.v2-home-action:focus {
    border-color: rgba(245, 158, 11, 0.5);
    color: var(--app-text);
    text-decoration: none;
}

.v2-home-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: #6d6960;
    background: #f2f0eb;
    font-size: 1.1rem;
}

.v2-home-action-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.v2-home-action-copy strong {
    color: var(--app-text);
    font-size: 1.08rem;
}

.v2-home-action-copy small {
    color: var(--app-text-muted);
    font-size: 0.92rem;
}

.v2-card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    color: #8b867d;
    background: #f4f2ed;
}

.v2-card-arrow--dark {
    position: absolute;
    top: 38px;
    right: 38px;
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
}

@media (max-width: 1199.98px) {
    .v2-content {
        padding: 42px 32px;
    }

    .v2-home-grid {
        grid-template-columns: 1fr;
    }

    .v2-home-balance,
    .v2-home-action--tall {
        grid-column: auto;
        grid-row: auto;
    }

    .v2-home-action--tall {
        min-height: 120px;
    }
}

@media (max-width: 991.98px) {
    .v2-sidebar {
        height: auto;
        min-width: 0;
        max-width: 100vw;
        padding: 10px 14px 12px;
        overflow: hidden;
    }

    .v2-nav-section--account {
        margin-top: 0;
    }

    .v2-brand--casp {
        justify-content: center;
        min-height: 72px;
        margin: 0 0 10px;
    }

    .v2-brand--casp img {
        width: 120px;
        max-width: 120px;
        max-height: 72px;
    }

    .v2-nav {
        display: flex;
        flex-direction: row;
        gap: 8px;
        width: 100%;
        min-width: 0;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .v2-nav-section {
        display: contents;
    }

    .v2-nav-section-label {
        display: none;
    }

    .v2-nav-link {
        flex: 0 0 auto;
        width: auto;
        min-height: 44px;
    }

    .v2-topbar {
        padding: 12px 16px;
    }
}

@media (max-width: 575.98px) {
    .v2-topbar-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }

    .v2-credit-pill {
        min-width: 0;
        padding-right: 12px;
    }

    .v2-credit-pill span:last-child,
    .v2-user-chip-text small {
        display: none;
    }

    .v2-user-chip {
        padding-right: 8px;
    }

    .v2-user-chip-text strong {
        max-width: 96px;
    }

    .v2-content {
        padding: 32px 18px;
    }

    .v2-home-hero {
        margin-bottom: 30px;
    }

    .v2-home-balance,
    .v2-home-action {
        border-radius: 20px;
    }

    .v2-home-balance {
        min-height: 210px;
        padding: 28px 24px;
    }

    .v2-card-arrow--dark {
        top: 28px;
        right: 24px;
    }
}

.v2-legal-search {
    --legal-search-field-height: 52px;
    min-height: calc(100vh - var(--app-header-height) - 116px);
}

.v2-legal-search__hero {
    max-width: 860px;
    margin-bottom: 42px;
}

.v2-legal-search__hero h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 5vw, 4.2rem);
    font-weight: 400;
    line-height: 1.08;
}

.v2-legal-search__hero h1 em {
    color: var(--brand-primary);
    font-style: italic;
    font-weight: 400;
}

.v2-legal-search__hero p {
    max-width: 760px;
    margin: 14px 0 0;
    font-size: 1.05rem;
}

.v2-legal-search__hero p strong {
    color: var(--app-text);
}

.v2-legal-search__panel {
    padding: 26px 30px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(25, 22, 18, 0.05);
}

.v2-legal-search__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
}

.v2-legal-search__form:has(.v2-legal-search__client) {
    grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1fr) auto;
}

.v2-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.v2-field label {
    color: var(--app-text);
    font-size: 0.88rem;
    font-weight: 700;
}

.v2-field select,
.v2-legal-search__input {
    width: 100%;
    min-height: var(--legal-search-field-height);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    color: var(--app-text);
    background: #ffffff;
}

.v2-field select {
    padding: 0 14px;
}

.v2-legal-search__input {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}

.v2-legal-search__input i {
    color: #918b82;
}

.v2-legal-search__input input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--app-text);
    background: transparent;
    font-size: 1rem;
}

.v2-legal-search__input:focus-within,
.v2-field select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
    outline: 0;
}

.v2-legal-search__submit,
.v2-legal-progress__resume {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: var(--legal-search-field-height);
    padding: 0 28px;
    border: 1px solid var(--brand-primary);
    border-radius: 8px;
    color: #17140f;
    background: var(--brand-primary);
    font-weight: 800;
}

.v2-legal-search__submit:hover,
.v2-legal-search__submit:focus,
.v2-legal-progress__resume:hover,
.v2-legal-progress__resume:focus {
    border-color: var(--brand-primary-hover);
    background: var(--brand-primary-hover);
}

.v2-legal-search__submit:disabled,
.v2-legal-search__form[aria-busy="true"] select,
.v2-legal-search__form[aria-busy="true"] input {
    cursor: not-allowed;
    opacity: 0.6;
}

.v2-legal-progress {
    margin-top: 28px;
    padding: 28px 30px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #ffffff;
}

.v2-legal-progress[data-state="error"] {
    border-color: #dc3545;
}

.v2-legal-progress[data-state="timeout"] {
    border-color: #d79b2f;
}

.v2-legal-progress__heading {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.v2-legal-progress__heading h2 {
    margin-bottom: 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 400;
}

.v2-legal-progress__heading p {
    margin: 0;
}

.v2-legal-progress__percent {
    color: var(--brand-primary);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.4rem;
}

.v2-legal-progress__track {
    height: 8px;
    margin: 24px 0;
    overflow: hidden;
    border-radius: 8px;
    background: #ece9e2;
}

.v2-legal-progress__track span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--brand-primary);
    transition: width 240ms ease;
}

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

.v2-legal-progress__stats > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 50px;
    padding: 10px 14px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
}

.v2-legal-progress__stats i {
    color: var(--brand-primary);
}

.v2-legal-progress__stats span {
    color: var(--app-text-muted);
}

.v2-legal-progress__detail {
    margin: 18px 0 0;
}

.v2-legal-progress__resume {
    margin-top: 12px;
}

.v2-legal-search__report {
    scroll-margin-top: 24px;
}

.v2-legal-search__report:not(:empty) {
    margin-top: 42px;
}

.v2-legal-search__report-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 180px;
    color: var(--app-text-muted);
}

.dossier-view-v2--embedded {
    min-height: 0;
}

.v2-embedded-report__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
    gap: 28px;
    align-items: end;
    margin-bottom: 26px;
    padding: 28px 30px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: #ffffff;
}

.v2-embedded-report__header h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.4rem;
    font-weight: 400;
}

.v2-embedded-report__header p {
    margin: 6px 0 0;
}

.v2-embedded-report__header dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.v2-embedded-report__header dl > div {
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface-soft);
}

.v2-embedded-report__header dt {
    color: var(--app-text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.v2-embedded-report__header dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    color: var(--app-text);
    font-weight: 700;
}

.v2-embedded-report__content {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .v2-legal-search__form,
    .v2-legal-search__form:has(.v2-legal-search__client) {
        grid-template-columns: 1fr;
    }

    .v2-legal-search__submit {
        width: 100%;
    }

    .v2-embedded-report__header {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .v2-legal-search__hero {
        margin-bottom: 28px;
    }

    .v2-legal-search__panel,
    .v2-legal-progress {
        padding: 20px 18px;
    }

    .v2-legal-progress__heading {
        display: grid;
        gap: 10px;
    }

    .v2-legal-progress__stats {
        grid-template-columns: 1fr;
    }

    .v2-embedded-report__header {
        padding: 20px 18px;
    }

    .v2-embedded-report__header dl {
        grid-template-columns: 1fr;
    }
}

.top-session {
    border: solid #2F2F2F 2pt;
    border-radius: 20px;
}

h3 {
    font-size: 18pt;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dossier-text-strong);
    margin-bottom: 0;
}

h4, h5, h6 {
    color: var(--dossier-text-strong);
}

.label-card {
    font-size: 11pt;
    line-height: 1.6;
    color: var(--dossier-text-body);
    margin-bottom: 5px;
}

.txt-card {
    font-size: 13pt;
    margin-bottom: 0px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--dossier-text-strong);
}

.subtitulo{
    font-size: 15pt;
    margin-bottom: 20px;
    padding-left: 20px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--dossier-text-strong);
}

.dossier-title {
    font-size: 18pt;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dossier-text-strong);
    margin-bottom: 0;
}

.dossier-subtitle {
    font-size: 15pt;
    font-weight: 800;
    line-height: 1.3;
    color: var(--dossier-text-strong);
    margin-bottom: 0.75rem;
}

.dossier-paragraph {
    font-size: 11pt;
    line-height: 1.6;
    color: var(--dossier-text-body);
    margin-bottom: 0.5rem;
}

.dossier-small,
.small {
    font-size: 9.5pt;
    line-height: 1.5;
    color: var(--dossier-text-muted);
}

.dossier-person-photo,
.dossier-person-photo-placeholder {
    width: 180px;
    height: 180px;
}

.dossier-person-photo {
    object-fit: cover;
}

.dossier-view-v2 .dossier-card-label {
    color: #293349;
    font-family: Montserrat, var(--app-font-family);
    font-size: 13pt;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

.dossier-view-v2 hr {
    margin: 1rem 0;
    color: #293349;
    border: 0;
    border-top: solid;
    opacity: 1;
}

.dossier-view-v2 h1,
.dossier-view-v2 h2,
.dossier-view-v2 h3,
.dossier-view-v2 h4,
.dossier-view-v2 h5,
.dossier-view-v2 h6 {
    font-family: Montserrat, var(--app-font-family);
}

.dossier-view-v2 .dossier-card-text {
    color: #000000;
    font-size: 10pt;
    line-height: 1.6;
}

.dossier-section-heading {
    padding-bottom: 0.75rem;
    border-bottom: 4px solid #000000;
}

.dossier-section-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 6px;
    color: var(--brand-on-primary, #ffffff);
    background: var(--brand-primary);
    font-size: 1.25rem;
    line-height: 1;
}

.dossier-section-v2 .dossier-cpf-emblem {
    max-height: 150px;
    object-fit: contain;
}

.dossier-kv-item {
    min-height: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--dossier-border-color, #d8dee9);
    border-radius: 6px;
    background: #ffffff;
}

.dossier-kv-label {
    color: var(--dossier-text-muted, #5f6b7a);
    font-family: Montserrat, var(--app-font-family);
    font-size: 9pt;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

.dossier-kv-value {
    color: #000000;
    font-size: 11pt;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.dossier-summary-card {
    --dossier-summary-color: #1d4ed8;
    --dossier-summary-border: #2563eb;
    --dossier-summary-bg: #eff6ff;
    --dossier-summary-icon-bg: #dbeafe;
    padding: 1rem;
    border: 1px solid var(--dossier-summary-border);
    border-radius: 6px;
    background: var(--dossier-summary-bg);
}

.dossier-summary-card--danger {
    --dossier-summary-color: #b91c1c;
    --dossier-summary-border: #dc2626;
    --dossier-summary-bg: #fef2f2;
    --dossier-summary-icon-bg: #fee2e2;
}

.dossier-summary-card--success {
    --dossier-summary-color: #166534;
    --dossier-summary-border: #16a34a;
    --dossier-summary-bg: #f0fdf4;
    --dossier-summary-icon-bg: #dcfce7;
}

.dossier-summary-card--purple {
    --dossier-summary-color: #6d28d9;
    --dossier-summary-border: #7c3aed;
    --dossier-summary-bg: #f5f3ff;
    --dossier-summary-icon-bg: #ede9fe;
}

.dossier-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    color: var(--dossier-summary-color);
    background: var(--dossier-summary-icon-bg);
    font-size: 1.05rem;
    line-height: 1;
}

.dossier-summary-icon i {
    color: inherit;
}

.dossier-summary-value {
    color: var(--dossier-summary-color);
    font-family: Montserrat, var(--app-font-family);
    font-size: 20pt;
    font-weight: 800;
    line-height: 1;
}

.dossier-summary-label {
    color: var(--dossier-summary-color);
    font-size: 9.5pt;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
}

.dossier-process-list {
    display: grid;
    gap: 1rem;
}

.dossier-process-item {
    padding: 1rem;
    border: 1px solid var(--dossier-border-color, #d8dee9);
    border-radius: 6px;
    background: #ffffff;
}

.dossier-source-badge {
    border: 1px solid transparent;
    font-weight: 700;
}

.dossier-source-badge--active {
    color: #166534;
    border-color: #16a34a;
    background: #dcfce7;
}

.dossier-source-badge--inactive {
    color: #475569;
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.dossier-list-item {
    min-height: 100%;
    padding: 0.75rem;
    border: 1px solid var(--dossier-border-color, #d8dee9);
    border-radius: 6px;
    background: #f8fafc;
}

.dossier-party-groups {
    display: grid;
    gap: 0.75rem;
}

.dossier-party-group {
    display: grid;
    gap: 0.5rem;
}

.dossier-party-group--nested {
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--dossier-border-color, #d8dee9);
}

.dossier-party-role {
    color: #000000;
    font-family: Montserrat, var(--app-font-family);
    font-size: 10pt;
    font-weight: 800;
    line-height: 1.25;
}

.dossier-evidence-list {
    display: grid;
    gap: 0.75rem;
}

.dossier-subsection-title {
    color: #000000;
    font-family: Montserrat, var(--app-font-family);
    font-size: 11pt;
    font-weight: 800;
    line-height: 1.25;
}

.text-muted {
    color: var(--dossier-text-muted) !important;
}

.cpf_lista_dossie {
    font-size: 15pt;
    font-weight: 800;
}

.img_circle {
    border-radius: 50%;
    height: 100px;
    width: 100px;
    margin: 10px;
}


.icon-titulo {
    width: 25px;
}


.mosaic-title {
    font-size: 20pt; 
    font-weight: 900;
}

.review-map {
    width: 100%;
    height: 150px;
}

.review-star-icon {
    filter: invert(67%) sepia(83%) saturate(749%) hue-rotate(360deg)
            brightness(95%) contrast(92%);
}

.reviews-note {
    font-size: 10pt;
}

.reviews-profile-card .badge {
    font-weight: 600;
}

.reviews-profile-avatar {
    width: 56px;
    height: 56px;
    object-fit: cover;
}

.review-entry-card .card-body {
    padding: 1rem;
}

.review-entry-grid {
    display: grid;
    grid-template-columns: minmax(120px, 150px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.review-entry-grid.has-map {
    grid-template-columns: minmax(180px, 240px) minmax(120px, 150px) minmax(0, 1fr);
}

.review-map-panel,
.review-photo-panel {
    height: 100%;
}

.review-map-shell {
    border: 1px solid var(--dossier-card-border);
    border-radius: 16px;
    padding: 0.75rem;
    background: #f8fafc;
    height: 100%;
}

.review-location-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--dossier-card-border);
    background: #f3f4f6;
}

.review-entry-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--dossier-text-strong);
}

.review-entry-address {
    font-size: 0.92rem;
    color: var(--dossier-text-muted);
}

.review-entry-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.review-entry-quote {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    color: var(--dossier-text-body);
    line-height: 1.6;
}

.review-entry-footer {
    font-size: 0.9rem;
    color: var(--dossier-text-muted);
}

.review-owner-response {
    margin-top: 0.75rem;
}

.review-owner-response summary {
    cursor: pointer;
    color: var(--dossier-text-muted);
    font-size: 0.9rem;
    user-select: none;
}

.review-owner-response[open] summary {
    margin-bottom: 0.5rem;
}

.review-owner-response-body {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    color: var(--dossier-text-body);
    line-height: 1.6;
}

.review-photo-section {
    margin-top: 1rem;
}

.review-photo-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dossier-text-strong);
    margin-bottom: 0.9rem;
}

.review-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.85rem;
}

.review-photo-card {
    border: 1px solid var(--dossier-card-border);
    border-radius: 16px;
    background: var(--dossier-card-bg);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.review-photo-card-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.review-photo-card-link:hover {
    color: inherit;
    text-decoration: none;
}

.review-photo-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: #f3f4f6;
}

.review-photo-body {
    padding: 0.75rem;
}

.review-photo-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dossier-text-strong);
    line-height: 1.35;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-photo-address {
    font-size: 0.82rem;
    color: var(--dossier-text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .review-entry-grid.has-map,
    .review-entry-grid {
        grid-template-columns: 1fr;
    }
}



@media print {
  .page-break {
    page-break-before: always; /* Força quebra antes */
    /* ou page-break-after: always; para forçar depois */
  }

  p {
    font-size: 8pt;
  }

  td {
    font-size: 8pt;
  }

  th {
    font-size: 8pt;
  }

  li {
    font-size: 8pt;
  }

  .label-card,  .txt-card {
    font-size: 8pt
  }

  .dossier-paragraph,
  .dossier-small,
  .small {
    font-size: 8pt;
  }

  h4 {
    font-size: 14pt;
  }

  h3 {
    font-size: 12pt;
  }

  .icon-titulo {
    width: 18px;
  }

  #bigMap {
    height: 400px !important;
    display: block !important;
  }

  .leaflet-control-container {
    display: none !important;
  }

  .mosaic-title {
    font-size: 14pt; 
    font-weight: 900;
}

.progress-bar {
    background-color: #2F2F2F;
    border-color: #2F2F2F;
    border: 1px solid;
}

.card {
  page-break-inside: avoid;
}

.card .img-perfil {
  width: 100%;          /* ocupa toda a largura da coluna */
  height: 100%;         /* ocupa toda a altura da coluna */
  object-fit: cover;    /* corta proporcionalmente para preencher */
  border-radius: 0;     /* remove arredondamento, se quiser */
}

}
