/* ================================================
   おくみせ (okumise) – ブランドスタイル
   カラーパレット:
     背景    : #FFFBF5
     カード  : #FFFFFF
     アクセント: #E8920B
     ホバー  : #C67A08
     サブ    : #F5C563
     テキスト主: #1A1A2E
     テキスト副: #6B7280
     成功    : #10B981
     警告    : #F59E0B
     エラー  : #EF4444
     ボーダー: #F3F0EB
   ================================================ */

/* ── Google Fonts ────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* ── ベース ──────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: #FFFBF5;
  color: #1A1A2E;
  margin: 0;
  line-height: 1.6;
}

a {
  color: #E8920B;
  text-decoration: none;
}
a:hover {
  color: #C67A08;
}

/* ── レイアウト ──────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: #FFFFFF;
  border-right: 1px solid #F3F0EB;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.main-content {
  margin-left: 240px;
  padding: 32px;
  min-height: 100vh;
}

.header {
  height: 64px;
  background: #FFFFFF;
  border-bottom: 1px solid #F3F0EB;
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* ── ボタン ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: #E8920B;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.btn-primary:hover:not(:disabled) {
  background: #C67A08;
  box-shadow: 0 4px 12px rgba(232,146,11,0.3);
  transform: translateY(-1px);
  color: #fff;
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.btn-secondary {
  background: #FFFFFF;
  color: #1A1A2E;
  border: 1px solid #F3F0EB;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.btn-secondary:hover:not(:disabled) {
  background: #FFFBF5;
  border-color: #E8920B;
  color: #E8920B;
}

.btn-danger {
  background: #EF4444;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.btn-danger:hover:not(:disabled) {
  background: #dc2626;
  color: #fff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

/* ── カード ──────────────────────────────────── */
.card {
  background: #FFFFFF;
  border: 1px solid #F3F0EB;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── フォーム ────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #F3F0EB;
  border-radius: 8px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.9rem;
  color: #1A1A2E;
  background: #FFFFFF;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #E8920B;
  box-shadow: 0 0 0 3px rgba(232,146,11,0.12);
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #1A1A2E;
  margin-bottom: 6px;
}

/* ── スピナー ────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
  margin-right: 0.45rem;
  flex-shrink: 0;
}
.spinner-accent {
  border-color: rgba(232,146,11,0.25);
  border-top-color: #E8920B;
}
/* 後方互換 */
.spinner-blue {
  border-color: rgba(232,146,11,0.25);
  border-top-color: #E8920B;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ステップバー ────────────────────────────── */
.step-bar {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
}
.step-bar .step {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-bottom: 3px solid #F3F0EB;
  color: #6B7280;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.step-bar .step.active {
  border-color: #E8920B;
  color: #E8920B;
}
.step-bar .step.done {
  border-color: #10B981;
  color: #10B981;
}

/* ── ステータスバッジ ─────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-draft      { background: #F3F0EB; color: #6B7280; }
.badge-pending    { background: #FEF3C7; color: #92400E; }
.badge-scheduled  { background: #FFF3E0; color: #C67A08; }
.badge-approved   { background: #FFF3E0; color: #E8920B; }
.badge-published  { background: #D1FAE5; color: #065F46; }
.badge-failed     { background: #FEE2E2; color: #991B1B; }
.badge-archived   { background: #F3F0EB; color: #6B7280; }

/* ── トースト通知（上部固定）────────────────── */
#toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-5rem);
  background: #1A1A2E;
  color: #fff;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 9999;
  transition: transform 0.28s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap;
  max-width: 90vw;
  text-overflow: ellipsis;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  pointer-events: none;
}
#toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ── 画像プレビュー ──────────────────────────── */
#img-preview {
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

/* ── ハッシュタグチップ ──────────────────────── */
.tag-chip {
  display: inline-flex;
  align-items: center;
  background: #FFF3E0;
  color: #C67A08;
  border: 1px solid #F5C563;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.15rem;
  cursor: text;
  min-height: 30px;
  transition: background 0.15s;
}
.tag-chip:focus {
  outline: none;
  background: #FDEBC8;
  border-color: #E8920B;
}
.tag-chip-sm {
  display: inline-block;
  background: #FFF3E0;
  color: #C67A08;
  border-radius: 9999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  margin: 0.1rem 0.1rem 0 0;
  white-space: nowrap;
}

