/**
 * Dokan Vendor Dashboard Styles - Modern Light Theme
 * 
 * @package DokanRentalsBookings
 */

/* ==========================================================================
   Design Tokens
   ========================================================================== */
:root {
    /* Colors */
    --wahrb-primary: #2563eb;
    --wahrb-primary-hover: #1d4ed8;
    --wahrb-primary-light: #eff6ff;
    --wahrb-secondary: #64748b;
    --wahrb-success: #10b981;
    --wahrb-success-light: #ecfdf5;
    --wahrb-warning: #f59e0b;
    --wahrb-warning-light: #fffbeb;
    --wahrb-danger: #ef4444;
    --wahrb-danger-light: #fef2f2;
    --wahrb-info: #0ea5e9;
    --wahrb-info-light: #f0f9ff;

    /* Neutrals */
    --wahrb-white: #ffffff;
    --wahrb-gray-50: #f8fafc;
    --wahrb-gray-100: #f1f5f9;
    --wahrb-gray-200: #e2e8f0;
    --wahrb-gray-300: #cbd5e1;
    --wahrb-gray-400: #94a3b8;
    --wahrb-gray-500: #64748b;
    --wahrb-gray-600: #475569;
    --wahrb-gray-700: #334155;
    --wahrb-gray-800: #1e293b;
    --wahrb-gray-900: #0f172a;

    /* Typography */
    --wahrb-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --wahrb-font-size-xs: 0.75rem;
    --wahrb-font-size-sm: 0.875rem;
    --wahrb-font-size-base: 1rem;
    --wahrb-font-size-lg: 1.125rem;
    --wahrb-font-size-xl: 1.25rem;
    --wahrb-font-size-2xl: 1.5rem;
    --wahrb-font-size-3xl: 1.875rem;

    /* Spacing */
    --wahrb-spacing-xs: 0.25rem;
    --wahrb-spacing-sm: 0.5rem;
    --wahrb-spacing-md: 1rem;
    --wahrb-spacing-lg: 1.5rem;
    --wahrb-spacing-xl: 2rem;
    --wahrb-spacing-2xl: 3rem;

    /* Borders */
    --wahrb-radius-sm: 0.375rem;
    --wahrb-radius-md: 0.5rem;
    --wahrb-radius-lg: 0.75rem;
    --wahrb-radius-xl: 1rem;
    --wahrb-radius-full: 9999px;

    /* Shadows */
    --wahrb-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --wahrb-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --wahrb-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --wahrb-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
.wahrb-dashboard-widget,
.wahrb-rental-fields,
.wahrb-bookings-wrapper {
    font-family: var(--wahrb-font-family);
    color: var(--wahrb-gray-800);
    line-height: 1.6;
}

/* ==========================================================================
   Dashboard Widget
   ========================================================================== */
.wahrb-dashboard-widget {
    margin-bottom: var(--wahrb-spacing-lg);
}

.wahrb-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--wahrb-spacing-lg);
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-200);
    border-bottom: none;
    border-radius: var(--wahrb-radius-lg) var(--wahrb-radius-lg) 0 0;
}

.wahrb-widget-header h3 {
    margin: 0;
    font-size: var(--wahrb-font-size-lg);
    font-weight: 600;
    color: var(--wahrb-gray-900);
}

.wahrb-widget-content {
    padding: var(--wahrb-spacing-lg);
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-200);
    border-radius: 0 0 var(--wahrb-radius-lg) var(--wahrb-radius-lg);
}

/* ==========================================================================
   Stats Grid
   ========================================================================== */
.wahrb-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--wahrb-spacing-md);
    margin-bottom: var(--wahrb-spacing-lg);
}

.wahrb-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--wahrb-spacing-lg);
    background: var(--wahrb-gray-50);
    border: 1px solid var(--wahrb-gray-200);
    border-radius: var(--wahrb-radius-lg);
    text-align: center;
}

.wahrb-stat-item:hover {
    background: var(--wahrb-white);
    border-color: var(--wahrb-primary);
}

.wahrb-stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--wahrb-spacing-sm);
    background: var(--wahrb-primary-light);
    border-radius: var(--wahrb-radius-md);
    color: var(--wahrb-primary);
    font-size: var(--wahrb-font-size-xl);
}

.wahrb-stat-value {
    display: block;
    font-size: var(--wahrb-font-size-2xl);
    font-weight: 700;
    color: var(--wahrb-gray-900);
    margin-bottom: var(--wahrb-spacing-xs);
}

