@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css");

:root {
    --primary-color: #5a67d8;    /* Indigo/Purple 500 - 더 부드러운 색상 */
    --primary-hover: #4c51bf;    /* Indigo/Purple 600 */
    --secondary-color: #6b7280;  /* Gray 500 */
    --dark-color: #1e293b;       /* Slate 800 */
    --light-color: #f8fafc;      /* Slate 50 */
    --gray-color: #e2e8f0;       /* Slate 200 */
    --success-color: #34d399;    /* Emerald 400 - 더 부드러운 녹색 */
    --warning-color: #fbbf24;    /* Amber 400 - 더 부드러운 색상 */
    --danger-color: #f87171;     /* Red 400 - 더 부드러운 색상 */
    --bg-color: #f3f4f6;         /* Gray 100 - 배경색 */
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

/* General styling */
body {
    font-family: 'Poppins', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    padding: 1.5rem;
}

/* Card styling */
.card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    background-color: white;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
    color: white;
    border: none;
}

.card-header.bg-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #4b5563) !important; /* Gray 600 */
    color: white;
    border: none;
}

.card-header.bg-light {
    background-color: #f8fafc !important; /* Slate 50 */
    border-bottom: 1px solid #e2e8f0; /* Slate 200 */
}

.card-body {
    padding: 1.5rem;
}

/* Form controls */
.form-control, .form-select {
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid #cbd5e1; /* Slate 300 */
    transition: var(--transition);
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.2); /* Primary color with opacity */
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #475569; /* Slate 600 */
}

/* Button styling */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(90, 103, 216, 0.3);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-success:hover {
    background-color: #10b981; /* Emerald 500 */
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(52, 211, 153, 0.3);
}

.btn-dark {
    background-color: #4b5563; /* Gray 600 */
    color: white;
}

.btn-dark:hover {
    background-color: #374151; /* Gray 700 */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(75, 85, 99, 0.3);
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #ef4444; /* Red 500 */
    transform: translateY(-2px);
}

.btn-outline-success {
    color: var(--success-color);
    border-color: var(--success-color);
    background-color: transparent;
}

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

/* Table styling */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table th {
    background-color: #f8fafc; /* Slate 50 */
    color: #475569; /* Slate 600 */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #e2e8f0; /* Slate 200 */
}

.table-bordered th:first-child,
.table-bordered td:first-child {
    border-left: 1px solid #e2e8f0;
}

.table-bordered th:last-child,
.table-bordered td:last-child {
    border-right: 1px solid #e2e8f0;
}

.table-hover tbody tr:hover {
    background-color: #f1f5f9; /* Slate 100 */
}

/* Custom styling for the results section */
#additional-dex-needed {
    font-weight: 600;
    font-size: 1.1rem;
    background-color: #eff6ff; /* Blue 50 */
    border-left: 4px solid var(--primary-color);
}

/* Form check */
.form-check {
    padding-left: 1.75rem;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.25rem;
    margin-left: -1.75rem;
    background-color: #fff;
    border: 1px solid #cbd5e1; /* Slate 300 */
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    color: #475569; /* Slate 600 */
}

/* Animation for calculation */
@keyframes highlight {
    0% {background-color: #fff;}
    50% {background-color: #e0e7ff;} /* Indigo 100 - 더 부드러운 하이라이트 */
    100% {background-color: #fff;}
}

.highlight-result {
    animation: highlight 1s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .table {
        font-size: 0.9rem;
    }

    .card-header h2 {
        font-size: 1rem;
    }

    .card-header h1 {
        font-size: 1.25rem;
    }

    .container {
        padding: 0.75rem;
    }
}

/* Tooltips */
.tooltip {
    font-size: 0.8rem;
    opacity: 0.95 !important;
}

.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
}

/* Toast notifications - alert 대체 */
.toast {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: none;
}

.toast-header {
    border-bottom: none;
    padding: 0.75rem 1rem;
}

.toast-body {
    padding: 1rem;
    color: #475569; /* Slate 600 */
}

/* Special effects */
.card.shadow-hover:hover {
    transform: translateY(-5px);
}

/* Data management button group */
.data-management-buttons {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

/* Badge styling */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

.badge.bg-info {
    background-color: #818cf8 !important; /* Indigo 400 - 모던한 보라색 계열 */
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Info card header */
.card-header.bg-info {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important; /* Indigo gradients */
    color: white;
    border: none;
}

/* Results section highlight */
.results-card {
    border-left: 4px solid var(--primary-color);
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}
.shadow-hover:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}
.highlight-result {
    animation: highlightPulse 1s ease-in-out;
}
@keyframes highlightPulse {
    0% { background-color: #fff3cd; }
    50% { background-color: #ffc107; }
    100% { background-color: #fff3cd; }
}
.results-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}
.data-management-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.has-saved-data {
    position: relative;
}
.has-saved-data::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 10px;
    height: 10px;
    background: #dc3545;
    border-radius: 50%;
}