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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
    --urgent: #dc2626;
    --success: #16a34a;
}

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

/* Navigation */
nav {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Hero Section */
.hero {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    margin-bottom: 3rem;
}

.cta-subtext {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Demo Preview */
.demo-preview {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    color: var(--text);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.demo-input, .demo-output {
    padding: 1.5rem;
    margin: 1rem 0;
}

.demo-input {
    background: var(--bg-light);
    border-radius: 0.5rem;
}

.demo-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.demo-text {
    font-family: monospace;
    color: var(--text);
}

.demo-arrow {
    text-align: center;
    font-size: 1.5rem;
    margin: 1rem 0;
}

.work-order-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: left;
}

.wo-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.wo-meta {
    display: flex;
    gap: 0.5rem;
}

.wo-category, .wo-priority {
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.wo-category {
    background: var(--bg-light);
}

.wo-priority.urgent {
    background: #fee2e2;
    color: var(--urgent);
}

/* Features Section */
.features {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    text-align: center;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-light);
}

/* How It Works */
.how-it-works {
    padding: 4rem 2rem;
    background: var(--bg-light);
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.steps {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.step {
    flex: 1;
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
}

.step-arrow {
    font-size: 2rem;
    color: var(--primary);
}

/* CTA Section */
.cta-section {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--primary);
    color: white;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary);
}

.cta-section .btn-primary:hover {
    background: var(--bg-light);
}

.cta-section .cta-subtext {
    margin-top: 1rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background: var(--text);
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .steps {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .nav-links {
        gap: 1rem;
    }
}

/* ============================================ */
/* DEMO PAGE STYLES */
/* ============================================ */

.demo-page {
    background: #f8fafc;
    min-height: 100vh;
}

.demo-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.demo-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.demo-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.demo-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.demo-intro h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.demo-intro p {
    font-size: 1.25rem;
    color: var(--text-light);
}

/* Input Section */
.demo-input-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    gap: 1rem;
}

.input-group input {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-group button {
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.input-group button:hover {
    background: var(--primary-dark);
}

.input-group button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.input-hint {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
}

/* Work Orders Section */
.demo-work-orders {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.work-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.work-orders-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--primary-dark);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Work Order Cards */
.work-orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.work-order-card {
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s;
}

.work-order-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.wo-header {
    margin-bottom: 0.75rem;
}

.wo-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
}

.wo-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.wo-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.wo-badge.category.hvac { background: #dbeafe; color: #1e40af; }
.wo-badge.category.plumbing { background: #dbeafe; color: #0369a1; }
.wo-badge.category.electrical { background: #fef3c7; color: #92400e; }
.wo-badge.category.maintenance { background: #e5e7eb; color: #374151; }
.wo-badge.category.cleaning { background: #f3e8ff; color: #6b21a8; }
.wo-badge.category.landscaping { background: #d1fae5; color: #065f46; }
.wo-badge.category.security { background: #fee2e2; color: #991b1b; }
.wo-badge.category.pest { background: #fef3c7; color: #78350f; }
.wo-badge.category.other { background: #f1f5f9; color: #475569; }

.wo-badge.priority.emergency { background: #fee2e2; color: #991b1b; }
.wo-badge.priority.high { background: #fed7aa; color: #9a3412; }
.wo-badge.priority.normal { background: #dbeafe; color: #1e40af; }
.wo-badge.priority.low { background: #f1f5f9; color: #64748b; }

.wo-time {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-left: auto;
}

.wo-original {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.wo-original small {
    color: var(--text-light);
    font-style: italic;
}

/* Signup Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.demo-preview {
    background: var(--bg-light);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 2rem;
    max-height: 300px;
    overflow-y: auto;
}

.wo-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.wo-preview-item:last-child {
    margin-bottom: 0;
}

.wo-preview-title {
    font-weight: 500;
    flex: 1;
}

.wo-preview-badges {
    display: flex;
    gap: 0.25rem;
}

.wo-badge-small {
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Demo Page Responsive */
@media (max-width: 768px) {
    .demo-intro h1 {
        font-size: 1.75rem;
    }

    .input-group {
        flex-direction: column;
    }

    .demo-container {
        padding: 1rem;
    }
}
