* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background: #f4f6f8;
    color: #222;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* =========================
   サイドバー
========================= */

.sidebar {
    width: 240px;
    background: #111827;
    color: #fff;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar h2 {
    font-size: 22px;
    margin-bottom: 30px;
}

.sidebar a {
    display: block;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 10px;
    color: #d1d5db;
    transition: 0.2s;
}

.sidebar a:hover {
    background: #1f2937;
    color: #fff;
}

/* =========================
   メイン
========================= */

.main {
    flex: 1;
    padding: 32px;
}

.page-title {
    font-size: 30px;
    margin-bottom: 24px;
    font-weight: bold;
}

/* =========================
   カード
========================= */

.card {
    background: #fff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

/* =========================
   フォーム
========================= */

.form-group {
    margin-bottom: 22px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
}

textarea {
    resize: vertical;
}

/* =========================
   ボタン
========================= */

.btn {
    display: inline-block;
    background: #111827;
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
}

.btn:hover {
    background: #374151;
}

.btn-sub {
    background: #6b7280;
}

.btn-sub:hover {
    background: #4b5563;
}

/* =========================
   成功メッセージ
========================= */

.success {
    background: #ecfdf5;
    color: #047857;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* =========================
   ダッシュボード
========================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.dashboard-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transition: 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-3px);
}

.dashboard-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.dashboard-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* =========================
   テーブル
========================= */

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 14px;
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    background: #f9fafb;
    font-weight: bold;
    white-space: nowrap;
}

.admin-table tr:hover {
    background: #f9fafb;
}

.action-links a {
    margin-right: 12px;
    color: #2563eb;
    font-weight: bold;
}

.action-links a.delete {
    color: #dc2626;
}

/* =========================
   一覧サムネイル
========================= */

.thumb {
    width: 100px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    background: #e5e7eb;
    display: block;
}

/* =========================
   編集ページ画像
========================= */

.admin-current-image {
    width: 240px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    background: #e5e7eb;
    display: block;
    margin-bottom: 12px;
}

.admin-image-preview {
    width: 320px;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    background: #e5e7eb;
    display: block;
    margin-bottom: 12px;
}

/* =========================
   公開ページ
========================= */

.public-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* =========================
   ビルボード
========================= */

.billboard {
    background: linear-gradient(135deg, #111827, #374151);
    color: #fff;
    border-radius: 28px;
    padding: 80px 40px;
    margin-bottom: 30px;
    text-align: center;
}

.billboard h1 {
    font-size: 46px;
    margin-bottom: 18px;
}

.billboard p {
    font-size: 18px;
    color: #e5e7eb;
}

/* =========================
   バナー
========================= */

.banner-area {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.banner {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    text-align: center;
}

.banner h3 {
    margin-top: 0;
}

/* =========================
   掲示板
========================= */

.board-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.event-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.event-list li {
    border-bottom: 1px solid #e5e7eb;
}

.event-list li:last-child {
    border-bottom: none;
}

.event-list a {
    display: block;
    padding: 14px 0;
}

.event-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.event-meta {
    font-size: 14px;
    color: #6b7280;
}

/* =========================
   セクションタイトル
========================= */

.section-title {
    font-size: 26px;
    margin-bottom: 18px;
}

/* =========================
   グループ一覧
========================= */

.group-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.group-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transition: 0.2s;
}

.group-card:hover {
    transform: translateY(-3px);
}

.group-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #e5e7eb;
}

.group-card-body {
    padding: 18px;
}

.group-card h3 {
    margin: 0 0 8px;
}

.group-card p {
    color: #6b7280;
    font-size: 14px;
}

/* =========================
   イベント詳細画像
========================= */

.event-detail-image {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 18px;
    display: block;
    background: #e5e7eb;
    margin-bottom: 24px;
}

/* =========================
   その他
========================= */

.no-data {
    color: #6b7280;
}

/* =========================
   レスポンシブ
========================= */

@media (max-width: 768px) {

    .admin-layout {
        display: block;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .dashboard-grid,
    .group-grid,
    .banner-area,
    .board-grid {
        grid-template-columns: 1fr;
    }

    .main {
        padding: 20px;
    }

    .billboard {
        padding: 50px 24px;
    }

    .billboard h1 {
        font-size: 32px;
    }

    .page-title {
        font-size: 26px;
    }

    .card {
        padding: 20px;
    }

    .admin-current-image {
        width: 100%;
    }
}


.banner {
    transition: 0.25s;
    cursor: pointer;
}

.banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.10);
}