/* Modern CSS Reset */
* {
    box-sizing: border-box;
}

/* Custom Status Page Container */
.kdsamref-custom-status-page {
    max-width: 1200px;
    margin: 0 auto !important;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
}

/* Hero Header */
.kdsamref-hero-header {
    padding: 40px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}



.kdsamref-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    text-align: center;
}

.kdsamref-hero-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.kdsamref-hero-icon {
    font-size: 48px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.kdsamref-hero-text h1 {
    font-size: 36px;
    font-weight: 800;
    color: #000000;
    margin: 0 0 8px 0;
}

.kdsamref-hero-text p {
    font-size: 18px;
    color: #333333;
    margin: 0;
    font-weight: 400;
}



/* Main Content Area */
.kdsamref-main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Panel Cards */
.kdsamref-panel-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.kdsamref-panel-header {
    background: #f8fafc;
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.kdsamref-panel-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.kdsamref-panel-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    flex: 1;
}

.kdsamref-status-count {
    display: flex;
    align-items: baseline;
    gap: 4px;
    background: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.kdsamref-count-number {
    font-size: 24px;
    font-weight: 800;
    color: #3b82f6;
}

.kdsamref-count-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* Form Styling */
.kdsamref-form-fields {
    padding: 32px;
}

.kdsamref-form-section {
    margin-bottom: 32px;
}

.kdsamref-form-section:last-child {
    margin-bottom: 0;
}

.kdsamref-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.kdsamref-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #3b82f6;
    border-radius: 1px;
}

.kdsamref-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.kdsamref-field-group {
    margin-bottom: 20px;
}

.kdsamref-field-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.kdsamref-field-group input,
.kdsamref-field-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.3s ease;
}

.kdsamref-field-group input:focus,
.kdsamref-field-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Color Field */
.kdsamref-color-field {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kdsamref-color-field input[type="color"] {
    width: 60px;
    height: 60px;
    padding: 0;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    background: none;
    transition: all 0.3s ease;
}

.kdsamref-color-field input[type="color"]:hover {
    border-color: #3b82f6;
    transform: scale(1.05);
}

.kdsamref-color-field input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border: none;
    border-radius: 9px;
}

.kdsamref-color-field input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 9px;
}

.kdsamref-color-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* Icon Field */
.kdsamref-icon-field {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kdsamref-icon-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #f8fafc;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.kdsamref-icon-preview:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
    color: #3b82f6;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.kdsamref-icon-preview:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.kdsamref-icon-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* Toggle Switch */
.kdsamref-toggle-label {
    display: flex !important;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    font-weight: 600;
}

.kdsamref-toggle-slider {
    position: relative;
    width: 48px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.kdsamref-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="checkbox"]:checked + .kdsamref-toggle-slider {
    background: #3b82f6;
}

input[type="checkbox"]:checked + .kdsamref-toggle-slider::before {
    transform: translateX(24px);
}

/* Form Actions */
.kdsamref-form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    margin-top: 32px;
}

.kdsamref-submit-btn,
.kdsamref-cancel-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kdsamref-submit-btn {
    background: #3b82f6;
    color: #ffffff;
}

.kdsamref-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.kdsamref-cancel-btn {
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.kdsamref-cancel-btn:hover {
    background: #e2e8f0;
    color: #374151;
}

.kdsamref-btn-icon {
    font-size: 16px;
}

/* Status Grid */
.kdsamref-status-grid {
    padding: 32px;
    display: grid;
    gap: 20px;
}

.kdsamref-status-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kdsamref-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #3b82f6;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kdsamref-status-card:hover {
    border-color: #3b82f6;
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
}

.kdsamref-status-card:hover::before {
    opacity: 1;
}

