/* ========================================
   Laser Offerte - Premium Design System
   Clean, Bold, Professional
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ========================================
   Design Tokens
   ======================================== */

:root {
    /* Brand Colors */
    --brand-primary: #2563eb;
    --brand-secondary: #0ea5e9;
    --brand-gradient: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    --brand-glow: rgba(37, 99, 235, 0.4);
    
    /* Light Mode */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --bg-subtle: #f1f5f9;
    --bg-muted: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-on-brand: #ffffff;
    
    --border-default: #e2e8f0;
    --border-subtle: #f1f5f9;
    
    /* Semantic */
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.1);
    --error: #ef4444;
    --error-soft: rgba(239, 68, 68, 0.1);
    
    /* Effects */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.04), 0 4px 6px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.06), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 40px var(--brand-glow);
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
}

/* Dark Mode */
[data-theme="dark"] {
    --brand-primary: #3b82f6;
    --brand-secondary: #22d3ee;
    --brand-gradient: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
    --brand-glow: rgba(59, 130, 246, 0.5);
    
    --bg-base: #030712;
    --bg-surface: #0f172a;
    --bg-elevated: #1e293b;
    --bg-subtle: #1e293b;
    --bg-muted: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --border-default: #1e293b;
    --border-subtle: #334155;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
}

/* ========================================
   Base Reset
   ======================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background var(--duration-normal) var(--ease-out),
                color var(--duration-normal) var(--ease-out);
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* ========================================
   Logo Component
   ======================================== */

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 36px;
    height: 36px;
    background: var(--brand-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-mark svg {
    width: 24px;
    height: 24px;
    fill: white;
    position: relative;
    z-index: 1;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Large logo for login */
.logo-lg .logo-mark {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
}

.logo-lg .logo-mark svg {
    width: 40px;
    height: 40px;
}

.logo-lg .logo-text {
    font-size: 2rem;
}

/* ========================================
   Login Page
   ======================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

/* Animated gradient background */
.login-bg {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
        var(--bg-base);
    z-index: 0;
}

.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23475569' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 48px 40px;
    border: 1px solid var(--border-default);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header .logo {
    justify-content: center;
    margin-bottom: 16px;
    flex-direction: column;
    gap: 16px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ========================================
   Form Elements
   ======================================== */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    background: var(--bg-subtle);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--duration-fast) var(--ease-out);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-input:hover {
    background: var(--bg-muted);
}

.form-input:focus {
    background: var(--bg-surface);
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.error-message {
    color: var(--error);
    font-size: 0.875rem;
    font-weight: 500;
    min-height: 24px;
    margin-bottom: 8px;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    outline: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    display: none;
}

.btn-primary {
    background: var(--brand-primary);
    color: var(--text-on-brand);
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-primary:active {
    background: #1e40af;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--bg-subtle);
    color: var(--text-primary);
    border: 2px solid var(--border-default);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 16px;
}

.btn-ghost:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.btn-icon:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.btn-full {
    width: 100%;
}

/* ========================================
   Dashboard Layout
   ======================================== */

.dashboard-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 32px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-default);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-nav {
    display: flex;
    gap: 4px;
    background: var(--bg-subtle);
    padding: 4px;
    border-radius: var(--radius-md);
}

.nav-tab {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

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

.nav-tab.active {
    background: var(--bg-surface);
    color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-greeting {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-right: 8px;
}

.header-greeting strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 32px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

/* ========================================
   Cards
   ======================================== */

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    overflow: hidden;
}

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

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.card-body {
    padding: 28px;
}

.card-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-default);
    background: var(--bg-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========================================
   Drop Zone
   ======================================== */

.drop-zone {
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-md);
    padding: 48px 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--duration-fast), background var(--duration-fast);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--brand-primary);
    background: rgba(37, 99, 235, 0.02);
}

.drop-zone-content {
    position: relative;
    z-index: 1;
}

.drop-zone-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    background: var(--bg-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-normal) var(--ease-spring);
    border: 2px solid var(--border-default);
}

.drop-zone:hover .drop-zone-icon,
.drop-zone.dragover .drop-zone-icon {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.drop-zone-icon svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    transition: color var(--duration-normal);
}

