/* ========================================
   vibuzz Design System
   基於 Pencil 設計稿產出的設計令牌
   ======================================== */

:root {
  /* 主色系 */
  --primary: #D4E600;
  --primary-dark: #B8CC00;
  --primary-light: rgba(212, 230, 0, 0.12);
  --primary-border: rgba(212, 230, 0, 0.3);

  /* 輔助色 */
  --secondary: #10B981;
  --secondary-light: rgba(16, 185, 129, 0.12);
  --accent: #D4E600;
  --accent-light: rgba(212, 230, 0, 0.1);
  --danger: #EF4444;
  --danger-light: rgba(239, 68, 68, 0.12);

  /* 背景 */
  --background: #0F172A;
  --background-muted: #111827;
  --card: #1E293B;

  /* 文字 */
  --foreground: #F1F5F9;
  --foreground-muted: #94A3B8;
  --foreground-light: #64748B;
  --dark-text: #CBD5E1;

  /* 邊框 */
  --border: #334155;
  --border-light: #1E293B;

  /* 深色區塊 */
  --dark-bg: #0B1120;
  --dark-bg-secondary: #1E293B;

  /* 亮色背景上的深色文字 */
  --on-primary: #1A2000;
  --on-primary-muted: #2D3600;

  /* 字體 */
  --font-primary: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* 間距 */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* 圓角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* 陰影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);

  /* 動畫 */
  --transition: 150ms ease;
}

/* ========================================
   Reset & Base
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.6;
  color-scheme: dark;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #E8F500;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   Typography
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.3;
  color: var(--foreground);
}

h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.875rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--dark-text);
}

/* ========================================
   Layout
   ======================================== */
.container {
  max-width: 1172px; /* 1140px content + 2*16px padding with border-box */
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding-bottom: 80px;
}

@media (max-width: 768px) {
  .page-content {
    padding-bottom: 40px;
  }
}

/* Flex utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.gap-xs {
  gap: var(--spacing-xs);
}

.gap-sm {
  gap: var(--spacing-sm);
}

.gap-md {
  gap: var(--spacing-md);
}

.gap-lg {
  gap: var(--spacing-lg);
}

.gap-xl {
  gap: var(--spacing-xl);
}

.gap-2xl {
  gap: var(--spacing-2xl);
}

/* Grid */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 10px 20px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--on-primary);
}

.btn-secondary {
  background: var(--secondary);
  color: #FFFFFF;
  border-color: var(--secondary);
}

.btn-secondary:hover {
  opacity: 0.9;
  color: #FFFFFF;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--foreground-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--background-muted);
  color: var(--foreground);
}

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
  border-color: var(--danger);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-line {
  background: #06C755;
  color: #FFFFFF;
  border-color: #06C755;
}

.btn-line:hover {
  background: #05b04c;
  color: #FFFFFF;
}

.btn-white {
  background: #FFFFFF;
  color: var(--primary);
  border-color: #FFFFFF;
}

.btn-white:hover {
  background: var(--background-muted);
  color: var(--primary-dark);
}

.btn-outline-white {
  background: transparent;
  color: #FFFFFF;
  border-color: #FFFFFF;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

/* Disabled button state */
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========================================
   Form Elements
   ======================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--spacing-md);
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

/* Required field indicator */
.required {
  color: var(--danger);
  font-weight: 700;
  margin-left: 2px;
}

/* Invalid form field highlight */
.form-input:invalid:not(:placeholder-shown),
.form-select:invalid:not([value=""]),
.form-textarea:invalid:not(:placeholder-shown) {
  border-color: var(--danger);
}

.form-input:valid,
.form-select:valid,
.form-textarea:valid {
  border-color: var(--border);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--foreground);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: 2px solid transparent;
  /* for Windows High Contrast */
}

/* Focus visible for keyboard navigation */
.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--foreground-light);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Custom Select Dropdown Wrapper */
.custom-select-wrap {
  position: relative;
  display: inline-block;
}

.custom-select-wrap .cs-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition);
  white-space: nowrap;
}

.custom-select-wrap .cs-trigger:hover,
.custom-select-wrap.open .cs-trigger {
  border-color: var(--primary);
}

.custom-select-wrap .cs-trigger .cs-arrow {
  width: 16px;
  height: 16px;
  color: var(--foreground-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.custom-select-wrap.open .cs-trigger .cs-arrow {
  transform: rotate(180deg);
}

.custom-select-wrap .cs-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  max-height: 280px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  padding: var(--spacing-xs) 0;
}

.custom-select-wrap.open .cs-dropdown {
  display: block;
}

.custom-select-wrap .cs-option {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.custom-select-wrap .cs-option:hover {
  background: var(--primary-light);
}

.custom-select-wrap .cs-option.selected {
  color: var(--primary);
  font-weight: 600;
}

.custom-select-wrap .cs-option.selected::before {
  content: "\2713";
  color: var(--primary);
  font-weight: 700;
  width: 16px;
  flex-shrink: 0;
}

.custom-select-wrap .cs-option:not(.selected)::before {
  content: "";
  width: 16px;
  flex-shrink: 0;
}

/* ========================================
   Cards
   ======================================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* 卡片內按鈕統一靠底 */
.card {
  display: flex;
  flex-direction: column;
}

.card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card .card-body .btn:last-child {
  margin-top: auto;
}

.card-body {
  padding: var(--spacing-lg);
}

.card-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border);
}

/* ========================================
   Badges
   ======================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1;
}

.badge-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.badge-success {
  background: var(--secondary-light);
  color: var(--secondary);
}

.badge-warning {
  background: var(--accent-light);
  color: var(--accent);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

/* ========================================
   Avatars
   ======================================== */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: #FFFFFF;
  background: var(--primary);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-placeholder,
.avatar.avatar-placeholder {
  background: var(--primary);
  color: var(--on-primary);
}

.avatar-placeholder i {
  width: 50%;
  height: 50%;
  opacity: 1;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.avatar-md {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

.avatar-xl {
  width: 96px;
  height: 96px;
  font-size: 36px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================
   Dashboard Layout
   ======================================== */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: var(--background-muted);
}

.dashboard-sidebar {
  width: 260px;
  background: var(--dark-bg);
  color: #FFFFFF;
  padding: var(--spacing-md) 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
}

.sidebar-logo {
  padding: 0 var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  flex-shrink: 0;
}

/* Role Switcher */
.role-switcher {
  margin: 0 var(--spacing-sm) var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.role-switcher-current {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.role-switcher-toggle {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.15s;
}

.role-switcher-toggle:hover {
  color: #FFFFFF;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  padding: 0 var(--spacing-sm);
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.sidebar-nav:hover {
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 10px var(--spacing-md);
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}

.sidebar-item:hover {
  background: var(--dark-bg-secondary);
  color: #FFFFFF;
}

.sidebar-item.active {
  background: var(--primary);
  color: var(--on-primary);
}

.sidebar-item i,
.sidebar-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.4);
}
.sidebar-item:hover i,
.sidebar-item:hover svg {
  color: rgba(255, 255, 255, 0.7);
}
.sidebar-item.active i,
.sidebar-item.active svg {
  color: var(--on-primary);
}
.sidebar-icon-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.sidebar-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #EF4444;
  border: 2px solid var(--card);
}
.sidebar-item.active .sidebar-dot {
  border-color: var(--primary);
}

/* Sidebar Section Label */
.sidebar-section {
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: var(--spacing-sm);
  flex-shrink: 0;
}

/* Sidebar Bottom (logout area) */
.sidebar-bottom {
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--dark-bg-secondary);
  flex-shrink: 0;
  margin-top: auto;
}

.sidebar-bottom a {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition);
}

.sidebar-bottom a:hover {
  color: #FFFFFF;
}

.sidebar-bottom a i,
.sidebar-bottom a svg {
  width: 20px;
  height: 20px;
}

.dashboard-main {
  flex: 1;
  margin-left: 260px;
  padding: var(--spacing-xl);
  background: var(--background-muted);
  min-height: 100vh;
}

/* ========================================
   Stat Cards
   ======================================== */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.stat-card .stat-label {
  font-size: 14px;
  color: var(--foreground-muted);
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-secondary);
  color: var(--foreground);
}

/* ========================================
   Tables
   ======================================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.data-table th {
  padding: 12px var(--spacing-md);
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground-muted);
  background: var(--background-muted);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px var(--spacing-md);
  font-size: 14px;
  color: var(--dark-text);
  border-bottom: 1px solid var(--border-light);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--background-muted);
}

/* ========================================
   Search Bar
   ======================================== */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px var(--spacing-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(212, 230, 0, 0.15);
}
.search-bar:focus-within > i,
.search-bar:focus-within > svg {
  color: var(--primary);
}

.search-bar > i,
.search-bar > svg {
  transition: color 0.2s ease;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--foreground);
  background: transparent;
}

.search-bar input::placeholder {
  color: var(--foreground-light);
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground-muted);
  text-decoration: none;
  transition: all var(--transition);
}

.pagination a:hover {
  background: var(--background-muted);
  color: var(--foreground);
}

.pagination .current {
  background: var(--primary);
  color: var(--on-primary);
}

/* ========================================
   Messages / Chat
   ======================================== */
.messages-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--background);
}

/* 訊息中心：全螢幕佈局，移除外層 padding，高度填滿視窗 */
.page-content:has(.messages-layout) {
  padding-bottom: 0;
}
.dashboard-layout:has(.messages-layout) {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.dashboard-layout:has(.messages-layout) .dashboard-main {
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: 0;
}

.conversation-list {
  width: 320px;
  min-width: 320px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.conversation-list-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border);
}

.conversation-item {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
  align-items: flex-start;
}

.conversation-item:hover,
.conversation-item.active {
  background: var(--primary-light);
}

.conversation-info {
  flex: 1;
  min-width: 0;
}

.conversation-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--foreground);
}

.conversation-project {
  font-size: 12px;
  color: var(--primary);
}

.conversation-preview {
  font-size: 13px;
  color: var(--foreground-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-time {
  font-size: 12px;
  color: var(--foreground-light);
  flex-shrink: 0;
}

.unread-badge {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--danger);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border);
}

.chat-messages {
  flex: 1;
  min-height: 0;
  padding: var(--spacing-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  background: var(--background-muted);
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.chat-messages:hover {
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
}

.chat-messages:hover::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
}

.message-row {
  display: flex;
  gap: var(--spacing-sm);
  align-items: flex-end;
}

.message-row.sent {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 480px;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.5;
}

.message-bubble.received {
  background: var(--background);
  color: var(--dark-text);
  border-bottom-left-radius: var(--radius-sm);
}

.message-bubble.sent {
  background: var(--primary);
  color: var(--on-primary);
  border-bottom-right-radius: var(--radius-sm);
}

.message-time {
  font-size: 11px;
  margin-top: var(--spacing-xs);
}

.message-bubble.received .message-time {
  color: var(--foreground-light);
}

.message-bubble.sent .message-time {
  color: rgba(255, 255, 255, 0.7);
}

.chat-input {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  border-top: 1px solid var(--border);
  background: var(--background);
}

.chat-input-field {
  flex: 1;
  height: 44px;
  padding: 0 var(--spacing-md);
  background: var(--background-muted);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: 14px;
  outline: none;
}

.chat-input-field:focus {
  background: var(--border-light);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.chat-send-btn:hover {
  background: var(--primary-dark);
}

/* Message grouping: consecutive messages from same sender */
.message-row.grouped {
  margin-top: -6px;
}

.message-row.grouped .avatar {
  visibility: hidden;
}

.message-row.grouped .message-bubble {
  border-radius: var(--radius-lg);
}

.message-row.grouped.received .message-bubble {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}

.message-row.grouped.sent .message-bubble {
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

.message-row.group-last.received .message-bubble {
  border-top-left-radius: var(--radius-sm);
}

.message-row.group-last.sent .message-bubble {
  border-top-right-radius: var(--radius-sm);
}

/* Date separators */
.date-separator {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin: var(--spacing-md) 0;
  color: var(--foreground-light);
  font-size: 12px;
}

.date-separator::before,
.date-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

/* Message bubble polish */
.message-bubble {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 0.1s ease;
}

.message-bubble.sent {
  background: linear-gradient(135deg, var(--primary), #1D4ED8);
}

/* Optimistic message: pending state */
.message-row.pending .message-bubble {
  opacity: 0.6;
}

.message-row.pending .message-time::after {
  content: ' ⏳';
}

/* Conversation tabs (全部 / 已封存) — 置底 */
.conv-tabs {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.conv-tab {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.conv-tab:hover {
  color: var(--foreground);
}

.conv-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.conv-tab-badge {
  display: inline-block;
  background: var(--foreground-light);
  color: #fff;
  font-size: 11px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  margin-left: 4px;
}

/* Chat header more menu */
.chat-more-menu {
  position: relative;
}

.chat-more-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-md);
  color: var(--foreground-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.chat-more-btn:hover {
  background: var(--background-muted);
}

.chat-more-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: 50;
  overflow: hidden;
}

.chat-more-dropdown.open {
  display: block;
}

.chat-more-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
  transition: background 0.1s;
}

.chat-more-dropdown button:hover {
  background: var(--background-muted);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: #fff;
  pointer-events: auto;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 360px;
}

.toast-success {
  background: #16A34A;
}

.toast-error {
  background: var(--danger);
}

.toast-info {
  background: var(--primary);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ========================================
   Header
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-xl);
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  gap: var(--spacing-lg);
}

.site-header .logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.site-header .logo img {
  width: 160px;
  height: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xl);
}

.header-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--foreground-muted);
  transition: color var(--transition);
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--primary);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.header-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground-muted);
  text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
}

.header-link:hover {
  color: var(--foreground);
}

.header-link-primary {
  color: var(--primary);
  font-weight: 600;
}

.header-link-primary:hover {
  color: #E8F500;
}

/* ---- Header User Welcome ---- */
.header-user-welcome {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
}

.header-welcome-text {
  font-size: 13px;
  color: var(--foreground-muted);
  white-space: nowrap;
}

.header-welcome-text strong {
  color: var(--foreground);
  font-weight: 600;
}

.header-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid;
}

.header-role-badge.header-role-freelancer {
  color: #10B981;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
}

.header-role-badge.header-role-client {
  color: var(--primary);
  border-color: rgba(212, 230, 0, 0.3);
  background: rgba(212, 230, 0, 0.08);
}

.header-role-badge.header-role-investor {
  color: #F59E0B;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
}

/* Mobile welcome */
.mobile-user-welcome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--spacing-sm) 0 var(--spacing-md);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--spacing-sm);
  font-size: 14px;
  color: var(--foreground-muted);
}

