/* Net Profit Central SaaS — User Dashboard Design System (user.css) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --sidebar-bg: #140726;
    --sidebar-border: rgba(255, 255, 255, 0.07);
    --sidebar-text: #b8a8d9;
    --sidebar-text-active: #ffffff;
    --sidebar-active-bg: #4f1d96;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.06);

    --topbar-bg: #ffffff;
    --topbar-border: #e9e1f5;
    
    --body-bg: #f5f2fa;
    --card-bg: #ffffff;
    --card-border: #e8e0f3;
    --card-shadow: 0 4px 20px rgba(124, 58, 237, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);

    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #8b5cf6;
    --primary-subtle: #f3e8ff;
    --primary-subtle-text: #6b21a8;

    --text-heading: #1e152d;
    --text-body: #4b3e64;
    --text-muted: #8c7c9e;

    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-text: #047857;

    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-text: #b45309;

    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --danger-text: #b91c1c;

    --info: #06b6d4;
    --info-bg: #ecfeff;
    --info-text: #0e7490;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font: inherit;
}

/* App Wrapper Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Styling */
.app-sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--sidebar-border);
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #7c3aed, #4f1d96);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-title {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.brand-subtitle {
    color: var(--sidebar-text);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Sidebar Nav */
.sidebar-nav {
    padding: 20px 12px;
    flex: 1;
    overflow-y: auto;
}

.nav-section-title {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 12px 6px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--sidebar-text);
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    transition: var(--transition);
}

.nav-item:hover {
    background-color: var(--sidebar-hover-bg);
    color: #ffffff;
}

.nav-item.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-text-active);
    box-shadow: 0 4px 12px rgba(79, 29, 150, 0.4);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Topbar Header */
.topbar {
    height: 70px;
    background-color: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.store-select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--body-bg);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
}

.store-select {
    border: none;
    background: transparent;
    font-weight: 700;
    color: var(--text-heading);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.live-status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--success-bg);
    color: var(--success-text);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-profile-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--body-bg);
    padding: 5px 12px 5px 6px;
    border-radius: var(--radius-full);
    border: 1px solid var(--card-border);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.user-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-heading);
}

/* Page Content Body */
.content-body {
    padding: 30px;
    flex: 1;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.4px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 2px;
}

/* Hero Notification Banner */
.hero-banner {
    background: linear-gradient(135deg, #1b0a33 0%, #4f1d96 60%, #7c3aed 100%);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    color: #ffffff;
    margin-bottom: 28px;
    box-shadow: 0 8px 24px rgba(79, 29, 150, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-banner h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.hero-banner p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

/* Grid & Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.08);
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-subtle);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.stat-card-icon svg {
    width: 22px;
    height: 22px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--body-bg);
    color: var(--text-heading);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background-color: #eae3f7;
}

/* Data Tables */
.card-table {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.table-header-row {
    padding: 20px 24px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-heading);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    background-color: #faf7fc;
    padding: 14px 20px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--card-border);
}

.custom-table td {
    padding: 16px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-body);
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tr:hover td {
    background-color: #faf7ff;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-success { background: var(--success-bg); color: var(--success-text); }
.badge-warning { background: var(--warning-bg); color: var(--warning-text); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger-text);  }
.badge-primary { background: var(--primary-subtle); color: var(--primary-subtle-text); }

/* Form Controls */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 6px;
}

.form-input, .form-select {
    width: 100%;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    background-color: #ffffff;
    color: var(--text-heading);
    outline: none;
    transition: var(--transition);
}

.form-input:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

/* Footer */
.app-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--topbar-border);
    background-color: var(--topbar-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
}
