/* ==========================================================================
   Flame Message Helper - Premium Style Sheet
   ========================================================================== */

/* 変数の定義 */
:root {
  --flame-charcoal: #2C2C2C;
  --flame-charcoal-light: #3D3D3D;
  --flame-gold: #D4AF37;
  --flame-gold-light: #E5C158;
  --flame-apricot: #FF8F70;
  --flame-accent: #FF6B6B;
  --flame-beige: #FAF8F5;
  --flame-white: #FFFFFF;
  --flame-border: #E8E5DF;
  --flame-text-main: #3D3D3D;
  --flame-text-muted: #8E8A82;

  /* ティファニーブルーのカラーパレット */
  --flame-tiffany-light: #EBF8F7;
  --flame-tiffany-deep: #005F5D;
  
  /* 進捗ステータスカラー */
  --color-new: #9CA3AF;
  --color-trial-sched: #3B82F6;
  --color-trial-confirm: #8B5CF6;
  --color-trial-done: #F59E0B;
  --color-joined: #10B981;
  --color-inactive: #6B7280;

  /* LINE & メールカラー */
  --color-line: #06C755;
  --color-email: #E86A5A;
}

/* リセット & ベース */
.flame-msg-wrapper {
  font-family: 'Montserrat', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--flame-text-main);
  background-color: var(--flame-beige);
  padding: 20px 20px 20px 0;
  box-sizing: border-box;
  margin-left: -20px; /* WP管理画面のデフォルト余白相殺 */
  min-height: calc(100vh - 40px);
}

.flame-msg-wrapper * {
  box-sizing: border-box;
  font-feature-settings: "palt"; /* 文字詰め */
}

/* 非表示ユーティリティ */
.flame-msg-wrapper .hidden {
  display: none !important;
}

/* ==========================================================================
   Header Area
   ========================================================================== */
.flame-header {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background-color: var(--flame-tiffany-light);
  color: var(--flame-text-main);
  padding: 14px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(129, 216, 208, 0.15);
  border: 1px solid rgba(129, 216, 208, 0.3);
}

.flame-logo-glow {
  position: absolute;
  top: -50%;
  left: -20%;
  width: 50%;
  height: 200%;
  background: radial-gradient(circle, rgba(129, 216, 208, 0.25) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

.flame-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.flame-brand-icon {
  font-size: 32px;
  background: linear-gradient(135deg, var(--flame-tiffany-deep) 0%, var(--flame-apricot) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(129, 216, 208, 0.2));
}

.flame-title-group {
  display: flex;
  flex-direction: column;
}

.flame-app-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0;
  color: var(--flame-charcoal);
  line-height: 1.2;
}

.flame-app-subtitle {
  font-size: 11px;
  color: var(--flame-tiffany-deep);
  margin: 4px 0 0 0;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.flame-user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(255, 255, 255, 0.55);
  padding: 6px 14px 6px 8px;
  border-radius: 30px;
  border: 1px solid rgba(0, 95, 93, 0.15);
  position: relative;
  z-index: 1;
}

.flame-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--flame-tiffany-deep) 0%, #81D8D0 100%);
  color: var(--flame-white);
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.flame-user-info {
  display: flex;
  flex-direction: column;
}

.flame-user-role {
  font-size: 9px;
  color: var(--flame-text-muted);
  letter-spacing: 0.5px;
}

.flame-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--flame-text-main);
}

.flame-header-calendar, .flame-header-weather, .flame-header-task, .flame-header-period {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.55);
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(0, 95, 93, 0.15);
  color: var(--flame-text-main);
  box-shadow: 0 4px 12px rgba(129, 216, 208, 0.08);
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 52px;
}

.flame-header-weather, .flame-header-task {
  cursor: pointer;
  transition: all 0.2s ease;
}

.flame-header-weather:hover, .flame-header-task:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 95, 93, 0.3);
  transform: translateY(-1px);
}

.flame-header-period {
  align-items: center;
  justify-content: flex-start;
}



/* ==========================================================================
   Summary Bar
   ========================================================================== */
.flame-summary-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.summary-card {
  background-color: var(--flame-white);
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid var(--flame-border);
  box-shadow: 0 2px 8px rgba(44, 44, 44, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
}
/* 体験フェーズ (左3つ): 薄いオレンジ */
.summary-card.status-new-count,
.summary-card.status-sched-count,
.summary-card.status-done-count {
  background-color: #FFF8F2;
  border-color: #FFE8D6;
}

/* 入会フェーズ (右3つ): 薄い緑 */
.summary-card.status-enrolled-count,
.summary-card.status-waiting-enroll-count,
.summary-card.status-first-lesson-count {
  background-color: #F1FAF2;
  border-color: #D5EED8;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 44, 44, 0.05);
  transition-delay: 0.5s; /* ホバー入りは0.5秒待ってから反応 */
}

.summary-label {
  font-size: 11px;
  color: var(--flame-text-muted);
  font-weight: 500;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
  color: var(--flame-charcoal);
}

.summary-names {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  border-top: 1px dashed var(--flame-border);
  padding-top: 6px;
}

.summary-name-tag {
  font-size: 10px;
  background-color: var(--flame-light);
  color: var(--flame-charcoal);
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.summary-name-tag:hover {
  background-color: var(--flame-accent-light);
  color: var(--flame-accent);
  transform: scale(1.05);
  transition-delay: 0.5s; /* ホバー入りは0.5秒待ってから反応 */
}


/* ==========================================================================
   Layout & Columns
   ========================================================================== */
.flame-layout {
  display: grid;
  grid-template-columns: 320px 1fr 340px;
  gap: 20px;
  height: auto;
  min-height: 720px;
}

.flame-col {
  background-color: var(--flame-white);
  border-radius: 12px;
  border: 1px solid var(--flame-border);
  box-shadow: 0 4px 16px rgba(44, 44, 44, 0.03);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.col-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--flame-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #FAF9F6;
  flex-shrink: 0;
}

.col-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--flame-charcoal);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.col-title i {
  color: var(--flame-gold);
}

/* ==========================================================================
   Sidebar: Customer List
   ========================================================================== */
.flame-col-sidebar {
  /* 固定幅 */
}

.sidebar-search-filter {
  padding: 14px 16px !important;
  border-bottom: 1px solid var(--flame-border) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  background-color: var(--flame-white) !important;
  flex-shrink: 0 !important;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 34px !important;
  border: 1px solid var(--flame-border) !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  background-color: #FAF8F5 !important;
  transition: all 0.25s ease !important;
}

.search-box input:focus {
  border-color: var(--flame-gold) !important;
  background-color: var(--flame-white) !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15) !important;
  outline: none !important;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--flame-text-muted);
  font-size: 12px;
}

