.module-page {
    min-width: 0;
    padding: 28px 32px 40px;
    background: #f8fafe;
}

.module-head {
    margin-bottom: 22px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.module-head h1 {
    margin: 4px 0 5px;
    color: var(--navy);
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    letter-spacing: -.04em;
}

.module-head p {
    margin: 0;
    color: var(--muted);
    font-size: .76rem;
}

.module-kicker {
    color: var(--accent);
    font-size: .63rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.module-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
}

.card-title-row {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.card-title-row h2 {
    margin: 0;
    color: var(--navy);
    font-size: .88rem;
}

.card-title-row p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .63rem;
}

.stats-row {
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.module-stat {
    min-height: 108px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fff;
}

.module-stat .stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.module-stat .stat-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
}

.module-stat .stat-icon svg {
    width: 15px;
    height: 15px;
}

.module-stat small {
    color: var(--muted);
    font-size: .6rem;
}

.module-stat strong {
    display: block;
    margin-top: 12px;
    color: var(--navy);
    font-size: 1.25rem;
    letter-spacing: -.04em;
}

.toolbar {
    margin-bottom: 14px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.toolbar-search {
    min-width: 220px;
    flex: 1;
    height: 40px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #f9fbfe;
}

.toolbar-search svg {
    width: 15px;
    height: 15px;
    color: #8f9bad;
}

.toolbar-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: .68rem;
}

.toolbar-select {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
    color: #526078;
    font-size: .66rem;
}

.data-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.data-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    background: #fff;
}

.data-table th,
.data-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #edf1f6;
    text-align: left;
    white-space: nowrap;
}

.data-table th {
    color: #929eae;
    background: #fbfcfe;
    font-size: .55rem;
    font-weight: 800;
    text-transform: uppercase;
}

.data-table td {
    color: #56647a;
    font-size: .65rem;
}

.data-table td strong {
    color: var(--navy);
}

.data-table tbody tr:hover {
    background: #f8faff;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.table-link {
    color: var(--accent);
    font-weight: 750;
}

.status-pill {
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    font-size: .56rem;
    font-weight: 750;
}

.status-pill::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.status-pending { color: #a36f12; background: var(--amber-soft); }
.status-progress { color: var(--accent); background: var(--accent-soft); }
.status-received { color: #2f8e68; background: var(--green-soft); }
.status-archived { color: #718096; background: #eef2f7; }

.form-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr);
    gap: 14px;
}

.form-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
}

.form-section + .form-section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.form-section-head {
    margin-bottom: 14px;
}

.form-section-head h2 {
    margin: 0;
    color: var(--navy);
    font-size: .86rem;
}

.form-section-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .62rem;
}

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

.field {
    display: grid;
    gap: 6px;
}

.field.span-2 {
    grid-column: 1 / -1;
}

.field label {
    color: #5a687d;
    font-size: .62rem;
    font-weight: 750;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: 0;
    background: #fbfcfe;
    color: var(--text);
    font-size: .68rem;
}

.field textarea {
    min-height: 96px;
    padding-top: 11px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #b8caf4;
    box-shadow: 0 0 0 3px rgba(53,106,230,.08);
    background: #fff;
}

.helper-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
}

.helper-card + .helper-card {
    margin-top: 12px;
}

.helper-card h3 {
    margin: 0 0 8px;
    color: var(--navy);
    font-size: .74rem;
}

.helper-card p,
.helper-list li {
    color: var(--muted);
    font-size: .62rem;
    line-height: 1.55;
}

.helper-list {
    margin: 0;
    padding-left: 18px;
}

.dropzone {
    min-height: 120px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    border: 1px dashed #cbd6e5;
    border-radius: 13px;
    background: #f9fbfe;
    color: #8793a5;
    text-align: center;
    cursor: pointer;
}

.dropzone svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.dropzone strong {
    color: #56647a;
    font-size: .68rem;
}

.dropzone span {
    font-size: .58rem;
}

.timeline-list {
    display: grid;
    gap: 0;
}

.timeline-row {
    position: relative;
    padding: 0 0 22px 44px;
}

.timeline-row::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 30px;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.timeline-row:last-child::before {
    display: none;
}

.timeline-mark {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
}

.timeline-mark svg {
    width: 14px;
    height: 14px;
}

.timeline-row strong {
    color: var(--navy);
    font-size: .69rem;
}

.timeline-row p {
    margin: 3px 0 4px;
    color: var(--muted);
    font-size: .62rem;
}

.timeline-row time {
    color: #9ba6b5;
    font-size: .57rem;
}

.receipt-layout {
    display: grid;
    grid-template-columns: minmax(280px, .55fr) minmax(0, 1.45fr);
    gap: 14px;
}

.identity-card {
    padding: 20px;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, var(--navy), #274071);
    color: #fff;
}

.identity-card h2 {
    margin: 0;
    font-size: 1rem;
}

.identity-card p {
    margin: 6px 0 18px;
    color: rgba(255,255,255,.68);
    font-size: .64rem;
    line-height: 1.5;
}

.identity-card .field label {
    color: rgba(255,255,255,.75);
}

.identity-card .field input,
.identity-card .field select {
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.09);
    color: #fff;
}

.identity-card select option {
    color: #1d2a40;
}

.receipt-list {
    display: grid;
    gap: 9px;
}

.receipt-item {
    padding: 13px;
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
}

.receipt-item input {
    width: 17px;
    height: 17px;
    accent-color: var(--accent);
}

.receipt-item-copy {
    display: grid;
    gap: 2px;
}

.receipt-item-copy strong {
    color: var(--navy);
    font-size: .68rem;
}

.receipt-item-copy span {
    color: var(--muted);
    font-size: .58rem;
}

.receipt-item time {
    color: #8996a8;
    font-size: .58rem;
}

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

.person-card {
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fff;
}

.person-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.person-avatar-lg {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .65rem;
    font-weight: 800;
}

.person-head div {
    display: grid;
    gap: 2px;
}

.person-head strong {
    color: var(--navy);
    font-size: .7rem;
}

.person-head span {
    color: var(--muted);
    font-size: .58rem;
}

.person-metrics {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.person-metrics div {
    padding: 10px;
    border-radius: 11px;
    background: var(--soft);
}

.person-metrics small {
    display: block;
    color: var(--muted);
    font-size: .54rem;
}

.person-metrics strong {
    display: block;
    margin-top: 3px;
    color: var(--navy);
    font-size: .85rem;
}

.report-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    gap: 14px;
}

.report-bars {
    height: 240px;
    display: flex;
    align-items: end;
    gap: 14px;
    padding-top: 20px;
}

.report-bar-column {
    flex: 1;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: end;
    gap: 8px;
}

