@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap");

/* Config Table & Basics */
.profwabr-status-badge { padding: 3px 8px; border-radius: 4px; font-weight: bold; font-size: 11px; text-transform: uppercase; }
.profwabr-status-ok { background: #e7f4e8; color: #1e4620; border: 1px solid #c3e6cb; }
.profwabr-status-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.profwabr-status-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.profwabr-config-table { width: 100%; max-width: 800px; border-collapse: collapse; margin-top: 15px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.profwabr-config-table th, .profwabr-config-table td { text-align: left; padding: 12px; border-bottom: 1px solid #eee; }
.profwabr-config-table th { background: #f8f9fa; font-weight: 600; }

/* Modern Dark Dashboard Variables */
:root {
    --profwabr-bg-main: #0b0f19;
    --profwabr-bg-card: rgba(18, 25, 38, 0.6);
    --profwabr-border: rgba(255, 255, 255, 0.08);
    --profwabr-text-main: #ffffff;
    --profwabr-text-muted: #8b949e;
    --profwabr-accent: #3b82f6;
    --profwabr-profit-color: #00e676;
    --profwabr-watch-color: #f5a623;
    --profwabr-loss-color: #ff4d4f;
    --profwabr-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --profwabr-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Dashboard Main Layout */
#profwabr-dashboard-app {
    background-color: var(--profwabr-bg-main);
    color: var(--profwabr-text-main);
    font-family: var(--profwabr-font-sans);
    padding: 30px;
    border-radius: 12px;
    margin-top: 20px;
    box-sizing: border-box;
}
#profwabr-dashboard-app * { box-sizing: border-box; }

.profwabr-dashboard-header h1 {
    color: var(--profwabr-text-main);
    font-family: var(--profwabr-font-sans);
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 5px;
}
.profwabr-dashboard-header p {
    color: var(--profwabr-text-muted);
    font-size: 15px;
    margin-top: 0;
}

/* Controls */
.profwabr-refresh-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px;
    gap: 15px;
}
.profwabr-refresh-row select {
    background: var(--profwabr-bg-card);
    color: var(--profwabr-text-main);
    border: 1px solid var(--profwabr-border);
    border-radius: 6px;
    padding: 0 15px;
    height: 36px;
    font-family: var(--profwabr-font-sans);
}
.profwabr-refresh-row button {
    background: var(--profwabr-accent) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 6px !important;
    padding: 0 20px !important;
    height: 36px !important;
    font-weight: 600 !important;
    font-family: var(--profwabr-font-sans);
    transition: opacity 0.2s;
}
.profwabr-refresh-row button:hover { opacity: 0.9; }

/* Stats Grid */
.profwabr-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 30px; }
.profwabr-stat-card {
    background: var(--profwabr-bg-card);
    border: 1px solid var(--profwabr-border);
    border-radius: 12px;
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, box-shadow 0.2s;
}
.profwabr-stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.profwabr-stat-label { font-size: 13px; color: var(--profwabr-text-muted); margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.profwabr-stat-value { font-size: 28px; font-weight: 700; color: var(--profwabr-text-main); font-family: var(--profwabr-font-mono); }

.profwabr-card-revenue { border-top: 3px solid #3b82f6; }
.profwabr-card-profit { border-top: 3px solid var(--profwabr-profit-color); }
.profwabr-card-margin { border-top: 3px solid #8b5cf6; }
.profwabr-card-orders { border-top: 3px solid #f59e0b; }

/* Chart & Two Column Layout */
.profwabr-middle-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}
@media (max-width: 1200px) {
    .profwabr-middle-grid { grid-template-columns: 1fr; }
}

.profwabr-chart-container {
    background: var(--profwabr-bg-card);
    border: 1px solid var(--profwabr-border);
    border-radius: 12px;
    padding: 20px;
    height: 400px;
}

/* Order Intelligence Feed */
.profwabr-feed-card {
    background: var(--profwabr-bg-card);
    border: 1px solid var(--profwabr-border);
    border-radius: 12px;
    padding: 20px;
    font-family: var(--profwabr-font-mono);
    display: flex;
    flex-direction: column;
    height: 400px;
}
.profwabr-feed-header {
    font-size: 12px;
    color: var(--profwabr-text-muted);
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-family: var(--profwabr-font-mono);
}
.profwabr-feed-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
}
/* Custom Scrollbar for feed */
.profwabr-feed-list::-webkit-scrollbar { width: 6px; }
.profwabr-feed-list::-webkit-scrollbar-track { background: transparent; }
.profwabr-feed-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.profwabr-feed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 13px;
    color: var(--profwabr-text-muted);
}
.profwabr-feed-item:last-child { border-bottom: none; }
.profwabr-feed-id { color: var(--profwabr-text-muted); width: 60px; }
.profwabr-feed-rev { flex: 1; text-align: center; }

.profwabr-feed-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
    border: 1px solid transparent;
    min-width: 100px;
    text-align: center;
    letter-spacing: 0.5px;
}
.profwabr-badge-profit { color: var(--profwabr-profit-color); border-color: rgba(0,230,118,0.3); background: rgba(0,230,118,0.05); }
.profwabr-badge-watch { color: var(--profwabr-watch-color); border-color: rgba(245,166,35,0.3); background: rgba(245,166,35,0.05); }
.profwabr-badge-loss { color: var(--profwabr-loss-color); border-color: rgba(255,77,79,0.3); background: rgba(255,77,79,0.05); }

/* Rankings Styles */
.profwabr-rankings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.profwabr-ranking-card { background: var(--profwabr-bg-card); border: 1px solid var(--profwabr-border); border-radius: 12px; padding: 20px; }
.profwabr-ranking-title { font-size: 16px; font-weight: 600; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--profwabr-border); color: var(--profwabr-text-main); display: flex; align-items: center; }
.profwabr-ranking-title span { margin-right: 8px; font-size: 18px; }
.profwabr-ranking-list { list-style: none; padding: 0; margin: 0; }
.profwabr-ranking-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.profwabr-ranking-item:last-child { border-bottom: none; }
.profwabr-ranking-name { font-weight: 500; font-size: 14px; color: var(--profwabr-text-muted); }
.profwabr-ranking-val { font-weight: 600; font-size: 14px; color: var(--profwabr-text-main); font-family: var(--profwabr-font-mono); }
.profwabr-mini-badge { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.1); color: var(--profwabr-text-muted); margin-left: 8px; font-family: var(--profwabr-font-sans); }

/* Table Styles */
.profwabr-table-container { overflow-x: auto; margin-top: 10px; }
.profwabr-table-full { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; color: var(--profwabr-text-main); }
.profwabr-table-full th { padding: 10px 12px; border-bottom: 1px solid var(--profwabr-border); color: var(--profwabr-text-muted); font-weight: 500; text-transform: uppercase; font-size: 11px; white-space: nowrap; }
.profwabr-table-full td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.profwabr-table-full tr:last-child td { border-bottom: none; }
.profwabr-table-val { font-weight: 600; font-family: var(--profwabr-font-mono); }
.profwabr-feed-detail { display: block; font-size: 11px; color: var(--profwabr-text-muted); font-family: var(--profwabr-font-sans); margin-top: 4px; }