.wahrb-stat-label {
    font-size: var(--wahrb-font-size-sm);
    color: var(--wahrb-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 500;
}

/* ==========================================================================
   Rental Fields in Product Edit
   ========================================================================== */
.wahrb-rental-fields {
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-200);
    border-radius: var(--wahrb-radius-lg);
    padding: var(--wahrb-spacing-xl);
    margin-top: var(--wahrb-spacing-lg);
}

.wahrb-rental-fields h3 {
    margin: 0 0 var(--wahrb-spacing-lg) 0;
    padding-bottom: var(--wahrb-spacing-md);
    border-bottom: 1px solid var(--wahrb-gray-200);
    font-size: var(--wahrb-font-size-lg);
    font-weight: 600;
    color: var(--wahrb-gray-900);
}

.wahrb-rental-options {
    padding-top: var(--wahrb-spacing-md);
}

.wahrb-field-group {
    margin-bottom: var(--wahrb-spacing-lg);
}

.wahrb-field-group label {
    display: block;
    margin-bottom: var(--wahrb-spacing-sm);
    font-size: var(--wahrb-font-size-sm);
    font-weight: 500;
    color: var(--wahrb-gray-700);
}

.wahrb-field-group input[type="text"],
.wahrb-field-group input[type="number"],
.wahrb-field-group input[type="email"],
.wahrb-field-group input[type="date"],
.wahrb-field-group select,
.wahrb-field-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--wahrb-font-size-base);
    color: var(--wahrb-gray-800);
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-300);
    border-radius: var(--wahrb-radius-md);
    outline: none;
}

.wahrb-field-group input:focus,
.wahrb-field-group select:focus,
.wahrb-field-group textarea:focus {
    border-color: var(--wahrb-primary);
    box-shadow: 0 0 0 3px var(--wahrb-primary-light);
}

.wahrb-field-help {
    margin-top: var(--wahrb-spacing-xs);
    font-size: var(--wahrb-font-size-xs);
    color: var(--wahrb-gray-500);
}

/* ==========================================================================
   Bookings Table
   ========================================================================== */
.wahrb-bookings-wrapper {
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-200);
    border-radius: var(--wahrb-radius-lg);
    overflow: hidden;
}

.wahrb-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wahrb-spacing-md);
    margin-bottom: var(--wahrb-spacing-md);
}

.wahrb-page-header-content {
    min-width: 0;
}

.wahrb-page-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--wahrb-spacing-sm);
    font-size: var(--wahrb-font-size-2xl);
    font-weight: 700;
    color: var(--wahrb-gray-900);
}

.wahrb-page-icon {
    font-size: 1.25em;
    line-height: 1;
}

.wahrb-page-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--wahrb-spacing-sm);
    flex-wrap: wrap;
}

.wahrb-btn-icon {
    line-height: 1;
    font-size: 1.1em;
}

.wahrb-bookings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--wahrb-spacing-lg);
    border-bottom: 1px solid var(--wahrb-gray-200);
    background: var(--wahrb-gray-50);
}

.wahrb-bookings-header h2 {
    margin: 0;
    font-size: var(--wahrb-font-size-xl);
    font-weight: 600;
    color: var(--wahrb-gray-900);
}

.wahrb-bookings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--wahrb-font-size-sm);
}

.wahrb-bookings-table th,
.wahrb-bookings-table td {
    padding: var(--wahrb-spacing-md) var(--wahrb-spacing-lg);
    text-align: left;
    border-bottom: 1px solid var(--wahrb-gray-100);
}

.wahrb-bookings-table th {
    background: var(--wahrb-gray-50);
    font-weight: 600;
    color: var(--wahrb-gray-700);
    text-transform: uppercase;
    font-size: var(--wahrb-font-size-xs);
    letter-spacing: 0.05em;
}

.wahrb-bookings-table tbody tr:hover {
    background: var(--wahrb-gray-50);
}

.wahrb-bookings-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Status Badges
   ========================================================================== */
