/**
 * Financial Architect — Financial Model Studio Styles (fa-financial-model.css)
 * Version: 1.7.0
 */

/* ── Wrap ──────────────────────────────────────────────────────────────────── */
.fmm-wrap { display: flex; flex-direction: column; gap: 16px; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.fmm-header {
	display: flex; align-items: center; justify-content: space-between;
	gap: 14px; flex-wrap: wrap;
}
.fmm-title    { font-size: 18px; font-weight: 800; color: var(--fa-navy); margin: 0 0 2px; }
.fmm-subtitle { font-size: 11px; color: var(--fa-text-muted); margin: 0; font-style: italic; max-width: 500px; line-height: 1.4; }
.fmm-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.fmm-label-input { width: 200px; font-size: 13px; }

.fmm-locked-pill {
	background: var(--fa-navy); color: #fff;
	border-radius: var(--fa-radius-sm); padding: 6px 14px;
	font-size: 13px; font-weight: 600;
}

/* ── Summary Cards ────────────────────────────────────────────────────────── */
.fmm-summary-row {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 10px;
}

.fmm-card {
	background: var(--fa-white); border: 1px solid var(--fa-border);
	border-radius: var(--fa-radius); padding: 12px 14px;
	box-shadow: var(--fa-shadow); text-align: center;
}

.fmm-card-highlight  { border-top: 3px solid var(--fa-navy); }
.fmm-card-positive   { border-top: 3px solid var(--fa-success); }
.fmm-card-negative   { border-top: 3px solid var(--fa-danger); }

.fmm-card-icon  { font-size: 18px; margin-bottom: 4px; }
.fmm-card-value {
	font-size: 16px; font-weight: 900; color: var(--fa-navy);
	font-family: var(--fa-font); line-height: 1.1; margin-bottom: 3px;
}
.fmm-card-label { font-size: 10px; color: var(--fa-text-muted); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }

/* ── Disclaimer ───────────────────────────────────────────────────────────── */
.fmm-disclaimer {
	font-size: 10.5px; color: var(--fa-text-muted);
	background: var(--fa-warning-bg); border: 1px solid rgba(217,119,6,.2);
	border-radius: var(--fa-radius-sm); padding: 7px 12px; line-height: 1.4;
}

/* ── Main body layout ─────────────────────────────────────────────────────── */
.fmm-body {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 14px;
	align-items: start;
}

/* ── Assumptions panel ────────────────────────────────────────────────────── */
.fmm-assumptions-panel {
	background: var(--fa-white); border: 1px solid var(--fa-border);
	border-radius: var(--fa-radius-lg); overflow: hidden; box-shadow: var(--fa-shadow);
}
.fmm-panel-locked { opacity: 0.72; pointer-events: none; }
.fmm-panel-title {
	font-size: 13px; font-weight: 700; color: var(--fa-navy);
	padding: 12px 16px; border-bottom: 1px solid var(--fa-border);
	background: var(--fa-off-white); margin: 0;
}

.fmm-assumption-sections { overflow-y: auto; max-height: 580px; }

.fmm-assumption-group {
	border-bottom: 1px solid var(--fa-border);
	padding: 10px 0;
}
.fmm-assumption-group:last-child { border-bottom: none; }

.fmm-group-title {
	font-size: 10.5px; font-weight: 700; color: var(--fa-text-muted);
	text-transform: uppercase; letter-spacing: 0.5px;
	padding: 4px 14px 6px;
}

.fmm-input-row {
	display: flex; align-items: center; gap: 6px;
	padding: 3px 14px;
}

.fmm-input-label {
	font-size: 11.5px; color: var(--fa-text-mid);
	width: 145px; flex-shrink: 0; line-height: 1.3;
}

.fmm-input {
	flex: 1; font-size: 12px; padding: 4px 7px;
	min-width: 0;
}

.fmm-hint {
	font-size: 9.5px; color: var(--fa-text-muted);
	display: none; /* shown on hover via CSS */
}

/* ── Outputs panel ────────────────────────────────────────────────────────── */
.fmm-outputs-panel {
	background: var(--fa-white); border: 1px solid var(--fa-border);
	border-radius: var(--fa-radius-lg); overflow: hidden; box-shadow: var(--fa-shadow);
}

/* Tabs */
.fmm-tabs {
	display: flex; border-bottom: 1px solid var(--fa-border);
	background: var(--fa-off-white); padding: 0 4px;
}
.fmm-tab {
	padding: 10px 18px; font-size: 13px; font-weight: 600;
	font-family: var(--fa-font); color: var(--fa-text-muted);
	background: none; border: none; border-bottom: 2px solid transparent;
	cursor: pointer; transition: all 0.15s; margin-bottom: -1px;
}
.fmm-tab:hover        { color: var(--fa-navy); }
.fmm-tab-active       { color: var(--fa-navy); border-bottom-color: var(--fa-navy); background: var(--fa-white); }

.fmm-tab-content { overflow-x: auto; }

/* Output table */
.fmm-table-wrap { overflow-x: auto; }

.fmm-table {
	width: 100%; border-collapse: collapse; font-size: 12.5px;
	min-width: 560px;
}

.fmm-table thead th {
	background: var(--fa-navy); color: rgba(255,255,255,.9);
	padding: 9px 12px; text-align: right; font-size: 11px;
	font-weight: 700; white-space: nowrap;
}

.fmm-table thead th.fmm-row-label-header {
	text-align: left; width: 170px; color: rgba(255,255,255,.7);
	font-weight: 500;
}

.fmm-table tbody td {
	padding: 7px 12px; text-align: right; border-bottom: 1px solid var(--fa-border);
}
.fmm-table tbody td.fmm-row-label { text-align: left; color: var(--fa-text-mid); font-size: 12px; }
.fmm-table tbody tr:last-child td { border-bottom: none; }
.fmm-table tbody tr:hover td      { background: var(--fa-off-white); }

.fmm-bold-row td { font-weight: 700; color: var(--fa-navy); background: #f0f4ff; }
.fmm-bold-row td.fmm-row-label { background: #f0f4ff; }

.fmm-neg        { color: var(--fa-danger) !important; }

.fmm-divider-row td {
	height: 4px; background: var(--fa-border); padding: 0; border: none;
}

/* ── Admin bar ────────────────────────────────────────────────────────────── */
.fmm-admin-bar {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	background: var(--fa-gold-pale); border: 1px solid rgba(201,162,39,.3);
	border-radius: var(--fa-radius); padding: 10px 16px; font-size: 13px;
}
.fmm-admin-label { font-weight: 700; color: #92400e; }
.fmm-admin-note  { font-size: 12px; color: var(--fa-text-muted); flex: 1; }

/* ── Toast notification ───────────────────────────────────────────────────── */
.fmm-toast {
	position: fixed; bottom: 24px; right: 24px; z-index: 9999;
	padding: 11px 18px; border-radius: var(--fa-radius);
	font-size: 13px; font-weight: 600; box-shadow: var(--fa-shadow-lg);
	font-family: var(--fa-font); min-width: 200px; text-align: center;
}
.fmm-toast-success { background: var(--fa-navy); color: #fff; }
.fmm-toast-error   { background: var(--fa-danger); color: #fff; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
	.fmm-body           { grid-template-columns: 1fr; }
	.fmm-summary-row    { grid-template-columns: repeat(3, 1fr); }
	.fmm-assumption-sections { max-height: none; }
}
@media (max-width: 600px) {
	.fmm-summary-row    { grid-template-columns: repeat(2, 1fr); }
}