.drop-zone:hover .drop-zone-icon svg,
.drop-zone.dragover .drop-zone-icon svg {
    color: white;
}

.drop-zone h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.drop-zone p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.drop-zone-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.drop-zone-divider::before,
.drop-zone-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-default);
}

/* ========================================
   File List
   ======================================== */

.file-list {
    margin-top: 24px;
}

.file-item {
    display: grid;
    grid-template-columns: 60px 1fr auto auto 44px;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.file-item:hover {
    background: var(--bg-muted);
}

.file-thumbnail {
    width: 60px;
    height: 60px;
    background: var(--bg-surface);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.file-thumbnail:hover {
    border-color: var(--brand-primary);
}

.file-thumbnail canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.file-info {
    min-width: 0;
}

.file-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.file-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-predictions {
    display: flex;
    gap: 24px;
}

.file-pred-item {
    text-align: center;
}

.file-pred-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.file-pred-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.file-status {
    text-align: right;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.status-badge.pending {
    background: var(--bg-muted);
    color: var(--text-muted);
}

.status-badge.loading {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-badge.done {
    background: var(--success-soft);
    color: var(--success);
}

.status-badge.error {
    background: var(--error-soft);
    color: var(--error);
}

.file-remove {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    transition: all var(--duration-fast);
}

.file-remove:hover {
    background: var(--error-soft);
    color: var(--error);
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-default);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-small {
    width: 14px;
    height: 14px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Assembly Styling
   ======================================== */

.assembly-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
}

.assembly-item .assembly-header {
    display: grid;
    grid-template-columns: 60px 1fr auto auto 44px;
    align-items: center;
    gap: 16px;
    padding: 16px;
    width: 100%;
}

.assembly-item .file-info {
    min-width: 0;
}

.assembly-item .file-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.assembly-toggle,
.subassembly-toggle {
    background: var(--bg-muted);
    border: none;
    border-radius: var(--radius-sm);
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all var(--duration-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.assembly-toggle:hover,
.subassembly-toggle:hover {
    background: var(--brand-primary);
    color: white;
}

.assembly-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--brand-primary);
    color: white;
    border-radius: var(--radius-sm);
    margin-left: 8px;
}

.assembly-parts {
    display: block;
    width: 100%;
    padding: 16px;
    border-top: 1px solid var(--border-default);
    background: var(--bg-subtle);
}

.assembly-item.collapsed .assembly-parts {
    display: none;
}

.assembly-part {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    transition: all var(--duration-fast);
}

.assembly-part:hover {
    border-color: var(--brand-primary);
}

/* Parts Grid Layout */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 16px 0;
    max-width: 100%;
}

.grid-part {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.grid-thumbnail {
    width: 140px;
    height: 140px;
    background: var(--bg-surface);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-thumbnail:hover {
    border-color: var(--brand-primary);
}

.grid-thumbnail canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.grid-thumbnail.empty {
    background: var(--bg-subtle);
}

.grid-count-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--success);
    color: white;
    border-radius: var(--radius-full);
    z-index: 1;
}

.grid-part-name {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-part-info {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.grid-part-info span:first-child {
    color: var(--brand-primary);
    font-weight: 600;
}

/* Subassembly in grid context */
.assembly-subassembly {
    margin-bottom: 16px;
}

.assembly-subassembly .subassembly-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    gap: 8px;
}

.assembly-subassembly .subassembly-children {
    display: none;
    padding-left: 20px;
    margin-top: 8px;
}

.assembly-subassembly.expanded .subassembly-children {
    display: block;
}

/* Legacy part-thumbnail (fallback) */
.part-thumbnail {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
}

.part-thumbnail canvas {
    width: 100%;
    height: 100%;
}

.assembly-part .part-name {
    flex: 1;
    min-width: 0;
}

.assembly-part .part-pred {
    margin-left: auto;
}

.assembly-part.subassembly {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: transparent;
    border: none;
}

.subassembly-header {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.subassembly-children {
    display: none;
    padding-left: 16px;
}

.assembly-part.subassembly.expanded .subassembly-children {
    display: block;
}

.part-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.part-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
}

.part-pred {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
}

.part-pred .pred-item {
    color: var(--text-secondary);
}

.part-pred .pred-item:first-child {
    color: var(--brand-primary);
    font-weight: 600;
}

.count-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--success);
    color: white;
    border-radius: var(--radius-full);
    margin-left: 6px;
}

.count-badge-inline {
    color: var(--brand-primary);
    font-weight: 700;
    margin-left: 4px;
}

.assembly-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-subtle);
}

