/**
 * Website Downloader - Dashboard Styles
 */

/* Base Dashboard */
.wd-dashboard {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Notices */
.wd-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.wd-notice-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wd-notice-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Tabs */
.wd-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 24px;
}

.wd-tab {
    padding: 12px 24px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.wd-tab:hover {
    color: #333;
}

.wd-tab.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.wd-tab-content {
    display: none;
}

.wd-tab-content.active {
    display: block;
}

/* Usage Banner */
.wd-usage-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.wd-usage-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wd-plan-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.wd-plan-free {
    background: #e9ecef;
    color: #495057;
}

.wd-plan-pro {
    background: #d4edda;
    color: #155724;
}

.wd-plan-agency {
    background: #cce5ff;
    color: #004085;
}

.wd-usage-text {
    color: #666;
    font-size: 14px;
}

/* Buttons */
.wd-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.wd-btn-primary {
    background: #0073aa;
    color: #fff;
}

.wd-btn-primary:hover {
    background: #005a87;
}

.wd-btn-success {
    background: #28a745;
    color: #fff;
}

.wd-btn-success:hover {
    background: #218838;
}

.wd-btn-danger {
    background: #dc3545;
    color: #fff;
}

.wd-btn-danger:hover {
    background: #c82333;
}

.wd-btn-upgrade {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.wd-btn-upgrade:hover {
    opacity: 0.9;
}

.wd-btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.wd-btn-connect {
    background: #28a745;
    color: #fff;
}

.wd-btn-disconnect {
    background: #6c757d;
    color: #fff;
}

.wd-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Create Job Form */
.wd-create-job {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.wd-create-job h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: #333;
}

.wd-form-row {
    margin-bottom: 16px;
}

.wd-form-row.wd-assets-toggle {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 8px;
}

.wd-form-row.wd-assets-toggle .wd-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

.wd-form-row.wd-assets-toggle .wd-checkbox-label input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.wd-form-row.wd-assets-toggle .wd-hint {
    display: block;
    margin-top: 4px;
    margin-left: 24px;
}

/* Headless Browser & Screenshots Section */
.wd-form-row.wd-headless-section,
.wd-form-row.wd-screenshot-section {
    background: #f0f7ff;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 8px;
    border: 1px solid #d0e3f7;
}

.wd-form-row.wd-screenshot-section {
    background: #fff9e6;
    border-color: #ffe08a;
    padding-bottom: 16px;
}

.wd-form-row.wd-screenshot-upgrade {
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 6px;
    margin-top: 8px;
}

.wd-headless-section .wd-checkbox-label,
.wd-screenshot-section .wd-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

.wd-headless-section .wd-checkbox-label input,
.wd-screenshot-section .wd-checkbox-label input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.wd-headless-section .wd-hint,
.wd-screenshot-section .wd-hint {
    display: block;
    margin-top: 4px;
    margin-left: 24px;
    font-size: 12px;
    color: #666;
}

.wd-screenshot-options {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #ffe08a;
}

.wd-screenshot-options .wd-form-row-inline {
    margin-bottom: 12px;
}

.wd-screenshot-options .wd-form-group {
    flex: 1;
}

.wd-screenshot-options label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

.wd-screenshot-options select,
.wd-screenshot-options input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wd-screenshot-token-info {
    background: #fff;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    border: 1px solid #ffe08a;
}

.wd-screenshot-token-info .wd-token-balance {
    margin-right: 8px;
}

.wd-screenshot-token-info .wd-token-balance strong {
    color: #e67e00;
}

.wd-screenshot-token-info .wd-token-cap {
    color: #999;
}

.wd-custom-viewport {
    margin-top: 8px;
}

.wd-form-row label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
}

.wd-form-row input[type="url"],
.wd-form-row input[type="text"],
.wd-form-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.wd-form-row input:focus,
.wd-form-row select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.wd-form-row-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.wd-form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
}

.wd-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.wd-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}

.wd-hint a {
    color: #0073aa;
}

/* Messages */
.wd-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 16px;
    font-size: 14px;
}

.wd-message-success {
    background: #d4edda;
    color: #155724;
}

.wd-message-error {
    background: #f8d7da;
    color: #721c24;
}

/* Limit Reached */
.wd-limit-reached {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 24px;
}

.wd-limit-reached h3 {
    margin: 0 0 12px 0;
    color: #333;
}

.wd-limit-reached p {
    color: #666;
    margin-bottom: 20px;
}

/* Jobs Table */
.wd-jobs-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
}

.wd-jobs-section h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: #333;
}

