/* ScopeLock - Main Stylesheet */

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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --accent: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --bg: #f8fafc;
    --bg-white: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* NAV */
.nav {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { font-size: 1.3rem; font-weight: 800; text-decoration: none; color: var(--text); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary {
    background: var(--bg-white);
    color: var(--text);
    border: 2px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-nav {
    background: var(--primary);
    color: white !important;
    padding: 8px 20px;
    border-radius: 8px;
}
.btn-nav:hover { background: var(--primary-dark); }

/* BADGE */
.badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

/* HERO */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg) 100%);
}
.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.highlight { color: var(--primary); }
.hero-sub {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num { display: block; font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.9rem; color: var(--text-muted); }

/* PROBLEM */
.problem { padding: 60px 0; }
.problem h2 { text-align: center; font-size: 2rem; margin-bottom: 40px; }
.problem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.problem-card {
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
}
.problem-icon { font-size: 2.5rem; display: block; margin-bottom: 16px; }
.problem-card h3 { margin-bottom: 8px; }
.problem-card p { color: var(--text-muted); }

/* FEATURES */
.features { padding: 60px 0; background: var(--bg-white); }
.features h2 { text-align: center; font-size: 2rem; margin-bottom: 40px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.feature-card {
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
}
.feature-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* CALCULATOR */
.calculator { padding: 60px 0; text-align: center; }
.calculator h2 { font-size: 2rem; margin-bottom: 8px; }
.calc-sub { color: var(--text-muted); margin-bottom: 32px; }
.calc-form {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: left;
}
.calc-field { margin-bottom: 20px; }
.calc-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.calc-field input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}
.calc-field input:focus { outline: none; border-color: var(--primary); }
.calc-form .btn { width: 100%; text-align: center; }
.calc-result {
    max-width: 500px;
    margin: 24px auto 0;
    background: var(--primary-light);
    padding: 32px;
    border-radius: var(--radius);
    border: 2px solid var(--primary);
}
.calc-result-label { font-size: 1rem; color: var(--text-muted); }
.calc-result-amount { font-size: 3rem; font-weight: 800; color: var(--primary); margin: 8px 0; }
.calc-result-note { color: var(--text); font-weight: 600; }

/* PRICING */
.pricing { padding: 60px 0; background: var(--bg-white); }
.pricing h2 { text-align: center; font-size: 2rem; margin-bottom: 40px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 900px; margin: 0 auto; }
.pricing-card {
    background: var(--bg);
    padding: 32px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    text-align: center;
    position: relative;
}
.pricing-card.featured {
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
}
.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.pricing-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.price { font-size: 2.5rem; font-weight: 800; margin-bottom: 20px; }
.price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-card ul { list-style: none; margin-bottom: 24px; text-align: left; }
.pricing-card li { padding: 6px 0; font-size: 0.95rem; }
.pricing-card .btn { width: 100%; text-align: center; }

/* FOOTER */
.footer { padding: 40px 0; text-align: center; color: var(--text-muted); border-top: 1px solid var(--border); }
.footer-note { font-size: 0.85rem; margin-top: 8px; }

/* APP */
.app-container { display: flex; min-height: calc(100vh - 57px); }
.app-sidebar {
    width: 240px;
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
}
.app-logo { font-size: 1.2rem; font-weight: 800; margin-bottom: 24px; padding: 0 8px; }
.app-nav { flex: 1; }
.app-nav-btn {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-weight: 500;
}
.app-nav-btn:hover { background: var(--bg); color: var(--text); }
.app-nav-btn.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.btn-back { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.btn-back:hover { color: var(--primary); }

.app-main { flex: 1; padding: 32px; overflow-y: auto; }
.app-tab { display: none; }
.app-tab.active { display: block; }
.app-tab h2 { margin-bottom: 24px; }

/* APP FORM */
.app-form { max-width: 600px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* PROJECTS LIST */
.projects-list { display: grid; gap: 16px; }
.project-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.project-card h3 { margin-bottom: 4px; }
.project-meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 12px; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}
.tag-deliverable { background: #d1fae5; color: #065f46; }
.tag-exclusion { background: #fee2e2; color: #991b1b; }
.tag-request { background: #fef3c7; color: #92400e; }
.project-actions { margin-top: 12px; display: flex; gap: 8px; }
.project-actions button {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    cursor: pointer;
    font-size: 0.85rem;
}
.project-actions button:hover { border-color: var(--primary); color: var(--primary); }
.project-actions .btn-delete { color: var(--danger); }
.project-actions .btn-delete:hover { border-color: var(--danger); }

/* REQUESTS LIST */
.requests-list { margin-top: 24px; }
.request-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}
.request-card h4 { margin-bottom: 4px; }
.request-card .request-meta { color: var(--text-muted); font-size: 0.85rem; }
.request-cost { font-weight: 700; color: var(--danger); }

/* DASHBOARD */
.dashboard-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.dash-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.dash-card.warning { border-color: var(--danger); }
.dash-num { display: block; font-size: 2rem; font-weight: 800; color: var(--primary); }
.dash-card.warning .dash-num { color: var(--danger); }
.dash-label { font-size: 0.9rem; color: var(--text-muted); }
.dash-breakdown { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.dash-project { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.dash-project:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.dash-project h4 { margin-bottom: 8px; }
.dash-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin: 8px 0; }
.dash-bar-fill { height: 100%; background: var(--primary); border-radius: 4px; }
.dash-bar-fill.warning { background: var(--accent); }
.dash-bar-fill.danger { background: var(--danger); }

.empty-state { color: var(--text-muted); text-align: center; padding: 40px 20px; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero-stats { gap: 24px; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
    .app-container { flex-direction: column; }
    .app-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: 16px; }
    .app-nav { display: flex; flex-wrap: wrap; gap: 4px; }
    .app-nav-btn { width: auto; padding: 8px 12px; }
    .app-main { padding: 20px; }
}
