/* =========================================================
   Estilos Gerais do Sistema SINDCG-PB e Carteira PVC CR-80
   ========================================================= */

:root {
    --sind-blue-dark: #0c1b47;
    --sind-blue: #1a3680;
    --sind-red: #7a1215;
    --card-bg: #f8fafc;
}

body {
    background-color: #f1f5f9;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1e293b;
}

.navbar-sindcg {
    background: linear-gradient(90deg, #0b173d 0%, #172e6e 60%, #631013 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.navbar-brand img {
    height: 44px;
    width: auto;
    border-radius: 50%;
}

/* Força exibição em maiúsculas nos inputs de texto cadastrais */
.uppercase-input {
    text-transform: uppercase;
}

/* =========================================================
   LAYOUT EXATO DA CARTEIRA CR-80 (85.6mm x 54mm)
   ========================================================= */
.cr80-card-wrapper {
    display: inline-block;
    filter: drop-shadow(0 8px 22px rgba(15, 23, 42, 0.18));
}

.cr80-card {
    width: 85.6mm;
    height: 54mm;
    /* Fundo Azul-Gelo Institucional (#eef4ff) liso e limpo */
    background-color: #eef4ff;
    position: relative;
    overflow: hidden;
    border-radius: 3.18mm; /* Raio oficial CR-80 */
    border: 0.25mm solid #d0def5;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    color: #0f172a;
    text-transform: uppercase;
    user-select: none;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

/* Coluna branca vertical à direita onde ficam o QR Code e o Código */
.cr80-qr-pillar {
    position: absolute;
    right: 3.8mm;
    top: 15.2mm;
    bottom: 3.5mm;
    width: 17.8mm;
    background: #ffffff;
    border: 0.25mm solid #d8e2f0;
    border-radius: 1.4mm;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5mm 0.8mm;
    box-sizing: border-box;
    box-shadow: 0 0.5mm 1.5mm rgba(15, 23, 42, 0.06);
}

/* Cabeçalho: Topo Esquerdo (Logo SINDCG-PB + Nome Maior) e Topo Direito (Logo CNTV) */
.cr80-header {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2.4mm 3.8mm 1.0mm 3.8mm;
    height: 13.0mm;
    box-sizing: border-box;
}

.cr80-header-left {
    display: flex;
    align-items: center;
    gap: 2.0mm;
    max-width: 55mm;
}

.cr80-logo-sindcg {
    width: 9.6mm;
    height: 9.6mm;
    object-fit: contain;
    flex-shrink: 0;
}

.cr80-sind-title {
    display: flex;
    flex-direction: column;
    line-height: 1.08;
}

.cr80-sind-acronym {
    font-size: 3.35mm;
    font-weight: 900;
    color: #0c235a;
    letter-spacing: -0.04mm;
}

.cr80-sind-name {
    font-size: 2.05mm;
    font-weight: 800;
    color: #1e3a8a;
    text-transform: uppercase;
    letter-spacing: -0.03mm;
}

.cr80-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.cr80-logo-cntv {
    height: 7.4mm;
    width: auto;
    max-width: 23.5mm;
    object-fit: contain;
}

/* Nome do sócio em destaque abaixo do cabeçalho (mais abaixo para melhor distribuição vertical) */
.cr80-member-name {
    position: relative;
    z-index: 3;
    padding: 1.4mm 23mm 1.3mm 4.2mm;
    font-size: 3.2mm;
    font-weight: 900;
    color: #0f172a;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
}

/* Corpo principal (Esquerda: Foto 3x4 | Centro: Dados posicionados mais abaixo) */
.cr80-body {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: flex-start;
    padding: 0.4mm 22.6mm 0 4.2mm;
    gap: 2.6mm;
}

/* Foto 3x4 à esquerda */
.cr80-photo-box {
    width: 19.5mm;
    height: 26mm;
    background: #ffffff;
    border: 0.35mm solid #cbd5e1;
    border-radius: 0.8mm;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 0.5mm 1.2mm rgba(15, 23, 42, 0.08);
}

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

/* Bloco central de informações posicionado mais abaixo e bem distribuído com a foto */
.cr80-info-center {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 1.2mm;
}

.cr80-categoria {
    font-size: 2.2mm;
    font-weight: 800;
    color: #1e3a8a;
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 1.2mm;
}

.cr80-field-line {
    font-size: 2.05mm;
    color: #1e293b;
    line-height: 1.42;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cr80-field-line strong {
    font-weight: 800;
    color: #0f172a;
}

.cr80-med-line {
    font-size: 1.75mm;
    color: #1e293b;
    line-height: 1.42;
    margin-top: 0.4mm;
    text-transform: uppercase;
    white-space: nowrap;
}

.cr80-med-line strong {
    font-weight: 800;
    color: #0f172a;
}

.cr80-cidade {
    font-size: 2.02mm;
    color: #0f172a;
    line-height: 1.3;
    margin-top: 2.2mm;
    text-align: right;
    padding-right: 0.6mm;
    text-transform: uppercase;
}

.cr80-cidade strong {
    font-weight: 800;
}

/* Direita: QR Code e Código único centralizados na caixa */
.cr80-qr-img {
    width: 15.4mm;
    height: 15.4mm;
    object-fit: contain;
    display: block;
}

.cr80-code-label {
    font-size: 1.65mm;
    font-weight: 700;
    color: #475569;
    margin-top: 1.2mm;
    line-height: 1.1;
    text-transform: uppercase;
}

.cr80-code-value {
    font-size: 2.0mm;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.04mm;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Escala ampliada para visualização confortável na tela */
.cr80-preview-scale {
    transform: scale(1.45);
    transform-origin: top center;
    margin-bottom: 85px;
}

@media (max-width: 576px) {
    .cr80-preview-scale {
        transform: scale(1.05);
        margin-bottom: 15px;
    }
}
