/* おけいこタウン ─ Design System "Teal & Amber" */

/* ========================================
   CSS 変数
======================================== */
:root {
    /* ブランドカラー（ティール） */
    --primary:        #1da277;
    --primary-dark:   #178a63;
    --primary-light:  #6caf9a;
    --primary-subtle: #e8f5f1;

    /* CTA アクセント */
    --amber:          #f59e0b;
    --amber-dark:     #d97706;
    --amber-light:    #fef3c7;

    /* システムカラー */
    --success:        #10b981;
    --success-light:  #d1fae5;
    --danger:         #ef4444;
    --danger-light:   #fee2e2;
    --warning:        #f59e0b;
    --warning-light:  #fef3c7;
    --info:           #3b82f6;
    --info-light:     #dbeafe;

    /* サーフェス（ウォームクリーム） */
    --bg:             #ffffff;
    --bg-surface:     #f8f7f5;
    --bg-muted:       #f4f2ed;

    /* テキスト */
    --text-900:       #404040;
    --text-700:       #5a5a5a;
    --text-600:       #6b7280;
    --text-400:       #9ca3af;

    /* ボーダー（ウォーム） */
    --border:         #e5e0d8;
    --border-light:   #f0ebe3;

    /* シャドウ */
    --shadow-xs: 0 1px 2px rgba(64,64,64,.05);
    --shadow-sm: 0 1px 3px rgba(64,64,64,.06), 0 2px 8px rgba(64,64,64,.04);
    --shadow-md: 0 4px 16px rgba(64,64,64,.09), 0 2px 4px rgba(64,64,64,.05);
    --shadow-lg: 0 12px 40px rgba(64,64,64,.13);

    /* 旧変数との互換 */
    --primary-color:  #1da277;
    --primary-color-dark: #178a63;
    --text-color:     #404040;
    --text-muted:     #6b7280;
    --text-light:     #9ca3af;
    --light-bg:       #f8f7f5;
    --lighter-bg:     #ffffff;
    --border-color:   #e5e0d8;
    --border-light:   #f0ebe3;
    --shadow-md:      0 4px 16px rgba(64,64,64,.09), 0 2px 4px rgba(64,64,64,.05);
    --card-shadow:    var(--shadow-sm);
}

* { box-sizing: border-box; }

body {
    font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
                 "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
    color: var(--text-900);
    background: var(--bg-surface);
    line-height: 1.75;
    margin: 0;
    padding: 0;
}

/* ========================================
   ナビゲーション
======================================== */
.navbar {
    background: #fff;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-xs);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 200;
}

.navbar-brand {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}
.navbar-brand i {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.4rem;
}
.navbar-brand:hover { color: var(--primary-dark); }

