/* ============================================
   ScaleNest Brand v3.0 Design System
   Intelligence Indigo + Growth Mint Theme
   ============================================ */

/* === Design Tokens === */
:root {
    /* Brand Colors */
    --brand-primary: #4F46E5;           /* Intelligence Indigo */
    --brand-primary-dark: #4338CA;
    --brand-primary-light: #6366F1;
    
    --brand-accent: #10B981;            /* Growth Mint */
    --brand-accent-dark: #059669;
    --brand-accent-light: #34D399;
    
    /* Neutrals */
    --bg-main: #FAFBFC;                 /* Cloud White */
    --bg-card: #FFFFFF;
    --bg-hover: #F5F7FA;
    
    --text-main: #0F172A;               /* Midnight Slate */
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Borders */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* === Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

/* === Cards === */
.v3-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.v3-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-medium);
}

.v3-card-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: var(--spacing-md);
}

.v3-card-body {
    color: var(--text-muted);
}

/* === Buttons === */
.v3-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.v3-btn-primary {
    background: var(--brand-primary);
    color: white;
}

.v3-btn-primary:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.v3-btn-success {
    background: var(--brand-accent);
    color: white;
}

.v3-btn-success:hover {
    background: var(--brand-accent-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.v3-btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--brand-primary);
}

/* === Form Inputs === */
.v3-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-main);
    background: var(--bg-card);
    transition: all 0.2s ease;
}

.v3-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.v3-input::placeholder {
    color: var(--text-light);
}

.v3-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.875rem;
}

/* === Navigation === */
.v3-nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.v3-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.v3-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.v3-logo-accent {
    color: var(--brand-primary);
}

/* === Sidebar === */
.v3-sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-light);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.v3-sidebar-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: var(--spacing-xs);
}

.v3-sidebar-item:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.v3-sidebar-item.active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--brand-primary);
    font-weight: 500;
}

/* === Tables === */
.v3-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.v3-table th {
    background: var(--bg-hover);
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-light);
}

.v3-table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-muted);
}

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

.v3-table tr:hover {
    background: var(--bg-hover);
}

/* === Badges === */
.v3-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.v3-badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--brand-accent-dark);
}

.v3-badge-primary {
    background: rgba(79, 70, 229, 0.1);
    color: var(--brand-primary-dark);
}

.v3-badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #D97706;
}

/* === Utilities === */
.v3-text-gradient {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.v3-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.v3-section {
    padding: var(--spacing-xl) 0;
}