.report-bar {
    width: 100%;
    height: var(--value);
    min-height: 24px;
    border-radius: 12px 12px 4px 4px;
    background: linear-gradient(180deg, #7ea0ef, var(--accent));
}

.report-bar-column small {
    color: var(--muted);
    font-size: .55rem;
    text-align: center;
}

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

.distribution-row {
    display: grid;
    gap: 6px;
}

.distribution-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #5b697d;
    font-size: .62rem;
}

.distribution-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f7;
}

.distribution-track span {
    display: block;
    width: var(--value);
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(280px,.6fr);
    gap: 14px;
}

.setting-row {
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
    border-bottom: 0;
}

.setting-row div {
    display: grid;
    gap: 3px;
}

.setting-row strong {
    color: var(--navy);
    font-size: .68rem;
}

.setting-row span {
    color: var(--muted);
    font-size: .58rem;
}

.switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
}

.switch input {
    position: absolute;
    opacity: 0;
}

.switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #dce3ec;
    cursor: pointer;
    transition: .18s ease;
}

.switch span::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,.12);
    transition: .18s ease;
}

.switch input:checked + span {
    background: var(--accent);
}

.switch input:checked + span::after {
    transform: translateX(18px);
}

@media (max-width: 1050px) {
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-shell,
    .receipt-layout,
    .report-grid,
    .settings-grid { grid-template-columns: 1fr; }
    .people-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 760px) {
    .module-page { padding: 22px 16px 100px; }
    .module-head { align-items: stretch; flex-direction: column; }
    .module-actions { overflow-x: auto; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .toolbar-search { min-width: 0; }
    .form-grid { grid-template-columns: 1fr; }
    .field.span-2 { grid-column: auto; }
    .people-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
}


/* Recebimento rápido - fluxo mobile-first */
.receipt-module {
    min-height: calc(100vh - 130px);
}

.receipt-shell {
    width: min(760px, 100%);
    margin: 0 auto;
}

.receipt-flow-header {
    margin-bottom: 20px;
}

.receipt-heading h1 {
    margin: 5px 0 5px;
    color: var(--navy);
    font-size: clamp(1.5rem, 3vw, 2.05rem);
    letter-spacing: -.04em;
}

.receipt-heading p {
    margin: 0;
    color: var(--muted);
    font-size: .72rem;
}

.receipt-steps {
    margin-top: 18px;
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto;
    align-items: center;
    gap: 8px;
}

.receipt-steps > i {
    height: 2px;
    border-radius: 999px;
    background: #dce4ef;
}

.receipt-step {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #93a0b1;
}

.receipt-step > span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #d7dfeb;
    border-radius: 50%;
    background: #fff;
    font-size: .61rem;
    font-weight: 800;
}

.receipt-step strong {
    font-size: .61rem;
    font-weight: 750;
}

.receipt-step.active {
    color: var(--accent);
}

.receipt-step.active > span {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 5px 14px rgba(53,106,230,.18);
}

.receipt-step.done {
    color: var(--green);
}

.receipt-step.done > span {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}

.receipt-stage-card {
    position: relative;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(32,51,82,.07);
}

.identity-step-card,
.review-step-card,
.receipt-success-card {
    width: min(520px, 100%);
    margin: 0 auto;
}

.receipt-stage-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--accent-soft);
    color: var(--accent);
}

.receipt-stage-icon svg {
    width: 22px;
    height: 22px;
}

.receipt-stage-icon.success-soft {
    color: var(--green);
    background: var(--green-soft);
}

.receipt-stage-copy {
    margin-bottom: 18px;
}

.receipt-step-label {
    display: inline-block;
    margin-bottom: 5px;
    color: var(--accent);
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.receipt-stage-copy h2,
.receipt-success-card h2 {
    margin: 0;
    color: var(--navy);
    font-size: 1.18rem;
    letter-spacing: -.03em;
}

.receipt-stage-copy p,
.receipt-success-card > p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .66rem;
    line-height: 1.55;
}

.receipt-form {
    display: grid;
    gap: 13px;
}

.mobile-field label {
    font-size: .64rem;
}

.mobile-field small {
    color: #8f9bad;
    font-size: .56rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon > svg {
    position: absolute;
    left: 13px;
    top: 50%;
    z-index: 1;
    width: 16px;
    height: 16px;
    color: #8795a8;
    transform: translateY(-50%);
}

.input-with-icon input,
.input-with-icon select {
    min-height: 48px;
    padding-left: 40px;
    font-size: .72rem;
}

.remember-person,
.receipt-confirm-check {
    padding: 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f9fbfe;
    cursor: pointer;
}

.remember-person input,
.receipt-confirm-check input {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: var(--accent);
}

.remember-person span,
.receipt-confirm-check span {
    display: grid;
    gap: 2px;
}

.remember-person strong,
.receipt-confirm-check strong {
    color: #536176;
    font-size: .61rem;
}

.remember-person small,
.receipt-confirm-check small {
    color: #8c98a9;
    font-size: .55rem;
}

.receipt-main-button {
    width: 100%;
    min-height: 50px;
    margin-top: 2px;
    font-size: .72rem;
}

.receipt-security-note {
    margin-top: 16px;
    padding-top: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border-top: 1px solid var(--border);
    color: #8793a5;
    font-size: .56rem;
    line-height: 1.5;
}

.receipt-security-note svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    color: var(--green);
}

.receipt-inline-error {
    padding: 10px 11px;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #f1cfd5;
    border-radius: 10px;
    background: var(--red-soft);
    color: #a84957;
    font-size: .58rem;
}

.receipt-inline-error svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.receipt-mobile-topline {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.receipt-back {
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: #67758a;
    cursor: pointer;
    font-size: .61rem;
    font-weight: 700;
}

.receipt-back svg {
    width: 14px;
    height: 14px;
}

.receipt-person-summary {
    margin-bottom: 18px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 36px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid #dbe5f6;
    border-radius: 13px;
    background: var(--accent-soft);
}

.receipt-person-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: .62rem;
    font-weight: 800;
}

.receipt-person-summary > div {
    display: grid;
    gap: 2px;
}

.receipt-person-summary small {
    color: #71809a;
    font-size: .54rem;
}

.receipt-person-summary strong {
    color: var(--navy);
    font-size: .68rem;
}

.receipt-person-summary button {
    border: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-size: .58rem;
    font-weight: 800;
}

.receipt-selection-bar {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.receipt-select-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #627087;
    font-size: .6rem;
    cursor: pointer;
}

.receipt-select-all input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.receipt-selection-bar > strong {
    color: var(--accent);
    font-size: .58rem;
}

.receipt-list-mobile {
    gap: 10px;
}