.filter-tabs {
  display: flex !important;
  background-color: #F0EDE8 !important;
  padding: 3px !important;
  border-radius: 8px !important;
  gap: 2px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

/* Elementor上書き対策：button要素のデフォルトリセットを上書き */
.flame-msg-wrapper .filter-tab,
.flame-msg-wrapper button.filter-tab {
  flex: 1 !important;
  border: none !important;
  background: none !important;
  background-color: transparent !important;
  padding: 6px 2px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--flame-text-muted) !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  line-height: 1 !important;
  box-shadow: none !important;
  outline: none !important;
  margin: 0 !important;
  text-align: center !important;
  white-space: nowrap !important;
  min-height: 0 !important;
  height: auto !important;
  width: auto !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.flame-msg-wrapper .filter-tab.active,
.flame-msg-wrapper button.filter-tab.active {
  background-color: var(--flame-white) !important;
  color: var(--flame-charcoal) !important;
  box-shadow: 0 2px 6px rgba(44, 44, 44, 0.06) !important;
}

.flame-msg-wrapper .filter-select-wrapper select {
  width: 100% !important;
  border: 1px solid var(--flame-border) !important;
  border-radius: 6px !important;
  padding: 5px 20px 5px 8px !important;
  font-size: 11px !important;
  color: var(--flame-text-main) !important;
  background-color: var(--flame-white) !important;
  cursor: pointer !important;
  box-shadow: none !important;
  outline: none !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  box-sizing: border-box !important;
}

.filter-selects-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 6px !important;
}

.customer-list-scroll {
  flex-grow: 1;
  overflow-y: visible;
  background-color: var(--flame-white);
}

/* 顧客リスト内の個別カード */
.customer-card {
  padding: 14px 16px;
  border-bottom: 1px solid var(--flame-border);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.customer-card:hover {
  background-color: #FAF9F6;
}

.customer-card.active {
  background-color: #F5EFEB;
  border-left: 4px solid var(--flame-apricot);
  padding-left: 12px; /* ボーダー分ずらす */
}

.customer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cust-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--flame-charcoal);
}

.channel-indicator {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.channel-indicator.line {
  color: var(--color-line);
}

.channel-indicator.email {
  color: var(--color-email);
}

.customer-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
}

.booking-badge {
  color: var(--flame-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.booking-badge.highlight {
  color: var(--flame-accent);
  font-weight: 600;
}

/* 進捗バッジ */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

.status-new {
  background-color: #E2E8F0;
  color: #475569;
}
.status-trial-sched {
  background-color: #DBEAFE;
  color: #1E40AF;
}
.status-trial-confirm {
  background-color: #F3E8FF;
  color: #6B21A8;
}
.status-trial-done {
  background-color: #FEF3C7;
  color: #92400E;
}
.status-joined {
  background-color: #D1FAE5;
  color: #065F46;
}
.status-cancelled {
  background-color: #FEE2E2;
  color: #991B1B;
}
.status-waiting-enroll {
  background-color: #FFEDD5;
  color: #9A3412;
}
.status-enrolled {
  background-color: #D1FAE5;
  color: #065F46;
}
.status-first-lesson {
  background-color: #EBF8F7;
  color: #005F5D;
}
.status-inactive {
  background-color: #F3F4F6;
  color: #374151;
}
.status-join-desired {
  background-color: #FCE7F3;
  color: #9D174D;
}

/* リスト状態表示 */
.list-loading,
.list-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--flame-text-muted);
  font-size: 12px;
}

.list-loading i {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--flame-gold);
}

/* ==========================================================================
   Main Column: Message Generator
   ========================================================================== */
.flame-col-main {
  /* 自動伸縮 */
}

/* プレースホルダー */
.generator-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  padding: 40px;
  text-align: center;
  color: var(--flame-text-muted);
}

.placeholder-icon-wrap {
  width: 80px;
  height: 80px;
  background-color: #F5EFEB;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.placeholder-icon-wrap i {
  font-size: 36px;
  color: var(--flame-apricot);
}

.generator-placeholder h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--flame-charcoal);
  margin: 0 0 8px 0;
}

.generator-placeholder p {
  font-size: 12px;
  max-width: 320px;
  margin: 0;
  line-height: 1.6;
}

/* コネクションコンソール */
.generator-console {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

.selected-customer-banner {
  background: var(--flame-tiffany-light);
  color: var(--flame-text-main);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(129, 216, 208, 0.3);
}

.banner-customer-name {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--flame-text-main);
}

#banner-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--flame-charcoal);
  white-space: nowrap;
}

.channel-badge {
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.channel-badge.line {
  background-color: var(--color-line);
  color: var(--flame-white);
}

.channel-badge.email {
  background-color: var(--color-email);
  color: var(--flame-white);
}

.banner-customer-meta {
  font-size: 11px;
  color: var(--flame-text-main);
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(129, 216, 208, 0.4);
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.highlight-booking {
  color: #D97706;
  font-weight: 700;
}

/* テンプレートチップス */
.template-selector-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--flame-border);
  flex-shrink: 0;
}

.section-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--flame-text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.template-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 110px;
  overflow-y: auto;
  padding-bottom: 4px;
}

.template-chip {
  background-color: var(--flame-beige);
  border: 1px solid var(--flame-border);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--flame-text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.template-chip:hover {
  background-color: #F0EDE8;
  border-color: var(--flame-text-muted);
}

.template-chip.active {
  background-color: var(--flame-charcoal);
  color: var(--flame-white);
  border-color: var(--flame-charcoal);
  box-shadow: 0 4px 10px rgba(44, 44, 44, 0.15);
}

.template-chip.channel-mismatch {
  opacity: 0.5;
  border-style: dashed;
}

/* テキストエリア領域 */
.message-editor-section {
  padding: 16px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #FAF9F6;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.char-counter {
  font-size: 10px;
  color: var(--flame-text-muted);
}

.textarea-wrapper {
  flex-grow: 1;
  margin-top: 8px;
  position: relative;
  height: 100%;
}

.textarea-wrapper textarea {
  width: 100% !important;
  height: 100% !important;
  min-height: 150px;
  border: 1px solid var(--flame-border) !important;
  border-radius: 8px !important;
  padding: 16px !important;
  font-size: 13px !important;
  line-height: 1.8 !important;
  color: var(--flame-charcoal) !important;
  background-color: var(--flame-white) !important;
  resize: none !important;
  outline: none !important;
  transition: border-color 0.25s ease !important;
}

.textarea-wrapper textarea:focus {
  border-color: var(--flame-gold) !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12) !important;
}

