:root {
    --gov-green: #2d7a32;
    --gov-green-dark: #1b5e20;
    --gov-green-light: #66bb6a;
    --gov-green-50: #e8f5e8;
    --gov-green-100: #c8e6c9;
    --gov-gray: #6c757d;
    --gov-gray-dark: #343a40;
    --gov-gray-light: #f8f9fa;
    --gov-blue: #1976d2;
    --gov-blue-light: #e3f2fd;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gov-gray-light);
    color: var(--gov-gray-dark);
}

/* Header Styles */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 4px solid var(--gov-green);
}

.header-top {
    background-color: var(--gov-green-dark);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-circle {
    width: 48px;
    height: 48px;
    background-color: var(--gov-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.nav-link {
    color: var(--gov-gray) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gov-green) !important;
    border-bottom-color: var(--gov-green);
}

/* Main Content Styles */
.main-content {
    padding: 40px 0;
    min-height: 60vh;
}

.breadcrumb-nav {
    font-size: 14px;
    color: var(--gov-gray);
    margin-bottom: 30px;
}

.breadcrumb-nav a {
    color: var(--gov-gray);
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    color: var(--gov-gray-dark);
}

.page-title {
    font-size: 3rem;
    font-weight: 300;
    color: var(--gov-gray-dark);
    margin-bottom: 30px;
}

.protocol-card {
    background: white;
    border-radius: 12px;
    padding: 48px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.protocol-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--gov-green-50);
}

.protocol-number {
    background: linear-gradient(135deg, var(--gov-green) 0%, var(--gov-green-dark) 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    margin: 24px 0;
    text-align: center;
}

.protocol-number h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
    letter-spacing: 2px;
}

.protocol-number p {
    margin: 8px 0 0 0;
    opacity: 0.9;
}

.status-badge {
    display: inline-block;
    background-color: var(--gov-green-50);
    color: var(--gov-green);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.info-item {
    background-color: var(--gov-gray-light);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--gov-green);
}

.info-item h6 {
    color: var(--gov-green);
    margin-bottom: 8px;
    font-weight: 600;
}

.info-item p {
    margin: 0;
    color: var(--gov-gray-dark);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gov-green);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gov-green-50);
}

.document-list {
    background: var(--gov-gray-light);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: white;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid var(--gov-green);
}

.document-item:last-child {
    margin-bottom: 0;
}

.document-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.document-icon {
    width: 40px;
    height: 40px;
    background-color: var(--gov-green-50);
    color: var(--gov-green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.document-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-uploaded {
    background-color: var(--gov-green-50);
    color: var(--gov-green);
}

.status-sent {
    background-color: #d4edda;
    color: #155724;
}

.btn-outline-success {
    border-color: var(--gov-green);
    color: var(--gov-green);
}

.btn-outline-success:hover {
    background-color: var(--gov-green);
    border-color: var(--gov-green);
    color: white;
}

.btn-outline-success:disabled {
    background-color: var(--gov-green);
    border-color: var(--gov-green);
    color: white;
    opacity: 0.7;
}

.upload-section {
    background: white;
    border: 2px dashed var(--gov-green-100);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: var(--gov-green);
    background-color: var(--gov-green-50);
}

.upload-icon {
    font-size: 3rem;
    color: var(--gov-green);
    margin-bottom: 16px;
}

.file-input {
    display: none;
}

.upload-btn {
    background-color: var(--gov-green);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-btn:hover {
    background-color: var(--gov-green-dark);
}

.payment-section {
    background: linear-gradient(135deg, var(--gov-green-50) 0%, var(--gov-green-100) 100%);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    text-align: center;
}

.payment-amount {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--gov-green);
    margin-bottom: 16px;
}

.generate-payment-btn {
    background-color: var(--gov-green);
    border: none;
    color: white;
    padding: 16px 48px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(45, 122, 50, 0.2);
}

.generate-payment-btn:hover {
    background-color: var(--gov-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(45, 122, 50, 0.3);
}

.timeline {
    margin: 32px 0;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background-color: var(--gov-gray-light);
    border-radius: 8px;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    background-color: var(--gov-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.timeline-content h6 {
    margin: 0 0 4px 0;
    color: var(--gov-green);
}

.timeline-content p {
    margin: 0;
    color: var(--gov-gray);
    font-size: 14px;
}

.copy-button {
    background: none;
    border: none;
    color: var(--gov-green);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.copy-button:hover {
    background-color: var(--gov-green-50);
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    color: white;
    padding: 48px 0 24px;
    margin-top: 60px;
}

.footer h5 {
    color: var(--gov-green-light);
    margin-bottom: 16px;
}

.footer a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 24px;
    margin-top: 32px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .protocol-card {
        padding: 32px 24px;
    }

    .protocol-number h2 {
        font-size: 2rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Modal Boleto - Responsivo */
    #boletoModal .modal-dialog {
        max-width: 100vw;
        width: 100vw;
        margin: 0;
        height: 100vh;
    }
    
    /* Modal de Carregamento - Responsivo */
    #loadingModal .modal-body {
        padding: 2rem !important;
    }
    
    #loadingModal .spinner-border {
        width: 3rem !important;
        height: 3rem !important;
    }
    
    #loadingModal .modal-title {
        font-size: 1.1rem;
    }
    
    #boletoModal .modal-content {
        min-height: 100vh;
        border-radius: 0;
    }
    
    #boletoModal .modal-body {
        padding: 16px;
        max-height: 80vh;
    }
    
    #boletoModal .boleto-frame-wrapper {
        min-height: 400px;
        max-height: 70vh;
    }
    
    #boletoModal iframe {
        min-height: 400px;
        max-height: 70vh;
    }
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* Modal Boleto - Tamanho personalizado */
#boletoModal .modal-dialog {
    max-width: 95vw;
    width: 95vw;
    margin: 1.75rem auto;
}