.mobile-user-welcome strong {
  color: var(--foreground);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background: var(--dark-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-brand .logo {
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--spacing-sm);
}

.footer-brand .logo img {
  max-width: 160px;
  height: auto;
}

.footer-col h4,
.footer-column h4 {
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.footer-col a,
.footer-column a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  margin-bottom: var(--spacing-sm);
  transition: color var(--transition);
}

.footer-col a:hover,
.footer-column a:hover {
  color: #FFFFFF;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-lg);
  text-align: center;
  font-size: 13px;
  font-family: var(--font-secondary);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  text-align: center;
  padding: 80px var(--spacing-xl);
  background: linear-gradient(135deg, var(--primary-light), var(--background));
}

.hero h1 {
  font-size: 2.75rem;
  margin-bottom: var(--spacing-md);
}

.hero p {
  font-size: 1.125rem;
  color: var(--foreground-muted);
  max-width: 600px;
  margin: 0 auto var(--spacing-xl);
}

/* ========================================
   Auth Layout (Login / Register)
   ======================================== */
.auth-layout {
  display: flex;
  min-height: 100vh;
  margin-bottom: -80px; /* offset .page-content padding-bottom */
}

@media (max-width: 768px) {
  .auth-layout {
    margin-bottom: -40px;
  }
}

.auth-brand {
  width: 50%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(ellipse at bottom, #0C1116 0%, #090a0f 100%);
  color: #fff;
  padding: var(--spacing-2xl);
  position: relative;
  overflow: hidden;
}

/* 星空地平線光暈（黃色） */
.auth-brand::before {
  content: "";
  position: absolute;
  bottom: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 160%;
  height: 60%;
  border-radius: 100% / 100%;
  background: rgba(212, 230, 0, 0.08);
  filter: blur(40px);
  z-index: 1;
  pointer-events: none;
}

.auth-brand::after {
  content: "";
  position: absolute;
  bottom: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 25%;
  border-radius: 100% / 100%;
  background: rgba(212, 230, 0, 0.15);
  filter: blur(60px);
  z-index: 1;
  pointer-events: none;
}

.auth-brand img {
  max-width: 120px;
  height: auto;
  margin-bottom: var(--spacing-lg);
}

.auth-form {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-2xl);
}

/* ========================================
   Detail Layout (Project / Freelancer)
   ======================================== */
.detail-layout {
  display: flex;
  gap: var(--spacing-xl);
  align-items: flex-start;
}

.detail-sidebar {
  width: 360px;
  flex-shrink: 0;
}

.detail-sidebar-sm {
  width: 320px;
  flex-shrink: 0;
}

/* ========================================
   Tag Input (Autocomplete)
   ======================================== */
.tag-input-wrapper {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: var(--background);
  cursor: text;
  min-height: 44px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.tag-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.tag-input-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 13px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  line-height: 1;
  white-space: nowrap;
}

.tag-input-badge .tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--on-primary);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.tag-input-badge .tag-remove:hover {
  opacity: 1;
}

.tag-input-field {
  flex: 1;
  min-width: 120px;
  border: none;
  outline: none;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--foreground);
  background: transparent;
  padding: 4px 0;
}

.tag-input-field::placeholder {
  color: var(--foreground-light);
}

.tag-input-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}

.tag-input-dropdown.active {
  display: block;
}

.tag-input-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--foreground);
  cursor: pointer;
  transition: background var(--transition);
}

.tag-input-option:hover,
.tag-input-option.highlighted {
  background: var(--primary-light);
}

.tag-input-option .tag-count {
  font-size: 12px;
  color: var(--foreground-light);
}

.tag-input-hint {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--foreground-muted);
}

/* Tag Input Layout (input + suggestions side by side) */
.tag-input-layout {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
}

.tag-input-layout>.tag-input-wrapper {
  flex: 1;
  min-width: 0;
}

/* Suggested Skills Panel */
.tag-suggestions {
  flex: 0 0 220px;
  background: var(--background-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
}

.tag-suggestions-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--foreground-muted);
  margin-bottom: var(--spacing-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-suggestions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-suggestion-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 13px;
  font-family: var(--font-primary);
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.tag-suggestion-chip:hover {
  background: var(--primary);
  color: var(--on-primary);
}

@media (max-width: 768px) {
  .tag-input-layout {
    flex-direction: column;
  }

  .tag-suggestions {
    flex: none;
    width: 100%;
  }
}

/* ========================================
   Profile Section Title
   ======================================== */
.profile-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--spacing-md);
  font-size: 1.1rem;
}

/* ========================================
   Filter Chips (多重篩選標籤)
   ======================================== */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--background);
  font-size: 13px;
  color: var(--foreground-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.filter-chip.active .filter-chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

.filter-chip-count {
  font-size: 11px;
  background: var(--background-muted);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  color: var(--foreground-light);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-sidebar {
    width: 220px;
  }

  .dashboard-main {
    margin-left: 220px;
  }

  .detail-sidebar {
    width: 300px;
  }

  .detail-sidebar-sm {
    width: 280px;
  }
}

@media (max-width: 768px) {

  .section {
    padding: 40px 0;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* Auth layout: hide brand, form full width */
  .auth-brand {
    display: none;
  }

  .auth-form {
    width: 100%;
    padding: var(--spacing-xl) var(--spacing-md);
  }

  /* Detail layout: stack vertically */
  .detail-layout {
    flex-direction: column;
  }

  .detail-sidebar,
  .detail-sidebar-sm {
    width: 100%;
  }

  /* Dashboard */
  .dashboard-sidebar {
    display: none;
  }

  .dashboard-main {
    margin-left: 0;
    padding: var(--spacing-md);
  }

  /* Messages */
  .messages-layout {
    flex-direction: column;
  }

  .conversation-list {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 35vh;
    max-height: 35dvh;
    min-height: 120px;
  }

  .chat-panel {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .chat-messages {
    min-height: 0;
  }

  /* Header / Hero */
  .hero {
    padding: var(--spacing-2xl) var(--spacing-md);
  }

  .hero h1 {
    font-size: 2rem;
  }

  .site-header {
    padding: 0 var(--spacing-md);
  }

  .header-nav {
    display: none;
  }

  /* Typography adjustments */
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  /* Container padding */
  .container {
    padding: 0 var(--spacing-md);
  }

  /* Mobile hamburger */
  .mobile-menu-btn {
    display: flex !important;
  }

  .header-actions .header-link,
  .header-actions .header-user-welcome {
    display: none;
  }

  /* Dashboard sidebar: hide non-essential items */
  .sidebar-logo {
    display: none;
  }

  /* Table responsive */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Grid: keep 2 cols on tablet for freelancer cards */
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Utility Classes
   ======================================== */

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Alert components */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: var(--spacing-lg);
}

.alert-danger {
  background: var(--danger-light);
  border: 1px solid #FECACA;
  color: var(--danger);
}

.alert-success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #16A34A;
}

/* Table responsive wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

/* Toast notification */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

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

.toast-success {
  background: var(--secondary);
}

.toast-error {
  background: var(--danger);
}

/* Mobile navigation overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9000;
}

.mobile-nav-overlay.active {
  display: block;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--background);
  z-index: 9001;
  transition: right 0.3s ease;
  padding: var(--spacing-lg);
  overflow-y: auto;
}

.mobile-nav-panel.active {
  right: 0;
}

.mobile-nav-panel a {
  display: block;
  padding: var(--spacing-sm) 0;
  color: var(--foreground);
  font-size: 16px;
  border-bottom: 1px solid var(--border-light);
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
  color: var(--foreground);
}

/* ========================================
   Freelancer Profile Page — Magazine Layout
   fp- prefix namespace
   ======================================== */

/* ---- Floating Profile Nav ---- */
.fp-floating-nav {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  height: 80px;
  display: flex;
  align-items: center;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.fp-floating-nav.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Floating nav: 1140px, 3 columns [identity | links | cta] */
.fp-fnav-bar {
  width: 900px;
  display: flex;
  align-items: center;
  margin: 0 auto;
  padding: 0 16px;
}

/* Avatar + name: compact, no grow */
.fp-fnav-identity {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 20px;
}

/* Nav name (beside avatar) */
.fp-fnav-name {
  font-weight: 600;
  font-size: 14px;
  color: #FFFFFF;
  margin-left: 10px;
  white-space: nowrap;
}

/* Nav links: fill middle space, items spread evenly */
.fp-fnav-bar .fp-nav-links {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

/* CTA button: compact, no grow */
.fp-fnav-cta {
  flex-shrink: 0;
  margin-left: 20px;
}

/* Divider line between nav items */
.fp-fnav-divider {
  width: 2px;
  height: 14px;
  background: #FFFFFF;
  flex-shrink: 0;
}

.fp-floating-nav .fp-nav-links a {
  font-family: 'Noto Sans TC', var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.fp-floating-nav .fp-nav-links a:hover,
.fp-floating-nav .fp-nav-links a.active {
  color: #D4E600;
}

/* CTA button in floating nav */
.fp-fnav-cta {
  font-size: 14px;
  padding: 6px 16px;
  border-radius: 9999px;
}

/* ---- Hero Section (Magazine Cover) ---- */
/* ============================================================
   Freelancer Page — Light (Warm Grey / Beige) Override
   ============================================================ */
.fp-page-light {
  --background: #F5F3EF;
  --background-muted: #EDE9E3;
  --card: #FFFFFF;
  --foreground: #1C1917;
  --foreground-muted: #57534E;
  --foreground-light: #A8A29E;
  --dark-text: #44403C;
  --border: #D6D3D1;
  --border-light: #E7E5E4;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  background: var(--background);
  color: var(--foreground);
}

.fp-page-light .card {
  background: var(--card);
  border-color: var(--border);
}

.fp-page-light .breadcrumb a { color: var(--foreground-muted); }
.fp-page-light .breadcrumb span { color: var(--foreground); }

/* Buttons in light page */
.fp-page-light .btn-primary {
  background: var(--primary);
  color: #1A2000;
  border-color: var(--primary);
}
.fp-page-light .btn-primary:hover {
  background: #C2D400;
  color: #1A2000;
}
.fp-page-light .btn-primary i,
.fp-page-light .btn-primary svg {
  color: #1A2000;
}

.fp-page-light .btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}
.fp-page-light .btn-outline:hover {
  background: var(--background-muted);
  border-color: var(--foreground-light);
  color: var(--foreground);
}

.fp-page-light .btn-ghost {
  color: var(--foreground-muted);
}
.fp-page-light .btn-ghost:hover {
  background: var(--background-muted);
  color: var(--foreground);
}

/* Tags / badges in light */
.fp-page-light .fp-skill-tag {
  background: white;
  color: black;
  border-color: #D6D3D1;
}
.fp-page-light .fp-skill-tag:hover {
  background: var(--primary);
  color: #1A2000;
  border-color: var(--primary);
}

/* Section alt background */
.fp-page-light .fp-section-alt {
  background: var(--background-muted);
}

/* (timeline dot removed - using left-border list now) */

/* (old review card overrides removed) */

/* (CTA styles now set directly on .fp-cta-section, no light-page override needed) */

/* Floating nav — 統一暗色毛玻璃（不再區分 light/dark page） */

/* Section title overrides on light page */
.fp-page-light .fp-section-title-en {
  color: #272E34;
}
.fp-page-light .fp-section-title-zh {
  color: #C7D800;
}

/* Quick facts highlight — dark text for contrast on light bg */
.fp-page-light .fp-fact-highlight {
  color: var(--foreground);
  font-weight: 700;
}

/* (old review avatar removed — using new slider cards) */

/* Service arrow color */
.fp-page-light .fp-service-arrow {
  color: var(--foreground-muted);
}

/* (old featured review removed) */

/* Outline button hover — stronger border */
.fp-page-light .btn-outline:hover {
  border-color: var(--foreground-muted);
}

/* Hero outline button hover — stronger border */
.fp-page-light .fp-btn-hero-outline:hover {
  border-color: var(--foreground-muted);
}

/* ---- Hero (Figma Design) ---- */
.fp-hero-editorial {
  position: relative;
  background: linear-gradient(180deg, #0C1428 2%, #434F70 18%, #0C1428 39%, #F8F6F2 100%);
  padding: clamp(60px, 8vh, 100px) 0 clamp(40px, 5vh, 64px);
  border-bottom: none;
  overflow: hidden;
}

/* Blurred background photo */
.fp-he-blur-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(15px);
  opacity: 0.5;
  z-index: 0;
}

/* Gradient overlay — transparent → white, starts 26% down */
.fp-he-gradient-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 26%;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #FFFFFF 100%);
  z-index: 1;
}

/* ---- Breadcrumb Bar (獨立於 Hero，背景同 header #0F172A) ---- */
.fp-breadcrumb-bar {
  background: #0F172A;
  padding: 10px 0;
}

.fp-breadcrumb-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fp-breadcrumb-inner a {
  font-family: 'Noto Sans TC', var(--font-primary);
  font-size: 14px;
  font-weight: 350;
  color: #F3F4F6;
  text-decoration: none;
}

.fp-breadcrumb-inner a:hover {
  color: #D4E600;
}

.fp-bc-sep {
  font-size: 12px;
  color: #F3F4F6;
}

.fp-bc-current {
  font-family: 'Noto Sans TC', var(--font-primary);
  font-size: 14px;
  font-weight: 350;
  color: #D4E600;
}

/* Visible banner image */
.fp-he-banner-wrap {
  position: relative;
  z-index: 2;
  margin-top: 60px;
  margin-bottom: 40px;
}

.fp-he-banner-img {
  width: 100%;
  max-height: 605px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

/* Floating contact button — banner bottom-right */
.fp-he-contact-float {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 3;
}

/* Decorative tape strip (top-right of banner area) */
.fp-he-tape {
  position: absolute;
  width: 74px;
  height: 174px;
  right: 107px;
  top: -16px;
  background: linear-gradient(354deg, rgba(255,255,255,0.48) 0%, rgba(140,140,140,0.48) 100%);
  transform: rotate(57deg);
  z-index: 4;
  pointer-events: none;
}

.fp-he-content {
  position: relative;
  z-index: 2;
}

/* Name — positioned in lower (light) area of gradient */
.fp-he-name {
  font-size: 54px;
  font-family: 'Expletus Sans', var(--font-secondary);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 1.36px;
  margin: 0 0 60px 0;
  color: #25231F;
}

/* Stats Row */
.fp-he-stats-row {
  display: flex;
  align-items: center;
  gap: 68px;
  margin-bottom: 24px;
  padding-bottom: 0;
  border-bottom: none;
}

.fp-he-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.fp-he-stat-num {
  font-size: 51px;
  font-weight: 700;
  font-family: 'Expletus Sans', var(--font-secondary);
  line-height: 1;
  color: #D4E600;
}

.fp-he-stat-label {
  font-size: 16px;
  color: #020202;
  font-weight: 600;
  letter-spacing: 1.56px;
}

/* Angled divider line between stats — 右上到左下 (\) */
.fp-he-stat-divider {
  width: 2px;
  height: 70px;
  background: #D4E600;
  transform: rotate(20deg);
  flex-shrink: 0;
}

/* Skill pills — matches Pencil: black bg, yellow text, 18px */
.fp-he-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 0;
  padding: 0;
  justify-content: flex-start;
}

.fp-he-skill-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 19px;
  font-size: 18px;
  font-weight: 400;
  border-radius: 9999px;
  background: #020202;
  color: #D4E600;
  border: none;
}

.fp-he-skill-highlight {
  background: #D4E600;
  color: #000000;
  font-weight: 600;
}

/* Divider line */
.fp-he-divider {
  height: 2px;
  background: #060606;
  margin: 24px 0;
}

/* Bio section in hero */
.fp-he-bio-section {
  margin-bottom: 24px;
  padding-bottom: 0;
  border-bottom: none;
}

.fp-he-bio-text {
  font-size: 18px;
  line-height: 2;
  color: #020202;
  font-weight: 350;
  max-width: 1020px;
}

.fp-he-bio-empty {
  font-style: italic;
  color: var(--foreground-light);
  margin: 0;
}

/* Info pills — each pill is independent rounded chip */
.fp-he-info-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 20px 0;
  margin-bottom: 24px;
  background: none;
  border-radius: 0;
  height: auto;
  backdrop-filter: none;
}

.fp-he-info-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 350;
  color: #000000;
  white-space: nowrap;
  background: rgba(255,255,255,0.8);
  border-radius: 30px;
  padding: 12px 20px;
}

