/*
 * 予約システム 統合スタイルシート
 * 
 * 目次:
 * 1. リセットとベーススタイル
 * 2. レイアウト
 * 3. 共通コンポーネント
 *    3.1 ボタン
 *    3.2 フォーム
 *    3.3 カード・セクション
 *    3.4 テーブル
 *    3.5 アラート・メッセージ
 * 4. ヘッダー・フッター・ナビゲーション
 * 5. フロントエンド（会員側）スタイル
 *    5.1 ログイン
 *    5.2 ダッシュボード
 *    5.3 予約フォーム
 *    5.4 予約一覧
 * 6. 管理画面スタイル
 *    6.1 管理ダッシュボード
 *    6.2 管理一覧表示
 *    6.3 管理フォーム
 * 7. カレンダー・予約表示
 *    7.1 週間カレンダー
 *    7.2 予約スロット
 *    7.3 タイムスロット
 * 8. 予約ページ固有スタイル
 *    8.1 機材選択
 *    8.2 予約カレンダー
 *    8.3 予約確認画面
 * 9. レスポンシブデザイン
 *    9.1 PC (992px以上)
 *    9.2 タブレット (768px～991px)
 *    9.3 スマートフォン (767px以下)
 */

/*--------------------------------------------------------------
 1. リセットとベーススタイル
--------------------------------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

a {
    text-decoration: none;
    color: #3498db;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
}

/*--------------------------------------------------------------
 2. レイアウト
--------------------------------------------------------------*/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* フロント側のコンテナ */
.content-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-main {
    flex: 1 0 auto;
}

/* 管理画面のコンテナ */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/*--------------------------------------------------------------
 3. 共通コンポーネント
--------------------------------------------------------------*/
/* 3.1 ボタン */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger, .btn-cancel {
    background-color: #e74c3c;
}

.btn-danger:hover, .btn-cancel:hover {
    background-color: #c0392b;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* 3.2 フォーム */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-control, .form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
}

.form-col-2 {
    flex: 2;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.checkbox-group, .radio-group {
    display: flex;
    gap: 15px;
}

.checkbox-group label, .radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"], .radio-group input[type="radio"] {
    width: auto;
    margin-right: 8px;
}

/* 3.3 カード・セクション */
.card, .section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header, .section-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.card-title, .section-title {
    font-size: 1.2rem;
    color: #2c3e50;
    margin: 0;
}

.card-body, .section-body {
    margin-bottom: 15px;
}

.card-footer, .section-footer {
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* 3.4 テーブル */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th {
    background-color: #f5f7fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: bold;
    color: #2c3e50;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background-color: #f9f9f9;
}

/* 3.5 アラート・メッセージ */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success, .success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger, .error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info, .info-box {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/*--------------------------------------------------------------
 4. ヘッダー・フッター・ナビゲーション
--------------------------------------------------------------*/
/* フロント側ヘッダー */
header, .main-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1, .main-header h1 {
    font-size: 1.8rem;
    color: #2c3e50;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome {
    color: #555;
}

.logout-link {
    color: #3498db;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #3498db;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.logout-link:hover {
    background-color: #3498db;
    color: white;
}

nav, .main-nav {
    margin-bottom: 20px;
}

nav ul, .main-nav ul {
    display: flex;
    list-style: none;
    border-bottom: 1px solid #eee;
}

nav ul li, .main-nav ul li {
    margin-right: 20px;
}

nav ul li a, .main-nav ul li a {
    display: block;
    padding: 10px 0;
    color: #555;
    font-weight: bold;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

nav ul li a:hover, .main-nav ul li a:hover {
    color: #3498db;
}

nav ul li a.active, .main-nav ul li a.active {
    color: #3498db;
}

nav ul li a.active:after, .main-nav ul li a.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3498db;
}

/* 管理側ヘッダー */
.admin-header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 管理ナビゲーション */
.admin-nav {
    width: 250px;
    background-color: #34495e;
    color: white;
    padding: 20px 0;
}

.admin-nav ul {
    list-style: none;
}

.admin-nav ul li {
    margin-bottom: 5px;
}

.admin-nav ul li a {
    display: block;
    padding: 10px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
}

.admin-nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.admin-nav ul li a.active {
    background-color: #3498db;
    color: white;
}

.admin-nav i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    vertical-align: middle;
}

/* ドロップダウンメニュー */
.admin-nav .dropdown {
    position: relative;
}

.admin-nav .dropdown-menu {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    left: 0;
}

.admin-nav .dropdown-menu li {
    float: none;
    width: 100%;
}

.admin-nav .dropdown-menu a {
    padding: 12px 16px;
    color: #333;
    display: block;
    text-align: left;
}

.admin-nav .dropdown-menu a:hover, .admin-nav .dropdown-menu a.active {
    background-color: #ddd;
    color: #333;
}

.admin-nav .dropdown.open .fa-chevron-down {
    transform: rotate(180deg);
}

/* フッター */
footer, .admin-footer, .main-footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
    color: #777;
    font-size: 0.9rem;
}

