/* Login and Signup Screens */
#screen-login,
#screen-signup {
  justify-content: center;
  padding: 2rem;
  background-color: var(--bg-card);
}

.login-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.logo-area {
  text-align: center;
  margin-bottom: 0;
}

img.app-logo {
  width: 85px;
  height: 85px;
  max-height: 85px;
  object-fit: contain;
  margin: 0 auto 0.5rem auto;
  display: block;
}

.logo-area h1 {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.logo-area p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-secondary);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.auth-divider span {
  padding: 0 10px;
  font-size: 0.875rem;
}

/* Role Selection Screen */
#screen-role-selection {
  padding: 2rem;
  background-color: var(--bg-main);
}

.role-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.role-container h2 {
  margin-top: 2rem;
  font-size: 1.5rem;
  text-align: center;
}

.role-container p.text-muted {
  text-align: center;
  margin-bottom: 2rem;
}

.role-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.role-card {
  background-color: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.role-card:hover,
.role-card:active {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.role-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  font-size: 2rem;
}

.candidate-icon {
  background-color: var(--primary-light);
  color: var(--primary);
}

.employer-icon {
  background-color: var(--action-light);
  color: var(--action);
}

.role-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.role-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

#btnRoleBack {
  margin-top: auto;
  align-self: center;
}

/* App Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-header.simple {
  justify-content: flex-start;
  gap: 1rem;
}

.app-header.simple h2 {
  font-size: 1.125rem;
  flex: 1;
  text-align: center;
  margin-right: -2rem;
  /* visually center if back button is present */
}

.app-header.transparent {
  background-color: transparent;
  box-shadow: none;
  position: absolute;
  width: 100%;
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  object-fit: cover;
}

.avatar-xs {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  object-fit: cover;
}

.avatar-lg {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.greeting {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.125rem;
}

.header-profile h3 {
  font-size: 1rem;
  margin: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s;
}

.icon-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.icon-btn.primary-text {
  color: var(--primary);
}

/* Main Layouts Content */
.content-area {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.search-bar {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-bar i {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1.1rem;
  z-index: 1;
}

.search-bar input {
  width: 100%;
  padding: 0.875rem 2.75rem 0.875rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background-color: var(--bg-card);
  font-family: inherit;
  font-size: 0.875rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 59, 130, 246), 0.1);
}

.section-title {
  margin-bottom: 1rem;
}

.section-title h2 {
  font-size: 1.125rem;
}

/* Notification Dot */
.icon-btn {
  position: relative;
}

.notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--danger);
  border: 1.5px solid var(--bg-card);
}

