@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --line: rgba(148, 163, 184, .25);
    --black: #07111f;
    --black-2: #0d1b2e;
    --blue: #2563eb;
    --blue-2: #1d4ed8;
    --red: #dc2626;
    --green: #16a34a;
    --shadow: 0 24px 70px rgba(15, 23, 42, .10);
    --shadow-soft: 0 14px 34px rgba(15, 23, 42, .07);
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .10), transparent 34%),
        linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px;
    background:
        radial-gradient(circle at 0% 0%, rgba(59,130,246,.25), transparent 32%),
        linear-gradient(180deg, var(--black) 0%, var(--black-2) 100%);
    color: #eaf2ff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,.06);
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 8px 10px 24px;
}

.app-logo > span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 900;
    letter-spacing: -.06em;
    box-shadow: 0 16px 36px rgba(0,0,0,.18);
}

.app-logo strong {
    display: block;
    color: #fff;
    font-size: 20px;
    letter-spacing: -.045em;
}

.app-logo small {
    display: block;
    margin-top: 3px;
    color: rgba(226,232,240,.58);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .15em;
    font-weight: 800;
}

.app-menu {
    display: grid;
    gap: 7px;
}

.app-menu p {
    margin: 20px 12px 6px;
    color: rgba(191,219,254,.58);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .18em;
    font-weight: 900;
}

.app-menu a {
    min-height: 48px;
    padding: 0 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(226,232,240,.82);
    font-weight: 700;
    transition: .18s ease;
}

.app-menu a:hover,
.app-menu a.active {
    background: rgba(255,255,255,.10);
    color: #ffffff;
}

.app-menu a span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255,255,255,.08);
    color: #bfdbfe;
    font-weight: 900;
}

.app-menu a b {
    margin-left: auto;
    min-width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #ef4444;
    color: white;
    font-size: 12px;
}

.app-user {
    margin-top: auto;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.07);
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-mini {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: white;
    color: var(--ink);
    font-weight: 900;
}

.app-user strong {
    display: block;
    color: #fff;
    font-size: 14px;
}

.app-user small {
    color: rgba(226,232,240,.64);
    font-size: 12px;
}

.logout-form {
    margin: 12px 0 0;
}

.logout-button {
    width: 100%;
    min-height: 45px;
    border: 0;
    border-radius: 15px;
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}

.logout-button:hover {
    background: rgba(255,255,255,.13);
}

.app-main {
    min-width: 0;
}