/* PC ナビリンク */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 2px;
}
.navbar-links a {
    color: var(--text-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 8px;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.navbar-links a:hover {
    color: var(--primary);
    background: var(--primary-subtle);
}
.navbar-links a::after { display: none; }
.navbar-divider { width: 1px; height: 22px; background: var(--border); margin: 0 6px; }
.navbar-user {
    color: var(--text-700);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0 8px;
    white-space: nowrap;
}

/* ナビバッジ */
.nav-badge { position: relative; display: inline-block; }
.nav-badge .dot {
    position: absolute; top: -4px; right: -4px;
    background: var(--danger); color: #fff;
    border-radius: 10px; padding: 1px 5px;
    font-size: 10px; font-weight: 700; min-width: 16px; text-align: center;
}

/* ログインボタン */
.btn-nav-login {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    text-decoration: none;
    background: transparent;
    transition: all 0.15s ease;
}
.btn-nav-login:hover { background: var(--primary-subtle); }

/* 無料登録ボタン */
.btn-nav-register {
    padding: 7px 18px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: var(--amber);
    border: none;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.btn-nav-register:hover { background: var(--amber-dark); transform: translateY(-1px); }

/* ログアウトボタン */
.btn-logout {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-600);
    background: var(--bg-muted);
    text-decoration: none;
    transition: all 0.15s ease;
    border: none;
}
.btn-logout:hover { background: var(--danger-light); color: var(--danger); }

/* ハンバーガーボタン */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px; height: 44px;
    border: none; background: none; cursor: pointer;
    border-radius: 10px; gap: 5px; transition: background 0.15s;
}
.hamburger-btn:hover { background: var(--primary-subtle); }
.hamburger-btn span {
    display: block; width: 22px; height: 2px;
    background: var(--text-700); border-radius: 2px; transition: all 0.3s;
}
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* モバイルメニュー */
.mobile-menu {
    display: none;
    position: fixed; top: 64px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    z-index: 190;
    padding: 12px 0 20px;
    opacity: 0; transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
}
.mobile-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.mobile-menu-user {
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; gap: 14px;
}
.mobile-avatar {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem;
}
.mobile-menu-name { font-weight: 700; font-size: 0.95rem; color: var(--text-900); }
.mobile-menu-sub { font-size: 0.78rem; color: var(--text-400); margin-top: 2px; }

.mobile-section { padding: 6px 0; border-bottom: 1px solid var(--border-light); }
.mobile-section-label {
    font-size: 0.7rem; font-weight: 700; color: var(--text-400);
    text-transform: uppercase; letter-spacing: 0.8px;
    padding: 6px 20px 4px;
}
.mobile-menu a {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 20px; text-decoration: none;
    color: var(--text-700); font-size: 0.92rem; font-weight: 500;
    transition: all 0.15s;
}
.mobile-menu a:hover { background: var(--primary-subtle); color: var(--primary); }
.mobile-menu a i { width: 20px; text-align: center; color: var(--primary); }
.mobile-menu a::after { display: none; }
.m-badge {
    margin-left: auto; background: var(--danger);
    color: #fff; border-radius: 10px;
    padding: 1px 8px; font-size: 11px; font-weight: 700;
}
.mobile-logout {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 20px; text-decoration: none;
    color: var(--danger); font-size: 0.92rem; font-weight: 500;
}
.mobile-logout i { width: 20px; text-align: center; }

/* オーバーレイ */
.nav-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(15,23,42,.4); z-index: 180;
}
.nav-overlay.open { display: block; }

/* ========================================
   コンテナ・メイン
======================================== */
.main {
    padding: 2.5rem 0;
    min-height: calc(100vh - 64px);
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================
   見出し
======================================== */
h1, h2, h3, h4 {
    color: var(--text-900);
    margin-top: 0;
    font-weight: 700;
    line-height: 1.3;
}
h1 { font-size: 2.25rem; margin-bottom: 1.5rem; }
h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.875rem;
    border-bottom: 2px solid var(--border);
    position: relative;
}
h2::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 48px; height: 2px;
    background: var(--primary);
    border-radius: 2px;
}
h3 { font-size: 1.2rem; margin-bottom: 1rem; color: var(--text-900); }

/* ========================================
   カード
======================================== */
.info-card, .lesson-info-section, .reservation-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.info-card:hover { box-shadow: var(--shadow-md); }

.stat-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem;
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.stat-card h3 {
    font-size: 0.8rem;
    color: var(--text-400);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
}
.stat-number.highlight { color: var(--amber); }