/* My Applications Feed */
.my-apps-feed {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.my-app-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.my-app-card .app-status-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.my-app-card .app-status-icon.pending {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.my-app-card .app-status-icon.accepted {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.my-app-card .app-status-icon.rejected {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.my-app-card .app-card-body {
  flex: 1;
  min-width: 0;
}

.my-app-card .app-card-body h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-app-card .app-card-body p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.my-app-card .app-status-text {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.app-status-text.pending {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.app-status-text.accepted {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.app-status-text.rejected {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* Notification Card */
.notif-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.65rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.notif-card.unread {
  border-right: 3px solid var(--primary);
}

.notif-card .notif-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.notif-card .notif-body {
  flex: 1;
}

.notif-card .notif-body h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.notif-card .notif-body p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notif-card .notif-time {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

/* Feed Cards */
.job-feed,
.applicants-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.job-card,
.applicant-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s;
}

.job-card:active,
.applicant-card:active {
  transform: scale(0.98);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.card-title-area h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.match-badge {
  background-color: var(--action-light);
  color: var(--action-hover);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.match-badge i {
  font-size: 1rem;
}

/* Match Progress Bar — Pro job feed */
.match-progress-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0 0;
  margin-top: 0.5rem;
}

.match-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background-color: var(--border);
  overflow: hidden;
}

.match-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.match-percent-text {
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 36px;
  text-align: left;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.card-tag {
  background-color: var(--bg-main);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Bottom Navigation */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  background-color: var(--bg-card);
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.nav-item i {
  font-size: 1.5rem;
}

.nav-item.active {
  color: var(--primary);
}

/* Job Details */
.job-header-info {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.job-header-info h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.job-header-info p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.job-meta-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.meta-card {
  background-color: var(--bg-main);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.meta-card i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.meta-card span {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}

.job-description {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.job-description h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.job-description p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.bottom-action-bar {
  padding: 1.5rem;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
}

/* Profile Screen - Pro Design */
.profile-layout {
  background-color: var(--bg-main);
}

.profile-cover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #0d3b66 100%);
  padding: 3.5rem 1.5rem 2rem;
  text-align: center;
  color: var(--text-inverse);
  border-radius: 0 0 2rem 2rem;
  margin-bottom: 1rem;
  position: relative;
}

.profile-avatar-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  margin: 0 auto 0.75rem;
  overflow: hidden;
  background-color: #fff;
}

.profile-avatar-wrapper .avatar-lg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-cover h2 {
  color: var(--text-inverse);
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.profile-role-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-inverse);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.profile-email-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
}

/* Profile Stats Row */
.profile-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-card);
  margin: 0 1.5rem 1.5rem;
  border-radius: var(--radius-md);
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
}

.profile-stat-item {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.profile-stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.profile-stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.profile-stat-divider {
  width: 1px;
  height: 30px;
  background-color: var(--border);
}

.profile-menu {
  padding: 0 1.5rem;
}

.menu-item {
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.6rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.menu-item:active {
  transform: scale(0.98);
  box-shadow: none;
}

.menu-item .menu-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--action-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.75rem;
  color: var(--primary);
  font-size: 1.1rem;
}

.menu-item span {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
}

.menu-item .chevron {
  color: var(--text-secondary);
}

.menu-item.text-danger span,
.menu-item.text-danger .menu-icon {
  color: var(--danger);
}

.menu-item.text-danger .menu-icon {
  background-color: var(--danger-light);
}

/* Chat Contacts List */
.chat-contact-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 0.6rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s;
}

.chat-contact-card:active {
  transform: scale(0.98);
}

.chat-contact-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background-color: var(--action-light);
}

.chat-contact-body {
  flex: 1;
  min-width: 0;
}

.chat-contact-body h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.chat-contact-body p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-contact-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}

.chat-contact-meta .contact-time {
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.chat-contact-meta .unread-badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--primary);
}

/* Textarea in forms */
.input-group textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.75rem 1rem 0.75rem 3rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.input-group textarea:focus {
  outline: none;
}

/* Chat Screen */
.chat-layout {
  background-color: var(--bg-main);
}

.chat-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.chat-user-info h3 {
  font-size: 1rem;
}

.chat-area {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  max-width: 80%;
  padding: 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.5;
}

.message.received {
  align-self: flex-start;
  background-color: var(--bg-card);
  border-top-right-radius: 0;
  box-shadow: var(--shadow-sm);
}

.message.sent {
  align-self: flex-end;
  background-color: var(--primary);
  color: var(--text-inverse);
  border-top-left-radius: 0;
  box-shadow: var(--shadow-sm);
}

.chat-input-area {
  display: flex;
  align-items: center;
  padding: 1rem;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border);
  gap: 0.5rem;
}

.chat-input-area input {
  flex: 1;
  border: none;
  background-color: var(--bg-main);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-full);
  font-family: inherit;
}

.chat-input-area input:focus {
  outline: none;
}

/* Employer Stats */
.stats-cards {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  flex: 1;
  background-color: var(--primary);
  color: var(--text-inverse);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.stat-card.outline {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.stat-card h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: inherit;
  opacity: 0.9;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 800;
}

/* FAB */
.fab-container {
  position: absolute;
  bottom: 6.5rem;
  left: 1.5rem;
  z-index: 20;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: var(--text-inverse);
  border: none;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.fab:active {
  transform: scale(0.9);
}

/* Applicant Action Buttons */
.applicant-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Bottom Sheet Menu Items */
.sheet-item {
  width: 100%;
  text-align: right;
  padding: 1rem 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

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

.sheet-item i {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.sheet-title {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

/* Generic List Cards (Autre Data) */
.generic-list-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.generic-list-card .list-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--action-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
  font-size: 1.25rem;
}

.generic-list-card .list-card-body {
  flex: 1;
}

.generic-list-card .list-card-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.generic-list-card .list-card-body p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.generic-list-card .list-card-body .list-card-tag {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
}

.tag-green {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.tag-blue {
  background-color: var(--action-light);
  color: var(--primary);
}

.tag-orange {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

/* Enhanced Job Details Meta */
.job-detail-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.job-detail-meta .meta-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--action-light);
  color: var(--primary);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.job-detail-meta .meta-chip i {
  font-size: 0.9rem;
}