.app-header {
    min-height: 82px;
    padding: 18px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-header strong {
    display: block;
    font-size: 16px;
    letter-spacing: -.02em;
}

.app-header small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.notification-pill {
    border-radius: 999px;
    border: 1px solid var(--line);
    background: white;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 800;
}

.page {
    width: min(1180px, calc(100% - 42px));
    margin: 34px auto 64px;
}

.messages {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.message {
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px 15px;
    box-shadow: var(--shadow-soft);
}

/* Dashboard */
.search-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 22px;
    margin-bottom: 22px;
}

.hero-left,
.hero-right,
.hero-search,
.empty-state,
.result-title,
.people-card,
.form-card,
.table-card,
.history-card,
.profile-card,
.timeline-card,
.auth-card {
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(255,255,255,.75);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-left {
    padding: 40px;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: 11px;
    font-weight: 900;
}

h1 {
    margin: 0;
    max-width: 790px;
    font-size: clamp(44px, 5.8vw, 76px);
    line-height: .88;
    letter-spacing: -.078em;
}

h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -.05em;
}

.lead {
    margin: 18px 0 0;
    max-width: 72ch;
    color: var(--muted);
    line-height: 1.65;
    font-size: 16px;
}

.hero-search {
    margin-top: 28px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.hero-search label {
    display: block;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.hero-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.search-box {
    position: relative;
}

.search-box input,
input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
    outline: none;
    padding: 15px 16px;
    color: var(--ink);
}

.search-box input {
    height: 52px;
    font-size: 16px;
}

.search-box input:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: rgba(37,99,235,.55);
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.autocomplete {
    position: absolute;
    z-index: 80;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.autocomplete a {
    display: block;
    padding: 13px 15px;
    border-bottom: 1px solid rgba(148,163,184,.14);
}

.autocomplete a:hover {
    background: #f8fafc;
}

.hidden {
    display: none;
}

.quick-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    min-height: 48px;
    border-radius: 999px;
    border: 0;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 900;
}

.btn-primary,
.btn-dark {
    background: linear-gradient(135deg, #07111f, #1d4ed8);
    color: white;
    box-shadow: 0 14px 32px rgba(29,78,216,.22);
}

.btn-light {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
}

.hero-right {
    padding: 30px;
    background:
        radial-gradient(circle at top right, rgba(96,165,250,.35), transparent 38%),
        linear-gradient(180deg, #07111f 0%, #172554 100%);
    color: white;
    display: grid;
    align-content: end;
}

.security-dot {
    width: 54px;
    height: 54px;
    margin-bottom: 120px;
    border-radius: 20px;
    background: rgba(255,255,255,.12);
    position: relative;
}

.security-dot:after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 18px;
    top: 18px;
    border-radius: 999px;
    background: #60a5fa;
    box-shadow: 0 0 0 10px rgba(96,165,250,.14);
}

.hero-right p {
    margin: 0 0 10px;
    color: #bfdbfe;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 11px;
}

.hero-right strong {
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -.05em;
}

.hero-right small {
    margin-top: 12px;
    color: rgba(226,232,240,.78);
    line-height: 1.6;
}

.result-title {
    padding: 24px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.people-card {
    border-radius: 26px;
    overflow: hidden;
}

.people-card a {
    padding: 16px;
    min-height: 160px;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
}

.photo-box {
    width: 96px;
    height: 118px;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #e2e8f0);
    display: grid;
    place-items: center;
    color: var(--blue-2);
    font-size: 30px;
    font-weight: 900;
}

.photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.people-info {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 8px;
}

.people-info strong {
    font-size: 20px;
    letter-spacing: -.035em;
}

.people-info small {
    color: var(--muted);
}

.tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mini-tag {
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
}

.mini-tag.muted {
    background: #e2e8f0;
    color: #475569;
}

.empty-state {
    padding: 36px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 10px;
}

.empty-state span {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: #eff6ff;
    color: var(--blue-2);
    font-size: 28px;
    font-weight: 900;
}

.empty-state strong {
    font-size: 24px;
    letter-spacing: -.035em;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

/* Páginas antigas herdadas */
.form-card,
.table-card,
.history-card,
.profile-card,
.timeline-card {
    padding: 24px;
}

.page-head,
.hero {
    margin-bottom: 22px;
}

.card-link,
.devedor-card a {
    display: block;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

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

    .app-sidebar {
        position: static;
        height: auto;
    }

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

    .app-menu p {
        grid-column: 1 / -1;
    }

    .search-hero {
        grid-template-columns: 1fr;
    }

    .security-dot {
        margin-bottom: 34px;
    }

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

@media (max-width: 720px) {
    .app-header {
        min-height: auto;
        padding: 18px;
        align-items: flex-start;
        flex-direction: column;
    }

    .page {
        width: min(100% - 20px, 1180px);
        margin: 20px auto 40px;
    }

    .hero-left,
    .hero-right,
    .hero-search,
    .empty-state,
    .result-title {
        padding: 22px;
        border-radius: 24px;
    }

    .hero-search-row,
    .people-grid {
        grid-template-columns: 1fr;
    }

    .app-menu {
        grid-template-columns: 1fr;
    }

    .people-card a {
        grid-template-columns: 1fr;
    }

    .photo-box {
        width: 100%;
        height: 220px;
    }
}

/* ===== Ícones SVG do menu + Meus devedores responsivo ===== */
.app-menu a .menu-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255,255,255,.08);
    color: #bfdbfe;
    flex: 0 0 auto;
}

.app-menu a .menu-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.app-menu a.active .menu-icon,
.app-menu a:hover .menu-icon {
    background: rgba(96,165,250,.18);
    color: #ffffff;
}

.my-page-head {
    margin-bottom: 22px;
    padding: 34px 36px;
    border-radius: var(--radius, 28px);
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(255,255,255,.75);
    box-shadow: var(--shadow, 0 24px 70px rgba(15,23,42,.10));
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.my-page-head h1 {
    margin: 0;
    font-size: clamp(40px, 4.5vw, 64px);
    line-height: .9;
    letter-spacing: -.075em;
}

.my-debtors-list {
    display: grid;
    gap: 14px;
}

.my-debtor-row {
    border-radius: 24px;
    background: rgba(255,255,255,.90);
    border: 1px solid rgba(255,255,255,.78);
    box-shadow: 0 16px 46px rgba(15,23,42,.075);
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.my-debtor-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 65px rgba(15,23,42,.11);
    border-color: rgba(37,99,235,.18);
}

.my-debtor-row a {
    padding: 14px;
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 116px;
}

.my-debtor-photo {
    width: 86px;
    height: 86px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #e2e8f0);
    display: grid;
    place-items: center;
    color: var(--blue-2, #1d4ed8);
    font-size: 28px;
    font-weight: 900;
    flex: 0 0 auto;
}

.my-debtor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.my-debtor-main {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.my-debtor-main strong {
    display: block;
    font-size: 22px;
    line-height: 1.05;
    letter-spacing: -.045em;
    color: var(--ink, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-debtor-main small {
    color: var(--muted, #64748b);
    font-weight: 750;
}

.my-debtor-action {
    align-self: center;
}

.my-debtor-action span {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line, rgba(148,163,184,.25));
    color: var(--ink, #0f172a);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 13px;
}

@media (max-width: 900px) {
    .my-page-head {
        padding: 24px;
        flex-direction: column;
        border-radius: 24px;
    }

    .my-debtor-row a {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .my-debtor-photo {
        width: 76px;
        height: 76px;
        border-radius: 18px;
    }

    .my-debtor-action {
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .my-debtor-action span {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .my-debtor-row a {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .my-debtor-photo {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }

    .my-debtor-main strong {
        font-size: 18px;
    }

    .my-debtor-main .tags-inline {
        gap: 5px;
    }

    .my-debtor-main .mini-tag {
        font-size: 10px;
        min-height: 24px;
        padding: 0 8px;
    }
}

/* ===== Perfil do devedor v2 ===== */
.profile-layout-v2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 18px;
    align-items: start;
}

.profile-main-v2,
.tags-panel-v2,
.timeline-panel-v2 {
    border-radius: 28px;
    background: rgba(255,255,255,.90);
    border: 1px solid rgba(255,255,255,.78);
    box-shadow: var(--shadow, 0 24px 70px rgba(15,23,42,.10));
    overflow: hidden;
}

.profile-main-v2 {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    min-height: 520px;
}

.profile-cover-v2 {
    height: 100%;
    min-height: 520px;
    background: linear-gradient(135deg, #dbeafe, #e2e8f0);
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--blue-2, #1d4ed8);
    font-size: 62px;
    font-weight: 900;
}

.profile-cover-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-content-v2 {
    padding: 30px;
    display: grid;
    align-content: start;
    gap: 22px;
}

.profile-title-row-v2 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.profile-title-row-v2 h1 {
    margin: 0;
    font-size: clamp(38px, 4vw, 58px);
    line-height: .9;
    letter-spacing: -.075em;
}

.status-chip-v2 {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 900;
}

.status-chip-v2.success {
    background: #dcfce7;
    color: #166534;
}

.status-chip-v2.danger {
    background: #fee2e2;
    color: #991b1b;
}

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

.profile-data-grid-v2 div {
    min-width: 0;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(148,163,184,.18);
}

.profile-data-grid-v2 small,
.profile-notes-v2 small {
    display: block;
    margin-bottom: 6px;
    color: var(--muted, #64748b);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 900;
}

.profile-data-grid-v2 strong {
    display: block;
    color: var(--ink, #0f172a);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.profile-notes-v2 {
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(148,163,184,.18);
}

.profile-notes-v2 p {
    margin: 0;
    color: #334155;
    line-height: 1.55;
}

.profile-actions-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-panel-v2 {
    padding: 24px;
}

.panel-head-v2 {
    margin-bottom: 16px;
}

.panel-head-v2 h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1;
    letter-spacing: -.055em;
}

.panel-head-v2 p {
    margin: 8px 0 0;
    color: var(--muted, #64748b);
    line-height: 1.45;
}

.tags-current-v2 .tag-grid {
    display: grid;
    gap: 10px;
}

.tags-current-v2 .tag-card {
    padding: 13px;
    border-radius: 18px;
    background: #f8fafc !important;
    border: 1px solid rgba(148,163,184,.18) !important;
    display: grid;
    gap: 7px;
}

.tags-current-v2 .tag-pill {
    width: fit-content;
    max-width: 100%;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 900;
}

.tags-current-v2 .tag-card small {
    color: var(--muted, #64748b);
    font-size: 12px;
}

.tags-current-v2 .tag-card p {
    margin: 0;
    color: #334155;
    font-size: 13px;
}

.tags-current-v2 .remove-tag-btn {
    width: fit-content;
    min-height: 30px;
    border: 1px solid #fecaca;
    background: #fff5f5;
    color: #b91c1c;
    border-radius: 999px;
    padding: 0 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.tag-form-v2 {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(148,163,184,.18);
    display: grid;
    gap: 10px;
}

.tag-form-v2 label {
    font-size: 12px;
    color: var(--muted, #64748b);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
}

.tag-form-v2 select,
.tag-form-v2 input {
    width: 100%;
    min-height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,.25);
    background: #fff;
    padding: 0 13px;
    outline: none;
}

.tag-form-v2 select:focus,
.tag-form-v2 input:focus {
    border-color: rgba(37,99,235,.55);
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.timeline-panel-v2 {
    margin-top: 18px;
    padding: 24px;
}

.timeline-modern-v2 .timeline-list {
    display: grid;
    gap: 10px;
}

.timeline-modern-v2 .timeline-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(148,163,184,.18);
}

.timeline-modern-v2 .timeline-dot {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: var(--blue-2, #1d4ed8);
}

.timeline-modern-v2 .timeline-item strong {
    display: block;
    font-size: 14px;
}

.timeline-modern-v2 .timeline-item p {
    margin: 4px 0;
    color: #334155;
    line-height: 1.45;
}

.timeline-modern-v2 .timeline-item small {
    color: var(--muted, #64748b);
}

@media (max-width: 1180px) {
    .profile-layout-v2 {
        grid-template-columns: 1fr;
    }

    .profile-main-v2 {
        grid-template-columns: 320px minmax(0, 1fr);
    }

    .profile-cover-v2 {
        min-height: 440px;
    }
}

@media (max-width: 820px) {
    .profile-main-v2 {
        grid-template-columns: 1fr;
    }

    .profile-cover-v2 {
        width: 100%;
        height: 320px;
        min-height: 320px;
    }

    .profile-content-v2,
    .tags-panel-v2,
    .timeline-panel-v2 {
        padding: 20px;
    }

    .profile-title-row-v2 {
        flex-direction: column;
    }

    .profile-data-grid-v2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .profile-cover-v2 {
        height: 250px;
        min-height: 250px;
    }

    .profile-title-row-v2 h1 {
        font-size: 38px;
    }

    .panel-head-v2 h2 {
        font-size: 26px;
    }

    .timeline-modern-v2 .timeline-item {
        grid-template-columns: 1fr;
    }
}

/* ===== Login premium v2 ===== */
.login-page {
    min-height: 100vh;
    padding: 28px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .16), transparent 34%),
        linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
}

.login-shell-v2 {
    width: min(1120px, 100%);
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 440px;
    gap: 22px;
    align-items: stretch;
}

.login-brand-panel,
.login-card-v2 {
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, .78);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .12);
    overflow: hidden;
}

.login-brand-panel {
    padding: 42px;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, .35), transparent 38%),
        linear-gradient(180deg, #07111f 0%, #0d1b2e 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-logo-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 900;
    letter-spacing: -.06em;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
}

.login-brand-panel .eyebrow {
    color: #93c5fd;
}

.login-brand-panel h1 {
    margin: 0;
    max-width: 100%;
    font-size: clamp(48px, 5.2vw, 76px);
    line-height: .88;
    letter-spacing: -.075em;
    word-break: normal;
    overflow-wrap: normal;
}

.login-brand-panel {
    overflow: hidden;
}

.login-brand-panel > div:nth-child(2) {
    max-width: 100%;
}

.login-security-box {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-security-box span {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: rgba(96, 165, 250, .18);
    position: relative;
    flex: 0 0 auto;
}

.login-security-box span::after {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #60a5fa;
    position: absolute;
    left: 14px;
    top: 14px;
    box-shadow: 0 0 0 8px rgba(96, 165, 250, .14);
}

.login-security-box strong {
    display: block;
    color: white;
    font-size: 14px;
}

.login-security-box small {
    display: block;
    margin-top: 3px;
    color: rgba(226, 232, 240, .62);
    line-height: 1.45;
}

.login-card-v2 {
    padding: 36px;
    background: rgba(255, 255, 255, .92);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card-head {
    margin-bottom: 26px;
}

.login-card-head h2 {
    margin: 0;
    font-size: 42px;
    line-height: .95;
    letter-spacing: -.06em;
    color: #0f172a;
}

.login-card-head span {
    display: block;
    margin-top: 12px;
    color: #64748b;
    line-height: 1.55;
}

.login-form-v2 {
    display: grid;
    gap: 16px;
}

.login-field {
    display: grid;
    gap: 8px;
}

.login-field label {
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.login-field input {
    width: 100%;
    height: 52px;
    border: 1px solid rgba(148, 163, 184, .32);
    border-radius: 18px;
    background: #ffffff;
    color: #0f172a;
    outline: none;
    padding: 0 15px;
}

.login-field input:focus {
    border-color: rgba(37, 99, 235, .58);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.login-submit {
    margin-top: 4px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #07111f, #1d4ed8);
    color: white;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 16px 34px rgba(29, 78, 216, .24);
}

.login-submit:hover {
    filter: brightness(1.04);
}

.login-error {
    padding: 13px 14px;
    border-radius: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 13px;
    font-weight: 700;
}

.field-error {
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
}

.login-footnote {
    margin: 20px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 920px) {
    .login-page {
        padding: 18px;
        place-items: start center;
    }

    .login-shell-v2 {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        min-height: 360px;
    }

    .login-brand-panel h1 {
        font-size: clamp(46px, 12vw, 72px);
    }
}

@media (max-width: 520px) {
    .login-page {
        padding: 10px;
    }

    .login-brand-panel,
    .login-card-v2 {
        border-radius: 24px;
        padding: 24px;
    }

    .login-card-head h2 {
        font-size: 34px;
    }

    .login-brand-panel {
        min-height: 320px;
    }
}

/* ===== CPF autofill definitivo ===== */
.cpf-autofill-status {
    display: none;
    margin-top: 7px;
    font-size: 12px;
    font-weight: 800;
}

.cpf-autofill-status.loading {
    color: #2563eb;
}

.cpf-autofill-status.success {
    color: #16a34a;
}

.cpf-autofill-status.error {
    color: #dc2626;
}

input[readonly] {
    background: #f8fafc;
    cursor: not-allowed;
}
