/* Investment Management — Public Styles (mobile-first, lightweight) */

.im-dashboard, .im-form-wrap {
	--im-primary: #2563eb;
	--im-primary-dark: #1d4ed8;
	--im-secondary: #059669;
	--im-secondary-dark: #047857;
	--im-bg: #f8fafc;
	--im-card-bg: #ffffff;
	--im-border: #e2e8f0;
	--im-text: #1e293b;
	--im-text-muted: #64748b;
	--im-success: #059669;
	--im-warning: #d97706;
	--im-danger: #dc2626;
	--im-radius: 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--im-text);
	box-sizing: border-box;
}

.im-dashboard *, .im-form-wrap * { box-sizing: border-box; }

/* Summary grid */
.im-summary-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-bottom: 20px;
}

@media (min-width: 600px) {
	.im-summary-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
	.im-summary-grid { grid-template-columns: repeat(6, 1fr); }
}

.im-summary-card {
	background: var(--im-card-bg);
	border: 1px solid var(--im-border);
	border-radius: var(--im-radius);
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.im-summary-label {
	font-size: 12px;
	color: var(--im-text-muted);
	text-transform: uppercase;
	letter-spacing: .03em;
}

.im-summary-value {
	font-size: 18px;
	font-weight: 700;
}

/* Actions */
.im-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 16px;
}

.im-btn {
	border: none;
	border-radius: 8px;
	padding: 12px 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, opacity .15s ease;
}
.im-btn:disabled { opacity: .6; cursor: not-allowed; }

.im-btn-primary { background: var(--im-primary); color: #fff; }
.im-btn-primary:hover:not(:disabled) { background: var(--im-primary-dark); }

.im-btn-secondary { background: var(--im-secondary); color: #fff; }
.im-btn-secondary:hover:not(:disabled) { background: var(--im-secondary-dark); }

/* Alerts */
.im-alert-area:empty { display: none; }
.im-alert {
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 14px;
}
.im-alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.im-alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.im-notice-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; padding: 12px; border-radius: 8px; }

/* Section title */
.im-section-title {
	margin: 24px 0 12px;
	font-size: 16px;
	font-weight: 700;
}

/* Investment cards */
.im-cards-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}
@media (min-width: 640px) {
	.im-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
	.im-cards-grid { grid-template-columns: repeat(3, 1fr); }
}

.im-card {
	background: var(--im-card-bg);
	border: 1px solid var(--im-border);
	border-radius: var(--im-radius);
	overflow: hidden;
}

.im-card-header {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding: 12px 14px;
	background: var(--im-bg);
	border-bottom: 1px solid var(--im-border);
}

.im-card-id { font-weight: 700; margin-right: auto; }

.im-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 999px;
	background: #e0e7ff;
	color: #3730a3;
}
.im-badge-reinvest { background: #dcfce7; color: #166534; }
.im-badge-status-pending { background: #fef3c7; color: #92400e; }
.im-badge-status-active { background: #d1fae5; color: #065f46; }
.im-badge-status-rejected { background: #fee2e2; color: #991b1b; }
.im-badge-status-completed { background: #e0e7ff; color: #3730a3; }
.im-badge-cash { background: #fef9c3; color: #854d0e; }

.im-card-body { padding: 12px 14px; }

.im-card-row {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px dashed var(--im-border);
	font-size: 13px;
}
.im-card-row:last-child { border-bottom: none; }
.im-card-label { color: var(--im-text-muted); }
.im-card-value { font-weight: 600; }
.im-live-running { color: var(--im-warning); }
.im-live-matured { color: var(--im-success); }

.im-empty { color: var(--im-text-muted); padding: 16px 0; text-align: center; }

/* Tabs */
.im-tabs {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	border-bottom: 2px solid var(--im-border);
	margin-bottom: 12px;
}
.im-tab-btn {
	background: none;
	border: none;
	padding: 10px 14px;
	font-size: 13px;
	font-weight: 600;
	color: var(--im-text-muted);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
}
.im-tab-btn.active { color: var(--im-primary); border-bottom-color: var(--im-primary); }

.im-tab-panel { display: none; }
.im-tab-panel.active { display: block; }

/* Tables */
.im-table-wrap { overflow-x: auto; }
.im-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.im-table th, .im-table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid var(--im-border);
	white-space: nowrap;
}
.im-table th { color: var(--im-text-muted); font-weight: 600; background: var(--im-bg); }

/* Form */
.im-form-wrap { max-width: 480px; }
.im-form-group { margin-bottom: 16px; }
.im-form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.im-form-group input, .im-form-group textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--im-border);
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
}
.im-form-group input:focus, .im-form-group textarea:focus {
	outline: none;
	border-color: var(--im-primary);
	box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.im-payment-method { padding: 6px 0; }