/* Jobs Filters */
.wd-jobs-filters {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.wd-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.wd-filter-group {
    flex-shrink: 0;
}

.wd-filter-search {
    flex: 1;
    min-width: 200px;
}

.wd-filter-input,
.wd-filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
}

.wd-filter-input {
    width: 100%;
}

.wd-filter-select {
    min-width: 120px;
    cursor: pointer;
}

.wd-filter-input:focus,
.wd-filter-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

#wd-filter-clear {
    padding: 8px 16px;
}

.wd-jobs-table {
    width: 100%;
    border-collapse: collapse;
}

.wd-jobs-table th,
.wd-jobs-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.wd-jobs-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.wd-jobs-table td {
    color: #666;
}

.wd-url-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-url-cell a {
    color: #0073aa;
    text-decoration: none;
}

.wd-url-cell a:hover {
    text-decoration: underline;
}

/* Status badges */
.wd-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.wd-status-queued {
    background: #e7f3ff;
    color: #0073aa;
}

.wd-status-running {
    background: #fff3cd;
    color: #856404;
}

.wd-status-ready {
    background: #d4edda;
    color: #155724;
}

.wd-status-failed {
    background: #f8d7da;
    color: #721c24;
}

.wd-error-hint {
    color: #dc3545;
    cursor: help;
}

.wd-retention-note {
    margin-top: 16px;
    padding: 12px;
    background: #fff3cd;
    border-radius: 6px;
    font-size: 13px;
    color: #856404;
}

.wd-no-data,
.wd-loading {
    text-align: center;
    color: #999;
    padding: 24px !important;
}

/* Storage Tab */
.wd-storage-intro {
    color: #666;
    margin-bottom: 24px;
    font-size: 14px;
}

.wd-upgrade-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 32px;
    border-radius: 8px;
    text-align: center;
}

.wd-upgrade-notice p {
    margin: 0 0 16px 0;
    font-size: 16px;
}

.wd-storage-providers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.wd-storage-provider {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
}

.wd-storage-provider.connected {
    border-color: #28a745;
    background: #f8fff8;
}

.wd-provider-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.wd-provider-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
}

.wd-provider-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.wd-provider-status {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.wd-provider-status.connected {
    color: #28a745;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wd-provider-status.unavailable {
    color: #999;
}

.wd-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
}

/* API Keys Tab */
.wd-api-intro {
    color: #666;
    margin-bottom: 24px;
    font-size: 14px;
}

.wd-api-intro a {
    color: #0073aa;
}

.wd-create-api-key {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.wd-create-api-key .wd-form-row-inline {
    display: flex;
    gap: 12px;
}

.wd-create-api-key input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.wd-new-key-display {
    margin-top: 16px;
    padding: 16px;
    background: #fff3cd;
    border-radius: 6px;
}

.wd-new-key-display code {
    display: block;
    margin: 8px 0;
    padding: 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    word-break: break-all;
}

.wd-api-keys-list h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #333;
}

.wd-api-keys-table {
    width: 100%;
    border-collapse: collapse;
}

.wd-api-keys-table th,
.wd-api-keys-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.wd-api-keys-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.wd-api-example {
    margin-top: 24px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.wd-api-example h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #333;
}

.wd-api-example pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 13px;
}

/* Plan Tab */
.wd-plan-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.wd-plan-stat {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
}

.wd-stat-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.wd-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.wd-upgrade-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 32px;
    border-radius: 8px;
    text-align: center;
}

.wd-upgrade-cta h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
}

.wd-upgrade-cta p {
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.wd-upgrade-cta .wd-btn-primary {
    background: #fff;
    color: #667eea;
}

/* Login Required */
.wd-login-required {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wd-login-required h2 {
    margin: 0 0 16px 0;
    color: #333;
}

.wd-login-required p {
    color: #666;
    margin-bottom: 20px;
}

.wd-register-link {
    margin-top: 16px;
    font-size: 14px;
    color: #666;
}

.wd-register-link a {
    color: #0073aa;
}

/* Responsive */
@media (max-width: 768px) {
    .wd-tabs {
        overflow-x: auto;
    }
    
    .wd-tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .wd-form-row-inline {
        grid-template-columns: 1fr;
    }
    
    .wd-usage-banner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .wd-jobs-table {
        font-size: 13px;
    }
    
    .wd-jobs-table th,
    .wd-jobs-table td {
        padding: 8px;
    }
    
    .wd-storage-providers {
        grid-template-columns: 1fr;
    }
    
    .wd-plan-details {
        grid-template-columns: 1fr;
    }
    
    .wd-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wd-filter-group {
        width: 100%;
    }
    
    .wd-filter-search {
        min-width: auto;
    }
    
    .wd-filter-select {
        width: 100%;
    }
    
    #wd-filter-clear {
        width: 100%;
    }
}

/* =========================================================================
   FOLDER SETTINGS
   ========================================================================= */

.wd-folder-settings {
    margin: 16px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
}

.wd-folder-settings .wd-form-row {
    margin-bottom: 12px;
}

.wd-folder-settings .wd-form-row:last-child {
    margin-bottom: 0;
}

.wd-folder-settings label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.wd-folder-settings input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wd-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.wd-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.wd-help-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}

