/* ================================
   BULAWORK UI COMPONENTS
   ================================ */

/* === NAVIGATION === */
.navbar {
  position: sticky;
  top: var(--space-4);
  z-index: 1000;
  margin: var(--space-4) auto;
  max-width: 1200px;
  padding: var(--space-3) var(--space-4);
}

.navbar-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-6);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--neutral-black);
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
}

.navbar-item {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  font-weight: 500;
  color: var(--neutral-grey);
  transition: var(--transition-fast);
  cursor: pointer;
}

.navbar-item:hover,
.navbar-item.active {
  background: rgba(255, 193, 7, 0.15);
  color: var(--neutral-black);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* === STAT CARD === */
.stat-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.stat-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.stat-card-icon.yellow {
  background: linear-gradient(135deg, #fff9e6 0%, #ffeaa7 100%);
  color: var(--primary-amber);
}

.stat-card-icon.green {
  background: linear-gradient(135deg, #e8f8f5 0%, #d1f2eb 100%);
  color: var(--accent-green);
}

.stat-card-icon.blue {
  background: linear-gradient(135deg, #e8f4ff 0%, #d0ebff 100%);
  color: var(--accent-blue);
}

.stat-card-icon.purple {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
  color: var(--accent-purple);
}

.stat-card-value {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--neutral-black);
  margin-bottom: var(--space-2);
}

.stat-card-label {
  font-size: var(--text-sm);
  color: var(--neutral-grey);
  font-weight: 500;
}

.stat-card-change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
}

.stat-card-change.positive {
  background: var(--status-green);
  color: var(--accent-green);
}

.stat-card-change.negative {
  background: var(--status-red);
  color: #dc2626;
}

/* === JOB CARD === */
.job-card {
  background: white;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  cursor: pointer;
}

.job-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.job-card-banner {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, var(--gradient-light-cream) 0%, var(--gradient-warm-yellow) 100%);
  position: relative;
}

.job-card-company-logo {
  position: absolute;
  bottom: -32px;
  left: var(--space-6);
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: white;
  padding: var(--space-2);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.job-card-company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.job-card-content {
  padding: var(--space-8) var(--space-6) var(--space-6);
}

.job-card-header {
  margin-bottom: var(--space-4);
}

.job-card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--neutral-black);
  margin-bottom: var(--space-2);
}

.job-card-company {
  font-size: var(--text-base);
  color: var(--neutral-grey);
  font-weight: 500;
}

.job-card-salary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: linear-gradient(135deg, #fff9e6 0%, #ffeaa7 100%);
  border-radius: var(--radius-pill);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--neutral-black);
  margin: var(--space-4) 0;
}

.job-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.job-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-4) 0;
  font-size: var(--text-sm);
  color: var(--neutral-grey);
}

.job-card-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.job-card-ai-score {
  background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-amber) 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-top: var(--space-4);
}

.job-card-ai-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--neutral-black);
  margin-bottom: var(--space-2);
}

.job-card-ai-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.job-card-ai-fill {
  height: 100%;
  background: white;
  border-radius: var(--radius-pill);
  transition: width 1s ease-out;
}

.job-card-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* === PROFILE CARD === */
.profile-card {
  background: white;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.profile-card-hero {
  background: linear-gradient(135deg, var(--gradient-light-cream) 0%, var(--gradient-warm-yellow) 100%);
  padding: var(--space-10) var(--space-6) var(--space-16);
  text-align: center;
  position: relative;
}

.profile-card-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto var(--space-4);
  border: 4px solid white;
  box-shadow: var(--shadow-glow-yellow);
  overflow: hidden;
}

.profile-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card-name {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--neutral-black);
  margin-bottom: var(--space-2);
}

.profile-card-role {
  font-size: var(--text-lg);
  color: var(--neutral-grey);
  font-weight: 500;
}

.profile-card-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.profile-card-content {
  padding: var(--space-8) var(--space-6);
}

.profile-card-section {
  margin-bottom: var(--space-8);
}

