:root {
    --blue: #113b7b;
    --blue-dark: #113b7b;
    --blue-soft: #eef3fb;
    --accent: #ffbf00;
    --text: #172033;
    --muted: #68748a;
    --border: #dfe6f1;
    --bg: #f6f8fc;
    --white: #ffffff;
    --danger: #b42318;
    --success: #137333;
    --shadow: 0 18px 45px rgba(20, 43, 86, .10);
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 70px;
    padding: 14px clamp(16px, 4vw, 44px);
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--blue-dark);
}
.brand-logo, .login-logo, .identity-logo {
    display: block;
    object-fit: contain;
    flex: 0 0 auto;
}
.brand-logo {
    width: 42px !important;
    height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
}
.login-logo {
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
}
.identity-logo {
    width: 69px !important;
    height: 69px !important;
    max-width: 69px !important;
    max-height: 69px !important;
}
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav a {
    padding: 10px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 650;
    font-size: 14px;
}
.nav a:hover, .nav a.active {
    background: var(--blue-soft);
    color: var(--blue-dark);
}
.menu-toggle { display: none; }
.container {
    width: min(1160px, calc(100% - 28px));
    margin: 28px auto 60px;
}
.footer {
    text-align: center;
    color: var(--muted);
    padding: 26px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
}
.page-head h1 { margin: 0 0 6px; font-size: clamp(28px, 4vw, 44px); line-height: 1.05; }
.page-head h2 { margin: 0; }
.eyebrow {
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--blue);
    font-size: 12px;
    font-weight: 600;
}
.muted { color: var(--muted); margin-top: 4px; }
.hint { color: var(--muted); font-size: 13px; text-align: center; }

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}
.grid { display: grid; gap: 18px; }
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric span { display: block; color: var(--muted); font-weight: 700; }
.metric strong { display: block; margin-top: 10px; font-size: 34px; color: var(--blue-dark); }
.profile-summary {
    display: flex;
    align-items: center;
    gap: 22px;
}
.avatar-lg, .identity-photo {
    width: 118px;
    height: 118px;
    object-fit: cover;
    border-radius: 24px;
    border: 4px solid var(--blue-soft);
}
.avatar-sm {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid var(--blue-soft);
}
.person-line { display: flex; align-items: center; gap: 10px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--blue-dark);
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(20,43,86,.12); }
.btn.primary { background: var(--blue); color: white; border-color: var(--blue); }
.btn.full { width: 100%; }
.btn.small { min-height: 34px; padding: 7px 12px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.actions.compact { margin: 0; }

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 18px;
    font-weight: 700;
}
.alert.success { background: #e9f7ee; color: var(--success); border: 1px solid #bee8cb; }
.alert.error { background: #fff0ee; color: var(--danger); border: 1px solid #ffd2cc; }

.form { display: grid; gap: 20px; }
.form.narrow { max-width: 520px; }
.form-section { border-top: 1px solid var(--border); padding-top: 22px; }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section h2 { margin: 0 0 14px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
label { display: grid; gap: 7px; font-weight: 600; color: #26344f; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 13px;
    background: white;
    color: var(--text);
    font: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(17, 59, 123, .14);
    border-color: var(--blue);
}
textarea { resize: vertical; }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0; }
.checks label { display: flex; align-items: center; gap: 8px; }
.checks input { width: auto; }
.permissions-box { background: var(--blue-soft); margin: 0 -4px; padding: 22px; border-radius: 20px; border: 1px solid #d6e2ff; }

.searchbar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}
.searchbar input { flex: 1; }
.table-wrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: #fbfcff; }
tr:last-child td { border-bottom: 0; }
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-weight: 600;
    font-size: 12px;
}
.pill.ok { background: #e9f7ee; color: var(--success); }
.pill.bad { background: #fff0ee; color: var(--danger); }

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
    background:
      radial-gradient(circle at 10% 10%, rgba(17,59,123,.15), transparent 30%),
      radial-gradient(circle at 90% 20%, rgba(17,59,123,.12), transparent 28%),
      var(--bg);
}
.login-card {
    width: min(440px, 100%);
    background: white;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 34px;
    box-shadow: var(--shadow);
}
.login-card h1 { margin: 0; font-size: 30px; }

.photo-section {
    display: grid;
    grid-template-columns: 1fr minmax(240px, 340px);
    gap: 20px;
    align-items: start;
}
.cropper { display: grid; gap: 12px; }
.avatar-preview {
    width: 140px;
    height: 140px;
    border-radius: 28px;
    object-fit: cover;
    border: 4px solid var(--blue-soft);
}
.crop-controls { display: grid; gap: 10px; }
.crop-controls canvas {
    width: 220px;
    max-width: 100%;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: #eef3ff;
}
.hidden { display: none !important; }

.identity-card {
    max-width: 780px;
    margin: 0 auto;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.identity-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 28px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}
.identity-top p, .identity-top h2 { margin: 0; }
.identity-top .identity-logo {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}
.identity-body {
    display: flex;
    gap: 24px;
    padding: 28px;
}
.identity-info h3 { margin: 8px 0 16px; font-size: 28px; }
.identity-info p { margin: 8px 0; }
.id-number {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-weight: 800;
}
.identity-foot {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 28px;
    background: #fbfcff;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 850px) {
    .menu-toggle {
        display: inline-flex;
        border: 0;
        background: var(--blue-soft);
        color: var(--blue-dark);
        font-size: 24px;
        border-radius: 14px;
        width: 46px;
        height: 46px;
        align-items: center;
        justify-content: center;
    }
    .nav {
        display: none;
        position: absolute;
        left: 14px;
        right: 14px;
        top: 72px;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        background: white;
        border: 1px solid var(--border);
        border-radius: 20px;
        box-shadow: var(--shadow);
    }
    .nav.open { display: flex; }
    .page-head, .page-head.split, .profile-summary, .identity-body, .photo-section { flex-direction: column; display: flex; }
    .cards { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .searchbar { flex-direction: column; }
    .identity-photo { width: 140px; height: 140px; }
}


.identity-actions-bottom {
    width: min(100%, 960px);
    margin: -12px auto 34px;
    justify-content: flex-end;
}

@media print {
    .topbar, .footer, .page-head, .btn { display: none !important; }
    body { background: white; }
    .container { margin: 0; width: 100%; }
    .identity-card { box-shadow: none; }
}


/* Ajuste v1.9: logotipo real no tamanho correto */
.topbar .brand img,
.topbar img.brand-logo {
    width: 42px !important;
    height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    object-fit: contain !important;
}
.topbar .brand {
    min-width: 0;
}
.topbar .brand span {
    white-space: nowrap;
}
.identity-top img.identity-logo {
    width: 69px !important;
    height: 69px !important;
    max-width: 69px !important;
    max-height: 69px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    object-fit: contain !important;
}

/* Ajuste v2.0: filtros avançados em Associados */
.filters-card {
    padding: 18px;
}
.filters-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.filters-title h2 {
    margin: 0;
    font-size: 18px;
}
.filters-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) minmax(190px, 1fr) minmax(160px, .8fr) minmax(150px, .8fr);
    gap: 14px;
    align-items: end;
}
.filters-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.filters-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-weight: 600;
}
@media (max-width: 950px) {
    .filters-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 650px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

/* Ajuste v2.1: exclusões, filtros recolhidos e transferências */
.inline-form {
    display: inline-flex;
    margin: 0;
}
.btn.danger {
    color: var(--danger);
    border-color: #ffd2cc;
    background: #fff7f6;
}
.btn.danger:hover {
    background: #fff0ee;
}
.advanced-searchbar {
    margin-bottom: 12px;
}
.advanced-filters {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0;
    background: #fbfcff;
}
.advanced-filters summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 16px;
    color: var(--blue-dark);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.advanced-filters summary::-webkit-details-marker { display: none; }
.advanced-filters summary::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform .15s ease;
}
.advanced-filters[open] summary::after {
    transform: rotate(180deg);
}
.filters-grid-advanced {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    padding: 0 16px 14px;
}
.advanced-filters .filters-actions {
    padding: 0 16px 16px;
    margin-top: 0;
}
.transfer-alert {
    background: #eef3ff;
    color: var(--blue-dark);
    border: 1px solid #c9d8ff;
}
.section-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.section-title-row h2 {
    margin: 0;
}
.table-wrap.no-card {
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: 0;
    background: transparent;
}
.small-note {
    display: inline-block;
    max-width: 260px;
    font-size: 12px;
    line-height: 1.3;
}
@media (max-width: 650px) {
    .filters-grid-advanced {
        grid-template-columns: 1fr;
    }
    .section-title-row {
        flex-direction: column;
    }
}

