/**

 * SensFRX Enterprise Dashboard Styles

 *

 * Design System:

 * - 8px grid system for consistent spacing

 * - sensfrx.ai brand colors

 * - Accessibility-first approach

 * - Store owner friendly design

 */



:root {

    /* SensFRX Brand Colors */

    --sensfrx-primary: #0066cc;

    --sensfrx-primary-hover: #0052a3;

    --sensfrx-primary-light: #e6f2ff;



    /* Risk Level Colors */

    --sensfrx-success: #10b981;

    --sensfrx-success-light: #d1fae5;

    --sensfrx-warning: #f59e0b;

    --sensfrx-warning-light: #fef3c7;

    --sensfrx-danger: #ef4444;

    --sensfrx-danger-light: #fee2e2;



    /* Neutral Colors */

    --sensfrx-gray-50: #f9fafb;

    --sensfrx-gray-100: #f3f4f6;

    --sensfrx-gray-200: #e5e7eb;

    --sensfrx-gray-300: #d1d5db;

    --sensfrx-gray-400: #9ca3af;

    --sensfrx-gray-500: #6b7280;

    --sensfrx-gray-600: #4b5563;

    --sensfrx-gray-700: #374151;

    --sensfrx-gray-800: #1f2937;

    --sensfrx-gray-900: #111827;



    /* Spacing (8px grid) */

    --space-1: 8px;

    --space-2: 16px;

    --space-3: 24px;

    --space-4: 32px;

    --space-5: 40px;

    --space-6: 48px;



    /* Border Radius */

    --radius-sm: 4px;

    --radius-md: 8px;

    --radius-lg: 12px;

    --radius-xl: 16px;



    /* Shadows */

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);

    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);



    /* Typography */

    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

}



/* Wrapper */

.sensfrx-enterprise-wrapper {

    font-family: var(--font-family);

    background: var(--sensfrx-gray-50);

    min-height: 100vh;

}



/* Navigation Tabs */

.sensfrx-nav-tabs {

    display: flex;

    gap: var(--space-1);

    padding: var(--space-2) var(--space-3);

    background: white;

    border-bottom: 2px solid var(--sensfrx-gray-200);

    margin-bottom: var(--space-3);

}



.sensfrx-nav-tab {

    position: relative;

    padding: 12px var(--space-3);

    font-size: 14px;

    font-weight: 500;

    color: var(--sensfrx-gray-700);

    text-decoration: none;

    border-radius: var(--radius-md);

    transition: all 0.2s;

    background: transparent;

}



.sensfrx-nav-tab:hover {

    background: var(--sensfrx-gray-50);

    color: var(--sensfrx-gray-900);

}



.sensfrx-nav-tab.active {

    background: var(--sensfrx-primary);

    color: white;

}



.sensfrx-nav-tab-highlight {

    background: #ff6b35;

    color: white;

}



.sensfrx-nav-tab-highlight:hover {

    background: #e5552e;

    color: white;

}



.sensfrx-nav-tab-highlight.active {

    background: #cc4825;

}



.sensfrx-nav-badge {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 20px;

    height: 20px;

    padding: 0 6px;

    margin-left: var(--space-1);

    background: white;

    color: #ff6b35;

    font-size: 12px;

    font-weight: 600;

    border-radius: 10px;

}



.sensfrx-nav-tab-highlight .sensfrx-nav-badge {

    background: rgba(255, 255, 255, 0.9);

}



.sensfrx-nav-tab-highlight.active .sensfrx-nav-badge {

    background: white;

    color: #cc4825;

}



/* Main Dashboard Container */

.sensfrx-enterprise-dashboard {

    max-width: 1400px;

    margin: 0 auto;

    padding: 0 var(--space-3) var(--space-3);

    font-family: var(--font-family);

    color: var(--sensfrx-gray-900);

}



/* Dashboard Header */

.sensfrx-dashboard-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: var(--space-4);

    padding: var(--space-3);

    background: white;

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

}



.sensfrx-header-content {

    flex: 1;

}



.sensfrx-dashboard-title {

    margin: 0;

    font-size: 28px;

    font-weight: 700;

    color: var(--sensfrx-gray-900);

    line-height: 1.2;

}



.sensfrx-dashboard-subtitle {

    margin: var(--space-1) 0 0;

    font-size: 14px;

    color: var(--sensfrx-gray-500);

    font-weight: 400;

}



.sensfrx-header-actions {

    display: flex;

    gap: var(--space-2);

    align-items: center;

}



.sensfrx-time-filter {

    display: flex;

    align-items: center;

    gap: var(--space-1);

}



.sensfrx-time-filter label {

    font-size: 14px;

    font-weight: 500;

    color: var(--sensfrx-gray-700);

}