.fp-he-info-item i,
.fp-he-info-item svg {
  color: #000000;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

/* CTA */
.fp-he-cta {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

/* Contact button (green border) */
.fp-btn-hero-contact {
  background: #020202;
  color: #01E28F;
  border: 3px solid #01E28F;
  border-radius: 9999px;
  padding: 14px 20px;
  font-weight: 350;
  font-size: 18px;
  transition: all 0.3s;
}

.fp-btn-hero-contact i,
.fp-btn-hero-contact svg {
  color: #01E28F;
}

.fp-btn-hero-contact:hover {
  background: #01E28F;
  color: #020202;
}

.fp-btn-hero-contact:hover i,
.fp-btn-hero-contact:hover svg {
  color: #020202;
}

/* Keep old btn styles for CTA section reuse */
.fp-btn-hero-primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 12px 28px;
}

.fp-btn-hero-primary i,
.fp-btn-hero-primary svg {
  color: var(--on-primary);
}

.fp-btn-hero-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(212,230,0,0.2);
}

.fp-btn-hero-outline {
  background: transparent;
  color: var(--foreground-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 12px 28px;
}

.fp-btn-hero-outline i,
.fp-btn-hero-outline svg {
  color: var(--foreground-light);
}

.fp-btn-hero-outline:hover {
  background: var(--background-muted);
  border-color: var(--foreground-light);
  color: var(--foreground);
}

.fp-edit-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  background: rgba(255,255,255,0.9);
  color: #272E34;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-full);
  font-size: 13px;
}

.fp-edit-btn:hover {
  background: #fff;
  color: #000;
}

/* ---- Section Label (Bilingual Title) ---- */
.fp-section-label {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.fp-section-title-en {
  font-family: 'Expletus Sans', var(--font-secondary);
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.55px;
  color: #272E34;
  margin: 0;
  line-height: 1.1;
}

.fp-section-title-zh {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.95px;
  color: #C7D800;
}

/* Dark sections (About, Portfolio): EN title gradient — 亮黃在上，深色在下 */
.fp-section-dark .fp-section-title-en {
  background: linear-gradient(0deg, #272E34 0%, #DDE751 79%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.fp-section-dark .fp-section-title-zh {
  color: #D4E600;
}

/* Services section title: yellow gradient top→bottom (same as other dark sections) */

/* Experience section title: fade-in bottom→top */
.fp-section-experience .fp-section-title-en {
  background: linear-gradient(0deg, #272E3400 0%, #272E34 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.fp-section-experience .fp-section-title-zh {
  color: #272E34;
}

/* Reviews section: dark bg + overflow hidden for slider */
.fp-section-reviews {
  overflow: hidden;
}

/* Reviews section title: uses .fp-section-dark styles (yellow gradient) */

/* ---- Section Generic ---- */
.fp-section {
  padding: 96px 0;
  scroll-margin-top: 140px;
}

.fp-section + .fp-section {
  border-top: 1px solid var(--border);
}

.fp-section-alt {
  background: var(--card);
}

/* Dark background sections (About, Portfolio) */
.fp-section-dark {
  background: #0F172A;
  color: #F3F4F6;
  border-top-color: transparent;
}

.fp-section-dark + .fp-section {
  border-top-color: #D6D3D1;
}

.fp-section-dark .fp-about-content,
.fp-section-dark .fp-about-content p {
  color: #F3F4F6;
}

.fp-section-dark .fp-about-content p:first-child {
  color: #FFFFFF;
}

/* Services dark bg (matches About) */
.fp-section-services {
  background: #0F172A;
  border-top-color: transparent;
}

/* Experience cream bg */
.fp-section-experience {
  background: #EDE9E3;
  border-top: 1px solid #D6D3D1;
}
/* Experience grid: stretch so COMPLETE card fills full row height */
.fp-section-experience .fp-spread {
  align-items: stretch;
}
/* Align left column title with COMPLETE card header (card has padding:20px) */
.fp-section-experience .fp-spread-main {
  padding-top: 20px;
}

/* ---- Experience Subheader (bilingual) ---- */
.fp-exp-subheader {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}
.fp-exp-subheader-en {
  font-family: 'Expletus Sans', var(--font-secondary);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #272E34;
  text-transform: uppercase;
}
.fp-exp-subheader-zh {
  font-family: 'Noto Sans TC', var(--font-primary);
  font-size: 12px;
  font-weight: 500;
  color: #78716C;
}
.fp-exp-divider {
  width: 100%;
  height: 1px;
  background: #D6D3D1;
  margin: 24px 0;
}

/* ---- Magazine Spread (Asymmetric Grid) ---- */
.fp-spread {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 72px;
  align-items: start;
}

.fp-spread-side {
  position: sticky;
  top: 140px;
}

/* ---- Quick Facts Sidebar ---- */
.fp-quick-facts {
  border-left: 2px solid #C7D800;
  padding-left: 26px;
  margin-bottom: 40px;
}

.fp-side-title {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--foreground-light);
  font-weight: 600;
  margin-bottom: 20px;
}

.fp-fact {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.fp-fact:last-child {
  border-bottom: none;
}

.fp-fact-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--foreground-light);
  margin-bottom: 4px;
}

.fp-fact-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
}

.fp-fact-highlight {
  color: var(--foreground);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Dark section sidebar overrides */
.fp-section-dark .fp-side-title {
  color: #FFFFFF;
  font-family: 'Expletus Sans', var(--font-secondary);
  font-size: 20px;
  letter-spacing: 2.55px;
}

.fp-section-dark .fp-quick-facts {
  border-left-color: #C7D800;
}

.fp-section-dark .fp-fact-label {
  color: #FFFFFF;
  letter-spacing: 1.1px;
}

.fp-section-dark .fp-fact-value {
  color: #C7D800;
  font-size: 16px;
}

.fp-section-dark .fp-fact {
  border-bottom-color: #E7E5E4;
}

.fp-section-dark .fp-skill-tag {
  background: #FFFFFF;
  color: #000000;
  border-color: #D6D3D1;
}

.fp-section-dark .fp-skill-tag:hover {
  background: #D4E600;
  color: #1A2000;
  border-color: #D4E600;
}

/* ---- Side Skills ---- */
.fp-side-skills {
  margin-top: 8px;
}

/* ---- About (Editorial Typography) ---- */
.fp-about-content {
  font-size: 1.0625rem;
  line-height: 2;
  color: var(--dark-text);
}

.fp-about-content p {
  margin-bottom: 1.5em;
}

.fp-about-content p:first-child {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--foreground);
}

.fp-about-content p:first-child::first-line {
  font-weight: 600;
}

/* ---- Services (Accordion) ---- */
.fp-service-accordion {
  max-width: 100%;
  width: 100%;
}

.fp-service-accordion-item {
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.fp-service-accordion-item:first-child {
  border-top: none;
}

.fp-service-header {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 24px 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.fp-service-header:hover {
  background: linear-gradient(90deg, #D4E600 0%, rgba(212,230,0,0) 70%);
  border-radius: 6px;
}

.fp-service-accordion-item .fp-service-header:hover .fp-service-idx,
.fp-service-accordion-item .fp-service-header:hover .fp-service-name {
  color: #000000;
}

.fp-service-accordion-item .fp-service-header:hover .fp-service-arrow {
  color: #000000;
}

.fp-service-accordion-item.active .fp-service-header {
  background: linear-gradient(90deg, #D4E600 0%, rgba(212,230,0,0) 70%);
  border-radius: 6px;
}

.fp-service-accordion-item.active .fp-service-idx {
  color: #000000;
  font-weight: 700;
}

.fp-service-accordion-item.active .fp-service-name {
  color: #000000;
}

.fp-service-accordion-item:not(.active) .fp-service-name {
  color: #FFFFFF;
}

.fp-service-accordion-item:not(.active) .fp-service-idx {
  color: rgba(255,255,255,0.5);
}

.fp-service-idx {
  font-size: 14px;
  font-weight: 300;
  color: #A8A29E;
  font-family: 'Inter', var(--font-secondary);
  min-width: 28px;
  flex-shrink: 0;
}

.fp-service-name {
  font-size: 17px;
  color: var(--dark-text);
  flex: 1;
  font-weight: 500;
  transition: color 0.3s;
}

.fp-service-arrow {
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.4);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.fp-service-accordion-item.active .fp-service-arrow {
  transform: rotate(180deg);
}

/* Service description (expandable) */
.fp-service-desc {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 30px 0 88px;
  font-size: 16px;
  font-weight: 350;
  line-height: 2.25;
  letter-spacing: 0.19px;
  color: #44403C;
}

.fp-service-accordion-item.active .fp-service-desc:not(:empty) {
  max-height: 300px;
  padding-bottom: 20px;
}

/* ---- Skills ---- */
.fp-skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fp-skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 9999px;
  background: white;
  color: black;
  border: 1px solid #D6D3D1;
  text-decoration: none;
  transition: all 0.2s;
}

.fp-skill-tag:hover {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

/* ---- Portfolio (Magazine Spread) ---- */
.fp-portfolio-spread {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.fp-portfolio-card {
  display: block;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  position: relative;
}

.fp-portfolio-feature {
  grid-column: span 2;
  grid-row: span 2;
}

.fp-portfolio-image {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
  overflow: hidden;
  background: var(--background-muted);
}

.fp-portfolio-feature .fp-portfolio-image {
  min-height: 564px;
}

.fp-portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.33, 0, 0.2, 1);
}

.fp-portfolio-card:hover .fp-portfolio-image img {
  transform: scale(1.06);
}

.fp-portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s;
}

.fp-portfolio-card:hover .fp-portfolio-overlay {
  opacity: 1;
}

.fp-portfolio-overlay h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.fp-portfolio-overlay p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.7);
  margin: 0;
  line-height: 1.5;
}

.fp-portfolio-placeholder {
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground-light);
  background: var(--background-muted);
}

/* ---- Portfolio: Magazine Cover (Featured) ---- */
.fp-mag-cover {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  text-decoration: none;
  color: inherit;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--spacing-xl);
  transition: box-shadow 0.3s;
}

.fp-mag-cover:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}

.fp-mag-cover-text {
  padding: clamp(24px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fp-mag-cover-title {
  font-size: clamp(1.75rem, 3vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 var(--spacing-md);
  color: var(--foreground);
}

.fp-mag-cover-desc {
  font-size: 0.95rem;
  color: var(--foreground-muted);
  line-height: 1.6;
  margin: 0 0 var(--spacing-md);
}

.fp-mag-cover-divider {
  width: 48px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.fp-mag-cover-visual {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--background-muted);
}

.fp-mag-cover-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.33, 0, 0.2, 1);
}

.fp-mag-cover:hover .fp-mag-cover-visual img {
  transform: scale(1.04);
}

.fp-mag-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground-light);
}

.fp-mag-cover-thumbs {
  grid-column: 1 / -1;
  display: flex;
  gap: 4px;
  padding: 8px;
  border-top: 1px solid var(--border);
  background: var(--background-muted);
}

.fp-mag-cover-thumbs img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.fp-mag-cover-more {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground-muted);
}

/* ---- Portfolio: Horizontal Scroll ---- */
.fp-hscroll-wrap {
  position: relative;
}

.fp-hscroll-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.fp-hscroll-count {
  font-size: 13px;
  color: var(--foreground-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fp-hscroll-arrows {
  display: flex;
  gap: 8px;
}

.fp-hscroll-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.fp-hscroll-btn:hover {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.fp-hscroll-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.fp-hscroll-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.fp-hscroll-track::-webkit-scrollbar {
  display: none;
}

.fp-hscroll-card {
  flex: 0 0 calc(25% - 12px);
  aspect-ratio: 3/4;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  scroll-snap-align: start;
  text-decoration: none;
  color: #fff;
  background: var(--background-muted);
}

.fp-hscroll-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.33, 0, 0.2, 1);
}

.fp-hscroll-card:hover .fp-hscroll-bg {
  transform: scale(1.06);
}

.fp-hscroll-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.fp-hscroll-overlay h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #fff;
}

.fp-hscroll-overlay p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.7);
  margin: 0;
  line-height: 1.4;
}

/* ---- Card elements: prevent text selection ---- */
.fp-pslider-card,
.fp-rv-card,
.fp-service-accordion-item,
.fp-project-item {
  -webkit-user-select: none;
  user-select: none;
}

/* ---- Portfolio Slider Cards ---- */
.fp-portfolio-slider-wrap {
  position: relative;
}

.fp-portfolio-slider-arrows {
  position: absolute;
  top: -56px;
  right: 0;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.fp-pslider-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.fp-pslider-btn:hover {
  background: var(--primary);
  color: #1A2000;
  border-color: var(--primary);
}

.fp-pslider-btn:disabled {
  opacity: 0.3;
  cursor: default;
  background: var(--card);
  color: var(--foreground-light);
  border-color: var(--border);
}

.fp-portfolio-slider-track {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-top: 12px;
  padding-bottom: 12px;
  cursor: grab;
}

.fp-portfolio-slider-track:active {
  cursor: grabbing;
}

.fp-portfolio-slider-track::-webkit-scrollbar {
  display: none;
}

.fp-portfolio-slider-track::-webkit-scrollbar {
  display: none;
}

.fp-pslider-card {
  flex: 0 0 350px;
  min-width: 350px;
  text-decoration: none;
  color: inherit;
  background: #FFFFFF;
  border: 1px solid #D6D3D1;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.fp-pslider-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.fp-pslider-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #EDE9E3;
}

.fp-pslider-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.33, 0, 0.2, 1);
}

.fp-pslider-card:hover .fp-pslider-image img {
  transform: scale(1.05);
}

.fp-pslider-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground-light);
}

.fp-pslider-body {
  padding: 15px 30px;
}

.fp-pslider-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #1C1917;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fp-pslider-desc {
  font-size: 14px;
  font-weight: 350;
  color: #57534E;
  line-height: 2.14;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Dot Navigation (shared: portfolio + reviews) ---- */
.fp-dot-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
}

.fp-dot-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.fp-dot-arrow:hover {
  color: #D4E600;
}

.fp-dot-arrow svg,
.fp-dot-arrow i {
  width: 20px;
  height: 20px;
}

.fp-dot-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.25s;
}

.fp-dot:hover {
  background: #D4E600;
  transform: scale(1.2);
}

.fp-dot.active {
  background: #D4E600;
  transform: scale(1.2);
}

/* ---- Education List (left border) ---- */
.fp-edu-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 16px;
  border-left: 1px solid #A8A29E;
}

.fp-edu-item {
  font-family: 'Noto Sans TC', var(--font-primary);
  font-size: 14px;
  font-weight: 350;
  color: #44403C;
  line-height: 1.6;
}