/* ========================================
   Part Type Groepering (vakjes)
   ======================================== */

.type-group {
    margin-bottom: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    background: var(--bg-surface);
}

.type-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-muted);
    border-bottom: 2px solid var(--type-color, var(--border-default));
    font-weight: 600;
    font-size: 0.85rem;
}

.type-group-header .type-icon {
    font-size: 1rem;
}

.type-group-header .type-label {
    color: var(--text-primary);
}

.type-group-header .type-count {
    margin-left: auto;
    background: var(--type-color, var(--brand-primary));
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    min-width: 24px;
    text-align: center;
}

.type-group .parts-grid {
    padding: 12px;
}

/* Calc table type headers */
.type-header-row td {
    padding: 8px 16px !important;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    border-bottom: none !important;
}

.type-row-profiel td {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
    border-left: 3px solid #3b82f6;
}

.type-row-plaat td {
    background: rgba(34, 197, 94, 0.08);
    color: #22c55e;
    border-left: 3px solid #22c55e;
}

.type-row-plaat_gekant td {
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
    border-left: 3px solid #f59e0b;
}

.type-row-inkoopdeel td {
    background: rgba(148, 163, 184, 0.08);
    color: #94a3b8;
    border-left: 3px solid #94a3b8;
}

[data-theme="dark"] .type-row-profiel td { background: rgba(59, 130, 246, 0.12); }
[data-theme="dark"] .type-row-plaat td { background: rgba(34, 197, 94, 0.12); }
[data-theme="dark"] .type-row-plaat_gekant td { background: rgba(245, 158, 11, 0.12); }
[data-theme="dark"] .type-row-inkoopdeel td { background: rgba(148, 163, 184, 0.12); }

/* Calc table assembly styling */
.assembly-header-row {
    background: var(--bg-subtle);
}

.assembly-header-row td {
    padding: 12px 16px !important;
    border-bottom: 2px solid var(--brand-primary) !important;
}

.assembly-part-row {
    background: rgba(37, 99, 235, 0.03);
}

.assembly-part-row td:first-child {
    padding-left: 32px !important;
}

[data-theme="dark"] .assembly-part-row {
    background: rgba(59, 130, 246, 0.05);
}

/* ========================================
   Stats Cards
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-default);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========================================
   Calculation Table
   ======================================== */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
}

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

.calc-table th {
    padding: 14px 16px;
    text-align: left;
    background: var(--bg-subtle);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-default);
    white-space: nowrap;
}

.calc-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.calc-table tbody tr {
    transition: background var(--duration-fast);
}

.calc-table tbody tr:hover {
    background: var(--bg-subtle);
}

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

.calc-table .cell-name {
    font-weight: 600;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calc-table .cell-profile {
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-subtle);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.calc-table .cell-number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.calc-table .cell-price {
    text-align: right;
    font-weight: 700;
    color: var(--brand-primary);
    font-variant-numeric: tabular-nums;
}

.calc-table tfoot td {
    padding: 18px 16px;
    background: var(--bg-subtle);
    font-weight: 700;
    border-top: 2px solid var(--border-default);
}

.input-aantal {
    width: 80px;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    background: var(--bg-surface);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    transition: all var(--duration-fast);
    outline: none;
}

.input-aantal:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* ========================================
   Nesting
   ======================================== */

.nesting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.nesting-tabs {
    display: flex;
    gap: 8px;
    background: var(--bg-subtle);
    padding: 4px;
    border-radius: var(--radius-md);
}

.nesting-tab {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast);
    color: var(--text-muted);
}

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

