/* =========================================================
   AnalyzerSales — app-level styles
   Layered on top of the Radzen base theme.
   Brand colors come from --rz-primary set in App.razor.
   ========================================================= */

html, body { margin: 0; padding: 0; height: 100%; 
             font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;

}

/* ---- Shell ---- */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f6f7f9;
}
.app-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 32px;
}

/* ---- Floating header ---- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 12px 32px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.app-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.app-header-logo { height: 32px; width: auto; }
.app-header-customer { font-size: 14px; font-weight: 600; color: #111827; }
.app-header-product  { font-size: 12px; color: #6b7280; }
.app-header-progress { display: flex; justify-content: center; }
.app-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}
.app-header-session { font-size: 13px; color: #6b7280; }

/* ---- Progress stepper ---- */
.progress-steps {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}
.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
}
.progress-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    font-size: 12px;
    background: #e5e7eb;
    color: #6b7280;
}
.progress-step.done .progress-step-number,
.progress-step.current .progress-step-number {
    background: var(--rz-primary);
    color: #fff;
}
.progress-step.current { background: rgba(15, 110, 86, 0.08); }
.progress-step.future .progress-step-label { color: #9ca3af; }

/* ---- Tool selector ---- */
.tool-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
    padding: 32px 0;
}
.tool-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.tool-card h2 { margin: 0 0 4px; font-size: 22px; font-weight: 600; }
.tool-card-tagline { color: var(--rz-primary); font-size: 14px; margin: 0 0 16px; }
.tool-card-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center; justify-content: center;
    color: #fff;
    margin-bottom: 16px;
}
.tool-card-icon-blue { background: #2563eb; }
.tool-card-icon-teal { background: #0f9b8e; }
.tool-card ul { padding-left: 20px; color: #374151; }
.tool-card li::marker { color: var(--rz-primary); }

/* =========================================================
   Admin area
   ========================================================= */
.app-header-admin-link { font-size: 13px; }

.admin-subtitle { color: #6b7280; margin: 0 0 24px; }

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.admin-area-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.admin-area-card:hover { border-color: var(--rz-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.admin-area-card .rz-icon { font-size: 28px; color: var(--rz-primary); }
.admin-area-card h3 { margin: 12px 0 4px; font-size: 18px; }
.admin-area-card p  { margin: 0; color: #6b7280; font-size: 13px; }

.admin-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: #6b7280; margin-bottom: 8px;
}
.admin-breadcrumb-sep { color: #d1d5db; }
.admin-breadcrumb-current { color: #111827; font-weight: 500; }

.admin-page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.admin-form-actions {
    display: flex; gap: 12px; margin-top: 24px;
    padding-top: 16px; border-top: 1px solid #e5e7eb;
}
.admin-section-title { font-size: 16px; margin: 32px 0 4px; }
.admin-section-hint  { color: #6b7280; font-size: 13px; margin: 0 0 12px; }

.admin-test-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 4px 16px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    background: #fafafa;
}
.admin-test-checkbox {
    display: grid;
    grid-template-columns: 18px 80px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.admin-test-checkbox:hover { background: #fff; }
.admin-test-cpt   { color: #6b7280; font-family: ui-monospace, monospace; }
.admin-test-rate  { color: #6b7280; font-variant-numeric: tabular-nums; }

.admin-add-user {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px; padding: 12px;
    background: #f9fafb; border-radius: 8px;
}

.admin-import-summary { display: flex; gap: 8px; margin: 16px 0; }
.admin-import-summary .badge {
    padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
}
.admin-import-summary .badge.new       { background: #dcfce7; color: #166534; }
.admin-import-summary .badge.update    { background: #dbeafe; color: #1e40af; }
.admin-import-summary .badge.unchanged { background: #f3f4f6; color: #6b7280; }
.admin-import-summary .badge.invalid   { background: #fee2e2; color: #991b1b; }

.admin-code-sample {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
    overflow-x: auto;
    margin: 12px 0;
}

/* =========================================================
   Tool 1: Sending Out
   ========================================================= */

/* Page header used by all tool pages */
.page-header { margin-bottom: 1.5rem; }
.page-eyebrow { font-size: 13px; color: #6b7280; margin: 0 0 4px; text-transform: none; }
.page-header h1 { font-size: 24px; font-weight: 500; margin: 0 0 4px; }
.page-subtitle { font-size: 14px; color: #4b5563; margin: 0; }

/* Generic card primitive used across the tool */
.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.card-label { font-size: 13px; color: #6b7280; margin: 0 0 10px; }
.card-hint  { font-size: 12px; color: #9ca3af; margin: 8px 0 0; }

/* Session bar */
.session-bar {
    display: flex; align-items: center; gap: 12px;
    background: #f3f4f6; border-radius: 12px;
    padding: 10px 16px; margin-bottom: 1.5rem;
}
.session-bar-label { font-size: 13px; color: #6b7280; }

/* Modal (used by SessionBar's Load dialog — simple inline modal, not a Radzen Dialog) */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal {
    background: #fff; border-radius: 12px; padding: 20px 24px;
    min-width: 360px; max-width: 480px; max-height: 70vh; overflow-y: auto;
}
.modal h3 { margin: 0 0 12px; }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.session-list { list-style: none; padding: 0; margin: 0; }
.session-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; border-radius: 8px; cursor: pointer;
}
.session-list li:hover { background: #f3f4f6; }
.session-list-date { font-size: 12px; color: #9ca3af; }

/* Top inputs row: CLIA + period side-by-side */
.tool1-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 720px) {
    .tool1-inputs { grid-template-columns: 1fr; }
}

/* Volume grid */
.volume-grid-header {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 12px;
}
.volume-grid-header .card-label,
.volume-grid-header .card-hint { margin: 0; }

.volume-group { margin-bottom: 14px; }
.volume-group-label {
    background-color: green; 
    font-size: 16px; color: white; margin: 0 0 8px;
    padding: 4px 4px 4px 14px; border-bottom: 1px solid #f3f4f6;
    border-radius: 5px;
}
.volume-group-label-sexual-health {
    background-color: deeppink;
    opacity: 0.5;
}
.volume-group-label-gastrointestinal {
    background-color: sandybrown;
    opacity: 0.5;
}
.volume-group-label-cardiometabolic {
    background-color: red;
    opacity: 0.5;
}
.volume-group-label-general-health {
    background-color: lightseagreen;
    opacity: 0.5;
}
.volume-group-label-respiratory {
    background-color: cadetblue;
    opacity: 0.5;
}
.volume-group-label-chemistry {
    background-color: darkorange;
    opacity: 0.5;
    
}

    .volume-rows {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 14px 24px;
    }
.volume-row {
    display: flex; align-items: center; gap: 12px;
    padding: 4px 0; font-size: 14px;
}
.volume-row span { flex: 1 1 auto; }

/* Recommendations */
.recommendations-header {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-top: 24px; margin-bottom: 12px;
}
.recommendations-header h2 { margin: 0; font-size: 18px; font-weight: 500; }
.recommendations-loading {
    display: flex; align-items: center; gap: 12px;
    padding: 24px; color: #6b7280;
}
.empty-state {
    padding: 32px; text-align: center; color: #9ca3af;
    background: #fafafa; border-radius: 12px; border: 1px dashed #e5e7eb;
}

.recommendation-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}
.recommendation-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 16px; position: relative;
}
.recommendation-card.best-fit { border: 2px solid var(--rz-primary); }

.best-fit-badge, .below-min-badge {
    display: inline-block; font-size: 11px; padding: 3px 10px;
    border-radius: 999px; margin-bottom: 10px; font-weight: 500;
}
.best-fit-badge { background: rgba(15, 110, 86, 0.1); color: var(--rz-primary); }
.below-min-badge { background: #fef3c7; color: #92400e; }

.recommendation-card h3 { margin: 0 0 2px; font-size: 16px; font-weight: 500; }

.profile-grid {
    display: grid; grid-template-columns: 1fr auto;
    gap: 6px 12px; font-size: 13px;
    margin: 12px 0;
}
.profile-grid dt { color: #6b7280; margin: 0; }
.profile-grid dd { margin: 0; font-weight: 500; text-align: right; }

.reimbursement-block {
    background: #f9fafb; border-radius: 8px;
    padding: 10px 12px; margin: 12px 0;
}
.reimbursement-row { display: flex; gap: 16px; }
.reimbursement-label { font-size: 11px; color: #9ca3af; margin: 0; }
.reimbursement-value { font-size: 16px; font-weight: 500; margin: 0; font-variant-numeric: tabular-nums; }

/* =========================================================
   Tool 2: Upgrading Technology
   ========================================================= */

.section-heading { font-size: 18px; font-weight: 500; margin: 0 0 16px; }

/* Picker */
.analyzer-picker-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.analyzer-pick-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.analyzer-pick-card:hover {
    border-color: var(--rz-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.analyzer-pick-card:active { transform: translateY(1px); }
.analyzer-pick-card h3 { margin: 0 0 2px; font-size: 17px; font-weight: 500; }
.analyzer-blurb { color: #4b5563; font-size: 13px; margin: 12px 0; line-height: 1.45; }

/* Selected analyzer banner */
.selected-analyzer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Margin summary card */
.margin-summary {
    background: linear-gradient(135deg, #fff 0%, #f9fafb 100%);
}
.margin-summary-title {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin: 0 0 12px;
    text-transform: none;
}
.margin-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.summary-stat {
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
}
.summary-stat.highlight {
    background: var(--rz-primary);
    border-color: var(--rz-primary);
}
.summary-stat.highlight .summary-label,
.summary-stat.highlight .summary-value { color: #fff; }
.summary-label {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.summary-value {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    font-variant-numeric: tabular-nums;
}
.summary-value.positive { color: var(--rz-primary); }
.summary-value.negative { color: #dc2626; }
.summary-stat.highlight .summary-value.positive,
.summary-stat.highlight .summary-value.negative { color: #fff; }

@media (max-width: 720px) {
    .margin-summary-grid { grid-template-columns: 1fr; }
}

/* Margin grid table */
.margin-grid-card { padding: 16px 20px; }
.margin-grid-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}
.margin-grid-header .card-label,
.margin-grid-header .card-hint { margin: 0; }

.margin-table-scroll { overflow-x: auto; }
.margin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.margin-table th {
    text-align: right;
    font-weight: 500;
    color: #6b7280;
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
.margin-table th.text-left { text-align: left; }
.margin-table th.num       { text-align: right; }
.margin-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}
.margin-table td.num   { text-align: right; font-variant-numeric: tabular-nums; }
.margin-table td.mono  { font-family: ui-monospace, monospace; color: #6b7280; }
.margin-table td.positive { color: var(--rz-primary); font-weight: 500; }
.margin-table td.negative { color: #dc2626; font-weight: 500; }
