@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap');
:root {
    --primary: #006c49;
    --primary-dark: #005238;
    --bg: #f8f9ff;
    --text: #0b1c30;
    --muted: #45464d;
    --card: #ffffff;
    --border: #c6c6cd;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
}

.hero {
    padding: 100px 0 80px;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.lead {
    font-size: 18px;
    color: var(--muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid var(--primary);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary-dark);
}

.btn-outline:hover {
    background: rgba(0, 108, 73, 0.08);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.features, .how-it-works {
    padding: 80px 0;
}

.features h2, .how-it-works h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 48px;
}

.grid {
    display: grid;
    gap: 24px;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card h3 {
    margin-top: 0;
    color: var(--primary-dark);
}

.step {
    text-align: center;
}

.step-num {
    width: 48px;
    height: 48px;
    line-height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    margin: 0 auto 16px;
}

.footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 30px 0;
    text-align: center;
    color: var(--muted);
}

/* Auth & Dashboard */
.auth-page, .dashboard-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-box {
    max-width: 420px;
    margin: 80px auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 36px;
}

.auth-box h1 {
    margin-top: 0;
    text-align: center;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}

.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: #ffdad6;
    color: #ba1a1a;
}

.alert-success {
    background: rgba(0, 108, 73, 0.10);
    color: #006c49;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--muted);
}

.mt-2 {
    margin-top: 16px;
}

/* Dashboard */
.dashboard {
    padding: 40px 0;
    flex: 1;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 12px;
}

.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.project-card h3 {
    margin: 0 0 8px;
}

.project-meta {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.report-list {
    margin-top: 16px;
}

.report-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.report-item:last-child {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-ready {
    background: rgba(0, 108, 73, 0.10);
    color: #006c49;
}

.badge-pending {
    background: #f7eedb;
    color: #7a5a14;
}

.badge-error {
    background: #ffdad6;
    color: #ba1a1a;
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 40px 0;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card);
    border-radius: 12px;
    padding: 28px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal h2 {
    margin-top: 0;
}

.modal-close {
    float: right;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--muted);
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.tab {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 600;
}

.tab.active {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-danger {
    background: #ef4444;
    border-color: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.modal-wide {
    max-width: 720px;
}

.inline-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.inline-form input, .inline-form textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}

.inline-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    background: var(--bg);
}

.list-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.checklist-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 14px;
    background: var(--bg);
}

.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.checklist-header h4 {
    margin: 0;
}

.checklist-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}
/* appended integration styles */
.integration-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
    background: #f8f9ff;
}
.integration-card h4 {
    margin: 0 0 8px;
    color: var(--primary-dark);
}
.integration-card p {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--muted);
}
.hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}
.hint code {
    background: #e5eeff;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 12px;
}
.help-link {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 14px;
}
