:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --light-bg: #f8f9fa;
    --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.05), 0 6px 6px rgba(0, 0, 0, 0.1);
}

body {
    background-color: #f0f2f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
    color: #333;
}

.app-container {
    max-width: 1800px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    color: white;
    box-shadow: var(--card-shadow);
}

.header h1 {
    margin-bottom: 5px;
    font-weight: 700;
    font-size: 1.8rem;
}

.card {
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
    border: none;
}

.card-header {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #eeeeee;
    font-weight: 600;
    padding: 12px 15px;
    border-radius: 12px 12px 0 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

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

.btn-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.json-input {
    font-family: 'Fira Code', 'Courier New', monospace;
    min-height: 120px;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.85rem;
}

.json-output {
    font-family: 'Fira Code', 'Courier New', monospace;
    min-height: 100px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.85rem;
}

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.table th {
    background-color: #f1f5f9;
    font-weight: 600;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.table td {
    padding: 10px 12px;
    vertical-align: middle;
    font-size: 0.9rem;
}

.action-buttons .btn {
    margin-right: 4px;
}

.badge-category {
    background-color: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.badge-public {
    background-color: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.badge-private {
    background-color: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.sortable:hover {
    cursor: pointer;
    background-color: #f1f5f9;
}

.search-box {
    max-width: 250px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.optional-field {
    color: #6c757d;
    font-weight: normal;
}

.size-badge {
    background-color: #6f42c1;
    color: white;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 8px 0;
}

.page-info {
    font-size: 0.85rem;
    color: #6c757d;
}

.service-intro-editor {
    min-height: 150px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #fff;
    outline: none;
}

.service-intro-editor:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.config-type-badge {
    background-color: #6f42c1;
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.service-intro-badge {
    background-color: #20c997;
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.config-row {
    background-color: #f0f8ff !important;
}

.service-intro-row {
    background-color: #f0fff4 !important;
}

.config-row td,
.service-intro-row td {
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 40px 0;
    color: #6c757d;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.clear-editor-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    z-index: 10;
    padding: 2px 6px;
    font-size: 0.75rem;
}

.editor-container {
    position: relative;
}

.copy-feedback {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #198754;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    z-index: 100;
    display: none;
}

.validation-auto-clear {
    transition: all 0.3s ease;
}

.editor-hint {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
}

.category-selector {
    position: relative;
    width: 180px;
}

.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.category-option {
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.category-option:hover {
    background-color: #f8f9fa;
}

@media (max-width: 1200px) {
    .table-responsive {
        overflow-x: auto;
    }
    
    .table td, .table th {
        white-space: nowrap;
    }
}

@media (max-width: 992px) {
    .pagination-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .action-buttons .btn {
        margin-bottom: 5px;
    }
}