/* ============================================================
   CRABLOX — Base component styles (theme-independent)
   Colors come from CSS variables defined in theme-*.css files.
   ============================================================ */

* { box-sizing: border-box; }

body {
    background: var(--bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    min-height: 100vh;
}

.navbar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 2px 12px rgba(22,101,52,0.25);
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.3px;
}
.navbar-brand i { margin-right: 8px; }

.card {
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.card-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    border-radius: 16px 16px 0 0 !important;
    padding: 1rem 1.25rem;
}

.btn-primary {
    background: var(--primary);
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: all 0.15s;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 10px;
    font-weight: 600;
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}
.btn-secondary {
    background: var(--secondary);
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
}
.btn-secondary:hover { background: var(--secondary-dark); transform: translateY(-1px); }

.metric-box {
    background: var(--metric-bg);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}
.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}
.metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flash-msg {
    border-radius: 10px;
    margin-bottom: 1rem;
}

.graph-img {
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--upload-bg);
}
.upload-zone:hover {
    border-color: var(--primary);
    background: var(--upload-hover-bg);
}
.upload-zone i { font-size: 3rem; color: var(--primary); }

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
}

table { font-size: 0.9rem; }

/* Badges */
.badge-active { background: var(--badge-active-bg); color: var(--badge-active-text); }
.badge-inactive { background: var(--badge-inactive-bg); color: var(--badge-inactive-text); }
.badge-toxic { background: var(--badge-toxic-bg); color: var(--badge-toxic-text); }
.badge-safe { background: var(--badge-safe-bg); color: var(--badge-safe-text); }

/* Stat Cards */
.stat-card {
    padding: 1.25rem;
    border-radius: 12px;
    color: white;
    text-align: center;
}
.stat-card.activity { background: var(--stat-activity); }
.stat-card.toxicity { background: var(--stat-toxicity); }
.stat-card.safe { background: var(--stat-safe); }
.stat-card.priority { background: var(--stat-priority); }
.stat-card.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-card.green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.stat-card .num { font-size: 2rem; font-weight: 700; }
.stat-card .lbl { font-size: 0.85rem; opacity: 0.9; }

/* Theme picker dropdown */
.theme-menu .dropdown-item.active {
    font-weight: 700;
}
