.ai-portal-shell {
	max-width: 960px;
	margin: 0 auto;
	padding: 1.25rem 1rem 2.5rem;
	color: #17212b;
	font-size: 13.5px;
	line-height: 1.5;
}

.ai-portal-brand {
	margin-bottom: 0.75rem;
}

.ai-portal-logo {
	height: 36px;
	width: auto;
}

.ai-portal-header {
	display: flex;
	justify-content: space-between;
	align-items: end;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.ai-portal-header h1 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.ai-portal-subtitle {
	margin: 0.15rem 0 0;
	font-size: 0.78rem;
	color: #8a95a3;
}

.ai-portal-switcher label,
.ai-portal-key-value-grid label {
	display: block;
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #8a95a3;
	margin-bottom: 0.2rem;
}

.ai-portal-switcher select {
	min-width: 170px;
	padding: 0.35rem 0.6rem;
	font-size: 0.78rem;
	border: 1px solid #d7dde4;
	border-radius: 6px;
	background: #fff;
}

.ai-portal-nav {
	display: flex;
	gap: 0.35rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.ai-portal-nav-link {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.75rem;
	border-radius: 999px;
	background: #eef2f6;
	color: #223042;
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
}

.ai-portal-nav-link.is-active {
	background: #19324d;
	color: #fff;
}

.ai-portal-grid {
	display: grid;
	gap: 0.6rem;
}

.ai-portal-grid--summary {
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	margin-bottom: 0.6rem;
}

.ai-portal-grid--actions,
.ai-portal-grid--assets {
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ai-portal-card,
.ai-portal-action-card,
.ai-portal-panel,
.ai-portal-state-card,
.ai-portal-list-card,
.ai-portal-asset-card,
.ai-portal-detail-card,
.ai-portal-modal {
	background: #fff;
	border: 1px solid #e4e9ef;
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(18, 33, 51, 0.03);
}

.ai-portal-card,
.ai-portal-state-card,
.ai-portal-detail-card {
	padding: 0.75rem;
}

.ai-portal-action-card,
.ai-portal-list-card,
.ai-portal-panel,
.ai-portal-asset-card,
.ai-portal-modal {
	overflow: hidden;
}

.ai-portal-card-label {
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #8a95a3;
}

.ai-portal-card-value {
	margin-top: 0.25rem;
	font-size: 1.3rem;
	font-weight: 700;
}

.ai-portal-card-subtext {
	margin-top: 0.25rem;
	font-size: 0.72rem;
	font-weight: 500;
	color: #8a95a3;
}

.ai-portal-action-card {
	display: block;
	padding: 0.75rem;
	text-decoration: none;
	color: inherit;
}

.ai-portal-action-card h2 {
	margin: 0 0 0.2rem;
	font-size: 0.95rem;
}

.ai-portal-panel-header h2 {
	margin: 0 0 0.2rem;
	font-size: 1rem;
}

.ai-portal-list-card h3,
.ai-portal-asset-card h3 {
	margin: 0 0 0.15rem;
	font-size: 0.9rem;
}

.ai-portal-action-card p,
.ai-portal-list-card p,
.ai-portal-asset-card p,
.ai-portal-state-card p {
	margin: 0;
	font-size: 0.75rem;
	color: #8a95a3;
}

.ai-portal-panel-header {
	padding: 0.75rem 0.75rem 0;
}

.ai-portal-list,
.ai-portal-detail-grid {
	display: grid;
	gap: 0.6rem;
	padding: 0.75rem;
}

.ai-portal-key-value-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 0.75rem 1rem;
	margin-top: 0.75rem;
}

.ai-portal-key-value-grid strong {
	font-size: 0.88rem;
	display: block;
	line-height: 1.35;
}

.ai-portal-list-card,
.ai-portal-detail-card {
	padding: 0.7rem;
}

.ai-portal-list-card-header {
	display: flex;
	justify-content: space-between;
	gap: 0.6rem;
	align-items: start;
}

.ai-portal-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.45rem;
	background: #eef2f6;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 600;
	white-space: nowrap;
}

.ai-portal-actions-row {
	display: flex;
	gap: 0.4rem;
	flex-wrap: wrap;
	margin-top: 0.6rem;
}

.ai-portal-actions-row .btn-sm {
	font-size: 0.72rem;
	padding: 0.25rem 0.55rem;
}

.ai-portal-announce {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.7rem 0.9rem;
	margin-bottom: 0.75rem;
	border-radius: 10px;
	background: linear-gradient(135deg, #143a6d, #2a6cc7);
	color: #fff;
	text-decoration: none;
	transition: opacity 0.15s;
}

.ai-portal-announce:hover {
	opacity: 0.92;
	color: #fff;
	text-decoration: none;
}

.ai-portal-announce-badge {
	flex-shrink: 0;
	padding: 0.2rem 0.5rem;
	border-radius: 999px;
	background: #d7ae52;
	color: #443008;
	font-size: 0.62rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.ai-portal-announce-body {
	font-size: 0.8rem;
	line-height: 1.4;
}

.ai-portal-announce-body strong {
	color: #fff;
}

.ai-portal-announce-cta {
	margin-left: 0.4rem;
	color: #d7ae52;
	font-weight: 600;
	white-space: nowrap;
}

.ai-portal-access-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.82rem;
}

.ai-portal-access-company {
	color: #8a95a3;
	font-size: 0.75rem;
}

.ai-portal-asset-summary {
	display: flex;
	gap: 1rem;
	font-size: 0.75rem;
	color: #8a95a3;
	margin-top: 0.15rem;
}

.ai-portal-table-wrap {
	overflow-x: auto;
	padding: 0 0.75rem 0.75rem;
}

.ai-portal-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.8rem;
}

.ai-portal-table th {
	text-align: left;
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #8a95a3;
	padding: 0.5rem 0.5rem;
	border-bottom: 2px solid #e4e9ef;
}

.ai-portal-table td {
	padding: 0.5rem 0.5rem;
	border-bottom: 1px solid #f0f3f6;
	vertical-align: middle;
}

.ai-portal-table tr:last-child td {
	border-bottom: none;
}

.ai-portal-table strong {
	font-weight: 600;
	font-size: 0.8rem;
}

.ai-portal-table-sub {
	font-size: 0.7rem;
	color: #8a95a3;
	margin-top: 0.1rem;
}

.ai-portal-table .text-right {
	text-align: right;
}

.ai-portal-table .btn-xs {
	font-size: 0.68rem;
	padding: 0.15rem 0.4rem;
	margin-left: 0.25rem;
}

.ai-portal-asset-card {
	display: flex;
	flex-direction: column;
}

.ai-portal-asset-image {
	height: 140px;
	background: linear-gradient(135deg, #eef2f6, #d8e0e8);
	background-position: center;
	background-size: cover;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #8a95a3;
	font-size: 0.78rem;
	font-weight: 600;
}

.ai-portal-asset-body {
	padding: 0.7rem;
}

.ai-portal-stack {
	display: grid;
	gap: 0.6rem;
}

.ai-portal-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(12, 22, 34, 0.56);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	z-index: 1000;
}

.ai-portal-modal {
	width: min(620px, 100%);
	max-height: 85vh;
	overflow: auto;
	padding: 0.85rem;
}

.ai-portal-modal--wide {
	width: min(820px, 100%);
}

.ai-portal-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.6rem;
}