.sensfrx-select {

    padding: var(--space-1) var(--space-2);

    border: 1px solid var(--sensfrx-gray-300);

    border-radius: var(--radius-md);

    font-size: 14px;

    color: var(--sensfrx-gray-700);

    background: white;

    cursor: pointer;

    transition: all 0.2s;

}



.sensfrx-select:hover {

    border-color: var(--sensfrx-primary);

}



.sensfrx-select:focus {

    outline: none;

    border-color: var(--sensfrx-primary);

    box-shadow: 0 0 0 3px var(--sensfrx-primary-light);

}



/* Metrics Grid */

.sensfrx-metrics-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

    gap: var(--space-3);

    margin-bottom: var(--space-4);

}



.sensfrx-metric-card {

    display: flex;

    gap: var(--space-2);

    padding: var(--space-3);

    background: white;

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    transition: all 0.2s;

}



.sensfrx-metric-card:hover {

    box-shadow: var(--shadow-md);

    transform: translateY(-2px);

}



.sensfrx-metric-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 48px;

    height: 48px;

    border-radius: var(--radius-lg);

    flex-shrink: 0;

}



.sensfrx-icon-login {

    background: var(--sensfrx-primary-light);

    color: var(--sensfrx-primary);

}



.sensfrx-icon-transaction {

    background: var(--sensfrx-success-light);

    color: var(--sensfrx-success);

}



.sensfrx-icon-registration {

    background: var(--sensfrx-warning-light);

    color: var(--sensfrx-warning);

}



.sensfrx-icon-bot {

    background: var(--sensfrx-danger-light);

    color: var(--sensfrx-danger);

}



.sensfrx-metric-content {

    flex: 1;

    min-width: 0;

}



.sensfrx-metric-label {

    font-size: 13px;

    color: var(--sensfrx-gray-600);

    font-weight: 500;

    margin-bottom: var(--space-1);

}



.sensfrx-metric-value {

    font-size: 28px;

    font-weight: 700;

    color: var(--sensfrx-gray-900);

    line-height: 1;

    margin-bottom: var(--space-1);

}



.sensfrx-metric-value strong {

    color: var(--sensfrx-gray-900);

}



.sensfrx-metric-change {

    font-size: 12px;

    font-weight: 500;

}



.sensfrx-trend-up {

    color: var(--sensfrx-success);

}



.sensfrx-trend-down {

    color: var(--sensfrx-danger);

}



/* Loading State */

.sensfrx-loading-spinner {

    display: inline-block;

    width: 20px;

    height: 20px;

    border: 3px solid var(--sensfrx-gray-200);

    border-top-color: var(--sensfrx-primary);

    border-radius: 50%;

    animation: sensfrx-spin 0.8s linear infinite;

}



@keyframes sensfrx-spin {

    to { transform: rotate(360deg); }

}



/* Content Grid */

.sensfrx-content-grid {

    display: grid;

    grid-template-columns: repeat(12, 1fr);

    gap: var(--space-3);

}



/* Right Column Container - Holds Fraud Score + Activity */

.sensfrx-right-column {

    grid-column: span 8;

    display: flex;

    flex-direction: column;

    gap: var(--space-3); /* 24px gap between cards in right column */

}



/* Cards */

.sensfrx-card {

    grid-column: span 6;

    background: white;

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    overflow: hidden;

}



.sensfrx-card-full {

    grid-column: span 12;

}



.sensfrx-plan-card {

    grid-column: span 4;

}



/* Cards inside right column - no grid positioning needed */

.sensfrx-right-column .sensfrx-fraudometer-card,

.sensfrx-right-column .sensfrx-activity-card {

    width: 100%;

}



.sensfrx-summary-card {

    grid-column: span 4;

    grid-row: 2;

}



.sensfrx-card-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: var(--space-3);

    border-bottom: 1px solid var(--sensfrx-gray-100);

}



.sensfrx-card-title {

    margin: 0;

    font-size: 18px;

    font-weight: 600;

    color: var(--sensfrx-gray-900);

}



.sensfrx-card-body {

    padding: var(--space-3);

}



.sensfrx-info-badge {

    display: inline-flex;

    align-items: center;

    justify-center;

    width: 20px;

    height: 20px;

    background: var(--sensfrx-gray-100);

    color: var(--sensfrx-gray-600);

    border-radius: 50%;

    font-size: 12px;

    font-weight: 600;

    cursor: help;

}



.sensfrx-link-view-all {

    font-size: 14px;

    color: var(--sensfrx-primary);

    text-decoration: none;

    font-weight: 500;

    transition: color 0.2s;

}



.sensfrx-link-view-all:hover {

    color: var(--sensfrx-primary-hover);

}