/* ── 文字数カウンター警告 ────────────────────── */
.char-warn { color: #EF4444; }

/* ── キャプション表示スタイル ────────────────── */
.caption-textarea {
  font-size: 16px !important;
  line-height: 1.85 !important;
  word-break: break-all;
  letter-spacing: 0.01em;
}

/* ── 安全チェック – 通過 ────────────────────── */
.safety-pass {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #D1FAE5;
  border: 2px solid #6EE7B7;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  color: #065F46;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.safety-pass svg {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: #10B981;
}
.safety-fail-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #991B1B;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* ── ダッシュボード – 投稿カード ─────────────── */
.post-card {
  background: #FFFFFF;
  border: 1px solid #F3F0EB;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.post-card-caption {
  font-size: 0.875rem;
  color: #1A1A2E;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  margin-bottom: 0.4rem;
}
.post-card-meta {
  font-size: 0.72rem;
  color: #6B7280;
}
.caption-cell {
  max-width: 220px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #1A1A2E;
  word-break: break-all;
}

/* ── サービスラベル ──────────────────────────── */
.svc-label {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  color: #6B7280;
  background: #FFFBF5;
  border: 1px solid #F3F0EB;
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.svc-label-up { color: #C67A08; background: #FFF3E0; border-color: #F5C563; }
.svc-label-ay { color: #7c3aed; background: #ede9fe; border-color: #c4b5fd; }

/* ── 投稿承認ボタン ──────────────────────────── */
.approve-btn-primary {
  background: linear-gradient(135deg, #E8920B 0%, #C67A08 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(232,146,11,0.35), 0 1px 3px rgba(0,0,0,0.08);
  padding: 0.875rem 1rem;
  letter-spacing: 0.02em;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  width: 100%;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.approve-btn-primary:hover {
  background: linear-gradient(135deg, #C67A08 0%, #A86207 100%);
  box-shadow: 0 6px 20px rgba(232,146,11,0.45);
  transform: translateY(-1px);
}
.approve-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(232,146,11,0.3);
}
.approve-btn-primary:disabled {
  opacity: 0.6;
  transform: none;
  cursor: not-allowed;
}

/* ── 複数画像サムネイル ──────────────────────── */
.img-thumb-wrap {
  position: relative;
  flex-shrink: 0;
}
.img-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: #F3F0EB;
}
.img-thumb-label {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  line-height: 1.4;
}
.img-thumb-del {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border-radius: 9999px;
  width: 1.35rem;
  height: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  border: none;
  padding: 0;
}
.img-thumb-del:hover {
  background: rgba(239, 68, 68, 0.85);
}
.step2-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  border: 2px solid #F3F0EB;
}

/* ── スケジュール クイック選択ボタン ─────────── */
.schedule-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  border: 1.5px solid #F5C563;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #C67A08;
  background: #fff;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  font-family: 'Noto Sans JP', sans-serif;
}
.schedule-quick-btn:hover {
  background: #FFF3E0;
  border-color: #E8920B;
  color: #E8920B;
}
.schedule-quick-btn.active {
  background: #E8920B;
  border-color: #E8920B;
  color: #fff;
}
.schedule-preview-text {
  font-size: 0.875rem;
  color: #C67A08;
  font-weight: 600;
  background: #FFF3E0;
  border: 1.5px solid #F5C563;
  border-radius: 8px;
  padding: 0.5rem 0.875rem;
}

/* ── 予約カレンダー グリッド ──────────────────── */
.cal-grid {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  border: 1px solid #F3F0EB;
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.75rem;
  min-width: 600px;
}
.cal-header-cell {
  background: #FFFBF5;
  border-bottom: 1px solid #F3F0EB;
  border-right: 1px solid #F3F0EB;
  padding: 0.5rem 0.25rem;
  text-align: center;
  font-weight: 700;
  color: #1A1A2E;
}
.cal-time-cell {
  background: #FFFBF5;
  border-bottom: 1px solid #F3F0EB;
  border-right: 1px solid #F3F0EB;
  padding: 0.4rem 0.25rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-slot {
  border-bottom: 1px solid #F3F0EB;
  border-right: 1px solid #F3F0EB;
  min-height: 64px;
  padding: 0.25rem;
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
}
.cal-slot:hover {
  background: #FFF3E0;
}
.cal-slot-empty::after {
  content: '+';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #F5C563;
  font-weight: 700;
}
.cal-slot-empty:hover::after {
  color: #E8920B;
}
.cal-slot-booked {
  background: #FFF3E0;
  cursor: default;
}
.cal-slot-booked:hover {
  background: #FDEBC8;
}
.cal-slot-published {
  background: #D1FAE5;
  cursor: default;
}
.cal-slot-published:hover {
  background: #A7F3D0;
}
.cal-slot-card {
  border-radius: 4px;
  padding: 0.2rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cal-slot-card-booked    { color: #C67A08; }
.cal-slot-card-published { color: #065F46; }

/* ── ハンバーガーメニュー ────────────────────── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #1A1A2E;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99;
}

/* ── サイドバーロゴ ──────────────────────────── */
.sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid #F3F0EB;
  flex-shrink: 0;
}
.sidebar-logo-link {
  font-size: 1.25rem;
  font-weight: 700;
  color: #E8920B;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.sidebar-logo-link:hover {
  color: #C67A08;
}

/* ── サイドバーナビ ──────────────────────────── */
.sidebar-nav {
  list-style: none;
  padding: 12px 12px 0;
  margin: 0;
  flex: 1;
}
.sidebar-nav li {
  margin-bottom: 2px;
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B7280;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.sidebar-nav-item svg {
  flex-shrink: 0;
}
.sidebar-nav-item:hover {
  background: #FFF3E0;
  color: #E8920B;
}
.sidebar-nav-item.active {
  background: #FFF3E0;
  color: #E8920B;
  font-weight: 700;
}

/* ── サイドバーフッター ──────────────────────── */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid #F3F0EB;
  flex-shrink: 0;
}
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B7280;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: 'Noto Sans JP', sans-serif;
  text-align: left;
}
.sidebar-logout:hover {
  background: #FEE2E2;
  color: #EF4444;
}

/* ── ページ本体ラッパー ──────────────────────── */
.page-body {
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-main {
  padding: 32px;
  flex: 1;
}

/* ── ヘッダー内要素 ──────────────────────────── */
.page-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1A1A2E;
  margin: 0;
  flex: 1;
}
.header-user {
  font-size: 0.82rem;
  color: #6B7280;
  background: #F3F0EB;
  padding: 6px 12px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* ── レスポンシブ (768px以下) ────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 200;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }
  .main-content {
    margin-left: 0;
    padding: 16px;
  }
  .page-body {
    margin-left: 0;
  }
  .page-main {
    padding: 16px;
  }
  .hamburger-btn {
    display: flex;
  }
  .cal-grid {
    min-width: 480px;
  }
}
