:root {
    --cfm-green: #008148;
    --cfm-dark: #005c33;
    --bg-gray: #f3f4f6;
    --cfm-green-dark: #006633;
    --cfm-green-light: #008f4c;
    --bg-body: #f4f6f9;
}

/* Principal */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    background-color: var(--bg-body);
    color: #4b5563;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.main-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    flex-grow: 1;
}

.main-container-sm {
    max-width: 1000px; 
}

/* Cabecalho, nav e footer */
.navbar-top, .top-header {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.navbar-top {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.8rem 2rem;
}

.top-header {
    background-color: var(--cfm-green-dark);
    color: white;
    padding: 10px 20px;
}

.main-nav-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px 30px;
    text-align: center;
    color: #495057;
    text-decoration: none;
    min-width: 140px;
    transition: all 0.2s;
}

.nav-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    color: var(--cfm-green-dark);
}

.nav-card i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--cfm-green-light);
}

footer {
    background: white;
    margin-top: auto;
}

.site-footer {
    background-color: var(--cfm-green-dark);
    color: white;
    padding: 20px 0;
    margin-top: 50px;
    font-size: 0.85rem;
}

.site-footer a {
    color: white;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.page-title-area {
    margin-bottom: 20px;
}

.section-title {
    color: var(--cfm-green-dark); 
    font-weight: 600; 
    margin: 0;
    font-size: 1.1rem; 
    display: flex; 
    align-items: center; 
    gap: 10px;
}

.card-header-title {
    display: flex; 
    align-items: center; 
    gap: 0.5rem;
    font-size: 1rem; 
    font-weight: 700; 
    color: #374151;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem; 
    border-bottom: 1px solid #f3f4f6;
}

.card-header-title i {
    color: var(--cfm-green); 
    font-size: 1.1rem; 
}

.form-section-title {
    font-size: 1.1rem; 
    color: var(--cfm-green); 
    font-weight: 600;
    margin-bottom: 1.5rem; 
    padding-bottom: 0.5rem; 
    border-bottom: 1px solid #f3f4f6;
}

.form-section-subtitle {
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em;
    color: #6b7280; 
    font-weight: 600; 
    margin-bottom: 1rem;
    padding-bottom: 0.5rem; 
    border-bottom: 1px solid #f3f4f6;
}

.panorama-title {
    font-size: 0.9rem; 
    text-transform: uppercase; 
    font-weight: 700;
    color: #6b7280; 
    margin-bottom: 1.5rem; 
    letter-spacing: 0.05em;
}

.breadcrumb {
    margin-bottom: 5px; 
    font-size: 0.85rem; 
}

.breadcrumb a {
    color: #6c757d; 
    text-decoration: none; 
}

/* Form */
.form-control, .form-select {
    border-radius: 8px; 
    border: 1px solid #d1d5db;
    padding: 0.6rem 1rem; 
    font-size: 0.95rem; 
    color: #374151;
}

.form-control:focus, .form-select:focus {
    border-color: var(--cfm-green); 
    box-shadow: 0 0 0 3px rgba(0, 129, 72, 0.1); 
    outline: none;
}

.form-label { 
    font-weight: 500; 
    font-size: 0.85rem; 
    color: #6b7280; 
    margin-bottom: 0.4rem; 
}

.required-mark { color: #dc2626; margin-left: 2px; }
.form-check-input:checked { background-color: var(--cfm-green); border-color: var(--cfm-green); }
.rich-text-wrapper { margin-bottom: 1rem; }

.state-selection-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn-check { position: absolute; clip: rect(0, 0, 0, 0); pointer-events: none; }

.btn-outline-cfm-tag {
    color: #4b5563; 
    border: 1px solid #e5e7eb; 
    background-color: #fff;
    padding: 0.5rem 0.1rem; 
    font-size: 0.85rem; 
    border-radius: 6px;
    cursor: pointer; 
    transition: all 0.2s; 
    font-weight: 600; 
    width: 50px;
    text-align: center;
}

.btn-outline-cfm-tag:hover { 
    border-color: var(--cfm-green); 
    color: var(--cfm-green); 
    background-color: #ecfdf5; 
}

.btn-check:checked + .btn-outline-cfm-tag {
    background-color: var(--cfm-green); 
    color: white; 
    border-color: var(--cfm-green);
    box-shadow: 0 2px 4px rgba(0, 129, 72, 0.2);
}

#formCadastroUsuario div { margin: 10px 0; }
#formCadastroUsuario div label { display: block; }
#formCadastroUsuario em { color: red; }
#formCadastroUsuario input[type=checkbox] { margin: 5px; }

.login-input {
    padding: 1rem 1.2rem; 
    border-radius: 10px; 
    border: 1px solid #e2e8f0;
    background-color: #f8fafc; 
    font-size: 1rem; 
    width: 100%; 
    box-sizing: border-box;
}

.login-input:focus { 
    background-color: #fff; 
    border-color: var(--cfm-green); 
    box-shadow: 0 0 0 4px rgba(0, 129, 72, 0.1); 
    outline: none; 
}

/* links e botoes */
.btn-cfm, .btn-primary-cfm {
    background-color: var(--cfm-green); 
    color: white; 
    border: none;
    border-radius: 8px; 
    transition: all 0.2s; 
    cursor: pointer;
}

.btn-cfm { 
    padding: 0.6rem 1.5rem; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0.5rem; 
    font-weight: 500;
}

.btn-primary-cfm { 
    padding: 0.8rem 1rem; 
    font-size: 1rem; 
    font-weight: 600;
}

.btn-cfm:hover, .btn-primary-cfm:hover { 
    background-color: var(--cfm-dark); 
    color: white;
    transform: translateY(-1px); 
}

.btn-outline-cfm {
    background-color: transparent; 
    color: var(--cfm-green);
    border: 1px solid var(--cfm-green); 
    border-radius: 8px;
    padding: 0.6rem 1.2rem; 
    font-weight: 500; 
    cursor: pointer;
}

.btn-outline-cfm:hover { background-color: #ecfdf5; }

.btn-outline-secondary {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
}

.btn-secondary-custom {
    background-color: #e5e7eb; 
    color: #4b5563; 
    border: none;
    border-radius: 8px; 
    padding: 0.5rem 1.2rem; 
    font-weight: 500; 
    font-size: 0.9rem; 
    cursor: pointer;
}

.btn-secondary-custom:hover { background-color: #d1d5db; color: #1f2937; }

.btn-cancel {
    background-color: transparent; 
    color: #6b7280; 
    border: 1px solid #d1d5db;
    border-radius: 8px; 
    padding: 0.75rem 1.5rem; 
    font-weight: 500; 
    text-decoration: none; 
    display: inline-block;
}

.btn-cancel:hover { background-color: #f3f4f6; color: #374151; }

.link-action { color: var(--cfm-green); text-decoration: none; font-weight: 600; }
.link-action:hover { text-decoration: underline; }

.action-btn, .action-link {
    color: #6b7280; 
    transition: all 0.2s; 
    background: transparent;
    border: none; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
}

.action-btn { width: 32px; height: 32px; border-radius: 6px; }
.action-link { font-size: 1.1rem; margin: 0 4px; }
.action-btn:hover, .action-link:hover { color: var(--cfm-green); }
.action-btn:hover { background-color: #f3f4f6; }

.view-toggle .btn { border-color: #e5e7eb; color: #6b7280; padding: 0.25rem 0.5rem; font-size: 0.9rem; }
.view-toggle .btn:hover { background-color: #f9fafb; color: var(--cfm-green); }
.view-toggle .btn.active { background-color: var(--cfm-green); color: white; border-color: var(--cfm-green); }

/* Cards secoes e display de dados */
.hero-section {
    background-color: var(--cfm-green);
    background-image: linear-gradient(135deg, var(--cfm-green) 0%, var(--cfm-dark) 100%);
    border-radius: 16px;
    padding: 3rem;
    color: white;
    text-align: center;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.3);
}

.flow-container {
    background: white; 
    border-radius: 16px; 
    padding: 2rem;
    border: 1px solid #e5e7eb; 
    margin-top: 2rem; 
    position: relative; 
    z-index: 0;
}

.content-card {
    background: white; 
    border: 1px solid #e5e7eb; 
    border-radius: 12px;
    padding: 1.5rem; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); 
    margin-bottom: 1.5rem;
}

.section-card {
    background-color: white; 
    border: none; 
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
    margin-bottom: 20px;
}

.section-card .card-header {
    background-color: white; 
    border-bottom: 1px solid #f0f0f0; 
    padding: 15px 20px;
    border-top-left-radius: 8px; 
    border-top-right-radius: 8px;
}

.kpi-card {
    background-color: #fcfcfc; 
    border: 1px solid #e5e7eb; 
    border-radius: 8px;
    padding: 1.2rem 1rem; 
    text-align: center; 
    flex: 1 0 auto; 
    min-width: 140px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02); 
    transition: all 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px); 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db; 
    background-color: #fff;
}

.kpi-label {
    display: block; 
    font-size: 0.7rem; 
    font-weight: 700; 
    text-transform: uppercase;
    color: #6b7280; 
    margin-bottom: 0.5rem; 
    letter-spacing: 0.02em; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
}

.kpi-value { 
    display: block; 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: #1f2937; 
    line-height: 1.2; 
}

.data-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 2px;
    display: block;
}

.data-value {
    font-weight: 500;
    color: #212529;
    margin-bottom: 15px;
    word-break: break-word;
}

.data-row {
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.data-row:not(:last-child) {
    border-bottom: 1px dashed #e5e7eb;
}

.result-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-left: 5px solid var(--cfm-green);
    margin-bottom: 1rem;
    background-color: #fff;
}

.result-card .stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.result-card .stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

/* Cards e Menus */
.shortcut-card, .card-home {
    background: white; 
    border: 1px solid #e5e7eb; 
    border-radius: 12px; 
    min-height: 220px;
    text-align: center; 
    cursor: pointer; 
    display: flex; 
    flex-direction: column;
    justify-content: center; 
    align-items: center; 
    position: relative; 
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.shortcut-card:hover, .card-home:hover {
    transform: translateY(-5px); 
    border-color: var(--cfm-green);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.card-content { padding: 1.5rem; transition: opacity 0.3s, transform 0.3s; width: 100%; }
.shortcut-card.menu-open .card-content { transform: scale(0.9); opacity: 0.5; }

.shortcut-icon {
    width: 60px; height: 60px; background: #ecfdf5; color: var(--cfm-green);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; margin: 0 auto 1rem auto;
}

.card-nav {
    background: #fff; border: 1px solid #dee2e6; border-radius: 8px; height: 100%; min-height: 80px;
    position: relative; overflow: visible !important; display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}

.card-nav:hover { background-color: #f8f9fa; border-color: var(--cfm-green); }

.card-nav .nav-link-stretch {
    text-decoration: none; color: #333; width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0.5rem;
}

.subMenu, .sliding-menu {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: white; padding: 1.5rem; display: flex; flex-direction: column;
    z-index: 10; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.subMenu { justify-content: center; align-items: center; transform: translateY(100%); }
.sliding-menu { z-index: 50; transform: translateY(105%); }
.shortcut-card.menu-open .subMenu, .card-home.menu-open .sliding-menu { transform: translateY(0) !important; }

.submenu-title {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px;
    color: #9ca3af; margin-bottom: 1rem; font-weight: 700;
}

.subMenu ul, .sliding-menu ul { list-style: none; padding: 0; margin: 0; width: 100%; }
.subMenu li { margin-bottom: 0.5rem; width: 100%; }

.subMenu li a, .sliding-menu ul li a {
    display: block; padding: 10px 12px; margin-bottom: 6px; border-radius: 8px;
    text-decoration: none; color: #4b5563; background-color: #f3f4f6;
    transition: all 0.2s ease; font-weight: 500; font-size: 0.95rem;
}

.subMenu li a:hover, .sliding-menu ul li a:hover {
    background-color: #ecfdf5; color: var(--cfm-green); transform: translateX(5px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.close-menu-btn {
    position: absolute; top: 10px; right: 15px; background: none; border: none;
    color: #9ca3af; font-size: 1.2rem; cursor: pointer; padding: 5px;
}
.close-menu-btn:hover { color: #ef4444; }

.dropdown-menu {
    z-index: 1050 !important; border-radius: 12px; border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); padding: 0.5rem;
}
.dropdown-item { border-radius: 6px; padding: 8px 12px; transition: all 0.2s; margin-bottom: 2px; }
.dropdown-item:hover { background-color: #ecfdf5; color: var(--cfm-green); transform: translateX(3px); }

/* Steps elementos do fluxo */
.flow-steps {
    display: flex; justify-content: space-between; align-items: flex-start;
    background: linear-gradient(to right, #e5e7eb 0%, #e5e7eb 100%);
    background-repeat: no-repeat; background-position: center 25px; background-size: 90% 3px; padding-bottom: 1rem;
}
.step-item { text-align: center; width: 150px; display: flex; flex-direction: column; align-items: center; background-color: transparent; z-index: 2; }
.step-circle {
    width: 50px; height: 50px; background: white; border: 3px solid #d1d5db; color: #9ca3af;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px; font-weight: bold; font-size: 1.2rem; box-shadow: 0 0 0 5px white;
}
.step-item:hover .step-circle { border-color: var(--cfm-green); color: var(--cfm-green); background: #ecfdf5; }
.step-title { font-size: 0.9rem; font-weight: 600; color: #374151; margin-bottom: 4px; }
.step-desc { font-size: 0.75rem; color: #6b7280; line-height: 1.2; }

/* Tabelas */
.table-custom { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-custom thead th, .table-custom th {
    background-color: #f9fafb; color: #6b7280; font-weight: 600; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.05em; padding: 1rem; border-bottom: 1px solid #e5e7eb; text-align: center;
}
.table-custom tbody td, .table-custom td {
    padding: 1rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle;
    font-size: 0.9rem; color: #1f2937; text-align: center;
}
.table-custom tbody td:nth-child(2) { text-align: left; }
.table-custom tbody tr:hover td { background-color: #f9fafb; }
.table-custom tbody tr:last-child td { border-bottom: none; }

.stats-table th {
    background-color: #f8fafc; font-size: 0.75rem; text-transform: uppercase;
    color: #6b7280; text-align: center; padding: 0.75rem;
}
.stats-table td { text-align: center; font-weight: 600; color: #1f2937; padding: 1rem; font-size: 1.1rem; }

.table-stats { width: 100%; margin-bottom: 0; border-collapse: collapse; }
.table-stats th {
    background-color: var(--cfm-green) !important; color: white !important; font-weight: 600;
    text-align: center; font-size: 0.8rem; vertical-align: middle; padding: 10px 4px; border: 1px solid #00683a;
}
.table-stats td {
    text-align: center; font-size: 0.9rem; border: 1px solid #e5e7eb;
    vertical-align: middle; padding: 8px; color: #374151;
}
.table-stats tbody tr:nth-of-type(even) { background-color: #f9fafb; }
.row-total td {
    background-color: #ecfdf5 !important; color: var(--cfm-green) !important;
    font-weight: 800; border-top: 2px solid var(--cfm-green) !important;
}

/* Indicadores e status */
.badge-status, .status-badge {
    padding: 4px 10px; border-radius: 50px; font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.status-badge { padding: 5px 10px; font-size: 0.8rem; }

.status-ativo, .bg-light-success { background-color: #d1fae5; color: #047857; }
.status-inativo { background-color: #f3f4f6; color: #6b7280; }
.status-bloqueado, .bg-light-danger { background-color: #fee2e2; color: #991b1b; }
.bg-light-warning { background-color: #fef3c7; color: #b45309; }
.bg-light-info { background-color: #e0f2fe; color: #0369a1; }

.status-entregue { background-color: #d1e7dd; color: #0f5132; }
.status-recebida { background-color: #7ee2a5; color: #0c6634; }
.status-enviada  { background-color: #000000d7; color: #ffffff; }
.status-personalizada { background-color: #e2e3e5; color: #41464b; }
.status-importado { background-color: #cff4fc; color: #055160; }
.status-default  { background-color: #f8f9fa; color: #212529; border: 1px solid #dee2e6; }

.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot-blue { background-color: #1E90FF; border: 1px solid rgba(0, 0, 0, 0.1); }
.dot-orange { background-color: #FFA500; border: 1px solid rgba(0, 0, 0, 0.1); }

/* Utilitarios e overlays */
.d-none-custom { display: none !important; }
.text-primary-cfm { color: var(--cfm-green) !important; }
.bg-cfm { background-color: var(--cfm-green); }

.bg-cfm-green, .bg-brand-gradient {
    background-image: linear-gradient(135deg, var(--cfm-green) 0%, var(--cfm-dark) 100%);
}
.bg-cfm-green { background-color: var(--cfm-green) !important; }

.card-hover { transition: all 0.2s ease-in-out; border: 1px solid rgba(0, 0, 0, 0.08); cursor: pointer; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .08) !important; border-color: var(--cfm-green); }
.card-hover:hover .icon-box { background-color: var(--cfm-green) !important; color: white !important; }

.icon-box {
    width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; background-color: #e6f0ed; color: var(--cfm-green); transition: all 0.2s; font-size: 1.4rem;
}

.alert-error {
    color: #721c24; background-color: #f8d7da; border-color: #f5c6cb;
    padding: 10px; margin-bottom: 15px; border-radius: 4px;
}

.brand-pattern {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px; opacity: 0.5;
}

.floating-shape {
    position: absolute; background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.logo-icon {
    font-size: 2rem; color: rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.2);
    border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
}

.stats-wrapper { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: flex-start; }

.id-card-preview {
    background: #f0fdf4; border: 1px dashed var(--cfm-green); border-radius: 12px;
    padding: 1.5rem; display: flex; align-items: center; gap: 1.5rem; justify-content: center;
}

#loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center;
}

.card-header-collapse {
    cursor: pointer;
}

.accordion-mobile .accordion-item {
    border: none; border-bottom: 1px solid #e2e8f0; background-color: transparent; margin-bottom: 0.5rem;
}
.accordion-mobile .accordion-button {
    background-color: white !important; border-radius: 12px !important; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); color: #334155 !important;
}
.accordion-mobile .accordion-button:not(.collapsed) {
    box-shadow: 0 4px 6px -1px rgba(13, 131, 77, 0.1); border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important;
}
.accordion-mobile .accordion-button:focus { box-shadow: none; }
.accordion-mobile .badge-total {
    background-color: #e8f5e9; color: #0d834d; font-size: 0.9rem; padding: 0.5rem 0.8rem; border-radius: 8px;
}
.accordion-mobile .detalhe-grid {
    background-color: white; border-radius: 0 0 12px 12px; padding: 1rem; margin-top: -1px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.accordion-mobile .detalhe-item {
    display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px dashed #e2e8f0; font-size: 0.9rem;
}
.accordion-mobile .detalhe-item:last-child { border-bottom: none; }
.accordion-mobile .detalhe-label { color: #64748b; }
.accordion-mobile .detalhe-valor { font-weight: 600; color: #0f172a; }
.accordion-mobile .valor-destaque { color: #0d834d; }
.accordion-mobile .valor-alerta { color: #ef4444; }
.mobile-actions .action-link {
    padding: 8px; font-size: 1.25rem; border-radius: 8px; background-color: #f8f9fa; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
}

@media (max-width: 991.98px) {
    .offcanvas-bottom.offcanvas-lg {
        height: auto;
        max-height: 90vh;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }
}

@media (min-width: 992px) {
    .card-header-collapse {
        cursor: default;
        pointer-events: none;
    }
    .collapse-icon {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar-top, .main-container { padding: 1rem; }
    .content-card { padding: 1.5rem; }
    .hero-section { padding: 2rem 1rem; }
    
    .stats-wrapper { justify-content: center; }
    .kpi-card { width: 45%; flex: initial; }

    .flow-steps {
        flex-direction: column; align-items: flex-start; gap: 1rem;
        background: none; border-left: 3px solid #e5e7eb; margin-left: 20px; padding-left: 0;
    }
    .step-item { width: 100%; flex-direction: row; align-items: center; gap: 1rem; margin-left: -26px; text-align: left; }
    .step-circle { margin-bottom: 0; flex-shrink: 0; box-shadow: 0 0 0 5px var(--bg-gray); }

    .id-card-preview { flex-direction: column; text-align: center; margin-top: 1rem; }
}

@media print {
    body {
        background-color: #ffffff !important;
        font-size: 10pt; 
    }
    
    header, .top-header, .main-nav-container, footer, .site-footer, .breadcrumb {
        display: none !important;
    }

    button, .btn {
        display: none !important;
    }

    .container-fluid {
        padding: 0 !important;
        margin: 0 !important;
    }

    .section-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid; 
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* Certificado (Pesquisa Medico) */
body.certificado-page {
    --cert-fundo: #edf6f1;
    --cert-texto: #1f2937;
    --cert-borda: #d9e6de;
    --cert-destaque: var(--cfm-green-dark);
    --cert-destaque-2: #e8f5ee;
    margin: 0;
    display: block;
    background: linear-gradient(160deg, var(--bg-body) 0%, var(--cert-fundo) 100%);
    color: var(--cert-texto);
    line-height: 1.45;
}

body.certificado-page * {
    box-sizing: border-box;
}

body.certificado-page .cert-layout {
    max-width: 980px;
    margin: 0 auto;
    padding: 28px 18px 32px;
}

body.certificado-page .cert-print-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-left: 4px solid #b95d00;
    border-radius: 8px;
    background: #fff4e5;
    color: #68360a;
    font-size: 14px;
}

body.certificado-page .cert-card {
    background: #ffffff;
    border: 1px solid var(--cert-borda);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 92, 51, 0.1);
    overflow: hidden;
}

body.certificado-page .cert-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--cert-borda);
    text-align: center;
    background: linear-gradient(135deg, #f4fbf7 0%, #e7f3ec 100%);
}

body.certificado-page .cert-header img {
    width: 72px;
    height: auto;
    margin-bottom: 8px;
}

body.certificado-page .cert-orgao {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: var(--cfm-dark);
    text-transform: uppercase;
}

body.certificado-page .cert-title {
    margin: 10px 0 4px;
    font-size: clamp(20px, 2.7vw, 28px);
    line-height: 1.2;
    font-weight: 800;
    color: var(--cert-destaque);
    text-transform: uppercase;
}

body.certificado-page .cert-subtitle {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--cfm-green-dark);
}

body.certificado-page .cert-content {
    padding: 26px 28px 12px;
}

body.certificado-page .cert-summary {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--cert-borda);
    border-radius: 10px;
    background: #f7fcf9;
}

body.certificado-page .cert-summary p {
    margin: 0;
    font-size: 15px;
}

body.certificado-page .cert-summary strong {
    color: var(--cfm-dark);
}

body.certificado-page .cert-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

body.certificado-page .cert-panel {
    border: 1px solid var(--cert-borda);
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

body.certificado-page .cert-panel h3 {
    margin: 0;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--cfm-dark);
    background: var(--cert-destaque-2);
    border-bottom: 1px solid var(--cert-borda);
}

body.certificado-page .cert-row {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px dashed #d4e2da;
    font-size: 14px;
}

body.certificado-page .cert-row:last-child {
    border-bottom: 0;
}

body.certificado-page .cert-key {
    font-weight: 700;
    color: var(--cfm-green-dark);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.25px;
}

body.certificado-page .cert-value {
    color: #253243;
    word-break: break-word;
}

body.certificado-page .cert-footer {
    padding: 8px 28px 26px;
}

body.certificado-page .cert-footer p {
    margin: 12px 0 0;
    color: #2d3d4d;
    font-size: 14px;
}

body.certificado-page .cert-disclaimer {
    color: #526174;
    font-size: 13px;
}

body.certificado-page .cert-warning {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--cert-borda);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--cfm-dark);
}

@media (max-width: 820px) {
    body.certificado-page .cert-layout {
        padding: 12px 10px 20px;
    }

    body.certificado-page .cert-header,
    body.certificado-page .cert-content,
    body.certificado-page .cert-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    body.certificado-page .cert-grid {
        grid-template-columns: 1fr;
    }

    body.certificado-page .cert-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@page certificado {
    size: A4 portrait;
    margin: 0;
}

@media print {
    body.certificado-page {
        page: certificado;
        background: #ffffff;
        font-size: 11px;
        line-height: 1.25;
    }

    body.certificado-page header.cert-header,
    body.certificado-page footer.cert-footer {
        display: block !important;
    }

    body.certificado-page * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body.certificado-page .cert-layout {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 8mm;
        box-sizing: border-box;
    }

    body.certificado-page .cert-print-alert {
        display: none;
    }

    body.certificado-page .cert-card {
        border: 1px solid #d4e2da;
        border-radius: 0;
        box-shadow: none;
        min-height: 281mm;
    }

    body.certificado-page .cert-header {
        background: #ffffff;
        padding: 10px 14px 8px;
    }

    body.certificado-page .cert-header img {
        width: 50px;
        margin-bottom: 4px;
    }

    body.certificado-page .cert-orgao {
        font-size: 10px;
        letter-spacing: 0.2px;
    }

    body.certificado-page .cert-title {
        margin: 4px 0 2px;
        font-size: 17px;
    }

    body.certificado-page .cert-subtitle {
        font-size: 10px;
    }

    body.certificado-page .cert-content {
        padding: 10px 14px 6px;
    }

    body.certificado-page .cert-summary {
        margin-bottom: 8px;
        padding: 8px 10px;
        border-radius: 6px;
    }

    body.certificado-page .cert-summary p {
        font-size: 11px;
    }

    body.certificado-page .cert-grid {
        gap: 8px;
    }

    body.certificado-page .cert-panel {
        border-radius: 6px;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.certificado-page .cert-panel h3 {
        padding: 6px 8px;
        font-size: 10px;
    }

    body.certificado-page .cert-row {
        grid-template-columns: 125px 1fr;
        gap: 6px;
        padding: 4px 8px;
        font-size: 10.5px;
    }

    body.certificado-page .cert-key {
        font-size: 9.5px;
    }

    body.certificado-page .cert-value {
        font-size: 10.5px;
    }

    body.certificado-page .cert-footer {
        padding: 4px 14px 10px;
    }

    body.certificado-page .cert-footer p {
        margin-top: 6px;
        font-size: 10px;
    }

    body.certificado-page .cert-disclaimer {
        font-size: 9.5px;
    }

    body.certificado-page .cert-warning {
        margin-top: 8px;
        padding-top: 6px;
        font-size: 9px;
    }
}
/* End Certificado (Pesquisa Medico) */

/* Recibo */
body.recibo-page {
    margin: 0;
    text-align: center;
    background-color: #e3f4fd;
    font-family: Times, "Times New Roman", serif;
}

body.recibo-page .reciboEntrega,
body.recibo-page .reciboSolicitacao {
    margin: 1cm auto;
    padding: 0;
    background-color: #ffffff;
    border-top: 1px solid #a0a0a0;
    border-right: 3px solid #a0a0a0;
    border-bottom: 4px solid #a0a0a0;
    border-left: 1px solid #a0a0a0;
}

body.recibo-page .reciboEntrega {
    width: 160mm;
    min-height: 150mm;
}

body.recibo-page .reciboSolicitacao {
    width: 190mm;
    min-height: 150mm;
}

body.recibo-page .tituloEstado {
    font-size: 14pt;
}

body.recibo-page .titulo {
    font-size: 16pt;
    font-weight: 700;
}

body.recibo-page .corpoRecibo {
    width: 150mm;
    margin: 1cm auto;
    padding: 2mm;
}

body.recibo-page .corpoSolicitacao {
    width: 150mm;
    margin: 1cm auto;
    padding: 2mm;
    font-size: 14pt;
    text-align: justify;
}

body.recibo-page .quadrado {
    width: 250px;
    height: 90px;
    margin-right: 0.5cm;
    float: right;
    border: 3px solid green;
    text-transform: lowercase;
}

body.recibo-page .solicitacaoNumero {
    border: 2px solid #000;
    padding: 10px;
}

@media print {
    body.recibo-page {
        margin: 0;
        background-color: #ffffff;
    }

    body.recibo-page .reciboEntrega,
    body.recibo-page .reciboSolicitacao {
        margin: 0 auto;
        box-shadow: none;
    }
}
/* End Recibo */
