/* Ding Dong Furnishing & Renovation - Main Stylesheet v2 */
:root {
  --primary: #3D5A3D;          /* Deeper forest green for stronger contrast */
  --primary-dark: #2A3F2A;
  --primary-light: #5C7A5C;
  --primary-soft: #E8F0E8;
  --accent: #C4783A;           /* Warmer terracotta accent for contrast */
  --accent-light: #F5E6D3;
  --bg: #F5F2EB;
  --bg-white: #FFFFFF;
  --text: #1A1A1A;
  --text-light: #4A4A4A;
  --text-muted: #7A7A7A;
  --border: #DDD6C8;
  --shadow: 0 4px 24px rgba(0,0,0,0.07);
  --shadow-hover: 0 12px 36px rgba(0,0,0,0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

/* Transparent header over hero on homepage */
.header.header-transparent {
  background: transparent;
  border-bottom: none;
}
.header.header-transparent .logo,
.header.header-transparent .nav a {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.header.header-transparent .logo-icon {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  color: #fff;
}
.header.header-transparent .lang-btn {
  color: rgba(255,255,255,0.85);
}
.header.header-transparent .lang-btn.active {
  background: rgba(255,255,255,0.95);
  color: var(--primary);
}
.header.header-transparent .btn-primary {
  background: #fff;
  color: var(--primary);
}
.header.header-transparent.scrolled {
  background: rgba(255,255,255,0.97);
  border-bottom-color: var(--border);
}
.header.header-transparent.scrolled .logo,
.header.header-transparent.scrolled .nav a {
  color: var(--text);
  text-shadow: none;
}
.header.header-transparent.scrolled .logo-icon {
  background: var(--primary);
  color: #fff;
}
.header.header-transparent.scrolled .lang-btn { color: var(--text-muted); }
.header.header-transparent.scrolled .lang-btn.active {
  background: var(--primary);
  color: #fff;
}
.header.header-transparent.scrolled .btn-primary {
  background: var(--primary);
  color: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
  flex-shrink: 0;
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}
.logo span { color: var(--text); font-weight: 600; }

.logo-img {
  height: 78px;
  width: auto;
  max-width: min(320px, 42vw);
  border-radius: 12px;
  object-fit: contain;
}
.logo-text {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
  line-height: 1.2;
}
.logo-text span {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}
.header.header-transparent .logo-text,
.header.header-transparent .logo-text span {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.header.header-transparent.scrolled .logo-text {
  color: var(--primary);
  text-shadow: none;
}
.header.header-transparent.scrolled .logo-text span {
  color: var(--text);
  text-shadow: none;
}


.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}
.nav a {
  padding: 7px 11px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-light);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  background: var(--bg);
  border-radius: 20px;
  padding: 3px;
  border: 1px solid var(--border);
}
.lang-btn {
  padding: 5px 12px;
  border: none;
  background: transparent;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}
.lang-btn.active {
  background: var(--primary);
  color: white;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(61,90,61,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
}
.btn-accent {
  background: var(--accent);
  color: white;
}
.btn-accent:hover {
  background: #A8622A;
  transform: translateY(-2px);
}
.btn-lg {
  padding: 15px 34px;
  font-size: 1.05rem;
}
.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.45rem;
  cursor: pointer;
  color: var(--text);
}

/* ========== HERO ========== */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  max-height: none;
  overflow: hidden;
  background: #1a281a;
}
.hero-slider { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  overflow: hidden;
  /* 相容舊版 background-image 寫法 */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  /* 避免超大原圖撐破版面 */
  max-width: none;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(26,40,26,0.55) 0%, rgba(26,40,26,0.35) 50%, rgba(26,40,26,0.65) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: white;
  max-width: 720px;
  padding-top: 36px;
}
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.22;
  margin-bottom: 20px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.35);
}
.hero-content p {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 28px;
  max-width: 520px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.25);
}
.hero-content h1 + .btn {
  margin-top: 8px;
}
.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 7px 16px;
  border-radius: 24px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,0.2);
}
.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.hero-dot.active {
  background: white;
  width: 30px;
  border-radius: 5px;
}

/* ========== SECTIONS ========== */
.section { padding: 88px 0; }
.section-header { text-align: center; margin-bottom: 52px; }
.section-header h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.section-header p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}
.section-label {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin-bottom: 10px;
}

/* ========== WHY CHOOSE ========== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.why-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 34px 22px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid transparent;
}
.why-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}
.why-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  background: linear-gradient(145deg, var(--primary-light), var(--primary));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  color: white;
}
.why-card h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: 8px; }
.why-card p { font-size: 0.9rem; color: var(--text-light); }

/* ========== PROJECTS ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.project-img {
  position: relative;
  height: 240px;
  overflow: hidden;
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.project-card:hover .project-img img { transform: scale(1.07); }
.project-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 20px;
}
.project-info { padding: 20px; }
.project-info h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.project-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ========== ONGOING PROJECTS (施工中) ========== */
.ongoing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 420px));
  gap: 24px;
  justify-content: center;
}
.ongoing-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
button.ongoing-card {
  width: 100%;
  text-align: left;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: var(--bg-white);
  appearance: none;
  -webkit-appearance: none;
}
.ongoing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.ongoing-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.ongoing-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.ongoing-card:hover .ongoing-img img { transform: scale(1.07); }
.project-tag--ongoing {
  background: var(--accent) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ongoing-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.ongoing-body h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 0;
}
.ongoing-stage {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  padding: 12px 14px;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
}
.ongoing-stage-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.02em;
}
.ongoing-stage strong {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.ongoing-progress {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 4px;
}
.ongoing-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 99px;
  transition: width 0.6s ease;
}
.ongoing-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* 施工記錄展示 · 8 階段（與施工流程對應） */
.section-header--compact {
  margin-bottom: 28px;
}
.section-header--compact h2 {
  margin-bottom: 0;
}
.stage-log-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stage-log-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  text-align: left;
  font: inherit;
  color: inherit;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.stage-log-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.stage-log-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.stage-log-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1a281a;
}
.stage-log-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.stage-log-card:hover .stage-log-img img {
  transform: scale(1.06);
}
.stage-log-num {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 40, 26, 0.78);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
}
.stage-log-name {
  padding: 14px 14px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

/* VR section */
.vr-section {
  background: linear-gradient(135deg, #1A281A 0%, #2A3F2A 100%);
  border-radius: var(--radius);
  padding: 48px;
  color: white;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.vr-section h2 { font-size: 1.8rem; margin-bottom: 12px; }
.vr-section p { opacity: 0.9; margin-bottom: 24px; }
.vr-preview {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
  gap: 12px;
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}
a.vr-preview:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-3px);
}
.vr-preview i { font-size: 3.5rem; opacity: 0.7; }

/* Embedded VR iframe / fallback cover */
.vr-embed {
  position: relative;
  width: 100%;
  min-height: 320px;
  height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  background: #0d150d;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}
.vr-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  z-index: 2;
}
.vr-fallback {
  position: absolute;
  inset: 0;
  display: block;
  color: #fff;
  text-decoration: none;
}
.vr-fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}
.vr-fallback:hover img { transform: scale(1.04); }
.vr-fallback-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(10,18,10,0.25) 0%, rgba(10,18,10,0.72) 100%);
  transition: background 0.3s ease;
}
.vr-fallback:hover .vr-fallback-overlay {
  background: linear-gradient(180deg, rgba(10,18,10,0.35) 0%, rgba(10,18,10,0.8) 100%);
}
.vr-play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(196,120,58,0.45);
  margin-bottom: 6px;
}
.vr-fallback-overlay strong {
  font-size: 1.1rem;
  font-weight: 600;
}
.vr-fallback-overlay span:last-child {
  font-size: 0.85rem;
  opacity: 0.85;
}
.vr-embed.is-embedded .vr-fallback { display: none; }