.wahrb-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--wahrb-radius-full);
    font-size: var(--wahrb-font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.wahrb-status-pending {
    background: var(--wahrb-warning-light);
    color: #b45309;
}

.wahrb-status-confirmed {
    background: var(--wahrb-success-light);
    color: #047857;
}

.wahrb-status-checked_in,
.wahrb-status-active {
    background: var(--wahrb-info-light);
    color: #0369a1;
}

.wahrb-status-completed {
    background: var(--wahrb-primary-light);
    color: var(--wahrb-primary);
}

.wahrb-status-cancelled {
    background: var(--wahrb-danger-light);
    color: #b91c1c;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.wahrb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--wahrb-spacing-sm);
    padding: 0.625rem 1.25rem;
    font-family: var(--wahrb-font-family);
    font-size: var(--wahrb-font-size-sm);
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--wahrb-radius-md);
    cursor: pointer;
    outline: none;
}

.wahrb-btn-primary {
    background: var(--wahrb-primary);
    color: var(--wahrb-white);
}

.wahrb-btn-primary:hover {
    background: var(--wahrb-primary-hover);
}

.wahrb-btn-secondary {
    background: var(--wahrb-white);
    color: var(--wahrb-gray-700);
    border: 1px solid var(--wahrb-gray-300);
}

.wahrb-btn-secondary:hover {
    background: var(--wahrb-gray-50);
    border-color: var(--wahrb-gray-400);
}

.wahrb-btn-success {
    background: var(--wahrb-success);
    color: var(--wahrb-white);
}

.wahrb-btn-success:hover {
    background: #059669;
}

.wahrb-btn-danger {
    background: var(--wahrb-danger);
    color: var(--wahrb-white);
}

.wahrb-btn-danger:hover {
    background: #dc2626;
}

.wahrb-btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: var(--wahrb-font-size-xs);
}

.wahrb-btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: var(--wahrb-font-size-base);
}

/* ==========================================================================
   Action Buttons Row
   ========================================================================== */
.wahrb-actions {
    display: flex;
    align-items: center;
    gap: var(--wahrb-spacing-sm);
}

.wahrb-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--wahrb-gray-100);
    color: var(--wahrb-gray-600);
    border: none;
    border-radius: var(--wahrb-radius-md);
    cursor: pointer;
    font-size: var(--wahrb-font-size-sm);
}

.wahrb-action-btn:hover {
    background: var(--wahrb-gray-200);
    color: var(--wahrb-gray-800);
}

.wahrb-action-btn-view:hover {
    background: var(--wahrb-primary-light);
    color: var(--wahrb-primary);
}

.wahrb-action-btn-confirm:hover {
    background: var(--wahrb-success-light);
    color: var(--wahrb-success);
}

.wahrb-action-btn-cancel:hover {
    background: var(--wahrb-danger-light);
    color: var(--wahrb-danger);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.wahrb-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--wahrb-spacing-2xl);
    text-align: center;
}

.wahrb-empty-state-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--wahrb-spacing-lg);
    background: var(--wahrb-gray-100);
    border-radius: var(--wahrb-radius-full);
    color: var(--wahrb-gray-400);
    font-size: 2rem;
}

.wahrb-empty-state h3 {
    margin: 0 0 var(--wahrb-spacing-sm) 0;
    font-size: var(--wahrb-font-size-lg);
    font-weight: 600;
    color: var(--wahrb-gray-700);
}

.wahrb-empty-state p {
    margin: 0 0 var(--wahrb-spacing-lg) 0;
    color: var(--wahrb-gray-500);
    max-width: 400px;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.wahrb-card {
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-200);
    border-radius: var(--wahrb-radius-lg);
    overflow: hidden;
}

.wahrb-card-header {
    padding: var(--wahrb-spacing-lg);
    border-bottom: 1px solid var(--wahrb-gray-200);
    background: var(--wahrb-gray-50);
}

.wahrb-card-header h3 {
    margin: 0;
    font-size: var(--wahrb-font-size-base);
    font-weight: 600;
    color: var(--wahrb-gray-900);
}

.wahrb-card-body {
    padding: var(--wahrb-spacing-lg);
}

.wahrb-card-footer {
    padding: var(--wahrb-spacing-lg);
    border-top: 1px solid var(--wahrb-gray-200);
    background: var(--wahrb-gray-50);
}

/* ==========================================================================
   Filters and Tabs
   ========================================================================== */
.wahrb-filters {
    display: flex;
    align-items: center;
    gap: var(--wahrb-spacing-md);
    padding: var(--wahrb-spacing-md) var(--wahrb-spacing-lg);
    background: var(--wahrb-gray-50);
    border-bottom: 1px solid var(--wahrb-gray-200);
}