/* 送信アクションエリア */
.actions-section {
  padding: 16px 20px;
  border-top: 1px solid var(--flame-border);
  background-color: var(--flame-white);
  flex-shrink: 0;
}

.channel-action-group {
  margin-bottom: 12px;
}

.btn-large {
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-line {
  background-color: var(--color-line);
  color: var(--flame-white);
  border: none;
}

.btn-line:hover {
  background-color: #05b04b;
  transform: translateY(-1px);
}

.btn-email {
  background-color: var(--color-email);
  color: var(--flame-white);
  border: none;
}

.btn-email:hover {
  background-color: #d95a4a;
  transform: translateY(-1px);
}

.action-desc {
  font-size: 10px;
  color: var(--flame-text-muted);
  margin: 6px 0 0 0;
  line-height: 1.4;
  text-align: center;
}

.generic-actions {
  display: flex;
  gap: 10px;
  position: relative;
}

.generic-actions .btn {
  flex: 1;
  justify-content: center;
}

/* コピー成功バブル */
.copy-success-bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff8c55, #f5b942);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 4px 16px rgba(245, 130, 50, 0.35);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 100;
  transition: none;
}

.copy-success-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #f5b942;
}

@keyframes copyBubbleIn {
  0%   { opacity: 0; visibility: visible; transform: translateX(-50%) translateY(8px) scale(0.85); }
  20%  { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0px) scale(1.05); }
  60%  { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-2px) scale(1); }
  100% { opacity: 0; visibility: hidden;  transform: translateX(-50%) translateY(-14px) scale(0.95); }
}

.copy-success-bubble.show {
  animation: copyBubbleIn 1.8s ease forwards;
}



/* ==========================================================================
   Right Column: Profile & Editor
   ========================================================================== */
.flame-col-profile {
  /* 固定幅 */
}

.profile-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px;
  text-align: center;
  color: var(--flame-text-muted);
  font-size: 12px;
}

.profile-form {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex-grow: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--flame-charcoal);
  letter-spacing: 0.5px;
}

.required {
  color: var(--flame-accent);
}

.input-with-icon,
.select-with-icon {
  position: relative;
}

.input-with-icon i,
.select-with-icon i.select-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--flame-text-muted);
  font-size: 12px;
}

.input-with-icon input,
.profile-form select {
  width: 100% !important;
  padding: 8px 12px 8px 34px !important;
  border: 1px solid var(--flame-border) !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  background-color: var(--flame-white) !important;
  transition: all 0.25s ease !important;
  color: var(--flame-text-main) !important;
}

.profile-form select {
  padding-left: 34px !important;
  padding-right: 30px !important; /* 矢印分のスペース確保 */
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
}

/* カスタム▼矢印 */
.select-with-icon::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--flame-text-muted);
  pointer-events: none;
}

.input-with-icon input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
  border-color: var(--flame-gold) !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15) !important;
  outline: none !important;
}

.form-help {
  font-size: 9px;
  color: var(--flame-text-muted);
  margin: 0;
}

/* 優先連絡チャンネルラジオ */
.channel-selector-radio {
  display: flex;
  gap: 10px;
}

.radio-label {
  flex: 1;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  display: none;
}

.custom-radio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--flame-border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--flame-text-muted);
  transition: all 0.2s ease;
  background-color: var(--flame-white);
  text-align: center;
}

.radio-label input[type="radio"]:checked + .custom-radio.line-radio {
  border-color: var(--color-line);
  background-color: rgba(6, 199, 85, 0.05);
  color: var(--color-line);
  box-shadow: 0 2px 6px rgba(6, 199, 85, 0.1);
}

.radio-label input[type="radio"]:checked + .custom-radio.email-radio {
  border-color: var(--color-email);
  background-color: rgba(232, 106, 90, 0.05);
  color: var(--color-email);
  box-shadow: 0 2px 6px rgba(232, 106, 90, 0.1);
}

/* インライン入力 */
.inline-fields {
  flex-direction: row;
  gap: 10px;
}

.field-half {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-half input {
  padding-left: 12px !important; /* アイコンなしのため左余白リセット */
}

/* 個別メモ */
.flex-memo {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.profile-form textarea {
  width: 100% !important;
  flex-grow: 1;
  min-height: 100px;
  border: 1px solid var(--flame-border) !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  font-size: 11px !important;
  line-height: 1.6 !important;
  color: var(--flame-charcoal) !important;
  resize: none !important;
}

.profile-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  flex-shrink: 0;
  gap: 10px;
}

.profile-actions .btn {
  flex-shrink: 0;
}

#btn-save-customer {
  flex-grow: 0;
  width: 30% !important;
  max-width: 30% !important;
  min-width: 80px !important;
  justify-content: center;
}

/* ==========================================================================
   Buttons UI
   ========================================================================== */
/* ==========================================================================
   ボタン共通 — Elementor上書き対策
   .flame-msg-wrapper スコープ + !important で完全保護
   ========================================================================== */
.flame-msg-wrapper .btn,
.flame-msg-wrapper button.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border: 1px solid transparent !important;
  outline: none !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
  font-family: inherit !important;
}

.flame-msg-wrapper .btn-primary,
.flame-msg-wrapper button.btn-primary {
  background: linear-gradient(135deg, var(--flame-apricot) 0%, var(--flame-gold) 100%) !important;
  color: var(--flame-charcoal) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.15) !important;
}

.flame-msg-wrapper .btn-primary:hover,
.flame-msg-wrapper button.btn-primary:hover {
  opacity: 0.9 !important;
  transform: translateY(-0.5px) !important;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2) !important;
}

.flame-msg-wrapper .btn-secondary,
.flame-msg-wrapper button.btn-secondary {
  background-color: var(--flame-charcoal) !important;
  color: var(--flame-white) !important;
  border: none !important;
}

.flame-msg-wrapper .btn-secondary:hover,
.flame-msg-wrapper button.btn-secondary:hover {
  background-color: var(--flame-charcoal-light) !important;
}

.flame-msg-wrapper .btn-light,
.flame-msg-wrapper button.btn-light {
  background-color: var(--flame-white) !important;
  color: var(--flame-text-main) !important;
  border: 1px solid var(--flame-border) !important;
}

.flame-msg-wrapper .btn-light:hover,
.flame-msg-wrapper button.btn-light:hover {
  background-color: var(--flame-beige) !important;
  border-color: var(--flame-text-muted) !important;
}

.flame-msg-wrapper .btn-danger,
.flame-msg-wrapper button.btn-danger {
  background-color: var(--flame-white) !important;
  color: var(--flame-accent) !important;
  border: 1px solid rgba(255, 107, 107, 0.3) !important;
}