/* ========== SERVICES ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid transparent;
  height: 100%;
}
.service-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.service-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-soft);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  color: var(--primary);
  margin-bottom: 18px;
}
.service-card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 10px; }
.service-card p { font-size: 0.93rem; color: var(--text-light); margin-bottom: 14px; }
.service-card ul { font-size: 0.88rem; color: var(--text-light); }
.service-card ul li {
  padding: 4px 0 4px 18px;
  position: relative;
}
.service-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ========== PROCESS ========== */
.process-timeline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 12px;
  position: relative;
  padding: 20px 0;
}
.process-timeline::before {
  display: none;
}
.process-step {
  flex: 0 0 calc(25% - 12px);
  max-width: 180px;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 6px;
}
.step-num {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 auto 14px;
  box-shadow: 0 4px 14px rgba(61,90,61,0.35);
}
.process-step h4 { font-size: 0.92rem; font-weight: 600; margin-bottom: 5px; }
.process-step p { font-size: 0.78rem; color: var(--text-muted); }

.process-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.process-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 22px;
  transition: var(--transition);
}
.process-card:hover { box-shadow: var(--shadow-hover); }
.process-card .step-badge {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: var(--primary);
  color: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}
.process-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.process-card ul { margin-top: 10px; }
.process-card ul li {
  font-size: 0.9rem;
  color: var(--text-light);
  padding: 3px 0 3px 14px;
  position: relative;
}
.process-card ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
}
.process-time {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.83rem;
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-soft);
  padding: 4px 12px;
  border-radius: 20px;
}

/* ========== TESTIMONIALS ========== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.testimonial-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.75;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.author-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}
.author-info h5 { font-size: 0.95rem; font-weight: 600; }
.author-info span { font-size: 0.8rem; color: var(--text-muted); }

/* ========== CTA / QUOTE FORM ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius);
  padding: 52px 44px;
  color: white;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}
.cta-content h2 { font-size: 1.9rem; font-weight: 700; margin-bottom: 14px; }
.cta-content p { opacity: 0.9; margin-bottom: 22px; }
.cta-benefits { display: flex; flex-direction: column; gap: 10px; }
.cta-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

/* Clean Quote Form */
.quote-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}
.quote-sidebar {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.quote-sidebar h2 { font-size: 1.7rem; margin-bottom: 12px; }
.quote-sidebar > p { opacity: 0.9; margin-bottom: 28px; font-size: 0.95rem; }
.quote-sidebar .benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.quote-sidebar .benefits li:last-child { border-bottom: none; }
.quote-main {
  padding: 44px 40px;
}
.quote-main h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
  color: var(--text);
}
.quote-main .sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-light);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--bg);
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61,90,61,0.12);
  background: white;
}
.form-group textarea { resize: vertical; min-height: 90px; }

/* ========== FOOTER ========== */
.footer {
  background: #1A1A1A;
  color: #bbb;
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo { color: white; margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; margin-bottom: 18px; }
.footer h4 { color: white; font-size: 0.98rem; font-weight: 600; margin-bottom: 18px; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { font-size: 0.9rem; color: #999; }
.footer-links a:hover { color: var(--primary-light); }
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 13px;
  font-size: 0.9rem;
}
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: #777;
}

/* ========== WHATSAPP FLOAT ========== */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 58px;
  height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: var(--transition);
  color: white;
  font-size: 1.75rem;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}

/* ========== PAGE HERO ========== */
.page-hero {
  margin-top: 96px;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 70%, #1f2f1f 100%);
  color: white;
  padding: 56px 0 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.page-hero h1 {
  font-size: clamp(1.9rem, 3.8vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.page-hero p {
  font-size: 1.08rem;
  opacity: 0.9;
  max-width: 580px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ========== FEATURES / VALUES ========== */
.features-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.feature-item {
  text-align: center;
  padding: 26px 16px;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.feature-item .icon { font-size: 1.9rem; margin-bottom: 12px; color: var(--primary); }
.feature-item h4 { font-size: 1rem; margin-bottom: 6px; }
.feature-item p { font-size: 0.85rem; color: var(--text-muted); }

.experience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.exp-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px 18px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.exp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.exp-card .icon { font-size: 2.1rem; margin-bottom: 12px; color: var(--primary); }
.exp-card h4 { font-size: 0.98rem; margin-bottom: 8px; }
.exp-card p { font-size: 0.85rem; color: var(--text-light); }

.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-story img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 36px;
}
.value-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px 18px;
  text-align: center;
  box-shadow: var(--shadow);
}
.value-card .icon { font-size: 1.9rem; color: var(--primary); margin-bottom: 12px; }

/* ========== FAQ ========== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  padding: 18px 22px;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  font-family: inherit;
}
.faq-answer {
  padding: 0 22px 18px;
  font-size: 0.93rem;
  color: var(--text-light);
  display: none;
}
.faq-item.open .faq-answer { display: block; }
.faq-carousel { max-width: 800px; margin: 0 auto; }
.faq-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.faq-nav-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.faq-page-indicator {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 4rem;
  text-align: center;
}

/* ========== Closed / not open states ========== */
.status-banner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px 28px;
  border-radius: var(--radius);
  background: #fff8f0;
  border: 1px solid rgba(212, 132, 58, 0.35);
  box-shadow: var(--shadow);
}
.status-banner--closed .status-banner-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-soft, #f5ebe0);
  color: var(--accent, #c47a2a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.closed-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.closed-placeholder-card {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 20px;
  color: var(--text-muted);
}
.closed-placeholder-card i {
  font-size: 2.2rem;
  margin-bottom: 14px;
  color: var(--text-muted);
  opacity: 0.7;
}
.closed-placeholder-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: var(--text);
}
.closed-placeholder-card p {
  margin: 0;
  font-size: 0.9rem;
}
.closed-feature-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 64px 40px;
  max-width: 800px;
  margin: 0 auto;
  border: 1px dashed var(--border);
}
.closed-feature-box > i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 16px;
  opacity: 0.85;
}
.closed-feature-box h3 { margin-bottom: 12px; }
.closed-feature-box p {
  color: var(--text-light);
  margin-bottom: 20px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.status-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: #fff3e6;
  color: var(--accent, #c47a2a);
  font-weight: 700;
  font-size: 0.88rem;
}
.footer-legal {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.78rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.55);
  max-width: 900px;
}
.team-role-pill--reviewer {
  background: #e8f0fe;
  color: #3b6fd8;
}

/* ========== SHOP ========== */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.shop-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.shop-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.shop-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.shop-card-body { padding: 16px; }
.shop-card h4 { font-size: 1rem; margin-bottom: 4px; }
.shop-card .price {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 8px;
}

/* ========== TEAM / LOGIN ========== */
.login-box {
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow-hover);
}
.login-box.hidden { display: none; }
.login-box h2 { text-align: center; margin-bottom: 8px; }
.login-box .sub { text-align: center; color: var(--text-muted); margin-bottom: 28px; font-size: 0.9rem; }
.team-dashboard { display: none; }
.team-dashboard.active { display: block; }
/* 預設隱藏執行官專用區塊，登入後由 JS 依角色顯示 */
.exec-only { display: none; }
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.dash-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.dash-card h3 { margin-bottom: 16px; font-size: 1.15rem; }
.clock-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.progress-list { max-height: 320px; overflow-y: auto; }
.progress-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.progress-item img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}
.progress-item .info h5 { font-size: 0.92rem; }

