* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e3a8a;
    --primary-dark: #1e2a5a;
    --secondary: #3b82f6;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--gray-800);
    position: relative;
    overflow-x: hidden;
}

.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

.instructions {
    text-align: justify;
    margin-top: 15px;
}

.logo-img {
    max-width: 100%;
    max-height: 60px; /* ajuste conforme necessário */
    height: auto;
    width: auto;
    display: block;
    object-fit: contain;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    padding: 20px 0;
    margin-bottom: 30px;
    border-radius: 15px;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

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

.logo-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
}

.logo-text h1 {
    color: var(--primary);
    font-size: 24px;
    font-weight: 700;
}

.logo-text p {
    color: var(--gray-600);
    font-size: 14px;
    margin-top: 2px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--gray-100);
    border-radius: 30px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Main Card */
.main-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 10px;
}

.tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: var(--gray-600);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.tab:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.tab.active {
    color: var(--primary);
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.1), transparent);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { width: 0; }
    to { width: 100%; }
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-600);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.required::after {
    content: ' *';
    color: var(--danger);
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

input:hover, select:hover, textarea:hover {
    border-color: var(--gray-300);
}

/* Ticket Section */
.ticket-section {
    background: linear-gradient(135deg, var(--gray-100), white);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.ticket-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ticket-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-number {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
}

/* Buttons */
.btn-remove {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-remove:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.btn-add {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-calculate {
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px auto;
}

.btn-calculate:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

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

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-action {
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

/* Calculation Summary */
.calculation-summary {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
    border: 2px solid #0ea5e9;
}

.summary-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.summary-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.summary-label {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.summary-value.highlight {
    color: var(--success);
    font-size: 28px;
}

.detail-box {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
}

.detail-box h4 {
    color: var(--primary);
    margin-bottom: 10px;
}

.detail-box ul {
    list-style: none;
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.8;
}

.detail-box li {
    padding: 5px 0;
    border-bottom: 1px solid var(--gray-200);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-400);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--gray-800);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast-icon {
    font-size: 24px;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--danger);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fbbf24;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: start;
    gap: 10px;
}

.info-icon {
    color: #f59e0b;
    font-size: 20px;
    flex-shrink: 0;
}

.info-text {
    color: #92400e;
    font-size: 14px;
    line-height: 1.5;
}

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-200);
    color: var(--primary);
    font-size: 18px;
    font-weight: 600;
}

.section-icon {
    font-size: 24px;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed var(--gray-300);
    border-radius: 10px;
    background: var(--gray-100);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    border-color: var(--secondary);
    background: rgba(59, 130, 246, 0.05);
}

.file-upload-wrapper input[type="file"]:focus + .file-upload-label {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.file-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.file-text {
    color: var(--gray-600);
    font-size: 14px;
    text-align: center;
}

.file-text.file-selected {
    color: var(--success);
    font-weight: 500;
}

/* Field Help */
.field-help {
    display: block;
    margin-top: 5px;
    color: var(--gray-500);
    font-size: 12px;
    font-style: italic;
}

/* Full Width Form Group */
.form-group.full-width {
    grid-column: 1 / -1;
}

/* Alert Recalculate */
.alert-recalculate {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fbbf24;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.5s ease;
}

.alert-icon {
    font-size: 20px;
    color: #f59e0b;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-20px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .main-card {
        padding: 20px;
    }
    
    .actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-action {
        width: 100%;
        justify-content: center;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}