.flame-msg-wrapper .btn-danger:hover,
.flame-msg-wrapper button.btn-danger:hover {
  background-color: rgba(255, 107, 107, 0.05) !important;
  border-color: var(--flame-accent) !important;
}

.flame-msg-wrapper .btn-sm,
.flame-msg-wrapper button.btn-sm {
  padding: 4px 8px !important;
  font-size: 11px !important;
}

.flame-msg-wrapper .btn-xs,
.flame-msg-wrapper button.btn-xs {
  padding: 2px 6px !important;
  font-size: 10px !important;
  border-radius: 4px !important;
}

/* 後方互換: グローバルセレクタも残す（モーダル等スコープ外対応） */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--flame-apricot) 0%, var(--flame-gold) 100%);
  color: var(--flame-charcoal);
  border: none;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-0.5px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.btn-secondary {
  background-color: var(--flame-charcoal);
  color: var(--flame-white);
  border: none;
}

.btn-secondary:hover {
  background-color: var(--flame-charcoal-light);
}

.btn-light {
  background-color: var(--flame-white);
  color: var(--flame-text-main);
  border: 1px solid var(--flame-border);
}

.btn-light:hover {
  background-color: var(--flame-beige);
  border-color: var(--flame-text-muted);
}

.btn-danger {
  background-color: var(--flame-white);
  color: var(--flame-accent);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
  background-color: rgba(255, 107, 107, 0.05);
  border-color: var(--flame-accent);
}

.btn-sm {
  padding: 4px 8px;
  font-size: 11px;
}

.btn-xs {
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 4px;
}


/* ==========================================================================
   Modals: Template Management
   ========================================================================== */
.flame-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100000; /* WPバーよりも手前に */
  display: none;
  align-items: center;
  justify-content: center;
}

.flame-modal.open {
  display: flex;
}

.flame-modal-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(44, 44, 44, 0.6);
  backdrop-filter: blur(4px);
}

.flame-modal-content {
  position: relative;
  background-color: var(--flame-white);
  width: 800px;
  max-width: 90%;
  height: 550px;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalReveal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalReveal {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 顧客管理・削除確認モーダル用オーバーレイ */
.flame-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(44, 44, 44, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 20px;
  box-sizing: border-box;
}

.flame-modal-overlay.hidden {
  display: none;
}

.flame-modal-box {
  position: relative;
  background: var(--flame-white);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  padding: 24px 28px 20px;
  width: 100%;
  animation: modalReveal 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.flame-modal-box .flame-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0;
  border-bottom: none;
  background: none;
}

.flame-modal-box .flame-modal-header h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--flame-tiffany-deep);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.flame-modal-close-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--flame-text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.15s;
  flex-shrink: 0;
}

.flame-modal-close-btn:hover {
  color: var(--flame-accent);
}

.flame-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--flame-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #FAF9F6;
}

.modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--flame-charcoal);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title i {
  color: var(--flame-gold);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--flame-text-muted);
  line-height: 1;
  padding: 0;
}

.modal-close:hover {
  color: var(--flame-charcoal);
}

.flame-modal-body {
  flex-grow: 1;
  overflow: hidden;
}

/* テンプレート管理の内部スプリットレイアウト */
.template-mgmt-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100%;
}

.template-mgmt-list {
  border-right: 1px solid var(--flame-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #FAF9F6;
}

.mgmt-list-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--flame-border);
  font-size: 11px;
  font-weight: 700;
  color: var(--flame-text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-items-scroll {
  flex-grow: 1;
  overflow-y: auto;
}

.template-mgmt-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--flame-border);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--flame-text-main);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.template-mgmt-item:hover {
  background-color: #F0EDE8;
}

.template-mgmt-item.active {
  background-color: var(--flame-charcoal);
  color: var(--flame-white);
}

.template-mgmt-item .channel-icon {
  font-size: 10px;
}

.template-mgmt-item.active .channel-icon {
  color: var(--flame-gold-light);
}

.template-mgmt-item .channel-icon.line-icon {
  color: var(--color-line);
}
.template-mgmt-item .channel-icon.email-icon {
  color: var(--color-email);
}

/* テンプレートモーダルの編集フォーム */
.template-mgmt-form {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#template-edit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.flex-template-text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.flex-template-text textarea {
  width: 100% !important;
  flex-grow: 1;
  min-height: 160px;
  border: 1px solid var(--flame-border) !important;
  border-radius: 8px !important;
  padding: 12px !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  color: var(--flame-charcoal) !important;
  resize: none !important;
  outline: none !important;
}

.flex-template-text textarea:focus {
  border-color: var(--flame-gold) !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15) !important;
}

.template-variables-guide {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.guide-title {
  font-size: 10px;
  color: var(--flame-text-muted);
  font-weight: 700;
}

.var-chip {
  background-color: var(--flame-beige);
  border: 1px solid var(--flame-border);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-family: monospace;
  font-weight: 600;
  color: var(--flame-charcoal-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.var-chip:hover {
  background-color: #E2E8F0;
  border-color: var(--flame-text-muted);
}

.template-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--flame-border);
  padding-top: 12px;
  margin-top: auto;
  flex-shrink: 0;
}

/* ==========================================================================
   Toasts Notification
   ========================================================================== */
.flame-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--flame-charcoal);
  color: var(--flame-white);
  padding: 10px 20px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 999999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.flame-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-icon {
  color: var(--flame-gold-light);
  font-size: 14px;
}

/* ==========================================================================
   Scrollbars
   ========================================================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--flame-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--flame-text-muted);
}

/* ==========================================================================
   Progress Bar (進捗横棒グラフ)
   ========================================================================== */
.cust-progress-container {
  width: 100%;
  height: 4px;
  background-color: #EFEFEF;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
  flex-shrink: 0;
}

.cust-progress-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
}

