/* styles/configuration.css */

.config-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    min-height: 600px;
    overflow: hidden;
}

.config-sidebar {
    width: 250px;
    background: #f8f9fa;
    border-right: 1px solid #eee;
    padding: 20px 0;
}

.config-nav-item {
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
    font-weight: 500;
}

.config-nav-item:hover:not(.disabled) {
    background: #e9ecef;
    color: #4361ee;
}

.config-nav-item.active {
    background: #eef2ff;
    color: #4361ee;
    border-right: 3px solid #4361ee;
}

.config-nav-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.config-content {
    flex: 1;
    padding: 30px;
}

.config-section {
    display: none;
}

.config-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 1.5rem;
    color: #2b2d42;
    margin: 0;
}

.config-table {
    width: 100%;
    border-collapse: collapse;
}

.config-table th,
.config-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.config-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.btn-icon-danger {
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-icon-danger:hover {
    background: #fee2e2;
}

.btn-icon-primary {
    color: #4361ee;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-icon-primary:hover {
    background: #eef2ff;
}

.required-asterisk {
    color: #ef4444;
    margin-left: 2px;
}

/* --- Premium Modal Redesign --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    /* Darker Slate with transparency */
    backdrop-filter: blur(8px);
    /* Glassmorphism */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #ffffff;
    border-radius: 20px;
    width: 95%;
    max-width: 650px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    position: relative;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 24px 32px;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 32px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #4361ee;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.05em;
    border-left: 4px solid #4361ee;
    padding-left: 12px;
}

.modal-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 24px 0;
}

/* Enhanced Form Controls */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 1rem;
    transition: color 0.2s;
}

.input-with-icon .form-control {
    padding-left: 42px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    color: #1e293b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: #4361ee;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.form-control:focus+i,
.input-with-icon:focus-within i {
    color: #4361ee;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-row-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .form-row-split {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #4361ee;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(67, 97, 238, 0.2), 0 2px 4px -1px rgba(67, 97, 238, 0.1);
}

.btn-primary:hover {
    background: #3a56e0;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(67, 97, 238, 0.3), 0 4px 6px -2px rgba(67, 97, 238, 0.05);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-danger {
    background: #fee2e2;
    color: #ef4444;
}

.btn-danger:hover {
    background: #fecaca;
    color: #dc2626;
}

/* Custom Scrollbar for Modal Body */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}