.receipt-mobile-card {
    position: relative;
    min-height: 108px;
    padding: 14px;
    grid-template-columns: 22px minmax(0,1fr);
    align-items: start;
    gap: 11px;
    cursor: pointer;
    transition: .16s ease;
}

.receipt-mobile-card:hover {
    border-color: #cfdaf0;
    box-shadow: 0 8px 20px rgba(38,61,100,.06);
}

.receipt-mobile-card:has(input:checked) {
    border-color: #a9c0f6;
    background: #f5f8ff;
    box-shadow: 0 0 0 2px rgba(53,106,230,.05);
}

.receipt-mobile-card > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.receipt-check-ui {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 1.5px solid #c9d3e0;
    border-radius: 7px;
    background: #fff;
    color: transparent;
}

.receipt-check-ui svg {
    width: 14px;
    height: 14px;
}

.receipt-mobile-card:has(input:checked) .receipt-check-ui {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.receipt-item-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.receipt-item-topline strong {
    color: var(--navy);
    font-size: .68rem;
}

.receipt-item-topline time {
    color: #919dad;
    font-size: .55rem;
}

.receipt-protocol {
    color: var(--accent) !important;
    font-size: .57rem !important;
    font-weight: 750;
}

.receipt-subject {
    margin-top: 5px;
    color: #5d6b80 !important;
    font-size: .61rem !important;
    line-height: 1.4;
}

.receipt-origin {
    margin-top: 6px;
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    color: #8b97a8 !important;
    font-size: .54rem !important;
}

.receipt-origin svg {
    width: 12px;
    height: 12px;
}

.receipt-sticky-action {
    margin-top: 16px;
}

.receipt-button-count {
    min-width: 21px;
    height: 21px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    font-size: .58rem;
}

.review-person-card {
    margin-bottom: 12px;
    padding: 12px;
    display: grid;
    grid-template-columns: 36px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #f9fbfe;
}

.review-person-card > div {
    display: grid;
    gap: 2px;
}

.review-person-card small {
    color: #8b97a8;
    font-size: .54rem;
}

.review-person-card strong {
    color: var(--navy);
    font-size: .66rem;
}

.review-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--green);
    font-size: .54rem;
    font-weight: 750;
}

.review-verified svg {
    width: 13px;
    height: 13px;
}

.review-offices {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
}

.review-offices-title {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #68758a;
    font-size: .58rem;
}

.review-offices-title strong {
    min-width: 22px;
    padding: 3px 6px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    text-align: center;
}

.review-list {
    display: grid;
    gap: 7px;
}

.review-office-item {
    padding: 9px 0;
    display: grid;
    gap: 3px;
    border-top: 1px solid #edf1f6;
}

.review-office-item:first-child {
    border-top: 0;
}

.review-office-item strong {
    color: var(--navy);
    font-size: .63rem;
}

.review-office-item span {
    color: var(--muted);
    font-size: .55rem;
}

.receipt-confirm-check {
    margin-bottom: 12px;
}

.receipt-confirm-button {
    background: var(--green);
    border-color: var(--green);
    box-shadow: 0 8px 18px rgba(47,158,114,.18);
}

.receipt-confirm-button:hover {
    background: #278861;
}

.receipt-success-card {
    text-align: center;
}

.receipt-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green);
}

.receipt-success-icon svg {
    width: 30px;
    height: 30px;
    stroke-width: 2.4;
}

.receipt-success-summary {
    margin: 18px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.receipt-success-summary > div {
    padding: 10px;
    display: grid;
    gap: 4px;
    border-radius: 11px;
    background: var(--soft);
}

.receipt-success-summary small {
    color: #8c98a9;
    font-size: .53rem;
}

.receipt-success-summary strong {
    color: var(--navy);
    font-size: .64rem;
}

@media (max-width: 760px) {
    .receipt-page {
        padding: 0;
        background: #f8fafe;
    }

    .receipt-page .app-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .receipt-page .topbar {
        min-height: 62px;
        padding: 0 16px;
        grid-template-columns: auto 1fr auto;
    }

    .receipt-page .top-nav {
        display: none;
    }

    .receipt-page .topbar-actions .icon-button,
    .receipt-page .profile-copy,
    .receipt-page .profile-button > svg {
        display: none;
    }

    .receipt-page .utility-rail {
        display: none;
    }

    .receipt-page .app-body {
        display: block;
    }

    .receipt-page .module-page {
        padding: 22px 16px 28px;
    }

    .receipt-page .app-footer {
        display: none;
    }

    .receipt-shell {
        width: 100%;
    }

    .receipt-flow-header {
        margin-bottom: 16px;
    }

    .receipt-heading h1 {
        font-size: 1.55rem;
    }

    .receipt-heading p {
        max-width: 330px;
        font-size: .66rem;
    }

    .receipt-steps {
        margin-top: 16px;
        gap: 5px;
    }

    .receipt-step strong {
        display: none;
    }

    .receipt-step > span {
        width: 30px;
        height: 30px;
    }

    .receipt-stage-card {
        padding: 18px;
        border-radius: 18px;
        box-shadow: 0 10px 28px rgba(32,51,82,.06);
    }

    .identity-step-card,
    .review-step-card,
    .receipt-success-card {
        width: 100%;
    }

    .receipt-stage-icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .receipt-stage-copy h2,
    .receipt-success-card h2 {
        font-size: 1.08rem;
    }

    .input-with-icon input,
    .input-with-icon select {
        min-height: 52px;
        font-size: .76rem;
    }

    .receipt-main-button {
        min-height: 52px;
        font-size: .76rem;
    }

    .offices-step-card {
        padding-bottom: 90px;
    }

    .receipt-sticky-action {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 14px;
        z-index: 70;
        margin: 0;
    }

    .receipt-sticky-action .receipt-main-button {
        box-shadow: 0 14px 34px rgba(53,106,230,.28);
    }

    .receipt-mobile-card {
        min-height: 116px;
    }

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

@media (max-width: 390px) {
    .receipt-page .module-page {
        padding-inline: 12px;
    }

    .receipt-stage-card {
        padding: 16px;
    }

    .receipt-sticky-action {
        left: 12px;
        right: 12px;
    }
}


/* Alertas e estado vazio do backend */
.form-alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
}

.form-alert > svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin-top: 1px;
}

.form-alert > div {
    display: grid;
    gap: 2px;
}

.form-alert strong {
    font-size: .66rem;
}

.form-alert span {
    font-size: .6rem;
    line-height: 1.45;
}

.form-alert-success {
    border-color: #cfe8dc;
    background: #f2fbf7;
    color: #2f7f60;
}

