/* Shared RatioLens / Fin Analyser results UI */
* { margin: 0; padding: 0; box-sizing: border-box; }
body.fin-analyser-body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f9fafb; }
.container { max-width: 1280px; margin: 0 auto; padding: 2rem; }
.header { text-align: center; margin-bottom: 2rem; }
.header h1 { font-size: 2.25rem; font-weight: 800; color: #111827; margin-bottom: 0.5rem; }
.header p { color: #6b7280; font-size: 1rem; }
.header .subtitle { color: #2563eb; font-size: 0.875rem; font-weight: 500; margin-top: 0.5rem; }
.card { background: white; border-radius: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 2rem; }
.btn { padding: 1rem 1.5rem; border-radius: 0.5rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: #2563eb; color: white; width: 100%; font-size: 1rem; }
.btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.btn-primary:disabled { background: #d1d5db; cursor: not-allowed; }
.btn-secondary { background: #2563eb; color: white; }
.btn-secondary:hover { background: #1d4ed8; }
.alert { padding: 1rem; border-radius: 0.5rem; margin-bottom: 1.5rem; display: flex; gap: 0.75rem; align-items: start; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
select { width: 100%; padding: 0.75rem; border: 1px solid #d1d5db; border-radius: 0.5rem; font-size: 1rem; }
select:focus { outline: none; border-color: #2563eb; }
.label { display: block; font-weight: 600; color: #374151; margin-bottom: 0.75rem; font-size: 0.875rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.stat-card { padding: 1.5rem; border-radius: 1rem; }
.stat-card h3 { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }
.stat-card .value { font-size: 2.5rem; font-weight: 800; }
.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tab { padding: 0.5rem 1rem; border-radius: 0.5rem; font-weight: 500; cursor: pointer; background: #f3f4f6; color: #374151; border: none; }
.tab:hover { background: #e5e7eb; }
.tab.active { background: #111827; color: white; }
table { width: 100%; border-collapse: collapse; }
th { background: #f9fafb; padding: 1rem 1.5rem; text-align: left; font-size: 0.875rem; font-weight: 600; color: #374151; border-bottom: 1px solid #e5e7eb; }
td { padding: 1rem 1.5rem; border-bottom: 1px solid #f3f4f6; font-size: 0.875rem; }
tr:hover { background: #f9fafb; }
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 500; }
.badge-strong { background: #064e3b; color: #d1fae5; }
.badge-acceptable { background: #dcfce7; color: #166534; }
.badge-stable { background: #fed7aa; color: #9a3412; }
.badge-caution { background: #fef3c7; color: #92400e; }
.badge-risk { background: #fee2e2; color: #991b1b; }
.badge-na { background: #f3f4f6; color: #6b7280; }
.badge-safe { background: #dcfce7; color: #166534; }
.spinner { width: 1.25rem; height: 1.25rem; border: 2px solid #e5e7eb; border-top-color: #2563eb; border-radius: 50%; animation: finSpin 1s linear infinite; }
@keyframes finSpin { to { transform: rotate(360deg); } }
.info-box { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 0.5rem; padding: 1rem; }
.info-box h4 { font-weight: 600; color: #1e3a8a; margin-bottom: 0.5rem; }
.info-box p { color: #1e40af; font-size: 0.875rem; margin: 0.25rem 0; }
.text-center { text-align: center; }
.overflow-auto { overflow-x: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.text-xs { font-size: 0.75rem; }
.text-gray { color: #6b7280; }
.font-mono { font-family: 'Courier New', monospace; }
.link { color: #2563eb; text-decoration: underline; }
