/**
 * Nexora — module pages, stat cards, tabs.
 */

.nex-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.nex-stat-card {
    background: var(--nex-surface);
    border: 1px solid var(--nex-border);
    border-radius: var(--nex-radius);
    padding: 1rem 1.05rem;
    box-shadow: var(--nex-shadow);
}

.nex-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--nex-text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.nex-stat-value {
    margin-top: 0.35rem;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--nex-text);
}

.nex-stat-delta {
    margin-top: 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
}
.nex-stat-delta.positive { color: var(--nex-success); }

.nex-panel-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.nex-panel {
    background: var(--nex-surface);
    border: 1px solid var(--nex-border);
    border-radius: var(--nex-radius);
    padding: 1rem;
    box-shadow: var(--nex-shadow);
}

.nex-panel h3 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 800;
}

.nex-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.nex-quick-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.55rem;
    border-radius: var(--nex-radius-sm);
    border: 1px solid var(--nex-border);
    background: var(--nex-surface-2);
    color: var(--nex-text-soft);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.nex-module-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.nex-module-tab {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--nex-border);
    background: var(--nex-surface);
    color: var(--nex-text-soft);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}

.nex-module-tab.active,
.nex-module-tab:hover {
    background: var(--nex-gradient-soft);
    border-color: rgba(124, 58, 237, 0.25);
    color: var(--nex-primary);
}

.nex-module-stub { max-width: 720px; }

.nex-stub-card {
    background: var(--nex-surface);
    border: 1px dashed rgba(124, 58, 237, 0.35);
    border-radius: var(--nex-radius);
    padding: 1.5rem;
    box-shadow: var(--nex-shadow);
}

.nex-stub-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nex-gradient);
    color: #fff;
    margin-bottom: 0.85rem;
}

.nex-stub-card h2 {
    margin: 0 0 0.45rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
}

.nex-stub-card p { margin: 0 0 0.75rem; color: var(--nex-text-muted); }

.nex-stub-list {
    margin: 0 0 0.85rem;
    padding-left: 1.15rem;
    color: var(--nex-text-soft);
}

.nex-stub-meta {
    font-size: 0.82rem;
    color: var(--nex-text-muted);
    margin: 0;
}

.nex-flash-stack { margin-bottom: 1rem; }
.nex-flash {
    padding: 0.75rem 1rem;
    border-radius: var(--nex-radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
}
.nex-flash-success { background: rgba(16, 185, 129, 0.12); color: #047857; }
.nex-flash-error { background: rgba(239, 68, 68, 0.12); color: #B91C1C; }
.nex-flash-info { background: var(--nex-gradient-soft); color: var(--nex-primary); }

@media (max-width: 1100px) {
    .nex-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nex-panel-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .nex-stat-grid { grid-template-columns: 1fr; }
    .nex-quick-actions { grid-template-columns: 1fr 1fr; }
}