/* 進捗割合に応じた配色（フレイムのゴールド/アプリコットへ向かうグラデーション） */
.prog-new { width: 20%; background-color: var(--color-new); }
.prog-trial_sched { width: 40%; background: linear-gradient(90deg, #60A5FA, var(--color-trial-sched)); }
.prog-trial_confirm { width: 60%; background: linear-gradient(90deg, #A78BFA, var(--color-trial-confirm)); }
.prog-trial_done { width: 80%; background: linear-gradient(90deg, #FBBF24, var(--color-trial-done)); }
.prog-waiting_enroll { width: 90%; background: linear-gradient(90deg, #FB923C, #F97316); }
.prog-enrolled { width: 85%; background: linear-gradient(90deg, var(--flame-gold) 0%, #10B981 100%); }
.prog-first_lesson { width: 100%; background: linear-gradient(90deg, #008080 0%, #005F5D 100%); }
.prog-joined { width: 100%; background: linear-gradient(90deg, var(--flame-gold) 0%, var(--flame-apricot) 100%); }
.prog-cancelled { width: 5%; background-color: #EF4444; }
.prog-no_contact { width: 10%; background-color: #F97316; }
.prog-inactive { width: 10%; background-color: var(--color-inactive); }
.prog-join_desired { width: 95%; background: linear-gradient(90deg, #F472B6, #EC4899); }

/* 予約テーブルの追加スタイル */
.flame-booking-section {
  background-color: var(--flame-white);
  border-radius: 12px;
  border: 1px solid var(--flame-border);
  box-shadow: 0 4px 16px rgba(44, 44, 44, 0.03);
}

/* スマホ対策: テーブルコンテナは必ず横スクロール可能に */
.flame-booking-section .booking-list-wrapper {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important; /* iOS慣性スクロール */
}

/* スマホ対策: テーブルは最小幅を保証して文字の縦折り返しを防止 */
.flame-booking-section .booking-table {
  min-width: 640px !important;
  table-layout: auto !important;
}

.booking-table th, .booking-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--flame-border);
  white-space: nowrap !important; /* 縦文字化を防止 */
  vertical-align: middle !important;
}

/* メモ列だけは折り返しOK */
.booking-table td.memo-cell {
  white-space: normal !important;
  max-width: 200px;
  word-break: break-all;
}

/* アクションボタンの縦化防止 */
.booking-table td:last-child {
  white-space: nowrap !important;
}

.booking-table td:last-child .btn,
.booking-table td:last-child button {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.booking-table tbody tr {
  transition: all 0.2s ease;
}
.booking-table tbody tr:hover {
  background-color: #FAF9F6;
}


/* タスクカードのスタイル */
.flame-task-section {
  background-color: var(--flame-white);
  border-radius: 12px;
  border: 1px solid var(--flame-border);
  box-shadow: 0 4px 16px rgba(44, 44, 44, 0.03);
}
.task-list-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.task-card {
  border: 1px solid var(--flame-border);
  border-radius: 10px;
  padding: 14px 16px;
  background-color: var(--flame-beige);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  border-left: 4px solid var(--flame-gold);
}
.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(44, 44, 44, 0.06);
}
.task-card.task-urgent {
  border-left-color: var(--flame-accent);
  background-color: #FFFDFD;
}
.task-card.task-warning {
  border-left-color: var(--flame-apricot);
  background-color: #FFFAF8;
}

/* ==========================================================================
   Hold Button and Badge Premium Styles (日程保留プレミアムスタイル)
   ========================================================================== */
#hold-status-wrapper {
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.05);
}

#btn-toggle-hold:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
  background-color: #FFFDF5 !important;
  border-color: #FBBF24 !important;
}

#btn-toggle-hold:active {
  transform: translateY(0);
}

/* 顧客カード内の保留中バッジ */
.badge-on-hold {
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.08);
  transition: all 0.2s ease;
  animation: pulse-hold 2s infinite ease-in-out;
}

@keyframes pulse-hold {
  0% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4);
  }
  70% {
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
  }
}

/* ==========================================================================
   2-Column Row Layout (2カラム行レイアウト)
   ========================================================================== */
.flame-form-row {
  display: flex;
  gap: 16px;
  width: 100%;
}

.flame-form-row .form-group {
  margin-bottom: 12px;
}

.flame-form-row .form-group.col-35 {
  width: 35%;
  flex-shrink: 0;
}

.flame-form-row .form-group.col-65 {
  width: 65%;
  flex-shrink: 0;
  flex-grow: 1;
}

/* ==========================================================================
   Complete Responsive Refinements (完全レスポンシブ極上対応)
   ========================================================================== */

/* 1. タブレット・大型スマホ対応 (992px以下) */
@media (max-width: 992px) {
  /* ヘッダー全体のグリッド調整 */
  .flame-header {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 14px !important;
    height: auto !important;
  }

  /* カレンダー非表示の強制解除 */
  .flame-header-calendar {
    display: flex !important;
    flex-direction: column !important;
    padding: 8px 12px !important;
  }

  /* 進捗サマリーバー */
  .flame-summary-bar {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }

  /* メインレイアウト */
  .flame-layout {
    grid-template-columns: 1fr !important;
    height: auto !important;
    min-height: auto !important;
    gap: 16px !important;
  }

  /* 各カラムの高さをスマホに最適化 */
  .flame-col {
    height: auto !important;
    min-height: auto !important;
  }

  .flame-col-sidebar {
    height: auto !important;
  }

  .flame-col-main {
    min-height: 450px !important;
  }

  .flame-col-profile {
    min-height: 400px !important;
  }
  
  /* 顧客管理の保存ボタンなどの幅調整 */
  #btn-save-customer {
    width: auto !important;
    max-width: none !important;
    padding: 0 16px !important;
  }
}

/* 2. 通常スマホ対応 (768px以下) */
@media (max-width: 768px) {
  /* スマホでの左ズレ対策 */
  .flame-msg-wrapper {
    margin-left: 0 !important;
    padding: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 進捗サマリーバーの列数を1に変更 */
  .flame-summary-bar {
    grid-template-columns: 1fr !important;
  }

  /* 定型文選択チップの高さ制限解除と折り返し */
  .template-chips {
    max-height: none !important;
    overflow: visible !important;
  }

  /* モバイルでのポップオーバーの位置を画面中央（モーダル表示）に強制固定 */
  .flame-popover {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 92% !important;
    max-width: 380px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25) !important;
    border-radius: 14px !important;
    z-index: 999999 !important;
    margin: 0 !important;
  }

  /* ポップオーバー時の斜めスライド遷移をモバイルでは無効に */
  .flame-popover.hidden {
    display: none !important;
    opacity: 0 !important;
    transform: translate(-50%, -45%) scale(0.95) !important;
  }

  .flame-popover:not(.hidden) {
    display: block !important;
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) !important;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .flame-calendar-months {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* モーダルのレスポンシブ化 */
  .flame-modal-content {
    width: 95% !important;
    max-width: 95% !important;
    height: 90vh !important;
    max-height: 620px !important;
  }

  .flame-modal-box {
    padding: 16px 20px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
  
  /* 顧客管理モーダルテーブルの横スクロール確保 */
  .customer-mgmt-modal-box {
    max-width: 95% !important;
  }

  .customer-mgmt-modal-box .booking-list-wrapper {
    overflow-x: auto !important;
  }

  .customer-mgmt-modal-box table {
    min-width: 600px !important;
  }
  
  /* プロファイル等のフォーム行を縦積みに */
  .flame-form-row {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .flame-form-row .form-group.col-50,
  .flame-form-row .form-group.col-35,
  .flame-form-row .form-group.col-65 {
    width: 100% !important;
  }
}

/* 3. 極小スマホ対応 (480px以下) */
@media (max-width: 480px) {
  /* ヘッダー全体を1列に */
  .flame-header {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* 天気予報表示の最適化 */
  .flame-header-weather {
    padding: 8px 12px !important;
  }

  .flame-header-weather > div {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }

  .flame-header-weather > div > div {
    border-left: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
  }

  /* タブのレイアウト崩れ対策 */
  .filter-tabs {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  .filter-tab {
    flex: 1 !important;
    min-width: 70px !important;
    text-align: center !important;
  }
  
  /* 定型文選択チップの折り返しと配置 */
  .template-chips {
    gap: 6px !important;
  }

  .template-chip {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }
}

/* ==========================================================================
   Needs Attention Warning Styles (要前日メール警告スタイル)
   ========================================================================== */
.summary-card.needs-attention {
  border: 1px solid #F87171 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15) !important;
  animation: pulse-attention 2s infinite ease-in-out;
  background-color: #FFF3E0 !important;
}

@keyframes pulse-attention {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3);
    border-color: #F87171;
  }
  70% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    border-color: #EF4444;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    border-color: #F87171;
  }
}

.summary-name-tag.tag-needs-attention {
  animation: pulse-tag-attention 1.5s infinite alternate ease-in-out;
}

@keyframes pulse-tag-attention {
  0% {
    background-color: #FEE2E2;
    border-color: #F87171;
  }
  100% {
    background-color: #FCA5A5;
    border-color: #EF4444;
  }
}

/* ==========================================================================
   Header Task & Weather Popover Styles
   ========================================================================== */
/* 脈動点滅ドット */
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--flame-accent);
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
  animation: task-pulse 1.6s infinite;
}

@keyframes task-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(255, 107, 107, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
  }
}

/* ポップオーバー共通スタイル */
.flame-popover {
  position: absolute;
  top: 85px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 95, 93, 0.15);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 95, 93, 0.12);
  z-index: 1000;
  padding: 16px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  animation: popover-fade-in 0.2s ease-out;
}

@keyframes popover-fade-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#flame-weather-popover {
  width: 360px;
}

#flame-calendar-popover {
  left: 20px;
  width: 580px;
  padding: 20px;
}

.flame-calendar-months {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.calendar-month-box {
  display: flex;
  flex-direction: column;
}

.calendar-month-title {
  font-family: 'Shippori Mincho', 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--flame-tiffany-deep);
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.calendar-weekdays-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--flame-text-muted);
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--flame-border);
  padding-bottom: 4px;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 6px;
  column-gap: 4px;
}