/* Modal de Carregamento */
#loadingModal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

#loadingModal .modal-body {
    padding: 3rem !important;
}

#loadingModal .loading-animation {
    position: relative;
}

#loadingModal .spinner-border {
    border-width: 0.25rem;
}

#loadingModal .modal-title {
    color: var(--gov-green);
    font-weight: 600;
    font-size: 1.25rem;
}

#loadingModal .progress {
    background-color: var(--gov-green-100);
    border-radius: 10px;
    overflow: hidden;
}

#loadingModal .progress-bar {
    background: linear-gradient(90deg, var(--gov-green) 0%, var(--gov-green-light) 100%);
    border-radius: 10px;
}

#boletoModal .modal-content {
    min-height: 90vh;
}

#boletoModal .modal-body {
    padding: 32px;
    max-height: 70vh;
    overflow-y: auto;
}

#boletoModal .boleto-frame-wrapper {
    min-height: 500px;
    max-height: 60vh;
}

#boletoModal iframe {
    min-height: 500px;
    max-height: 60vh;
}

.modal-header {
    background: linear-gradient(135deg, var(--gov-green) 0%, var(--gov-green-dark) 100%);
    color: white;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    padding: 24px 32px;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 32px;
}

.boleto-info {
    background: var(--gov-gray-light);
    border-radius: 12px;
    padding: 24px;
    border-left: 4px solid var(--gov-green);
}

.boleto-info .info-item h6 {
    color: var(--gov-green);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.boleto-info .info-item p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.boleto-container {
    background: white;
    border: 2px solid var(--gov-green-100);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.boleto-frame-wrapper {
    position: relative;
    background: #f8f9fa;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.boleto-frame-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(45, 122, 50, 0.1) 50%, transparent 70%);
    animation: loading-shimmer 2s infinite;
    z-index: 1;
}

.boleto-frame-wrapper.loaded::before {
    display: none;
}

@keyframes loading-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.boleto-actions {
    background: var(--gov-green-50);
    border-radius: 12px;
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid var(--gov-green-100);
    padding: 24px 32px;
    background: var(--gov-gray-light);
    border-radius: 0 0 16px 16px;
}

.modal-footer .btn {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
}

/* Loading state for iframe */
.boleto-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
}

.boleto-loading .spinner-border {
    color: var(--gov-green);
    width: 3rem;
    height: 3rem;
}

.boleto-loading p {
    margin-top: 16px;
    color: var(--gov-gray);
    font-weight: 500;
}

/* Payment Selection Modal Styles */
.payment-info {
    background: var(--gov-gray-light);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid var(--gov-green);
}

.payment-options {
    margin-top: 24px;
}

.payment-option {
    background: white;
    border: 2px solid var(--gov-green-100);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

.payment-option:hover {
    border-color: var(--gov-green);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(45, 122, 50, 0.15);
}

.payment-option.selected {
    border-color: var(--gov-green);
    background-color: var(--gov-green-50);
}

.payment-option-content {
    text-align: center;
}

.payment-icon {
    width: 60px;
    height: 60px;
    background: var(--gov-green-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--gov-green);
    font-size: 24px;
}

.pix-icon {
    background: linear-gradient(135deg, #00d4aa 0%, #0099cc 100%);
    color: white;
}

.payment-features {
    margin-top: 16px;
}

.payment-features .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
}

/* PIX Modal Styles */
.pix-info {
    background: var(--gov-gray-light);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #00d4aa;
}

.pix-container {
    background: white;
    border: 2px solid #e0f2f1;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.qr-code-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 40px;
    border: 2px dashed #00d4aa;
}

.qr-code-placeholder {
    text-align: center;
}

.pix-details h6 {
    color: var(--gov-green);
    margin-bottom: 16px;
    font-weight: 600;
}

.pix-steps {
    padding-left: 20px;
}

.pix-steps li {
    margin-bottom: 8px;
    color: var(--gov-gray-dark);
}

.pix-copy-section h6 {
    color: var(--gov-green);
    margin-bottom: 12px;
    font-weight: 600;
}

.input-group .form-control {
    border-color: var(--gov-green-100);
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.input-group .btn {
    border-color: var(--gov-green-100);
    color: var(--gov-green);
}

.input-group .btn:hover {
    background-color: var(--gov-green);
    border-color: var(--gov-green);
    color: white;
}

/* Service Highlights Styles */
.service-highlights {
    margin: 20px 0;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background-color: var(--gov-gray-light);
    border-radius: 8px;
    border-left: 3px solid var(--gov-green);
    transition: all 0.3s ease;
}

.service-item:hover {
    background-color: var(--gov-green-50);
    transform: translateX(4px);
}

.service-item i {
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.service-item strong {
    color: var(--gov-green);
    font-weight: 600;
}

.service-item:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments for service items */
@media (max-width: 768px) {
    .service-item {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .service-item i {
        margin-top: 0;
    }
}