/* ==========================================================================
   DealTrust - Creator-Brand Marketplace Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- DESIGN TOKENS --- */
:root {
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-surface-2: #f1f5f9;
    --color-border: rgba(0, 0, 0, 0.06);
    --color-border-2: rgba(0, 0, 0, 0.12);
    --color-primary: #2da58e;
    --color-primary-2: #1a9278;
    --color-primary-soft: #e8f9f5;
    --color-navy: #0d1b2a;
    --color-green: #10b981;
    --color-text: #0d1b2a;
    --color-muted: #64748b;
    --color-muted-2: #94a3b8;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 40px rgba(45, 165, 142, 0.1);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    display: block;
}

/* --- LAYOUT --- */
.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   PUBLIC PAGES — NAVBAR
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.logo em {
    font-style: normal;
    color: var(--color-primary);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.site-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-muted-2);
    transition: var(--transition);
}

.site-nav a:hover {
    color: var(--color-text);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-ghost {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-muted-2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: none;
    background: none;
    cursor: pointer;
}

.btn-ghost:hover {
    color: var(--color-text);
    background: rgba(0, 0, 0, 0.04);
}

/* --- BUTTONS --- */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--color-primary-2);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(45, 165, 142, 0.35);
    color: #fff;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--color-surface-2);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-2);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--color-surface);
    border-color: var(--color-primary);
    transform: translateY(-1px);
    color: var(--color-primary);
}

.btn-lg {
    font-size: 1rem;
    padding: 0.85rem 2rem;
    border-radius: var(--radius);
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.btn-danger:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 800px;
    height: 600px;
    transform: translate(-50%, -40%);
    background: radial-gradient(circle, rgba(108, 99, 255, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    margin-bottom: 2rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.0;
    letter-spacing: -0.03em;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    color: var(--color-text);
}

.hero h1 .highlight {
    background: linear-gradient(135deg, #a78bfa, #6c63ff, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .sub {
    font-size: 1.15rem;
    color: var(--color-muted-2);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-meta {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* ==========================================================================
   HOW IT WORKS SECTION
   ========================================================================== */

.section {
    padding: 100px 0;
}

.section-eyebrow {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.section-sub {
    font-size: 1rem;
    color: var(--color-muted-2);
    max-width: 520px;
    margin-bottom: 4rem;
}

/* Steps row */
.steps-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.step-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    position: relative;
    transition: var(--transition);
}

.step-card:hover {
    border-color: rgba(108, 99, 255, 0.35);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.step-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.step-icon.purple {
    background: #eef2ff;
    color: #6366f1;
}

.step-icon.green {
    background: #ecfdf5;
    color: #10b981;
}

.step-icon.blue {
    background: #eff6ff;
    color: #3b82f6;
}

.step-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--color-muted-2);
    line-height: 1.7;
}

/* ==========================================================================
   AUTH PAGES
   ========================================================================== */

.auth-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-side {
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-wrap {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.auth-form-wrap .logo {
    margin-bottom: 3rem;
}

.auth-form-wrap h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.auth-form-wrap p.sub {
    color: var(--color-muted-2);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-muted-2);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border-2);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(45, 165, 142, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.role-option {
    border: 1px solid var(--color-border-2);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--color-surface);
    font-size: 0.9rem;
    font-weight: 600;
}

.role-option i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-muted-2);
}

.role-option:hover {
    border-color: var(--color-primary);
}

.role-option.active {
    border-color: var(--color-primary);
    background: rgba(45, 165, 142, 0.1);
    color: var(--color-primary);
}

.role-option.active i {
    color: var(--color-primary);
}

.alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(34, 197, 94, 0.08);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.2);
}

.auth-footer {
    margin-top: 1.75rem;
    font-size: 0.85rem;
    color: var(--color-muted);
    text-align: center;
}

.auth-footer a {
    color: var(--color-primary);
    font-weight: 600;
}

/* ==========================================================================
   DASHBOARD LAYOUT
   ========================================================================== */

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--color-bg);
}

/* --- SIDEBAR --- */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--color-navy);
    border-right: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.sidebar .logo {
    padding: 0.5rem 0;
    margin-bottom: 2.5rem;
}

.nav-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    transition: var(--transition);
}

.nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

.nav-link.active {
    background: rgba(45, 165, 142, 0.2);
    color: var(--color-primary);
}

