/* Estilos para o Simulador de Juros Compostos */
#juros-compostos-simulador {
    max-width: 1024px;
    margin: 0 auto;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Título */
.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.text-primary {
    color: #3b82f6;
}

.font-bold {
    font-weight: 700;
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.gap-6 {
    gap: 1.5rem;
}

.gap-2 {
    gap: 0.5rem;
}

/* Labels */
.block {
    display: block;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.font-medium {
    font-weight: 500;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* Input groups */
.flex {
    display: flex;
}

.border {
    border-width: 1px;
    border-color: #d1d5db;
}

.inline-flex {
    display: inline-flex;
}

.items-center {
    align-items: center;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.border-r {
    border-right-width: 1px;
}

.bg-\[#e9ecef\] {
    background-color: #e9ecef;
}

.flex-1 {
    flex: 1 1 0%;
}

.p-2 {
    padding: 0.5rem;
}

.min-w-\[100px\] {
    min-width: 100px;
}

.border-l {
    border-left-width: 1px;
}

.bg-white {
    background-color: #ffffff;
}

/* Inputs */
input[type="text"], select {
    border: none;
    outline: none;
    font-size: 0.875rem;
    color: #374151;
}

input[type="text"]:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

input::placeholder {
    color: #9ca3af;
}

/* Buttons */
.justify-center {
    justify-content: center;
}

.whitespace-nowrap {
    white-space: nowrap;
}

.rounded-md {
    border-radius: 0.375rem;
}

.ring-offset-background {
    --tw-ring-offset-color: #ffffff;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.focus-visible\:outline-none:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.focus-visible\:ring-2:focus-visible {
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.disabled\:pointer-events-none:disabled {
    pointer-events: none;
}

.disabled\:opacity-50:disabled {
    opacity: 0.5;
}

.bg-primary {
    background-color: #3b82f6;
}

.text-primary-foreground {
    color: #ffffff;
}

.hover\:bg-primary\/90:hover {
    background-color: rgba(59, 130, 246, 0.9);
}

.h-10 {
    height: 2.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.sm\:w-\[150px\] {
    width: 150px;
}

@media (min-width: 640px) {
    .sm\:w-\[150px\] {
        width: 150px;
    }
}

/* Layout */
.justify-between {
    justify-content: space-between;
}

.flex-col {
    flex-direction: column;
}

@media (min-width: 640px) {
    .sm\:flex-row {
        flex-direction: row;
    }
}

.text-md {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-center {
    text-align: center;
}

.hover\:bg-accent:hover {
    background-color: #f1f5f9;
}

.hover\:text-accent-foreground:hover {
    color: #0f172a;
}

/* Messages */
.text-red-800 {
    color: #991b1b;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

/* Results */
.p-4 {
    padding: 1rem;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.font-semibold {
    font-weight: 600;
}

.mb-4 {
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.gap-4 {
    gap: 1rem;
}

.text-gray-600 {
    color: #4b5563;
}

.text-green-600 {
    color: #059669;
}

.text-blue-600 {
    color: #2563eb;
}

.text-purple-600 {
    color: #9333ea;
}

/* Table */
.overflow-x-auto {
    overflow-x: auto;
}

.min-w-full {
    min-width: 100%;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.border-b {
    border-bottom-width: 1px;
}

.text-left {
    text-align: left;
}

/* Responsividade */
@media (max-width: 768px) {
    #juros-compostos-simulador {
        margin: 10px;
        padding: 15px;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .flex {
        flex-direction: column;
    }
    
    .justify-between {
        align-items: center;
        gap: 1rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#resultado,
#grafico-evolucao,
#tabela-evolucao {
    animation: fadeIn 0.5s ease-out;
}

/* Canvas container */
.grafico-container {
    background: white;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

/* Botões customizados */
button {
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Links */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Inputs focus */
input:focus, select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Placeholder */
::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Select styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error states */
.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

