/* TFM Member Dashboard Styles */

.tfm-dashboard-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	color: #1a202c;
}

.tfm-dashboard-header {
	margin-bottom: 32px;
}

.tfm-dashboard-header h1 {
	font-size: 32px;
	font-weight: 700;
	color: #1a202c;
	margin: 0;
}

/* Login Prompt */
.tfm-login-prompt,
.tfm-not-member {
	background: #ffffff;
	border-radius: 12px;
	padding: 48px;
	text-align: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tfm-login-prompt h3,
.tfm-not-member h3 {
	font-size: 24px;
	font-weight: 700;
	color: #1a202c;
	margin: 0 0 12px;
}

.tfm-login-prompt p,
.tfm-not-member p {
	color: #4a5568;
	margin: 0;
}

/* Mobile Menu Toggle */
.tfm-mobile-menu-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
	background: #667eea;
	border: none;
	border-radius: 8px;
	padding: 12px;
	cursor: pointer;
	margin-bottom: 20px;
}

.tfm-mobile-menu-toggle span {
	display: block;
	width: 24px;
	height: 3px;
	background: #ffffff;
	border-radius: 2px;
	transition: all 0.3s ease;
}

.tfm-mobile-menu-toggle.active span:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}

.tfm-mobile-menu-toggle.active span:nth-child(2) {
	opacity: 0;
}

.tfm-mobile-menu-toggle.active span:nth-child(3) {
	transform: rotate(-45deg) translate(7px, -6px);
}

/* Tab Navigation */
.tfm-dashboard-nav {
	display: flex;
	gap: 8px;
	margin-bottom: 32px;
	border-bottom: 2px solid #e5e7eb;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.tfm-tab-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: none;
	padding: 14px 20px;
	font-size: 15px;
	font-weight: 600;
	color: #4a5568;
	cursor: pointer;
	white-space: nowrap;
	border-bottom: 3px solid transparent;
	transition: all 0.2s ease;
	position: relative;
}

.tfm-tab-btn svg {
	width: 23px;
	height: 23px;
}

.tfm-tab-btn:hover {
	color: #667eea;
	background: #f7fafc;
}

.tfm-tab-btn.active {
	color: #667eea;
	border-bottom-color: #667eea;
}

/* Tab Content */
.tfm-tab-content {
	display: none;
	animation: fadeIn 0.3s ease;
}

.tfm-tab-content.active {
	display: block;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Welcome Section */
.tfm-welcome-section {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-bottom: 32px;
	padding: 32px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 12px;
	color: #ffffff;
}

.tfm-profile-photo,
.tfm-profile-photo-placeholder {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid rgba(255, 255, 255, 0.3);
	flex-shrink: 0;
}

.tfm-profile-photo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.2);
}

.tfm-welcome-text h2 {
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 8px;
	color: #ffffff;
}

.tfm-membership-id {
	font-size: 14px;
	margin: 0;
	opacity: 0.9;
}

/* Summary Cards */
.tfm-summary-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-bottom: 32px;
}

.tfm-card {
	background: #ffffff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: all 0.2s ease;
}

.tfm-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.tfm-summary-card {
	display: flex;
	align-items: center;
	gap: 16px;
}

.tfm-card-icon {
	width: 56px;
	height: 56px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.tfm-card-content {
	flex: 1;
}

.tfm-card-label {
	font-size: 14px;
	color: #4a5568;
	margin-bottom: 4px;
}

.tfm-card-value {
	font-size: 24px;
	font-weight: 700;
	color: #1a202c;
}

/* Dashboard Section */
.tfm-dashboard-section {
	margin-bottom: 32px;
}

.tfm-dashboard-section h3 {
	font-size: 20px;
	font-weight: 700;
	color: #1a202c;
	margin: 0 0 20px;
}

/* Loan List */
.tfm-loan-list {
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tfm-loan-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px;
	border-bottom: 1px solid #e5e7eb;
	transition: background 0.2s ease;
}

.tfm-loan-item:last-child {
	border-bottom: none;
}

.tfm-loan-item:hover {
	background: #f7fafc;
}

.tfm-loan-info {
	flex: 1;
}

.tfm-loan-amount {
	font-size: 18px;
	font-weight: 700;
	color: #1a202c;
	margin-bottom: 4px;
}

.tfm-loan-purpose {
	font-size: 14px;
	color: #4a5568;
	margin-bottom: 4px;
}

.tfm-loan-date {
	font-size: 13px;
	color: #718096;
}

/* Status Badges */
.tfm-status-badge {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.tfm-status-pending {
	background: #fef3c7;
	color: #92400e;
}

.tfm-status-approved {
	background: #dbeafe;
	color: #1e40af;
}

.tfm-status-paid {
	background: #dcfce7;
	color: #166534;
}

.tfm-status-rejected {
	background: #fee2e2;
	color: #991b1b;
}

.tfm-status-active {
	background: #dcfce7;
	color: #166534;
}

.tfm-status-inactive {
	background: #f3f4f6;
	color: #4b5563;
}

.tfm-status-suspended {
	background: #fee2e2;
	color: #991b1b;
}

/* Quick Actions */
.tfm-quick-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

/* Buttons */
.tfm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
}

.tfm-btn-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #ffffff;
}