.nav-link.active i {
    color: var(--color-primary);
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- TOPBAR --- */
.topbar {
    height: 60px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: var(--color-bg);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-left h4 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.topbar-left p {
    font-size: 0.75rem;
    color: var(--color-muted);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), #1a9278);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.user-pill .name {
    font-weight: 600;
    font-size: 0.875rem;
}

.user-pill .role {
    font-size: 0.75rem;
    color: var(--color-muted);
    text-transform: capitalize;
}

/* --- CONTENT BODY --- */
.content-body {
    padding: 2rem;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-header p {
    font-size: 0.875rem;
    color: var(--color-muted-2);
    margin-top: 0.25rem;
}

/* ==========================================================================
   STAT CARDS
   ========================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--color-border-2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.stat-card .label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-muted);
    margin-bottom: 0.75rem;
}

.stat-card .value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-card .trend {
    font-size: 0.78rem;
    color: var(--color-green);
    margin-top: 0.5rem;
}

/* ==========================================================================
   TABLES
   ========================================================================== */

.table-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.deal-table {
    width: 100%;
    border-collapse: collapse;
}

.deal-table th {
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-muted);
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.15);
}

.deal-table td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

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

.deal-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   BADGES / STATUS
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-active {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}

.badge-active::before {
    background: #4ade80;
}

.badge-pending {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
}

.badge-pending::before {
    background: #fbbf24;
}

.badge-proposal {
    background: rgba(108, 99, 255, 0.12);
    color: #a78bfa;
}

.badge-proposal::before {
    background: #a78bfa;
}

.badge-completed {
    background: rgba(100, 116, 139, 0.12);
    color: #94a3b8;
}

.badge-completed::before {
    background: #94a3b8;
}

.badge-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.badge-cancelled::before {
    background: #f87171;
}

/* ==========================================================================
   FORMS / PANELS
   ========================================================================== */

.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.divider {
    width: 100%;
    height: 1px;
    background: var(--color-border);
    margin: 1.5rem 0;
}

/* ==========================================================================
   CHAT UI
   ========================================================================== */

.chat-bubble-me {
    align-self: flex-end;
    background: var(--color-primary);
    color: #fff;
    padding: 0.65rem 1rem;
    border-radius: 16px 16px 4px 16px;
    max-width: 65%;
    font-size: 0.875rem;
    line-height: 1.5;
}

.chat-bubble-them {
    align-self: flex-start;
    background: var(--color-surface-2);
    color: var(--color-text);
    padding: 0.65rem 1rem;
    border-radius: 16px 16px 16px 4px;
    max-width: 65%;
    font-size: 0.875rem;
    line-height: 1.5;
}

.chat-time {
    font-size: 0.7rem;
    color: var(--color-muted);
    margin-top: 0.35rem;
}

/* ==========================================================================
   EMPTY STATES
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--color-muted);
    opacity: 0.4;
    margin-bottom: 1rem;
}

.empty-state h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--color-muted-2);
}

/* ==========================================================================
   UTILITY
   ========================================================================== */

.text-primary {
    color: var(--color-primary);
}

.text-muted {
    color: var(--color-muted-2);
}

.text-small {
    font-size: 0.8rem;
}

.text-bold {
    font-weight: 700;
}

.flex {
    display: flex;
}

.flex-center {
    align-items: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.ml-auto {
    margin-left: auto;
}

.w-full {
    width: 100%;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}


.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 2.5rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-top: auto;
}

/* ==========================================================================
   DASHBOARD — Premium UI Add-ons
   ========================================================================== */

/* Slide-in from left on page load */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dash-anim-1 {
    animation: slideInUp 0.5s 0.0s ease both;
}

.dash-anim-2 {
    animation: slideInUp 0.5s 0.08s ease both;
}

.dash-anim-3 {
    animation: slideInUp 0.5s 0.16s ease both;
}

.dash-anim-4 {
    animation: slideInUp 0.5s 0.24s ease both;
}

.dash-anim-5 {
    animation: slideInUp 0.5s 0.32s ease both;
}

.dash-anim-6 {
    animation: slideInUp 0.5s 0.40s ease both;
}

/* Enhanced stat card */
.stat-card-premium {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.stat-card-premium:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.stat-card-premium .glow-dot {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
    animation: glowPulse 2s infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 4px currentColor;
        opacity: 1;
    }

    50% {
        box-shadow: 0 0 14px currentColor;
        opacity: 0.6;
    }
}

.stat-card-premium .sc-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
}

.stat-card-premium .sc-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