.form-alert-error {
    border-color: #f1cfd5;
    background: var(--red-soft);
    color: #a84957;
}

.empty-database-state {
    min-height: 250px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    color: var(--muted);
    text-align: center;
}

.empty-database-state > svg {
    width: 30px;
    height: 30px;
    color: var(--accent);
}

.empty-database-state strong {
    color: var(--navy);
    font-size: .78rem;
}

.empty-database-state span {
    margin-bottom: 8px;
    font-size: .62rem;
}


/* Cadastro de ofício refinado */
.office-create-page {
    max-width: 1420px;
    margin: 0 auto;
}

.office-create-head {
    margin-bottom: 16px;
}

.office-create-progress {
    margin-bottom: 16px;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}

.office-create-progress > i {
    height: 2px;
    border-radius: 999px;
    background: #e1e7f0;
}

.office-create-step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8c98aa;
}

.office-create-step > span {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border: 1px solid #d9e1eb;
    border-radius: 50%;
    background: #f8fafd;
    font-size: .61rem;
    font-weight: 800;
}

.office-create-step > div {
    display: grid;
    gap: 1px;
}

.office-create-step strong {
    font-size: .62rem;
}

.office-create-step small {
    font-size: .52rem;
}

.office-create-step.active {
    color: var(--accent);
}

.office-create-step.active > span {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(53,106,230,.18);
}

.office-create-step.done {
    color: var(--green);
}

.office-create-step.done > span {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}

.office-create-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .55fr);
    gap: 14px;
    align-items: start;
}

.office-create-main {
    display: grid;
    gap: 14px;
}

.create-section-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31,48,79,.035);
}

.create-section-card.section-active {
    border-color: #cfdcf6;
    box-shadow: 0 10px 28px rgba(53,106,230,.075);
}

.create-section-head {
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    gap: 12px;
    align-items: start;
}

.create-section-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--accent-soft);
    color: var(--accent);
}

.create-section-icon.muted {
    background: #eef2f7;
    color: #718096;
}

.create-section-icon svg {
    width: 19px;
    height: 19px;
}

.create-section-number {
    color: var(--accent);
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.create-section-head h2 {
    margin: 2px 0 3px;
    color: var(--navy);
    font-size: .9rem;
}

.create-section-head p {
    margin: 0;
    color: var(--muted);
    font-size: .61rem;
    line-height: 1.45;
}

.create-form-grid {
    gap: 14px;
}

.create-form-grid .field label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #4d5c72;
    font-size: .64rem;
}

.create-form-grid .field label b {
    color: var(--red);
    font-size: .62rem;
}

.create-form-grid .field input,
.create-form-grid .field select {
    min-height: 46px;
    background: #fbfcfe;
}

.create-form-grid .field textarea {
    min-height: 110px;
    background: #fbfcfe;
}

.create-form-grid .field small {
    color: #93a0b1;
    font-size: .54rem;
    line-height: 1.4;
}

.field-notice {
    margin-top: 6px;
    padding: 9px 10px;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    border: 1px solid #dae5f8;
    border-radius: 10px;
    background: var(--accent-soft);
    color: #647695;
    font-size: .56rem;
    line-height: 1.45;
}

.field-notice svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    color: var(--accent);
}

.field-notice a {
    color: var(--accent);
    font-weight: 750;
}

.create-attachment-card {
    padding-bottom: 18px;
}

.create-upload-preview {
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px dashed #cbd7e6;
    border-radius: 13px;
    background: #fafcff;
}

.create-upload-preview > svg {
    width: 22px;
    height: 22px;
    color: var(--green);
}

.create-upload-preview > div {
    display: grid;
    gap: 2px;
}

.create-upload-preview strong {
    color: #536176;
    font-size: .64rem;
}

.create-upload-preview span {
    color: #8c98a9;
    font-size: .55rem;
}

.office-create-sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 12px;
}

.create-summary-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(31,48,79,.05);
}

.create-summary-head {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.create-summary-head h2 {
    margin: 3px 0 0;
    color: var(--navy);
    font-size: .82rem;
}

.summary-status {
    padding: 5px 8px;
    border-radius: 999px;
    font-size: .52rem;
    font-weight: 800;
    white-space: nowrap;
}

.summary-status.pending {
    color: #a36f12;
    background: var(--amber-soft);
}

.summary-status.progress {
    color: var(--accent);
    background: var(--accent-soft);
}

.create-summary-list {
    display: grid;
}

.create-summary-list > div {
    padding: 10px 0;
    display: grid;
    gap: 3px;
    border-bottom: 1px solid #edf1f6;
}

.create-summary-list > div:last-child {
    border-bottom: 0;
}

.create-summary-list span {
    color: #96a2b2;
    font-size: .53rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.create-summary-list strong {
    color: #536176;
    font-size: .63rem;
    line-height: 1.35;
    word-break: break-word;
}

.create-summary-info {
    margin: 12px 0 14px;
    padding: 11px;
    display: grid;
    grid-template-columns: 28px minmax(0,1fr);
    gap: 8px;
    border-radius: 11px;
    background: #f7f9fc;
}

.create-summary-info > svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.create-summary-info > div {
    display: grid;
    gap: 2px;
}

.create-summary-info strong {
    color: #536176;
    font-size: .59rem;
}

.create-summary-info span {
    color: #8c98a9;
    font-size: .53rem;
    line-height: 1.45;
}

.create-summary-actions {
    display: grid;
    gap: 8px;
}

.create-submit-button,
.create-cancel-button {
    width: 100%;
}

.create-help-card {
    padding: 14px;
    display: grid;
    grid-template-columns: 30px minmax(0,1fr);
    gap: 9px;
    align-items: start;
    border: 1px solid #eadfbf;
    border-radius: 14px;
    background: #fffaf0;
}

.create-help-card > svg {
    width: 17px;
    height: 17px;
    color: var(--amber);
}

.create-help-card > div {
    display: grid;
    gap: 2px;
}

.create-help-card strong {
    color: #71551d;
    font-size: .6rem;
}

.create-help-card span {
    color: #977b49;
    font-size: .54rem;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .office-create-layout {
        grid-template-columns: 1fr;
    }

    .office-create-sidebar {
        position: static;
    }

    .create-summary-card {
        order: 1;
    }
}

@media (max-width: 760px) {
    .office-create-progress {
        padding: 10px 12px;
        gap: 7px;
    }

    .office-create-step > div {
        display: none;
    }

    .office-create-step > span {
        width: 30px;
        height: 30px;
    }

    .create-section-card {
        padding: 17px;
    }

    .create-section-head {
        grid-template-columns: 38px minmax(0,1fr);
        gap: 10px;
    }

    .create-section-icon {
        width: 38px;
        height: 38px;
    }

    .create-summary-head {
        align-items: stretch;
        flex-direction: column;
    }

    .summary-status {
        width: max-content;
    }
}


/* Novo Ofício - wizard em etapas */
.office-wizard-page {
    width: min(1040px, 100%);
    margin: 0 auto;
}

.office-wizard-head {
    margin-bottom: 16px;
}

.office-wizard-progress {
    margin-bottom: 16px;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}

.office-wizard-progress > i {
    height: 2px;
    border-radius: 999px;
    background: #e0e7f0;
    transition: background .18s ease;
}

.office-wizard-step {
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: #909cad;
    text-align: left;
    cursor: pointer;
}

.office-wizard-step > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid #d7e0eb;
    border-radius: 50%;
    background: #f9fbfe;
    font-size: .6rem;
    font-weight: 800;
    transition: .18s ease;
}

.office-wizard-step > div {
    display: grid;
    gap: 1px;
}

.office-wizard-step strong {
    font-size: .59rem;
}

.office-wizard-step small {
    font-size: .5rem;
}

.office-wizard-step.active {
    color: var(--accent);
}

.office-wizard-step.active > span {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(53,106,230,.18);
}

.office-wizard-step.done {
    color: var(--green);
}

.office-wizard-step.done > span {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}

.office-wizard-form {
    width: min(850px, 100%);
    margin: 0 auto;
}

.office-wizard-panel {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(31,48,79,.045);
}

.wizard-panel-head {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 44px minmax(0,1fr);
    gap: 12px;
    align-items: start;
}

.wizard-panel-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
}