.wahrb-tabs {
    display: flex;
    gap: var(--wahrb-spacing-xs);
    padding: var(--wahrb-spacing-md) var(--wahrb-spacing-lg);
    background: var(--wahrb-white);
    border-bottom: 1px solid var(--wahrb-gray-200);
}

.wahrb-filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--wahrb-spacing-sm);
    padding: var(--wahrb-spacing-md) var(--wahrb-spacing-lg);
    background: var(--wahrb-gray-50);
    border-bottom: 1px solid var(--wahrb-gray-200);
}

.wahrb-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wahrb-filter-group label {
    margin: 0;
    font-size: var(--wahrb-font-size-xs);
    font-weight: 600;
    color: var(--wahrb-gray-600);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.wahrb-filter-group input,
.wahrb-filter-group select {
    width: 100%;
    height: 36px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid var(--wahrb-gray-300);
    border-radius: var(--wahrb-radius-md);
    background: var(--wahrb-white);
    font-size: var(--wahrb-font-size-sm);
    color: var(--wahrb-gray-800);
}

.wahrb-filter-group input:focus,
.wahrb-filter-group select:focus {
    border-color: var(--wahrb-primary);
    box-shadow: 0 0 0 3px var(--wahrb-primary-light);
    outline: none;
}

.wahrb-filter-actions {
    display: inline-flex;
    align-items: flex-end;
    gap: var(--wahrb-spacing-xs);
    flex-wrap: wrap;
}

.wahrb-filter-indicator {
    padding: 10px var(--wahrb-spacing-lg);
    background: var(--wahrb-primary-light);
    color: var(--wahrb-primary);
    border-bottom: 1px solid #bfdbfe;
    font-size: var(--wahrb-font-size-xs);
    font-weight: 600;
}

.wahrb-table-container {
    width: 100%;
    overflow-x: auto;
}

.wahrb-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--wahrb-spacing-sm) var(--wahrb-spacing-md);
    font-size: var(--wahrb-font-size-sm);
    font-weight: 500;
    color: var(--wahrb-gray-600);
    text-decoration: none !important;
    border-radius: var(--wahrb-radius-md);
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
}

.wahrb-tab:hover,
.wahrb-tab:focus,
.wahrb-tab:visited {
    text-decoration: none !important;
}

.wahrb-tab:hover {
    background: var(--wahrb-gray-100);
    color: var(--wahrb-gray-800);
}

.wahrb-tab.active {
    background: var(--wahrb-primary-light);
    color: var(--wahrb-primary);
}

.wahrb-tab-icon {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
}

.wahrb-tab-label {
    line-height: 1;
}

.wahrb-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    background: var(--wahrb-gray-200);
    color: var(--wahrb-gray-700);
    border-radius: 10px;
    line-height: 1;
}

.wahrb-tab.active .wahrb-tab-count {
    background: var(--wahrb-primary);
    color: var(--wahrb-white);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.wahrb-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--wahrb-spacing-xs);
    padding: var(--wahrb-spacing-lg);
    border-top: 1px solid var(--wahrb-gray-200);
}

.wahrb-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--wahrb-spacing-sm);
    font-size: var(--wahrb-font-size-sm);
    font-weight: 500;
    color: var(--wahrb-gray-700);
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-300);
    border-radius: var(--wahrb-radius-md);
    text-decoration: none;
    cursor: pointer;
}

.wahrb-pagination-btn:hover {
    background: var(--wahrb-gray-50);
    border-color: var(--wahrb-gray-400);
}

.wahrb-pagination-btn.active {
    background: var(--wahrb-primary);
    color: var(--wahrb-white);
    border-color: var(--wahrb-primary);
}

.wahrb-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   Alerts and Notices
   ========================================================================== */
.wahrb-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--wahrb-spacing-md);
    padding: var(--wahrb-spacing-md) var(--wahrb-spacing-lg);
    border-radius: var(--wahrb-radius-md);
    font-size: var(--wahrb-font-size-sm);
    margin-bottom: var(--wahrb-spacing-md);
}

.wahrb-alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.wahrb-alert-info {
    background: var(--wahrb-info-light);
    color: #0c4a6e;
    border: 1px solid #bae6fd;
}

.wahrb-alert-success {
    background: var(--wahrb-success-light);
    color: #14532d;
    border: 1px solid #bbf7d0;
}

.wahrb-alert-warning {
    background: var(--wahrb-warning-light);
    color: #713f12;
    border: 1px solid #fde68a;
}