/* Team workspace */
.team-sync-panel {
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.team-sync-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.team-sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.team-import-label {
  cursor: pointer;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.team-sync-meta {
  font-size: 0.82rem;
  margin: 6px 0 0;
}
.team-sync-help {
  margin-top: 12px;
  margin-bottom: 0;
}
.team-sync-help code {
  font-size: 0.85em;
  background: var(--bg, #f4f4f5);
  padding: 1px 6px;
  border-radius: 4px;
}
.team-sync-status--ok { color: #15803d; }
.team-sync-status--error { color: #b91c1c; }
.team-sync-status--offline { color: var(--text-muted); }
.team-sync-status--pulling,
.team-sync-status--pushing,
.team-sync-status--checking { color: var(--primary); }

.team-inline-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}
.team-inline-add .form-group input,
.team-inline-add .form-group select {
  width: 100%;
  min-width: 0;
}
.team-schedule-table .sch-input {
  width: 100%;
  min-width: 100px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  background: var(--bg-white, #fff);
}
.team-schedule-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.team-stage-track--checkable {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.team-stage-check {
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 10px 12px 34px;
  margin: 0;
}
.team-stage-check input.stage-done-cb {
  position: absolute;
  left: 10px;
  top: 14px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.team-stage-check.is-done {
  opacity: 0.95;
}
.team-priority-panel {
  border: 1px solid rgba(45, 106, 79, 0.2);
  background: linear-gradient(180deg, #f7fbf8 0%, #fff 48%);
}
.team-priority-list .pri-readonly {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
}
.team-priority-list .pri-bullet {
  color: var(--primary);
  margin-top: 2px;
}
.team-priority-item .pri-title-view {
  font-weight: 600;
}

.team-dash-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.team-welcome {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}
.team-dash-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ongoing-name-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 18px;
  list-style: none;
  padding: 28px 0 0;
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}
.ongoing-name-list li {
  padding: 10px 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.ongoing-name-list li::before {
  content: "施工中 · ";
  color: var(--primary);
  font-weight: 600;
  font-size: 0.78rem;
}
@media (max-width: 768px) {
  .ongoing-name-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .ongoing-name-list { grid-template-columns: 1fr; }
}
.team-project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.team-project-card-wrap {
  position: relative;
}
.team-project-card-wrap .proj-del-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
}
.team-project-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  color: inherit;
}
.team-project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.team-project-card-img {
  position: relative;
  height: 180px;
  overflow: hidden;
}
.team-project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-project-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.team-project-card-body h3 {
  font-size: 1.05rem;
  margin: 0;
}
.team-card-link {
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.team-proj-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
.team-panel-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: -6px 0 16px;
}
.team-eod-form .form-group { margin-bottom: 14px; }
.team-eod-form textarea,
.team-eod-form select,
.team-eod-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--bg);
  resize: vertical;
}
.eod-status {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  min-height: 1.2em;
}
.eod-status.ok { color: var(--primary); font-weight: 600; }
.team-log-list {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.team-log-item {
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.team-log-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
  margin-bottom: 4px;
}
.team-log-top span { color: var(--text-muted); }
.team-log-project {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.team-log-project a { color: var(--primary); }
.team-log-note {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
  white-space: pre-wrap;
}
.team-log-note.muted { color: var(--text-muted); font-style: italic; }
.team-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Project detail */
.team-proj-header {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.team-breadcrumbs {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.team-breadcrumbs a { color: var(--primary); font-weight: 500; }
.team-breadcrumbs span { margin: 0 4px; }
.team-proj-header h1 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  margin: 10px 0 12px;
}
.team-proj-meta { margin-bottom: 10px; }
.team-proj-summary {
  color: var(--text-light);
  margin: 0;
  font-size: 0.95rem;
}
.team-proj-header-side {
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  padding: 20px;
  align-self: start;
}
.team-proj-stat .label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}
.team-proj-stat strong { font-size: 1.02rem; }
.team-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}
.team-task {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.team-task.is-done {
  opacity: 0.72;
  background: var(--primary-soft);
}
.team-task.is-done label span { text-decoration: line-through; }
.team-task label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-weight: 500;
}
.team-task input { margin-top: 3px; accent-color: var(--primary); }
.team-task-meta {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  margin-left: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.team-table-wrap { overflow-x: auto; }
.team-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.team-table th,
.team-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.team-table th {
  background: var(--bg);
  font-weight: 600;
  white-space: nowrap;
}
.team-table tr.status-active { background: rgba(61, 90, 61, 0.06); }
.team-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.team-badge--done { background: var(--primary-soft); color: var(--primary); }
.team-badge--active { background: #fff3e6; color: var(--accent); }
.team-badge--pending { background: #eee; color: var(--text-muted); }
.team-stage-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.team-stage-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  background: var(--bg);
  text-align: center;
}
.team-stage-item.is-done {
  border-color: var(--primary-light);
  background: var(--primary-soft);
}
.team-stage-item.is-active {
  border-color: var(--accent);
  background: #fff8f0;
  box-shadow: 0 0 0 2px rgba(196, 120, 58, 0.15);
}
.team-stage-num {
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--border);
  color: var(--text);
}
.team-stage-item.is-done .team-stage-num,
.team-stage-item.is-active .team-stage-num {
  background: var(--primary);
  color: #fff;
}
.team-stage-item.is-active .team-stage-num { background: var(--accent); }
.team-stage-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.35;
}
.team-stage-state {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.team-missing {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-white);
  border-radius: var(--radius);
}

/* Roles */
.team-role-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  vertical-align: middle;
  background: #eee;
  color: var(--text-muted);
}
.team-role-pill--executive {
  background: #fff3e6;
  color: var(--accent);
}
.team-role-pill--employee {
  background: var(--primary-soft);
  color: var(--primary);
}
.login-demo-accounts {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.55;
}
.login-demo-accounts p { margin: 0 0 12px; }
.login-demo-accounts .muted { color: var(--text-muted); font-size: 0.78rem; }
.team-stack { display: flex; flex-direction: column; gap: 24px; }
.team-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.btn-xs {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
  line-height: 1.3;
}
.team-task.is-confirmed {
  opacity: 1;
  background: var(--primary-soft);
  border-color: var(--primary-light);
}
.team-task.is-confirmed label span { text-decoration: none; }

/* Media */
.team-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.team-media-item {
  margin: 0;
  background: var(--bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.team-media-item img,
.team-media-item video {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #111;
}
.team-media-item.team-media-item--lg img,
.team-media-item.team-media-item--lg video {
  aspect-ratio: 4 / 3;
  min-height: 180px;
}
.team-media-item figcaption {
  display: none; /* overlay meta replaces figcaption text */
}

/* Finance */
.finance-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.finance-mini {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.finance-mini span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.finance-mini strong {
  display: block;
  font-size: 1.15rem;
  color: var(--text);
}
.finance-mini em {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: normal;
}
.finance-mini.highlight {
  background: var(--primary-soft);
  border-color: var(--primary-light);
}
.finance-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.finance-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.finance-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.finance-card-img {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: #ddd;
}
.finance-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.finance-card-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.finance-card-body { font-size: 0.9rem; }
.finance-card-body .muted { color: var(--text-muted); font-size: 0.85rem; margin: 2px 0 6px; }
.finance-card-body p { margin: 6px 0 0; color: var(--text-light); }
.finance-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.finance-staff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.finance-staff-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
  font: inherit;
  color: inherit;
}
.finance-staff-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.finance-staff-card.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 2px rgba(61, 90, 61, 0.15);
}
.finance-staff-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.finance-staff-body h4 {
  margin: 0 0 2px;
  font-size: 1.05rem;
}
.finance-staff-body .muted {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.finance-staff-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 8px 0 6px;
  font-size: 0.85rem;
  font-weight: 600;
}
.finance-staff-stats .pend { color: var(--accent); }
.finance-staff-stats .ok { color: var(--primary); }
.finance-subhead {
  font-size: 1rem;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.finance-subhead i { color: var(--primary); }

/* Ongoing cards as links */
a.ongoing-card {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.progress-item .info span { font-size: 0.8rem; color: var(--text-muted); }

/* ========== UTILITY ========== */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }
.hidden { display: none !important; }



/* Header logo — green badge only, enlarged */
.header .logo-img,
.logo-img {
  height: 78px;
  width: auto;
  max-width: min(320px, 42vw);
  border-radius: 14px;
  object-fit: contain;
  display: block;
  /* Soft lift so green badge stands out on any background */
  box-shadow: 0 4px 16px rgba(61, 90, 61, 0.22);
  background: transparent;
}
.footer .logo-img,
.logo-img-footer {
  height: 56px;
  max-width: 240px;
  opacity: 0.98;
  box-shadow: none;
}
.header.header-transparent .logo-img {
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.45));
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}
.header.header-transparent.scrolled .logo-img {
  filter: none;
  box-shadow: 0 4px 16px rgba(61, 90, 61, 0.22);
}

/* Hero arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-arrow:hover {
  background: rgba(255,255,255,0.4);
}
.hero-prev { left: 20px; }
.hero-next { right: 20px; }

/* Footer operator note — 華興航工程 */
.footer-operator {
  text-align: center;
  padding: 18px 16px;
  margin-top: 12px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.06);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
}
.footer-operator strong {
  color: #fff;
  font-weight: 700;
}

/* Modal for project process / before-after */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-white);
  border-radius: var(--radius);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 2;
  color: var(--text);
}
.modal-header {
  padding: 24px 28px 12px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.25rem; margin-bottom: 4px; }
.modal-header p { font-size: 0.9rem; color: var(--text-muted); }
.modal-body { padding: 20px 28px 28px; }
.process-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.process-gallery--rooms {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.process-gallery .pg-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}
.process-gallery .pg-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.process-gallery .pg-img-wrap {
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
}
.process-gallery .pg-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.process-gallery--rooms .pg-item img {
  height: 220px;
  object-fit: cover;
}
.process-gallery .pg-item:hover img {
  transform: scale(1.04);
}
.process-gallery .pg-item .pg-label {
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

/* Featured real project card */
.project-card--featured {
  box-shadow: var(--shadow-hover);
}
.project-tag--real {
  background: var(--accent) !important;
  color: #fff !important;
}

/* Fullscreen photo lightbox */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px 56px 72px;
}
.photo-lightbox.open { display: flex; }
.photo-lightbox .lightbox-content {
  max-width: min(960px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.photo-lightbox #lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.photo-lightbox .lightbox-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  color: #fff;
  font-size: 0.95rem;
}
.photo-lightbox #lightbox-caption { font-weight: 600; }
.photo-lightbox #lightbox-counter { opacity: 0.7; }
.photo-lightbox .lightbox-close,
.photo-lightbox .lightbox-prev,
.photo-lightbox .lightbox-next {
  position: absolute;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.photo-lightbox .lightbox-close:hover,
.photo-lightbox .lightbox-prev:hover,
.photo-lightbox .lightbox-next:hover {
  background: rgba(255,255,255,0.25);
}
.photo-lightbox .lightbox-close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
}
.photo-lightbox .lightbox-prev,
.photo-lightbox .lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.1rem;
}
.photo-lightbox .lightbox-prev { left: 12px; }
.photo-lightbox .lightbox-next { right: 12px; }
.ba-gallery {
  display: grid;
  gap: 20px;
}
.ba-pair {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.ba-pair-title {
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.ba-pair-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.ba-pair-imgs figure {
  margin: 0;
  position: relative;
}
.ba-pair-imgs img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.ba-pair-imgs figcaption {
  position: absolute;
  top: 8px;
  left: 8px;
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}
/* 左：裝修前 · 右：裝修後 */
.ba-pair-imgs figure:first-child figcaption {
  background: rgba(0,0,0,0.55);
}
.ba-pair-imgs figure:last-child figcaption {
  background: var(--primary);
}

.project-card { cursor: pointer; }
.ba-card { cursor: pointer; }

@media (max-width: 768px) {
  .hero-arrow {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }
  .hero-prev { left: 10px; }
  .hero-next { right: 10px; }
  .process-gallery,
  .process-gallery--rooms { grid-template-columns: 1fr; }
  .process-gallery--rooms .pg-item img { height: 260px; }
  .ba-pair-imgs img { height: 140px; }
  .header-inner { height: 88px; }
  .header .logo-img,
  .logo-img { height: 68px; max-width: min(280px, 48vw); }
  .photo-lightbox { padding: 56px 12px 80px; }
  .photo-lightbox .lightbox-prev { left: 4px; width: 40px; height: 40px; }
  .photo-lightbox .lightbox-next { right: 4px; width: 40px; height: 40px; }
}

/* ========== RESPONSIVE ========== */

/* Large tablet / small desktop: tighten nav */
@media (max-width: 1200px) {
  .nav a { padding: 6px 8px; font-size: 0.8rem; }
  .container { padding: 0 20px; }
}

/* Tablet */
@media (max-width: 1024px) {
  .why-grid,
  .services-grid,
  .projects-grid,
  .ongoing-grid,
  .team-project-grid,
  .team-proj-grid,
  .team-proj-header,
  .team-stage-track,
  .team-media-grid,
  .finance-mini-grid,
  .finance-staff-grid,
  .team-form-row,
  .shop-grid { grid-template-columns: repeat(2, 1fr); }

  .process-timeline {
    flex-wrap: wrap;
    gap: 28px;
    justify-content: center;
  }
  .process-timeline::before { display: none; }
  .process-step { flex: 0 0 30%; min-width: 140px; }

  .cta-banner,
  .quote-layout,
  .vr-section,
  .about-story,
  .dash-grid { grid-template-columns: 1fr; }

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

  .experience-grid,
  .values-grid,
  .features-row,
  .stage-log-grid { grid-template-columns: repeat(2, 1fr); }
  .closed-placeholder-grid { grid-template-columns: 1fr 1fr; }
  .status-banner { flex-direction: column; align-items: stretch; }

  .quote-sidebar { padding: 36px 28px; }
  .section { padding: 64px 0; }
  .hero { height: 92vh; height: 92dvh; min-height: 480px; max-height: none; }
  .hero-content h1 { font-size: clamp(1.75rem, 4.5vw, 2.8rem); }
}

/* Mobile nav breakpoint — earlier because 10 nav items */
@media (max-width: 900px) {
  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 12px 16px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: calc(100vh - 72px); /* matches mobile header height */
    overflow-y: auto;
    z-index: 999;
  }
  .nav.open { display: flex; }
  .nav a {
    color: var(--text) !important;
    text-shadow: none !important;
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }
  .nav a:hover,
  .nav a.active {
    background: var(--primary-soft);
    color: var(--primary) !important;
  }
  .mobile-toggle { display: block; }
  .header.header-transparent .mobile-toggle { color: white; }
  .header.header-transparent.scrolled .mobile-toggle { color: var(--text); }
  .header-actions .btn { display: none; }
  .logo-text { font-size: 1rem; }
  .header-inner { height: 76px; }
  .header .logo-img,
  .logo-img { height: 58px; max-width: min(220px, 55vw); border-radius: 12px; }
}

/* Phone */
@media (max-width: 768px) {
  .why-grid,
  .services-grid,
  .projects-grid,
  .ongoing-grid,
  .team-project-grid,
  .team-proj-grid,
  .team-proj-header,
  .team-stage-track,
  .team-media-grid,
  .finance-mini-grid,
  .finance-staff-grid,
  .team-form-row,
  .finance-card,
  .testimonials-grid,
  .process-cards,
  .about-story,
  .experience-grid,
  .values-grid,
  .features-row,
  .shop-grid,
  .closed-placeholder-grid,
  .form-row,
  .process-step {
    grid-template-columns: 1fr;
    flex: 0 0 100%;
  }
  .stage-log-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stage-log-name { font-size: 0.88rem; padding: 12px; }
  .stage-log-num { min-width: 34px; height: 34px; font-size: 0.85rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .section { padding: 48px 0; }
  .section-header { margin-bottom: 32px; }
  .section-header h2 { font-size: 1.65rem; }

  .hero {
    height: 100svh;
    min-height: 480px;
    max-height: none;
    padding-bottom: 56px;
  }
  .hero-content {
    padding-top: 80px;
    padding-bottom: 40px;
  }
  .hero-content h1 {
    font-size: clamp(1.55rem, 6vw, 2.2rem);
    margin-bottom: 16px;
  }
  .hero-content p {
    font-size: 1rem;
    margin-bottom: 22px;
  }
  .hero-dots { bottom: 22px; }

  .page-hero { padding: 40px 0 36px; }
  .page-hero h1 { font-size: 1.75rem; }
  .page-hero::after { height: 32px; }

  .cta-banner,
  .quote-main,
  .quote-sidebar,
  .vr-section { padding: 28px 20px; }

  .vr-embed {
    min-height: 280px;
    height: min(52vh, 420px);
  }

  .cta-content h2 { font-size: 1.45rem; }
  .why-card,
  .service-card,
  .testimonial-card { padding: 24px 18px; }

  .project-img { height: 200px; }
  .stage-log-grid { gap: 10px; }
  .stage-log-card { border-radius: 10px; }

  .process-timeline {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .process-step {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 14px;
    background: var(--bg-white);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
  }
  .process-step .step-num { margin: 0; flex-shrink: 0; }
  .process-step h4 { margin-bottom: 2px; }

  .whatsapp-float {
    width: 52px;
    height: 52px;
    bottom: 20px;
    right: 16px;
    font-size: 1.5rem;
  }

  .container { padding: 0 16px; }
  .btn-lg { padding: 14px 28px; font-size: 1rem; }
}

/* Small phone */
@media (max-width: 400px) {
  .logo-text span { display: none; }
  .hero-content h1 { font-size: 1.55rem; }
  .lang-btn { padding: 5px 10px; font-size: 0.78rem; }
  .form-row { grid-template-columns: 1fr; }
}

/* Prevent horizontal overflow */
html, body { overflow-x: hidden; }
img, video, iframe { max-width: 100%; }

/* Team record actions + edit modal */
.team-log-actions,
.finance-inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.finance-inline-actions {
  display: inline-flex;
  margin-top: 0;
  vertical-align: middle;
}
.team-log-item--media {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.team-dash-record-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #111;
}
.team-dash-record-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.team-log-item-body { flex: 1; min-width: 0; }
.team-modal.hidden { display: none !important; }
.team-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.team-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.team-modal-box {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--bg-white, #fff);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.team-modal-box h3 { margin: 0 0 16px; }
.team-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}
.team-card-cost {
  margin-top: 6px;
  font-weight: 600;
  color: var(--text);
}
#project-ledger,
#dash-ledger-panel {
  scroll-margin-top: 96px;
}
.casual-people-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.casual-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.9rem;
}
.casual-chip-actions {
  display: flex;
  gap: 6px;
}
.team-dash-record-thumb--sm {
  width: 48px;
  height: 48px;
  display: inline-block;
}
.team-ledger-table .muted {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}
@media print {
  body.printing-ledger .header,
  body.printing-ledger .footer,
  body.printing-ledger .whatsapp-float,
  body.printing-ledger .team-proj-header,
  body.printing-ledger .team-priority-panel,
  body.printing-ledger .team-proj-grid,
  body.printing-ledger .page-hero,
  body.printing-ledger #ledger-print-btn,
  body.printing-ledger .finance-inline-actions,
  body.printing-ledger .rec-edit-btn,
  body.printing-ledger .rec-del-btn,
  body.printing-ledger .header-actions,
  body.printing-ledger nav {
    display: none !important;
  }
  body.printing-ledger .team-ledger-print {
    box-shadow: none;
    border: 0;
  }
}


/* ========== Team UX: role guide / quick nav / pending ========== */
.team-role-guide {
  margin: 16px 0 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}
.team-guide-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.team-todo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.team-todo-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
  color: var(--text, #111);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.team-todo-chip.is-todo {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}
.team-todo-chip.is-done {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}
.team-todo-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(0,0,0,0.06);
}
.team-todo-chip.is-todo .team-todo-mark { background: #f59e0b; color: #fff; }
.team-todo-chip.is-done .team-todo-mark { background: #16a34a; color: #fff; }
.team-emph { color: #b45309; }

.team-quick-nav {
  position: sticky;
  top: 64px;
  z-index: 40;
  display: none;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin: 0 0 18px;
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}
.team-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}
.team-quick-link:hover { background: #e5e7eb; }
.team-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.4;
}

.team-pending-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.team-pending-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  text-decoration: none;
  color: inherit;
}
.team-pending-card strong {
  font-size: 1.5rem;
  color: #c2410c;
}
.team-pending-card span { color: #9a3412; font-size: 0.86rem; font-weight: 600; }
.team-pending-card.is-readonly {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.team-pending-card.is-readonly strong { color: #334155; }
.team-pending-card.is-readonly span { color: #64748b; }

.team-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--primary, #2563eb);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  vertical-align: middle;
}
.team-role-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}
.team-role-tag--reviewer {
  background: #e8f0fe;
  color: #3b6fd8;
}
.team-casual-panel.is-priority {
  border: 2px solid #3b6fd8;
  box-shadow: 0 0 0 4px rgba(59, 111, 216, 0.12);
  order: -1;
}
.team-badge--pending {
  background: #fff7ed !important;
  color: #c2410c !important;
  border: 1px solid #fdba74;
  font-weight: 800;
}
.team-badge--active {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #6ee7b7;
  font-weight: 700;
}
.team-badge--done {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #93c5fd;
  font-weight: 700;
}
.team-role-pill--executive {
  background: #fef3c7;
  color: #92400e;
}
.team-role-pill--employee {
  background: #ecfdf5;
  color: #047857;
}
.team-eod-form .btn,
.team-eod-form button[type="submit"] {
  min-height: 44px;
  font-size: 1rem;
  width: 100%;
}
@media (max-width: 720px) {
  .team-pending-grid { grid-template-columns: 1fr; }
  .team-quick-nav { top: 56px; }
  .team-guide-head { flex-direction: column; }
}


/* Team toast + media row */
.team-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  max-width: min(92vw, 420px);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.team-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.team-toast--ok { background: #166534; }
.team-toast--error { background: #991b1b; }
.team-log-item--media {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}


/* ========== TEAM APP / PWA MOBILE ========== */
body.team-app {
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.team-pwa-tip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  background: #f0f7f2;
  border: 1px solid #cfe3d6;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 14px;
}
.team-pwa-tip[hidden], .team-offline-banner[hidden] { display: none !important; }
.team-pwa-tip-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.team-pwa-tip-text strong { color: #2d5a3d; }
.team-pwa-tip-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.team-offline-banner {
  background: #7c2d12;
  color: #fff;
  text-align: center;
  padding: 8px 12px;
  border-radius: 10px;
  margin: 0 0 12px;
  font-size: 13px;
}
body.team-app .team-eod-form .form-group label {
  font-size: 15px;
  font-weight: 600;
}
body.team-app .team-eod-form input[type="text"],
body.team-app .team-eod-form input[type="number"],
body.team-app .team-eod-form input[type="date"],
body.team-app .team-eod-form input[type="month"],
body.team-app .team-eod-form input[type="password"],
body.team-app .team-eod-form select,
body.team-app .team-eod-form textarea {
  min-height: 48px;
  font-size: 16px; /* 避免 iOS 自動放大 */
  border-radius: 10px;
}
body.team-app .team-eod-form input[type="file"] {
  min-height: 48px;
  padding: 10px;
  width: 100%;
  border: 1px dashed #b7c9bc;
  border-radius: 10px;
  background: #fafcfa;
}
body.team-app .team-eod-form .btn,
body.team-app #dash-progress-photo-form .btn,
body.team-app .staff-write .btn {
  min-height: 48px;
  font-size: 16px;
  border-radius: 12px;
}
body.team-app .team-quick-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  padding: 8px 0;
  margin-bottom: 8px;
}
body.team-app .team-quick-nav a,
body.team-app .team-todo-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
}
body.team-app .team-log-item--media {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
body.team-app .media-del-btn,
body.team-app .rec-del-btn,
body.team-app .rec-approve-btn {
  min-height: 40px;
  min-width: 44px;
}
@media (max-width: 768px) {
  body.team-app .header .nav { /* keep mobile toggle */ }
  body.team-app .page-hero { padding: 88px 0 20px; }
  body.team-app .page-hero h1 { font-size: 1.45rem; }
  body.team-app .team-dash-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  body.team-app .team-dash-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  body.team-app .team-dash-actions .btn { width: 100%; }
  body.team-app .team-pending-grid {
    grid-template-columns: 1fr;
  }
  body.team-app .team-project-grid {
    grid-template-columns: 1fr;
  }
  body.team-app .dash-card.team-panel {
    padding: 14px;
    border-radius: 14px;
  }
  body.team-app .team-step-num {
    width: 28px;
    height: 28px;
    line-height: 28px;
  }
  body.team-app .whatsapp-float { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  body.team-app #login-box .form-group input {
    min-height: 48px;
    font-size: 16px;
  }
  body.team-app #login-box .btn { min-height: 48px; width: 100%; font-size: 16px; }
}


/* Collapsible project list on team dashboard */
.team-projects-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}
.team-projects-body.is-collapsed,
.team-projects-body[hidden] { display: none !important; }
.team-projects-body .team-project-grid { margin-top: 4px; }
.team-project-card-wrap.is-filtered-out { display: none !important; }
@media (max-width: 768px) {
  .team-projects-head { flex-direction: column; align-items: stretch; }
  .team-projects-head .btn { width: 100%; min-height: 44px; }
  #staff-write-panels { margin-top: 12px !important; }
}

.team-media-pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.35rem 0 0.25rem;
}
.team-media-pick-btn {
  cursor: pointer;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  -webkit-tap-highlight-color: transparent;
}
.team-media-file-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
}

.team-merged-rec{position:relative;margin-bottom:12px;padding-top:4px;}
.team-merged-rec-tag{display:inline-block;font-size:0.75rem;font-weight:700;color:var(--primary,#5a7a5a);background:rgba(90,122,90,.12);border-radius:999px;padding:0.15rem 0.55rem;margin-bottom:6px;}
.team-media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;}
@media(min-width:700px){.team-media-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;}}
@media(min-width:1100px){.team-media-grid{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));}}
.team-media-item--lg,.team-media-item{margin:0;background:#f6f7f4;border-radius:12px;overflow:hidden;border:1px solid rgba(0,0,0,.06);position:relative;}
.team-media-item img,.team-media-item .team-media-img,.team-media-item--lg img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;background:#e8ebe4;}
.team-media-item--lg img,.team-media-item--lg .team-media-img{aspect-ratio:4/3;min-height:180px;}
.team-media-item--lg video{width:100%;aspect-ratio:4/3;object-fit:cover;display:block;background:#111;}
.team-media-open{display:none;} /* image tap opens original */
.team-dash-media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;}
@media(min-width:700px){.team-dash-media-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;}}
@media(min-width:1100px){.team-dash-media-grid{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));}}
.team-dash-media-grid .team-photo-card__img,.team-dash-media-grid img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;border-radius:0;background:#e8ebe4;}