.wd-folder-preview {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.wd-btn-save-folder {
    margin-top: 8px;
}

/* =========================================================================
   SCHEDULED DOWNLOADS
   ========================================================================= */

.wd-scheduled-intro {
    color: #666;
    margin-bottom: 20px;
}

.wd-scheduled-usage {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #333;
}

.wd-create-scheduled {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.wd-create-scheduled h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #333;
}

.wd-scheduled-list h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #333;
}

.wd-no-scheduled {
    color: #666;
    font-style: italic;
}

.wd-scheduled-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.wd-scheduled-table th,
.wd-scheduled-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.wd-scheduled-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.wd-scheduled-table td {
    color: #666;
}

.wd-scheduled-url {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.wd-status-active {
    background: #d4edda;
    color: #155724;
}

.wd-status-paused {
    background: #fff3cd;
    color: #856404;
}

.wd-actions {
    white-space: nowrap;
}

.wd-actions .wd-btn {
    margin-right: 4px;
}

.wd-actions .wd-btn:last-child {
    margin-right: 0;
}

.wd-btn-danger {
    background: #dc3545;
    color: #fff;
}

.wd-btn-danger:hover {
    background: #c82333;
}

/* Day selector groups */
.wd-day-of-week,
.wd-day-of-month {
    transition: opacity 0.2s;
}

/* Timezone selector */
#wd-scheduled-timezone {
    max-width: 300px;
}

