/* Data Entry Guide — Styles */
/* Follows service-price-cheat-sheet.css design system */

:root {
    --primary-green: #2e7d32;
    --bg-light: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.08);
    --stop-red: #dc2626;
    --stop-bg: #fef2f2;
    --stop-border: #fecaca;
    --start-green: #16a34a;
    --start-bg: #f0fdf4;
    --start-border: #bbf7d0;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.5;
}

.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* Header */
.header {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-left { flex: 1; }
.header-right {
    display: flex;
    gap: 8px;
    align-items: center;
}
.breadcrumb {
    font-size: 13px;
    color: var(--text-secondary);
}
.breadcrumb a {
    color: var(--primary-green);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 4px; }

.btn-print, .btn-link {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.btn-print:hover, .btn-link:hover { background: #f1f5f9; }

/* Page Title */
.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.page-title i { color: var(--primary-green); margin-right: 8px; }
.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Section Dividers */
.section-divider {
    font-size: 16px;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 8px;
    margin: 28px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-divider i { font-size: 18px; }

.stop-theme {
    background: var(--stop-bg);
    color: var(--stop-red);
    border: 1px solid var(--stop-border);
}
.start-theme {
    background: var(--start-bg);
    color: var(--start-green);
    border: 1px solid var(--start-border);
}
.ref-theme {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.checklist-theme {
    background: #fefce8;
    color: #a16207;
    border: 1px solid #fde68a;
}

/* Cards */
.ref-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    margin-bottom: 14px;
    overflow: hidden;
}
.ref-card-header {
    padding: 12px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ref-card-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.ref-card-header h2 i {
    color: var(--primary-green);
    font-size: 14px;
}
.ref-card-body {
    padding: 14px 18px;
}

/* Stop/Start number badges */
.stop-number, .start-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.stop-number {
    background: var(--stop-red);
    color: white;
}
.stop-header { border-left: 3px solid var(--stop-red); }

.start-number {
    background: var(--start-green);
    color: white;
}
.start-header { border-left: 3px solid var(--start-green); }

/* Content blocks */
.bad-example {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 10px;
}
.real-examples {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.real-examples ul {
    margin: 4px 0 0 18px;
    font-size: 12px;
}
.do-this {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #166534;
}
.do-this i { color: #16a34a; margin-right: 4px; }

.notes-list {
    margin: 6px 0 6px 18px;
    font-size: 13px;
}
.notes-list li { margin-bottom: 3px; }

.address-format {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 10px;
}
.address-format code {
    font-size: 13px;
    font-weight: 600;
}

/* Source badges */
.source-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.source-api { background: #dcfce7; color: #166534; }
.source-fallback { background: #fef3c7; color: #92400e; }

/* Tables */
.ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ref-table th {
    text-align: left;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    background: #fafbfc;
}
.ref-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.ref-table tbody tr:last-child td { border-bottom: none; }
.ref-table tbody tr:hover { background: #f8fafc; }

.price-col { text-align: right; font-weight: 600; color: var(--primary-green); }
.service-name { font-weight: 500; }
.pn-cell code, .ref-table code {
    font-size: 12px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    color: #475569;
}
.notes-cell { font-size: 12px; color: var(--text-secondary); }

.compact-table { max-width: 500px; }

.al-vs-fb-table { margin-top: 10px; }

/* Tier note */
.tier-note {
    margin-top: 12px;
    padding: 8px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 12px;
    color: #1e40af;
}
.tier-note i { margin-right: 6px; }
.tier-note a {
    color: #1d4ed8;
    font-weight: 600;
}

/* Loading & error states */
.loading-cell, .error-cell {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}
.error-cell {
    color: #991b1b;
    background: #fef2f2;
}

/* Checklist */
.checklist-card .ref-card-body { padding: 18px; }
.checklist-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.checklist-item:hover { background: #f8fafc; }
.checklist-item input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--primary-green);
    flex-shrink: 0;
}
.checklist-item input:checked + span {
    text-decoration: line-through;
    color: var(--text-secondary);
}

/* Alias intro */
.alias-intro {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Footer */
.page-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.page-footer a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
}
.page-footer a:hover { text-decoration: underline; }
.page-footer p + p { margin-top: 6px; }

/* ── Print styles ──────────────────────────────────────────────────── */
@media print {
    body { background: white; }
    .header, .btn-print, .btn-link, .page-footer { display: none; }

    .main-container {
        max-width: 100%;
        padding: 0;
    }

    .page-title {
        font-size: 18px;
        margin-bottom: 2px;
    }
    .page-subtitle {
        font-size: 11px;
        margin-bottom: 10px;
    }

    .section-divider {
        margin: 16px 0 10px;
        padding: 6px 12px;
        font-size: 14px;
        break-after: avoid;
    }

    .ref-card {
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 10px;
        break-inside: avoid;
    }
    .ref-card-header { background: #f0f0f0; padding: 8px 12px; }
    .ref-card-body { padding: 8px 12px; }

    .ref-table th, .ref-table td { padding: 4px 8px; font-size: 11px; }
    .bad-example, .do-this, .real-examples { font-size: 11px; padding: 6px 10px; }
    .tier-note { font-size: 10px; padding: 4px 8px; }
    .source-badge { font-size: 9px; }

    .checklist-item {
        padding: 4px 8px;
        font-size: 11px;
        border: 1px solid #ddd;
    }
    .checklist-item input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }

    /* Ensure checklist prints on one page if possible */
    .checklist-card { break-inside: avoid; }
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .header-container { flex-direction: column; gap: 8px; }
    .header-right { width: 100%; justify-content: flex-end; }
    .compact-table { max-width: 100%; }
}