.kdsamref-status-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.kdsamref-status-visual {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kdsamref-status-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.kdsamref-status-icon-display {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.kdsamref-status-badges {
    display: flex;
    gap: 8px;
}

.kdsamref-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kdsamref-type-badge.custom {
    background: #fef3c7;
    color: #92400e;
}

.kdsamref-type-badge.core {
    background: #dbeafe;
    color: #1e40af;
}

.kdsamref-status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.kdsamref-status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.kdsamref-status-card-body {
    margin-bottom: 20px;
}

.kdsamref-status-name {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.kdsamref-status-slug {
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.kdsamref-status-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kdsamref-auto-sync-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.kdsamref-action-buttons {
    display: flex;
    gap: 8px;
}

.kdsamref-action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.kdsamref-toggle-btn.kdsamref-active {
    background: #dcfce7;
    color: #166534;
}

.kdsamref-toggle-btn.kdsamref-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.kdsamref-edit-btn {
    background: #dbeafe;
    color: #1e40af;
}

.kdsamref-delete-btn {
    background: #fee2e2;
    color: #dc2626;
}

.kdsamref-action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Empty State */
.kdsamref-empty-state {
    padding: 60px 32px;
    text-align: center;
}

.kdsamref-empty-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.kdsamref-empty-state h4 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
}

.kdsamref-empty-state p {
    font-size: 16px;
    color: #64748b;
    margin: 0 0 32px 0;
    line-height: 1.5;
}

.kdsamref-empty-actions {
    display: flex;
    justify-content: center;
}

.kdsamref-empty-btn {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kdsamref-empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Modal - Ultra Modern */
.kdsamref-icon-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.75) !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    backdrop-filter: blur(8px) !important;
    padding: 20px !important;
}

.kdsamref-icon-modal-content {
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    max-width: 700px !important;
    width: 95% !important;
    max-height: 85vh !important;
    overflow: hidden !important;
    position: relative !important;
    margin: 0 auto !important;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.kdsamref-icon-modal[style*="block"] .kdsamref-icon-modal-content {
    transform: scale(1);
}

.kdsamref-icon-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.kdsamref-icon-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kdsamref-icon-modal-header h3::before {
    content: '🎨';
    font-size: 18px;
}

.kdsamref-icon-modal-close {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-size: 16px;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kdsamref-icon-modal-close:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
    transform: scale(1.05);
}

.kdsamref-icon-modal-body {
    padding: 32px;
    background: #ffffff;
}

.kdsamref-icon-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    background: #f8fafc;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.kdsamref-icon-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
    position: relative;
}

.kdsamref-icon-tab:hover {
    background: #ffffff;
    color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.kdsamref-icon-tab.active {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.kdsamref-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 12px;
    max-height: 450px;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.kdsamref-icon-grid::-webkit-scrollbar {
    width: 8px;
}

.kdsamref-icon-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.kdsamref-icon-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.kdsamref-icon-grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.kdsamref-icon-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    color: #64748b;
    background: #ffffff;
    position: relative;
}

.kdsamref-icon-option:hover {
    background: #f0f9ff;
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
}

.kdsamref-icon-option.selected {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .kdsamref-main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .kdsamref-hero-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Inline styles moved to CSS */
.kdsamref-status-enabled-checkbox {
    display: none;
}

.kdsamref-cancel-btn-hidden {
    display: none;
}

.kdsamref-status-color-dot {
    background-color: var(--status-color, #007cba);
}

.kdsamref-status-icon {
    color: var(--status-color, #007cba);
}

@media (max-width: 768px) {
    .kdsamref-custom-status-page {
        padding: 0;
    }
    
    .kdsamref-hero-header {
        padding: 30px 0;
        margin-bottom: 30px;
    }
    
    .kdsamref-hero-content {
        padding: 0 20px;
    }
    
    .kdsamref-hero-text h1 {
        font-size: 28px;
    }
    
    .kdsamref-hero-text p {
        font-size: 16px;
    }
    
    .kdsamref-main-content {
        padding: 0 20px 30px;
        gap: 20px;
    }
    
    .kdsamref-panel-header {
        padding: 20px 24px;
    }
    
    .kdsamref-form-fields,
    .kdsamref-status-grid {
        padding: 24px;
    }
    
    .kdsamref-field-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .kdsamref-form-actions {
        flex-direction: column;
    }
    
    .kdsamref-submit-btn,
    .kdsamref-cancel-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Icon Search Styles */
.kdsamref-icon-search {
    position: relative;
    margin-bottom: 20px;
}

.kdsamref-icon-search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.kdsamref-icon-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.kdsamref-icon-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    pointer-events: none;
}

/* Icon option tooltip */
.kdsamref-icon-option {
    position: relative;
    cursor: pointer;
}

.kdsamref-icon-option:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}