/* ---- Skill Circle Progress ---- */
.fp-skill-circles {
  display: flex;
  gap: 28px;
  flex-wrap: nowrap;
  justify-content: center;
  width: 100%;
}

.fp-skill-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.fp-skill-ring {
  position: relative;
  width: 86px;
  height: 86px;
}

.fp-skill-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.fp-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 5;
}

.fp-ring-progress {
  fill: none;
  stroke: var(--foreground);
  stroke-width: 5;
  stroke-linecap: round;
}

.fp-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1;
}

.fp-ring-num {
  font-size: 1.625rem;
  font-weight: 700;
  font-family: 'Expletus Sans', sans-serif;
  color: var(--foreground);
  display: block;
}

.fp-ring-unit {
  font-size: 0.6875rem;
  color: var(--foreground-muted);
  display: block;
  margin-top: 2px;
}

.fp-skill-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground-secondary);
}

/* ---- COMPLETE Card ---- */
.fp-spread-side.fp-complete-card {
  position: static;
  align-self: stretch;
  height: 100%;
  background: #D9D9D9;
  border-radius: 4px;
  padding: 20px;
  width: 450px;
  max-width: 100%;
}

.fp-complete-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #D6D3D1;
  margin-bottom: 28px;
}

.fp-complete-en {
  font-family: 'Expletus Sans', var(--font-secondary);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2.55px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #272E3400, #272E34 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fp-complete-zh {
  font-family: 'Noto Sans TC', var(--font-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.95px;
  color: #272E34;
}

/* ---- Completed Projects ---- */
.fp-project-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fp-project-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 24px 16px 24px;
  background: #FFFFFF;
  border-radius: 12px;
  text-decoration: none;
  color: #1C1917;
  transition: box-shadow 0.2s;
}

.fp-project-item:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  color: #1C1917;
}

.fp-project-title {
  font-family: 'Noto Sans TC', var(--font-primary);
  font-size: 16px;
  font-weight: 700;
  color: #1C1917;
}

.fp-project-meta {
  font-family: 'Noto Sans TC', var(--font-primary);
  font-size: 13px;
  font-weight: 350;
  color: #44403C;
  margin-top: 3px;
}

.fp-project-budget {
  font-family: 'Expletus Sans', var(--font-secondary);
  font-size: 20px;
  font-weight: 700;
  color: #272E34;
  letter-spacing: 0.6px;
  white-space: nowrap;
}

/* ---- Reviews Horizontal Slider ---- */
.fp-reviews-slider-wrap {
  overflow: hidden;
  width: 100%;
}

.fp-reviews-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.fp-reviews-slider:active {
  cursor: grabbing;
}

.fp-reviews-slider::-webkit-scrollbar {
  display: none;
}

.fp-rv-card {
  flex: 0 0 550px;
  min-width: 550px;
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(255,255,255,0.1) 100%);
  border-radius: 12px;
  padding: 30px 49px;
  transition: filter 0.4s ease, opacity 0.4s ease;
  will-change: filter, opacity;
}

.fp-rv-card.fp-rv-edge {
  filter: blur(3px);
  opacity: 0.5;
}

.fp-rv-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 160px;
  width: 100%;
}

.fp-rv-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 160px;
}

.fp-rv-avatar {
  width: 98px;
  height: 97px;
  border-radius: 9999px;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #64748B;
  overflow: hidden;
}

.fp-rv-stars {
  font-size: 15px;
  color: #8B5CF6;
  letter-spacing: 4px;
}

.fp-rv-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
  width: 275px;
}

.fp-rv-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fp-rv-city {
  font-family: 'Noto Sans TC', var(--font-primary);
  font-size: 16px;
  font-weight: 700;
  color: #1C1917;
}

.fp-rv-name {
  font-family: 'Noto Sans TC', var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  color: #1C1917;
}

.fp-rv-tag {
  display: inline-block;
  background: #D4E600;
  color: #1A2000;
  font-family: 'Noto Sans TC', var(--font-primary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 9999px;
}

.fp-rv-text {
  font-family: 'Noto Sans TC', var(--font-primary);
  font-size: 13px;
  color: #44403C;
  letter-spacing: 0.195px;
  line-height: 1.85;
  margin: 0;
  text-align: right;
}

/* (Reviews progress bar removed — using .fp-dot-nav instead) */

.fp-review-empty {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
  color: var(--foreground-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* ---- Final CTA ---- */
.fp-cta-section {
  background: #1C1917;
  border-top: 1px solid #D6D3D1;
  padding: 96px 0;
  text-align: center;
}

.fp-cta-section h2 {
  color: #F5F3EF;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 7px;
}

.fp-cta-section p {
  color: #F5F3EF;
  font-size: 16px;
  font-weight: 350;
  margin-bottom: 0;
}

.fp-cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 25px;
}

.fp-cta-buttons .fp-btn-hero-primary {
  background: #D4E600;
  color: #1A2000;
  border: 2px solid #D4E600;
  border-radius: 9999px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fp-cta-buttons .fp-btn-hero-primary:hover {
  background: #C2D400;
  border-color: #C2D400;
  color: #1A2000;
}

.fp-cta-buttons .fp-btn-hero-outline {
  background: transparent;
  color: #F5F3EF;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 9999px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 700;
}

.fp-cta-buttons .fp-btn-hero-outline:hover {
  color: #FFFFFF;
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.1);
}

/* ---- Animations (no slide-up flash) ---- */
@keyframes fp-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.fp-animate {
  opacity: 1;
}

/* Global fade-in-on-scroll（只淡入，不上滑） */
.fade-on-scroll {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.fade-on-scroll.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .fade-on-scroll {
    opacity: 1 !important;
  }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .fp-he-tape {
    display: none;
  }

  .fp-he-contact-float {
    right: 12px;
    bottom: 12px;
  }

  .fp-spread {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .fp-spread-side {
    position: static;
  }

  .fp-portfolio-spread {
    grid-template-columns: repeat(2, 1fr);
  }

  .fp-portfolio-feature {
    grid-column: span 2;
    grid-row: span 1;
  }

  .fp-portfolio-feature .fp-portfolio-image {
    min-height: 320px;
  }

  .fp-mag-cover {
    grid-template-columns: 1fr;
  }

  .fp-hscroll-card {
    flex: 0 0 calc(33.333% - 11px);
  }

  .fp-pslider-card {
    flex: 0 0 calc(50% - 10px);
  }

  .fp-he-name {
    font-size: 42px;
  }

  .fp-he-stat-num {
    font-size: 38px;
  }

  .fp-he-info-bar {
    gap: 16px;
    padding: 0 20px;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

@media (max-width: 768px) {
  .fp-section {
    padding: 64px 0;
  }

  .fp-section-title-en {
    font-size: 22px;
  }

  .fp-section-label {
    margin-bottom: 36px;
  }

  .fp-he-name {
    font-size: clamp(28px, 10vw, 42px);
  }

  .fp-he-stats-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .fp-he-stat-num {
    font-size: 32px;
  }

  .fp-he-skills {
    gap: 6px;
  }

  .fp-he-info-bar {
    border-radius: 16px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    height: auto;
  }

  .fp-he-cta {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .fp-he-cta .btn {
    width: 100%;
  }

  .fp-floating-nav .fp-nav-links {
    display: none;
  }

  .fp-portfolio-spread {
    grid-template-columns: 1fr;
  }

  .fp-portfolio-feature {
    grid-column: span 1;
  }

  .fp-portfolio-feature .fp-portfolio-image {
    min-height: 240px;
  }

  .fp-portfolio-image {
    min-height: 200px;
  }

  .fp-mag-cover-title {
    font-size: 1.5rem;
  }

  .fp-mag-cover-thumbs img,
  .fp-mag-cover-more {
    width: 44px;
    height: 44px;
  }

  .fp-hscroll-card {
    flex: 0 0 75%;
  }

  .fp-pslider-card {
    flex: 0 0 80%;
  }

  .fp-portfolio-slider-arrows {
    top: -48px;
  }

  .fp-rv-card {
    flex: 0 0 85%;
    min-width: 85%;
  }

  .fp-rv-card-inner {
    flex-direction: column;
    gap: 20px;
  }

  .fp-rv-right {
    width: 100%;
    align-items: flex-start;
  }

  .fp-rv-text {
    text-align: left;
  }

  .fp-reviews-slider {
    padding: 0 20px;
  }

  /* Reviews section-label now uses container, no special padding needed */

  .fp-complete-card {
    width: 100%;
  }

  .fp-spread {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .fp-service-header {
    padding: 14px 12px;
    gap: 16px;
  }

  .fp-quick-facts {
    border-left-width: 2px;
  }

  .fp-cta-section {
    padding: 64px 0;
  }

  .fp-cta-buttons {
    flex-direction: column;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .fp-cta-buttons .btn {
    width: 100%;
  }

  .fp-scroll-indicator {
    display: none;
  }

  .fp-project-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  .fp-hero-stats {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .fp-section-title-en {
    font-size: 18px;
  }
}

/* ========================================
   Figma Page-Specific Styles
   以下由 Figma HTML 設計稿合併
   ======================================== */

/* ========== Common: Page Header (Dashboard) ========== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
}

/* ========== Common: Action Link ========== */
.action-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}

.action-link:hover {
  text-decoration: underline;
}

.action-group {
  display: flex;
  gap: var(--spacing-sm);
}

.action-btn {
  font-size: 13px;
  color: var(--foreground-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.action-btn:hover {
  background: var(--border-light);
  color: var(--foreground);
}

/* ========== Common: Form Row (Grid 2-col) ========== */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--spacing-md);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border);
}

/* ========== Common: Form Card / Section ========== */
.form-card {
  margin-bottom: var(--spacing-xl);
}

.form-section {
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid var(--border);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: var(--foreground);
}

/* ========== Common: Section Card ========== */
.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-xl);
}

.section-card-header {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-card-header h2 {
  font-size: 16px;
  font-weight: 600;
}

.section-card-body {
  padding: var(--spacing-lg);
}

/* ========== Common: Status Badges ========== */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.status-active {
  background: var(--primary-light);
  color: var(--primary);
}

.status-review {
  background: var(--accent-light);
  color: var(--accent);
}

.status-paid {
  background: var(--secondary-light);
  color: var(--secondary);
}

.status-pending {
  background: var(--accent-light);
  color: var(--accent);
}

.status-processing {
  background: var(--primary-light);
  color: var(--primary);
}

/* ========== Common: Alert Info/Warning ========== */
.alert-info {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.alert-warning {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid #FDE68A;
}

/* ========== Common: Progress Bar ========== */
.progress-bar {
  height: 8px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* ========== Common: Badge Gray ========== */
.badge-gray {
  background: var(--background-muted);
  color: var(--foreground-muted);
}

/* ========== Common: Disabled Input ========== */
.form-input:disabled {
  background: var(--background-muted);
  color: var(--foreground-muted);
  cursor: not-allowed;
}

/* ========== Homepage ========== */

/* Hero 後第一個 section 間距縮半 */
.hero + .section {
  padding-top: 24px;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 80px var(--spacing-xl);
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--background) 100%);
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.hero p {
  font-size: 1.125rem;
  color: var(--foreground-muted);
  max-width: 600px;
  margin: 0 auto var(--spacing-xl);
}

/* Section Layout */
.section {
  padding: 80px 0;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: var(--spacing-xl);
  gap: var(--spacing-xs);
}

/* Block header: title centered, button top-right */
.section-block-header {
  position: relative;
  text-align: center;
  margin-bottom: var(--spacing-xl);
}
.section-block-header .btn-see-more {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
}

.btn-see-more {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 5px 16px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-see-more:hover {
  background: var(--primary);
  color: var(--on-primary);
}

.section-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}

.section-link:hover {
  text-decoration: underline;
}

.bg-muted {
  background: var(--background-muted);
}

/* Category Card */
.category-card {
  text-align: center;
  padding: var(--spacing-lg);
  display: block;
}

.category-card .icon-wrap {
  display: inline-flex;
  margin-bottom: var(--spacing-sm);
}

.category-card .icon-wrap i {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.category-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.category-card .count {
  font-size: 13px;
  color: var(--foreground-muted);
}

/* How It Works — Accordion */
.how-accordion {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0;
  align-items: stretch;
}

.how-accordion li {
  position: relative;
  flex: 1;
  min-height: 260px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: flex 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  animation: flipdown 0.5s ease both;
}

.how-accordion li:nth-of-type(1) { animation-delay: 0.15s; }
.how-accordion li:nth-of-type(2) { animation-delay: 0.3s; }
.how-accordion li:nth-of-type(3) { animation-delay: 0.45s; }
.how-accordion li:nth-of-type(4) { animation-delay: 0.6s; }

.how-accordion li:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* 卡片之間的箭頭連接線 */
.how-accordion li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -20px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: translateY(-50%) rotate(-45deg);
  background: transparent;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.how-accordion:hover li:not(:last-child)::after {
  opacity: 1;
}

/* 卡片之間的間距（為箭頭留空間） */
.how-accordion li:not(:last-child) {
  margin-right: 28px;
}

/* 隱藏的 radio input */
.how-accordion input[type="radio"] {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

/* 內容容器 */
.how-accordion .step-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--spacing-lg);
  text-align: center;
  z-index: 1;
}

/* Icon */
.how-accordion .step-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  transition: all 0.3s ease;
}

.how-accordion .step-icon i,
.how-accordion .step-icon svg {
  width: 24px;
  height: 24px;
  color: var(--on-primary);
  stroke: var(--on-primary);
}

/* Title */
.how-accordion h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--foreground);
  transition: all 0.3s ease;
}

/* Description (hidden by default) */
.how-accordion .step-desc {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  line-height: 1.7;
  color: var(--foreground-muted);
  margin-top: 0;
}

/* ---- Active state (checked) ---- */
.how-accordion input[type="radio"]:checked ~ .step-inner {
  background: linear-gradient(135deg, rgba(212, 230, 0, 0.06) 0%, transparent 100%);
  border-radius: var(--radius-lg);
}

.how-accordion input[type="radio"]:checked ~ .step-inner .step-icon {
  width: 64px;
  height: 64px;
  background: var(--primary);
  box-shadow: 0 0 20px rgba(212, 230, 0, 0.3);
}

.how-accordion input[type="radio"]:checked ~ .step-inner .step-icon i,
.how-accordion input[type="radio"]:checked ~ .step-inner .step-icon svg {
  color: var(--on-primary);
  stroke: var(--on-primary);
  width: 28px;
  height: 28px;
}

.how-accordion input[type="radio"]:checked ~ .step-inner h4 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: var(--spacing-sm);
}

.how-accordion input[type="radio"]:checked ~ .step-inner .step-desc {
  max-height: 200px;
  opacity: 1;
  margin-top: var(--spacing-xs);
}

/* 選中的 li 佔更多空間 */
.how-accordion li:has(input[type="radio"]:checked) {
  flex: 2.5;
  border-color: var(--primary-border);
}

/* 頂部裝飾線 */
.how-accordion li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  transition: background 0.3s ease;
  z-index: 3;
}

.how-accordion li:has(input[type="radio"]:checked)::before {
  background: var(--primary);
}

@keyframes flipdown {
  0% {
    opacity: 0;
    transform-origin: top center;
    transform: rotateX(-90deg);
  }
  5% { opacity: 1; }
  80% { transform: rotateX(8deg); }
  83% { transform: rotateX(6deg); }
  92% { transform: rotateX(-3deg); }
  100% {
    transform-origin: top center;
    transform: rotateX(0deg);
  }
}

/* 手機版：垂直排列 */
@media (max-width: 768px) {
  .how-accordion {
    flex-direction: column;
    gap: 0;
  }

  .how-accordion li {
    min-height: auto;
    flex: none !important;
    margin-right: 0 !important;
  }

  .how-accordion li:has(input[type="radio"]:checked) {
    flex: none !important;
  }

  /* 手機版：箭頭改為向下 */
  .how-accordion li:not(:last-child)::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -14px;
    transform: rotate(45deg);
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    width: 10px;
    height: 10px;
  }

  .how-accordion li:not(:last-child) {
    margin-bottom: 24px;
  }

  .how-accordion .step-inner {
    flex-direction: row;
    flex-wrap: wrap;
    text-align: left;
    align-items: flex-start;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
  }

  .how-accordion .step-icon {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .how-accordion h4 {
    flex: 1;
    align-self: center;
  }

  .how-accordion .step-desc {
    width: 100%;
    padding-left: 0;
  }
}

/* Freelancer Card — 頭像外凸效果（舊版 - 保留供首頁 expand-cards 使用） */
.grid-4:has(.freelancer-card) {
  overflow: visible;
  padding-top: 20px;
}

.freelancer-card {
  text-align: center;
  overflow: visible;
  margin-top: 44px;
  position: relative;
}

.freelancer-card .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 56px var(--spacing-lg) var(--spacing-lg);
}

.freelancer-card .avatar,
.freelancer-card .avatar-placeholder {
  position: absolute;
  top: -44px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 88px;
  font-size: 32px;
  border: 4px solid var(--card);
  box-shadow: var(--shadow-md);
}

.freelancer-card .avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  border-radius: var(--radius-full);
}