.nesting-tab.active {
    background: var(--bg-surface);
    color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.nesting-content {
    display: none;
}

.nesting-content.active {
    display: block;
}

.nesting-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.nesting-stat {
    background: var(--bg-subtle);
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
}

.nesting-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.nesting-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-top: 8px;
}

.materiaal-prijs-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.materiaal-prijs-section label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.materiaal-prijs-input {
    width: 120px;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: right;
    background: var(--bg-surface);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: all var(--duration-fast);
}

.materiaal-prijs-input:focus {
    border-color: var(--brand-primary);
}

.materiaal-totaal {
    margin-left: auto;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-primary);
}

/* Buizen visualisatie */
.buizen-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.buis-row {
    display: grid;
    grid-template-columns: 100px 1fr 180px;
    align-items: center;
    gap: 20px;
}

.buis-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.buis-bar {
    position: relative;
    height: 48px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border-default);
}

.buis-item {
    position: absolute;
    top: 4px;
    height: calc(100% - 8px);
    border-radius: 4px;
    cursor: pointer;
    transition: filter var(--duration-fast);
}

.buis-item:hover {
    filter: brightness(1.1);
    z-index: 10;
}

.buis-rest {
    position: absolute;
    top: 4px;
    height: calc(100% - 8px);
    background: repeating-linear-gradient(
        45deg,
        var(--bg-muted),
        var(--bg-muted) 4px,
        var(--bg-subtle) 4px,
        var(--bg-subtle) 8px
    );
    border-radius: 4px;
    opacity: 0.6;
}

.buis-info {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Tooltip */
.tooltip {
    position: fixed;
    display: none;
    padding: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    max-width: 300px;
    font-size: 0.9rem;
    animation: tooltipEnter 0.2s var(--ease-out);
}

@keyframes tooltipEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip-thumb {
    width: 250px;
    height: 250px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
}

.tooltip-thumb canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ========================================
   Modal
   ======================================== */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: var(--shadow-xl);
    animation: modalEnter 0.4s var(--ease-out);
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(16px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.modal-header h2 {
    font-size: 1.25rem;
}

.modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast);
}

.modal-close:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-body h3 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.modal-body h3:not(:first-child) {
    margin-top: 32px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-default);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ========================================
   3D Viewer Modal
   ======================================== */

.viewer-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.viewer-modal.active {
    display: flex;
}

.viewer-modal-content {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 95vw;
    height: 90vh;
    max-width: none;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalEnter 0.4s var(--ease-out);
    display: flex;
    flex-direction: column;
}

.viewer-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-default);
    flex-shrink: 0;
}

.viewer-modal-header > span:first-child {
    font-weight: 700;
    font-size: 1rem;
}

.viewer-modal-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast);
    font-family: inherit;
}

.btn-tool:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
}

.btn-tool.active {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

.btn-tool svg {
    width: 18px;
    height: 18px;
}

.measure-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--success-soft);
    border: 1px solid var(--success);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--success);
    font-variant-numeric: tabular-nums;
}

.measure-display strong {
    font-size: 1.05rem;
    font-weight: 700;
}

.measure-detail {
    font-size: 0.75rem;
    opacity: 0.8;
}

.viewer-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--duration-fast);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.viewer-modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-muted);
}

.viewer-modal-canvas {
    width: 100%;
    flex: 1;
    min-height: 0;
    background: var(--bg-base);
    position: relative;
    overflow: hidden;
}

.viewer-modal-info {
    padding: 10px 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-default);
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

/* ========================================
   Loading Overlay
   ======================================== */

.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .loading-overlay {
    background: rgba(3, 7, 18, 0.95);
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 3px solid var(--border-default);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

.loading-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.progress-bar {
    width: 280px;
    height: 6px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--brand-gradient);
    width: 0%;
    transition: width 0.3s var(--ease-out);
    border-radius: var(--radius-full);
}

/* ========================================
   Offerte Preview
   ======================================== */

.offerte-section {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    overflow: hidden;
}

.offerte-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-default);
}

.offerte-form {
    padding: 28px;
    border-bottom: 1px solid var(--border-default);
}