.ai-portal-modal-header h3 {
	font-size: 0.92rem;
	margin: 0;
}

.ai-portal-close {
	border: 0;
	background: transparent;
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}

.ai-portal-document-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.4rem;
}

.ai-portal-document-list li {
	display: flex;
	justify-content: space-between;
	gap: 0.6rem;
	align-items: center;
	padding: 0.5rem 0;
	border-top: 1px solid #edf1f5;
}

.ai-portal-document-list li:first-child {
	border-top: 0;
}

.ai-portal-document-list strong {
	font-size: 0.78rem;
}

.ai-portal-document-list p,
.ai-portal-asset-address {
	margin: 0.1rem 0 0;
	font-size: 0.7rem;
	color: #8a95a3;
}

.ai-portal-detail-grid {
	grid-template-columns: 1.2fr 1fr;
}

.ai-portal-state-card--error {
	border-color: #f2c2c2;
	background: #fff7f7;
	color: #8a2d2d;
}

.ai-portal-statement-content {
	max-height: 70vh;
	overflow-y: auto;
	padding: 6px;
}

.ai-portal-document-iframe {
	width: 100%;
	height: 70vh;
	border: 0;
	background: #fff;
	border-radius: 4px;
	display: block;
}

@media (max-width: 900px) {
	.ai-portal-detail-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 700px) {
	.ai-portal-header {
		flex-direction: column;
		align-items: stretch;
	}

	.ai-portal-switcher select {
		width: 100%;
		min-width: 0;
	}
}

