/* assets/portal.css */
.websx-admin-dashboard,
.websx-admin-project-details,
.websx-admin-payments {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.websx-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
}

.websx-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.websx-header p {
    color: #7f8c8d;
    font-size: 16px;
}

/* Project Overview */
.websx-project-overview {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.project-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.project-card h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.project-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.plan-badge, .status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-basic { background: #3498db; color: white; }
.plan-pro { background: #9b59b6; color: white; }

.status-pending { background: #f39c12; color: white; }
.status-in_progress { background: #3498db; color: white; }
.status-completed { background: #27ae60; color: white; }
.status-live { background: #2ecc71; color: white; }

/* Progress Tracker */
.progress-tracker {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 25px;
    right: 25px;
    height: 2px;
    background: #e1e5e9;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e1e5e9;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.step.completed .step-number {
    background: #2ecc71;
    color: white;
}

.step.active .step-number {
    background: #3498db;
    color: white;
}

.step-title {
    font-size: 14px;
    color: #2c3e50;
    max-width: 100px;
}

/* Quick Actions */
.quick-actions {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-outline {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

/* Form Styles */
.form-section {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-section h2 {
    margin: 0 0 25px 0;
    color: #2c3e50;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Plan Selector */
.plan-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.plan-option {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plan-option:hover {
    border-color: #3498db;
}

.plan-option.selected {
    border-color: #3498db;
    background: #f8fbff;
}

.plan-option input[type="radio"] {
    margin-bottom: 10px;
}

/* Content Tabs */
.content-tabs {
    margin-top: 20px;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #e1e5e9;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    border-bottom-color: #3498db;
    color: #3498db;
}

.tab-btn:hover {
    background: #f8f9fa;
}

.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.tab-pane textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    resize: vertical;
}

/* Upload Grid */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.upload-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.upload-field input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background: #f8f9fa;
}

/* Payment Styles */
.payment-status {
    margin-bottom: 30px;
}

.status-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.payment-items {
    margin-top: 20px;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e1e5e9;
}

.payment-item:last-child {
    border-bottom: none;
}

.payment-label {
    font-weight: 600;
    color: #2c3e50;
}

.payment-status.paid {
    background: #d5f4e6;
    color: #27ae60;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.payment-status.pending {
    background: #fef9e7;
    color: #f39c12;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.outstanding-payments {
    margin-bottom: 30px;
}

.payment-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.payment-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.payment-card h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.payment-card .amount {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    margin: 10px 0 20px 0;
}

.payment-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Plan Change */
.plan-change {
    margin-bottom: 30px;
}

.plan-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.plan-options .plan-option {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.plan-options .plan-option.current {
    border-color: #2ecc71;
    background: #f0f9ff;
}

.plan-options .plan-option h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.plan-options .plan-option .price {
    font-size: 18px;
    font-weight: bold;
    color: #3498db;
    margin: 10px 0 15px 0;
}

.plan-options .plan-option ul {
    text-align: left;
    margin: 15px 0;
    padding-left: 20px;
}

.plan-options .plan-option li {
    margin-bottom: 5px;
    color: #7f8c8d;
}

.current-plan {
    background: #2ecc71;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Payment History */
.payment-history {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.payments-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.payments-table th,
.payments-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.payments-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.modal-header .close {
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.payment-summary {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.payment-summary p {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
}

/* Responsive Design */
@media (max-width: 768px) {
    .websx-admin-dashboard,
    .websx-admin-project-details,
    .websx-admin-payments {
        padding: 15px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-selector,
    .plan-options,
    .payment-actions {
        grid-template-columns: 1fr;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .progress-steps::before {
        display: none;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .tab-nav {
        flex-direction: column;
    }
    
    .payments-table {
        font-size: 12px;
    }
    
    .payments-table th,
    .payments-table td {
        padding: 8px 4px;
    }
}

/* No Project State */
.websx-no-project {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.websx-no-project h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.websx-no-project p {
    color: #7f8c8d;
    font-size: 16px;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e1e5e9;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error Messages */
.message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.message.success {
    background: #d5f4e6;
    color: #27ae60;
    border: 1px solid #2ecc71;
}

.message.error {
    background: #ffeaea;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

/* Admin Menu Customization */
#adminmenu .wp-submenu,
#adminmenu .wp-not-current-submenu .wp-submenu,
.folded #adminmenu .wp-has-current-submenu .wp-submenu {
    display: block !important;
}

/* Hide WordPress Branding for Clients */
body.websx-client #wpadminbar,
body.websx-client .update-nag,
body.websx-client #screen-meta-links {
    display: none !important;
}

/* Custom Admin Color Scheme */
.websx-admin-dashboard .wp-admin,
.websx-admin-project-details .wp-admin,
.websx-admin-payments .wp-admin {
    background: #f1f3f4;
}