/* Ajuste v2.2: ver como, notificações e carteira em tamanho CR80 */
.view-as-form {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fbfcff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}
.view-as-form select {
    width: auto;
    max-width: 190px;
    min-height: 34px;
    padding: 6px 28px 6px 10px;
    border-radius: 999px;
    font-size: 12px;
}
.view-as-form .btn.small {
    min-height: 32px;
    padding: 5px 10px;
}
.notification-widget {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.notification-bell {
    position: relative;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: white;
    cursor: pointer;
    font-size: 18px;
}
.notification-badge {
    position: absolute;
    right: -4px;
    top: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 800;
    border: 2px solid white;
}
.notification-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 50px;
    width: min(360px, calc(100vw - 28px));
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 10px;
    z-index: 30;
}
.notification-dropdown.open { display: block; }
.notification-dropdown-head,
.notification-dropdown-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px;
}
.notification-item {
    display: grid;
    gap: 4px;
    padding: 10px;
    border-radius: 14px;
    color: var(--text) !important;
}
.notification-item:hover { background: #fbfcff; }
.notification-item.unread { background: var(--blue-soft); }
.notification-item span,
.notification-item small { color: var(--muted); font-size: 12px; }
.notification-empty { padding: 10px; }
.notification-inbox { padding: 8px; }
.inbox-item { border-bottom: 1px solid var(--border); }
.inbox-item:last-child { border-bottom: 0; }
.inbox-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
}
.inbox-item a:hover { background: #fbfcff; }
.inbox-item.unread a { background: var(--blue-soft); }
.inbox-item p { margin: 4px 0; color: var(--muted); }
.notification-full { font-size: 17px; }
.recipient-select select[multiple] {
    min-height: 180px;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.info-grid div {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fbfcff;
}
.info-grid strong { color: var(--blue-dark); }
.info-grid span { color: var(--muted); }
@media (max-width: 1000px) {
    .nav {
        gap: 6px;
    }
    .view-as-form {
        width: 100%;
        border-radius: 16px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .view-as-form select {
        max-width: 100%;
        flex: 1 1 150px;
    }
    .notification-dropdown {
        right: auto;
        left: 0;
    }
}
@media (max-width: 850px) {
    .notification-widget {
        justify-content: flex-start;
    }
    .notification-dropdown {
        position: static;
        width: 100%;
        margin-top: 8px;
    }
    .info-grid { grid-template-columns: 1fr; }
}


.identity-actions-bottom {
    width: min(100%, 960px);
    margin: -12px auto 34px;
    justify-content: flex-end;
}

@media print {
    @page {
        size: 85.6mm 54mm;
        margin: 0;
    }
    html, body {
        width: 85.6mm;
        height: 54mm;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }
    .topbar, .footer, .page-head, .btn, .alert { display: none !important; }
    .container {
        width: 85.6mm !important;
        height: 54mm !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .identity-card {
        width: 85.6mm !important;
        height: 54mm !important;
        max-width: 85.6mm !important;
        min-width: 85.6mm !important;
        max-height: 54mm !important;
        min-height: 54mm !important;
        margin: 0 !important;
        border-radius: 3.5mm !important;
        border: .25mm solid #dfe6f1 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        overflow: hidden !important;
        display: grid !important;
        grid-template-rows: 17mm 29mm 8mm;
    }
    .identity-top {
        height: 17mm !important;
        padding: 3.5mm 4mm !important;
        gap: 3mm !important;
        align-items: center !important;
        background: linear-gradient(135deg, var(--blue), var(--blue-dark)) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .identity-top p {
        font-size: 6.5pt !important;
        line-height: 1.05 !important;
    }
    .identity-top h2 {
        font-size: 10pt !important;
        line-height: 1.1 !important;
    }
    .identity-top img.identity-logo {
        width: 10mm !important;
        height: 10mm !important;
        max-width: 10mm !important;
        max-height: 10mm !important;
    }
    .identity-body {
        height: 29mm !important;
        padding: 3.2mm 4mm !important;
        gap: 3.5mm !important;
        display: flex !important;
        align-items: flex-start !important;
    }
    .identity-photo {
        width: 20mm !important;
        height: 20mm !important;
        min-width: 20mm !important;
        border-radius: 3mm !important;
        border: .8mm solid var(--blue-soft) !important;
    }
    .identity-info {
        min-width: 0 !important;
        flex: 1 !important;
    }
    .id-number {
        font-size: 6.5pt !important;
        padding: 1mm 2mm !important;
    }
    .identity-info h3 {
        font-size: 10pt !important;
        line-height: 1.05 !important;
        margin: 1.5mm 0 1.8mm !important;
    }
    .identity-info p {
        font-size: 6.5pt !important;
        line-height: 1.15 !important;
        margin: .9mm 0 !important;
    }
    .identity-foot {
        height: 8mm !important;
        padding: 2mm 4mm !important;
        font-size: 5.8pt !important;
        align-items: center !important;
        background: #fbfcff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Ajuste v2.3: header mais limpo, sino azul, Ver como com ícone e impressão corrigida */
.view-as-form {
    gap: 6px;
    padding: 4px 7px;
    background: #ffffff;
}
.view-as-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    border-radius: 999px;
    background: var(--blue-soft);
    flex: 0 0 auto;
}
.view-as-form select {
    min-height: 32px;
}
.notification-bell {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--blue) !important;
    padding: 0 !important;
    box-shadow: none !important;
}
.notification-bell:hover {
    background: var(--blue-soft) !important;
    transform: none !important;
}
.notification-bell svg {
    width: 20px;
    height: 20px;
    display: block;
}
.notification-badge {
    right: -6px !important;
    top: -4px !important;
    min-width: 17px !important;
    height: 17px !important;
    padding: 0 4px !important;
    font-size: 10px !important;
    line-height: 17px !important;
}


.identity-actions-bottom {
    width: min(100%, 960px);
    margin: -12px auto 34px;
    justify-content: flex-end;
}

@media print {
    @page {
        size: 85.6mm 54mm;
        margin: 0;
    }
    html, body {
        width: 85.6mm !important;
        height: 54mm !important;
        min-width: 85.6mm !important;
        min-height: 54mm !important;
        max-width: 85.6mm !important;
        max-height: 54mm !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: white !important;
    }
    .topbar, .footer, .page-head, .btn, .alert {
        display: none !important;
    }
    .container {
        width: 85.6mm !important;
        height: 54mm !important;
        min-width: 85.6mm !important;
        min-height: 54mm !important;
        max-width: 85.6mm !important;
        max-height: 54mm !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    .identity-card {
        width: 85.6mm !important;
        height: 54mm !important;
        min-width: 85.6mm !important;
        min-height: 54mm !important;
        max-width: 85.6mm !important;
        max-height: 54mm !important;
        margin: 0 !important;
        border-radius: 3.5mm !important;
        border: .25mm solid #dfe6f1 !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
        overflow: hidden !important;
        display: grid !important;
        grid-template-rows: 17mm 29mm 8mm !important;
        background: white !important;
    }
    .identity-top {
        height: 17mm !important;
        min-height: 17mm !important;
        max-height: 17mm !important;
        padding: 3.4mm 4mm !important;
        gap: 3mm !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        color: white !important;
        background: linear-gradient(135deg, var(--blue), var(--blue-dark)) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        overflow: hidden !important;
    }
    .identity-top p {
        font-size: 6.4pt !important;
        line-height: 1.05 !important;
        margin: 0 !important;
        color: white !important;
    }
    .identity-top h2 {
        font-size: 10pt !important;
        line-height: 1.08 !important;
        margin: 0 !important;
        color: white !important;
    }
    .identity-top img.identity-logo {
        width: 10.5mm !important;
        height: 10.5mm !important;
        min-width: 10.5mm !important;
        min-height: 10.5mm !important;
        max-width: 10.5mm !important;
        max-height: 10.5mm !important;
        object-fit: contain !important;
    }
    .identity-body {
        height: 29mm !important;
        min-height: 29mm !important;
        max-height: 29mm !important;
        padding: 3.2mm 4mm !important;
        gap: 3.5mm !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        overflow: hidden !important;
    }
    .identity-photo {
        width: 20mm !important;
        height: 20mm !important;
        min-width: 20mm !important;
        min-height: 20mm !important;
        max-width: 20mm !important;
        max-height: 20mm !important;
        border-radius: 3mm !important;
        border: .8mm solid var(--blue-soft) !important;
        object-fit: cover !important;
        flex: 0 0 20mm !important;
    }
    .identity-info {
        min-width: 0 !important;
        flex: 1 1 auto !important;
        overflow: hidden !important;
        display: block !important;
    }
    .id-number {
        font-size: 6.2pt !important;
        padding: .8mm 1.8mm !important;
        line-height: 1.1 !important;
        display: inline-flex !important;
    }
    .identity-info h3 {
        font-size: 9.2pt !important;
        line-height: 1.05 !important;
        margin: 1.2mm 0 1.4mm !important;
        max-height: 10mm !important;
        overflow: hidden !important;
    }
    .identity-info p {
        font-size: 5.9pt !important;
        line-height: 1.12 !important;
        margin: .65mm 0 !important;
        display: block !important;
        color: var(--text) !important;
    }
    .identity-foot {
        height: 8mm !important;
        min-height: 8mm !important;
        max-height: 8mm !important;
        padding: 2mm 4mm !important;
        font-size: 5.8pt !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        background: #fbfcff !important;
        color: var(--muted) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}


/* Ajuste v2.4: permissões do Associado, identidade sem cabeçalho e diagnóstico de notificações */
.identity-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 18px;
}
.code-box {
    white-space: pre-wrap;
    word-break: break-word;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    overflow: auto;
    font-size: 13px;
}
.notification-bell {
    color: var(--blue) !important;
    border-radius: 999px !important;
}

.identity-actions-bottom {
    width: min(100%, 960px);
    margin: -12px auto 34px;
    justify-content: flex-end;
}

@media print {
    .identity-actions { display: none !important; }
}

/* Ajuste v2.5: notificações enviadas */
.button-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.sent-detail {
    display: grid;
    gap: 16px;
}
.sent-detail h2 {
    margin: 0;
}
.sent-inbox .sent-item a {
    align-items: center;
}
@media (max-width: 700px) {
    .button-row {
        width: 100%;
        justify-content: flex-start;
    }
}

/* v2.6 - role abaixo do nome na listagem de associados */
.person-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.person-name {
    font-weight: 600;
}
.person-roles {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
}


/* Ajuste v2.8: campos institucionais bloqueados para associado comum */
.locked-field,
input.locked-field,
select.locked-field,
textarea.locked-field,
input.locked-field:disabled,
select.locked-field:disabled,
textarea.locked-field:disabled,
input.locked-field[readonly],
textarea.locked-field[readonly] {
    background: #f3f4f6 !important;
    color: var(--muted) !important;
    border-color: var(--border) !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}
textarea.locked-field {
    resize: none;
}


/* Ajuste v2.10: cabeçalhos clicáveis para ordenação */
th .sortable-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
}
th .sortable-link:hover,
th .sortable-link.active {
    color: var(--blue-dark);
}
.sort-arrow {
    font-size: 11px;
    line-height: 1;
    opacity: .42;
    transform: translateY(-1px);
}
th .sortable-link.active .sort-arrow {
    opacity: .9;
}


/* v2.13 - notificações no header */
.nav-mobile-notifications { display: none !important; }
.nav-desktop-notifications { display: inline-flex !important; }

@media (max-width: 850px) {
    .nav-mobile-notifications { display: flex !important; }
    .nav-desktop-notifications { display: none !important; }
}

/* v2.14 - log de atividades */
.activity-table-wrap table {
    min-width: 980px;
}
.activity-details summary {
    cursor: pointer;
    color: var(--blue-dark);
    font-weight: 600;
}
.activity-changes {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    min-width: 220px;
}
.activity-change-item {
    display: grid;
    gap: 2px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcff;
    font-size: 13px;
}
.activity-change-item strong {
    color: var(--blue-dark);
}
.activity-change-item span {
    color: var(--muted);
}
.activity-change-item em {
    color: var(--text);
    font-style: normal;
    font-weight: 600;
}

/* v2.16 - dirigentes da Congregação */
.dirigentes-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.dirigente-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fbfcff;
    min-width: 0;
}
.dirigente-card.is-empty {
    background: #f8fafc;
}
.dirigente-photo {
    width: 74px;
    height: 74px;
    object-fit: cover;
    border-radius: 20px;
    border: 3px solid var(--blue-soft);
}
.dirigente-info {
    display: grid;
    gap: 6px;
    min-width: 0;
}
.dirigente-info h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
    color: var(--text);
}
.dirigente-info p {
    margin: 0;
}
.dirigente-select {
    font-size: 13px;
}
.dirigente-select select {
    font-size: 13px;
    padding: 10px 12px;
}
@media (max-width: 1050px) {
    .dirigentes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 650px) {
    .dirigentes-grid {
        grid-template-columns: 1fr;
    }
    .dirigente-card {
        grid-template-columns: 74px 1fr;
        align-items: center;
    }
    .dirigente-card .dirigente-select {
        grid-column: 1 / -1;
    }
}


/* v2.17 - dirigentes no dashboard da Congregação do associado */
.congregation-dirigentes {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.compact-title-row {
    margin-bottom: 12px;
}
.compact-title-row h3 {
    margin: 0;
    font-size: 20px;
}
.dashboard-dirigentes-grid .dirigente-card {
    background: white;
}
@media (max-width: 650px) {
    .dashboard-dirigentes-grid .dirigente-card {
        grid-template-columns: 74px 1fr;
        align-items: center;
    }
}

/* v2.19 - Clube de benefícios */
.club-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px;
}
.filter-tag.active {
    background: var(--blue);
    color: #fff;
}
.club-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.club-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.club-card h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
}
.club-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.club-discount {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: #e9f7ee;
    color: var(--success);
    font-weight: 800;
}
.detail-discount {
    margin-top: 10px;
}
.club-percent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 76px;
    border-radius: 24px;
    background: var(--blue);
    color: #fff;
    font-size: 24px;
    font-weight: 950;
}
.club-provider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}
.club-provider img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 16px;
    border: 3px solid var(--blue-soft);
    flex: 0 0 auto;
}
.club-provider div {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.club-provider span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}
.detail-provider {
    margin: 18px 0;
}
.detail-provider img {
    width: 74px;
    height: 74px;
    border-radius: 22px;
}
.content-text h2 {
    margin: 22px 0 8px;
}
.content-text p {
    margin-top: 0;
}
.club-mini-list {
    display: grid;
    gap: 10px;
}
.club-mini-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fbfcff;
}
.club-mini-item:hover {
    background: var(--blue-soft);
}
.club-mini-item span:first-child {
    display: grid;
    gap: 2px;
}
.club-mini-item small {
    color: var(--muted);
}
.pill.warn {
    background: #fff7e6;
    color: #9a5b00;
}
.pill.muted {
    background: #eef1f6;
    color: var(--muted);
}
.reject-form {
    gap: 8px;
    flex-wrap: wrap;
}
.reject-form input[type="text"] {
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    min-width: 220px;
}
@media (max-width: 1000px) {
    .club-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 650px) {
    .club-grid {
        grid-template-columns: 1fr;
    }
    .club-card-head,
    .club-mini-item {
        align-items: flex-start;
        flex-direction: column;
    }
    .club-percent {
        min-width: 58px;
        min-height: 58px;
        border-radius: 18px;
        font-size: 19px;
    }
}

