/**
 * Workspace & Access CSS
 * Styles for client login and dashboard pages
 *
 * @package AA_Planner
 */

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

.aa-client-login-page {
	min-height: 70vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 30px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aa-login-container {
	width: 100%;
	max-width: 420px;
}

.aa-login-box {
	background: white;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	padding: 20px;
}

.aa-login-header {
	text-align: center;
	margin-bottom: 30px;
}

.aa-login-header h1 {
	font-size: 28px;
	font-weight: 700;
	color: #333;
	margin: 0 0 10px 0;
}

.aa-login-header p {
	font-size: 14px;
	color: #666;
	margin: 0;
	padding: 0;
}

.aa-form-field {
	margin-bottom: 20px;
}

.aa-form-field label {
	display: block;
	font-size: 18px;
	font-weight: 600;
	color: #333;
	margin-bottom: 8px;
}

.aa-form-field input[type="email"],
.aa-form-field input[type="password"] {
	width: 100%;
	padding: 12px 16px;
	font-size: 15px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	transition: all 0.3s ease;
	box-sizing: border-box;
}

.aa-form-field input[type="email"]:focus,
.aa-form-field input[type="password"]:focus {
	outline: none;
	border-color: var(--aa-primary-color);
	box-shadow: 0 0 0 3px var(--aa-primary-color-alpha);
}

.aa-login-button {
	width: 100%;
	padding: 14px;
	background: transparent;
	background-size: 200% 100%;
	background-position: right;
	color: var(--aa-primary-color);
	border: 2px solid var(--aa-primary-color);
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.aa-login-button:hover {
	background-position: left;
	color: white;
	border-color: transparent;
	transform: translateY(-2px);
	box-shadow: 0 5px 20px var(--aa-primary-color-shadow);
}

.aa-login-button:active {
	transform: translateY(0);
}

.aa-login-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.aa-message {
	margin-top: 15px;
	padding: 12px;
	border-radius: 6px;
	font-size: 14px;
	text-align: center;
	display: none;
}

.aa-message.success {
	display: block;
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.aa-message.error {
	display: block;
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.aa-message.loading {
	display: block;
	background: #d1ecf1;
	color: #0c5460;
	border: 1px solid #bee5eb;
}

/* ============================================
   DASHBOARD PAGE STYLES
   ============================================ */

.aa-client-dashboard-page {
	min-height: 100vh;
	background: #f5f7fa;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aa-dashboard-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.aa-dashboard-header {
	margin: 0 -20px;
	padding: 40px 20px;
	color: white;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
}

.aa-welcome-section h1 {
	font-size: 32px;
	font-weight: 700;
	margin: 0 0 8px 0;
	color: white;
}

.aa-welcome-section p {
	font-size: 16px;
	margin: 0;
	opacity: 0.9;
}

.aa-logout-button {
	background: rgba(255, 255, 255, 0.2);
	color: white;
	padding: 10px 20px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
	border: 2px solid rgba(255, 255, 255, 0.3);
}

.aa-logout-button:hover {
	background: rgba(255, 255, 255, 0.3);
	border-color: rgba(255, 255, 255, 0.5);
}

.aa-client-info {
	background: white;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 30px;
	display: flex;
	gap: 30px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.aa-info-item {
	margin-bottom: 10px;
	line-height: 1.5;
}

.aa-info-label {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.8);
	font-weight: 600;
}

.aa-info-value {
	font-size: 14px;
	color: white;
	font-weight: 600;
}

.aa-info-value.aa-status-active {
	color: #28a745;
}

.aa-info-value.aa-status-onboarding {
	color: #ffc107;
}

.aa-info-value.aa-status-completed {
	color: #6c757d;
}

.aa-dashboard-content {
	padding-bottom: 60px;
}

.aa-dashboard-content h2 {
	font-size: 24px;
	color: #333;
	margin-bottom: 20px;
	font-weight: 700;
}

.aa-empty-state {
	background: white;
	border-radius: 12px;
	padding: 60px 20px;
	text-align: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.aa-empty-icon {
	font-size: 64px;
	margin-bottom: 20px;
}

.aa-empty-state h3 {
	font-size: 20px;
	color: #333;
	margin-bottom: 10px;
}

.aa-empty-state p {
	font-size: 15px;
	color: #666;
	max-width: 500px;
	margin: 0 auto;
}

.aa-forms-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 24px;
}

.aa-form-card {
	background: white;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
}

.aa-form-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.aa-form-card.completed {
	opacity: 0.8;
}

.aa-form-image {
	width: 100%;
	height: 200px;
	overflow: hidden;
	background: #f0f0f0;
}

.aa-form-card-content {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.aa-form-type-badge {
	display: inline-block;
	background: var(--aa-primary-color);
	color: white;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 12px;
	align-self: flex-start;
}

.aa-form-card h3 {
	font-size: 20px;
	color: #333;
	margin: 0 0 10px 0;
	font-weight: 700;
}

.aa-form-description {
	font-size: 14px;
	color: #666;
	line-height: 1.6;
	margin: 0 0 15px 0;
	flex: 1;
}

.aa-form-progress {
	margin: 0;
}

.aa-progress-label {
	font-size: 13px;
	color: #666;
	font-weight: 600;
	margin-bottom: 8px;
}

.aa-progress-bar {
	width: 100%;
	height: 8px;
	background: #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
}

.aa-progress-fill {
	height: 100%;
	border-radius: 4px;
	transition: width 0.3s ease;
}

.aa-form-actions {
	display: flex;
	gap: 10px;
	margin-top: auto;
}

.aa-start-button,
.aa-preview-button {
	display: block;
	flex: 1;
	padding: 12px;
	background: transparent;
	background-size: 200% 100%;
	background-position: right;
	text-align: center;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.aa-start-button {
	color: var(--aa-primary-color);
	border: 2px solid var(--aa-primary-color);
}

.aa-preview-button {
	color: #666;
	border: 2px solid #ddd;
	background: #f8f9fa;
}

.aa-start-button:hover {
	background-position: left;
	color: white !important;
	border-color: transparent;
	transform: translateY(-2px);
	box-shadow: 0 5px 15px var(--aa-primary-color-shadow);
}

.aa-preview-button:hover {
	background: #e9ecef;
	border-color: #ccc;
	color: #333 !important;
}

.aa-completed-badge {
	background: #28a745;
	color: white;
	padding: 12px;
	border-radius: 8px;
	text-align: center;
	font-weight: 600;
	font-size: 15px;
	margin-top: auto;
}

/* ============================================
   DASHBOARD LAYOUT ADJUSTMENTS
   ============================================ */

/* Full page background wrapper like form preview */
.aa-workspace-bg-wrapper {
	min-height: 100vh;
	position: relative;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-attachment: fixed;
}

.aa-workspace-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 60, 82, 0.85);
	z-index: 0;
}

.aa-forms-dashboard-page {
	padding: 20px 20px 40px 20px;
	position: relative;
	z-index: 1;
}

.aa-dashboard-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 30px;
	margin-bottom: 30px;
	padding: 40px;
	border-radius: 12px;
}

.aa-dashboard-hero {
	flex: 1;
	text-align: left;
}

.aa-dashboard-sidebar {
	width: 300px;
	flex-shrink: 0;
}

.aa-dashboard-stats {
	display: flex;
	gap: 20px;
	margin-bottom: 30px;
	flex-wrap: wrap;
}

.aa-dashboard-main {
	width: 100%;
}

/* ============================================
   FORMS TABLE VIEW (Admin Backend Style)
   ============================================ */

.aa-forms-table-container {
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

.aa-forms-table {
	width: 100%;
	border-collapse: collapse;
}

.aa-forms-table thead {
	background: #f8f9fa;
	border-bottom: 2px solid #e9ecef;
}

.aa-forms-table th {
	padding: 15px;
	text-align: left;
	font-weight: 600;
	font-size: 0.85rem;
	color: #333;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.aa-forms-table tbody tr {
	border-bottom: 1px solid #e9ecef;
	transition: background-color 0.2s ease;
}

.aa-forms-table tbody tr:hover {
	background-color: #f8f9fa;
}

.aa-forms-table td {
	padding: 15px;
	vertical-align: middle;
}

.aa-col-type {
	width: 150px;
}

.aa-col-title {
	min-width: 250px;
}

.aa-col-date {
	width: 120px;
	color: #666;
	font-size: 0.9rem;
}

.aa-col-submissions {
	width: 120px;
	text-align: center;
}

.aa-col-actions {
	width: 200px;
	text-align: right;
}

.aa-type-badge {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: capitalize;
}

.aa-type-assessments {
	background: #e7f3ff;
	color: #0073aa;
}

.aa-type-psychometrics {
	background: #f3e7ff;
	color: #7c3aed;
}

.aa-type-intakes {
	background: #fff3e0;
	color: #f57c00;
}

.aa-type-contacts {
	background: #e8f5e9;
	color: #388e3c;
}

.aa-status-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 0.7rem;
	font-weight: 600;
	margin-left: 10px;
}

.aa-badge-completed {
	background: #d4edda;
	color: #155724;
}

.aa-badge-progress {
	background: #fff3cd;
	color: #856404;
}

.aa-submission-count {
	font-weight: 600;
	color: #333;
}

.aa-table-actions {
	display: flex;
	gap: 15px;
	justify-content: flex-end;
	align-items: center;
}

.aa-btn-small {
	padding: 5px 8px !important;
	font-size: 0.85rem !important;
}

.aa-btn-sm {
	padding: 5px 10px !important;
	font-size: 0.85rem !important;
}

.aa-btn-link {
	color: #666;
	text-decoration: underline;
	font-size: 0.85rem;
	padding: 5px 0;
	transition: all 0.2s ease;
	background: transparent;
	border: none;
}

.aa-btn-link:hover {
	color: #333;
}

.aa-link-secondary {
	order: 1;
}

.aa-btn-primary.aa-btn-small {
	order: 2;
	padding: 3px 5px!important;
}

/* ============================================
   FORM LIST VIEW (replacing cards)
   ============================================ */

.aa-form-list-item {
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	padding: 20px;
	margin-bottom: 15px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	transition: box-shadow 0.3s ease;
}

.aa-form-list-item:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.aa-form-list-content {
	flex: 1;
}

.aa-form-list-header {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 10px;
}

.aa-form-list-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: #333;
	margin: 0;
}

.aa-form-list-type {
	display: inline-block;
	background: #e7f3ff;
	color: #0073aa;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: capitalize;
}

.aa-form-list-meta {
	display: flex;
	gap: 20px;
	align-items: center;
}

.aa-form-meta-item {
	font-size: 0.9rem;
	color: #666;
	display: flex;
	align-items: center;
	gap: 5px;
}

.aa-form-meta-item.aa-status-completed {
	color: #28a745;
	font-weight: 600;
}

.aa-form-meta-item.aa-status-progress {
	color: #ffc107;
	font-weight: 600;
}

.aa-form-list-actions {
	display: flex;
	gap: 10px;
	align-items: center;
}

.aa-form-list-actions .aa-btn {
	white-space: nowrap;
	padding: 10px 24px !important;
	font-size: 0.9rem;
}

.aa-form-list-actions .aa-btn-secondary {
	background: transparent;
	color: #666;
	border: 1px solid #ddd;
	text-decoration: none;
}

.aa-form-list-actions .aa-btn-secondary:hover {
	background: #f8f9fa;
	color: #333;
	border-color: #ccc;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
	.aa-dashboard-header {
		flex-direction: column;
		gap: 20px;
	}
	
	.aa-dashboard-sidebar {
		width: 100%;
	}

	.aa-client-info {
		flex-direction: column;
		gap: 15px;
	}

	.aa-forms-grid {
		grid-template-columns: 1fr;
	}

	.aa-welcome-section h1 {
		font-size: 24px;
	}
	
	.aa-form-list-item {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.aa-form-list-actions {
		width: 100%;
		flex-direction: column;
	}
	
	.aa-form-list-actions .aa-btn {
		width: 100%;
	}
	
	/* Table responsive */
	.aa-forms-table-container {
		overflow-x: auto;
	}
	
	.aa-forms-table {
		min-width: 600px;
	}
	
	.aa-forms-table th,
	.aa-forms-table td {
		padding: 10px;
		font-size: 0.85rem;
	}
	
	.aa-col-type,
	.aa-col-date {
		display: none;
	}
	
	.aa-table-actions {
		flex-direction: column;
	}
	
	.aa-table-actions .aa-btn-sm {
		font-size: 0.75rem !important;
		padding: 6px 12px !important;
	}
}

@media (max-width: 480px) {
	.aa-login-box {
		padding: 20px;
	}
	
	.aa-login-header h1 {
		font-size: 24px;
	}
}

