/**
 * Admin Center Page Styles
 * Version: 1.0.1
 * Page-specific styles for admin_center.html
 * Note: Common admin styles (nav, header) are in admin-common.css
 */

.admin-center {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 80px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Admin Header - page specific gradient */
.admin-center .admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.filter-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.filter-section h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-section h2 .badge {
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: normal;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.filter-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.filter-tab:hover {
    color: #667eea;
}

.filter-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.filter-list {
    max-height: 400px;
    overflow-y: auto;
}

.filter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.filter-item:hover {
    border-color: #ddd;
    background: #fafafa;
}

.filter-item.disabled {
    opacity: 0.5;
}

.filter-item .pattern {
    font-family: monospace;
    font-size: 14px;
    color: #333;
}

.filter-item .type-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 10px;
}

.filter-item .type-badge.fuzzy {
    background: #e3f2fd;
    color: #1976d2;
}

.filter-item .type-badge.exact {
    background: #f3e5f5;
    color: #7b1fa2;
}

.filter-item .comment {
    font-size: 12px;
    color: #999;
    margin-left: 15px;
}

.filter-item .actions {
    display: flex;
    gap: 8px;
}

.filter-item .actions button {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.filter-item .actions .edit-btn {
    background: #e3f2fd;
    color: #1976d2;
}

.filter-item .actions .delete-btn {
    background: #ffebee;
    color: #c62828;
}

.add-filter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.add-filter-form input,
.add-filter-form select,
.add-filter-form textarea {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.add-filter-form input:focus,
.add-filter-form select:focus,
.add-filter-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.add-filter-form textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    font-family: monospace;
}

/* Admin page buttons - scoped to admin-center to avoid conflicts */
.admin-center .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-center .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.admin-center .btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.admin-center .btn-secondary:hover {
    background: #e0e0e0;
}

.settings-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.settings-section h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.setting-item:last-child {
    border-bottom: none;
}

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

.setting-item .description {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.setting-item input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 150px;
    text-align: right;
}

.toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideDown 0.3s ease;
}

.toast.success {
    background: #4CAF50;
}

.toast.error {
    background: #f44336;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.no-access {
    text-align: center;
    padding: 100px 20px;
}

.no-access h2 {
    color: #f44336;
    margin-bottom: 20px;
}

.no-access p {
    color: #666;
    margin-bottom: 30px;
}

.duration-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.duration-input input {
    width: 100px;
}

.duration-input .unit {
    color: #666;
    font-size: 14px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Drag and drop styles */
.filter-item[draggable="true"] {
    cursor: grab;
}

.filter-item[draggable="true"]:active {
    cursor: grabbing;
}

.filter-item.dragging {
    opacity: 0.5;
    border-style: dashed;
}

.filter-item.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
}