/* ── Loan Card Enhancements ── */

.ai-portal-loan-alert {
	padding: 0.45rem 0.7rem;
	margin-top: 0.5rem;
	border-radius: 6px;
	background: #fffaf0;
	border-left: 3px solid #dd6b20;
	font-size: 0.78rem;
	font-weight: 600;
	color: #975a16;
}

.ai-portal-loan-hero {
	display: flex;
	gap: 1.5rem;
	margin-top: 0.6rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #f0f3f6;
}

.ai-portal-loan-hero-item {
	flex: 1;
}

.ai-portal-loan-hero-item label {
	display: block;
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #8a95a3;
	margin-bottom: 0.15rem;
}

.ai-portal-loan-big-number {
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.ai-portal-loan-subtext {
	display: block;
	font-size: 0.7rem;
	font-weight: 500;
	color: #8a95a3;
	margin-top: 0.1rem;
}

/* ── Banner Stack ── */

.ai-portal-banner-stack {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-bottom: 0.6rem;
}

.ai-portal-banner {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.6rem 1rem;
	font-size: 0.82rem;
	border: 1px solid #e4e9ef;
	background: #fff;
}

.ai-portal-banner-stack .ai-portal-banner:first-child {
	border-radius: 8px 8px 0 0;
}

.ai-portal-banner-stack .ai-portal-banner:last-child {
	border-radius: 0 0 8px 8px;
}

.ai-portal-banner-stack .ai-portal-banner:only-child {
	border-radius: 8px;
}

.ai-portal-banner-stack .ai-portal-banner + .ai-portal-banner {
	border-top: 0;
}

.ai-portal-banner--action {
	background: #fffaf0;
	border-color: #f0e6c4;
	color: #6b4226;
}

.ai-portal-banner--pending {
	background: #fefcf3;
	border-color: #f0e6c4;
	color: #6b5b2e;
}

.ai-portal-banner-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}

.ai-portal-banner-dot--orange {
	background: #dd6b20;
}

.ai-portal-banner-dot--gold {
	background: #d7ae52;
}

.ai-portal-banner-text {
	flex: 1;
}

.ai-portal-banner-link {
	margin-left: auto;
	color: #2a6cc7;
	font-weight: 600;
	font-size: 0.78rem;
	white-space: nowrap;
	text-decoration: none;
}

.ai-portal-banner-link:hover {
	text-decoration: underline;
}

/* ── Contact Card ── */

.ai-portal-contact-card {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.1rem;
	margin-top: 0.6rem;
	background: #fff;
	border: 1px solid #e4e9ef;
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(18, 33, 51, 0.03);
}