.offerte-form h3 {
    font-size: 1rem;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.offerte-preview {
    padding: 48px;
    background: white;
    color: #0f172a;
}

@media print {
    .offerte-preview {
        padding: 24px;
    }
}

.offerte-document {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

.offerte-doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 3px solid #2563eb;
}

.offerte-company-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: #2563eb;
    margin-bottom: 8px;
}

.offerte-company-details {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
}

.offerte-title {
    text-align: right;
}

.offerte-title h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.offerte-number {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

.offerte-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.offerte-meta-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 12px;
}

.offerte-meta-section p {
    margin: 6px 0;
    color: #0f172a;
}

.offerte-meta-section strong {
    font-weight: 700;
}

.offerte-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
}

.offerte-table th {
    padding: 14px 16px;
    text-align: left;
    background: #f1f5f9;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
}

.offerte-table td {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
}

.offerte-table .text-right {
    text-align: right;
}

.offerte-table tfoot td {
    font-weight: 600;
    background: #f8fafc;
}

.offerte-table .total-row td {
    font-size: 1.1rem;
    font-weight: 700;
    border-top: 2px solid #0f172a;
    background: #f1f5f9;
}

.offerte-summary {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 48px;
}

.offerte-summary-box {
    width: 300px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 24px;
}

.offerte-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

.offerte-summary-row:last-child {
    border-bottom: none;
    padding-top: 16px;
    margin-top: 8px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #2563eb;
}

.offerte-opmerking {
    margin-bottom: 32px;
    padding: 20px 24px;
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    border-radius: 0 8px 8px 0;
}

.offerte-opmerking h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 8px;
}

.offerte-opmerking p {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.6;
}

.offerte-footer {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}

.offerte-terms h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.offerte-terms ul {
    margin: 0;
    padding-left: 20px;
    color: #64748b;
    font-size: 0.9rem;
}

.offerte-terms li {
    margin: 6px 0;
}

/* ========================================
   Home / Dashboard
   ======================================== */

.home-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* New Offerte drop zone card */
.new-offerte-card {
    background: var(--bg-surface);
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-md);
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 32px;
    cursor: pointer;
    transition: border-color var(--duration-fast), background var(--duration-fast);
}

.new-offerte-card:hover,
.new-offerte-card.dragover {
    border-color: var(--brand-primary);
    background: rgba(37, 99, 235, 0.04);
}

[data-theme="dark"] .new-offerte-card:hover,
[data-theme="dark"] .new-offerte-card.dragover {
    background: rgba(59, 130, 246, 0.08);
}

.new-offerte-card .drop-icon {
    width: 56px;
    height: 56px;
    background: var(--brand-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.new-offerte-card .drop-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.new-offerte-card .drop-text h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.new-offerte-card .drop-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.new-offerte-card .drop-stats {
    display: flex;
    gap: 24px;
    margin-left: auto;
}

.mini-stat {
    text-align: center;
    padding: 12px 16px;
    min-width: 80px;
}

.mini-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.mini-stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

/* Session card */
.session-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--brand-primary);
    border-radius: var(--radius-sm);
}

.session-card-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.session-card-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.session-card-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.session-card-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Quotes section */
.quotes-section {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    padding: 24px;
}

.quotes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.quotes-header h2 {
    font-size: 1.25rem;
}

.quotes-filter {
    display: flex;
    gap: 4px;
    background: var(--bg-subtle);
    padding: 4px;
    border-radius: var(--radius-md);
}

.filter-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--duration-fast) var(--ease-out);
}

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

.filter-btn.active {
    background: var(--bg-surface);
    color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

/* Quote cards grid */
.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.quote-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: 20px;
    cursor: pointer;
    transition: border-color var(--duration-fast);
}

.quote-card:hover {
    border-color: var(--brand-primary);
}

.quote-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.quote-nummer {
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

.quote-status {
    font-size: 0.8rem;
    font-weight: 600;
}

.quote-card-body {
    margin-bottom: 16px;
}

.quote-klant {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.quote-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.quote-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-default);
}

.quote-totaal {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.quote-actions {
    display: flex;
    gap: 4px;
}

.quotes-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 40px;
    color: var(--text-muted);
}

