/* =================================================================
   BAAS.LK - PRO TRADESMAN PROFILE & GIGS DASHBOARD STYLESHEET
   Ultra-modern Glassmorphic Dark UI with Ambient Lighting
   ================================================================= */

:root {
  --brand-blue: #0066fe;
  --brand-blue-hover: #0052cc;
  --brand-blue-glow: rgba(0, 102, 254, 0.35);
  --brand-orange: #f59e0b;
  --brand-orange-hover: #d97706;
  --brand-orange-glow: rgba(245, 158, 11, 0.3);
  --brand-emerald: #10b981;
  --bg-dark: #030a16;
  --bg-surface: #071223;
  --bg-card: #0b192e;
  --bg-card-hover: #0e203b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(245, 158, 11, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
}

/* Base and Reset */
* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', 'Noto Sans Sinhala', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Lighting & Mesh Pattern */
.ambient-glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background: radial-gradient(circle at 50% -80px, rgba(0, 102, 254, 0.18) 0%, rgba(245, 158, 11, 0.12) 35%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.grid-mesh-bg {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: 0;
}

/* Glass Panels */
.glass-panel {
  background: rgba(11, 25, 46, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
}

.glass-nav {
  background: rgba(7, 18, 35, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

/* Top Navigation Bar */
.nav-link {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.5rem 0.85rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--brand-orange);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Online Status Toggle Pill */
.status-pill {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-pill:hover {
  background: rgba(16, 185, 129, 0.2);
}

.status-dot-pulse {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  background-color: var(--brand-emerald);
  box-shadow: 0 0 10px var(--brand-emerald);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

/* Glowing Action Button */
.btn-glow-primary {
  background: linear-gradient(135deg, var(--brand-orange), #ea580c);
  color: #030a16;
  font-weight: 900;
  font-size: 0.8125rem;
  padding: 0.6rem 1.15rem;
  border-radius: 0.875rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 6px 20px var(--brand-orange-glow);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-glow-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, #fbbf24, var(--brand-orange));
}

.btn-glow-blue {
  background: linear-gradient(135deg, var(--brand-blue), #004ecc);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.8125rem;
  padding: 0.6rem 1.15rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(0, 102, 254, 0.4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 6px 20px var(--brand-blue-glow);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-glow-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 102, 254, 0.5);
  background: linear-gradient(135deg, #2563eb, var(--brand-blue));
}

/* Profile Hero Banner */
.profile-cover-wrap {
  position: relative;
  background: linear-gradient(135deg, #091b38 0%, #050e1d 50%, #020712 100%);
  border-radius: 1.75rem;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.7);
}

.profile-cover-mesh {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 102, 254, 0.25), transparent 50%),
    radial-gradient(circle at 85% 60%, rgba(245, 158, 11, 0.18), transparent 45%);
  pointer-events: none;
}

.profile-avatar-xl {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 1.5rem;
  object-fit: cover;
  border: 4px solid var(--brand-orange);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.profile-avatar-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 22, 0.65);
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.profile-avatar-container:hover .profile-avatar-edit-overlay {
  opacity: 1;
}

/* Stat Highlight Cards */
.hero-stat-card {
  background: rgba(7, 18, 35, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 1rem 1.15rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.hero-stat-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
  background: rgba(11, 25, 46, 0.85);
}

/* Tab Navigation */
.tabs-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 800;
  padding: 0.75rem 1.25rem;
  border-radius: 0.875rem 0.875rem 0 0;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: #ffffff;
  border-bottom-color: var(--brand-orange);
  background: rgba(245, 158, 11, 0.08);
}

/* Gig Cards */
.gig-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .gig-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gig-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gig-card {
  background: #09172c;
  border: 1px solid var(--border-subtle);
  border-radius: 1.35rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  position: relative;
}

.gig-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.8);
}

.gig-image-wrap {
  position: relative;
  height: 12.5rem;
  overflow: hidden;
  background: #030a16;
}

.gig-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gig-card:hover .gig-image {
  transform: scale(1.05);
}

.gig-image-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 23, 44, 0.95) 0%, transparent 60%);
}

.gig-badge-category {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: rgba(7, 18, 35, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fbbf24;
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.gig-badge-status {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: rgba(6, 78, 59, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.gig-rate-overlay {
  position: absolute;
  bottom: 0.75rem;
  left: 0.85rem;
  right: 0.85rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.gig-price-amount {
  font-size: 1.15rem;
  font-weight: 900;
  color: #34d399;
}

.gig-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.gig-title {
  font-size: 0.9375rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.4;
  margin: 0 0 0.5rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gig-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 0.85rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gig-features-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.gig-feature-item {
  font-size: 0.6875rem;
  color: #cbd5e1;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gig-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: #09172c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.5rem;
  max-width: 42rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.modal-backdrop.active .modal-window {
  transform: translateY(0) scale(1);
}

/* Form Controls */
.form-input-dark {
  width: 100%;
  background: #050d1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff;
  transition: all 0.2s ease;
}

.form-input-dark:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.form-label-dark {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #cbd5e1;
  margin-bottom: 0.35rem;
}

/* Preset Image Selectors */
.preset-img-thumb {
  width: 100%;
  height: 4.5rem;
  border-radius: 0.75rem;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-img-thumb:hover {
  transform: scale(1.04);
}

.preset-img-thumb.selected {
  border-color: var(--brand-orange);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast-msg {
  background: #0a172c;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  border-radius: 0.875rem;
  padding: 0.75rem 1.15rem;
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
  transition: all 0.3s ease;
  transform: translateY(-10px);
  opacity: 0;
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-msg.success {
  border-left: 4px solid #10b981;
}

.toast-msg.info {
  border-left: 4px solid #0066fe;
}

.toast-msg.warning {
  border-left: 4px solid #f59e0b;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-pane {
  animation: fadeIn 0.25s ease-out;
}
