/* style.css - BridgeForge Premium Design System */

:root {
    --bg-main: #0b0f19;
    --bg-sidebar: #0f1626;
    --panel-bg: rgba(20, 30, 54, 0.6);
    --panel-border: rgba(255, 255, 255, 0.07);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-indigo: #6366f1;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    
    --gradient-primary: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    --gradient-glow: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
    --glow-shadow: 0 0 30px rgba(139, 92, 246, 0.25);
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.logo-area {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.logo-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    filter: blur(15px);
    opacity: 0.6;
    border-radius: 50%;
    z-index: 1;
}

.logo-icon {
    font-size: 1.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: 2;
    font-weight: 800;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    z-index: 2;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    text-align: left;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-smooth);
}

.nav-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    color: var(--text-primary);
    background: var(--gradient-glow);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
}

.btn-icon {
    font-size: 1.2rem;
}

.sidebar-footer {
    border-top: 1px solid var(--panel-border);
    padding-top: 1.5rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: var(--glow-shadow);
}

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

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-status {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    font-weight: 500;
}

/* Workspace Area */
.workspace {
    margin-left: 280px;
    flex-grow: 1;
    padding: 3rem;
    min-height: 100vh;
}

.workspace-header {
    margin-bottom: 2.5rem;
}

.workspace-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.75px;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Glass Panel Style */
.glass-panel {
    background-color: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Tabs Toggle */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

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

/* Playbooks Grid */
.playbooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.playbook-card {
    background-color: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.playbook-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.15);
}

.playbook-card.active-playbook {
    border-color: rgba(139, 92, 246, 0.35);
    background: linear-gradient(180deg, rgba(20, 30, 54, 0.6) 0%, rgba(30, 41, 74, 0.8) 100%);
}

.playbook-card.active-playbook::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
}

.playbook-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-purple);
}

.playbook-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.25px;
}

.playbook-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex-grow: 1;
}

.playbook-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.stat-item {
    display: flex;
    gap: 0.4rem;
}

.stat-item .label {
    color: var(--text-muted);
}

.stat-item .val {
    font-weight: 600;
}

.action-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    text-align: center;
}

.action-btn:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    box-shadow: var(--glow-shadow);
}

/* Campaign Panel Stylings */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
}

.live-badge {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.campaign-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.campaign-info-block h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.campaign-info-block ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.campaign-info-block li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.campaign-info-block li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-purple);
    font-weight: bold;
}

.target-quick-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.target-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.target-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.target-email {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.load-target-btn {
    background-color: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-indigo);
    font-family: var(--font-sans);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.load-target-btn:hover {
    background-color: var(--accent-indigo);
    color: white;
}

/* Split Column Layouts */
.workspace-split {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    background: rgba(15, 22, 38, 0.8);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    padding: 0.85rem;
    color: white;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

.submit-btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-family: var(--font-sans);
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    font-size: 1rem;
    box-shadow: var(--glow-shadow);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.4);
}

/* Scanner Logs Simulation */
.scanner-container {
    margin-top: 1.5rem;
    background: #060913;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.8rem;
    display: none;
    position: relative;
    overflow: hidden;
}

.scanning-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    animation: scanPulse 1.5s infinite;
}

@keyframes scanPulse {
    0% { transform: translateY(0); }
    50% { transform: translateY(120px); }
    100% { transform: translateY(0); }
}

.scanner-logs {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 120px;
    overflow-y: auto;
}

.scanner-logs li {
    color: #38bdf8;
}

.scanner-logs li.success {
    color: #4ade80;
}

.scanner-logs li.warning {
    color: #fbbf24;
}

/* Blueprint Outputs & Placeholders */
.blueprint-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    min-height: 350px;
    gap: 1rem;
}

.blueprint-placeholder .icon {
    font-size: 3rem;
    opacity: 0.5;
}

.blueprint-content {
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.blueprint-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
}

.blueprint-content h3 {
    font-size: 1.15rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--accent-purple);
}

.blueprint-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.blueprint-content ul {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.blueprint-content li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.flow-chart-box {
    background: #090e1a;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    font-family: var(--font-sans);
}

.flow-node {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.flow-node:last-child {
    margin-bottom: 0;
}

.flow-node .tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.flow-node .tag.trigger { background-color: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.flow-node .tag.logic { background-color: rgba(245, 158, 11, 0.15); color: var(--accent-yellow); }
.flow-node .tag.action { background-color: rgba(16, 185, 129, 0.15); color: var(--accent-green); }

.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-family: var(--font-sans);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.copy-btn:hover {
    background-color: white;
    color: black;
}

/* Pitch Builder Styles */
.info-notice {
    background-color: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--accent-indigo);
    padding: 1.25rem;
    border-radius: 0 12px 12px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pitch-container {
    background: #090e1a;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 1.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-primary);
    white-space: pre-line;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
}

/* Calculator grid and items */
.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.slider-group {
    margin-bottom: 2rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.slider-header label {
    font-size: 0.95rem;
    font-weight: 600;
}

.slider-value {
    font-weight: 700;
    color: var(--accent-cyan);
}

.slider-group input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-purple);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    transition: var(--transition-smooth);
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.metrics-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    text-align: center;
}

.m-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.m-val {
    font-size: 1.75rem;
    font-weight: 800;
    display: block;
}

.m-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.margin-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.margin-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.calculator-insights h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.calculator-insights ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calculator-insights li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.calculator-insights li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
}

/* Legal Vault Styles */
.legal-doc-selectors {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.doc-select-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    padding: 1rem;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.doc-select-btn:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: white;
}

.doc-select-btn.active {
    background-color: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
}

.legal-text-box {
    background: #090e1a;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 1.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    min-height: 380px;
    max-height: 520px;
    overflow-y: auto;
    line-height: 1.5;
}

/* Helper Utilities */
.text-green { color: var(--accent-green) !important; }
.text-blue { color: var(--accent-indigo) !important; }
.text-yellow { color: var(--accent-yellow) !important; }
.text-red { color: var(--accent-red) !important; }
.text-indigo { color: var(--accent-indigo) !important; }
.text-cyan { color: var(--accent-cyan) !important; }

/* Responsive styles */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--panel-border);
        padding: 1.5rem;
    }
    .logo-area {
        margin-bottom: 1.5rem;
    }
    .nav-links {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    .nav-btn {
        white-space: nowrap;
        padding: 0.6rem 1rem;
    }
    .workspace {
        margin-left: 0;
        padding: 2rem;
    }
    .workspace-split,
    .calc-grid,
    .campaign-detail-grid {
        grid-template-columns: 1fr;
    }
}
