/* Enterprise BI Dashboard - Custom Styles */

/* Card animations */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Metric cards styling */
.card-body h3 {
    font-size: 2rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

.card-body .small {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chart cards */
.card-header {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

/* DataTable enhancements */
#datatablesSimple {
    font-size: 0.9rem;
}

#datatablesSimple thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

#datatablesSimple tbody tr {
    transition: background-color 0.2s ease;
}

#datatablesSimple tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Loading animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }

/* Responsive improvements */
@media (max-width: 768px) {
    .card-body h3 {
        font-size: 1.5rem;
    }
}

/* Dashboard title */
h1.mt-4 {
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

/* Footer */
footer {
    border-top: 1px solid #e9ecef;
}

/* ===== ADD NEW ACCOUNT FEATURE STYLES ===== */

/* Add Account Button */
#addAccountBtn {
    transition: all 0.3s ease;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

#addAccountBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

/* Modal Enhancements */
.modal-header.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Form Styles */
.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    margin-bottom: 0.375rem;
}

.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus, .form-select.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Health Score Slider */
.form-range {
    height: 0.5rem;
}

.form-range::-webkit-slider-thumb {
    width: 1.5rem;
    height: 1.5rem;
    background: #0d6efd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-range::-webkit-slider-thumb:hover {
    background: #0a58ca;
    transform: scale(1.1);
}

.form-range::-moz-range-thumb {
    width: 1.5rem;
    height: 1.5rem;
    background: #0d6efd;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-range::-moz-range-thumb:hover {
    background: #0a58ca;
    transform: scale(1.1);
}

#healthScoreIndicator {
    font-weight: 600;
    font-size: 1rem;
}

/* New Account Highlight Animation */
@keyframes highlightFade {
    0% {
        background-color: rgba(40, 167, 69, 0.3);
        transform: scale(1.02);
    }
    50% {
        background-color: rgba(40, 167, 69, 0.2);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

.new-account-highlight {
    animation: highlightFade 3s ease-out;
}

/* Toast Notification Styles */
.toast {
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-body {
    font-weight: 500;
}

/* Submit Button Loading State */
#submitAccountBtn {
    min-width: 140px;
    transition: all 0.2s ease;
}

#submitAccountBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Modal Animation Enhancement */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: scale(0.9);
}

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

/* KPI Update Animation */
#metric-customers {
    transition: all 0.3s ease;
}

/* Input Group Styling */
.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

/* Required Field Indicator */
.text-danger {
    font-weight: bold;
}

/* Button Icon Spacing */
.btn i {
    vertical-align: middle;
}

/* Validation Feedback */
.invalid-feedback {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Form Row Spacing */
.modal-body .row {
    margin-bottom: 0;
}

/* Card Header Button Alignment */
.card-header.d-flex {
    padding: 0.75rem 1.25rem;
}

.card-header.d-flex button {
    white-space: nowrap;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .col-md-6 {
        margin-bottom: 1rem !important;
    }
}