/* Fraudometer */

.sensfrx-fraudometer-card .sensfrx-card-body {

    padding: var(--space-2) var(--space-2) var(--space-1);

}



.sensfrx-fraudometer {

    text-align: center;

    margin: 0 auto;

    max-width: 400px;

}



.sensfrx-gauge-container {

    position: relative;

    max-width: 260px;

    margin: 0 auto 12px;

}



.sensfrx-gauge {

    width: 100%;

    height: auto;

}



.sensfrx-gauge-score {

    position: absolute;

    bottom: 16px;

    left: 50%;

    transform: translateX(-50%);

    text-align: center;

}



.sensfrx-score-value {

    display: block;

    font-size: 48px;

    font-weight: 700;

    color: var(--sensfrx-primary);

    line-height: 1;

}



.sensfrx-score-label {

    display: block;

    font-size: 13px;

    color: var(--sensfrx-gray-500);

    margin-top: 4px;

}



/* Risk Legend */

.sensfrx-risk-legend {

    display: flex;

    justify-content: center;

    gap: var(--space-2);

    margin-bottom: var(--space-2);

    padding: 12px var(--space-2);

    background: var(--sensfrx-gray-50);

    border-radius: var(--radius-md);

}



.sensfrx-legend-item {

    display: flex;

    align-items: center;

    gap: 6px;

    font-size: 12px;

    color: var(--sensfrx-gray-700);

}



.sensfrx-legend-dot {

    width: 10px;

    height: 10px;

    border-radius: 50%;

}



.sensfrx-risk-low {

    background: var(--sensfrx-success);

}



.sensfrx-risk-medium {

    background: var(--sensfrx-warning);

}



.sensfrx-risk-high {

    background: var(--sensfrx-danger);

}



/* Risk Status Badge */

.sensfrx-risk-status {

    display: flex;

    justify-content: center;

}



.sensfrx-status-badge {

    display: inline-flex;

    align-items: center;

    gap: var(--space-1);

    padding: var(--space-1) var(--space-2);

    border-radius: var(--radius-md);

    font-size: 14px;

    font-weight: 500;

}



.sensfrx-status-low {

    background: var(--sensfrx-success-light);

    color: var(--sensfrx-success);

}



.sensfrx-status-medium {

    background: var(--sensfrx-warning-light);

    color: var(--sensfrx-warning);

}



.sensfrx-status-high {

    background: var(--sensfrx-danger-light);

    color: var(--sensfrx-danger);

}



/* Plan Info */

.sensfrx-plan-info {

    display: flex;

    flex-direction: column;

    gap: var(--space-3);

}



.sensfrx-plan-badge {

    display: inline-flex;

    align-items: center;

    gap: var(--space-1);

    padding: var(--space-1) var(--space-2);

    background: var(--sensfrx-warning-light);

    color: var(--sensfrx-warning);

    border-radius: var(--radius-md);

    font-size: 14px;

    font-weight: 600;

    align-self: flex-start;

}



.sensfrx-credit-usage {

    display: flex;

    flex-direction: column;

    gap: var(--space-1);

}



.sensfrx-usage-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

}



.sensfrx-usage-label {

    font-size: 14px;

    color: var(--sensfrx-gray-700);

    font-weight: 500;

}



.sensfrx-usage-value {

    font-size: 14px;

    color: var(--sensfrx-gray-900);

    font-weight: 600;

}



.sensfrx-progress-bar {

    width: 100%;

    height: 8px;

    background: var(--sensfrx-gray-100);

    border-radius: var(--radius-sm);

    overflow: hidden;

}



.sensfrx-progress-fill {

    height: 100%;

    background: linear-gradient(90deg, var(--sensfrx-primary), var(--sensfrx-primary-hover));

    border-radius: var(--radius-sm);

    transition: width 0.3s ease;

}



.sensfrx-usage-note {

    font-size: 13px;

    color: var(--sensfrx-gray-600);

    margin: 0;

}



/* Quick Actions */

.sensfrx-quick-actions {

    display: flex;

    gap: var(--space-2);

}



.sensfrx-btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: var(--space-1) var(--space-2);

    border-radius: var(--radius-md);

    font-size: 14px;

    font-weight: 500;

    text-decoration: none;

    cursor: pointer;

    transition: all 0.2s;

    border: none;

}



.sensfrx-btn-primary {

    background: var(--sensfrx-primary);

    color: white;

}



.sensfrx-btn-primary:hover {

    background: var(--sensfrx-primary-hover);

    transform: translateY(-1px);

    box-shadow: var(--shadow-md);

}



.sensfrx-btn-secondary {

    background: white;

    color: var(--sensfrx-gray-700);

    border: 1px solid var(--sensfrx-gray-300);

}