.freelancer-card h4 {
  color: var(--foreground);
  font-weight: 600;
}

.skills-row {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
  justify-content: center;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(to top, rgba(212, 230, 0, 0.25) 0%, rgba(212, 230, 0, 0) 100%);
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-xl);
}

.cta-section h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: var(--spacing-md);
}

.cta-section p {
  font-size: 1.125rem;
  color: var(--foreground-muted);
  margin-bottom: var(--spacing-xl);
}

.cta-section .cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
}

/* Hero Search & Buttons */
.hero-search {
  max-width: 640px;
  margin: 0 auto var(--spacing-xl);
}

.hero-search .search-bar {
  height: 56px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 0 8px 0 var(--spacing-md);
}

.hero-search .search-bar input {
  font-size: 16px;
}

.hero-search .search-bar .btn {
  border-radius: var(--radius-md);
}

.btn-search-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-md);
}

.btn-search-icon i {
  width: 20px;
  height: 20px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
}

.featured-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.featured-card h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
}

.featured-card .desc {
  font-size: 14px;
  color: var(--foreground);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.featured-card .budget {
  font-family: var(--font-secondary);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.featured-card .time {
  font-size: 13px;
  color: var(--foreground-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.featured-card .time i {
  width: 14px;
  height: 14px;
}

/* ========== Auth Pages (Login / Register) ========== */
.auth-features {
  margin-top: var(--spacing-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 15px;
  opacity: 0.9;
}

.auth-feature i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.divider {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  color: var(--foreground-light);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.password-wrapper {
  position: relative;
}

.password-wrapper .toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground-light);
  padding: 0;
  display: flex;
}

.password-wrapper .toggle-pw i {
  width: 18px;
  height: 18px;
}

.btn-submit {
  width: 100%;
  height: 48px;
  font-size: 16px;
}

.auth-footer {
  text-align: center;
  margin-top: var(--spacing-xl);
  font-size: 14px;
  color: var(--foreground-muted);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Auth form-row override (flex, not grid) */
.auth-form .form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.auth-form .form-row label {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 14px;
  color: var(--foreground-muted);
  cursor: pointer;
}

.auth-form .form-row a {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
}

.auth-form .form-row a:hover {
  text-decoration: underline;
}

/* Register: Role Selection */
.role-select {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.role-option {
  flex: 1;
  position: relative;
}

.role-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.role-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.role-option label:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.role-option input[type="radio"]:checked+label {
  border-color: var(--primary);
  background: var(--primary-light);
}

.role-option label .role-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.role-option input[type="radio"]:checked+label .role-icon {
  background: var(--primary);
  color: var(--on-primary);
}

.role-option label .role-icon i {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.role-option input[type="radio"]:checked+label .role-icon i {
  color: #fff;
}

.role-option label .role-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
}

.role-option label .role-desc {
  font-size: 13px;
  color: var(--foreground-muted);
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  font-size: 14px;
  color: var(--foreground-muted);
  line-height: 1.5;
}

.terms-check input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}

.terms-check a {
  color: var(--primary);
  font-weight: 500;
}

.terms-check a:hover {
  text-decoration: underline;
}

/* ========== Listings / Archive ========== */
.page-title-bar {
  padding: var(--spacing-xl) 0 var(--spacing-lg);
}

.page-title-bar h1 {
  font-size: 28px;
  font-weight: 700;
}

.page-title-bar p {
  font-size: 15px;
  color: var(--foreground-muted);
  margin-top: var(--spacing-xs);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  align-items: center;
}

.filter-bar .search-bar {
  flex: 1;
  min-width: 240px;
}

.filter-bar .form-select {
  width: auto;
  min-width: 140px;
  height: 48px;
}

.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  font-size: 14px;
  color: var(--foreground-muted);
}

/* Listing Card */
.listing-card .card-body {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.listing-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.listing-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
}

.listing-card h3 a {
  color: var(--foreground);
  text-decoration: none;
}

.listing-card h3 a:hover {
  color: var(--primary);
}

.listing-card .desc {
  font-size: 14px;
  color: var(--foreground);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-card .skills-row {
  justify-content: flex-start;
}

.listing-card .card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--border-light);
  margin-top: var(--spacing-xs);
}

.listing-card .budget {
  font-family: var(--font-secondary);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.listing-card .meta-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  font-size: 13px;
  color: var(--foreground-light);
}

.listing-card .meta-right span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.listing-card .meta-right i {
  width: 14px;
  height: 14px;
}

/* Skill Tag (shared) */
.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.skill-tag {
  padding: 2px 8px;
  font-size: 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Freelancer Grid Card (列表頁) — photo overlay style
   與首頁精選專家 slider 卡片風格一致
   ========================================================================== */
.grid-4:has(.freelancer-grid-card) {
  gap: var(--spacing-lg);
}

.freelancer-grid-card {
  text-decoration: none;
  color: inherit;
  min-height: 360px;
}

/* 在 grid 中不需要 flex basis */
.grid-4 .feedback-card.freelancer-grid-card {
  flex: none;
}

/* 無照片時的 SVG 頭像佔位 */
.feedback-photo-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70%;
  overflow: hidden;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(212,230,0,0.06) 0%, rgba(51,65,85,0.6) 100%);
}

.feedback-photo-placeholder img {
  width: calc(100% - 60px);
  height: calc(100% - 60px);
  max-width: 140px;
  max-height: 140px;
  opacity: 0.2;
  filter: brightness(2) saturate(0);
  object-fit: contain;
}

.feedback-photo-placeholder::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 20%, var(--card) 100%);
  pointer-events: none;
}

/* Grid card 的 meta 列（經驗、接案狀態） */
.freelancer-grid-card .fl-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  font-size: 12px;
  color: var(--foreground-muted);
  margin-top: var(--spacing-xs);
}

.freelancer-grid-card .fl-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.freelancer-grid-card .fl-meta i {
  width: 14px;
  height: 14px;
}

.availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.availability-dot.available {
  background: var(--secondary);
}

.availability-dot.busy {
  background: var(--accent);
}

.availability-dot.unavailable {
  background: var(--foreground-light);
}

/* ========== Project Detail ========== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 14px;
  color: var(--foreground-muted);
  padding: var(--spacing-lg) 0;
}

.breadcrumb a {
  color: var(--foreground-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb i {
  width: 14px;
  height: 14px;
}

.detail-main {
  flex: 7;
  min-width: 0;
}

.detail-badges {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  font-size: 14px;
  color: var(--foreground-muted);
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border);
}

.detail-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-meta i {
  width: 16px;
  height: 16px;
}

.detail-section {
  margin-bottom: var(--spacing-xl);
}

.detail-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.detail-section p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--dark-text);
}

.detail-section ul {
  padding-left: var(--spacing-lg);
  list-style: disc;
}

.detail-section ul li {
  font-size: 15px;
  line-height: 1.8;
  color: var(--dark-text);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.skills-list .skill-tag {
  padding: 6px 14px;
  font-size: 14px;
}

.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.budget-display {
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.budget-display .label {
  font-size: 13px;
  color: var(--foreground-muted);
  margin-bottom: var(--spacing-xs);
}

.budget-display .amount {
  font-family: var(--font-secondary);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.sidebar-info-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.sidebar-info-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 14px;
}

.sidebar-info-item i {
  width: 18px;
  height: 18px;
  color: var(--foreground-light);
  flex-shrink: 0;
}

.sidebar-info-item .info-label {
  color: var(--foreground-muted);
  min-width: 70px;
}

.sidebar-info-item .info-value {
  font-weight: 500;
}

.btn-apply {
  width: 100%;
  height: 48px;
  font-size: 16px;
  margin-top: var(--spacing-md);
}

.client-card .client-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.client-card .client-avatar {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.client-card .client-name {
  font-size: 16px;
  font-weight: 600;
}

.client-card .client-label {
  font-size: 13px;
  color: var(--foreground-muted);
}

.client-stats {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  font-size: 14px;
  color: var(--foreground-muted);
}

.client-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.client-stats i {
  width: 16px;
  height: 16px;
  color: var(--foreground-light);
}

/* ========== Freelancer Profile (Public) ========== */
.profile-layout {
  display: flex;
  gap: var(--spacing-xl);
  padding: var(--spacing-xl) 0 var(--spacing-2xl);
}

.profile-sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.profile-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.profile-banner {
  height: 120px;
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
}

.profile-info {
  padding: 0 var(--spacing-lg) var(--spacing-lg);
  text-align: center;
}

.profile-avatar-wrap {
  margin-top: -48px;
  margin-bottom: var(--spacing-sm);
}

.profile-avatar {
  width: 96px;
  height: 96px;
  font-size: 32px;
  border: 4px solid var(--card);
  margin: 0 auto;
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  border: 1.5px solid transparent;
}

.availability-badge.available {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
  border-color: #10B981;
}

.availability-badge.busy {
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
  border-color: #F59E0B;
}

.availability-badge.unavailable {
  background: rgba(100, 116, 139, 0.1);
  color: var(--foreground-light);
  border-color: var(--foreground-light);
}

.availability-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.profile-info .name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
}

.profile-info .title {
  font-size: 15px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

.profile-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: var(--spacing-md);
}

.profile-rating i {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.profile-rating .rating-text {
  font-family: var(--font-secondary);
  font-size: 14px;
  font-weight: 600;
  margin-left: 4px;
}

.profile-rating .review-count {
  font-size: 13px;
  color: var(--foreground-muted);
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  text-align: left;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border);
}

.profile-detail-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 14px;
}

.profile-detail-item i {
  width: 16px;
  height: 16px;
  color: var(--foreground-light);
  flex-shrink: 0;
}

.profile-detail-item .detail-label {
  color: var(--foreground-muted);
  min-width: 80px;
}

.profile-detail-item .detail-value {
  font-weight: 500;
}

.btn-contact {
  width: 100%;
  height: 44px;
  font-size: 15px;
  margin-top: var(--spacing-md);
}

.stats-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.stats-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground-muted);
  margin-bottom: var(--spacing-md);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

.stat-item .stat-num {
  font-family: var(--font-secondary);
  font-size: 24px;
  font-weight: 700;
  color: var(--foreground);
}

.stat-item .stat-label {
  font-size: 12px;
  color: var(--foreground-muted);
}

.profile-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.profile-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.profile-section p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--dark-text);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.skills-grid .skill-tag {
  padding: 6px 14px;
  font-size: 14px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

.portfolio-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.portfolio-item:hover {
  box-shadow: var(--shadow-md);
}

.portfolio-thumb {
  height: 160px;
  background: var(--background-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground-light);
}

.portfolio-thumb i {
  width: 32px;
  height: 32px;
}

.portfolio-info {
  padding: var(--spacing-sm) var(--spacing-md);
}

.portfolio-info h4 {
  font-size: 14px;
  font-weight: 600;
}

.portfolio-info p {
  font-size: 12px;
  color: var(--foreground-muted);
}

.review-item {
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-light);
}

.review-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.reviewer-avatar {
  width: 36px;
  height: 36px;
  font-size: 14px;
  border-radius: var(--radius-full);
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground-light);
  flex-shrink: 0;
}

.reviewer-avatar i {
  width: 24px;
  height: 24px;
}

.reviewer-name {
  font-size: 14px;
  font-weight: 600;
}

.reviewer-project {
  font-size: 12px;
  color: var(--foreground-muted);
}

.reviewer-stars {
  display: flex;
  gap: 2px;
  color: var(--accent);
}

.reviewer-stars i {
  width: 16px;
  height: 16px;
}

.review-stars {
  display: flex;
  gap: 2px;
}

.review-stars i {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.review-stars .star-filled {
  color: #FBBF24;
}

.review-stars .star-empty {
  color: var(--border);
}

.review-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--dark-text);
  margin-bottom: var(--spacing-md);
}

.review-date {
  font-size: 12px;
  color: var(--foreground-light);
  margin-top: var(--spacing-xs);
}

.project-link {
  color: var(--primary);
  font-weight: 600;
}

.project-link:hover {
  text-decoration: underline;
}

/* ========== Dashboard: Client Overview ========== */
.welcome-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-xl);
}

.welcome-section h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
}

.welcome-section p {
  font-size: 14px;
  color: var(--foreground-muted);
}

.quick-actions {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.recent-table-card {
  margin-top: var(--spacing-xl);
}

.recent-table-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ========== Dashboard: Applications ========== */
.app-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-md);
  transition: box-shadow var(--transition);
}

.app-card:hover {
  box-shadow: var(--shadow-md);
}

.app-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border);
  background: var(--background-muted);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.app-card-header .project-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.app-card-body {
  padding: var(--spacing-lg);
}

.applicant-row {
  display: flex;
  gap: var(--spacing-lg);
  align-items: flex-start;
}

.applicant-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.applicant-content {
  flex: 1;
}

.applicant-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.applicant-title {
  font-size: 14px;
  color: var(--foreground-muted);
  margin-bottom: var(--spacing-sm);
}

.applicant-meta {
  display: flex;
  gap: var(--spacing-lg);
  font-size: 13px;
  color: var(--foreground-muted);
  margin-bottom: var(--spacing-md);
}

.applicant-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bid-amount {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-family: var(--font-secondary);
  font-size: 15px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

.message-preview {
  font-size: 14px;
  color: var(--foreground-muted);
  line-height: 1.6;
  padding: var(--spacing-md);
  background: var(--background-muted);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  border-left: 3px solid var(--border);
}

.app-actions {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.app-actions .portfolio-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  margin-right: var(--spacing-sm);
}

.app-actions .portfolio-link:hover {
  text-decoration: underline;
}

/* Freelancer Application Card Variants */
.app-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
}