.calendar-day-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 32px;
}

.calendar-day-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--flame-charcoal-light);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Outfit', 'Montserrat', sans-serif;
}

.calendar-day-number:hover {
  background-color: rgba(0, 95, 93, 0.08);
  color: var(--flame-tiffany-deep) !important;
  transform: scale(1.08);
}

.calendar-day-number.is-sunday,
.calendar-day-number.is-holiday {
  color: #E11D48 !important; /* 上品な赤 */
}

.calendar-day-number.is-saturday {
  color: #2563EB !important; /* 上品な青 */
}

.calendar-day-number.is-other-month {
  color: #E2E8F0 !important;
  cursor: default;
  pointer-events: none;
}

/* 今日のスタイル（すべての曜日・祝日カラーよりも最優先されなければならない） */
.calendar-day-number.is-today {
  background-color: var(--flame-tiffany-deep) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(0, 95, 93, 0.2);
}

.booking-dot {
  position: absolute;
  bottom: 0px;
  width: 4px;
  height: 4px;
  background-color: var(--flame-gold);
  border-radius: 50%;
  box-shadow: 0 0 2px rgba(217, 119, 6, 0.5);
}

/* カレンダー日付セルのカスタムツールチップ */
.flame-calendar-tooltip {
  position: absolute;
  background: rgba(44, 44, 44, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #FFFFFF;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  opacity: 0;
  transform: translateY(4px);
  max-width: 220px;
  font-family: var(--wp-admin-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
}

.flame-calendar-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.flame-calendar-tooltip::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px 4px 0;
  border-style: solid;
  border-color: rgba(44, 44, 44, 0.95) transparent;
  display: block;
  width: 0;
}


#flame-task-popover {
  width: 380px;
}

.popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--flame-border);
  padding-bottom: 8px;
}

.popover-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--flame-tiffany-deep);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.popover-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--flame-text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

.popover-close-btn:hover {
  color: var(--flame-accent);
}

/* お天気ポップオーバー詳細スタイル */
.weather-alert-box {
  background-color: #FEF2F2;
  border: 1px solid #FCA5A5;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 14px;
}

.alert-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #DC2626;
  margin-bottom: 4px;
}

.alert-desc {
  font-size: 10.5px;
  color: #7F1D1D;
  margin: 0;
  line-height: 1.4;
}

.weekly-forecast-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--flame-charcoal);
  margin-bottom: 8px;
}

.weekly-forecast-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.forecast-day {
  background: rgba(129, 216, 208, 0.08);
  border-radius: 6px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(129, 216, 208, 0.15);
}

.day-lbl {
  font-size: 9.5px;
  color: var(--flame-text-muted);
}

.day-ico {
  font-size: 14px;
}

.day-ico i {
  color: inherit !important;
}

.day-temp {
  font-size: 10px;
  font-weight: 600;
  color: var(--flame-text-main);
}

/* タスクカードスタイル */
.task-card {
  background-color: var(--flame-white);
  border-radius: 8px;
  border: 1px solid var(--flame-border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(44, 44, 44, 0.02);
  transition: all 0.2s ease;
}

.task-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(44, 44, 44, 0.05);
}

.task-card.task-urgent {
  border-left: 4px solid var(--flame-accent);
  background-color: #FFFDFD;
}

.task-card.task-warning {
  border-left: 4px solid var(--flame-gold);
  background-color: #FFFEFA;
}

/* おしゃれな時計コロンのフェードアニメーション */
.flame-clock-colon {
  animation: flame-colon-fade 2s infinite;
  display: inline-block;
  margin: 0 1px;
  font-weight: 500;
}

@keyframes flame-colon-fade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* 天気詳細ボタンホバー用 */
.flame-weather-more-btn {
  transition: all 0.2s ease !important;
}

.flame-weather-more-btn:hover {
  background-color: #007D7A !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 95, 93, 0.25) !important;
}

/* ==========================================================================
   顧客管理テーブルモーダル
   ========================================================================== */