.wizard-panel-icon.success {
    background: var(--green-soft);
    color: var(--green);
}

.wizard-panel-icon svg {
    width: 20px;
    height: 20px;
}

.wizard-panel-head h2 {
    margin: 2px 0 4px;
    color: var(--navy);
    font-size: 1rem;
    letter-spacing: -.025em;
}

.wizard-panel-head p {
    margin: 0;
    color: var(--muted);
    font-size: .62rem;
    line-height: 1.5;
}

.wizard-upload-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.wizard-upload-title {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wizard-upload-title > div {
    display: grid;
    gap: 2px;
}

.wizard-upload-title strong {
    color: #506078;
    font-size: .65rem;
}

.wizard-upload-title span {
    color: #929eaf;
    font-size: .54rem;
}

.secure-badge {
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green) !important;
    font-size: .52rem !important;
    font-weight: 750;
}

.secure-badge svg {
    width: 12px;
    height: 12px;
}

.pdf-upload-zone {
    min-height: 170px;
    padding: 20px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    border: 1.5px dashed #c6d3e3;
    border-radius: 15px;
    background: #fafcff;
    text-align: center;
    cursor: pointer;
    transition: .18s ease;
}

.pdf-upload-zone:hover,
.pdf-upload-zone.dragover {
    border-color: #9bb4ee;
    background: #f4f7ff;
}

.pdf-upload-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 2px;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
}

.pdf-upload-icon svg {
    width: 21px;
    height: 21px;
}

.pdf-upload-zone > strong {
    color: var(--navy);
    font-size: .7rem;
}

.pdf-upload-zone > span:not(.pdf-upload-icon) {
    color: #8f9bac;
    font-size: .56rem;
}

.pdf-select-button {
    min-height: 38px;
    margin-top: 5px;
    pointer-events: none;
}

.pdf-selected-card {
    margin-top: 10px;
    padding: 11px 12px;
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) 32px;
    align-items: center;
    gap: 10px;
    border: 1px solid #cfdcf5;
    border-radius: 12px;
    background: #f6f9ff;
}

.pdf-selected-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #e5edff;
    color: var(--accent);
}

.pdf-selected-icon svg {
    width: 18px;
    height: 18px;
}

.pdf-selected-card > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.pdf-selected-card strong {
    overflow: hidden;
    color: #4f5e74;
    font-size: .62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-selected-card span {
    color: #8e9aab;
    font-size: .53rem;
}

.pdf-selected-card button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #78869a;
    cursor: pointer;
}

.pdf-selected-card button:hover {
    color: var(--red);
    background: var(--red-soft);
}

.pdf-selected-card button svg {
    width: 14px;
    height: 14px;
}

.wizard-actions {
    margin-top: 20px;
    padding-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--border);
}

.wizard-actions .primary-button,
.wizard-actions .ghost-button {
    min-width: 130px;
}

.office-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 9px;
}

.office-review-grid article {
    padding: 12px;
    display: grid;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafcff;
}

.office-review-grid article.wide {
    grid-column: 1 / -1;
}

