/* CITTA ヨガスタジオ - カスタムCSS */

/* Tailwind CDN 拡張 */
:root {
  --citta-green:      #e2aeb0;
  --citta-green-dark: #d29092;
  --citta-sage:       #84a98c;
  --citta-sand:       #f5f0e8;
  --citta-charcoal:   #2d2d2d;
  --citta-mist:       #fcf5f5;
}

/* フォント */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #fafafa;
  color: var(--citta-charcoal);
}

/* ヘッダー */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--citta-green-dark);
  text-decoration: none;
}

/* ナビゲーション */
.nav-link {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
}
.nav-link:hover,
.nav-link.active {
  background-color: var(--citta-mist);
  color: var(--citta-green-dark);
}

/* カード */
.card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  padding: 1.5rem;
}

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--citta-green-dark);
  color: #fff;
}
.btn-primary:hover { background-color: #c57c7e; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--citta-green-dark);
  color: var(--citta-green-dark);
}
.btn-outline:hover { background-color: var(--citta-mist); }

.btn-danger {
  background-color: #ef4444;
  color: #fff;
}
.btn-danger:hover { background-color: #dc2626; }

.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
}
.btn-secondary:hover { background-color: #e5e7eb; }

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
}

.ui-icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  vertical-align: middle;
  flex-shrink: 0;
}

.ui-icon-lg {
  width: 1.4em;
  height: 1.4em;
}

.ui-icon-xl {
  width: 3rem;
  height: 3rem;
}

/* フォーム */
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  transition: border-color 0.15s;
  outline: none;
}
.form-input:focus {
  border-color: var(--citta-green-dark);
  box-shadow: 0 0 0 3px rgba(210, 144, 146, 0.15);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

/* スケジュールカレンダー */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .schedule-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 480px) {
  .schedule-grid {
    grid-template-columns: 1fr;
  }
}

.schedule-day {
  min-height: 120px;
}

.schedule-day-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-align: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0.5rem;
}

.lesson-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 3px solid var(--citta-green-dark);
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: box-shadow 0.15s;
  font-size: 0.8rem;
}
.lesson-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.lesson-card.full {
  border-left-color: #d1d5db;
  opacity: 0.7;
}
.lesson-card.workshop {
  border-left-color: #f59e0b;
}
.lesson-card.past {
  opacity: 0.4;
  cursor: not-allowed;
}
.lesson-card.past:hover {
  box-shadow: none;
}

/* バッジ */
.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-green { background: #f8efef; color: #a86163; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-blue { background: #dbeafe; color: #1e40af; }

/* テーブル */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f9fafb; }

/* モーダル */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: #fff;
  border-radius: 0.75rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* アラート */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error   { background: #fee2e2; color: #991b1b; }
.alert-info    { background: #dbeafe; color: #1e40af; }
.alert-warning { background: #fef3c7; color: #92400e; }

.announcement-item {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 1rem 1.125rem;
  background: #fff;
}

.announcement-info {
  background: #f8fbff;
}

.announcement-warning {
  background: #fffaf0;
}

.announcement-important {
  background: #fff5f5;
}

/* チケット表示 */
.ticket-widget {
  background: linear-gradient(135deg, #c57c7e 0%, #e2aeb0 100%);
  color: #fff;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
}
.ticket-count {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

/* ローディング */
.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #e5e7eb;
  border-top-color: var(--citta-green-dark);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* サイドバー (管理者) */
.admin-sidebar {
  width: 240px;
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  padding: 1.5rem 1rem;
  position: fixed;
  top: 0;
  left: 0;
}

.admin-sidebar-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--citta-green-dark);
  margin-bottom: 2rem;
  display: block;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: none;
  margin-bottom: 0.25rem;
  transition: all 0.15s;
}
.admin-nav-item:hover,
.admin-nav-item.active {
  background: var(--citta-mist);
  color: var(--citta-green-dark);
}

.admin-content {
  margin-left: 240px;
  padding: 2rem;
  min-height: 100vh;
}

@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .admin-content { margin-left: 0; }
}

/* 統計カード */
.stat-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--citta-green-dark);
}
.stat-label {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.legal-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.legal-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.legal-section + .legal-section {
  margin-top: 1.5rem;
}

.legal-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

.legal-section p,
.legal-section li {
  color: #4b5563;
  line-height: 1.9;
  font-size: 0.95rem;
}

.legal-section ul {
  margin: 0.5rem 0 0 1.25rem;
  list-style: disc;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
}

.legal-table th,
.legal-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.9rem 0.75rem;
  text-align: left;
  vertical-align: top;
  font-size: 0.95rem;
  line-height: 1.8;
}

.legal-table th {
  width: 34%;
  background: #fafafa;
  font-weight: 700;
  color: #374151;
}

.legal-meta {
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.legal-document {
  white-space: pre-wrap;
  color: #4b5563;
  line-height: 1.9;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table th,
  .legal-table td {
    display: block;
    width: 100%;
  }

  .legal-table tr {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.25rem 0 0.75rem;
  }

  .legal-table th,
  .legal-table td {
    border-bottom: none;
    padding: 0.45rem 0;
  }
}