.wahrb-alert-danger {
    background: var(--wahrb-danger-light);
    color: #7f1d1d;
    border: 1px solid #fecaca;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .wahrb-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wahrb-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--wahrb-spacing-sm);
    }

    .wahrb-stat-item {
        padding: var(--wahrb-spacing-md);
    }

    .wahrb-stat-value {
        font-size: var(--wahrb-font-size-xl);
    }

    .wahrb-bookings-wrapper {
        overflow-x: auto;
    }

    .wahrb-bookings-table {
        min-width: 700px;
    }

    .wahrb-widget-header,
    .wahrb-widget-content,
    .wahrb-bookings-header {
        padding: var(--wahrb-spacing-md);
    }

    .wahrb-filters {
        flex-wrap: wrap;
    }

    .wahrb-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wahrb-page-actions {
        width: 100%;
    }

    .wahrb-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .wahrb-stats-grid {
        grid-template-columns: 1fr;
    }

    .wahrb-tabs {
        flex-wrap: wrap;
    }

    .wahrb-filter-bar {
        grid-template-columns: 1fr;
    }

    .wahrb-btn {
        width: 100%;
    }

    .wahrb-pagination {
        flex-wrap: wrap;
    }
}

/* ==========================================================================
   Settings Page Styles
   ========================================================================== */

.wahrb-settings-page {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.dokan-dashboard-content.dokan-settings-content {
    overflow-x: hidden;
    width: 100%;
}

.dokan-dashboard-wrap .wahrb-settings-page {
    padding-right: 15px;
}

/* Settings Tab Navigation */
.wahrb-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.wahrb-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wahrb-tab-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.wahrb-tab-btn.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wahrb-tab-icon {
    font-size: 1.25rem;
}

.wahrb-tab-label {
    display: inline;
}

/* Settings Tab Panels */
.wahrb-tab-panel {
    display: none;
}

.wahrb-tab-panel.active {
    display: block;
}

@media (max-width: 600px) {
    .wahrb-tab-btn {
        flex: 1 1 calc(50% - 0.5rem);
        justify-content: center;
        padding: 0.625rem 0.75rem;
    }
    .wahrb-tab-label {
        font-size: 0.8rem;
    }
}

/* Page Header */
.wahrb-page-header {
    margin-bottom: 2rem;
}

.wahrb-page-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--wahrb-gray-900, #0f172a);
}

.wahrb-page-icon {
    font-size: 1.5rem;
}

