/* MSA Frontend Styles - Premium UI */
.msa-portal-layout { display: flex; min-height: 85vh; background: #f3f4f6; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); margin: 40px auto; max-width: 1200px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.msa-portal-sidebar { width: 280px; background: #111827; color: #fff; padding: 30px 0; display: flex; flex-direction: column; flex-shrink: 0; }
.msa-user-info { padding: 0 25px 25px 25px; border-bottom: 1px solid #1f2937; margin-bottom: 20px; }
.msa-user-info h3 { margin: 0 0 5px 0; font-size: 18px; font-weight: 700; color: #fff; }
.msa-user-info p { margin: 0; font-size: 13px; color: #9ca3af; }
.msa-nav { display: flex; flex-direction: column; }
.msa-nav a { padding: 12px 25px; color: #d1d5db; text-decoration: none; font-weight: 500; font-size: 15px; transition: all 0.2s; border-left: 3px solid transparent; }
.msa-nav a:hover, .msa-nav a.active { background: #1f2937; color: #fff; border-left-color: #4f46e5; }
.msa-nav a.logout { margin-top: auto; color: #fca5a5; }
.msa-nav a.logout:hover { background: #7f1d1d; border-left-color: #ef4444; }

.msa-portal-main { flex: 1; background: #fff; padding: 40px; overflow-y: auto; }
.msa-front-tab { display: none; animation: fadeIn 0.3s ease-in-out; }
.msa-front-tab.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.msa-portal-main h2 { margin-top: 0; margin-bottom: 30px; font-size: 24px; color: #111827; font-weight: 800; border-bottom: 1px solid #e5e7eb; padding-bottom: 15px; }

/* Progress Bar */
.msa-progress-wrapper { background: #374151; border-radius: 999px; height: 8px; width: 100%; margin-top: 15px; overflow: hidden; }
.msa-progress-fill { background: #10b981; height: 100%; border-radius: 999px; transition: width 0.5s ease; }
.msa-progress-text { font-size: 12px; font-weight: 600; color: #10b981; margin-top: 5px; display: block; text-align: right; }

/* Stepper */
.msa-stepper { display: flex; justify-content: space-between; margin-bottom: 40px; position: relative; }
.msa-stepper::before { content: ''; position: absolute; top: 15px; left: 0; right: 0; height: 3px; background: #e5e7eb; z-index: 1; }
.msa-step { position: relative; z-index: 2; text-align: center; flex: 1; }
.msa-step-circle { width: 32px; height: 32px; background: #fff; border: 3px solid #e5e7eb; border-radius: 50%; margin: 0 auto 10px auto; display: flex; align-items: center; justify-content: center; font-weight: bold; color: #9ca3af; transition: all 0.3s; }
.msa-step.active .msa-step-circle { border-color: #4f46e5; background: #4f46e5; color: #fff; box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2); }
.msa-step.completed .msa-step-circle { border-color: #10b981; background: #10b981; color: #fff; }
.msa-step-label { font-size: 13px; font-weight: 600; color: #6b7280; }
.msa-step.active .msa-step-label { color: #4f46e5; }
.msa-step.completed .msa-step-label { color: #10b981; }

/* Grid & Cards */
.msa-front-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; margin-bottom: 30px; }
.msa-front-card { border: 1px solid #e5e7eb; padding: 25px; border-radius: 12px; background: #f9fafb; transition: transform 0.2s; }
.msa-front-card:hover { transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.msa-front-card h4 { margin: 0 0 12px 0; color: #6b7280; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.msa-front-card .value { font-size: 24px; font-weight: 800; color: #111827; }

/* Tables */
.msa-front-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.msa-front-table th, .msa-front-table td { padding: 16px; text-align: left; border-bottom: 1px solid #e5e7eb; }
.msa-front-table th { background: #f9fafb; font-weight: 600; color: #374151; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.msa-front-table tr:last-child td { border-bottom: none; }

/* Status Badges */
.msa-front-status { padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 700; display: inline-block; }
.status-pending { background: #fef3c7; color: #d97706; }
.status-approved, .status-verified, .status-paid { background: #d1fae5; color: #059669; }
.status-rejected { background: #fee2e2; color: #dc2626; }
.status-applied { background: #e0e7ff; color: #4f46e5; }
.status-offer { background: #dbeafe; color: #2563eb; }

/* Forms */
.msa-form-group { margin-bottom: 20px; }
.msa-form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #374151; font-size: 14px; }
.msa-form-group input, .msa-form-group select, .msa-form-group textarea { width: 100%; padding: 12px 15px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; transition: border-color 0.2s; box-sizing: border-box; }
.msa-form-group input:focus, .msa-form-group select:focus, .msa-form-group textarea:focus { border-color: #4f46e5; outline: none; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }
.msa-btn { background: #4f46e5; color: #fff; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 15px; transition: background 0.2s; display: inline-block; text-decoration: none; }
.msa-btn:hover { background: #4338ca; }
.msa-btn-danger { background: #ef4444; }
.msa-btn-danger:hover { background: #dc2626; }

/* Profile Sections */
.msa-profile-box { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 25px; margin-bottom: 25px; }
.msa-profile-box h3 { margin-top: 0; margin-bottom: 20px; color: #111827; font-size: 18px; }

/* Timeline */
.msa-timeline { border-left: 2px solid #e5e7eb; margin-left: 15px; padding-left: 25px; }
.msa-timeline-item { position: relative; margin-bottom: 25px; }
.msa-timeline-item::before { content: ''; position: absolute; left: -32px; top: 0; width: 12px; height: 12px; border-radius: 50%; background: #4f46e5; border: 3px solid #fff; box-shadow: 0 0 0 2px #e5e7eb; }
.msa-timeline-date { font-size: 12px; color: #6b7280; margin-bottom: 6px; font-weight: 600; }
.msa-timeline-content { background: #f9fafb; padding: 15px 20px; border-radius: 8px; border: 1px solid #e5e7eb; }
.msa-timeline-content strong { color: #111827; display: block; margin-bottom: 5px; }

/* Chat Box */
.msa-chat-box { display: flex; flex-direction: column; gap: 15px; max-height: 400px; overflow-y: auto; padding: 20px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 20px; }
.msa-msg { max-width: 75%; padding: 12px 18px; border-radius: 12px; position: relative; font-size: 14px; line-height: 1.5; }
.msa-msg.sent { align-self: flex-end; background: #4f46e5; color: #fff; border-bottom-right-radius: 2px; }
.msa-msg.received { align-self: flex-start; background: #fff; color: #1f2937; border: 1px solid #e5e7eb; border-bottom-left-radius: 2px; }
.msa-msg-meta { font-size: 11px; opacity: 0.8; margin-bottom: 6px; display: block; font-weight: 600; }
.msa-msg.received .msa-msg-meta { color: #6b7280; }

/* Notice Cards */
.msa-notice-card { border-left: 4px solid #f59e0b; background: #fffbeb; padding: 15px 20px; border-radius: 8px; margin-bottom: 15px; border-top: 1px solid #fef3c7; border-right: 1px solid #fef3c7; border-bottom: 1px solid #fef3c7; }
.msa-notice-card.type-document_request { border-left-color: #3b82f6; background: #eff6ff; border-color: #dbeafe; border-left-color: #3b82f6; }
.msa-notice-card.type-interview { border-left-color: #8b5cf6; background: #f5f3ff; border-color: #ede9fe; border-left-color: #8b5cf6; }
.msa-notice-card.type-payment_reminder { border-left-color: #ef4444; background: #fef2f2; border-color: #fee2e2; border-left-color: #ef4444; }
.msa-notice-card h4 { margin: 0 0 5px 0; color: #111827; }
.msa-notice-card p { margin: 0; font-size: 13px; color: #4b5563; }
.msa-notice-meta { font-size: 11px; color: #6b7280; margin-top: 8px; display: block; }

/* Auth Container (Login & Register) */
.msa-auth-container { max-width: 450px; margin: 60px auto; background: #fff; border-radius: 16px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); border: 1px solid #f3f4f6; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
.msa-auth-tabs { display: flex; border-bottom: 1px solid #e5e7eb; background: #f9fafb; }
.msa-auth-tab { flex: 1; padding: 18px; text-align: center; font-weight: 700; font-size: 15px; color: #6b7280; cursor: pointer; border: none; background: transparent; transition: all 0.2s; }
.msa-auth-tab.active { color: #4f46e5; background: #fff; border-bottom: 3px solid #4f46e5; }
.msa-auth-tab:hover:not(.active) { color: #374151; background: #f3f4f6; }
.msa-auth-section { display: none; padding: 40px; animation: fadeIn 0.3s ease-in-out; }
.msa-auth-section.active { display: block; }
.msa-auth-section h2 { text-align: center; margin-top: 0; margin-bottom: 25px; color: #111827; font-weight: 800; font-size: 24px; }
.msa-auth-submit { width: 100%; background: #4f46e5; color: #fff; border: none; padding: 14px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 16px; transition: background 0.2s; margin-top: 10px; }
.msa-auth-submit:hover { background: #4338ca; }
.msa-auth-submit:disabled { background: #9ca3af; cursor: not-allowed; }
.msa-auth-msg { padding: 12px 15px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; font-weight: 600; display: none; }
.msa-auth-msg.error { display: block; background: #fee2e2; color: #dc2626; border: 1px solid #f87171; }
.msa-auth-msg.success { display: block; background: #d1fae5; color: #059669; border: 1px solid #34d399; }
.msa-front-notice { max-width: 600px; margin: 50px auto; background: #fee2e2; color: #dc2626; padding: 20px; border-radius: 12px; text-align: center; font-weight: 600; border: 1px solid #f87171; }

@media (max-width: 768px) {
    .msa-portal-layout { flex-direction: column; margin: 20px; }
    .msa-portal-sidebar { width: 100%; padding: 20px; }
    .msa-nav { flex-direction: row; overflow-x: auto; }
    .msa-nav a { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
    .msa-nav a:hover, .msa-nav a.active { border-left: none; border-bottom-color: #4f46e5; }
    .msa-portal-main { padding: 20px; }
}