.admin-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    margin-top: 0;
}

/* パンくずリスト */
.breadcrumb {
    margin-bottom: 20px;
    padding: 10px 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/*--------------------------------------------------------------
 5. フロントエンド（会員側）スタイル
--------------------------------------------------------------*/
/* 5.1 ログイン */
.login-form {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-form h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #555;
    font-size: 1.5rem;
}

/* 5.2 ダッシュボード */
.welcome-section {
    margin-bottom: 30px;
}

.welcome-section h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.reservation-status {
    display: flex;
    margin-top: 20px;
}

.status-box {
    background-color: #e1f5fe;
    border-radius: 8px;
    padding: 15px;
    flex: 1;
}

.status-box h3 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
}

.status-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #3498db;
}

.status-note {
    font-size: 0.8rem;
    color: #777;
    margin-top: 5px;
}

/* 5.3 予約フォーム */
.reservation-form {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reservation-form h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.reservation-info {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.reservation-info p {
    margin-bottom: 5px;
}

/* 5.4 予約一覧 */
.reservation-list {
    margin-top: 20px;
}

.reservation-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.reservation-time {
    min-width: 150px;
    padding-right: 15px;
    border-right: 1px solid #eee;
}

.reservation-time .date {
    font-weight: bold;
    color: #2c3e50;
}

.reservation-time .time {
    color: #666;
    font-size: 0.9rem;
}

.reservation-details {
    flex: 1;
    padding: 0 15px;
}

.reservation-details h4 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.reservation-id {
    font-size: 0.8rem;
    color: #666;
}

.reservation-actions, .reservation-status {
    min-width: 120px;
    text-align: right;
}

.cancellation-closed {
    font-size: 0.8rem;
    color: #999;
}

.status-completed {
    display: inline-block;
    padding: 3px 8px;
    background-color: #2ecc71;
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
}

.status-cancelled {
    display: inline-block;
    padding: 3px 8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
}

/*--------------------------------------------------------------
 6. 管理画面スタイル
--------------------------------------------------------------*/
/* 6.1 管理ダッシュボード */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-header h2 {
    color: #2c3e50;
}

.date-display {
    font-size: 1.1rem;
    color: #7f8c8d;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card-title {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.card-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
}

.card-action a {
    color: #3498db;
    text-decoration: none;
}

.card-action a:hover {
    text-decoration: underline;
}

.dashboard-sections section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.dashboard-sections section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

/* 6.2 管理一覧表示 */
.admin-card, .filter-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.admin-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #fafafa;
}

.admin-card-body {
    padding: 20px;
}

.admin-card-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background-color: #fafafa;
}

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

.admin-table th, 
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table thead th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.admin-table tbody tr:hover {
    background-color: #f8f9fa;
}

.search-form {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    justify-content: center;
}

.pagination li {
    margin: 0 5px;
}

.pagination a {
    display: block;
    padding: 5px 10px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #333;
    border-radius: 3px;
}

.pagination a.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.pagination a:hover:not(.active) {
    background-color: #f5f5f5;
}