/* ========================================
   カードカバー（カテゴリカラー背景）
======================================== */
.card-cover {
    position: relative;
    width: 100%; height: 160px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.card-cover img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
}
.card-cover-icon {
    font-size: 2.75rem;
    color: rgba(255,255,255,0.55);
    position: relative; z-index: 1;
}
.card-cover-photo { background: #e8e5df; } /* 画像ありの場合はグラデーション不要 */
.card-cover-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
}
/* カテゴリ別カラー（category.id % 8 で使用） */
.cover-0 { background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%); } /* 音楽 */
.cover-1 { background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%); } /* 料理 */
.cover-2 { background: linear-gradient(135deg, #16a34a 0%, #4ade80 100%); } /* スポーツ */
.cover-3 { background: linear-gradient(135deg, #0d9488 0%, #2dd4bf 100%); } /* ヨガ */
.cover-4 { background: linear-gradient(135deg, #1d4ed8 0%, #60a5fa 100%); } /* 語学 */
.cover-5 { background: linear-gradient(135deg, #475569 0%, #94a3b8 100%); } /* 書道 */
.cover-6 { background: linear-gradient(135deg, #be185d 0%, #f472b6 100%); } /* アート */
.cover-7 { background: linear-gradient(135deg, #dc2626 0%, #f87171 100%); } /* ダンス */
/* デフォルト（カテゴリなし） */
.cover-default { background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%); }

/* ========================================
   講座カード（一覧）
======================================== */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.lesson-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.lesson-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}
.lesson-header {
    padding: 0.75rem 1.25rem 0;
    display: flex; gap: 0.5rem; flex-wrap: wrap;
}
.lesson-card h3 {
    padding: 0.5rem 1.25rem 0.25rem;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
}
.lesson-meta {
    padding: 0 1.25rem 0.75rem;
    display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
    font-size: 0.85rem;
    color: var(--text-600);
    border-top: 1px solid var(--border-light);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}
.lesson-meta > div { display: flex; align-items: center; gap: 0.4rem; }
.lesson-meta i { color: var(--primary-light); font-size: 0.8rem; }
.lesson-price {
    padding: 0 1.25rem 0.5rem;
    display: flex; align-items: baseline; gap: 0.3rem;
}
.lesson-price-amount {
    font-size: 1.4rem; font-weight: 800; color: var(--primary);
    font-family: "Outfit", sans-serif;
}
.lesson-price-unit { font-size: 0.8rem; color: var(--text-400); }
.description {
    padding: 0 1.25rem 0.75rem;
    color: var(--text-600);
    font-size: 0.875rem;
    line-height: 1.6;
}
.lesson-card .btn-primary { margin: auto 1.25rem 1.25rem; }

/* ========================================
   サイドバーレイアウト（Lessons用）
======================================== */
.sidebar-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
}
.sidebar-main { flex: 1; min-width: 0; }
.filter-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.5rem;
}
.filter-section { margin-bottom: 1.25rem; }
.filter-section:last-child { margin-bottom: 0; }
.filter-section-label {
    font-size: 0.72rem; font-weight: 700; color: var(--text-400);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 0.75rem; display: block;
}
.filter-option {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0; cursor: pointer;
    font-size: 0.875rem; color: var(--text-700);
    transition: color 0.1s;
}
.filter-option:hover { color: var(--primary); }
.filter-option input[type="radio"] {
    width: auto; padding: 0; border: none; outline: none;
    margin: 0; accent-color: var(--primary);
}
.filter-keyword {
    width: 100%; padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px; font-size: 0.875rem;
    font-family: inherit;
}
.filter-keyword:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.filter-select {
    width: 100%; padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px; font-size: 0.875rem;
    font-family: inherit; background: #fff;
}
.filter-select:focus { outline: none; border-color: var(--primary); }
.filter-clear {
    display: flex; align-items: center; gap: 6px;
    color: var(--text-400); font-size: 0.8rem; font-weight: 600;
    text-decoration: none; padding: 4px 0;
    transition: color 0.15s;
}
.filter-clear:hover { color: var(--danger); }
.filter-toggle-btn {
    display: none;
    align-items: center; gap: 8px;
    padding: 9px 18px;
    background: #fff; border: 1.5px solid var(--border);
    border-radius: 10px; font-weight: 600; font-size: 0.875rem;
    cursor: pointer; font-family: inherit; color: var(--text-700);
    margin-bottom: 1rem;
}

/* ========================================
   タイムライン（Mypage用）
======================================== */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
    display: flex; gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-date {
    flex-shrink: 0; width: 64px; text-align: center;
    background: var(--primary-subtle);
    border-radius: 10px; padding: 8px 4px;
}
.timeline-day {
    font-size: 1.5rem; font-weight: 800; color: var(--primary);
    font-family: "Outfit", sans-serif; line-height: 1;
}
.timeline-month { font-size: 0.68rem; color: var(--primary); opacity: 0.8; }
.timeline-weekday {
    font-size: 0.7rem; font-weight: 700; color: var(--primary);
    background: rgba(29,162,119,.12); border-radius: 4px;
    padding: 1px 5px; display: inline-block; margin-top: 3px;
}
.timeline-body { flex: 1; min-width: 0; }
.timeline-title {
    font-size: 0.95rem; font-weight: 700; color: var(--text-900);
    margin-bottom: 4px; line-height: 1.4;
}
.timeline-meta {
    display: flex; flex-wrap: wrap; gap: 8px 12px;
    font-size: 0.8rem; color: var(--text-600);
}
.timeline-meta span { display: flex; align-items: center; gap: 4px; }
.timeline-meta i { color: var(--primary); opacity: 0.7; font-size: 0.75rem; }
.timeline-price { color: var(--primary); font-weight: 700; }
.timeline-action { flex-shrink: 0; align-self: center; }

/* ========================================
   施設カード
======================================== */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.facility-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.facility-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.facility-photo-wrap {
    height: 200px; overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}
.facility-photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.facility-no-photo {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem; color: rgba(255,255,255,0.5);
}
.facility-body { padding: 1.25rem 1.5rem 1.5rem; }
.facility-name {
    font-size: 1.1rem; font-weight: 700; color: var(--text-900);
    margin: 0 0 0.75rem;
}
.facility-pills {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1rem;
}
.facility-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 999px;
    background: var(--primary-subtle); color: var(--primary);
    font-size: 0.78rem; font-weight: 600;
}
.facility-desc {
    color: var(--text-600); font-size: 0.875rem;
    line-height: 1.6; margin-bottom: 0.75rem;
}
.facility-access {
    color: var(--text-400); font-size: 0.825rem;
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 1rem;
}
.facility-usage {
    background: var(--primary-subtle);
    border: 1px solid rgba(29,162,119,.2);
    border-radius: 10px; padding: 10px 14px;
    margin-bottom: 1rem;
}
.facility-usage-title {
    font-size: 0.78rem; font-weight: 700; color: var(--primary);
    margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.facility-usage-available {
    color: var(--success); font-size: 0.85rem; font-weight: 600;
    display: flex; align-items: center; gap: 5px;
}
.facility-usage-lessons {
    font-size: 0.8rem; color: var(--text-600); line-height: 1.6;
}
.facility-actions {
    display: flex; gap: 8px;
}

/* ========================================
   先生カード
======================================== */
.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.teacher-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex; flex-direction: column; align-items: center;
}
.teacher-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}
.teacher-photo-wrap {
    width: 96px; height: 96px;
    border-radius: 50%; overflow: hidden;
    margin: 0 auto 1rem;
    border: 3px solid var(--primary-subtle);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.teacher-photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.teacher-photo-placeholder {
    font-size: 2rem; color: rgba(255,255,255,0.8);
}
.teacher-card h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.teacher-card .specialties {
    color: var(--text-400);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.teacher-sns-pills {
    display: flex; gap: 6px; flex-wrap: wrap;
    justify-content: center; margin-bottom: 1.25rem;
}
.sns-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 999px;
    background: var(--primary-subtle); color: var(--primary);
    font-size: 0.75rem; font-weight: 600; text-decoration: none;
    transition: background 0.15s;
}
.sns-pill:hover { background: var(--primary); color: #fff; }

/* ========================================
   グリッドレイアウト
======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}
.info-item label {
    display: block; font-weight: 600;
    color: var(--text-400); font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 0.4px;
    margin-bottom: 0.3rem;
}
.info-item p { margin: 0; color: var(--text-900); font-weight: 500; }

/* ========================================
   テーブル
======================================== */
table {
    width: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    border-collapse: collapse;
}
thead { background: var(--bg-surface); }
th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-600);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}
td {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-light);
    color: var(--text-700);
}
tbody tr:hover { background: var(--bg-surface); }
.info-table { margin-top: 1rem; }
.info-table th { width: 30%; background: var(--bg-surface); font-weight: 600; }

/* ========================================
   フォーム
======================================== */
.filter-box, .add-schedule-form {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
}
.form-inline {
    display: flex; gap: 1rem;
    align-items: flex-end; flex-wrap: wrap;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="number"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    color: var(--text-900);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29,162,119,.12);
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-700);
}

/* ========================================
   ボタン
======================================== */
button,
.btn-primary,
.btn-secondary,
.btn-cancel,
.btn-sm {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    font-size: 0.9rem;
    font-family: inherit;
}

.btn-primary, button[type="submit"] {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(29,162,119,.2);
}
.btn-primary:hover, button[type="submit"]:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(29,162,119,.25);
}

.btn-amber {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--amber);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(245,158,11,.2);
}
.btn-amber:hover {
    background: var(--amber-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(245,158,11,.25);
}

.btn-secondary {
    background: var(--bg-muted);
    color: var(--text-700);
}
.btn-secondary:hover {
    background: var(--border);
    transform: translateY(-1px);
}

.btn-cancel {
    background: var(--danger-light);
    color: var(--danger);
}
.btn-cancel:hover {
    background: var(--danger);
    color: #fff;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    background: var(--primary-subtle);
    color: var(--primary);
}
.btn-sm:hover { background: var(--primary); color: #fff; }

.btn-outline {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: 1.5px solid var(--primary);
    border-radius: 10px;
    color: var(--primary);
    background: transparent;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
}
.btn-outline:hover { background: var(--primary-subtle); }

.btn-disabled {
    background: var(--bg-muted);
    color: var(--text-400);
    cursor: not-allowed;
}
.btn-disabled:hover { transform: none; box-shadow: none; }

.btn-large { padding: 0.9rem 2.25rem; font-size: 1rem; }

/* ========================================
   バッジ・ステータス
======================================== */
.status-badge,
[class*="status-"],
.category-badge,
.level-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.category-badge {
    background: var(--primary-subtle);
    color: var(--primary-dark);
}

.level-badge { background: var(--bg-muted); color: var(--text-600); }
.level-beginner { background: var(--success-light); color: #065f46; }
.level-intermediate { background: var(--warning-light); color: #78350f; }
.level-advanced { background: var(--danger-light); color: #991b1b; }

.status-pending { background: var(--warning-light); color: #78350f; }
.status-confirmed, .status-approved, .status-open,
.status-published, .status-active {
    background: var(--success-light); color: #065f46;
}
.status-canceled, .status-rejected, .status-closed, .status-inactive {
    background: var(--danger-light); color: #991b1b;
}
.status-completed { background: var(--info-light); color: #1e3a8a; }
.status-draft { background: var(--bg-muted); color: var(--text-600); }

.payment-unpaid  { color: var(--amber);   font-weight: 700; }
.payment-paid    { color: var(--success); font-weight: 700; }
.payment-refunded{ color: var(--info);    font-weight: 700; }

/* ========================================
   予約カード
======================================== */
.reservations-list, .schedules-list {
    display: grid; gap: 1.25rem;
}
.reservation-card {
    border-left: 4px solid var(--primary);
    border-radius: 16px;
}
.reservation-card.status-canceled {
    border-left-color: var(--danger);
    opacity: 0.75;
}
.reservation-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 1.25rem;
}
.reservation-header h3 { margin: 0; }
.reservation-info { display: grid; gap: 0.75rem; }
.info-row {
    display: flex; align-items: center; gap: 0.625rem;
    color: var(--text-600); font-size: 0.9rem;
}
.info-row i { width: 20px; color: var(--primary-light); }
.teacher-info, .facility-info, .duration-info, .price-info {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--text-600); font-size: 0.9rem;
}
.reservation-actions {
    margin-top: 1.25rem; padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
    display: flex; gap: 0.75rem;
}

/* ========================================
   スケジュール
======================================== */
.schedule-item {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
    padding: 1.25rem;
    display: flex; justify-content: space-between;
    align-items: center; gap: 1.25rem;
}
.schedule-date, .schedule-time, .schedule-capacity {
    display: flex; align-items: center; gap: 0.5rem;
}
.available { color: var(--success); font-weight: 700; }
.full       { color: var(--danger);  font-weight: 700; }

/* ========================================
   講座詳細
======================================== */
.lesson-badges {
    display: flex; gap: 0.5rem;
    margin-bottom: 1.25rem; flex-wrap: wrap;
}
.price {
    font-size: 1.75rem; font-weight: 800;
    color: var(--primary);
}

/* ========================================
   ページネーション
======================================== */
.paginator {
    display: flex; justify-content: center;
    gap: 0.4rem; margin-top: 2.5rem; padding: 1.25rem 0;
}
.paginator a, .paginator span {
    padding: 0.55rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-700);
    background: #fff;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s;
}
.paginator a:hover {
    background: var(--primary);
    color: #fff; border-color: var(--primary);
    transform: translateY(-1px);
}
.paginator .active {
    background: var(--primary);
    color: #fff; border-color: var(--primary);
}

/* ========================================
   アクションリンク
======================================== */
.action-links {
    margin-top: 2rem; display: flex;
    gap: 1rem; justify-content: center; flex-wrap: wrap;
}
.view-all {
    display: inline-block; margin-top: 1rem;
    color: var(--primary); text-decoration: none;
    font-weight: 600; font-size: 0.9rem;
    transition: color 0.15s;
}
.view-all:hover { color: var(--primary-dark); text-decoration: underline; }

/* ========================================
   データなし表示
======================================== */
.no-data {
    text-align: center; padding: 4rem 2rem;
    color: var(--text-400);
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-light);
}
.no-data i { font-size: 2.5rem; color: var(--border); margin-bottom: 1rem; }

/* ========================================
   フラッシュメッセージ
======================================== */
.message {
    padding: 1rem 1.5rem; border-radius: 12px;
    margin-bottom: 1.5rem; font-weight: 500;
    display: flex; align-items: center; gap: 1rem;
    font-size: 0.925rem;
}
.message::before {
    font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 1.1rem;
}
.message.success {
    background: var(--success-light); color: #065f46;
    border-left: 4px solid var(--success);
}
.message.success::before { content: "\f058"; }
.message.error {
    background: var(--danger-light); color: #991b1b;
    border-left: 4px solid var(--danger);
}
.message.error::before { content: "\f06a"; }
.message.info {
    background: var(--info-light); color: #1e3a8a;
    border-left: 4px solid var(--info);
}
.message.info::before { content: "\f05a"; }
.message.warning {
    background: var(--warning-light); color: #78350f;
    border-left: 4px solid var(--warning);
}
.message.warning::before { content: "\f071"; }

/* ========================================
   ダッシュボード
======================================== */
.dashboard-sections { display: grid; gap: 2rem; }
.dashboard-sections section {
    background: #fff; border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm); padding: 1.75rem;
}

/* ========================================
   フッター
======================================== */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--border-light);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}
.site-footer a {
    color: var(--primary); text-decoration: none;
    font-weight: 500; font-size: 0.9rem;
}
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 0.5rem 0 0; color: var(--text-400); font-size: 0.85rem; }

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 900px) {
    /* サイドバーレイアウト → スタック */
    .sidebar-layout { flex-direction: column; }
    .sidebar { width: 100%; position: static; }
    .filter-card { display: none; }
    .filter-card.open { display: block; }
    .filter-toggle-btn { display: flex; }
}
@media (max-width: 768px) {
    .navbar { padding: 0 16px; }
    .navbar-links { display: none; }
    .hamburger-btn { display: flex; }
    .mobile-menu.open { display: block; }

    .stats-grid { grid-template-columns: 1fr 1fr; }
    .lessons-grid { grid-template-columns: 1fr 1fr; }
    .teachers-grid { grid-template-columns: 1fr 1fr; }
    .facilities-grid { grid-template-columns: 1fr; }
    .container { padding: 0 1rem; }
    .form-inline { flex-direction: column; align-items: stretch; }
    table { font-size: 0.85rem; }
    th, td { padding: 0.75rem; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .lessons-grid { grid-template-columns: 1fr; }
    .teachers-grid { grid-template-columns: 1fr; }
}