.app-project-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--spacing-xs);
  cursor: pointer;
}

.app-project-name:hover {
  text-decoration: underline;
}

.app-client {
  font-size: 14px;
  color: var(--foreground-muted);
}

.app-bid {
  text-align: right;
}

.app-bid-label {
  font-size: 13px;
  color: var(--foreground-muted);
  margin-bottom: 2px;
}

.app-bid-amount {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-secondary);
  color: var(--primary);
}

.app-message {
  font-size: 14px;
  color: var(--foreground-muted);
  line-height: 1.6;
  padding: var(--spacing-md);
  background: var(--background-muted);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--border);
}

.app-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-light);
}

.app-meta {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.app-meta-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 13px;
  color: var(--foreground-muted);
}

.app-meta-item i {
  width: 14px;
  height: 14px;
}

/* ========== Dashboard: Contracts ========== */
.contract-card {
  margin-bottom: var(--spacing-md);
}

.contract-card .card-body {
  padding: var(--spacing-lg);
}

.contract-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
}

.contract-number {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-family: var(--font-secondary);
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground-muted);
  background: var(--background-muted);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-sm);
}

.contract-project {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.contract-parties {
  display: flex;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--background-muted);
  border-radius: var(--radius-md);
}

.party {
  flex: 1;
}

.party-label {
  font-size: 12px;
  color: var(--foreground-light);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.party-name {
  font-size: 14px;
  font-weight: 600;
}

.contract-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.detail-item {}

.detail-label {
  font-size: 12px;
  color: var(--foreground-light);
  margin-bottom: 2px;
}

.detail-value {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-secondary);
}

.signature-status {
  display: flex;
  gap: var(--spacing-lg);
  padding: var(--spacing-md);
  border-top: 1px solid var(--border);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
}

.sig-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 14px;
}

.sig-check {
  color: var(--secondary);
}

.sig-pending {
  color: var(--foreground-light);
}

.contract-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border);
}

/* ========== Dashboard: Messages (Figma) ========== */
.messages-container {
  display: flex;
  height: calc(100vh - 64px);
  background: var(--background);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.conv-list {
  width: 320px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--background);
}

.conv-list-header {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 700;
}

.conv-list-search {
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
}

.conv-list-search input {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background-muted);
  outline: none;
}

.conv-list-search input:focus {
  border-color: var(--primary);
}

.conv-items {
  flex: 1;
  overflow-y: auto;
}

.conv-item {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
}

.conv-item:hover {
  background: var(--background-muted);
}

.conv-item.active {
  background: var(--primary-light);
}

.conv-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.conv-avatar.green {
  background: var(--secondary);
}

.conv-avatar.amber {
  background: var(--accent);
}

.conv-avatar.red {
  background: var(--danger);
}

.conv-info {
  flex: 1;
  min-width: 0;
}

.conv-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.conv-name {
  font-size: 14px;
  font-weight: 600;
}

.conv-time {
  font-size: 12px;
  color: var(--foreground-light);
}

.conv-preview {
  font-size: 13px;
  color: var(--foreground-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-unread {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 6px;
}

.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-top {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.chat-top .chat-name {
  font-size: 15px;
  font-weight: 600;
}

.chat-top .chat-status {
  font-size: 12px;
  color: var(--secondary);
}

.chat-top .online-dot {
  width: 8px;
  height: 8px;
  background: var(--secondary);
  border-radius: 50%;
}

.chat-body {
  flex: 1;
  padding: var(--spacing-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.msg-bubble {
  max-width: 65%;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.6;
  border-radius: var(--radius-lg);
}

.msg-sent {
  background: var(--primary);
  color: var(--on-primary);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.msg-received {
  background: var(--border-light);
  color: var(--foreground);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg-time {
  font-size: 11px;
  color: var(--foreground-light);
  margin-top: 4px;
}

.msg-time.sent {
  text-align: right;
}

.chat-bottom {
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--spacing-sm);
}

.chat-bottom input {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
}

.chat-bottom input:focus {
  border-color: var(--primary);
}

/* ========== Dashboard: Payment ========== */
.payment-table-card {
  overflow-x: auto;
}

.projects-table-card {
  overflow-x: auto;
}

.amount-col {
  font-family: var(--font-secondary);
  font-weight: 600;
}

/* ========== Dashboard: Reviews ========== */
.review-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  transition: box-shadow var(--transition);
}

.review-card:hover {
  box-shadow: var(--shadow-md);
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
}

.review-top {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.review-avatar.green {
  background: var(--secondary);
}

.review-avatar.amber {
  background: var(--accent);
}

.review-avatar.red {
  background: var(--danger);
}

.review-info {
  flex: 1;
}

.review-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.review-project {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 13px;
  color: var(--foreground-muted);
  padding: 4px 10px;
  background: var(--background-muted);
  border-radius: var(--radius-sm);
}

.review-project i {
  width: 14px;
  height: 14px;
}

.review-project:hover {
  text-decoration: underline;
  color: var(--primary);
}

.review-summary {
  display: flex;
  gap: var(--spacing-xl);
  padding: var(--spacing-lg);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-xl);
}

.summary-item {
  text-align: center;
  flex: 1;
}

.summary-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-secondary);
  color: var(--foreground);
}

.summary-label {
  font-size: 13px;
  color: var(--foreground-muted);
  margin-top: 2px;
}

.summary-stars {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: var(--spacing-xs);
}

.review-client {
  font-size: 13px;
  color: var(--foreground-light);
}

.review-content {
  flex: 1;
}

/* ========== Dashboard: Reviews Summary (Freelancer) ========== */
.reviews-summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.rating-big {
  text-align: center;
  min-width: 120px;
}

.rating-big .number {
  font-size: 56px;
  font-weight: 700;
  font-family: var(--font-secondary);
  color: var(--foreground);
  line-height: 1;
}

.rating-big .stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: var(--spacing-sm);
  color: var(--accent);
}

.rating-big .stars i {
  width: 22px;
  height: 22px;
}

.rating-big .count {
  font-size: 14px;
  color: var(--foreground-muted);
  margin-top: var(--spacing-xs);
}

.rating-breakdown {
  flex: 1;
}

.rating-bar-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.rating-bar-row:last-child {
  margin-bottom: 0;
}

.rating-bar-label {
  font-size: 13px;
  color: var(--foreground-muted);
  min-width: 40px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating-bar-label i {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.rating-bar-track {
  flex: 1;
  height: 8px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.rating-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
}

.rating-bar-count {
  font-size: 13px;
  color: var(--foreground-muted);
  min-width: 24px;
  text-align: right;
  font-family: var(--font-secondary);
}

/* ========== Dashboard: Settings ========== */
.settings-card {
  margin-bottom: var(--spacing-lg);
}

.settings-card .card-header {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 700;
}

.settings-card .card-body {
  padding: var(--spacing-lg);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition);
}

.checkbox-item:hover {
  border-color: var(--primary);
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.checkbox-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.checkbox-desc {
  font-size: 13px;
  color: var(--foreground-muted);
}

.save-section {
  display: flex;
  justify-content: flex-end;
  padding-top: var(--spacing-lg);
}

/* ========== Dashboard: Notifications ========== */
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.notification-item {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: var(--background);
  border: 1px solid var(--border);
  border-bottom: none;
  transition: background var(--transition);
  cursor: pointer;
}

.notification-item:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.notification-item:last-child {
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.notification-item:hover {
  background: var(--background-muted);
}

.notification-item.unread {
  background: var(--primary-light);
  border-color: var(--primary-border);
}

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

.notif-icon-dot.blue {
  background: var(--primary-light);
  color: var(--primary);
}

.notif-icon-dot.green {
  background: var(--secondary-light);
  color: var(--secondary);
}

.notif-icon-dot.amber {
  background: var(--accent-light);
  color: var(--accent);
}

.notif-icon-dot.red {
  background: var(--danger-light);
  color: var(--danger);
}

.notif-content {
  flex: 1;
}

.notif-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.notif-message {
  font-size: 14px;
  color: var(--foreground-muted);
  line-height: 1.5;
}

.notif-time {
  font-size: 12px;
  color: var(--foreground-light);
  margin-top: var(--spacing-xs);
}

.notif-unread-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 4px;
}

/* ========== Dashboard: Post Project ========== */
.budget-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.budget-row .separator {
  font-size: 14px;
  color: var(--foreground-muted);
  padding: 0 4px;
}

.skill-tags-area {
  min-height: 80px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  align-content: flex-start;
  cursor: text;
}

.skill-tag-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
}

.skill-tag-item .remove {
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.radio-group {
  display: flex;
  gap: var(--spacing-xl);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  flex: 1;
}

.radio-option:hover {
  border-color: var(--primary);
}

.radio-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.radio-option input[type="radio"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

.radio-option .radio-label {
  font-weight: 600;
  font-size: 14px;
}

.radio-option .radio-desc {
  font-size: 13px;
  color: var(--foreground-muted);
  margin-top: 2px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.checkbox-row input[type="checkbox"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

.checkbox-row label {
  font-size: 14px;
  font-weight: 500;
}

.position-rows {
  margin-top: var(--spacing-md);
}

.position-row {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-light);
}

.position-row:last-child {
  border-bottom: none;
}

.position-row .form-input {
  flex: 1;
}

.position-row .quantity-input {
  width: 80px;
}

.add-position-btn {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--spacing-sm);
}

/* ========== Dashboard: Freelancer Overview ========== */
.profile-completion {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md) var(--spacing-lg);
  min-width: 300px;
}

.profile-completion .label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-completion .percentage {
  color: var(--primary);
  font-family: var(--font-secondary);
}

/* ========== Dashboard: Freelancer Profile Edit ========== */
.profile-card-header {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
}

.profile-card-body {
  padding: var(--spacing-lg);
}

.banner-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-2xl) var(--spacing-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  color: var(--foreground-muted);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--background-muted);
}

.banner-upload:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.banner-upload i {
  width: 40px;
  height: 40px;
  color: var(--foreground-light);
}

.banner-upload:hover i {
  color: var(--primary);
}

.banner-upload .upload-title {
  font-size: 15px;
  font-weight: 600;
}

.banner-upload .upload-hint {
  font-size: 13px;
  color: var(--foreground-light);
}

.avatar-upload-section {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground-light);
  flex-shrink: 0;
}

.avatar-preview i {
  width: 40px;
  height: 40px;
}

.avatar-upload-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.avatar-upload-info p {
  font-size: 13px;
  color: var(--foreground-muted);
}

.tags-input-area {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 44px;
  align-items: center;
  cursor: text;
  transition: border-color var(--transition);
}

.tags-input-area:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.tags-input-area .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 13px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.tags-input-area .tag .remove {
  cursor: pointer;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

.tags-input-area .tag .remove:hover {
  opacity: 1;
}

.tags-input-area input {
  border: none;
  outline: none;
  font-size: 14px;
  flex: 1;
  min-width: 120px;
  background: transparent;
}

/* ========== Dashboard: Freelancer Portfolio ========== */
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

.portfolio-header h1 {
  font-size: 24px;
  font-weight: 700;
}

.portfolio-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.portfolio-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.portfolio-image {
  aspect-ratio: 16 / 9;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground-light);
}

.portfolio-image i {
  width: 48px;
  height: 48px;
}

.portfolio-content {
  padding: var(--spacing-md) var(--spacing-lg);
}

.portfolio-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.portfolio-desc {
  font-size: 14px;
  color: var(--foreground-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--spacing-sm);
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

.portfolio-link i {
  width: 14px;
  height: 14px;
}

.portfolio-link:hover {
  text-decoration: underline;
}

.portfolio-footer {
  padding: var(--spacing-sm) var(--spacing-lg) var(--spacing-md);
  display: flex;
  gap: var(--spacing-sm);
  border-top: 1px solid var(--border-light);
}

/* ========== Dashboard: Freelancer Earnings ========== */
.earnings-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.earnings-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.earnings-stat .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-sm);
}

.earnings-stat .stat-icon.green {
  background: var(--secondary-light);
  color: var(--secondary);
}

.earnings-stat .stat-icon.blue {
  background: var(--primary-light);
  color: var(--primary);
}

.earnings-stat .stat-icon.amber {
  background: var(--accent-light);
  color: var(--accent);
}

.earnings-stat .stat-label {
  font-size: 13px;
  color: var(--foreground-muted);
  margin-bottom: var(--spacing-xs);
}

.earnings-stat .stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-secondary);
}

.earnings-stat .stat-value.green {
  color: var(--secondary);
}

.earnings-stat .stat-value.blue {
  color: var(--primary);
}

.earnings-stat .stat-value.amber {
  color: var(--accent);
}

.bank-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

.bank-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bank-field .field-label {
  font-size: 13px;
  color: var(--foreground-muted);
}

.bank-field .field-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--foreground);
}

/* ========== Filter Tabs (Figma applications page) ========== */
.filter-tabs {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.filter-tab {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: var(--radius-md);
  color: var(--foreground-muted);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--background);
  transition: all var(--transition);
}

.filter-tab.active {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.filter-tab .count {
  font-size: 12px;
  margin-left: 4px;
  opacity: 0.7;
}

/* ========== Figma Page-Specific Responsive ========== */
@media (max-width: 768px) {
  .profile-layout {
    flex-direction: column;
  }

  .profile-sidebar {
    width: 100%;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-layout {
    flex-direction: column;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .contract-details {
    grid-template-columns: 1fr;
  }

  .contract-parties {
    flex-direction: column;
  }

  .earnings-stats {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .reviews-summary {
    flex-direction: column;
  }

  .messages-container {
    flex-direction: column;
    height: auto;
  }

  .conv-list {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 300px;
  }

  .review-summary {
    flex-direction: column;
  }

  .bank-info {
    grid-template-columns: 1fr;
  }

  .radio-group {
    flex-direction: column;
  }

  .welcome-section {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .profile-completion {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Filter Row (案件列表篩選列)
   ======================================== */
.filter-row {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  align-items: center;
}

.filter-row .form-select {
  width: auto;
  min-width: 130px;
  flex: 1;
}

.mobile-filter-toggle {
  display: none;
}

/* ========================================
   暗色主題全域修正
   ======================================== */

/* 確保所有黃色/萊姆背景上的文字為深色 */
[style*="background"][style*="#D4E600"],
[style*="background"][style*="#d4e600"],
[style*="background"][style*="#E5FF00"],
[style*="background"][style*="#e5ff00"],
[style*="background"][style*="#CDDC39"],
[style*="background"][style*="yellow"],
[style*="background"][style*="lime"] {
  color: #1A2000 !important;
}

/* data-table 暗色主題 */
.data-table th {
  background: var(--background-muted);
  color: var(--foreground-muted);
  border-bottom-color: var(--border);
}

.data-table td {
  color: var(--dark-text);
  border-bottom-color: var(--border);
}

.data-table tr:hover td {
  background: var(--card);
}

/* stat-card 暗色主題 */
.stat-card {
  background: var(--card);
  border-color: var(--border);
}

/* messages 暗色主題 */
.messages-layout {
  background: var(--background);
}

.chat-messages {
  background: var(--background-muted);
}

.message-bubble.received {
  background: var(--card);
  color: var(--dark-text);
}

.chat-input {
  background: var(--background);
  border-top-color: var(--border);
}

.chat-send-btn {
  background: var(--primary);
  color: var(--on-primary);
}

.chat-send-btn:hover {
  background: #E8F500;
}

/* Alert 暗色主題 */
.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--secondary);
}

/* ========================================
   手機版篩選列
   ======================================== */
@media (max-width: 768px) {
  .filter-row {
    display: none;
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .filter-row.active {
    display: flex;
  }

  .filter-row .form-select {
    width: 100%;
    flex: none;
  }

  .mobile-filter-toggle {
    display: inline-flex;
    width: 100%;
    justify-content: center;
  }

  .mobile-filter-toggle.active {
    margin-bottom: var(--spacing-sm);
  }
}

/* ========================================
   Hero Starfield Animation
   ======================================== */
.hero-starfield {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at bottom, #1a1a2e 0%, #0C1116 40%, #090a0f 100%);
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px var(--spacing-xl) 60px;
  contain: layout style paint;
}

/* 地平線黃色光暈（純漸層，不使用 blur filter） */
.hero-starfield::before {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -20%;
  right: -20%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(212, 230, 0, 0.07) 0%, rgba(212, 230, 0, 0.03) 40%, transparent 70%);
  z-index: 2;
  pointer-events: none;
}

/* 底部漸層過渡到背景色 */
.hero-starfield::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--background) 0%, rgba(15, 23, 42, 0.8) 30%, rgba(212, 230, 0, 0.04) 70%, transparent 100%);
  z-index: 5;
  pointer-events: none;
}

.hero-starfield .hero-content {
  position: relative;
  z-index: 10;
}

/* Canvas 星空 — 單一元素，GPU 合成層 */
#starfield-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200%;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
  animation: starfieldScroll 80s linear infinite;
}

@keyframes starfieldScroll {
  from { transform: translateY(0) translateZ(0); }
  to   { transform: translateY(-50%) translateZ(0); }
}

/* Auth Brand Starfield (登入/註冊頁星空) */
#auth-stars,
#auth-stars2,
#auth-stars3 {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  background: transparent;
  z-index: 0;
}