.office-review-grid span {
    color: #929eae;
    font-size: .52rem;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.office-review-grid strong {
    color: #4d5c72;
    font-size: .64rem;
    line-height: 1.4;
    word-break: break-word;
}

.review-result-note {
    margin-top: 12px;
    padding: 12px;
    display: grid;
    grid-template-columns: 32px minmax(0,1fr);
    align-items: start;
    gap: 9px;
    border: 1px solid #eadfbf;
    border-radius: 12px;
    background: #fffaf0;
}

.review-result-note > svg {
    width: 17px;
    height: 17px;
    color: var(--amber);
}

.review-result-note > div {
    display: grid;
    gap: 2px;
}

.review-result-note strong {
    color: #70541e;
    font-size: .62rem;
}

.review-result-note span {
    color: #957b49;
    font-size: .55rem;
    line-height: 1.45;
}

.review-result-note.assigned {
    border-color: #d7e3fb;
    background: var(--accent-soft);
}

.review-result-note.assigned > svg,
.review-result-note.assigned strong {
    color: var(--accent);
}

.review-result-note.assigned span {
    color: #687b9e;
}

@media (max-width: 760px) {
    .office-wizard-page {
        width: 100%;
    }

    .office-wizard-progress {
        padding: 10px 12px;
        gap: 5px;
    }

    .office-wizard-step > div {
        display: none;
    }

    .office-wizard-step > span {
        width: 30px;
        height: 30px;
    }

    .office-wizard-panel {
        padding: 17px;
        border-radius: 16px;
    }

    .wizard-panel-head {
        grid-template-columns: 40px minmax(0,1fr);
        gap: 10px;
    }

    .wizard-panel-icon {
        width: 40px;
        height: 40px;
    }

    .wizard-upload-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .pdf-upload-zone {
        min-height: 155px;
    }

    .wizard-actions {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin: 20px -17px -17px;
        padding: 12px 17px;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(12px);
    }

    .wizard-actions .primary-button,
    .wizard-actions .ghost-button {
        min-width: 0;
        flex: 1;
    }

    .office-review-grid {
        grid-template-columns: 1fr;
    }

    .office-review-grid article.wide {
        grid-column: auto;
    }
}

@media (max-width: 420px) {
    .office-wizard-progress {
        gap: 3px;
    }

    .office-wizard-progress > i {
        min-width: 12px;
    }

    .wizard-actions {
        gap: 7px;
    }

    .wizard-actions .primary-button,
    .wizard-actions .ghost-button {
        padding-inline: 11px;
        font-size: .67rem;
    }
}


/* Polimento visual do wizard de cadastro */
.office-wizard-page {
    padding-top: 4px;
}

.office-wizard-head {
    align-items: center;
}

.office-wizard-head h1 {
    font-size: clamp(1.65rem, 2.4vw, 2.15rem);
}

.office-wizard-progress {
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(31,48,79,.04);
}

.office-wizard-progress > i.done {
    background: linear-gradient(90deg, var(--green), #72c69f);
}

.office-wizard-step {
    position: relative;
    z-index: 1;
    border-radius: 12px;
    transition: color .18s ease, transform .18s ease;
}

.office-wizard-step:not(:disabled):hover {
    color: var(--accent);
    transform: translateY(-1px);
}

.office-wizard-step:disabled {
    cursor: default;
}

.office-wizard-step.active > span {
    transform: scale(1.04);
}

.office-wizard-panel {
    position: relative;
    overflow: hidden;
    animation: officeWizardEnter .2s ease;
}

.office-wizard-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #7fa1f3);
}

.office-wizard-panel[data-wizard-panel="4"]::before {
    background: linear-gradient(90deg, var(--green), #76c79f);
}

@keyframes officeWizardEnter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.create-form-grid .field {
    min-width: 0;
}

.create-form-grid .field input,
.create-form-grid .field select,
.create-form-grid .field textarea {
    border-color: #dce4ef;
    background: #fbfcff;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.create-form-grid .field input:hover,
.create-form-grid .field select:hover,
.create-form-grid .field textarea:hover {
    border-color: #cbd7e6;
    background: #fff;
}

.create-form-grid .field input:focus,
.create-form-grid .field select:focus,
.create-form-grid .field textarea:focus {
    border-color: #9cb6ef;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(53,106,230,.08);
}

.wizard-upload-block {
    margin-top: 20px;
}

.pdf-upload-zone {
    position: relative;
    overflow: hidden;
}

.pdf-upload-zone::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -55px;
    bottom: -70px;
    border-radius: 50%;
    background: rgba(53,106,230,.04);
    pointer-events: none;
}

.pdf-upload-zone:hover .pdf-upload-icon,
.pdf-upload-zone.dragover .pdf-upload-icon {
    transform: translateY(-2px);
}

.pdf-upload-icon {
    transition: transform .18s ease;
}

.pdf-selected-card {
    box-shadow: 0 7px 18px rgba(53,106,230,.06);
}

.wizard-actions {
    min-height: 66px;
}

.wizard-submit {
    min-width: 180px !important;
    background: var(--green);
    border-color: var(--green);
    box-shadow: 0 8px 18px rgba(47,158,114,.18);
}

.wizard-submit:hover {
    background: #278861;
}

.office-review-grid article {
    min-height: 70px;
    align-content: center;
    transition: border-color .16s ease, background .16s ease;
}

.office-review-grid article:hover {
    border-color: #cfdaea;
    background: #fff;
}

@media (min-width: 761px) {
    .office-wizard-form {
        width: min(900px, 100%);
    }

    .office-wizard-panel {
        padding: 26px 28px;
    }

    .wizard-panel-head {
        margin-bottom: 24px;
    }
}

@media (max-width: 760px) {
    .office-wizard-head {
        align-items: flex-start;
    }

    .office-wizard-progress {
        margin-inline: -2px;
    }

    .office-wizard-panel {
        box-shadow: 0 8px 24px rgba(31,48,79,.04);
    }

    .pdf-upload-zone {
        min-height: 165px;
    }

    .secure-badge {
        align-self: flex-start;
    }
}



/* Ofícios - ações, visualização e edição */
.office-table-wrap {
    overflow: visible;
}

.office-list-table {
    min-width: 1180px;
}

.office-click-row {
    cursor: pointer;
}

.office-click-row:hover {
    background: #f5f8ff !important;
}

.office-click-row:focus-visible {
    outline: 2px solid rgba(53,106,230,.35);
    outline-offset: -2px;
}

.office-subject-cell {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.actions-column {
    width: 64px;
    text-align: center !important;
}

.pdf-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .56rem;
    font-weight: 750;
    white-space: nowrap;
}

.pdf-indicator svg {
    width: 13px;
    height: 13px;
}

.pdf-indicator.has-pdf {
    color: var(--accent);
}

.pdf-indicator.no-pdf {
    color: #9aa5b5;
}

.office-actions {
    position: relative;
    display: inline-flex;
}

.office-actions-trigger {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #738198;
    cursor: pointer;
}

.office-actions-trigger:hover,
.office-actions-trigger[aria-expanded="true"] {
    border-color: var(--border);
    background: #fff;
    color: var(--navy);
    box-shadow: 0 5px 14px rgba(31,48,79,.08);
}

.office-actions-trigger svg {
    width: 17px;
    height: 17px;
}

.office-actions-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 7px);
    z-index: 80;
    width: 280px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(31,48,79,.16);
    text-align: left;
}

.office-actions-menu-head {
    padding: 7px 9px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.office-actions-menu-head span {
    color: #98a3b3;
    font-size: .52rem;
    text-transform: uppercase;
}

.office-actions-menu-head strong {
    color: var(--navy);
    font-size: .61rem;
}

.office-actions-menu > a,
.office-action-disabled {
    padding: 10px 9px;
    display: grid;
    grid-template-columns: 30px minmax(0,1fr);
    gap: 8px;
    align-items: center;
    border-radius: 10px;
}

.office-actions-menu > a:hover {
    background: var(--soft);
}

.office-actions-menu > a > svg,
.office-action-disabled > svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.office-actions-menu > a > span,
.office-action-disabled > span {
    display: grid;
    gap: 2px;
}

.office-actions-menu > a strong,
.office-action-disabled strong {
    color: #4f5e74;
    font-size: .61rem;
}

.office-actions-menu > a small,
.office-action-disabled small {
    color: #929eae;
    font-size: .52rem;
}

.office-action-disabled {
    opacity: .55;
}

.office-no-delete {
    margin-top: 5px;
    padding: 8px 9px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-top: 1px solid var(--border);
    color: #8c98a9;
    font-size: .52rem;
}

.office-no-delete svg {
    width: 14px;
    height: 14px;
    color: var(--green);
}

.office-detail-page,
.office-edit-page {
    max-width: 1420px;
    margin: 0 auto;
}

.office-detail-head h1 {
    max-width: 820px;
}

.office-detail-statusbar {
    margin-bottom: 14px;
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}

.office-detail-statusbar > div {
    padding: 10px;
    display: grid;
    gap: 5px;
    border-radius: 11px;
    background: var(--soft);
}

.office-detail-statusbar span:first-child {
    color: #929eae;
    font-size: .52rem;
    text-transform: uppercase;
}

.office-detail-statusbar strong {
    color: var(--navy);
    font-size: .64rem;
}

.office-detail-layout,
.office-edit-layout {
    display: grid;
    grid-template-columns: minmax(0,1.6fr) minmax(290px,.55fr);
    gap: 14px;
    align-items: start;
}

.office-detail-main {
    display: grid;
    gap: 14px;
}

.office-detail-sidebar,
.office-edit-sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 12px;
}

