/* ========================================
   ADMINISTRATION STYLES
   ======================================== */

.admin-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-header {
    margin-bottom: 30px;
}

.admin-header h1 {
    margin: 0 0 8px 0;
    color: #212529;
    font-size: 2em;
    font-weight: 500;
}

.admin-header p {
    margin: 0;
    color: #6c757d;
    font-size: 1.1em;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 0;
    border-bottom: 1px solid #e9ecef;
    background: #fafbfc;
    padding: 0 20px;
    margin-left: -25px;
    margin-right: -25px;
    border-radius: 15px 15px 0 0;
}

.admin-tab {
    padding: 14px 24px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 400;
    font-size: 15px;
    transition: all 0.3s ease;
    color: #6c757d;
    position: relative;
    margin-bottom: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-tab span {
    font-size: 1.1em;
}

.admin-tab.active {
    color: #4169e1;
    border-bottom-color: #4169e1;
    font-weight: 500;
    background: white;
}

.admin-tab:hover:not(.active) {
    background: #f0f2f5;
    color: #495057;
}

/* Admin Content */
.admin-content {
    padding: 30px 0;
}

.admin-section h2 {
    margin-bottom: 25px;
    color: #212529;
    font-size: 1.5em;
    font-weight: 500;
}

/* File Operations */
.file-operations {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-admin-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-admin-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-admin-primary span {
    font-size: 1.2em;
}

/* Branding Section */
.branding-content {
    max-width: 600px;
}

.branding-group {
    margin-bottom: 30px;
}

.branding-group h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
    font-weight: 500;
}

.logo-upload-area {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.logo-preview {
    width: 200px;
    height: 80px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    overflow: hidden;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.color-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-item label {
    font-weight: 500;
    color: #495057;
}

.color-item input[type="color"] {
    width: 100%;
    height: 50px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    padding: 5px;
}

/* Modal Base */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Modal Content */
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    transform: scale(0.9);
    animation: scaleIn 0.3s ease forwards;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}

/* Modal Header */
.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
    font-weight: 500;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Configuration Modal */
.config-modal {
    width: 95%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Config View */
#configView {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Config Tabs */
.config-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 0;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
    background: #fafbfc;
    padding: 0 20px;
    margin-left: -25px;
    margin-right: -25px;
    margin-top: -25px;
    border-radius: 15px 15px 0 0;
}

.config-tab {
    padding: 14px 24px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 400;
    font-size: 15px;
    transition: all 0.3s ease;
    color: #6c757d;
    position: relative;
    margin-bottom: -1px;
}

.config-tab.active {
    color: #4169e1;
    border-bottom-color: #4169e1;
    font-weight: 500;
    background: white;
}

.config-tab:hover:not(.active) {
    background: #f0f2f5;
    color: #495057;
}

/* Config Sections */
.config-section {
    padding: 30px 0;
    background: white;
}

.config-section h4 {
    margin-bottom: 8px;
    color: #212529;
    font-size: 1.5em;
    font-weight: 500;
}

.config-section h5 {
    margin-bottom: 15px;
    color: #212529;
    font-size: 1.1em;
    font-weight: 500;
}

.config-description {
    color: #6c757d;
    margin-bottom: 25px;
    font-style: italic;
    font-size: 0.95em;
}

/* Config Containers */
.labels-config-container,
.locations-config-container,
.types-config-container,
.vendors-config-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* Unified config container styling */
.groups-config-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.groups-config-container .current-config {
    width: 100%;
}

.groups-config-container .add-config {
    width: 100%;
}

.config-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    min-height: 80px;
}

.config-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.config-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.config-item-remove {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    transition: all 0.2s ease;
}
/* Config Input and Button Styling */
.config-section input[type="text"] {
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    max-width: 400px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.config-section input[type="text"]:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.config-section input[type="text"]::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* Config Add Buttons */
.config-section .btn-small {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 6px;
}

.config-section .form-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}
.config-item-remove:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Config Form Actions */
#configView .form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

/* Fields Configuration */
.fields-config-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.field-config-group h5 {
    margin-bottom: 15px;
    color: #333;
}

.field-config-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.field-config-item.disabled {
    opacity: 0.6;
    background: #f5f5f5;
}

.field-info {
    display: flex;
    flex-direction: column;
}

.field-name {
    font-weight: 500;
    color: #333;
}

.field-description {
    font-size: 0.85em;
    color: #666;
}

.field-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Toggle Switch */
.field-toggle {
    position: relative;
    width: 50px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.field-toggle.active {
    background: #667eea;
}

.field-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.field-toggle.active::before {
    transform: translateX(26px);
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .config-modal {
        max-width: 100%;
    }
    
    .labels-config-container,
    .locations-config-container,
    .types-config-container,
    .vendors-config-container {
        grid-template-columns: 1fr;
    }
    
    .fields-config-container {
        grid-template-columns: 1fr;
    }

}
/* Icon Picker Modal */
.icon-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.icon-picker-content {
    background: white;
    padding: 20px;
    border-radius: 15px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    margin: 20px 0;
}

.icon-option {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5em;
    transition: all 0.2s;
}

.icon-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: scale(1.1);
}

/* Icon input group */
.icon-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-picker-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5em;
}

/* Config item with icon */
.config-item-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-item-icon {
    font-size: 1.2em;
}

.config-item-text {
    flex: 1;
}

.config-list-with-icons .config-item {
    padding: 8px 12px;
}
/* Status Configuration */
.status-config-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.status-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.status-group h5 {
    margin-top: 0;
    color: #333;
}