#auth-stars {
  animation: animStar 50s linear infinite;
}

#auth-stars:after {
  content: " ";
  position: absolute;
  top: 2000px;
  width: 1px;
  height: 1px;
  background: transparent;
  box-shadow: inherit;
}

#auth-stars2 {
  width: 2px;
  height: 2px;
  animation: animStar 100s linear infinite;
}

#auth-stars2:after {
  content: " ";
  position: absolute;
  top: 2000px;
  width: 2px;
  height: 2px;
  background: transparent;
  box-shadow: inherit;
}

#auth-stars3 {
  width: 3px;
  height: 3px;
  animation: animStar 150s linear infinite;
}

#auth-stars3:after {
  content: " ";
  position: absolute;
  top: 2000px;
  width: 3px;
  height: 3px;
  background: transparent;
  box-shadow: inherit;
}

/* ========================================
   Step 6: 新增按鈕樣式
   ======================================== */
.btn-dark {
  background: var(--dark-bg);
  color: #fff;
  border-color: var(--dark-bg);
}
.btn-dark:hover {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-bg-secondary);
}

.btn-outline-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.btn-outline-dark:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger-outline:hover {
  background: var(--danger);
  color: #fff;
}

/* ========================================
   Expand Cards (熱門類別 / 依專長找專家)
   預設展開，hover 邊框亮
   ======================================== */
.expand-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.expand-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
  position: relative;
}
.expand-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(212, 230, 0, 0.15);
}

/* Top: icon + title — centered */
.expand-card-left {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--spacing-lg) var(--spacing-lg) 0;
  margin-bottom: 30px;
  white-space: nowrap;
}
.expand-card-left i,
.expand-card-left svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
  flex-shrink: 0;
}
.expand-card-left h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0;
  color: var(--foreground);
}

/* Bottom: tags area — grid 2 columns */
.expand-card-right {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 0 var(--spacing-md) var(--spacing-lg);
  padding-bottom: calc(var(--spacing-lg) + 28px);
}
.expand-tag {
  font-size: 0.6875rem;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.2s, color 0.2s;
}
.expand-tag:hover {
  background: var(--primary);
  color: var(--on-primary);
}
.expand-more {
  position: absolute;
  bottom: var(--spacing-md);
  right: var(--spacing-md);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  padding: 2px 6px;
}
.expand-more:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .expand-cards {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}
@media (max-width: 480px) {
  .expand-cards {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Stats Charts Section (趨勢圖 + 圓形數據)
   ======================================== */
.stats-charts {
  display: flex;
  gap: var(--spacing-xl);
  align-items: flex-start;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
}
.stat-chart-item {
  flex: 1;
  text-align: center;
}
.stat-chart-item:first-child {
  flex: 1.4;
}
.stat-chart-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: var(--spacing-md);
}
.stat-chart-subtitle {
  font-size: 0.875rem;
  color: var(--foreground-muted);
  margin-top: var(--spacing-sm);
}

/* Trend chart */
.trend-chart-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.trend-chart-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}
.trend-grid-line {
  stroke: var(--border);
  stroke-width: 0.15;
}
.trend-line {
  fill: none;
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trend-line-1 { stroke: var(--primary); }
.trend-line-2 { stroke: var(--secondary); }
.trend-fill-1 { fill: rgba(212, 230, 0, 0.08); }
.trend-fill-2 { fill: rgba(16, 185, 129, 0.08); }
.trend-label {
  font-size: 2.5px;
  fill: var(--foreground-muted);
}
.trend-legend {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-sm);
}
.trend-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--foreground-muted);
}
.trend-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Circle chart outer container with float tags */
.circle-chart-outer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 220px;
}
.circle-float-tags {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 110px;
  height: 24px;
  pointer-events: none;
  overflow: visible;
}
.circle-float-left {
  left: -20px;
  text-align: right;
}
.circle-float-right {
  right: -20px;
  text-align: left;
}
.float-tag {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  font-size: 0.8125rem;
  font-weight: 500;
  background: none;
  color: var(--primary);
  border: none;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.4s ease;
}
.circle-float-left .float-tag {
  text-align: right;
}
.circle-float-right .float-tag {
  text-align: left;
}
.float-tag.visible {
  opacity: 0.8;
  transform: translateY(0);
}
.float-tag.fading {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Circle chart */
.circle-chart-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}
.circle-chart-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.circle-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 5;
}
.circle-progress {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke: var(--primary);
}
.circle-percentage-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: baseline;
  justify-content: center;
}
.circle-percentage-text .circle-count {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.circle-percentage-text .circle-percent-sign {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-left: 2px;
}

@media (max-width: 768px) {
  .stats-charts {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xl);
  }
  .stat-chart-item {
    width: 100%;
    max-width: 400px;
  }
}

/* ========================================
   Feedback Slider (真實心得)
   ======================================== */
.feedback-slider-wrap {
  position: relative;
}
.feedback-slider {
  display: flex;
  gap: var(--spacing-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--spacing-sm);
  scrollbar-width: none;
  cursor: grab;
  width: 100%;
}
.feedback-slider:active { cursor: grabbing; }
.feedback-slider::-webkit-scrollbar {
  display: none;
}
.feedback-card {
  flex: 0 0 calc(25% - 12px);
  min-width: 0;
  min-height: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, box-shadow 0.25s;
  overflow: hidden;
  position: relative;
}
.feedback-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}
a.feedback-card,
a.card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* Card photo background — covers most of the card */
.feedback-photo {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70%;
  overflow: hidden;
  z-index: 0;
}
.feedback-photo img {
  width: 100%;
  height: calc(100% + 20px);
  object-fit: cover;
  object-position: top center;
  margin-top: -20px;
}
/* Gradient: top 100% visible → bottom fades to card bg */
.feedback-photo::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 20%, var(--card) 100%);
  pointer-events: none;
}
/* Frosted glass overlay on lower half of photo */
.feedback-photo::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50%;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent 0%, black 60%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 60%);
}

/* Feedback sub-title (shown when both sections visible) */
.feedback-sub-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: var(--spacing-md);
}
.feedback-sub-title i {
  color: var(--primary);
}

/* Username overlay at top-left of card */
.feedback-card .feedback-name-overlay {
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-lg);
  z-index: 2;
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Card body content — sits on top of photo */
.feedback-body {
  position: relative;
  z-index: 1;
  padding: 0 var(--spacing-lg) var(--spacing-lg);
  padding-top: 55%;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.feedback-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: var(--spacing-xs);
}

/* Project card variant (no photo, light bg) */
.feedback-card.project-card {
  background: rgba(255, 255, 255, 0.1);
  min-height: auto;
}
.feedback-card.project-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(212, 230, 0, 0.12);
}
.feedback-card.project-card .feedback-body {
  padding-top: var(--spacing-lg);
}

/* Freelancer slider card */
.feedback-card.freelancer-slider-card {
  min-height: 380px;
}

/* 接案人卡片的 tagline：單行 + 緊貼標籤上方 */
.freelancer-slider-card .feedback-text,
.freelancer-grid-card .feedback-text {
  flex: none;
  margin-top: auto;
  margin-bottom: var(--spacing-xs);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: unset;
}
.feedback-text {
  font-size: 0.8125rem;
  color: var(--dark-text);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feedback-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--spacing-sm);
}
.feedback-tag {
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.feedback-earnings {
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--secondary-light);
  color: var(--secondary);
  font-weight: 700;
}
.feedback-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--spacing-sm) 0;
}
.feedback-plan {
  font-size: 0.75rem;
  color: var(--foreground-light);
  display: flex;
  align-items: center;
  gap: 4px;
}
.feedback-plan i {
  width: 14px;
  height: 14px;
}

/* Slider nav arrows - absolute positioned outside */
.feedback-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.feedback-nav.prev {
  left: -44px;
}
.feedback-nav.next {
  right: -44px;
}
.feedback-nav:hover {
  opacity: 1;
}
.feedback-nav i {
  width: 28px;
  height: 28px;
}

@media (max-width: 1300px) {
  .feedback-nav.prev {
    left: -36px;
  }
  .feedback-nav.next {
    right: -36px;
  }
}
@media (max-width: 1024px) {
  .feedback-card {
    flex: 0 0 calc(50% - 8px);
  }
  .feedback-nav.prev {
    left: 0;
  }
  .feedback-nav.next {
    right: 0;
  }
  .feedback-nav {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 50%;
    padding: 6px;
  }
}
@media (max-width: 768px) {
  .feedback-card {
    flex: 0 0 100%;
  }
  .feedback-nav {
    display: none;
  }
}

/* ============================================================
   SP - Single Portfolio (Magazine Layouts)
   ============================================================ */

.sp-page {
  background: var(--background);
  min-height: 80vh;
}

/* Breadcrumb */
.sp-breadcrumb-bar {
  border-bottom: 1px solid var(--border);
  padding: var(--spacing-md) 0;
}

.sp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--foreground-muted);
}

.sp-breadcrumb a {
  color: var(--foreground-muted);
  text-decoration: none;
}

.sp-breadcrumb a:hover {
  color: var(--foreground);
}

.sp-breadcrumb span {
  color: var(--foreground);
}

/* Author Bar */
.sp-author-bar {
  border-bottom: 1px solid var(--border);
  padding: var(--spacing-sm) 0;
}

.sp-author-inner {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.sp-author-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  color: inherit;
}

.sp-author-link:hover .sp-author-name {
  color: var(--primary);
}

.sp-author-info {
  display: flex;
  flex-direction: column;
}

.sp-author-name {
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s;
}

.sp-author-date {
  font-size: 12px;
  color: var(--foreground-light);
}

.sp-author-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* Container */
.sp-container {
  padding-top: clamp(32px, 5vh, 64px);
  padding-bottom: clamp(48px, 6vh, 80px);
  max-width: 960px;
}

/* Title */
.sp-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 var(--spacing-md);
  color: var(--foreground);
}

/* Divider */
.sp-divider {
  width: 48px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin-bottom: var(--spacing-xl);
}

/* Text column */
.sp-text-column {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--foreground-muted);
  max-width: 680px;
}

.sp-text-column p {
  margin-bottom: var(--spacing-md);
}

.sp-text-large {
  font-size: 1.1rem;
}

.sp-text-below {
  margin-top: var(--spacing-xl);
}

.sp-empty-text {
  color: var(--foreground-light);
  font-style: italic;
}

/* Image frame */
.sp-image-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--background-muted);
}

.sp-image-frame a {
  display: block;
}

.sp-image-frame img {
  width: 100%;
  display: block;
  transition: transform 0.4s cubic-bezier(0.33, 0, 0.2, 1);
}

.sp-image-frame:hover img {
  transform: scale(1.03);
}

.sp-image-full {
  margin-bottom: var(--spacing-lg);
}

.sp-image-full img {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  background: var(--background-muted);
}

/* Image grids */
.sp-image-grid {
  display: grid;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.sp-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.sp-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.sp-grid-2 .sp-image-frame img,
.sp-grid-3 .sp-image-frame img {
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Masonry-like grid */
.sp-grid-masonry {
  grid-template-columns: repeat(3, 1fr);
}

.sp-grid-masonry .sp-image-hero {
  grid-column: span 2;
  grid-row: span 2;
}

.sp-grid-masonry .sp-image-frame img {
  aspect-ratio: 4/3;
  object-fit: cover;
  height: 100%;
}

/* ---- Layout: Split ---- */
.sp-split-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: start;
}

.sp-split-image img {
  width: 100%;
  border-radius: var(--radius-md);
}

/* ---- Layout: Dual ---- */
.sp-dual-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.sp-dual-images .sp-image-frame img {
  aspect-ratio: 3/4;
  object-fit: cover;
}

/* ---- Layout: Triptych ---- */
.sp-triptych-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.sp-triptych-images .sp-image-frame img {
  aspect-ratio: 3/4;
  object-fit: cover;
}

/* ---- Related Works ---- */
.sp-related {
  background: var(--background-muted);
  padding: var(--spacing-2xl) 0;
  border-top: 1px solid var(--border);
}

.sp-related-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 var(--spacing-lg);
}

.sp-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

.sp-related-card {
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--background);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.sp-related-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.sp-related-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--background-muted);
}

.sp-related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.sp-related-card:hover .sp-related-image img {
  transform: scale(1.05);
}

.sp-related-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground-light);
}