.tfm-btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.tfm-btn-secondary {
	background: #ffffff;
	color: #667eea;
	border: 2px solid #667eea;
}

.tfm-btn-secondary:hover {
	background: #667eea;
	color: #ffffff;
}

.tfm-btn-block {
	width: 100%;
}

/* No Data */
.tfm-no-data {
	text-align: center;
	padding: 48px 24px;
	color: #718096;
	font-size: 15px;
	background: #f7fafc;
	border-radius: 12px;
}

/* Profile Tab */
.tfm-profile-header {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-bottom: 32px;
	padding: 32px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tfm-profile-photo-large,
.tfm-profile-photo-placeholder-large {
	width: 140px;
	height: 140px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid #667eea;
	flex-shrink: 0;
}

.tfm-profile-photo-placeholder-large {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f7fafc;
}

.tfm-profile-name h2 {
	font-size: 28px;
	font-weight: 700;
	color: #1a202c;
	margin: 0 0 12px;
}

.tfm-card h3 {
	font-size: 18px;
	font-weight: 700;
	color: #1a202c;
	margin: 0 0 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid #e5e7eb;
}

.tfm-info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
}

.tfm-info-item {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tfm-info-item label {
	font-size: 13px;
	font-weight: 600;
	color: #718096;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.tfm-info-item span {
	font-size: 15px;
	color: #1a202c;
}

/* Loans Tab */
.tfm-loans-container {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.tfm-loan-card {
	background: #ffffff;
}

.tfm-loan-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 2px solid #e5e7eb;
}

.tfm-loan-title {
	display: flex;
	align-items: center;
	gap: 12px;
}

.tfm-loan-title h3 {
	font-size: 24px;
	font-weight: 700;
	color: #1a202c;
	margin: 0;
	padding: 0;
	border: none;
}

.tfm-loan-meta {
	font-size: 14px;
	color: #718096;
}

.tfm-loan-purpose {
	margin-bottom: 20px;
	font-size: 15px;
	color: #4a5568;
	line-height: 1.5;
}

.tfm-loan-terms {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 16px;
	margin-bottom: 20px;
	padding: 20px;
	background: #f7fafc;
	border-radius: 8px;
}

.tfm-loan-term-item {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tfm-loan-term-item label {
	font-size: 12px;
	font-weight: 600;
	color: #718096;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.tfm-loan-term-item span {
	font-size: 16px;
	font-weight: 700;
	color: #1a202c;
}

/* Progress Bar */
.tfm-progress-bar {
	height: 12px;
	background: #e5e7eb;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 8px;
}

.tfm-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #10b981 0%, #059669 100%);
	border-radius: 6px;
	transition: width 0.3s ease;
}

.tfm-progress-label {
	font-size: 14px;
	color: #4a5568;
	margin-bottom: 16px;
}

/* Accordion */
.tfm-accordion {
	margin-top: 20px;
}

.tfm-accordion-trigger {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	padding: 14px 18px;
	background: #f7fafc;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	color: #1a202c;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tfm-accordion-trigger:hover {
	background: #e5e7eb;
}

.tfm-accordion-icon {
	transition: transform 0.3s ease;
}

.tfm-accordion.active .tfm-accordion-icon {
	transform: rotate(180deg);
}

.tfm-accordion-content {
	display: none;
	padding: 20px 0 0;
	animation: slideDown 0.3s ease;
}

.tfm-accordion.active .tfm-accordion-content {
	display: block;
}

@keyframes slideDown {
	from {
		opacity: 0;
		max-height: 0;
	}
	to {
		opacity: 1;
		max-height: 1000px;
	}
}

/* Payments Table */
.tfm-payments-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.tfm-payments-table thead {
	background: #f7fafc;
}

.tfm-payments-table th {
	padding: 12px 16px;
	text-align: left;
	font-weight: 600;
	color: #4a5568;
	border-bottom: 2px solid #e5e7eb;
}

.tfm-payments-table td {
	padding: 12px 16px;
	border-bottom: 1px solid #e5e7eb;
	color: #1a202c;
}

.tfm-payments-table tbody tr:hover {
	background: #f7fafc;
}

/* Apply for Loan Tab */
.tfm-info-card {
	display: flex;
	gap: 16px;
	background: #eff6ff;
	border-left: 4px solid #667eea;
	margin-bottom: 24px;
}

.tfm-info-icon {
	flex-shrink: 0;
}

.tfm-info-card p {
	margin: 0 0 8px;
	font-size: 15px;
	color: #1a202c;
	line-height: 1.5;
}

.tfm-info-note {
	font-size: 14px;
	color: #4a5568;
}

/* Form */
.tfm-form-group {
	margin-bottom: 20px;
}

.tfm-form-group label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #1a202c;
	margin-bottom: 8px;
}