/* Responsive adjustments for scheduled table */
@media (max-width: 768px) {
    .wd-scheduled-table {
        font-size: 12px;
    }
    
    .wd-scheduled-table th,
    .wd-scheduled-table td {
        padding: 8px 6px;
    }
    
    .wd-scheduled-url {
        max-width: 100px;
    }
    
    .wd-actions {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .wd-actions .wd-btn {
        margin-right: 0;
    }
}

/* ========================================
   Report Modal Styles
======================================== */

.wd-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

.wd-modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.wd-modal-dialog {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    margin: 40px auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.wd-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.wd-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.wd-modal-close:hover {
    color: #64748b;
}

.wd-modal-body {
    padding: 24px;
}

/* Report Content Styles */
.wd-report-header {
    margin-bottom: 20px;
}

.wd-report-header h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    word-break: break-all;
}

.wd-report-type {
    display: inline-block;
    padding: 4px 10px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.wd-report-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.wd-meta-item {
    display: flex;
    flex-direction: column;
}

.wd-meta-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.wd-meta-value {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}

.wd-report-section {
    margin-bottom: 20px;
}

.wd-report-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.wd-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.wd-stat-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* Status Codes */
.wd-status-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wd-status-code {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    font-family: monospace;
}

.wd-code-200,
.wd-code-201,
.wd-code-204 {
    background: #dcfce7;
    color: #166534;
}

.wd-code-301,
.wd-code-302,
.wd-code-304 {
    background: #dbeafe;
    color: #1e40af;
}

.wd-code-400,
.wd-code-401,
.wd-code-403,
.wd-code-404,
.wd-code-500 {
    background: #fee2e2;
    color: #dc2626;
}

/* Changes Section */
.wd-report-changes {
    background: #fef3c7;
    padding: 16px;
    border-radius: 8px;
}

.wd-report-changes h4 {
    color: #92400e;
}

.wd-changes-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
}

.wd-change {
    display: flex;
    flex-direction: column;
}

.wd-change-count {
    font-size: 24px;
    font-weight: 700;
}

.wd-change-added .wd-change-count {
    color: #166534;
}

.wd-change-removed .wd-change-count {
    color: #dc2626;
}

.wd-change-label {
    font-size: 12px;
    color: #92400e;
}

.wd-url-samples {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.wd-url-samples strong {
    display: block;
    font-size: 12px;
    color: #92400e;
    margin-bottom: 8px;
}

.wd-url-samples ul {
    margin: 0;
    padding-left: 20px;
}

.wd-url-samples li {
    font-size: 12px;
    color: #78350f;
    word-break: break-all;
    margin-bottom: 4px;
}

.wd-report-first-run {
    background: #f1f5f9;
    padding: 16px;
    border-radius: 8px;
}

.wd-report-first-run p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

/* Report Actions */
.wd-report-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

/* View Report Button */
.wd-btn-outline {
    background: transparent;
    color: #2563eb;
    border: 1px solid #2563eb;
}

.wd-btn-outline:hover {
    background: #2563eb;
    color: #fff;
}

/* Loading state in modal */
.wd-modal .wd-loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.wd-modal .wd-error {
    text-align: center;
    padding: 40px;
    color: #dc2626;
}

/* Mobile responsiveness for modal */
@media (max-width: 640px) {
    .wd-modal {
        padding: 10px;
    }
    
    .wd-modal-dialog {
        margin: 20px auto;
    }
    
    .wd-modal-body {
        padding: 16px;
    }
    
    .wd-report-meta {
        grid-template-columns: 1fr;
    }
    
    .wd-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .wd-stat {
        padding: 12px;
    }
    
    .wd-stat-value {
        font-size: 22px;
    }
    
    .wd-changes-stats {
        flex-direction: column;
        gap: 12px;
    }
}

/* ========================================
   Advanced Crawl Options Accordion
======================================== */

.wd-advanced-options-wrapper {
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.wd-accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #f8fafc;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-align: left;
    transition: background 0.2s;
}

.wd-accordion-toggle:hover {
    background: #f1f5f9;
}

.wd-accordion-toggle[aria-expanded="true"] {
    background: #e2e8f0;
}

.wd-accordion-icon {
    font-size: 10px;
    transition: transform 0.2s;
}

.wd-accordion-toggle[aria-expanded="true"] .wd-accordion-icon {
    transform: rotate(90deg);
}

.wd-accordion-content {
    padding: 20px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

/* Badges */
.wd-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.wd-badge-pro {
    background: #dbeafe;
    color: #1e40af;
}

.wd-badge-agency {
    background: #fef3c7;
    color: #92400e;
}

/* Teaser for Free Users */
.wd-advanced-teaser {
    text-align: center;
    padding: 30px 20px;
}

.wd-teaser-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.wd-advanced-teaser h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #1e293b;
}

.wd-advanced-teaser p {
    margin: 0 0 16px 0;
    color: #64748b;
}

.wd-advanced-teaser ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.wd-advanced-teaser ul li {
    padding: 6px 0 6px 24px;
    position: relative;
    color: #475569;
    font-size: 14px;
}

.wd-advanced-teaser ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}

/* Options Sections */
.wd-options-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.wd-options-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.wd-options-section h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wd-options-section .wd-form-row {
    margin-bottom: 12px;
}

.wd-options-section .wd-form-row:last-child {
    margin-bottom: 0;
}

.wd-options-section label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.wd-options-section input[type="text"],
.wd-options-section input[type="number"],
.wd-options-section input[type="password"],
.wd-options-section select,
.wd-options-section textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}

.wd-options-section input:focus,
.wd-options-section select:focus,
.wd-options-section textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.wd-options-section .wd-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #94a3b8;
}

/* Checkbox Labels */
.wd-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal !important;
}

.wd-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

/* Form Row Inline */
.wd-options-section .wd-form-row-inline {
    display: flex;
    gap: 16px;
}

.wd-options-section .wd-form-row-inline .wd-form-group {
    flex: 1;
}

/* Agency Sections */
.wd-agency-section {
    background: #fffbeb;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 16px;
}

.wd-agency-section:last-child {
    padding-bottom: 20px;
    margin-bottom: -20px;
}

/* Security Notice */
.wd-security-notice {
    margin-top: 12px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 6px;
    color: #991b1b;
}

.wd-security-notice small {
    font-size: 12px;
}

/* Responsive */
@media (max-width: 600px) {
    .wd-options-section .wd-form-row-inline {
        flex-direction: column;
        gap: 12px;
    }
}

/* Disabled by Advanced Options */
.wd-form-group.wd-disabled-by-advanced {
    opacity: 0.6;
}

.wd-form-group.wd-disabled-by-advanced select {
    background-color: #f1f5f9;
    cursor: not-allowed;
}

.wd-advanced-override-hint {
    color: #2563eb !important;
    font-style: italic;
}