/* モーダルボックスの大きさ */
.customer-mgmt-modal-box {
  max-width: 1000px !important;
  width: 95vw !important;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ツールバー（検索・フィルター） */
.customer-mgmt-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--flame-border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.customer-mgmt-search-box {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 360px;
}

.customer-mgmt-search-box i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--flame-text-muted);
  font-size: 13px;
}

.customer-mgmt-search-box input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--flame-border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--flame-white);
  color: var(--flame-text-main);
  transition: border-color 0.2s;
}

.customer-mgmt-search-box input:focus {
  outline: none;
  border-color: var(--flame-tiffany-deep);
  box-shadow: 0 0 0 3px rgba(0, 95, 93, 0.08);
}

.customer-mgmt-filter select {
  padding: 8px 12px;
  border: 1px solid var(--flame-border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--flame-white);
  color: var(--flame-text-main);
  cursor: pointer;
  min-width: 160px;
}

.customer-mgmt-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--flame-text-muted);
  white-space: nowrap;
}

.customer-mgmt-count span {
  color: var(--flame-tiffany-deep);
  font-size: 18px;
  font-weight: 800;
}

/* テーブルラッパー */
.customer-mgmt-table-wrap {
  flex: 1;
  overflow-y: auto;
  margin-top: 4px;
}

/* テーブル本体 */
.customer-mgmt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.customer-mgmt-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--flame-beige);
}

.customer-mgmt-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--flame-text-muted);
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--flame-border);
  white-space: nowrap;
}

.customer-mgmt-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.customer-mgmt-table th.sortable:hover {
  color: var(--flame-tiffany-deep);
}

.customer-mgmt-table th.sorted-asc .fa-sort,
.customer-mgmt-table th.sorted-desc .fa-sort {
  color: var(--flame-tiffany-deep);
}

.customer-mgmt-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--flame-border);
  vertical-align: middle;
  color: var(--flame-text-main);
}

.customer-mgmt-table tbody tr {
  transition: background-color 0.15s;
}

.customer-mgmt-table tbody tr:hover {
  background-color: rgba(0, 95, 93, 0.04);
}

/* カラム幅 */
.customer-mgmt-table .col-num { width: 36px; color: var(--flame-text-muted); font-weight: 600; }
.customer-mgmt-table .col-name { font-weight: 700; white-space: nowrap; }
.customer-mgmt-table .col-age { width: 60px; text-align: center; }
.customer-mgmt-table .col-status { width: 130px; }
.customer-mgmt-table .col-contact { width: 70px; text-align: center; }
.customer-mgmt-table .col-booking { width: 100px; font-size: 12px; color: var(--flame-text-muted); }
.customer-mgmt-table .col-first-lesson { width: 100px; font-size: 12px; color: var(--flame-text-muted); }
.customer-mgmt-table .col-weight { width: 70px; text-align: center; }
.customer-mgmt-table .col-actions { width: 130px; text-align: right; white-space: nowrap; }