.wahrb-page-description {
    margin: 0;
    color: var(--wahrb-gray-500, #64748b);
    font-size: 0.9375rem;
}

/* Cards */
.wahrb-card {
    background: #fff;
    border: 1px solid var(--wahrb-gray-200, #e2e8f0);
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.wahrb-card-header {
    padding: 1.25rem 1.5rem;
    background: var(--wahrb-gray-50, #f8fafc);
    border-bottom: 1px solid var(--wahrb-gray-200, #e2e8f0);
}

.wahrb-card-header h3 {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--wahrb-gray-800, #1e293b);
}

.wahrb-card-icon {
    font-size: 1.125rem;
}

.wahrb-card-body {
    padding: 1.5rem;
}

/* Form Fields */
.wahrb-field-group {
    margin-bottom: 1.5rem;
}

.wahrb-field-group:last-child {
    margin-bottom: 0;
}

.wahrb-field-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wahrb-gray-700, #334155);
}

.wahrb-input {
    width: 100%;
    max-width: 200px;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    color: var(--wahrb-gray-800, #1e293b);
    background: #fff;
    border: 1px solid var(--wahrb-gray-300, #cbd5e1);
    border-radius: 0.5rem;
    outline: none;
}

.wahrb-input-full {
    max-width: 100%;
}

.wahrb-input:focus {
    border-color: var(--wahrb-primary, #2563eb);
    box-shadow: 0 0 0 3px var(--wahrb-primary-light, #eff6ff);
}

.wahrb-input-group {
    display: inline-flex;
    align-items: stretch;
}

.wahrb-input-group .wahrb-input {
    border-radius: 0;
}

.wahrb-input-group .wahrb-input:first-child {
    border-radius: 0.5rem 0 0 0.5rem;
}

.wahrb-input-group .wahrb-input:last-child {
    border-radius: 0 0.5rem 0.5rem 0;
}

.wahrb-input-addon {
    display: flex;
    align-items: center;
    padding: 0 0.875rem;
    background: var(--wahrb-gray-100, #f1f5f9);
    border: 1px solid var(--wahrb-gray-300, #cbd5e1);
    color: var(--wahrb-gray-600, #475569);
    font-size: 0.875rem;
    font-weight: 500;
}

.wahrb-input-addon:first-child {
    border-right: none;
    border-radius: 0.5rem 0 0 0.5rem;
}

.wahrb-input-addon:last-child {
    border-left: none;
    border-radius: 0 0.5rem 0.5rem 0;
}

.wahrb-field-help {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--wahrb-gray-500, #64748b);
}

.wahrb-divider {
    border: none;
    border-top: 1px solid var(--wahrb-gray-200, #e2e8f0);
    margin: 1.5rem 0;
}

/* Toggle Switch */
.wahrb-field-row {
    margin-bottom: 1.5rem;
}

.wahrb-field-toggle {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.wahrb-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.wahrb-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--wahrb-gray-300, #cbd5e1);
    border-radius: 24px;
}

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

.wahrb-toggle input:checked + .wahrb-toggle-slider {
    background-color: var(--wahrb-primary, #2563eb);
}

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

.wahrb-toggle-label {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.wahrb-toggle-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--wahrb-gray-800, #1e293b);
}

.wahrb-toggle-description {
    font-size: 0.8125rem;
    color: var(--wahrb-gray-500, #64748b);
}

/* Form Actions */
.wahrb-form-actions {
    margin-top: 0.5rem;
}

.wahrb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

.wahrb-btn-primary {
    background: var(--wahrb-primary, #2563eb);
    color: #fff;
}

.wahrb-btn-primary:hover {
    background: var(--wahrb-primary-hover, #1d4ed8);
}

.wahrb-btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* Alert */
.wahrb-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.wahrb-alert-success {
    background: var(--wahrb-success-light, #ecfdf5);
    color: #047857;
    border: 1px solid #a7f3d0;
}

.wahrb-alert-icon {
    font-weight: bold;
}

/* Radio Card Selector for Emails */
.wahrb-mode-selector-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.wahrb-radio-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.25rem;
    border: 2px solid #94a3b8;
    border-radius: 0.75rem;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.wahrb-radio-card:hover {
    border-color: #2563eb;
    background: #f0f7ff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

.wahrb-radio-card.active {
    border-color: #2563eb;
    background: #dbeafe;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2), 0 4px 12px rgba(37, 99, 235, 0.15);
}

.wahrb-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wahrb-radio-indicator {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid #94a3b8;
    border-radius: 50%;
    background: #fff;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 1px;
}

.wahrb-radio-card:hover .wahrb-radio-indicator {
    border-color: #2563eb;
}

.wahrb-radio-card.active .wahrb-radio-indicator {
    border-color: #2563eb;
    background: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.wahrb-radio-card.active .wahrb-radio-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
}

.wahrb-radio-content {
    flex: 1;
}

.wahrb-radio-content strong {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.wahrb-radio-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .wahrb-mode-selector-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .wahrb-card-body {
        padding: 1.25rem;
    }
    .wahrb-input {
        max-width: 100%;
    }
    .wahrb-btn-lg {
        width: 100%;
    }
}

/* Color Controls Grid */
.wahrb-color-controls-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.wahrb-color-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    padding: 1.25rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: border-color 0.2s;
}

.wahrb-color-control:hover {
    border-color: #94a3b8;
}

.wahrb-color-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.01em;
}

.wahrb-color-swatch {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 72px;
    height: 72px;
    border: 3px solid #cbd5e1;
    border-radius: 0.75rem;
    cursor: pointer;
    padding: 0;
    background: transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.wahrb-color-swatch:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transform: scale(1.05);
}

.wahrb-color-swatch::-webkit-color-swatch-wrapper {
    padding: 3px;
}

.wahrb-color-swatch::-webkit-color-swatch {
    border: none;
    border-radius: 0.5rem;
}

.wahrb-color-swatch::-moz-color-swatch {
    border: none;
    border-radius: 0.5rem;
}

.wahrb-color-hex {
    width: 90px;
    text-align: center;
    font-size: 0.8125rem;
    font-family: monospace;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.375rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    transition: border-color 0.2s;
}

.wahrb-color-hex:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

@media (max-width: 480px) {
    .wahrb-color-controls-grid {
        grid-template-columns: 1fr;
        max-width: 200px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Color Preview */
.wahrb-color-preview {
    margin-top: 1.5rem;
    border: 1px solid var(--wahrb-gray-200, #e2e8f0);
    border-radius: 0.75rem;
    overflow: hidden;
}

.wahrb-preview-header {
    padding: 1rem 1.25rem;
    font-weight: 600;
    text-align: center;
}

.wahrb-preview-body {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    background: #f8fafc;
}

.wahrb-preview-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

/* Client Display Texts Grid */
.wahrb-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.wahrb-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.wahrb-field label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.wahrb-field-full {
    grid-column: 1 / -1;
}

.wahrb-fields-grid .wahrb-input {
    max-width: 100%;
    box-sizing: border-box;
}

.wahrb-fields-grid textarea.wahrb-input {
    resize: vertical;
    min-height: 60px;
}

@media (max-width: 640px) {
    .wahrb-fields-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Analytics Page Styles
   ========================================================================== */

.wahrb-analytics-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wahrb-analytics-page .wahrb-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.wahrb-loading {
    text-align: center;
    padding: 3rem;
    color: #64748b;
    font-size: 1rem;
}

.wahrb-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: wahrb-spin 0.8s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes wahrb-spin {
    to { transform: rotate(360deg); }
}

/* Analytics Tab Navigation */
.wahrb-analytics-tabs {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 1.5rem;
    padding: 0.375rem;
    background: #f1f5f9;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.wahrb-atab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wahrb-atab-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.wahrb-atab-btn.active {
    background: #fff;
    color: #2563eb;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wahrb-atab-icon {
    font-size: 1.125rem;
}

.wahrb-atab-panel {
    display: none;
}

.wahrb-atab-panel.active {
    display: block;
}

/* Analytics Stats Grid */
.wahrb-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.wahrb-stats-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.wahrb-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
}

.wahrb-stat-card-small {
    padding: 1.25rem;
}

.wahrb-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 0.75rem;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.wahrb-stat-icon-primary {
    background: #eff6ff;
}

.wahrb-stat-icon-success {
    background: #ecfdf5;
}

.wahrb-stat-icon-info {
    background: #f0f9ff;
}

.wahrb-stat-icon-warning {
    background: #fffbeb;
}

.wahrb-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wahrb-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.wahrb-stat-label {
    font-size: 0.8125rem;
    color: #64748b;
}

.wahrb-status-breakdown {
    margin-bottom: 1.5rem;
}

.wahrb-status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.wahrb-status-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    min-width: 90px;
}

.wahrb-pill-count {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.wahrb-pill-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

/* Analytics Charts */
.wahrb-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.wahrb-chart-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.wahrb-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.wahrb-chart-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.wahrb-chart-body {
    padding: 1.5rem;
    position: relative;
    height: 280px;
}

.wahrb-select {
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    font-size: 0.8125rem;
    color: #334155;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") no-repeat right 0.5rem center/1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    cursor: pointer;
    appearance: none;
}

.wahrb-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px #eff6ff;
}

/* Analytics Cards & Tables */
.wahrb-card-body-flush {
    padding: 0;
}

.wahrb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.wahrb-table th,
.wahrb-table td {
    padding: 0.875rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.wahrb-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
}

.wahrb-table tbody tr:hover {
    background: #f8fafc;
}

.wahrb-table tbody tr:last-child td {
    border-bottom: none;
}

.wahrb-table-empty {
    text-align: center;
    padding: 2rem 1.5rem !important;
    color: #64748b;
}

/* Analytics Responsive */
@media (max-width: 1200px) {
    .wahrb-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .wahrb-charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .wahrb-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .wahrb-stat-card {
        padding: 1.25rem;
    }
    .wahrb-stat-value {
        font-size: 1.25rem;
    }
    .wahrb-chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .wahrb-chart-body {
        padding: 1rem;
        height: 220px;
    }
    .wahrb-analytics-page .wahrb-page-header {
        flex-direction: column;
    }
    .wahrb-status-pills {
        gap: 0.5rem;
    }
    .wahrb-status-pill {
        min-width: 70px;
        padding: 0.5rem 0.75rem;
    }
    .wahrb-analytics-tabs {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .wahrb-stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
    .wahrb-stats-grid-2 {
        grid-template-columns: 1fr;
    }
    .wahrb-atab-btn {
        flex: 1 1 auto;
        justify-content: center;
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }
}