/* ==========================================================================
   Design System & Premium Theme - Ouvidoria - SMC
   ========================================================================== */

/* Configurações Globais e Tipografia */
body {
    font-family: 'Outfit', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Títulos Premium */
.titulo, h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #0f172a;
}

/* Banner de Cabeçalho Degradê Moderno */
.main-banner {
    width: 100%;
    background: linear-gradient(135deg, #1e467e 0%, #0c2540 100%);
    padding: 60px 0;
    border-bottom: 6px solid #fe8304;
    box-shadow: 0 10px 30px rgba(30, 70, 126, 0.12);
    position: relative;
}

.banner-logo {
    max-height: 90px;
    margin-bottom: 20px;
    filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.25));
    transition: transform 0.3s ease;
}

.banner-logo:hover {
    transform: scale(1.03);
}

.banner-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.banner-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}



/* Navegação Flutuante Clean e Profissional */
.nav-container {
    margin-top: -32px;
    position: relative;
    z-index: 100;
}

.nav-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 10px 15px;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.btn-nav-link {
    text-decoration: none !important;
    display: block;
}

.btn-nav {
    background: transparent;
    color: #1e467e;
    border: 1px solid transparent;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    cursor: pointer;
    outline: none !important;
}

.btn-nav:hover {
    background-color: rgba(254, 131, 4, 0.08);
    color: #fe8304;
}

.btn-nav.active {
    background: #1e467e;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(30, 70, 126, 0.25);
}

/* Cards e Layout Clean */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.03);
    background-color: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.04);
    overflow: hidden;
    margin-bottom: 25px;
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 24px;
}

.card-body {
    padding: 30px;
}

/* Acordeão FAQ Minimalista e Premium */
.accordion .card {
    border: none;
    background: #ffffff;
    margin-bottom: 16px;
    border-radius: 14px !important;
    transition: all 0.3s ease;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.accordion .card:hover {
    box-shadow: 0 12px 28px rgba(30, 70, 126, 0.05);
    transform: translateY(-2px);
}

.accordion .card-header {
    background: #ffffff;
    border-bottom: none;
    padding: 18px 24px;
    border-radius: 14px !important;
}

.accordion .btn-link {
    color: #1e467e;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    width: 100%;
    text-align: left;
    transition: color 0.3s ease;
}

.accordion .btn-link:hover,
.accordion .btn-link:focus {
    color: #fe8304;
    text-decoration: none !important;
    box-shadow: none;
}

.accordion .card-body {
    padding: 20px 30px;
    color: #475569;
    border-top: 1px solid #f1f5f9;
    line-height: 1.7;
    font-size: 15px;
}

/* Formulários Modernos e Elegantes */
.form-group label, label {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    padding: 12px 18px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #f8fafc;
    color: #0f172a;
    height: auto;
}

.form-control:focus {
    border-color: #1e467e;
    box-shadow: 0 0 0 4px rgba(30, 70, 126, 0.1);
    background-color: #ffffff;
}

/* Custom Checkbox and Radio Buttons */
.form-check {
    padding-left: 1.8rem;
    margin-bottom: 12px;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.15em;
    margin-left: -1.8rem;
}

/* Botões Personalizados */
.btn-custom {
    background-color: #1e467e;
    color: #ffffff !important;
    border: 1px solid #1e467e;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(30, 70, 126, 0.15);
}

.btn-custom:hover {
    background-color: #fe8304;
    border-color: #fe8304;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(254, 131, 4, 0.3);
}

.btn-custom:active {
    transform: translateY(1px);
}

/* Alertas Estilizados */
.alert-info {
    background-color: rgba(30, 70, 126, 0.05);
    border: 1px solid rgba(30, 70, 126, 0.1);
    color: #1e467e;
    border-radius: 12px;
    padding: 18px;
    font-size: 14px;
    line-height: 1.6;
}

/* Rodapé Elegante */
.copyright {
    text-align: center;
    padding: 24px 0;
    background-color: #0f172a;
    color: #94a3b8;
    font-size: 14px;
    margin-top: auto;
    border-top: 4px solid #fe8304;
    width: 100%;
}

.copyright p {
    margin: 0;
    font-weight: 400;
}

.copyright a {
    color: #fe8304;
    text-decoration: none;
    font-weight: 500;
}

.copyright a:hover {
    text-decoration: underline;
}

/* Utilitários */
.shadow-premium {
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.04);
}

hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 25px 0;
}

/* ==========================================================================
   Páginas de Detalhes / Edição de Protocolo Premium
   ========================================================================== */
.protocol-container {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(30, 70, 126, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.04);
    padding: 32px;
    margin-bottom: 30px;
}

.protocol-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e467e;
    border-bottom: 2px solid #fe8304;
    padding-bottom: 8px;
    margin-bottom: 24px;
    display: inline-block;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    align-items: stretch;
}

@media (max-width: 992px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-item {
    background-color: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: all 0.2s ease;
    min-height: 84px;
}

.info-item:hover {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
    border-color: rgba(30, 70, 126, 0.15);
}

.info-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    display: block;
}

.info-value {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.5;
}

/* Evidências e Fatos Descrição Grande */
.info-fullwidth {
    grid-column: 1 / -1;
    background-color: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 20px;
}

/* Timeline e Pareceres */
.timeline-container {
    position: relative;
    padding-left: 20px;
    margin-top: 20px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    bottom: 8px;
    width: 2px;
    background-color: #e2e8f0;
}