/* ステータスバッジ */
.mgmt-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.mgmt-status-badge.status-new        { background: #F1F5F9; color: #64748B; }
.mgmt-status-badge.status-trial_sched  { background: #EFF6FF; color: #3B82F6; }
.mgmt-status-badge.status-trial_confirm { background: #F5F3FF; color: #7C3AED; }
.mgmt-status-badge.status-trial_done   { background: #FFFBEB; color: #D97706; }
.mgmt-status-badge.status-waiting_enroll { background: #FFF7ED; color: #EA580C; }
.mgmt-status-badge.status-enrolled     { background: #ECFDF5; color: #059669; }
.mgmt-status-badge.status-first-lesson { background: #EBF8F7; color: #005F5D; }
.mgmt-status-badge.status-cancelled    { background: #FEE2E2; color: #991B1B; }


/* 操作ボタン */
.mgmt-btn-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: var(--flame-tiffany-light);
  color: var(--flame-tiffany-deep);
  border: 1px solid rgba(0, 95, 93, 0.2);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  margin-right: 4px;
}

.mgmt-btn-edit:hover {
  background: var(--flame-tiffany-deep);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 95, 93, 0.2);
}

.mgmt-btn-delete {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: #FEF2F2;
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.mgmt-btn-delete:hover {
  background: #EF4444;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.25);
}

/* 空のメッセージ */
.customer-mgmt-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--flame-text-muted);
}

.customer-mgmt-empty i {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
}

.customer-mgmt-empty p {
  font-size: 14px;
}

/* 連絡手段アイコン */
.mgmt-channel-line { color: #06C755; font-size: 16px; }
.mgmt-channel-email { color: #E86A5A; font-size: 14px; }








/* 編集ジャンプ時のハイライトアニメーション */
@keyframes highlightFlash {
  0%, 100% { background-color: transparent; }
  30% { background-color: rgba(0, 95, 93, 0.18); }
}

.customer-card.highlight-flash {
  animation: highlightFlash 1.2s ease;
}

/* カレンダー日付パルスアニメーション（体験日：薄いオレンジ、入会日：薄いグリーン） */
@keyframes pulse-orange {
  0% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(249, 115, 22, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
  }
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes pulse-mixed {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 95, 93, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(0, 95, 93, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 95, 93, 0);
  }
}

/* 体験日の日付パルス（薄いオレンジ背景） */
.calendar-day-number.pulse-trial {
  background-color: #FFF3E0 !important;
  color: #E65100 !important;
  font-weight: 700 !important;
  animation: pulse-orange 1.8s infinite ease-in-out;
}

/* 入会日の日付パルス（薄いグリーン背景） */
.calendar-day-number.pulse-join {
  background-color: #E8F5E9 !important;
  color: #1B5E20 !important;
  font-weight: 700 !important;
  animation: pulse-green 1.8s infinite ease-in-out;
}

/* 体験と入会が重複する日のパルス（ミックス） */
.calendar-day-number.pulse-mixed {
  background-color: #E0F2F1 !important;
  color: #004D40 !important;
  font-weight: 700 !important;
  animation: pulse-mixed 1.8s infinite ease-in-out;
}

/* ==========================================================================
   Elementor & WordPress Theme Conflict Solver (Select & Icons)
   ========================================================================== */

/* 1. すべてのセレクトボックスの基本リセットと一貫したカスタムSVG矢印の適用 */
.flame-msg-wrapper select,
.flame-msg-wrapper .filter-select-wrapper select,
.flame-msg-wrapper .profile-form select,
.flame-msg-wrapper .customer-mgmt-filter select,
.flame-msg-wrapper select#edit-join-status,
.flame-msg-wrapper select#edit-join-date-time {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath stroke='%238E8A82' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E") !important;
  background-position: right 10px center !important;
  background-repeat: no-repeat !important;
  background-size: 16px 16px !important;
  padding-right: 30px !important;
  box-shadow: none !important;
}

/* 2. 既存のCSSで作成していた疑似要素のカスタム矢印（▼）を非表示にする（二重表示防止） */
.flame-msg-wrapper .select-with-icon::after {
  display: none !important;
  content: none !important;
}

/* 3. アイコン付き入力欄・選択欄のコンフリクト対策 */
.flame-msg-wrapper .input-with-icon,
.flame-msg-wrapper .select-with-icon {
  position: relative !important;
  display: block !important;
  width: 100% !important;
}

/* 4. 左側アイコンの位置調整と上書きブロック */
.flame-msg-wrapper .input-with-icon i,
.flame-msg-wrapper .select-with-icon i.select-icon,
.flame-msg-wrapper .select-with-icon i {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--flame-text-muted) !important;
  font-size: 13px !important;
  z-index: 10 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block !important;
}

/* 5. アイコン付きインプット・セレクトのテキストがアイコンと被らないようパディングを強制 */
.flame-msg-wrapper .input-with-icon input,
.flame-msg-wrapper .select-with-icon select {
  padding-left: 38px !important;
  padding-right: 32px !important;
}

/* 直感的なステータスチップ UI */
.status-chips-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.status-chips-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-chips-group-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--flame-text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.status-chips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

/* 各チップボタン */
.status-chip-btn {
  background-color: var(--flame-white) !important;
  border: 1px solid var(--flame-border) !important;
  border-radius: 6px !important;
  padding: 8px 4px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--flame-text-main) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-align: center !important;
  line-height: 1.2 !important;
  height: auto !important;
  min-height: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  width: 100% !important;
}

.status-chip-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(44, 44, 44, 0.05) !important;
  background-color: #FAF9F6 !important;
}

/* 体験フェーズ (オレンジ) のアクティブ状態 */
.group-trial .status-chip-btn.active {
  background-color: #FFF8F2 !important;
  border-color: #FFE8D6 !important;
  color: #D97706 !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.06) !important;
  font-weight: 700 !important;
}

/* 入会フェーズ (緑) のアクティブ状態 */
.group-enroll .status-chip-btn.active {
  background-color: #F1FAF2 !important;
  border-color: #D5EED8 !important;
  color: #059669 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.06) !important;
  font-weight: 700 !important;
}

.group-other .status-chip-btn.active {
  background-color: #FEF2F2 !important;
  border-color: #FCA5A5 !important;
  color: #DC2626 !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.06) !important;
  font-weight: 700 !important;
}

/* 本日のタスク：完了タスク行スタイル */
.task-completed {
  transition: opacity 0.2s ease;
}

/* 体験レッスン行（薄いオレンジ背景） */
.row-trial {
  background-color: #FFF9F2 !important;
}

/* 初回レッスン行（薄い緑背景） */
.row-join {
  background-color: #F4FBF7 !important;
}

/* サマリーバー：完了（送信済み）バッジスタイル */
.summary-name-tag.tag-completed {
  background-color: #ECFDF5 !important;
  color: #059669 !important;
  border: 1px solid #34D399 !important;
  font-weight: 700;
}

/* 顧客リストカード：体験フェーズ（薄いオレンジ背景） */
.customer-card.card-trial {
  background-color: #FFF9F2 !important;
}

/* 顧客リストカード：入会フェーズ（薄い緑背景） */
.customer-card.card-join {
  background-color: #F4FBF7 !important;
}

/* 顧客リストカード：選択中（アクティブ）は従来のアクティブ背景色を最優先 */
.customer-card.active {
  background-color: #F5EFEB !important;
}

/* ==========================================================================
   Googleカレンダー連携の追加スタイル
   ========================================================================== */

/* 設定・テンプレート管理モーダルタブ切り替え用のスタイル */
.modal-tabs {
  background-color: var(--flame-white);
}

.modal-tab-btn {
  font-family: inherit;
  outline: none;
}

.modal-tab-btn:hover {
  color: var(--flame-tiffany-deep) !important;
}

.modal-tab-btn.active {
  color: var(--flame-tiffany-deep) !important;
  border-bottom: 3px solid var(--flame-tiffany-deep) !important;
}

.modal-tab-content {
  transition: opacity 0.2s ease;
}

.modal-tab-content.hidden {
  display: none !important;
}

/* Googleカレンダー連携ヘッダー */
.flame-header-gcal {
  box-shadow: 0 4px 12px rgba(129, 216, 208, 0.08);
  transition: all 0.2s ease;
  height: 100%;
  min-height: 52px;
}

.flame-header-gcal:hover {
  background: rgba(0, 95, 93, 0.06) !important;
  border-color: rgba(0, 95, 93, 0.3) !important;
}

/* Googleカレンダー設定フォーム */
#gcal-settings-form .form-group label {
  color: var(--flame-charcoal);
  font-weight: 600;
}

#gcal-settings-form input:focus, 
#gcal-settings-form textarea:focus {
  border-color: var(--flame-tiffany-deep) !important;
  box-shadow: 0 0 0 2px rgba(0, 95, 93, 0.1) !important;
}

/* カレンダー設定のレスポンシブ2カラム対応 */
@media (max-width: 900px) {
  .flame-gcal-inline-layout {
    grid-template-columns: 1fr !important;
  }
}

/* FullCalendar モバイル表示の最適化 */
@media (max-width: 768px) {
  .flame-gcal-calendar-box {
    padding: 12px 6px !important;
    margin-left: -10px !important;
    margin-right: -10px !important;
    border-radius: 6px !important;
    border-left: none !important;
    border-right: none !important;
  }
  
  .flame-gcal-calendar-box > div:first-child {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .fc .fc-header-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }
  
  .fc .fc-toolbar-title {
    font-size: 15px !important;
    width: 100% !important;
    text-align: center !important;
    order: -1 !important; /* タイトルを最上部に配置して重なりを回避 */
    margin: 4px 0 !important;
  }

  .fc .fc-button {
    padding: 6px 10px !important;
    font-size: 11px !important;
    height: auto !important;
  }

  /* 月カレンダー時のセルイベント微調整 */
  .fc-daygrid-event {
    margin-top: 1px !important;
    margin-bottom: 1px !important;
    padding: 2px 4px !important;
    font-size: 9px !important;
    border-radius: 4px !important;
    line-height: 1.2 !important;
  }
  
  .fc-list-event-title {
    font-size: 11.5px !important;
    font-weight: 600 !important;
  }
  
  .fc-list-event-time {
    font-size: 11.5px !important;
  }
}