.office-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 9px;
}

.office-info-grid > div {
    padding: 11px;
    display: grid;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fafcff;
}

.office-info-grid > div.wide {
    grid-column: 1 / -1;
}

.office-info-grid span {
    color: #929eae;
    font-size: .52rem;
    text-transform: uppercase;
}

.office-info-grid strong {
    color: #4f5e74;
    font-size: .63rem;
    line-height: 1.45;
}

.office-timeline {
    display: grid;
}

.office-timeline-item {
    position: relative;
    padding: 0 0 22px 45px;
}

.office-timeline-item::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 34px;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.office-timeline-item:last-child {
    padding-bottom: 0;
}

.office-timeline-item:last-child::before {
    display: none;
}

.office-timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 33px;
    height: 33px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
}

.office-timeline-icon svg {
    width: 15px;
    height: 15px;
}

.office-timeline-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.office-timeline-title strong {
    color: var(--navy);
    font-size: .66rem;
}

.office-timeline-title time {
    color: #9aa5b4;
    font-size: .54rem;
}

.office-timeline-item p,
.office-timeline-item > div > span {
    margin: 4px 0 0;
    color: #7f8b9d;
    font-size: .57rem;
    line-height: 1.45;
}

.office-timeline-item p strong {
    color: #5b687b;
}

.office-attachment-list {
    display: grid;
    gap: 8px;
}

.office-attachment-list > a {
    padding: 10px;
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) 18px;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fbfcfe;
}

.office-attachment-list > a:hover {
    border-color: #cfdcf5;
    background: #f6f9ff;
}

.attachment-file-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
}

.attachment-file-icon svg {
    width: 17px;
    height: 17px;
}

.office-attachment-list > a > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.office-attachment-list strong {
    overflow: hidden;
    color: #536176;
    font-size: .59rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.office-attachment-list small {
    color: #939faf;
    font-size: .5rem;
}

.office-attachment-list > a > svg {
    width: 14px;
    height: 14px;
    color: #8f9bad;
}

.office-no-attachment {
    min-height: 130px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    color: #919dad;
    text-align: center;
}

.office-no-attachment svg {
    width: 24px;
    height: 24px;
}

.office-no-attachment strong {
    color: #657187;
    font-size: .63rem;
}

.office-no-attachment span {
    font-size: .53rem;
}

.office-no-attachment.compact {
    min-height: 105px;
}

.office-protection-card {
    padding: 13px;
    display: grid;
    grid-template-columns: 30px minmax(0,1fr);
    gap: 9px;
    border: 1px solid #d3eadf;
    border-radius: 13px;
    background: #f4fbf7;
}

.office-protection-card > svg {
    width: 17px;
    height: 17px;
    color: var(--green);
}

.office-protection-card > div {
    display: grid;
    gap: 2px;
}

.office-protection-card strong {
    color: #43735f;
    font-size: .6rem;
}

.office-protection-card span {
    color: #759083;
    font-size: .53rem;
    line-height: 1.45;
}

.office-protection-card.dangerless {
    border-color: #dce4ef;
    background: #f8fafe;
}

.office-protection-card.dangerless > svg {
    color: var(--accent);
}

.office-protection-card.dangerless strong {
    color: #536176;
}

.office-protection-card.dangerless span {
    color: #8490a1;
}

.office-edit-form {
    min-width: 0;
}

.office-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.empty-detail-state {
    padding: 30px 10px;
    color: #8f9bad;
    font-size: .6rem;
    text-align: center;
}

@media (max-width: 1120px) {
    .office-detail-layout,
    .office-edit-layout {
        grid-template-columns: 1fr;
    }

    .office-detail-sidebar,
    .office-edit-sidebar {
        position: static;
    }

    .office-table-wrap {
        overflow-x: auto;
        overflow-y: visible;
    }
}

@media (max-width: 760px) {
    .office-detail-statusbar {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .office-info-grid {
        grid-template-columns: 1fr;
    }

    .office-info-grid > div.wide {
        grid-column: auto;
    }

    .office-timeline-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .office-actions-menu {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 16px;
        top: auto;
        width: auto;
        border-radius: 18px;
    }
}


/* Ofícios - modal de ações por clique na linha */
.office-list-modal-table {
    min-width: 1080px;
}

.office-row-protocol {
    color: var(--accent);
}

.office-click-row {
    cursor: pointer;
    transition: background .16s ease, box-shadow .16s ease;
}

.office-click-row:hover {
    background: #f5f8ff !important;
}

.office-click-row:focus-visible {
    outline: 2px solid rgba(53,106,230,.32);
    outline-offset: -2px;
}

.office-action-modal[hidden] {
    display: none;
}

.office-action-modal {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: grid;
    place-items: center;
    padding: 20px;
}

.office-action-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(12, 25, 48, .42);
    backdrop-filter: blur(5px);
    cursor: default;
}

.office-action-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow-y: auto;
    border: 1px solid rgba(220,228,239,.95);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(17,36,70,.28);
    animation: officeModalIn .18s ease;
}

@keyframes officeModalIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.office-action-modal-head {
    padding: 20px 20px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #edf1f6;
}

.office-action-modal-title {
    display: grid;
    grid-template-columns: 46px minmax(0,1fr);
    gap: 12px;
    align-items: center;
}

.office-action-modal-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
}

.office-action-modal-icon svg {
    width: 20px;
    height: 20px;
}

.office-action-modal-title > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.office-action-modal-title span {
    color: var(--accent);
    font-size: .52rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.office-action-modal-title h2 {
    margin: 0;
    color: var(--navy);
    font-size: 1.05rem;
    letter-spacing: -.02em;
}

.office-action-modal-title p {
    margin: 0;
    color: var(--muted);
    font-size: .58rem;
}

.office-action-modal-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: #738198;
    cursor: pointer;
}

