/* ==========================================================================
   Synaplan WP AI - Admin Styles
   ========================================================================== */

:root {
    --synaplan-primary: #061c3e;
    --synaplan-secondary: #64748b;
    --synaplan-accent: #10d876;
    --synaplan-dark: #0f172a;
    --synaplan-light: #f8fafc;
}

/* ==========================================================================
   Wizard Styles
   ========================================================================== */

.synaplan-wizard {
    max-width: 800px;
    margin: 20px auto;
}

/* Debug Mode Toggle */
.debug-toggle {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.debug-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #856404;
    cursor: pointer;
}

.debug-icon {
    font-size: 20px;
}

.debug-help {
    display: block;
    margin-top: 8px;
    padding-left: 30px;
    color: #856404;
    font-size: 12px;
    line-height: 1.5;
}

.debug-help strong {
    color: #664d03;
}

.synaplan-wizard-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--synaplan-primary) 0%, var(--synaplan-dark) 100%);
    color: white;
    border-radius: 12px;
}

.synaplan-wizard-logo img {
    height: 60px;
    margin-bottom: 20px;
}

.synaplan-wizard-header h1 {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    font-weight: 700;
    color: white !important;
}

.synaplan-wizard-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
    color: white !important;
}

.synaplan-wizard-progress {
    margin-bottom: 40px;
}

.progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--synaplan-accent) 0%, #00c4a7 100%);
    transition: width 0.3s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: -1;
}

.step.active:not(:last-child)::after {
    background: var(--synaplan-accent);
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--synaplan-accent);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.step.active .step-label {
    color: var(--synaplan-primary);
    font-weight: 600;
}

.synaplan-wizard-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.wizard-step h2 {
    color: var(--synaplan-primary);
    margin: 0 0 10px 0;
    font-size: 1.875rem;
    font-weight: 700;
}

.wizard-step p {
    color: var(--synaplan-secondary);
    margin: 0 0 30px 0;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--synaplan-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 4px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.form-group input[type="color"]:focus {
    outline: none;
    border-color: var(--synaplan-accent);
    box-shadow: 0 0 0 3px rgba(16, 216, 118, 0.1);
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--synaplan-secondary);
}

.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength.weak {
    background: #ef4444;
}

.password-strength.medium {
    background: #f59e0b;
}

.password-strength.strong {
    background: var(--synaplan-accent);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--synaplan-secondary);
}

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

.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--synaplan-accent);
    background: #f0fdf4;
}

.file-upload-area.dragover {
    border-color: var(--synaplan-accent);
    background: #f0fdf4;
}

.upload-icon {
    color: var(--synaplan-secondary);
    margin-bottom: 16px;
}

.file-upload-area h3 {
    margin: 0 0 8px 0;
    color: var(--synaplan-primary);
    font-size: 1.125rem;
}

.file-upload-area p {
    margin: 0 0 20px 0;
    color: var(--synaplan-secondary);
}

.uploaded-files {
    margin-top: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.uploaded-files h4 {
    margin: 0 0 16px 0;
    color: var(--synaplan-primary);
}

.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
}

.file-list li:last-child {
    margin-bottom: 0;
}

.review-summary {
    background: #f9fafb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

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

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

.summary-item strong {
    color: var(--synaplan-primary);
}

.completion-notice {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}

.notice-icon {
    color: var(--synaplan-accent);
    flex-shrink: 0;
}

.notice-content h4 {
    margin: 0 0 4px 0;
    color: var(--synaplan-primary);
}

.notice-content p {
    margin: 0;
    color: var(--synaplan-secondary);
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.wizard-actions .button {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.wizard-actions .button-primary {
    background: var(--synaplan-accent);
    border-color: var(--synaplan-accent);
    color: white;
}

.wizard-actions .button-primary:hover {
    background: #00c4a7;
    border-color: #00c4a7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 216, 118, 0.3);
}

/* ==========================================================================
   Dashboard Styles
   ========================================================================== */

.synaplan-dashboard {
    max-width: 1200px;
}

.synaplan-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, var(--synaplan-primary) 0%, var(--synaplan-dark) 100%);
    color: white;
    border-radius: 12px;
}

.header-content h1 {
    margin: 0 0 8px 0;
    font-size: 2rem;
    font-weight: 700;
}

.header-content p {
    margin: 0;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.card-header h2 {
    margin: 0 0 8px 0;
    color: var(--synaplan-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.card-header p {
    margin: 0;
    color: var(--synaplan-secondary);
    font-size: 0.875rem;
}

.card-content {
    padding: 24px;
}

/* Widget Preview */
.widget-preview .preview-container {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.preview-widget {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.widget-icon {
    margin-bottom: 4px;
}

.preview-info {
    flex: 1;
}

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

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

.info-item strong {
    color: var(--synaplan-primary);
    font-size: 0.875rem;
}

.info-item span {
    color: var(--synaplan-secondary);
    font-size: 0.875rem;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--synaplan-accent);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--synaplan-secondary);
    font-weight: 500;
}

/* Quick Actions */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: var(--synaplan-primary);
    transition: all 0.3s ease;
}

.action-button:hover {
    background: #f0fdf4;
    border-color: var(--synaplan-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 216, 118, 0.1);
}

.action-icon {
    color: var(--synaplan-accent);
    flex-shrink: 0;
}

.action-content h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
}

.action-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--synaplan-secondary);
}

/* Recent Activity */
.activity-list {
    space-y: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.activity-icon {
    color: var(--synaplan-accent);
    flex-shrink: 0;
}

.activity-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--synaplan-primary);
    margin-bottom: 2px;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--synaplan-secondary);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .synaplan-wizard {
        margin: 10px;
    }
    
    .synaplan-wizard-content {
        padding: 20px;
    }
    
    .synaplan-wizard-header {
        padding: 20px;
    }
    
    .synaplan-wizard-header h1 {
        font-size: 2rem;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 16px;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
    
    .wizard-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .wizard-actions .button {
        width: 100%;
    }
    
    .synaplan-dashboard-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .widget-preview .preview-container {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--synaplan-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   WordPress Admin Integration
   ========================================================================== */

.wrap h1 {
    color: var(--synaplan-primary);
}

.wp-admin .button-primary {
    background: var(--synaplan-accent);
    border-color: var(--synaplan-accent);
}

.wp-admin .button-primary:hover {
    background: #00c4a7;
    border-color: #00c4a7;
}

.notice {
    border-left-color: var(--synaplan-accent);
}

.notice.notice-success {
    border-left-color: var(--synaplan-accent);
}