/* 6.3 管理フォーム */
.form-section {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.filter-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-col {
    flex: 1;
}

.search-box {
    display: flex;
}

.search-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-box button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/*--------------------------------------------------------------
 7. カレンダー・予約表示
--------------------------------------------------------------*/
/* 7.1 週間カレンダー */
.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.week-navigator {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    flex-grow: 1;
}

.nav-button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-button:hover {
    background-color: #e0e0e0;
}

.nav-button svg {
    width: 24px;
    height: 24px;
    fill: #555;
}

.weekly-calendar {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.weekly-calendar th, .weekly-calendar td {
    border: 1px solid #ddd;
    padding: 0;
    text-align: center;
    height: 60px;
    position: relative;
}

.weekly-calendar th {
    background-color: #f8f8f8;
    padding: 10px;
    font-weight: bold;
}

.weekly-calendar th.weekend {
    background-color: #f0f0f0;
}

.weekly-calendar th.today {
    background-color: #e1f5fe;
}

.weekly-calendar th .day-name {
    display: block;
    font-size: 0.9rem;
    color: #555;
}

.weekly-calendar th .day-number {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-top: 3px;
}

.weekly-calendar td.time-label {
    background-color: #f8f8f8;
    font-weight: bold;
    width: 100px;
    padding: 0 10px;
    text-align: right;
}

.weekly-calendar th, .weekly-calendar td {
    border: 1px solid #ddd;
    padding: 5px;
    text-align: center;
}

.weekly-calendar th {
    background-color: #f5f5f5;
    position: sticky;
    top: 0;
}

.weekly-calendar th.today {
    background-color: #e8f5e9;
}

.weekly-calendar td {
    height: 30px;
    cursor: pointer;
}

/* 7.2 予約スロット */
.reservation-slot {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.reservation-slot.available {
    background-color: white;
}

.reservation-slot.available:hover {
    background-color: #e8f5e9;
}

.reservation-slot.selected {
    background-color: #81c784;
}

.reservation-slot.unavailable {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

.reservation-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reservation-icon.available {
    border: 2px solid #81c784;
    color: #81c784;
}

.reservation-icon.unavailable {
    border: 2px solid #e0e0e0;
    color: #bdbdbd;
}

.reservation-icon.selected {
    background-color: #43a047;
    border: 2px solid #43a047;
    color: white;
}

/* 7.3 タイムスロット */
.time-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.time-slot {
    padding: 12px;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.time-slot.available {
    background-color: #e8f4fb;
    border: 1px solid #b8e0f7;
    color: #0078d4;
}

.time-slot.available:hover {
    background-color: #b8e0f7;
}

.time-slot.unavailable {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #999;
    cursor: not-allowed;
}

.time-slot.selected {
    background-color: #0078d4;
    border: 1px solid #005a9e;
    color: white;
}

.selected-time-display {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
}

/*--------------------------------------------------------------
 8. 予約ページ固有スタイル
--------------------------------------------------------------*/
/* 8.1 機材選択 */
.equipment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.equipment-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    width: calc(33.333% - 20px);
    min-width: 250px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.equipment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
}

.equipment-card.selected {
    border-color: #4CAF50;
    background-color: #f0fff0;
}

.equipment-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.equipment-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
    border: 1px solid #eee;
    padding: 5px;
    background-color: #fff;
}

.equipment-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.equipment-select {
    text-align: center;
}

.no-image {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 1px solid #eee;
    color: #6c757d;
    font-size: 14px;
}

.selected-equipment {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

/* 8.2 予約カレンダー */
.reservation-form {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-top: 20px;
}

.weekly-calendar td.available {
    background-color: #e8f5e9;
}

.weekly-calendar td.unavailable {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.weekly-calendar td.selected {
    background-color: #4CAF50;
    color: white;
}

.weekly-calendar td.selected-range {
    background-color: #81C784;
    color: white;
}

.time-header {
    font-weight: bold;
    width: 80px;
}

.hover-highlight {
    background-color: #a8d5a8 !important;
    transition: background-color 0.1s ease;
}

.selected-reservation-info {
    display: none;
    background-color: #f0f9ff;
    border: 1px solid #b8daff;
    border-radius: 5px;
    padding: 15px;
    margin-top: 20px;
}

.reservation-action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.reservation-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    border: 1px solid #ddd;
}

.legend-icon.available {
    background-color: #e8f5e9;
}

.legend-icon.unavailable {
    background-color: #f5f5f5;
}

.legend-icon.selected {
    background-color: #4CAF50;
}

.reservation-slot-selector {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.reservation-slot-option {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background-color: #f9f9f9;
    transition: all 0.2s;
}

.reservation-slot-option.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.reservation-piece {
    position: absolute;
    background-color: rgba(76, 175, 80, 0.8);
    border: 2px solid #388E3C;
    border-radius: 4px;
    color: white;
    z-index: 10;
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.1s, box-shadow 0.1s;
}

.reservation-piece:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.reservation-piece.dragging {
    opacity: 0.7;
}

.reservation-summary {
    margin-top: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.remaining-hours {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    display: inline-block;
}

.remaining-hours.warning {
    color: #856404;
    background-color: #fff3cd;
}

.calendar-container {
    position: relative;
    overflow-x: auto;
}

/* 8.3 予約確認画面 */
.reservation-confirm h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.confirm-details {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.detail-group {
    margin-bottom: 20px;
}

.detail-group:last-child {
    margin-bottom: 0;
}

.detail-group h3 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 5px;
}

.detail-group p {
    color: #333;
}

.duration {
    font-size: 0.9rem;
    color: #666;
    margin-left: 10px;
}

.confirm-form .form-actions {
    justify-content: flex-end;
}

.confirm-form .btn:first-child {
    margin-right: 10px;
}

.reservation-complete {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.complete-message {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.complete-message h2 {
    color: #2ecc71;
    margin-bottom: 10px;
}

.detail-group {
    display: flex;
    margin-bottom: 10px;
}

.detail-group label {
    width: 120px;
    font-weight: bold;
    color: #555;
}

.detail-group p {
    flex: 1;
}

.action-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/*--------------------------------------------------------------
 9. レスポンシブデザイン
--------------------------------------------------------------*/
/* 9.1 PC (992px以上) */
@media (min-width: 992px) {
    .time-slot-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 9.2 タブレット (768px～991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .time-slot-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .overview-cards {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* 9.3 スマートフォン (767px以下) */
@media (max-width: 767px) {
    .admin-content {
        flex-direction: column;
    }
    
    .admin-nav {
        width: 100%;
        padding: 10px 0;
    }
    
    .admin-nav ul {
        display: flex;
        flex-wrap: wrap;
    }
    
    .admin-nav ul li {
        margin-bottom: 0;
    }
    
    .admin-nav ul li a {
        padding: 10px 15px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-user {
        margin-top: 10px;
    }
    
    .overview-cards {
        grid-template-columns: 1fr;
    }
    
    .form-row, .filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    header, .main-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav ul, .main-nav ul {
        margin-top: 15px;
    }
    
    nav ul li, .main-nav ul li {
        margin-left: 0;
        margin-right: 15px;
    }
    
    .reservation-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .reservation-time {
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-right: 0;
        padding-bottom: 10px;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .reservation-details {
        padding: 0;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .reservation-actions, .reservation-status {
        width: 100%;
        text-align: left;
    }
    
    .time-slot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-group {
        flex-direction: column;
    }
    
    .detail-group label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .action-links {
        flex-direction: column;
    }
    
    .action-links .btn {
        width: 100%;
    }
    
    .weekly-calendar th .day-name, 
    .weekly-calendar th .day-number {
        font-size: 0.8rem;
    }
    
    .weekly-calendar td.time-label {
        width: 60px;
        font-size: 0.8rem;
    }
    
    .equipment-card {
        width: 100%;
    }
    
    .reservation-legend {
        flex-direction: column;
        align-items: flex-start;
    }
    
}

/* スマホ最適化のための共通スタイル修正 */

/* ヘッダー・ナビゲーション関連の最適化 */
header h1, .main-header h1 {
    font-size: 1.3rem;
    transition: font-size 0.3s ease;
}

@media (max-width: 768px) {
    header h1, .main-header h1 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    header h1, .main-header h1 {
        font-size: 1rem;
    }
    
    header, .main-header {
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
}

/* ナビゲーションタブをcompactに */
nav ul, .main-nav ul {
    display: flex;
    list-style: none;
    border-bottom: 1px solid #eee;
    padding: 0;
    flex-wrap: wrap;
}

nav ul li, .main-nav ul li {
    margin-right: 10px;
}

nav ul li a, .main-nav ul li a {
    display: block;
    padding: 8px 12px;
    color: #555;
    font-weight: bold;
    font-size: 0.95rem;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 4px;
}

@media (max-width: 768px) {
    nav ul li a, .main-nav ul li a {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    nav ul li, .main-nav ul li {
        margin-right: 5px;
    }
    
    nav ul li a, .main-nav ul li a {
        padding: 5px 8px;
        font-size: 0.85rem;
    }
}

/* お知らせセクションをトグルで開閉可能に */
.announcements-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 4px solid #6c757d;
}

.announcements-toggle h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #495057;
}

.toggle-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.toggle-icon.open {
    transform: rotate(180deg);
}

.announcements-content {
    display: none;
    padding: 15px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.announcements-content.open {
    display: block;
}

/* セクション間の余白調整 */
.dashboard-section {
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .dashboard-section {
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .section-header {
        padding-bottom: 8px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .dashboard-section {
        margin-bottom: 12px;
        padding: 12px;
    }
}

/* 機材カードのさらなる最適化 */
@media (max-width: 480px) {
    .equipment-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .equipment-image {
        height: 90px;
    }
    
    .equipment-details h4 {
        font-size: 0.8rem;
        margin-bottom: 2px;
    }
    
    .equipment-details p {
        font-size: 0.7rem;
        margin-bottom: 6px;
        -webkit-line-clamp: 1;
        line-height: 1.3;
    }
    
    .equipment-details .btn {
        font-size: 0.7rem;
        padding: 4px 6px;
    }
}

/* 予約リストのさらなる最適化 */
@media (max-width: 480px) {
    .reservation-time .date {
        font-size: 0.9rem;
    }
    
    .reservation-time .time {
        font-size: 0.8rem;
    }
    
    .reservation-details h4 {
        font-size: 0.9rem;
    }
    
    .reservation-id {
        font-size: 0.75rem;
    }
    
    .reservation-actions .btn-cancel,
    .reservation-status .status-confirmed,
    .reservation-status .status-cancelled,
    .cancel-disabled {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
}

/* タッチ操作向け調整 - タップターゲットサイズの拡大 */
@media (max-width: 768px) {
    .btn {
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn-cancel {
        min-height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ウェルカムセクションの最適化 */
@media (max-width: 480px) {
    .welcome-container {
        padding: 10px;
    }
    
    .welcome-info h3 {
        font-size: 1.2rem;
    }
    
    .welcome-info p {
        font-size: 0.85rem;
    }
    
    .time-usage-title {
        font-size: 0.85rem;
    }
    
    .progress-bar-container {
        height: 20px;
    }
    
    .progress-text {
        font-size: 0.8rem;
        line-height: 20px;
    }
}

/* スマホ最適化のための共通スタイル修正 */

/* ヘッダー・ナビゲーション関連の最適化 */
header h1, .main-header h1 {
    font-size: 1.3rem;
    transition: font-size 0.3s ease;
}

@media (max-width: 768px) {
    header h1, .main-header h1 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    header h1, .main-header h1 {
        font-size: 1rem;
    }
    
    header, .main-header {
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
}

/* ナビゲーションタブをcompactに */
nav ul, .main-nav ul {
    display: flex;
    list-style: none;
    border-bottom: 1px solid #eee;
    padding: 0;
    flex-wrap: wrap;
}

nav ul li, .main-nav ul li {
    margin-right: 10px;
}

nav ul li a, .main-nav ul li a {
    display: block;
    padding: 8px 12px;
    color: #555;
    font-weight: bold;
    font-size: 0.95rem;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 4px;
}

@media (max-width: 768px) {
    nav ul li a, .main-nav ul li a {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    nav ul li, .main-nav ul li {
        margin-right: 5px;
    }
    
    nav ul li a, .main-nav ul li a {
        padding: 5px 8px;
        font-size: 0.85rem;
    }
}

/* タッチ操作向け調整 */
@media (max-width: 768px) {
    .btn {
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn-cancel {
        min-height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}