/* Finance Pro - Additional CSS Styles */

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.modal-overlay.modal-show {
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: auto;
}

.modal-overlay.modal-show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: between;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Dark mode modal styles */
.dark .modal-content {
    background: #1f2937;
    border: 1px solid #374151;
}

.dark .modal-header,
.dark .modal-footer {
    border-color: #374151;
}

.dark .modal-close:hover {
    background: #374151;
    color: #f9fafb;
}

/* Type button styles */
.type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border: 2px solid;
    border-radius: 0.75rem;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
}

.type-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Icon and color selection */
.icon-option,
.color-option {
    transition: all 0.2s ease;
    cursor: pointer;
}

.icon-option:hover {
    transform: scale(1.1);
}

.color-option:hover {
    transform: scale(1.2);
}

/* Progress bar styles */
.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: #f3f4f6;
    border-radius: 0.25rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 0.25rem;
}

.dark .progress-bar {
    background: #374151;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    min-width: 300px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.notification-success {
    border-color: #10b981;
    color: #065f46;
    background: #ecfdf5;
}

.notification-error {
    border-color: #ef4444;
    color: #7f1d1d;
    background: #fef2f2;
}

.notification-info {
    border-color: #3b82f6;
    color: #1e3a8a;
    background: #eff6ff;
}

.notification-warning {
    border-color: #f59e0b;
    color: #92400e;
    background: #fffbeb;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Button icon styles */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    color: #6b7280;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-icon:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dark .btn-icon {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

.dark .btn-icon:hover {
    background: #4b5563;
    border-color: #6b7280;
    color: #f9fafb;
}

/* Stat card styles */
.stat-card {
    padding: 1.5rem;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass {
    background: rgba(31, 41, 55, 0.7);
    border: 1px solid rgba(75, 85, 99, 0.3);
}

/* Responsive table */
@media (max-width: 768px) {
    .modal-content {
        margin: 0;
        border-radius: 1rem 1rem 0 0;
        max-height: 95vh;
    }
    
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
}

/* Loading animation */
.loading-spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form enhancements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-label.required::after {
    content: ' *';
    color: #ef4444;
}

.dark .form-label {
    color: #f9fafb;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    color: #374151;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark .form-input,
.dark .form-select,
.dark .form-textarea {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .form-input:focus,
.dark .form-select:focus,
.dark .form-textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}