/* Service Price Cheat Sheet — Styles */

: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);
}

* { 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;
}
.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 {
    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;
}
.btn-print: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;
}

/* Cards */
.ref-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.ref-card-header {
    padding: 14px 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: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.ref-card-header h2 i {
    color: var(--primary-green);
    margin-right: 8px;
    font-size: 14px;
}
.ref-card-body {
    padding: 16px 18px;
}

/* 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 {
    font-size: 12px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    color: #475569;
}
.notes-cell { font-size: 12px; color: var(--text-secondary); }

/* Tier tables side-by-side */
.tier-tables-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.tier-table-wrap h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tier-table { max-width: 100%; }

.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; }

/* 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;
}
.error-cell i { margin-right: 6px; }

/* 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);
}

/* ── Print styles ────────────────────────────────────────────────────────── */
@media print {
    body { background: white; }
    .header, .btn-print, .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: 14px;
    }

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

    .ref-table th, .ref-table td { padding: 5px 8px; font-size: 11px; }
    .tier-note { font-size: 10px; padding: 6px 10px; }
    .source-badge { font-size: 9px; }

    .tier-tables-row { gap: 12px; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .tier-tables-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .header-container { flex-direction: column; gap: 8px; }
}