.tfm-form-input {
	width: 100%;
	padding: 12px 16px;
	font-size: 15px;
	color: #1a202c;
	background: #ffffff;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	transition: all 0.2s ease;
	font-family: inherit;
}

.tfm-form-input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.tfm-form-input {
	resize: vertical;
	min-height: 100px;
}

.tfm-form-message {
	padding: 14px 18px;
	border-radius: 8px;
	margin-bottom: 20px;
	font-size: 14px;
}

.tfm-form-message.success {
	background: #dcfce7;
	color: #166534;
	border-left: 4px solid #10b981;
}

.tfm-form-message.error {
	background: #fee2e2;
	color: #991b1b;
	border-left: 4px solid #d63638;
}

/* Button States */
.tfm-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.tfm-btn-spinner {
	display: inline-flex;
}

.tfm-spinner {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* Responsive Design */
@media (max-width: 768px) {
	.tfm-dashboard-wrapper {
		padding: 16px;
	}
	
	.tfm-dashboard-header h1 {
		font-size: 24px;
	}
	
	.tfm-mobile-menu-toggle {
		display: flex;
	}
	
	.tfm-dashboard-nav {
		display: none;
		flex-direction: column;
		border-bottom: none;
		margin-bottom: 20px;
		background: #ffffff;
		border-radius: 12px;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
		padding: 12px;
		gap: 4px;
	}
	
	.tfm-dashboard-nav.show {
		display: flex;
	}
	
	.tfm-tab-btn {
		justify-content: flex-start;
		padding: 12px 16px;
		border-bottom: none;
		border-left: 3px solid transparent;
		border-radius: 8px;
	}
	
	.tfm-tab-btn.active {
		background: #f7fafc;
		border-left-color: #667eea;
	}
	
	.tfm-welcome-section {
		flex-direction: column;
		text-align: center;
		padding: 24px;
	}
	
	.tfm-welcome-text h2 {
		font-size: 22px;
	}
	
	.tfm-summary-cards {
		grid-template-columns: 1fr;
	}
	
	.tfm-profile-header {
		flex-direction: column;
		text-align: center;
		padding: 24px;
	}
	
	.tfm-profile-name h2 {
		font-size: 22px;
	}
	
	.tfm-info-grid {
		grid-template-columns: 1fr;
	}
	
	.tfm-loan-header {
		flex-direction: column;
		gap: 12px;
	}
	
	.tfm-loan-title {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
	
	.tfm-loan-terms {
		grid-template-columns: 1fr;
	}
	
	.tfm-quick-actions {
		flex-direction: column;
	}
	
	.tfm-btn {
		width: 100%;
	}
	
	.tfm-payments-table {
		font-size: 12px;
	}
	
	.tfm-payments-table th,
	.tfm-payments-table td {
		padding: 8px 12px;
	}
}

@media (max-width: 480px) {
	.tfm-card {
		padding: 16px;
	}
	
	.tfm-profile-photo,
	.tfm-profile-photo-placeholder {
		width: 80px;
		height: 80px;
	}
	
	.tfm-profile-photo-large,
	.tfm-profile-photo-placeholder-large {
		width: 100px;
		height: 100px;
	}
	
	.tfm-card-value {
		font-size: 20px;
	}
}