/* v2.20 - ajustes de busca e formulário do Clube */
.club-search-card {
    display: grid;
    gap: 12px;
}
.club-simple-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}
.club-simple-search input[type="search"] {
    min-height: 52px;
    font-size: 16px;
}
.club-advanced {
    margin-top: 2px;
}
.club-results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 2px 0 16px;
}
.club-results-head h2 {
    margin: 0;
}
.club-sort-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.club-sort-form label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}
.club-sort-form select {
    width: auto;
    min-width: 190px;
    border-radius: 999px;
    padding: 9px 34px 9px 13px;
}
@media (max-width: 650px) {
    .club-simple-search {
        grid-template-columns: 1fr;
    }
    .club-results-head {
        flex-direction: column;
        align-items: stretch;
    }
    .club-sort-form,
    .club-sort-form label,
    .club-sort-form select {
        width: 100%;
    }
}

/* v2.21 - detalhe do Clube com layout marketplace */
.club-detail-head { margin-bottom: 18px; }
.club-market-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.club-market-main, .club-market-side { display: grid; gap: 18px; }
.club-market-side { position: sticky; top: 92px; }
.club-offer-card { padding: 28px; background: radial-gradient(circle at 92% 16%, rgba(17,59,123,.12), transparent 28%), linear-gradient(135deg, #ffffff, #fbfcff); }
.club-offer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.club-offer-top > div { display: flex; flex-wrap: wrap; gap: 8px; }
.club-percent-large { min-width: 92px; min-height: 92px; border-radius: 28px; font-size: 30px; box-shadow: 0 16px 34px rgba(17, 59, 123, .20); }
.club-offer-body { display: grid; gap: 14px; }
.club-offer-label { margin: 0 0 6px; color: var(--muted); font-size: 13px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.club-offer-discount { display: block; font-size: clamp(30px, 5vw, 48px); line-height: 1.02; color: var(--blue-dark); }
.club-description-card h2, .club-info-card h2, .club-location-card h2, .club-contact-card h3, .club-meta-card h3 { margin: 0 0 12px; }
.club-description-card p { margin: 0; font-size: 17px; }
.club-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.club-detail-item { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: #fbfcff; }
.club-detail-item span { color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.club-detail-item strong { color: var(--text); font-size: 16px; }
.club-location-line { display: flex; align-items: center; gap: 14px; }
.club-location-icon { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; border-radius: 18px; background: var(--blue-soft); color: var(--blue); font-size: 24px; font-weight: 800; flex: 0 0 auto; }
.club-location-line div { display: grid; gap: 3px; }
.club-location-line span:not(.club-location-icon) { color: var(--muted); font-size: 13px; }
.club-contact-card { display: grid; gap: 18px; }
.club-provider-large { align-items: flex-start; margin: 0; }
.club-provider-large img { width: 84px; height: 84px; border-radius: 26px; }
.club-provider-large strong { font-size: 19px; line-height: 1.15; }
.club-contact-actions { display: grid; gap: 10px; }
.club-contact-list { display: grid; gap: 10px; padding-top: 2px; }
.club-contact-list p, .club-meta-card p { display: grid; gap: 3px; margin: 0; padding: 12px 0; border-top: 1px solid var(--border); }
.club-contact-list strong, .club-meta-card strong { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.club-contact-list span, .club-contact-list a, .club-meta-card span { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.club-trust-box { display: grid; gap: 4px; padding: 14px; border-radius: 18px; background: #e9f7ee; color: var(--success); border: 1px solid #bee8cb; }
.club-trust-box span { font-size: 13px; color: #286b3d; }
.club-meta-card { display: grid; gap: 4px; box-shadow: none; }
.club-management-card { margin-top: 20px; }
@media (max-width: 980px) { .club-market-layout { grid-template-columns: 1fr; } .club-market-side { position: static; } }
@media (max-width: 650px) { .club-offer-card { padding: 22px; } .club-offer-top { flex-direction: column; } .club-percent-large { min-width: 72px; min-height: 72px; border-radius: 22px; font-size: 24px; } .club-detail-grid { grid-template-columns: 1fr; } .club-provider-large img { width: 72px; height: 72px; } }

/* v2.22 - detalhe do Clube no estilo vitrine, conforme layout aprovado */
.club-detail-head {
    max-width: 1160px;
    margin: 0 auto 18px;
}
.club-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: stretch;
    max-width: 1160px;
    margin: 0 auto 20px;
}
.club-detail-main {
    display: grid;
    gap: 18px;
}
.compact-offer-card {
    display: grid;
    gap: 18px;
    min-height: 158px;
    padding: 24px;
    background: #fff;
}
.club-offer-inline {
    display: flex;
    align-items: center;
    gap: 18px;
}
.club-percent-detail {
    min-width: 76px;
    min-height: 76px;
    border-radius: 22px;
    font-size: 26px;
    box-shadow: 0 14px 28px rgba(17, 59, 123, .18);
}
.club-offer-inline strong {
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.08;
    color: var(--text);
}
.club-detail-sidebar {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 18px;
    min-height: 100%;
    margin: 0;
    padding: 24px;
}
.club-provider-detail {
    align-items: center;
    margin: 0;
}
.club-provider-detail img {
    width: 58px;
    height: 58px;
    border-radius: 16px;
}
.club-provider-detail strong {
    font-size: 17px;
    line-height: 1.2;
}
.club-sidebar-section {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}
.club-sidebar-section h2 {
    margin: 0;
    font-size: 26px;
}
.club-sidebar-section strong {
    font-size: 16px;
}
.club-description-card {
    min-height: 150px;
    display: grid;
    align-content: center;
}
.club-description-card h2 {
    font-size: 26px;
}
.club-management-card,
.club-related-section {
    max-width: 1160px;
    margin-left: auto;
    margin-right: auto;
}
.club-related-section {
    margin-top: 28px;
}
.club-related-section h2 {
    margin: 0 0 18px;
    font-size: 28px;
}
.club-related-section .club-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 980px) {
    .club-detail-layout {
        grid-template-columns: 1fr;
    }
    .club-detail-sidebar {
        min-height: auto;
    }
}
@media (max-width: 650px) {
    .club-detail-head {
        display: grid;
    }
    .club-detail-head h1 {
        font-size: 34px;
    }
    .club-offer-inline {
        align-items: flex-start;
        flex-direction: column;
    }
    .club-percent-detail {
        min-width: 70px;
        min-height: 70px;
        border-radius: 20px;
        font-size: 23px;
    }
    .club-related-section .club-grid {
        grid-template-columns: 1fr;
    }
}


/* v2.27 - Aniversariantes no dashboard */
.birthday-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-color: #c9d8ff;
    background:
      radial-gradient(circle at 92% 12%, rgba(17,59,123,.14), transparent 26%),
      linear-gradient(135deg, #ffffff, #eef3ff);
}
.birthday-hero h2 {
    margin: 0 0 8px;
    font-size: clamp(25px, 3vw, 34px);
    color: var(--blue-dark);
}
.birthday-hero p:last-child {
    margin: 0;
    color: #26344f;
    font-weight: 650;
}
.birthday-week-card .section-title-row {
    margin-bottom: 18px;
}
.birthday-week-list {
    display: grid;
    gap: 10px;
}
.birthday-row {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fbfcff;
}
.birthday-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
}
.birthday-person {
    min-width: 0;
    line-height: 1.35;
}
.birthday-person strong {
    color: var(--text);
}
@media (max-width: 650px) {
    .birthday-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .birthday-date {
        justify-content: flex-start;
        width: max-content;
    }
}


/* v2.32 - remove sombras amarelas dos botões */
:root {
    --blue: #113b7b;
    --blue-dark: #113b7b;
    --blue-soft: #eef3fb;
    --accent: #ffbf00;
    --shadow: 0 14px 34px rgba(17, 59, 123, .09);
}

.topbar {
    border-bottom: 2px solid rgba(255, 191, 0, .45);
}

.nav a.active,
.nav a:hover {
    box-shadow: inset 0 -2px 0 var(--accent);
}

.btn.primary {
    background: var(--blue);
    border-color: var(--blue);
    box-shadow: none;
}

.btn.primary:hover {
    box-shadow: 0 10px 22px rgba(17, 59, 123, .16);
}

.eyebrow::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 2px;
    background: var(--accent);
    vertical-align: 1px;
}

.card,
.login-card,
.identity-card,
.filters-card,
.advanced-filters,
.notification-dropdown,
.permissions-box,
.info-grid div,
.code-box,
.inbox-item a,
.club-card,
.club-detail-main,
.club-detail-sidebar,
.club-related-section .club-card,
.club-benefit-card,
.club-contact-card,
.club-info-card,
.club-location-card,
.club-service-card,
.birthday-hero,
.birthday-week-card {
    border-radius: 16px !important;
}

input,
select,
textarea,
.searchbar input,
.view-as-form select,
.crop-controls canvas,
.avatar-preview,
.avatar-lg,
.avatar-sm,
.identity-photo,
.birthday-row,
.notification-item,
.login-logo,
.brand-logo {
    border-radius: 10px !important;
}

.btn,
.nav a,
.pill,
.filter-tag,
.id-number,
.view-as-form,
.notification-bell,
.notification-badge,
.birthday-date,
.club-category-pill,
.club-status-pill,
.club-discount-pill,
.club-meta-pill,
.club-percent-detail {
    border-radius: 10px !important;
}

.menu-toggle {
    border-radius: 10px !important;
}

.identity-top {
    background: linear-gradient(135deg, var(--blue), #0b2c5e) !important;
}

.birthday-hero {
    border-color: rgba(255, 191, 0, .65) !important;
    background:
      radial-gradient(circle at 92% 12%, rgba(255, 191, 0, .16), transparent 26%),
      linear-gradient(135deg, #ffffff, #eef3fb) !important;
}

.alert.success,
.pill.ok,
.club-status-active,
.notification-item.unread {
    border-left: 4px solid var(--accent);
}


.identity-actions-bottom {
    width: min(100%, 960px);
    margin: -12px auto 34px;
    justify-content: flex-end;
}

@media print {
    .identity-card {
        border-radius: 2mm !important;
    }
    .identity-photo {
        border-radius: 2mm !important;
    }
}

/* v2.34 - Ajustes na carteira de identidade associativa */
.identity-cin-wrap {
    display: flex;
    justify-content: center;
    margin: 10px auto 34px;
}
.identity-cin-card {
    position: relative;
    width: min(100%, 960px);
    min-height: 590px;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(17, 59, 123, .055) 0 25%, transparent 25% 50%, rgba(17, 59, 123, .045) 50% 75%, transparent 75%) 0 0 / 34px 34px,
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #cbd7e8;
    border-radius: 14px;
    box-shadow: 0 20px 46px rgba(17, 59, 123, .12);
    color: var(--text);
}
.identity-cin-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 191, 0, .18), transparent 22%),
        radial-gradient(circle at 82% 82%, rgba(17, 59, 123, .12), transparent 26%);
    pointer-events: none;
}
.identity-cin-watermark {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    opacity: .045;
}
.identity-cin-watermark img {
    width: 330px;
    height: 330px;
    object-fit: contain;
}
.identity-cin-header,
.identity-cin-strip,
.identity-cin-main,
.identity-cin-footer {
    position: relative;
    z-index: 1;
}
.identity-cin-header {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 26px;
    color: #fff;
    background: linear-gradient(135deg, #113b7b 0%, #0b2c5e 100%);
    border-bottom: 5px solid var(--accent);
}
.identity-cin-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.identity-cin-brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    padding: 6px;
    flex: 0 0 auto;
}
.identity-cin-brand span,
.identity-cin-registry small {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    opacity: .86;
}
.identity-cin-brand strong {
    display: block;
    margin-top: 3px;
    font-size: clamp(22px, 3.2vw, 34px);
    line-height: 1.05;
    letter-spacing: -.03em;
}
.identity-cin-registry {
    min-width: 170px;
    text-align: center;
}
.identity-cin-registry strong {
    display: block;
    margin-top: 2px;
    font-size: 30px;
    line-height: 1;
    letter-spacing: .08em;
}
.identity-cin-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 26px;
    background: rgba(255, 191, 0, .22);
    color: #0f2b53;
    border-bottom: 1px solid rgba(17, 59, 123, .12);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.identity-cin-main {
    display: grid;
    grid-template-columns: 185px 1fr;
    gap: 22px;
    padding: 26px;
    align-items: stretch;
}
.identity-cin-photo-col {
    display: grid;
    grid-template-rows: auto auto;
    gap: 14px;
    align-content: start;
}
.identity-cin-photo {
    width: 170px;
    height: 215px;
    object-fit: cover;
    border-radius: 10px;
    border: 4px solid #fff;
    outline: 1px solid #b8c7dc;
    box-shadow: 0 12px 24px rgba(17, 59, 123, .14);
    background: #eef3fb;
}
.identity-cin-idblock {
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #cbd7e8;
}
.identity-cin-idblock span,
.identity-cin-name span,
.identity-cin-grid span,
.identity-cin-congregacao span,
.identity-cin-footer span {
    display: block;
    color: #516179;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.identity-cin-idblock strong {
    color: #113b7b;
    font-size: 26px;
    letter-spacing: .08em;
    line-height: 1;
}
.identity-cin-data {
    min-width: 0;
    display: grid;
    gap: 14px;
    align-content: start;
}
.identity-cin-name {
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #cbd7e8;
    border-left: 5px solid #113b7b;
    border-radius: 10px;
}
.identity-cin-name strong {
    display: block;
    margin-top: 3px;
    color: #0f2342;
    font-size: clamp(24px, 3.4vw, 38px);
    line-height: 1.03;
    letter-spacing: -.035em;
}
.identity-cin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.identity-cin-grid > div,
.identity-cin-congregacao {
    min-width: 0;
    padding: 10px 12px;
    background: rgba(255,255,255,.86);
    border: 1px solid #d9e3f2;
    border-radius: 10px;
}
.identity-cin-grid strong,
.identity-cin-congregacao strong {
    display: block;
    margin-top: 3px;
    color: #172033;
    font-size: 15px;
    line-height: 1.16;
    word-break: break-word;
}
.identity-cin-congregacao {
    border-left: 5px solid var(--accent);
}
.identity-cin-congregacao strong {
    color: #113b7b;
    font-size: 18px;
}
.identity-cin-grid-bottom {
    grid-template-columns: 1fr 1fr 1.2fr;
}
.identity-cin-footer {
    display: block;
    padding: 14px 26px 16px;
    background: rgba(255,255,255,.78);
    border-top: 1px solid #d9e3f2;
}
.identity-cin-footer strong {
    display: block;
    min-height: 28px;
    padding-top: 5px;
    border-bottom: 1px solid #73839c;
    color: #113b7b;
    font-size: 15px;
}
.identity-cin-footer p {
    margin: 0;
    color: #516179;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
}

@media (max-width: 850px) {
    .identity-cin-card {
        min-height: 0;
    }
    .identity-cin-header,
    .identity-cin-strip,
    .identity-cin-main,
    .identity-cin-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    .identity-cin-header,
    .identity-cin-strip,
    .identity-cin-footer {
        align-items: flex-start;
        flex-direction: column;
    }
    .identity-cin-registry {
        text-align: left;
    }
    .identity-cin-main {
        grid-template-columns: 1fr;
    }
    .identity-cin-photo-col {
        grid-template-columns: auto 1fr;
        align-items: end;
    }
    .identity-cin-photo {
        width: 130px;
        height: 165px;
    }
    .identity-cin-grid,
    .identity-cin-grid-bottom,
    .identity-cin-footer {
        grid-template-columns: 1fr;
    }
    .identity-cin-footer p {
        text-align: left;
    }
}


.identity-actions-bottom {
    width: min(100%, 960px);
    margin: -12px auto 34px;
    justify-content: flex-end;
}

@media print {
    @page {
        size: 85.6mm 54mm;
        margin: 0;
    }
    html, body {
        width: 85.6mm !important;
        height: 54mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }
    .topbar,
    .footer,
    .page-head,
    .identity-actions,
    .alert {
        display: none !important;
    }
    .container,
    .identity-cin-wrap {
        width: 85.6mm !important;
        height: 54mm !important;
        min-width: 85.6mm !important;
        min-height: 54mm !important;
        max-width: 85.6mm !important;
        max-height: 54mm !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        display: block !important;
    }
    .identity-cin-card {
        width: 85.6mm !important;
        height: 54mm !important;
        min-width: 85.6mm !important;
        min-height: 54mm !important;
        max-width: 85.6mm !important;
        max-height: 54mm !important;
        margin: 0 !important;
        border-radius: 2mm !important;
        border: .25mm solid #cbd7e8 !important;
        box-shadow: none !important;
        display: grid !important;
        grid-template-rows: 10.8mm 4.2mm 34.8mm 4.2mm !important;
        overflow: hidden !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .identity-cin-card::before,
    .identity-cin-watermark {
        display: none !important;
    }
    .identity-cin-header {
        min-height: 0 !important;
        height: 10.8mm !important;
        padding: 1.7mm 2.4mm !important;
        border-bottom: .9mm solid var(--accent) !important;
        gap: 2mm !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    .identity-cin-brand {
        gap: 1.8mm !important;
    }
    .identity-cin-brand img {
        width: 7.2mm !important;
        height: 7.2mm !important;
        border-radius: 1.2mm !important;
        padding: .7mm !important;
    }
    .identity-cin-brand span,
    .identity-cin-registry small {
        font-size: 4.8pt !important;
        line-height: 1 !important;
        letter-spacing: .08em !important;
    }
    .identity-cin-brand strong {
        font-size: 7.4pt !important;
        line-height: 1.05 !important;
    }
    .identity-cin-registry {
        min-width: 14mm !important;
        text-align: right !important;
    }
    .identity-cin-registry strong {
        font-size: 8pt !important;
    }
    .identity-cin-strip {
        height: 4.2mm !important;
        padding: .85mm 2.4mm !important;
        display: flex !important;
        flex-direction: row !important;
        font-size: 4.2pt !important;
        line-height: 1 !important;
        overflow: hidden !important;
    }
    .identity-cin-main {
        height: 34.8mm !important;
        padding: 2mm 2.4mm !important;
        display: grid !important;
        grid-template-columns: 18mm 1fr !important;
        gap: 2mm !important;
        overflow: hidden !important;
    }
    .identity-cin-photo-col {
        gap: 1.3mm !important;
        display: grid !important;
        grid-template-rows: auto auto !important;
    }
    .identity-cin-photo {
        width: 17.2mm !important;
        height: 21.5mm !important;
        border-radius: 1.4mm !important;
        border: .6mm solid #fff !important;
        outline: .2mm solid #b8c7dc !important;
        box-shadow: none !important;
    }
    .identity-cin-idblock {
        padding: .9mm 1mm !important;
        border-radius: 1mm !important;
        gap: 0 !important;
    }
    .identity-cin-idblock span,
    .identity-cin-name span,
    .identity-cin-grid span,
    .identity-cin-congregacao span,
    .identity-cin-validation span,
    .identity-cin-footer span {
        font-size: 3.5pt !important;
        letter-spacing: .05em !important;
        line-height: 1 !important;
    }
    .identity-cin-idblock strong {
        font-size: 6pt !important;
    }
    .identity-cin-data {
        gap: 1mm !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    .identity-cin-name {
        padding: .9mm 1.2mm !important;
        border-left: .8mm solid #113b7b !important;
        border-radius: 1mm !important;
    }
    .identity-cin-name strong {
        font-size: 8pt !important;
        line-height: 1.02 !important;
        max-height: 8.2mm !important;
        overflow: hidden !important;
    }
    .identity-cin-grid {
        gap: .8mm !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .identity-cin-grid > div,
    .identity-cin-congregacao {
        padding: .7mm .9mm !important;
        border-radius: 1mm !important;
    }
    .identity-cin-grid strong,
    .identity-cin-congregacao strong {
        font-size: 4.7pt !important;
        line-height: 1.05 !important;
        margin-top: .4mm !important;
        max-height: 5mm !important;
        overflow: hidden !important;
    }
    .identity-cin-congregacao {
        border-left: .8mm solid var(--accent) !important;
    }
    .identity-cin-congregacao strong {
        font-size: 5.5pt !important;
    }
    .identity-cin-grid-bottom {
        grid-template-columns: 1fr 1fr 1fr !important;
    }
    .identity-cin-footer {
        height: 4.2mm !important;
        padding: .8mm 2.4mm !important;
        display: block !important;
    }
    .identity-cin-footer strong {
        min-height: 3.3mm !important;
        padding-top: .3mm !important;
        font-size: 4.4pt !important;
        line-height: 1 !important;
    }
    .identity-cin-footer p {
        font-size: 3.4pt !important;
        line-height: 1.08 !important;
        text-align: center !important;
    }
}

/* v2.35 - ajustes finais da carteira de identidade */
.identity-cin-card {
    grid-template-rows: auto 1fr auto;
}
.identity-cin-brand img {
    background: transparent;
    border-radius: 0;
    padding: 0;
}
.identity-actions-bottom {
    justify-content: center;
    gap: 26px;
    margin: 18px auto 38px;
}
.identity-actions-bottom .btn {
    min-width: 128px;
    justify-content: center;
}

@media (max-width: 850px) {
    .identity-cin-wrap {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 0 14px;
        margin-left: calc(-1 * var(--container-pad, 0px));
        margin-right: calc(-1 * var(--container-pad, 0px));
    }
    .identity-cin-card {
        width: 620px;
        min-width: 620px;
        min-height: 0;
        aspect-ratio: 85.6 / 54;
        grid-template-rows: 72px 1fr auto;
    }
    .identity-cin-header,
    .identity-cin-main,
    .identity-cin-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    .identity-cin-header,
    .identity-cin-footer {
        flex-direction: row;
        align-items: center;
    }
    .identity-cin-brand {
        gap: 12px;
    }
    .identity-cin-brand img {
        width: 48px;
        height: 48px;
    }
    .identity-cin-brand span {
        font-size: 9px;
        letter-spacing: .10em;
    }
    .identity-cin-brand strong {
        font-size: 18px;
        line-height: 1.05;
    }
    .identity-cin-main {
        grid-template-columns: 125px 1fr;
        gap: 14px;
        padding-top: 16px;
        padding-bottom: 16px;
    }
    .identity-cin-photo-col {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        align-items: start;
        gap: 10px;
    }
    .identity-cin-photo {
        width: 118px;
        height: 150px;
    }
    .identity-cin-idblock {
        padding: 8px 10px;
    }
    .identity-cin-idblock strong {
        font-size: 18px;
    }
    .identity-cin-data {
        gap: 9px;
    }
    .identity-cin-name {
        padding: 9px 10px;
    }
    .identity-cin-name strong {
        font-size: 20px;
        line-height: 1.05;
        max-height: 44px;
        overflow: hidden;
    }
    .identity-cin-grid,
    .identity-cin-grid-bottom {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }
    .identity-cin-grid > div,
    .identity-cin-congregacao {
        padding: 7px 8px;
    }
    .identity-cin-idblock span,
    .identity-cin-name span,
    .identity-cin-grid span,
    .identity-cin-congregacao span,
    .identity-cin-footer span {
        font-size: 8px;
        letter-spacing: .06em;
    }
    .identity-cin-grid strong,
    .identity-cin-congregacao strong {
        font-size: 11px;
        line-height: 1.08;
        max-height: 28px;
        overflow: hidden;
    }
    .identity-cin-congregacao strong {
        font-size: 12px;
    }
    .identity-cin-footer {
        padding-top: 8px;
        padding-bottom: 9px;
    }
    .identity-cin-footer p {
        font-size: 9px;
        text-align: center;
    }
    .identity-actions-bottom {
        justify-content: center;
        gap: 22px;
        margin-top: 16px;
    }
}

@media print {
    .identity-cin-card {
        grid-template-rows: 10.8mm 39mm 4.2mm !important;
    }
    .identity-cin-main {
        height: 39mm !important;
    }
    .identity-cin-header {
        height: 10.8mm !important;
    }
    .identity-cin-footer {
        height: 4.2mm !important;
    }
    .identity-cin-brand img {
        background: transparent !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }
}


/* v2.37 - ajuste mobile conservador da carteira de identidade
   Desktop permanece como na v2.35. No mobile, apenas compacta a carteira:
   foto + nome/ID/CPF/RG no topo e demais campos em duas colunas. */
.identity-cin-mobile-summary {
    display: none;
}

@media (max-width: 850px) {
    .identity-cin-wrap {
        justify-content: center;
        overflow: visible;
        padding: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .identity-cin-card {
        width: min(100%, 390px);
        min-width: 0;
        aspect-ratio: auto;
        min-height: 0;
        grid-template-rows: auto 1fr auto;
    }

    .identity-cin-header {
        min-height: 0;
        padding: 13px 14px 11px;
    }

    .identity-cin-header,
    .identity-cin-footer {
        padding-left: 14px;
        padding-right: 14px;
        flex-direction: row;
        align-items: center;
    }

    .identity-cin-brand {
        gap: 10px;
    }

    .identity-cin-brand img {
        width: 42px;
        height: 42px;
    }

    .identity-cin-brand span {
        font-size: 8px;
        letter-spacing: .08em;
    }

    .identity-cin-brand strong {
        font-size: 15px;
        line-height: 1.05;
    }

    .identity-cin-main {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 14px 14px;
    }

    .identity-cin-photo-col {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        grid-template-rows: auto;
        align-items: start;
        gap: 10px;
    }

    .identity-cin-photo {
        width: 96px;
        height: 122px;
        border-width: 3px;
        border-radius: 8px;
    }

    .identity-cin-photo-col > .identity-cin-idblock {
        display: none;
    }

    .identity-cin-mobile-summary {
        display: grid;
        gap: 6px;
        min-width: 0;
    }

    .identity-cin-mobile-name {
        padding: 7px 8px;
        background: #fff;
        border: 1px solid #cbd7e8;
        border-left: 4px solid #113b7b;
        border-radius: 8px;
        min-width: 0;
    }

    .identity-cin-mobile-name span,
    .identity-cin-mobile-grid span {
        display: block;
        color: #516179;
        font-size: 7px;
        font-weight: 800;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .identity-cin-mobile-name strong {
        display: block;
        margin-top: 2px;
        color: #0f2342;
        font-size: 15px;
        line-height: 1.04;
        max-height: 33px;
        overflow: hidden;
        letter-spacing: -.025em;
    }

    .identity-cin-mobile-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .identity-cin-mobile-grid > div {
        min-width: 0;
        padding: 6px 7px;
        background: rgba(255,255,255,.9);
        border: 1px solid #d9e3f2;
        border-radius: 8px;
    }

    .identity-cin-mobile-grid > div:first-child {
        border-left: 4px solid var(--accent);
    }

    .identity-cin-mobile-grid strong {
        display: block;
        margin-top: 2px;
        color: #172033;
        font-size: 10px;
        line-height: 1.05;
        word-break: break-word;
    }

    .identity-cin-mobile-grid > div:first-child strong {
        color: #113b7b;
        font-size: 14px;
        letter-spacing: .04em;
    }

    .identity-cin-data {
        gap: 8px;
    }

    .identity-cin-data > .identity-cin-name {
        display: none;
    }

    .identity-cin-grid,
    .identity-cin-grid-bottom {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .identity-cin-grid > div:nth-child(1),
    .identity-cin-grid > div:nth-child(2) {
        display: none;
    }

    .identity-cin-grid > div,
    .identity-cin-congregacao {
        padding: 7px 8px;
        border-radius: 8px;
    }

    .identity-cin-idblock span,
    .identity-cin-name span,
    .identity-cin-grid span,
    .identity-cin-congregacao span,
    .identity-cin-footer span {
        font-size: 7px;
        letter-spacing: .05em;
    }

    .identity-cin-grid strong,
    .identity-cin-congregacao strong {
        font-size: 10px;
        line-height: 1.08;
        max-height: none;
    }

    .identity-cin-congregacao strong {
        font-size: 11px;
    }

    .identity-cin-grid-bottom > div:nth-child(3) {
        grid-column: span 2;
    }

    .identity-cin-footer {
        padding-top: 8px;
        padding-bottom: 9px;
    }

    .identity-cin-footer p {
        font-size: 8px;
        line-height: 1.25;
        text-align: center;
    }

    .identity-actions-bottom {
        justify-content: center;
        gap: 18px;
        margin-top: 14px;
    }
}


/* v2.38 - fonte padrão Montserrat e troca de font-weight 800 para 600 */


/* v2.39 - mantém Montserrat como fonte padrão */


/* v2.40 - corrige seta do summary e ajusta font-weight 750/900 */


/* v2.41 - seta do filtro avançado desenhada com CSS, sem caractere no content */