.sp-related-card h4 {
  margin: 0;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- SP Responsive ---- */
@media (max-width: 768px) {
  .sp-title {
    font-size: 1.75rem;
  }

  .sp-split-body {
    grid-template-columns: 1fr;
  }

  .sp-dual-images {
    grid-template-columns: 1fr;
  }

  .sp-triptych-images {
    grid-template-columns: 1fr;
  }

  .sp-grid-2 {
    grid-template-columns: 1fr;
  }

  .sp-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-grid-masonry {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-grid-masonry .sp-image-hero {
    grid-column: span 2;
    grid-row: span 1;
  }

  .sp-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sp-author-actions {
    display: none;
  }

  .sp-container {
    max-width: 100%;
  }
}

/* ========================================
   浮動選單 + 聊天彈窗（Dark Glass Style）
   ======================================== */

/* --- 浮動選單 --- */
.vb-float-menu {
  position: fixed;
  right: 24px;
  bottom: 32px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vb-float-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid #D6D3D1;
  cursor: pointer;
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: #272E34;
}

.vb-float-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* 鈴鐺未讀紅點 */
.vb-float-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #EF4444;
  border: 2px solid #FFFFFF;
  pointer-events: none;
}

/* --- 聊天彈窗 (Dark Glass) --- */
.vb-chat-widget {
  position: fixed;
  right: 88px;
  bottom: 20px;
  width: 350px;
  height: 480px;
  z-index: 101;
  overflow: hidden;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  font-family: 'Noto Sans TC', 'Open Sans', sans-serif;
  font-size: 14px;
  line-height: 1.45;

  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

.vb-chat-widget.vb-chat-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Title bar */
.vb-chat-widget .vb-chat-title {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  padding: 10px 12px 10px 48px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vb-chat-avatar {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 10px;
  border-radius: 30px;
  width: 30px;
  height: 30px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.24);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vb-chat-avatar img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.vb-chat-title-text {
  flex: 1;
}

.vb-chat-title-text h1 {
  font-weight: 600;
  font-size: 13px;
  margin: 0;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vb-chat-title-text h2 {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  letter-spacing: 1px;
  margin: 0;
  padding: 0;
  font-weight: normal;
}

.vb-chat-close {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.2s;
  margin-left: auto;
}

.vb-chat-close:hover {
  color: #fff;
}

/* Views */
.vb-chat-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Messages area */
.vb-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.vb-msg {
  clear: both;
  float: left;
  padding: 8px 12px 9px;
  border-radius: 10px 10px 10px 0;
  background: rgba(0, 0, 0, 0.3);
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.5;
  margin-left: 35px;
  position: relative;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  word-break: break-word;
}

.vb-msg::before {
  content: '';
  position: absolute;
  bottom: -6px;
  border-top: 6px solid rgba(0, 0, 0, 0.3);
  left: 0;
  border-right: 7px solid transparent;
}

.vb-msg-avatar {
  position: absolute;
  z-index: 1;
  bottom: -15px;
  left: -35px;
  border-radius: 30px;
  width: 30px;
  height: 30px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.24);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vb-msg-avatar img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.vb-msg-personal {
  float: right;
  color: #fff;
  text-align: right;
  background: linear-gradient(120deg, #248A52, #257287);
  border-radius: 10px 10px 0 10px;
  margin-left: 0;
  margin-right: 0;
}

.vb-msg-personal::before {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 5px solid transparent;
  border-top: 4px solid #257287;
  bottom: -4px;
}

.vb-msg.vb-msg-new {
  transform: scale(0);
  transform-origin: 0 0;
  animation: vb-bounce 500ms linear both;
}

.vb-msg-personal.vb-msg-new {
  transform-origin: 100% 0;
}

/* Menu actions */
.vb-menu-actions {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vb-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
  font-family: inherit;
}

.vb-menu-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.vb-menu-btn svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* Back button */
.vb-chat-back {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s;
  font-family: inherit;
}

.vb-chat-back:hover {
  color: #fff;
}

/* Email input (feedback) */
.vb-chat-email-box {
  flex: 0 0 auto;
  padding: 6px 10px 0;
}

.vb-chat-email {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.vb-chat-email:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.vb-chat-email::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Input box (feedback) */
.vb-chat-input-box {
  flex: 0 0 auto;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 10px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.vb-chat-textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  resize: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.4;
  min-height: 20px;
  max-height: 60px;
  padding: 0;
}

.vb-chat-textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.vb-chat-submit {
  flex-shrink: 0;
  background: #248A52;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.vb-chat-submit:hover {
  background: #1D7745;
}

/* FAQ（對話式按鈕列表） */
.vb-faq-btns {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 160px;
  overflow-y: auto;
}

.vb-faq-btns--full {
  flex: 1;
  max-height: none;
  border-top: none;
  padding: 12px;
  gap: 8px;
  justify-content: center;
}

.vb-faq-role-btn {
  text-align: center !important;
  padding: 14px 12px !important;
  font-size: 15px !important;
  font-weight: 500;
}

.vb-faq-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.vb-faq-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Custom scrollbar for dark glass */
.vb-chat-messages::-webkit-scrollbar,
.vb-faq-list::-webkit-scrollbar {
  width: 4px;
}

.vb-chat-messages::-webkit-scrollbar-track,
.vb-faq-list::-webkit-scrollbar-track {
  background: transparent;
}

.vb-chat-messages::-webkit-scrollbar-thumb,
.vb-faq-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

/* Bounce animation */
@keyframes vb-bounce {
  0% { transform: matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
  4.7% { transform: matrix3d(0.45, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
  9.41% { transform: matrix3d(0.883, 0, 0, 0, 0, 0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
  14.11% { transform: matrix3d(1.141, 0, 0, 0, 0, 1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
  18.72% { transform: matrix3d(1.212, 0, 0, 0, 0, 1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
  24.32% { transform: matrix3d(1.151, 0, 0, 0, 0, 1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
  29.93% { transform: matrix3d(1.048, 0, 0, 0, 0, 1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
  41.04% { transform: matrix3d(0.961, 0, 0, 0, 0, 0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
  52.15% { transform: matrix3d(0.991, 0, 0, 0, 0, 0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
  63.26% { transform: matrix3d(1.007, 0, 0, 0, 0, 1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
  85.49% { transform: matrix3d(0.999, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
  100% { transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); }
}

/* 隱藏 plugin 內建的通知小工具（改用浮動選單的鈴鐺） */
.vibuzz-notif-widget {
  display: none !important;
}

/* --- 通知彈窗 (Dark Glass) --- */
.vb-notif-popup {
  position: fixed;
  right: 88px;
  bottom: 20px;
  width: 330px;
  height: 440px;
  z-index: 101;
  overflow: hidden;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  font-family: 'Noto Sans TC', 'Open Sans', sans-serif;
  font-size: 12px;
  line-height: 1.3;

  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

.vb-notif-popup.vb-notif-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* 通知彈窗 Header */
.vb-notif-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
}

.vb-notif-header-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.vb-notif-header-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.vb-notif-header .vb-chat-close {
  margin-left: auto;
}

/* 通知列表 */
.vb-notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.vb-notif-list::-webkit-scrollbar {
  width: 4px;
}
.vb-notif-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

/* 通知項目 */
.vb-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.6);
  transition: background 0.2s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vb-notif-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.vb-notif-item.unread {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
}

/* 已讀/未讀狀態 icon */
.vb-notif-status {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* 未讀紅點 */
.vb-notif-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EF4444;
}

/* 已讀綠色打勾 */
.vb-notif-status-check {
  color: #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vb-notif-content {
  flex: 1;
  min-width: 0;
}

.vb-notif-title {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vb-notif-item.unread .vb-notif-title {
  color: #fff;
}

.vb-notif-msg {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vb-notif-time {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 2px;
}

.vb-notif-loading,
.vb-notif-empty {
  padding: 30px 10px;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
}

/* 通知彈窗底部 */
.vb-notif-bottom {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
}

.vb-notif-view-all {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 11px;
  transition: color 0.2s;
}

.vb-notif-view-all:hover {
  color: #fff;
}

/* 全部已讀按鈕 */
.vb-notif-mark-all {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: inherit;
}

.vb-notif-mark-all:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}

/* --- RWD --- */
@media (max-width: 480px) {
  .vb-float-menu {
    right: 14px;
    bottom: 20px;
  }

  .vb-chat-widget,
  .vb-notif-popup {
    right: 5%;
    left: 5%;
    bottom: 80px;
    width: 90%;
    height: auto;
    max-height: 60vh;
  }
}

/* ========================================
   Support Center (sc- prefix)
   ======================================== */

/* --- Spin animation --- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.sc-spinner {
  animation: spin 1s linear infinite;
}

/* --- Hero --- */
.sc-hero {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, rgba(212,230,0,0.06) 0%, transparent 100%);
  text-align: center;
}

.sc-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: 12px;
}

.sc-hero-sub {
  font-size: 1.125rem;
  color: var(--foreground-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* --- Sticky Nav --- */
.sc-floating-nav {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.sc-floating-nav.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sc-nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 var(--spacing-md);
  max-width: 720px;
  margin: 0 auto;
}

.sc-nav-links a {
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--foreground-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.sc-nav-links a:hover {
  color: var(--foreground);
}

.sc-nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* --- Section Titles --- */
.sc-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--foreground);
  text-align: center;
  margin-bottom: 40px;
}

.sc-section-desc {
  font-size: 1rem;
  color: var(--foreground-muted);
  text-align: center;
  margin-bottom: 40px;
}

/* --- Form Wrapper --- */
.sc-form-wrapper {
  max-width: 1140px;
  margin: 0 auto;
}

.sc-form-wrapper .form-input:focus,
.sc-form-wrapper .form-select:focus,
.sc-form-wrapper .form-textarea:focus {
  border: 2px solid var(--primary);
  box-shadow: none;
  outline: none;
}

.sc-form-wrapper .form-input:focus-visible,
.sc-form-wrapper .form-select:focus-visible,
.sc-form-wrapper .form-textarea:focus-visible {
  outline: none;
}

.sc-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sc-submit-btn {
  margin-top: 8px;
  min-width: 160px;
}

.sc-btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --- Thank You --- */
.sc-thankyou {
  max-width: 1140px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 20px;
}

.sc-thankyou-icon {
  margin-bottom: 24px;
}

.sc-thankyou h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 12px;
}

.sc-thankyou p {
  color: var(--foreground-muted);
  margin-bottom: 8px;
}

.sc-thankyou-content {
  color: var(--foreground-muted);
  margin: 16px 0 32px;
  font-size: 0.9375rem;
}

.sc-again-btn {
  margin-top: 16px;
}

/* --- FAQ Toolbar (search + filters) --- */
.sc-faq-toolbar {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}

/* --- FAQ Filters --- */
.sc-faq-filters {
  display: flex;
  gap: 10px;
}

/* --- FAQ Search --- */
.sc-faq-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  flex: 1;
  min-width: 0;
  transition: border-color 0.2s;
}

.sc-faq-search:focus-within {
  border-color: var(--primary);
}

.sc-faq-search svg {
  flex-shrink: 0;
  color: var(--foreground-muted);
}

.sc-faq-search input {
  border: none;
  background: transparent;
  color: var(--foreground);
  font-size: 14px;
  outline: none;
  width: 100%;
  font-family: inherit;
}

.sc-faq-search input::placeholder {
  color: var(--foreground-muted);
}

.sc-faq-filter {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.sc-faq-filter:hover {
  border-color: var(--primary);
  color: var(--foreground);
}

.sc-faq-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary, #1A2000);
  font-weight: 600;
}

/* --- FAQ Accordion --- */
.sc-faq-list {
  max-width: 1140px;
  margin: 0 auto;
}

.sc-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  margin-bottom: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.2s, border-color 0.2s;
}

.sc-faq-item:hover,
.sc-faq-item.open {
  background: var(--primary);
  border-color: var(--primary);
}

.sc-faq-item:hover .sc-faq-question,
.sc-faq-item.open .sc-faq-question {
  color: var(--on-primary, #1A2000);
}

.sc-faq-item:hover .sc-faq-question svg,
.sc-faq-item.open .sc-faq-question svg {
  color: var(--on-primary, #1A2000);
}

.sc-faq-item:hover .sc-faq-answer p,
.sc-faq-item.open .sc-faq-answer p {
  color: var(--on-primary, #1A2000);
}

.sc-faq-item:hover .sc-faq-answer a,
.sc-faq-item.open .sc-faq-answer a {
  color: var(--on-primary, #1A2000);
}

.sc-faq-item.sc-hidden {
  display: none;
}

.sc-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 20px;
  background: transparent;
  border: none;
  color: var(--foreground);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  gap: 12px;
}

.sc-faq-question svg {
  flex-shrink: 0;
  color: var(--foreground-muted);
  transition: transform 0.3s ease;
}

.sc-faq-item.open .sc-faq-question svg {
  transform: rotate(180deg);
}

.sc-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.sc-faq-item.open .sc-faq-answer {
  max-height: 300px;
}

.sc-faq-answer p {
  padding: 0 20px 18px;
  color: var(--foreground-muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.sc-faq-answer a {
  color: var(--primary);
  text-decoration: underline;
}

/* --- RWD Support Center --- */
@media (max-width: 768px) {
  .sc-hero {
    padding: 60px 0 40px;
  }

  .sc-hero h1 {
    font-size: 1.75rem;
  }

  .sc-form-row {
    grid-template-columns: 1fr;
  }

  .sc-nav-links a {
    font-size: 13px;
    padding: 12px 14px;
  }

  .sc-faq-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .sc-faq-filters {
    flex-wrap: wrap;
    justify-content: center;
  }

  .sc-faq-search {
    min-width: 0;
  }

  .sc-section-title {
    font-size: 1.375rem;
  }
}

/* ==============================
   Bookmark Button
   ============================== */
.bookmark-btn {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  z-index: 2;
  background: rgba(0,0,0,0.3);
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-full);
  transition: transform 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bookmark-btn:hover {
  transform: scale(1.15);
  background: rgba(0,0,0,0.5);
}
.bookmark-btn svg { fill: none; }
.bookmark-btn.bookmarked svg { fill: var(--danger); color: var(--danger); }

/* ==============================
   Onboarding Wizard
   ============================== */
.wizard-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}
.wizard-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  width: 100%;
  max-width: 560px;
  margin: var(--spacing-xl);
  color: var(--foreground);
  max-height: 90vh;
  overflow-y: auto;
}
.wizard-indicators {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  margin-bottom: var(--spacing-xl);
}
.wizard-indicator {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.wizard-indicator.active { background: var(--primary); }
.wizard-indicator.completed { background: var(--secondary); }
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--spacing-xl);
  gap: var(--spacing-md);
}

/* ==============================
   Post Project Step Bar
   ============================== */
.step-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-md) 0;
}
.step-bar-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 14px;
  color: var(--foreground-muted);
  transition: color 0.3s;
}
.step-bar-item.active { color: var(--primary); font-weight: 600; }
.step-bar-item.completed { color: var(--secondary); }
.step-bar-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid var(--border);
  background: transparent;
  transition: all 0.3s;
}
.step-bar-item.active .step-bar-number { border-color: var(--primary); background: var(--primary); color: #fff; }
.step-bar-item.completed .step-bar-number { border-color: var(--secondary); background: var(--secondary); color: #fff; }
.step-bar-line {
  width: 40px;
  height: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.step-bar-line.completed { background: var(--secondary); }

@media (max-width: 768px) {
  .step-bar-item span:not(.step-bar-number) { display: none; }
  .step-bar-line { width: 24px; }
}

/* ==============================
   Bid Modal Enhancements
   ============================== */
.delivery-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}
.delivery-chip {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.delivery-chip:hover { border-color: var(--primary); }
.delivery-chip.active {
  border-color: var(--primary);
  background: rgba(37,99,235,0.1);
  color: var(--primary);
}
.milestone-item {
  display: grid;
  grid-template-columns: 1fr 120px 80px 32px;
  gap: var(--spacing-sm);
  align-items: center;
  margin-bottom: var(--spacing-sm);
}
@media (max-width: 768px) {
  .milestone-item { grid-template-columns: 1fr; }
}