.ai-portal-contact-photo {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.ai-portal-contact-heading {
	margin: 0 0 0.3rem;
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #8a95a3;
}

.ai-portal-contact-name {
	font-size: 0.92rem;
	font-weight: 700;
}

.ai-portal-contact-title {
	margin: 0.1rem 0 0;
	font-size: 0.75rem;
	color: #8a95a3;
	font-weight: 500;
}

.ai-portal-contact-links {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.35rem;
	font-size: 0.78rem;
}

.ai-portal-contact-links a {
	color: #2a6cc7;
	text-decoration: none;
	font-weight: 500;
}

.ai-portal-contact-links a:hover {
	text-decoration: underline;
}

.ai-portal-contact-sep {
	width: 1px;
	height: 12px;
	background: #d7dde4;
}

/* ── (Alert banner styles removed — replaced by banner stack) ── */

/* ── Pending Badge ── */

.ai-portal-badge--pending {
	background: #fefcbf;
	color: #975a16;
}

/* ── Document Execution Modal ── */

.ai-portal-exec-body {
	padding: 24px 28px 28px;
	max-height: 80vh;
	overflow-y: auto;
}

.ai-portal-signing-shell {
	display: grid;
	gap: 20px;
}

.ai-portal-signing-fragment {
	display: contents;
}

.ai-portal-exec-terms,
.ai-portal-exec-investor,
.ai-portal-exec-docs {
	padding: 16px 18px;
	background: #f8fafc;
	border: 1px solid #e4ebf3;
	border-radius: 10px;
}

.ai-portal-exec-terms h4,
.ai-portal-exec-docs h4,
.ai-portal-exec-sign h4,
.ai-portal-exec-success h4,
.ai-portal-exec-investor h4 {
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 10px;
	color: #2c5282;
	letter-spacing: 0.01em;
}

.ai-portal-exec-investor p {
	margin: 2px 0;
	font-size: 0.85rem;
}

.ai-portal-exec-note {
	font-size: 0.8rem;
	color: #8a95a3;
	margin-top: 10px;
	line-height: 1.45;
}

/* ── Document Checklist ── */

.ai-portal-doc-checklist {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ai-portal-doc-checklist__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border: 1px solid #e4e9ef;
	border-radius: 6px;
	background: #fff;
}

.ai-portal-doc-checklist__item--reviewed {
	border-color: #68d391;
	background: #f0fff4;
}

.ai-portal-doc-checklist__item label {
	flex: 1;
	font-weight: 500;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ai-portal-doc-btn--view {
	background: transparent;
	color: #5a6c84;
	border: 1px solid #d4dbe3;
	font-size: 0.75rem;
	padding: 4px 10px;
	border-radius: 4px;
	font-weight: 500;
	transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ai-portal-doc-btn--view:hover,
.ai-portal-doc-btn--view:focus {
	background: #f4f6f9;
	color: #1a3a5c;
	border-color: #a6b5c6;
}

.ai-portal-doc-btn--review {
	background: #1a3a5c;
	color: #fff;
	border: 1px solid #1a3a5c;
	font-size: 0.875rem;
	padding: 7px 16px;
	border-radius: 6px;
	font-weight: 600;
	letter-spacing: 0.01em;
	box-shadow: 0 2px 6px rgba(26, 58, 92, 0.25);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: background 0.15s, box-shadow 0.15s, transform 0.05s;
}

.ai-portal-doc-btn--review:hover,
.ai-portal-doc-btn--review:focus {
	background: #12293f;
	border-color: #12293f;
	color: #fff;
	box-shadow: 0 3px 10px rgba(26, 58, 92, 0.35);
}

.ai-portal-doc-btn--review:active {
	transform: translateY(1px);
}

.ai-portal-doc-btn--review::before {
	content: "✓";
	font-weight: 700;
	font-size: 0.9rem;
}

.ai-portal-doc-checklist__item--reviewed .ai-portal-doc-btn--view {
	opacity: 0.7;
}

/* ── E-Signature ── */

.ai-portal-exec-sign {
	padding: 16px 18px 18px;
	background: #ffffff;
	border: 1px solid #e4ebf3;
	border-radius: 10px;
}

.ai-portal-esign-input {
	margin-bottom: 12px;
}

.ai-portal-esign-input label {
	display: block;
	font-weight: 500;
	margin-bottom: 4px;
}

.ai-portal-esign-input input {
	max-width: 400px;
}

@font-face {
	font-family: "Dancing Script";
	src: url("/assets/accounting_integration/fonts/DancingScript-Variable.ttf") format("truetype");
	font-weight: 400 700;
	font-style: normal;
}

.ai-portal-esign-preview {
	font-family: "Dancing Script", cursive;
	font-size: 28px;
	color: #1a3a5c;
	padding: 12px 0;
	line-height: 1.2;
}

.ai-portal-exec-error {
	color: #c53030;
	font-size: 0.875rem;
	margin: 8px 0;
	padding: 8px 12px;
	background: #fff5f5;
	border-radius: 4px;
}

/* ── Execution Success ── */

.ai-portal-exec-success {
	text-align: center;
	padding: 32px 20px;
}

.ai-portal-exec-success h4 {
	color: #276749;
	font-size: 1.2rem;
}

.ai-portal-exec-success p {
	margin: 8px 0;
	color: #4a5568;
}
