/* Groundlayer — Minimal, functional CSS */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* Nav */
.navbar { background: #1e40af; color: white; padding: 12px 0; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { color: white; text-decoration: none; font-size: 1.25rem; font-weight: 700; }
.nav-links a { color: rgba(255,255,255,0.9); text-decoration: none; margin-left: 20px; font-size: 0.9rem; }
.nav-links a:hover { color: white; }

/* Flash messages */
.flash { padding: 12px 16px; border-radius: 6px; margin: 16px 0; font-size: 0.9rem; }
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flash-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* Main content */
main { flex: 1; padding: 32px 0; }

/* Forms */
.form-card {
    background: white;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 480px;
    margin: 0 auto;
}
.form-card h1, .form-card h2 { margin-bottom: 24px; font-size: 1.5rem; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 0.9rem; }
.form-group input, .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}
.btn:hover { background: #1d4ed8; }
.btn-full { width: 100%; text-align: center; }
.btn-secondary { background: #64748b; }
.btn-secondary:hover { background: #475569; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }

/* Dashboard */
.dashboard-header { margin-bottom: 24px; }
.dashboard-header h1 { font-size: 1.5rem; }
.dashboard-header p { color: #64748b; }

.card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.card h2 { font-size: 1.1rem; margin-bottom: 12px; }

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-active { background: #dcfce7; color: #166534; }
.status-inactive { background: #fef2f2; color: #991b1b; }
.status-trialling { background: #eff6ff; color: #1e40af; }

.app-list { list-style: none; }
.app-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}
.app-list li:last-child { border-bottom: none; }
.app-ref { font-weight: 600; color: #1e40af; }
.app-desc { font-size: 0.9rem; color: #475569; margin-top: 2px; }
.app-meta { font-size: 0.8rem; color: #94a3b8; margin-top: 2px; }

/* Landing page */
.hero {
    text-align: center;
    padding: 60px 0 40px;
}
.hero h1 { font-size: 2.2rem; margin-bottom: 16px; color: #0f172a; }
.hero p { font-size: 1.15rem; color: #475569; max-width: 560px; margin: 0 auto 32px; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 40px 0;
}
.feature {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.feature h3 { margin-bottom: 8px; font-size: 1rem; }
.feature p { font-size: 0.9rem; color: #64748b; }

/* Pricing grid — 3-tier */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 32px 0 48px;
    align-items: start;
}
@media (max-width: 700px) {
    .pricing-grid { grid-template-columns: 1fr; max-width: 380px; margin-left: auto; margin-right: auto; }
}
.pricing-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px 24px;
    text-align: center;
    position: relative;
}
.pricing-card-featured {
    border: 2px solid #2563eb;
    box-shadow: 0 4px 12px rgba(37,99,235,0.15);
}
.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 14px;
    border-radius: 99px;
}
.pricing-card-header h3 { font-size: 1.15rem; margin-bottom: 8px; }
.pricing-card .price { font-size: 2.2rem; font-weight: 700; color: #1e40af; }
.pricing-card .period { font-size: 0.9rem; color: #64748b; margin-bottom: 16px; }
.pricing-features { list-style: none; text-align: left; margin: 16px 0 24px; }
.pricing-features li { padding: 5px 0; font-size: 0.9rem; }
.pricing-features li::before { content: "\2713 "; color: #16a34a; font-weight: 700; }

/* Comparison table */
.comparison-table-wrapper { overflow-x: auto; margin: 0 0 48px; }
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-size: 0.9rem;
}
.comparison-table th, .comparison-table td {
    padding: 10px 16px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}
.comparison-table th { background: #f8fafc; font-weight: 600; }
.comparison-table td:first-child, .comparison-table th:first-child { text-align: left; }

/* Plan selector on signup */
.plan-selector { display: flex; gap: 10px; margin-bottom: 20px; }
.plan-option {
    flex: 1;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
    transition: border-color 0.15s;
}
.plan-option input { display: none; }
.plan-option:hover { border-color: #93c5fd; }
.plan-selected { border-color: #2563eb; background: #eff6ff; }
.plan-option-inner strong { display: block; font-size: 0.95rem; }
.plan-price { display: block; font-size: 0.85rem; color: #1e40af; font-weight: 600; margin: 4px 0 2px; }
.plan-detail { display: block; font-size: 0.75rem; color: #64748b; }

.faq { margin: 40px 0; }
.faq h2 { text-align: center; margin-bottom: 24px; }
.faq-item { margin-bottom: 16px; }
.faq-item h3 { font-size: 1rem; margin-bottom: 4px; }
.faq-item p { font-size: 0.9rem; color: #64748b; }

/* Footer */
.footer { padding: 20px 0; text-align: center; font-size: 0.8rem; color: #94a3b8; border-top: 1px solid #e2e8f0; margin-top: auto; }
.footer a { color: #64748b; }

/* Utility */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