.timeline-step {
    position: relative;
    margin-bottom: 30px;
    padding-left: 20px;
}

.timeline-step::before {
    content: '';
    position: absolute;
    top: 6px;
    left: -26px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 3px solid #cbd5e1;
    transition: all 0.2s ease;
}

.timeline-step.completed::before {
    background-color: #2eb85c;
    border-color: rgba(46, 184, 92, 0.2);
    box-shadow: 0 0 0 4px rgba(46, 184, 92, 0.15);
}

.timeline-step.active::before {
    background-color: #fe8304;
    border-color: rgba(254, 131, 4, 0.2);
    box-shadow: 0 0 0 4px rgba(254, 131, 4, 0.15);
}

.timeline-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(15, 23, 42, 0.01);
    transition: all 0.2s ease;
}

.timeline-card:hover {
    box-shadow: 0 6px 15px rgba(15, 23, 42, 0.03);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.timeline-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e467e;
    margin: 0;
}

.timeline-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.timeline-body {
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
}

/* Rodapé Combinando com o Cabeçalho */
.copyright {
    background: linear-gradient(135deg, #1e467e 0%, #0c2540 100%);
    border-top: 6px solid #fe8304;
    padding: 30px 0;
    text-align: center;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 -10px 30px rgba(30, 70, 126, 0.12);
    margin-top: auto;
    width: 100%;
}

.copyright p {
    margin: 0;
    opacity: 0.9;
}

/* ==========================================================================
   Campos de Senha com Ícone de Visibilidade (Password Toggle)
   ========================================================================== */
.password-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}

.password-wrapper input {
    padding-right: 48px !important;
    width: 100% !important;
}

.password-wrapper .toggle-password {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 6px !important;
    color: #64748b !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    outline: none !important;
    box-shadow: none !important;
}

.password-wrapper .toggle-password:hover {
    color: #1e467e !important;
}

/* ==========================================================================
   Data Grid – Tabela de Listagem de Protocolos
   ========================================================================== */

/* Wrapper com scroll horizontal suave em telas pequenas */
.data-grid-wrapper {
    overflow-x: auto;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.7);
}

/* Tabela base */
.data-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    color: #1e293b;
    background-color: #ffffff;
    margin: 0 !important;
}

/* Cabeçalho premium */
.data-grid thead tr {
    background: linear-gradient(135deg, #1e467e 0%, #0c2540 100%);
}

.data-grid thead th {
    padding: 14px 18px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: rgba(255, 255, 255, 0.85);
    border: none;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.data-grid thead th:first-child {
    border-radius: 14px 0 0 0;
}

.data-grid thead th:last-child {
    border-radius: 0 14px 0 0;
}

/* Linhas do corpo */
.data-grid tbody tr {
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
    border-bottom: 1px solid #f1f5f9;
}

.data-grid tbody tr:last-child {
    border-bottom: none;
}

.data-grid tbody tr:hover {
    background-color: #f8faff;
    box-shadow: inset 4px 0 0 #1e467e;
}

.data-grid tbody td {
    padding: 13px 18px;
    vertical-align: middle;
    border: none;
    color: #1e293b;
}

/* Coluna Protocolo — destaque */
.data-grid .td-protocolo {
    font-weight: 700;
    font-size: 13px;
    color: #1e467e;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
}

/* Coluna Data */
.data-grid .td-data {
    color: #475569;
    font-size: 13px;
    white-space: nowrap;
}

/* Badge de Dias Úteis */
.badge-dias {
    display: inline-block;
    min-width: 42px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
}

.badge-dias.ok      { background-color: #dcfce7; color: #15803d; }
.badge-dias.aviso   { background-color: #fef9c3; color: #854d0e; }
.badge-dias.critico { background-color: #fee2e2; color: #b91c1c; }
.badge-dias.neutro  { background-color: #f1f5f9; color: #64748b; }

/* Badge de Status */
.badge-status {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid rgba(29, 78, 216, 0.15);
}

.badge-status.concluido {
    background-color: #f0fdf4;
    color: #15803d;
    border-color: rgba(21, 128, 61, 0.15);
}

.badge-status.aguardando {
    background-color: #fffbeb;
    color: #92400e;
    border-color: rgba(146, 64, 14, 0.15);
}

/* Badge de Fase */
.badge-fase {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background-color: #f1f5f9;
    color: #475569;
    white-space: nowrap;
}

/* Botão de acesso refinado */
.btn-grid-acesso {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #1e467e;
    color: #ffffff !important;
    border: none;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-grid-acesso:hover {
    background-color: #fe8304;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(254, 131, 4, 0.3);
}

/* Botão Notificar Gestor */
.btn-grid-notif {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #fe8304;
    color: #ffffff !important;
    border: none;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-grid-notif:hover {
    background-color: #e57303;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(254, 131, 4, 0.35);
}

/* Célula de ação com gap entre botões */
.td-acesso {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

/* Linha zebra leve */
.data-grid tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.data-grid tbody tr:nth-child(even):hover {
    background-color: #f8faff;
}

/* ==========================================================================
   KPI Cards – Indicadores
   ========================================================================== */
.kpi-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.7);
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.kpi-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
}

.kpi-value {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.kpi-meta {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.kpi-bar {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.kpi-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}