/* Photo-first cards: max image, min text */
.team-photo-card{
  position:relative;
  margin:0;
  border-radius:12px;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.06);
  background:#f0f2ee;
  isolation:isolate;
}
.team-photo-card__link{display:block;line-height:0;}
.team-photo-card__img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;background:#e8ebe4;}
.team-media-item--lg.team-photo-card .team-photo-card__img{aspect-ratio:4/3;}
.team-photo-card__overlay{
  position:absolute;left:0;right:0;bottom:0;
  padding:28px 10px 8px;
  background:linear-gradient(transparent,rgba(0,0,0,.72));
  pointer-events:none;
  z-index:1;
}
.team-photo-card__meta{
  display:block;
  color:#fff;
  font-size:0.72rem;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-shadow:0 1px 2px rgba(0,0,0,.45);
}
.team-photo-card__del{
  position:absolute;top:8px;right:8px;z-index:2;
  width:32px;height:32px;padding:0;margin:0;
  border:none;border-radius:999px;
  background:rgba(0,0,0,.55);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;
  cursor:pointer;font-size:0.8rem;line-height:1;
  box-shadow:0 1px 4px rgba(0,0,0,.25);
}
.team-photo-card__del:hover,.team-photo-card__del:focus{background:rgba(180,40,40,.9);outline:none;}
body.team-app .team-photo-card__del{min-height:32px;min-width:32px;}
/* Dash list no longer uses horizontal media rows */
#dash-progress-photo-list.team-log-list{display:block;}
#dash-progress-photo-list .team-dash-media-grid{margin-top:4px;}
.team-media-empty{
  aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;
  color:#888;font-size:0.85rem;background:#e8ebe4;
}