.sensfrx-btn-secondary:hover {

    background: var(--sensfrx-gray-50);

    border-color: var(--sensfrx-gray-400);

}



/* Empty State */

.sensfrx-empty-state {

    text-align: center;

    padding: var(--space-6) var(--space-3);

}



.sensfrx-empty-icon {

    margin-bottom: var(--space-3);

    opacity: 0.5;

}



.sensfrx-empty-title {

    margin: 0 0 var(--space-1);

    font-size: 18px;

    font-weight: 600;

    color: var(--sensfrx-gray-900);

}



.sensfrx-empty-description {

    margin: 0 auto var(--space-3);

    max-width: 500px;

    font-size: 14px;

    color: var(--sensfrx-gray-600);

    line-height: 1.6;

}



.sensfrx-empty-actions {

    display: flex;

    justify-content: center;

    gap: var(--space-2);

}



/* Fraud List */

.sensfrx-fraud-list {

    display: flex;

    flex-direction: column;

    gap: var(--space-2);

}



.sensfrx-fraud-item {

    display: flex;

    align-items: center;

    gap: var(--space-2);

    padding: var(--space-2);

    background: var(--sensfrx-gray-50);

    border-radius: var(--radius-md);

    border-left: 3px solid var(--sensfrx-danger);

}



.sensfrx-fraud-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 32px;

    height: 32px;

    border-radius: var(--radius-md);

    font-weight: 700;

    flex-shrink: 0;

}



.sensfrx-risk-high-bg {

    background: var(--sensfrx-danger-light);

    color: var(--sensfrx-danger);

}



.sensfrx-fraud-content {

    flex: 1;

}



.sensfrx-fraud-title {

    font-size: 14px;

    font-weight: 500;

    color: var(--sensfrx-gray-900);

    margin-bottom: 2px;

}



.sensfrx-fraud-meta {

    font-size: 12px;

    color: var(--sensfrx-gray-500);

}



.sensfrx-fraud-action {

    flex-shrink: 0;

}



.sensfrx-badge {

    display: inline-block;

    padding: 4px var(--space-1);

    border-radius: var(--radius-sm);

    font-size: 12px;

    font-weight: 600;

}



.sensfrx-badge-danger {

    background: var(--sensfrx-danger-light);

    color: var(--sensfrx-danger);

}



/* Stats List */

.sensfrx-stat-list {

    display: flex;

    flex-direction: column;

    gap: var(--space-3);

}



.sensfrx-stat-item {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding-bottom: var(--space-2);

    border-bottom: 1px solid var(--sensfrx-gray-100);

}



.sensfrx-stat-item:last-child {

    border-bottom: none;

    padding-bottom: 0;

}



.sensfrx-stat-label {

    font-size: 14px;

    color: var(--sensfrx-gray-600);

}



.sensfrx-stat-value {

    font-size: 16px;

    font-weight: 600;

    color: var(--sensfrx-gray-900);

}



.sensfrx-stat-success {

    color: var(--sensfrx-success);

}



/* Responsive Design */

@media (max-width: 1024px) {

    .sensfrx-plan-card {

        grid-column: span 12;

    }



    .sensfrx-right-column {

        grid-column: span 12;

    }



    .sensfrx-card {

        grid-column: span 12;

    }

}



@media (max-width: 768px) {

    .sensfrx-dashboard-header {

        flex-direction: column;

        gap: var(--space-2);

        align-items: flex-start;

    }



    .sensfrx-metrics-grid {

        grid-template-columns: 1fr;

    }



    .sensfrx-risk-legend {

        flex-direction: column;

        align-items: flex-start;

    }



    .sensfrx-quick-actions {

        flex-direction: column;

    }



    .sensfrx-btn {

        width: 100%;

    }

}



/* Accessibility Improvements */

.sensfrx-btn:focus,

.sensfrx-select:focus {

    outline: 2px solid var(--sensfrx-primary);

    outline-offset: 2px;

}



/* High Contrast Mode Support */

@media (prefers-contrast: high) {

    .sensfrx-metric-card,

    .sensfrx-card {

        border: 2px solid var(--sensfrx-gray-300);

    }



    .sensfrx-btn-primary {

        border: 2px solid var(--sensfrx-primary-hover);

    }

}



/* Reduced Motion Support */

@media (prefers-reduced-motion: reduce) {

    *,

    *::before,

    *::after {

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;

    }

}



/* Hide WordPress Admin Footer on SensFRX Pages */

#wpfooter {

    display: none;

}



/* Free User Credit Usage Section */

.sensfrx-free-usage {

    display: flex;

    flex-direction: column;

    gap: var(--space-3);

}