.office-action-modal-close:hover {
    background: var(--soft);
    color: var(--navy);
}

.office-action-modal-close svg {
    width: 16px;
    height: 16px;
}

.office-action-modal-status {
    padding: 12px 20px 0;
}

.office-action-modal-summary {
    padding: 14px 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
}

.office-action-modal-summary > div {
    padding: 10px 11px;
    display: grid;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fafcff;
}

.office-action-modal-summary > div.wide {
    grid-column: 1 / -1;
}

.office-action-modal-summary span {
    color: #929eae;
    font-size: .5rem;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.office-action-modal-summary strong {
    color: #536176;
    font-size: .62rem;
    line-height: 1.4;
    word-break: break-word;
}

.office-action-modal-options {
    padding: 0 20px 14px;
    display: grid;
    gap: 8px;
}

.office-modal-option {
    padding: 12px;
    display: grid;
    grid-template-columns: 40px minmax(0,1fr) 18px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.office-modal-option:hover {
    border-color: #cdd9ee;
    background: #f8faff;
    transform: translateY(-1px);
}

.office-modal-option.primary {
    border-color: #cfdcf7;
    background: #f6f9ff;
}

.office-modal-option.pdf {
    border-color: #d8e7df;
    background: #f8fcfa;
}

.office-modal-option.disabled {
    opacity: .5;
    pointer-events: none;
}

.office-modal-option-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent);
}

.office-modal-option.pdf .office-modal-option-icon {
    background: var(--green-soft);
    color: var(--green);
}

.office-modal-option-icon svg {
    width: 17px;
    height: 17px;
}

.office-modal-option > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.office-modal-option strong {
    color: #4f5e74;
    font-size: .64rem;
}

.office-modal-option small {
    color: #929eae;
    font-size: .53rem;
    line-height: 1.35;
}

.office-modal-option > svg {
    width: 15px;
    height: 15px;
    color: #9aa5b4;
}

.office-action-modal-protection {
    margin: 0 20px 20px;
    padding: 11px 12px;
    display: grid;
    grid-template-columns: 30px minmax(0,1fr);
    gap: 9px;
    border-radius: 12px;
    background: #f4fbf7;
}

.office-action-modal-protection > svg {
    width: 16px;
    height: 16px;
    color: var(--green);
}

.office-action-modal-protection > div {
    display: grid;
    gap: 2px;
}

.office-action-modal-protection strong {
    color: #47715f;
    font-size: .58rem;
}

.office-action-modal-protection span {
    color: #789084;
    font-size: .52rem;
    line-height: 1.4;
}

body.office-modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .office-action-modal {
        align-items: end;
        padding: 12px;
    }

    .office-action-modal-dialog {
        width: 100%;
        max-height: 88vh;
        border-radius: 20px;
    }

    .office-action-modal-head {
        padding: 17px 16px 13px;
    }

    .office-action-modal-status {
        padding-inline: 16px;
    }

    .office-action-modal-summary {
        padding: 12px 16px;
        grid-template-columns: 1fr;
    }

    .office-action-modal-summary > div.wide {
        grid-column: auto;
    }

    .office-action-modal-options {
        padding: 0 16px 12px;
    }

    .office-action-modal-protection {
        margin: 0 16px 16px;
    }
}


/* Pessoas - gestão real */
.people-grid-live {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.person-card-live {
    position: relative;
    color: inherit;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.person-card-live:hover {
    transform: translateY(-2px);
    border-color: #ccd9ef;
    box-shadow: 0 12px 28px rgba(31,48,79,.07);
}

.person-card-live.inactive {
    opacity: .66;
    background: #fafbfc;
}

.person-card-status {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.person-state,
.person-receiver-badge {
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    font-size: .52rem;
    font-weight: 750;
}

.person-state.active {
    color: #2f8e68;
    background: var(--green-soft);
}

.person-state.inactive {
    color: #7d8999;
    background: #eef2f7;
}

.person-receiver-badge {
    color: var(--accent);
    background: var(--accent-soft);
}

.person-receiver-badge svg {
    width: 12px;
    height: 12px;
}

.person-card-live .person-head small {
    color: #9aa5b5;
    font-size: .53rem;
}

.person-card-footer {
    margin-top: 12px;
    padding-top: 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid var(--border);
    color: #8995a6;
    font-size: .54rem;
}

.person-card-footer span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.person-card-footer svg {
    width: 14px;
    height: 14px;
}

.person-form-page {
    max-width: 1180px;
    margin: 0 auto;
}

.person-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, .55fr);
    gap: 14px;
    align-items: start;
}

.person-form-card {
    min-width: 0;
}

.person-form-intro,
.person-access-head {
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    gap: 11px;
    align-items: start;
}

.person-form-intro h2,
.person-access-head h3 {
    margin: 2px 0 3px;
    color: var(--navy);
    font-size: .88rem;
}

.person-form-intro p,
.person-access-head p {
    margin: 0;
    color: var(--muted);
    font-size: .58rem;
    line-height: 1.45;
}

.person-form-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--accent-soft);
    color: var(--accent);
}

.person-form-icon.small {
    width: 36px;
    height: 36px;
    border-radius: 11px;
}

.person-form-icon.neutral {
    background: #eef2f7;
    color: #718096;
}

.person-form-icon svg {
    width: 18px;
    height: 18px;
}

.person-access-section {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.person-toggle-row {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafcff;
    cursor: pointer;
}

.person-toggle-row > span {
    display: grid;
    gap: 2px;
}

.person-toggle-row strong {
    color: #526078;
    font-size: .62rem;
}

.person-toggle-row small {
    color: #8f9bad;
    font-size: .53rem;
}

.person-toggle-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.person-access-section > .field {
    margin-top: 12px;
}

.person-form-actions {
    margin-top: 20px;
    padding-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--border);
}

.person-form-sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 12px;
}

.person-edit-stats {
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 10px;
}

.person-edit-stats > div {
    padding: 13px;
    display: grid;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
}

.person-edit-stats span {
    color: #929eae;
    font-size: .53rem;
}

.person-edit-stats strong {
    color: var(--navy);
    font-size: .8rem;
}

@media (max-width: 1050px) {
    .people-grid-live {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .person-form-layout {
        grid-template-columns: 1fr;
    }

    .person-form-sidebar {
        position: static;
    }
}

@media (max-width: 680px) {
    .people-grid-live {
        grid-template-columns: 1fr;
    }

    .person-edit-stats {
        grid-template-columns: 1fr;
    }

    .person-form-actions {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin: 20px -20px -20px;
        padding: 12px 20px;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(12px);
    }

    .person-form-actions > * {
        flex: 1;
    }
}
