/* ─── NPAdmin Platform Shell ─────────────────────────── */

.npadmin-layout {
    display: flex;
    min-height: 100vh;
    background: #0f172a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─── Sidebar ────────────────────────────────────────── */

.npadmin-sidebar {
    width: 260px;
    background: #1e293b;
    border-right: 1px solid #334155;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.npadmin-brand {
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #334155;
}

.npadmin-logo {
    width: 120px;
    height: auto;
}

.npadmin-badge {
    background: #7c3aed;
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.npadmin-nav {
    flex: 1;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.npadmin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    background: none;
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    width: 100%;
}

.npadmin-nav-item:hover { background: #334155; color: #f1f5f9; }
.npadmin-nav-item.active { background: #7c3aed22; color: #a78bfa; }
.npadmin-nav-item.active svg { stroke: #a78bfa; }

/* ─── Sidebar Footer ─────────────────────────────────── */

.npadmin-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #334155;
}

.npadmin-user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.npadmin-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #7c3aed;
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.8125rem; flex-shrink: 0;
}

.npadmin-user-name { color: #f1f5f9; font-size: 0.8125rem; font-weight: 600; }
.npadmin-user-email { color: #64748b; font-size: 0.6875rem; }

.npadmin-signout {
    width: 100%;
    padding: 0.5rem;
    background: none;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #94a3b8;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.15s;
}
.npadmin-signout:hover { border-color: #ef4444; color: #ef4444; }

/* ─── Main Content ───────────────────────────────────── */

.npadmin-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.npadmin-panel h2 {
    color: #f1f5f9;
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.npadmin-subtitle {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0 0 1.5rem 0;
}

.npadmin-loading, .npadmin-error {
    color: #94a3b8;
    padding: 2rem;
    text-align: center;
}
.npadmin-error { color: #ef4444; }

/* ─── Stats Grid ─────────────────────────────────────── */

.npadmin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.npadmin-stat-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 1.25rem;
}

.npadmin-stat-value {
    color: #f1f5f9;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.npadmin-stat-label {
    color: #94a3b8;
    font-size: 0.8125rem;
    margin-top: 0.375rem;
}

.npadmin-stat-detail {
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* ─── Module Cards ───────────────────────────────────── */

.npadmin-module-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.npadmin-module-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: opacity 0.2s;
}

.npadmin-module-card.inactive { opacity: 0.5; }

.npadmin-module-name {
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.9375rem;
}

.npadmin-module-desc {
    color: #94a3b8;
    font-size: 0.8125rem;
    margin-top: 0.125rem;
}

.npadmin-module-key {
    color: #64748b;
    font-size: 0.6875rem;
    font-family: 'Space Mono', monospace;
    margin-top: 0.25rem;
}

/* Toggle switch */
.npadmin-toggle {
    position: relative;
    display: inline-block;
    width: 44px; height: 24px;
    flex-shrink: 0;
}
.npadmin-toggle input { opacity: 0; width: 0; height: 0; }
.npadmin-toggle-slider {
    position: absolute; inset: 0;
    background: #334155;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}
.npadmin-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; bottom: 3px;
    background: #94a3b8;
    border-radius: 50%;
    transition: all 0.2s;
}
.npadmin-toggle input:checked + .npadmin-toggle-slider { background: #7c3aed; }
.npadmin-toggle input:checked + .npadmin-toggle-slider::before {
    transform: translateX(20px);
    background: white;
}
.npadmin-toggle input:disabled + .npadmin-toggle-slider { opacity: 0.4; cursor: not-allowed; }

/* ─── Audit Table ────────────────────────────────────── */

.npadmin-table-wrap {
    overflow-x: auto;
    border: 1px solid #334155;
    border-radius: 10px;
}

.npadmin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.npadmin-table th {
    background: #1e293b;
    color: #94a3b8;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #334155;
    white-space: nowrap;
}

.npadmin-table td {
    color: #cbd5e1;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #1e293b;
}

.npadmin-table tbody tr:hover { background: #1e293b44; }
.npadmin-table-time { white-space: nowrap; color: #64748b; }
.npadmin-table-details { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.npadmin-table code { background: #334155; padding: 0.125rem 0.375rem; border-radius: 4px; font-size: 0.75rem; }