.profile-card-section:last-child {
  margin-bottom: 0;
}

.profile-card-section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--neutral-black);
  margin-bottom: var(--space-4);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.profile-stat {
  text-align: center;
  padding: var(--space-4);
  background: var(--gradient-light-cream);
  border-radius: var(--radius-lg);
}

.profile-stat-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--neutral-black);
  display: block;
}

.profile-stat-label {
  font-size: var(--text-sm);
  color: var(--neutral-grey);
  margin-top: var(--space-1);
}

/* === DATA TABLE === */
.data-table-wrapper {
  background: white;
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.data-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.data-table-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--neutral-black);
}

.data-table-filters {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.filter-pill {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--neutral-soft-grey);
  color: var(--neutral-grey);
  cursor: pointer;
  transition: var(--transition-fast);
  border: 2px solid transparent;
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--gradient-light-cream);
  color: var(--neutral-black);
  border-color: var(--primary-yellow);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 var(--space-2);
}

.data-table thead th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--neutral-grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tbody tr {
  background: var(--neutral-soft-grey);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
  cursor: pointer;
}

.data-table tbody tr:hover {
  background: var(--gradient-light-cream);
  box-shadow: var(--shadow-sm);
}

.data-table tbody tr.selected {
  background: linear-gradient(135deg, #fff9e6 0%, #ffeaa7 100%);
  box-shadow: var(--shadow-glow-soft);
}

.data-table tbody td {
  padding: var(--space-4);
}

.data-table tbody tr td:first-child {
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
}

.data-table tbody tr td:last-child {
  border-top-right-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.table-cell-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.table-cell-user-name {
  font-weight: 600;
  color: var(--neutral-black);
}

.table-cell-user-email {
  font-size: var(--text-sm);
  color: var(--neutral-grey);
}

/* === PROGRESS BAR === */
.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--neutral-soft-grey);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-yellow) 0%, var(--primary-amber) 100%);
  border-radius: var(--radius-pill);
  transition: width 0.8s ease-out;
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* === CIRCULAR PROGRESS === */
.circular-progress {
  position: relative;
  width: 120px;
  height: 120px;
}

.circular-progress svg {
  transform: rotate(-90deg);
}

.circular-progress-bg {
  fill: none;
  stroke: var(--neutral-soft-grey);
  stroke-width: 10;
}

.circular-progress-fill {
  fill: none;
  stroke: url(#gradient);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out;
}

.circular-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--neutral-black);
}

/* === CHART CONTAINER === */
.chart-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.chart-header {
  margin-bottom: var(--space-6);
}

.chart-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--neutral-black);
  margin-bottom: var(--space-2);
}

.chart-subtitle {
  font-size: var(--text-sm);
  color: var(--neutral-grey);
}

.chart-container {
  width: 100%;
  height: 300px;
  position: relative;
}

/* === MODAL === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: var(--transition-base);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.modal-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--neutral-black);
}

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-soft-grey);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--neutral-light-grey);
}

/* === BOTTOM SHEET (Mobile) === */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding: var(--space-6);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  z-index: 9999;
}

.bottom-sheet.active {
  transform: translateY(0);
}

.bottom-sheet-handle {
  width: 48px;
  height: 4px;
  background: var(--neutral-light-grey);
  border-radius: var(--radius-pill);
  margin: 0 auto var(--space-6);
}

/* === NOTIFICATION BADGE === */
.notification-badge {
  position: relative;
}

.notification-badge::after {
  content: attr(data-count);
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  background: #ef4444;
  color: white;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 2px solid white;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: var(--space-6);
  opacity: 0.3;
}

.empty-state-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--neutral-black);
  margin-bottom: var(--space-2);
}

.empty-state-description {
  font-size: var(--text-base);
  color: var(--neutral-grey);
  margin-bottom: var(--space-6);
}

/* === LOADING SPINNER === */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--neutral-soft-grey);
  border-top-color: var(--primary-yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}