.quotes-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.quotes-empty p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* Quote card actions row */
.quote-card-actions-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-default);
}

.btn-quote-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--duration-fast);
}

.btn-quote-action:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: white;
}

.btn-quote-action.danger:hover {
    background: var(--error);
    border-color: var(--error);
    color: white;
}

.btn-quote-action svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Dashboard info row */
.dashboard-info-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.info-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: 20px;
}

.info-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.info-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* Header user info */
.header-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 8px;
}

.header-company {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Nesting settings */
.nesting-settings {
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.nesting-settings h3 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.settings-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-group.inline {
    flex: 1;
    min-width: 140px;
}

.form-input.compact {
    padding: 10px 14px;
    font-size: 0.9rem;
}

/* Form textarea */
.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Button success state */
.btn-success {
    background: var(--success) !important;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3) !important;
}

/* Login footer */
.login-footer {
    margin-top: 16px;
    text-align: center;
}

/* ========================================
   Lucide Icons
   ======================================== */

[data-lucide] {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    vertical-align: middle;
    display: inline-block;
    flex-shrink: 0;
}

.nav-tab [data-lucide] {
    width: 16px;
    height: 16px;
    margin-right: 2px;
    position: relative;
    top: -1px;
}

.btn-icon [data-lucide] {
    width: 20px;
    height: 20px;
}

.btn [data-lucide] {
    width: 16px;
    height: 16px;
}

.session-card-icon [data-lucide] {
    width: 32px;
    height: 32px;
    color: var(--brand-primary);
}

.quotes-empty-icon [data-lucide] {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    opacity: 0.5;
}

.assembly-icon [data-lucide] {
    width: 28px;
    height: 28px;
    color: var(--text-muted);
}

.type-icon [data-lucide] {
    width: 16px;
    height: 16px;
}

.viewer-modal-info [data-lucide] {
    width: 14px;
    height: 14px;
    position: relative;
    top: -1px;
}

.part-name [data-lucide] {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.type-header-row [data-lucide] {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
}

.assembly-header-row [data-lucide] {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

/* ========================================
   Utilities
   ======================================== */

.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ========================================
   Context Menu (rechtermuisknop)
   ======================================== */

.part-context-menu {
    position: fixed;
    z-index: 9999;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 6px;
    min-width: 200px;
    animation: ctxEnter 0.15s var(--ease-out);
}

@keyframes ctxEnter {
    from { opacity: 0; transform: scale(0.95) translateY(-4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all var(--duration-fast);
    font-family: inherit;
}

.ctx-item:hover {
    background: var(--brand-primary);
    color: white;
}

.ctx-item svg {
    flex-shrink: 0;
}

/* ========================================
   Assembly Download Buttons
   ======================================== */

.assembly-download-tools {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-assembly-dl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-default);
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--duration-fast);
    font-family: inherit;
    white-space: nowrap;
}

.btn-assembly-dl:hover {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

.btn-assembly-dl svg {
    flex-shrink: 0;
}

/* ========================================
   Grid Part Actions (STEP download knop)
   ======================================== */

.grid-part {
    position: relative;
}

.grid-part-action {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    opacity: 0;
    transition: all var(--duration-fast);
    z-index: 2;
}

.grid-part:hover .grid-part-action {
    opacity: 1;
}

.grid-part-action:hover {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

/* Assembly header grid update voor extra tools kolom */
.assembly-item .assembly-header {
    grid-template-columns: 60px 1fr auto auto auto 44px;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .header-left {
        width: 100%;
        justify-content: space-between;
    }
    
    .header-nav {
        width: 100%;
        order: 3;
    }
    
    .nav-tab {
        flex: 1;
        text-align: center;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .card-header, .card-body {
        padding: 20px;
    }
    
    .buis-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .buis-label {
        font-size: 0.8rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .offerte-meta {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .nesting-stats {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    body {
        background: white;
        color: black;
    }
    
    .header,
    .offerte-header-bar,
    .offerte-form,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        max-width: none;
        padding: 0;
    }
    
    .offerte-section {
        border: none;
        box-shadow: none;
    }
}