/* ==========================================================================
   TEAM DASHBOARD v6 — 分類摺疊（accordion）＋快捷列＋顯示更多
   ========================================================================== */
body.team-app { --dd-header-h: 96px; }
@media (max-width: 900px) { body.team-app { --dd-header-h: 76px; } }

/* 登入後隱藏大橫幅，減少首屏滾動 */
body.team-app.team-logged-in .page-hero { display: none; }
body.team-app.team-logged-in .team-main { padding: calc(var(--dd-header-h) + 14px) 0 48px; }
body.team-app .team-main { padding: 40px 0 56px; }
body.team-app .page-hero { padding: 28px 0 24px; }
body.team-app .page-hero h1 { font-size: 1.5rem; margin-bottom: 4px; }

/* 頂部：問候＋狀態＋月結／登出 */
body.team-app .dd-topbar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
}
body.team-app .dd-hello { min-width: 0; }
body.team-app .dd-topbar .team-welcome { font-size: 1rem; color: var(--text); margin: 0; }
body.team-app .dd-topbar .team-dash-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  flex-shrink: 0;
}
body.team-app .dd-topbar .dd-icon-btn {
  width: auto;
  min-height: 44px;
  padding: 6px 12px;
  gap: 6px;
  border-radius: 12px;
}
.dd-status-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dd-status-line:empty { display: none; }
.dd-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #eef0eb;
  color: var(--text-light);
  text-decoration: none;
  line-height: 1.6;
}
.dd-status-chip.is-ok { background: #ecfdf3; color: #166534; }
.dd-status-chip.is-warn { background: #fff7e6; color: #9a3412; }
.dd-status-chip.is-alert { background: #fdecec; color: #b91c1c; }

/* 快捷列（sticky，橫向滑動） */
body.team-app .dd-quick-nav {
  position: sticky;
  top: var(--dd-header-h);
  z-index: 40;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -4px 12px;
  padding: 8px 4px;
  background: rgba(245, 242, 235, 0.94);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.team-app .dd-quick-nav::-webkit-scrollbar { display: none; }
.dd-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  -webkit-tap-highlight-color: transparent;
}
.dd-chip i { color: var(--primary); font-size: 0.9em; }
.dd-chip.is-open { border-color: var(--primary-light); background: var(--primary-soft); }
.dd-chip--ghost { background: transparent; box-shadow: none; color: var(--text-muted); }
.dd-chip--ghost i { color: var(--text-muted); }
.dd-chip-badge {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 20px;
  text-align: center;
  color: #fff;
  background: #dc2626;
}
.dd-chip-badge.dd-tone-warn { background: #ea7a12; }

/* 分類卡 */
.dd-sections { display: flex; flex-direction: column; gap: 10px; }
.dd-acc {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  scroll-margin-top: calc(var(--dd-header-h, 76px) + 64px);
}
.dd-acc.team-sync-panel { margin: 0; border: 0; }
.dd-acc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius);
  -webkit-tap-highlight-color: transparent;
}
.dd-acc-head:hover { background: rgba(61, 90, 61, 0.03); }
.dd-acc-head:focus-visible { outline: 2px solid var(--primary-light); outline-offset: -2px; }
.dd-acc-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.dd-acc-title { flex: 1; min-width: 0; font-size: 1.04rem; font-weight: 700; }
.dd-acc-badge {
  flex: 0 0 auto;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
}
.dd-acc-badge[hidden] { display: none; }
.dd-tone-muted { background: #f0eee8; color: var(--text-muted); }
.dd-tone-ok { background: #ecfdf3; color: #15803d; }
.dd-tone-warn { background: #fff4e5; color: #c2410c; }
.dd-tone-alert { background: #dc2626; color: #fff; }
.dd-acc-chev { flex: 0 0 auto; color: var(--text-muted); transition: transform 0.22s ease; }
.dd-acc.is-open > .dd-acc-head .dd-acc-chev { transform: rotate(180deg); }

.dd-acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.24s ease;
}
.dd-acc.is-open > .dd-acc-body { grid-template-rows: 1fr; }
.dd-acc-inner { min-height: 0; overflow: hidden; }
.dd-acc:not(.is-open) > .dd-acc-body > .dd-acc-inner { visibility: hidden; transition: visibility 0s linear 0.24s; }
.dd-acc.is-open > .dd-acc-body > .dd-acc-inner { visibility: visible; }
.dd-acc-content { padding: 2px 16px 18px; }
.dd-no-anim .dd-acc-body,
.dd-no-anim .dd-acc-inner,
.dd-no-anim .dd-acc-chev { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .dd-acc-body, .dd-acc-inner, .dd-acc-chev { transition: none !important; }
}

/* 分類內：分頁切換（segmented） */
.dd-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 14px;
  background: #f1efe9;
  border-radius: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.dd-tabs::-webkit-scrollbar { display: none; }
.dd-tabs.is-single { display: none; }
.dd-tab {
  flex: 1 0 auto;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-light);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.dd-tab i { margin-right: 4px; color: var(--text-muted); }
.dd-tab.is-active { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.dd-tab.is-active i { color: var(--primary); }
.dd-tab-count:not(:empty) {
  display: inline-block;
  min-width: 20px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.72rem;
  line-height: 20px;
}
.dd-tabpanel { display: none !important; }
.dd-tabpanel.is-active { display: block !important; }

/* 內容精簡：少框線、統一間距 */
.dd-acc .team-panel-hint { margin: 0 0 12px; font-size: 0.85rem; }
.dd-acc .team-log-list { max-height: none; overflow: visible; gap: 8px; }
.dd-acc .team-log-item { border: 0; background: #f7f5f0; padding: 10px 12px; }
.dd-acc .team-merged-rec { margin-bottom: 0; }
.dd-acc .team-eod-form .form-group { margin-bottom: 12px; }
.dd-mini-head { margin: 14px 0 8px; font-size: 0.88rem; font-weight: 700; color: var(--text-light); }
.dd-mini-head:first-child { margin-top: 0; }
.dd-form-grid { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 600px) { .dd-form-grid { grid-template-columns: 1fr 1fr; } }
.dd-search-row { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.dd-search-row input,
.dd-search-row select {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font: inherit;
  font-size: 16px;
}
.dd-count-text { flex: 0 0 auto; font-size: 0.85rem; }
.dd-row-actions { margin: 0 0 12px; }
.dd-row-actions .btn { min-height: 44px; }
.dd-foot-link { margin: 12px 0 0; font-size: 0.88rem; }
.dd-foot-link a { color: var(--primary); font-weight: 600; }
.dd-casual-who { max-width: 420px; margin: 14px 0 12px; }
.dd-casual-who select {
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font: inherit;
  font-size: 16px;
}
.dd-empty-ok { margin: 0 0 12px; color: #15803d; font-weight: 600; font-size: 0.92rem; }

/* 子摺疊（新增項目、散工最近記錄） */
.dd-sub { margin: 0 0 12px; border-radius: 12px; background: #f7f5f0; }
.dd-sub > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  list-style: none;
}
.dd-sub > summary::-webkit-details-marker { display: none; }
.dd-sub > summary::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.75rem;
  margin-left: auto;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.dd-sub[open] > summary::after { transform: rotate(180deg); }
.dd-sub > summary i { color: var(--primary); }
.dd-sub[open] { padding-bottom: 12px; }
.dd-sub[open] > :not(summary) { margin-left: 14px; margin-right: 14px; }
.dd-sub .team-inline-add { margin-top: 4px; }
#dd-casual-recent { margin-top: 16px; }

/* 待我處理：數字格（點擊切換分頁） */
.dd-pending-board { margin-bottom: 12px; }
.dd-pending-board:empty { display: none; }
body.team-app .dd-pending-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dd-pending-tiles .team-pending-card {
  padding: 10px 12px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border: 0;
  background: #fff4e5;
}
.dd-pending-tiles .team-pending-card strong { font-size: 1.35rem; line-height: 1.1; }
.dd-pending-tiles .team-pending-card.is-readonly { cursor: default; background: #f3f4f1; }
.dd-batch-btn { margin-top: 10px; min-height: 44px; }

/* 顯示更多 */
.dd-more-hidden { display: none !important; }
.dd-more { width: 100%; min-height: 44px; margin-top: 10px; grid-column: 1 / -1; }
#team-project-list.dd-searching > .dd-more-hidden:not(.is-filtered-out) { display: block !important; }
#team-project-list.dd-searching > .dd-more { display: none; }

/* 同步 */
.dd-btn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 8px; }
.dd-btn-grid .btn { width: 100%; min-height: 44px; }
@media (min-width: 900px) { .dd-btn-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dd-acc .team-sync-meta { font-size: 0.8rem; margin: 0; word-break: break-all; }

/* 施工項目卡：精簡 */
#team-project-list.team-project-grid { gap: 12px; }
#team-project-list .team-project-card { box-shadow: none; border: 1px solid #ece8de; }
#team-project-list .team-project-card:hover { transform: none; }
#team-project-list .team-project-card-img { height: 130px; }
#team-project-list .team-project-card-body { padding: 12px 14px 14px; gap: 6px; }
@media (max-width: 900px) {
  #team-project-list.team-project-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  #team-project-list.team-project-grid { grid-template-columns: 1fr; gap: 8px; }
  #team-project-list .team-project-card { flex-direction: row; }
  #team-project-list .team-project-card-img { flex: 0 0 96px; width: 96px; height: auto; min-height: 112px; }
  #team-project-list .team-project-card-img .project-tag { display: none; }
  #team-project-list .team-project-card-body { padding: 10px 12px; gap: 4px; }
  #team-project-list .team-project-card-body h3 { font-size: 0.96rem; padding-right: 56px; }
  #team-project-list .ongoing-stage { font-size: 0.82rem; }
  #team-project-list .team-card-link { font-size: 0.82rem; }
  #team-project-list .proj-del-btn { top: 6px; right: 6px; }
}

/* 費用明細表 */
#dash-ledger-panel .team-table { font-size: 0.86rem; }

/* 進度相簿格：手機 3 欄，桌面自動 */
.dd-acc .team-dash-media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 700px) { .dd-acc .team-dash-media-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; } }
.dd-acc .team-photo-card { border-radius: 10px; border: 0; }
@media (max-width: 699px) {
  .dd-acc .team-photo-card__overlay { padding: 18px 6px 5px; }
  .dd-acc .team-photo-card__meta { font-size: 0.66rem; }
  .dd-acc .team-photo-card__del { top: 4px; right: 4px; width: 30px; height: 30px; min-width: 30px; min-height: 30px; }
}

@media (max-width: 768px) {
  body.team-app .dd-acc-content { padding: 2px 12px 14px; }
  body.team-app .dd-acc-head { padding: 8px 12px; gap: 10px; }
  body.team-app .dd-topbar .dd-icon-btn span { font-size: 0.85rem; }
  body.team-app .team-pwa-tip { padding: 10px 12px; font-size: 13px; }
}
body.team-app #staff-write-panels.dd-acc { margin-top: 0 !important; }
/* sticky 需要 body 不是捲動容器：html 仍為 hidden（防橫向捲動），body 改 clip／visible */
body.team-app { overflow-x: visible; overflow-x: clip; }

/* 本月結算：分類內精簡成 2×2 */
.dd-acc .finance-mini-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dd-acc .finance-mini { padding: 10px 12px; border: 0; background: #f7f5f0; }
.dd-acc .finance-mini.highlight { background: var(--primary-soft); }
.dd-acc .finance-mini strong { font-size: 1.05rem; }
.dd-acc .finance-mini em { font-size: 0.75rem; }
@media (max-width: 700px) {
  body.team-app .dd-acc .finance-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
#my-finance-summary .btn { min-height: 44px; }

/* 手機：項目卡更緊湊；費用明細表可橫向捲動 */
#dash-ledger-panel .team-table { min-width: 680px; }
#dash-ledger-panel .team-table td:first-child { min-width: 140px; }
@media (max-width: 600px) {
  #team-project-list .ongoing-stage { padding: 0; background: none; border: 0; display: block; }
  #team-project-list .ongoing-stage-label { display: none; }
  #team-project-list .ongoing-stage strong { font-size: 0.84rem; font-weight: 600; color: var(--text-light); }
  #team-project-list .project-meta { font-size: 0.78rem; gap: 8px; }
  #team-project-list .team-card-link { display: none; }
  #team-project-list .team-card-cost { font-size: 0.78rem; }
  #team-project-list .proj-del-btn { font-size: 0; min-width: 40px; min-height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
  #team-project-list .proj-del-btn i { font-size: 0.85rem; }
  #team-project-list .team-project-card-body h3 { padding-right: 44px; }
}

/* ===== TEAM v7 follow-up: feedback, pairs, touch targets, project tables ===== */
.team-login-error{margin:6px 0 2px;padding:9px 12px;border-radius:10px;background:#fef3f2;border:1px solid #fecdca;color:#b42318;font-size:.9rem;line-height:1.4;}
.team-login-error[hidden]{display:none;}
.dd-status-chip{min-height:32px;display:inline-flex;align-items:center;}
.team-toast--error{white-space:normal;}
/* 同人同日打卡＋日薪：一組卡 */
.team-merged-pair{border:1px solid rgba(90,122,90,.28);border-radius:14px;padding:10px 10px 4px;background:rgba(90,122,90,.04);}
.team-merged-pair .team-log-item{margin-bottom:8px;}
.team-pair-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;}
.team-pair-head .team-merged-rec-tag{margin-bottom:0;}
.team-pair-actions{display:flex;gap:8px;flex-wrap:wrap;}
.team-pair-actions .btn{min-height:40px;padding:0 14px;}
/* 記錄按鈕觸控尺寸 */
#team-dashboard .team-log-actions .btn,#team-finance-root .finance-inline-actions .btn,#team-project-root .team-log-actions .btn{min-height:36px;}
.finance-inline-actions{display:flex;flex-wrap:wrap;gap:6px;}
/* 項目頁：表格可橫向捲動、勾選框加大 */
#team-project-root .team-table-scroll,#team-project-root table.team-table{max-width:100%;}
@media (max-width:760px){
  #team-project-root table.team-table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;}
}
#team-project-root input[type=checkbox],.sch-done-cb,.stage-done-cb{width:22px;height:22px;min-width:22px;accent-color:var(--primary,#5a7a5a);cursor:pointer;}
.team-breadcrumbs a,#team-finance-root .team-breadcrumbs a,.team-project-hero a[href="team.html"]{display:inline-block;padding:8px 2px;}
#team-project-root .sch-phase{min-width:150px;}
#team-project-root .sch-start,#team-project-root .sch-end{min-width:130px;}
.dd-warn-amt{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:999px;background:#fef3f2;color:#b42318;border:1px solid #fecdca;font-size:.72rem;font-weight:700;vertical-align:middle;}
.team-log-top strong{overflow-wrap:anywhere;}
/* 內部工作台不需客戶 WhatsApp 浮動鈕（會遮住右下角按鈕） */
body.team-app .whatsapp-float{display:none !important;}
.dd-picked-warn{color:#b42318 !important;font-weight:600;}