.stat-card-premium .sc-value {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-card-premium .sc-sub {
    font-size: 0.78rem;
    color: var(--color-muted);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.stat-card-premium::before {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0.06;
}

.stat-card-premium.purple::before {
    background: var(--color-primary);
}

.stat-card-premium.green::before {
    background: #22c55e;
}

.stat-card-premium.blue::before {
    background: #3b82f6;
}

.stat-card-premium.yellow::before {
    background: #f59e0b;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.15s;
}

.activity-row:last-child {
    border-bottom: none;
}

.activity-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

.activity-dot {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.activity-text {
    flex: 1;
}

.activity-text .main {
    font-size: 0.875rem;
    font-weight: 600;
}

.activity-text .sub {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 0.1rem;
}

.activity-amount {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Progress bar */
.progress-wrap {
    margin-top: 0.6rem;
}

.progress-bar-bg {
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.06);
}

.progress-bar-fill {
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--color-primary), #818cf8);
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    width: 0%;
}

/* Welcome banner */
.welcome-banner {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 20px;
    padding: 2rem 2.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(108, 99, 255, 0.08);
    pointer-events: none;
}

.welcome-banner h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.welcome-banner p {
    font-size: 0.875rem;
    color: var(--color-muted-2);
    line-height: 1.7;
}

/* ==========================================================================
   DASHBOARD GRID CLASSES (replacing inline styles)
   ========================================================================== */

/* 4-column stat cards grid */
.dash-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* 2-column main content grid (deals + sidebar / proposals + campaigns) */
.dash-main-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

/* Centered narrow layout for forms */
.dash-content-narrow {
    max-width: 800px;
    margin: 0 auto;
}

/* Grid for lists like explore */
.dash-list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

/* Page content wrapper to handle consistent max-width */
.dash-content-wrap {
    max-width: 1200px;
    width: 100%;
}

/* Chat-specific responsiveness */
@media (max-width: 768px) {
    .dash-main-grid[style*="grid-template-columns: 320px 1fr"] {
        grid-template-columns: 1fr !important;
        height: auto !important;
    }

    .dash-main-grid[style*="grid-template-columns: 320px 1fr"]>div:first-child {
        border-right: none !important;
        border-bottom: 1px solid var(--color-border);
        max-height: 300px;
    }
}

/* ==========================================================================
   MOBILE HAMBURGER BUTTON
   ========================================================================== */

.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--color-border-2);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    border-radius: 4px;
    transition: all 0.28s ease;
}

.hamburger-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Dark overlay backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 199;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.sidebar-backdrop.open {
    display: block;
}

/* ==========================================================================
   DASHBOARD — TABLET  (≤ 1024px)
   ========================================================================== */

@media (max-width: 1024px) {

    /* Sidebar hides off-screen, slides in when .open */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 200;
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.3);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Main content fills full viewport width */
    .main-content {
        margin-left: 0;
    }

    /* Show hamburger button */
    .hamburger-btn {
        display: flex;
    }

    /* Stat cards: 2 per row */
    .dash-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Main grid: full-width single column */
    .dash-main-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   DASHBOARD — MOBILE  (≤ 680px)
   ========================================================================== */

@media (max-width: 680px) {

    .content-body {
        padding: 1rem;
    }

    .topbar {
        padding: 0 1rem;
        height: 56px;
    }

    /* Stat cards stay 2-col but more compact */
    .dash-stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .stat-card-premium {
        padding: 1.1rem;
        border-radius: 14px;
    }

    .stat-card-premium .sc-value {
        font-size: 1.5rem;
    }

    .stat-card-premium .sc-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    /* Welcome banner: stack vertically, hide decorative image */
    .welcome-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
        gap: 0.75rem;
        min-height: auto !important;
        background-image: none !important;
    }

    .welcome-banner>div {
        max-width: 100% !important;
    }

    .welcome-banner h2 {
        font-size: 1.25rem !important;
    }

    .welcome-banner p {
        font-size: 0.875rem !important;
    }

    /* Activity rows */
    .activity-row {
        padding: 0.7rem 0.875rem;
        gap: 0.6rem;
    }

    .activity-text .main {
        font-size: 0.8rem;
    }

    .activity-text .sub {
        font-size: 0.72rem;
    }

    .activity-dot {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    /* Table cards: scroll horizontally */
    .table-card {
        overflow-x: auto;
    }

    .deal-table {
        min-width: 500px;
    }

    .deal-table th,
    .deal-table td {
        padding: 0.65rem 0.875rem;
        font-size: 0.78rem;
    }

    /* Panels */
    .panel {
        padding: 1.1rem;
    }

    /* Table header */
    .table-header {
        padding: 0.875rem 1rem;
    }

    /* Page header stacks on mobile */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .page-header h1 {
        font-size: 1.2rem;
    }

    /* Topbar user pill: hide text, keep avatar */
    .user-pill div {
        display: none;
    }

    .user-pill {
        gap: 0;
    }
}

/* ==========================================================================
   DASHBOARD — SMALL PHONES  (≤ 480px)
   ========================================================================== */

@media (max-width: 480px) {

    /* Stat cards: single column on tiny phones */
    .dash-stat-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .content-body {
        padding: 0.875rem;
    }

    .topbar {
        padding: 0 0.875rem;
    }

    .topbar-left h4 {
        font-size: 0.85rem;
    }

    .stat-card-premium .sc-value {
        font-size: 1.75rem;
    }

    .table-header h3 {
        font-size: 0.875rem;
    }
}