:root {
    --font-sans: 'Inter', -apple-system, sans-serif;
    --bg: #0B0E18;
    --surface: #131726;
    --surface-2: #1A1F33;
    --border: rgba(99, 102, 241, .1);
    --border-hover: rgba(99, 102, 241, .25);
    --primary: #6366F1;
    --primary-glow: rgba(99, 102, 241, .12);
    --accent: #10B981;
    --accent-glow: rgba(16, 185, 129, .12);
    --amber: #F59E0B;
    --teal: #14B8A6;
    --text: #E2E8F0;
    --text-muted: #94A3B8;
    --text-dim: #64748B;
    --green: #4ADE80;
    --red: #F87171;
    --radius: 12px;
    --radius-sm: 8px
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6
}

.header {
    padding: .7rem 2rem;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    background: rgba(11, 14, 24, .85);
    position: sticky;
    top: 0;
    z-index: 50
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.logo {
    display: flex;
    align-items: center;
    gap: .6rem
}

.logo-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, .08);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 1rem
}

.logo-text {
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.header-actions {
    display: flex;
    gap: .3rem
}

.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 2rem 3rem
}

.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1rem;
    align-items: start
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: .75rem
}

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

.panel-title {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: .5rem
}

.form-col {
    display: flex;
    flex-direction: column;
    gap: .35rem
}

.input {
    width: 100%;
    padding: .35rem .5rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: .78rem;
    outline: none
}

.input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow)
}

.table-area {
    min-width: 0
}

.stats-row {
    display: flex;
    gap: .5rem;
    margin-bottom: .75rem
}

.stat {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .4rem;
    text-align: center
}

.stat-val {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary)
}

.stat-label {
    font-size: .55rem;
    color: var(--text-dim);
    text-transform: uppercase
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface)
}

.cap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .72rem
}

.cap-table th {
    padding: .4rem .5rem;
    text-align: left;
    background: var(--surface-2);
    font-size: .6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    position: sticky;
    top: 0;
    white-space: nowrap
}

.cap-table td {
    padding: .35rem .5rem;
    border-top: 1px solid rgba(255, 255, 255, .03);
    white-space: nowrap
}

.cap-table tr:hover td {
    background: rgba(99, 102, 241, .03)
}

.type-founder {
    color: #818CF8
}

.type-employee {
    color: var(--green)
}

.type-advisor {
    color: var(--amber)
}

.type-esop {
    color: var(--teal)
}

.type-investor {
    color: #F472B6
}

.pct-bar {
    display: inline-block;
    height: 4px;
    border-radius: 2px;
    vertical-align: middle;
    margin-left: .3rem
}

.exit-results {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .85rem;
    margin-top: .75rem
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary), #4F46E5);
    color: #fff;
    padding: .4rem .7rem;
    box-shadow: 0 4px 12px var(--primary-glow)
}

.btn--accent {
    background: linear-gradient(135deg, var(--accent), #059669);
    color: #fff;
    padding: .4rem .7rem;
    box-shadow: 0 4px 12px var(--accent-glow)
}

.btn--ghost {
    background: transparent;
    color: var(--text-muted);
    padding: .3rem .5rem
}

.btn--ghost:hover {
    background: rgba(99, 102, 241, .06);
    color: var(--text)
}

.btn--sm {
    font-size: .7rem;
    padding: .25rem .4rem
}

.hidden {
    display: none !important
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: .5rem .85rem;
    border-radius: var(--radius-sm);
    font-size: .78rem;
    font-weight: 500;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .4);
    opacity: 0;
    pointer-events: none;
    transition: all .4s cubic-bezier(.16, 1, .3, 1);
    z-index: 100
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
}

@media(max-width:700px) {
    .layout {
        grid-template-columns: 1fr
    }

    .header {
        padding: .7rem 1rem
    }

    .main {
        padding: 1rem
    }

    .stats-row {
        flex-wrap: wrap
    }
}