/* ========================================
   災害時通行実績システム - メインスタイルシート
   ========================================
   このファイルは、システム全体で使用される共通スタイルを定義します。
   - 基本レイアウト（ボディ、コンテナ）
   - ステータス表示カード
   - ボタンスタイル
   - タブインターフェース
   - アコーディオン
   - フォーム要素
   - テーブル
   - モーダル
   - レスポンシブ対応
   ======================================== */

/* ========================================
   基本設定
   ======================================== */

/* 全要素にボーダーボックスを適用 */
* {
    box-sizing: border-box;
}

/* ボディの基本スタイル - グラデーション背景 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* メインコンテナ - 最大幅1200pxで中央配置 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   ヘッダー（メインアプリケーション用 - menu.cssで管理）
   ======================================== */
/*
.header {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 2rem;
    text-align: center;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    margin: 0;
    font-size: 1.2rem;
    opacity: 0.9;
}
*/

/* ========================================
   メインコンテンツエリア
   ======================================== */

/* メインコンテンツ - 半透明の白背景でガラス効果 */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* ========================================
   ステータス表示カード
   ======================================== */

/* ステータスカードの基本スタイル */
.status-card {
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    border-left: 5px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 成功ステータス - 緑色のグラデーション */
.status-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
    color: #155724;
}

/* 情報ステータス - 青色のグラデーション */
.status-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-color: #17a2b8;
    color: #0c5460;
}

/* 警告ステータス - 黄色のグラデーション */
.status-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
    color: #856404;
}

/* エラーステータス - 赤色のグラデーション */
.status-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
    color: #721c24;
}

/* ========================================
   ボタンスタイル
   ======================================== */

/* ボタンの基本スタイル */
.btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 8px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* プライマリボタン - 青色のグラデーション */
.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

/* プライマリボタンのホバー効果 */
.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
}

/* 成功ボタン - 緑色のグラデーション */
.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

/* 成功ボタンのホバー効果 */
.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.3);
}

/* ========================================
   タブインターフェース
   ======================================== */
.tab-container {
    margin: 2rem 0;
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 3px solid #e9ecef;
    margin-bottom: 1.5rem;
    gap: 4px;
}

.tab-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-2px);
}

.tab-button.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-bottom-color: #004085;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.tab-content {
    display: none;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 0 8px 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* アコーディオンヘッダー */
.accordion-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0.5rem 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

/* アコーディオンヘッダーのホバー効果 */
.accordion-header:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
}

/* アクティブなアコーディオンヘッダー */
.accordion-header.active {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.3);
}

/* アコーディオンコンテンツ */
.accordion-content {
    display: none;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #007bff;
}

/* ========================================
   フォーム要素
   ======================================== */
.form-group {
    margin: 0.5rem 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* ========================================
   APIテスト結果表示
   ======================================== */

/* APIテスト結果コンテナ */
.api-test-result {
    margin: 1.5rem 0;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 5px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.api-test-result.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
    color: #155724;
}

.api-test-result.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
    color: #721c24;
}

.api-test-result h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
}

.api-test-result pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ========================================
   ローディング表示
   ======================================== */

/* ローディングインジケーター */
.loading {
    text-align: center;
    padding: 3rem;
    color: #007bff;
    font-weight: 600;
    font-size: 1.1rem;
}

/* ========================================
   機能テスト
   ======================================== */

/* 機能テストグリッド */
.function-tests {
    display: grid;
    gap: 0.8rem;
    margin: 1rem 0;
}

.function-test-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    gap: 1rem;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.function-test-item:hover {
    transform: translateY(-2px);
}

.function-test-item.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
}

.function-test-item.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 4px solid #dc3545;
}

.status-icon {
    font-size: 1.5rem;
}

.test-name {
    flex: 1;
    font-weight: 500;
}

.status-code {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
}

/* ========================================
   機能リスト
   ======================================== */

/* 機能リストコンテナ */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.feature-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    padding-left: 2rem;
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.2rem;
}

.feature-list li:last-child {
    border-bottom: none;
}

/* ========================================
   情報アイテム
   ======================================== */

/* 情報アイテムの表示 */
.info-item {
    margin: 0.8rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 249, 250, 0.8) 100%);
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-item strong {
    color: #495057;
}

/* ========================================
   APIテストセクション
   ======================================== */

/* APIテストセクションコンテナ */
.api-test-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.api-test-section h3 {
    margin: 0 0 1rem 0;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

/* ========================================
   レスポンシブ対応（タブレット・スマートフォン）
   ======================================== */

/* タブレット・スマートフォン向けレイアウト調整 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .main-content {
        padding: 1rem;
    }

    .header {
        padding: 1.5rem;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .tab-buttons {
        flex-direction: column;
    }

    .tab-button {
        border-radius: 8px;
        margin-bottom: 4px;
    }

    .tab-content {
        padding: 1rem;
        border-radius: 8px;
    }

    .function-test-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* ========================================
   アニメーション定義
   ======================================== */

/* パルスアニメーション */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn:active {
    animation: pulse 0.2s ease-in-out;
}

/* ========================================
   スクロールバーのカスタマイズ
   ======================================== */

/* スクロールバーの幅 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

/* ========================================
   メッシュ設定画面
   ======================================== */

/* メッシュコントロールエリア */
.mesh-controls {
    width: 100%;
    height: 100%;
}

.mesh-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mesh-status {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    line-height: 1.4;
}

.mesh-buttons {
    display: flex;
    gap: 0.5rem;
}

.mesh-instructions {
    background: #e3f2fd;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #2196f3;
}

.mesh-instructions p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #1565c0;
}

.mesh-map {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ========================================
   Leaflet地図のカスタマイズ
   ======================================== */

/* Leafletコンテナの基本設定 */
.leaflet-container {
    font-family: inherit;
}

.leaflet-popup-content {
    font-size: 14px;
    line-height: 1.4;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

/* ボタンスタイル */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .mesh-toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .mesh-status {
        text-align: center;
        font-size: 0.85rem;
    }

    .mesh-buttons {
        justify-content: center;
    }

    .mesh-map {
        height: 400px;
    }
}

/* ========================================
   コンテンツセクション
   ======================================== */

/* コンテンツセクションの表示制御 */
.content-section {
    display: none;
    width: 100%;
    height: 100%;
    padding-top: 0;
}

.content-section.active {
    display: block;
}

/* ========================================
   クイックアクションボタン
   ======================================== */

/* クイックアクションエリア */
.quick-actions {
    margin-top: 2rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

/* ========================================
   概要カード
   ======================================== */

/* 概要カードグリッド */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.overview-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-2px);
}

.card-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white;
}

.card-content h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.card-content p {
    margin: 0;
    color: #666;
    font-size: 1.2rem;
    font-weight: bold;
}

.card-content small {
    display: block;
    margin-top: 0.5rem;
    color: #999;
    font-size: 0.9rem;
    font-weight: normal;
}

.card-content .btn {
    margin: 0.5rem 0 0 0;
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* メッシュ設定画面のスタイル */
.mesh-controls {
    padding: 0 20px 20px 20px;
}

.mesh-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.mesh-status {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    line-height: 1.4;
}

.mesh-buttons {
    display: flex;
    gap: 10px;
}

.mesh-instructions {
    margin-bottom: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.mesh-instructions p {
    margin: 5px 0;
    color: #1565c0;
}

/* ========================================
   地図コンテナ
   ======================================== */

/* 地図コンテナの基本スタイル */
.mesh-map {
    width: 100%;
    height: 500px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    position: relative;
}

/* ========================================
   Leaflet地図の調整
   ======================================== */

/* Leaflet地図コンテナの高さ調整 */
.mesh-map .leaflet-container {
    height: 100%;
    width: 100%;
    border-radius: 6px;
}

/* コンテンツセクションの表示制御 */
.content-section {
    display: none;
    padding-top: 0;
}

.content-section.active {
    display: block;
}

/* ボタンスタイル */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* ========================================
   通知システム
   ======================================== */

/* 通知コンテナ - 画面右上に固定表示 */
.notifications {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 10001;
    max-width: 400px;
    width: auto;
}

.notification {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-left: 4px solid #155724;
}

.notification.error {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    border-left: 4px solid #721c24;
}

.notification.info {
    background: linear-gradient(135deg, #17a2b8 0%, #007bff 100%);
    border-left: 4px solid #0c5460;
}

.notification-content {
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.multiple-users-notification {
    border-left-color: #007bff !important;
}

.multiple-users-notification .notification-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.multiple-users-notification .notification-content p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

/* ========================================
   モバイル対応（スマートフォン）
   ======================================== */

/* スマートフォン向けの通知表示調整 */
@media (max-width: 768px) {
    .notifications {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .notification {
        font-size: 13px;
        padding: 12px 16px;
    }
}

/* ========================================
   システムアラート表示
   ======================================== */

/* システムアラートコンテナ */
.system-alerts {
    margin-bottom: 20px;
}

.alert {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideInFromTop 0.3s ease-out;
    position: relative;
}

.alert.critical {
    border-left-color: #dc3545;
    background: linear-gradient(90deg, #fff5f5 0%, #ffffff 100%);
}

.alert.warning {
    border-left-color: #ffc107;
    background: linear-gradient(90deg, #fffbf0 0%, #ffffff 100%);
}

.alert.info {
    border-left-color: #17a2b8;
    background: linear-gradient(90deg, #f0f9ff 0%, #ffffff 100%);
}

.alert.success {
    border-left-color: #28a745;
    background: linear-gradient(90deg, #f0fff4 0%, #ffffff 100%);
}

.alert-icon {
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.alert.critical .alert-icon {
    color: #dc3545;
}

.alert.warning .alert-icon {
    color: #ffc107;
}

.alert.info .alert-icon {
    color: #17a2b8;
}

.alert.success .alert-icon {
    color: #28a745;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin: 0 0 4px 0;
    font-size: 14px;
}

.alert.critical .alert-title {
    color: #721c24;
}

.alert.warning .alert-title {
    color: #856404;
}

.alert.info .alert-title {
    color: #0c5460;
}

.alert.success .alert-title {
    color: #155724;
}

.alert-message {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.alert-timestamp {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.alert-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.alert-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
}

.alert-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.alert-action-btn {
    background: none;
    border: 1px solid currentColor;
    color: inherit;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-action-btn:hover {
    background: currentColor;
    color: white;
}

/* ========================================
   アラートアニメーション
   ======================================== */

/* 上からスライドインするアニメーション */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutToTop {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.alert.removing {
    animation: slideOutToTop 0.3s ease-in forwards;
}

/* ========================================
   アラートスクロール制御
   ======================================== */

/* アラートが多い場合のスクロール */
.system-alerts {
    max-height: 300px;
    overflow-y: auto;
}

.system-alerts::-webkit-scrollbar {
    width: 6px;
}

.system-alerts::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.system-alerts::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.system-alerts::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ========================================
   アラート統計表示
   ======================================== */

/* アラート統計サマリー */
.alert-summary {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.alert-summary-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 12px;
    font-weight: 600;
}

.alert-summary-item.critical {
    color: #dc3545;
}

.alert-summary-item.warning {
    color: #ffc107;
}

.alert-summary-item.info {
    color: #17a2b8;
}

.alert-summary-item.success {
    color: #28a745;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .alert {
        padding: 10px 12px;
    }

    .alert-icon {
        font-size: 18px;
        margin-right: 10px;
    }

    .alert-title {
        font-size: 13px;
    }

    .alert-message {
        font-size: 12px;
    }

    .alert-actions {
        flex-direction: column;
        gap: 4px;
    }

    .alert-summary {
        flex-direction: column;
        gap: 5px;
    }
}

/* ========================================
   メールアドレス編集画面（カード形式）
   ======================================== */

/* アドレスカードコンテナ */
.address-cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 0;
}

.address-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
    position: relative;
}

.address-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.email-address {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.active {
    background-color: #28a745;
}

.status-indicator.inactive {
    background-color: #dc3545;
}

.card-body {
    margin-bottom: 12px;
}

.display-name {
    font-size: 14px;
    color: #007cba;
    font-weight: 500;
    margin-bottom: 4px;
}

.organization-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.notification-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.notification-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: white;
    text-align: center;
}

.badge-start {
    background-color: #28a745;
}

.badge-end {
    background-color: #dc3545;
}

.badge-change {
    background-color: #ffc107;
    color: #212529;
}

.card-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-size: 16px;
}

.action-btn:hover {
    background-color: #f0f0f0;
}

.edit-btn:hover {
    background-color: #fff3cd;
}

.delete-btn:hover {
    background-color: #f8d7da;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .address-cards-container {
        padding: 10px 0;
        gap: 12px;
    }
    
    .address-card {
        padding: 12px;
    }
    
    .card-actions {
        position: static;
        margin-top: 12px;
        justify-content: flex-end;
    }
    
    .email-address {
        font-size: 14px;
        margin-right: 40px;
    }
}

/* コンテンツセクションのレスポンシブ対応 */
@media (max-width: 768px) {
    .content-section {
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .content-section {
        padding-top: 0;
    }

    .mesh-status {
        font-size: 0.8rem;
    }
}

/* ========================================
   運用種別選択
   ======================================== */

/* 運用種別セクション */
.operation-type-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0 15px 0 0;
    order: -1;
    min-width: 120px;
}

.operation-type-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
}

.operation-type-select {
    padding: 6px 10px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.operation-type-select:hover {
    border-color: #007bff;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2);
}

.operation-type-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.operation-type-select option {
    padding: 8px;
    font-weight: 500;
}

/* メッシュツールバーのレイアウト調整 */
.mesh-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mesh-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .mesh-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .operation-type-section {
        justify-content: center;
        margin: 10px 0;
    }
    
    .mesh-buttons {
        justify-content: center;
    }
}

/* ========================================
   運用種別の配置調整
   ======================================== */

/* ========================================
   メッシュボタン配置
   ======================================== */

/* メッシュボタンを右端に配置 */
.mesh-buttons {
    margin-left: auto;
    display: flex;
    align-items: flex-end;
    min-height: 60px;
    padding-bottom: 0.5rem;
    box-sizing: border-box;
}

.mesh-status {
    flex: 1;
    text-align: center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.25rem;
}

/* ========================================
   運用種別セクションの2段レイアウト
   ======================================== */

/* 運用種別セクションの2段レイアウト強化 */
.operation-type-section {
    flex-shrink: 0;
    margin-right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
}

/* レスポンシブ対応の調整 */
@media (max-width: 768px) {
    .mesh-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .operation-type-section {
        order: 0;
        justify-content: flex-start;
        margin: 0;
    }
    
    .mesh-status {
        text-align: center;
        order: 1;
    }
    
    .mesh-buttons {
        order: 2;
        margin-left: 0;
        justify-content: center;
    }
}

/* ========================================
   提供期間セクション
   ======================================== */

/* 提供期間セクションのレイアウト */
.provision-period-section {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex: 1;
    margin: 0 1rem;
}

.datetime-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 180px;
}

.datetime-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
}

.datetime-input {
    padding: 6px 10px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    font-size: 0.85rem;
    background-color: #ffffff;
    transition: all 0.3s ease;
    min-width: 160px;
}

.datetime-input:hover {
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.datetime-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.required {
    color: #dc3545;
    font-weight: bold;
    margin-left: 2px;
}

/* メッシュツールバーのレイアウト調整 */
.mesh-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* レスポンシブ対応の調整 */
@media (max-width: 1200px) {
    .provision-period-section {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .datetime-field {
        min-width: 140px;
    }
    
    .datetime-input {
        min-width: 120px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .mesh-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .operation-type-section {
        order: 0;
        justify-content: flex-start;
        margin: 0;
    }
    
    .provision-period-section {
        order: 1;
        flex-direction: column;
        gap: 0.75rem;
        margin: 0;
    }
    
    .mesh-status {
        text-align: center;
        order: 2;
    }
    
    .mesh-buttons {
        order: 3;
        margin-left: 0;
        justify-content: center;
    }
    
    .datetime-field {
        min-width: auto;
        width: 100%;
    }
    
    .datetime-input {
        min-width: auto;
        width: 100%;
        font-size: 16px; /* iOS zoom prevention */
    }
}

/* ========================================
   メッシュステータス表示
   ======================================== */

/* メッシュステータスの位置調整 - 他の入力フィールドと揃える */
.mesh-status {
    height: auto;
    min-height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.5rem;
    box-sizing: border-box;
}

/* ツールバー全体の高さ統一 */
.mesh-toolbar {
    align-items: flex-start;
}

.mesh-toolbar > * {
    align-self: flex-start;
}

.mesh-status {
    align-self: stretch;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

/* ボタン群の位置調整 - 他の要素と下端を揃える */
.mesh-buttons {
    align-self: stretch;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 1rem;
    min-height: 60px;
    padding-bottom: 0.5rem;
    box-sizing: border-box;
}

/* ボタンのサイズ調整 - 提供メールアドレス編集画面と統一 */
.mesh-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
    white-space: nowrap;
    font-weight: 500;
}

/* レスポンシブ対応でのボタン調整 */
@media (max-width: 768px) {
    .mesh-buttons {
        order: 3;
        margin-left: 0;
        justify-content: center;
        align-items: center;
        min-height: auto;
        padding-bottom: 0;
    }
}

/* ========================================
   機能関連図の凡例
   ======================================== */

/* 機能関連図のヘッダー */
.diagram-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.diagram-header h3 {
    margin: 0;
    flex: 1;
}

.function-legend {
    display: inline-flex;
    justify-content: center;
    gap: 1rem;
    margin: 0;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-radius: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    width: fit-content;
    flex-shrink: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
}

.legend-indicator {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
    border: 2px solid transparent;
}

.legend-indicator.active {
    background-color: #28a745;
    border-color: #1e7e34;
    box-shadow: 0 0 4px rgba(40, 167, 69, 0.3);
}

.legend-indicator.warning {
    background-color: #ffc107;
    border-color: #e0a800;
    box-shadow: 0 0 4px rgba(255, 193, 7, 0.3);
}

.legend-indicator.inactive {
    background-color: #dc3545;
    border-color: #c82333;
    box-shadow: 0 0 4px rgba(220, 53, 69, 0.3);
}

.legend-text {
    user-select: none;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .diagram-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .function-legend {
        gap: 0.75rem;
        padding: 0.4rem 0.8rem;
        align-self: center;
    }
    
    .legend-item {
        font-size: 0.85rem;
    }
    
    .legend-indicator {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .diagram-header {
        text-align: center;
    }
    
    .diagram-header h3 {
        text-align: center;
        width: 100%;
    }
    
    .function-legend {
        gap: 0.5rem;
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   日時バリデーションエラー
   ======================================== */

/* バリデーションエラー時の入力フィールド */
.validation-error {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.3) !important;
}

.validation-error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 4px;
    margin-bottom: 8px;
    padding: 4px 8px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    display: block;
}

/* 日時入力フィールドのフォーカス時スタイル改善 */
input[type="date"]:focus,
input[type="time"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
    outline: none;
}

/* バリデーションエラー時はフォーカススタイルを上書き */
input[type="date"].validation-error:focus,
input[type="time"].validation-error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.3) !important;
}

/* ========================================
   機能スイッチ（トグルスイッチ）
   ======================================== */

/* スイッチコンテナ */
.function-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: auto;
    flex-shrink: 0;
}

.function-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.function-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.function-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.function-switch input:checked + .slider {
    background-color: #4CAF50;
}

.function-switch input:checked + .slider:before {
    transform: translateX(26px);
}

.function-switch input:disabled + .slider {
    background-color: #ddd;
    cursor: not-allowed;
}

.function-switch input:disabled + .slider:before {
    background-color: #f5f5f5;
}

/* ========================================
   機能アイテム
   ======================================== */

/* 機能アイテムのレイアウト調整 */
.function-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin: 4px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.function-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.function-item .function-name {
    flex: 1;
    margin-left: 8px;
    font-size: 0.9rem;
}

.function-status-indicator {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background-color: #dc3545;
    flex-shrink: 0;
}

.function-status-indicator.active {
    background-color: #28a745;
}

.function-status-indicator.warning {
    background-color: #ffc107;
}

.function-status-indicator.inactive {
    background-color: #dc3545;
}

/* ========================================
   ログモーダル
   ======================================== */

/* ログモーダルオーバーレイ */
.log-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
    overflow: auto;
}

.log-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: calc(100vh - 40px);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: auto;
    position: relative;
}

.log-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.log-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.4rem;
}

.log-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.log-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.log-modal-info {
    padding: 16px 24px;
    background: #f1f3f4;
    border-bottom: 1px solid #e0e0e0;
}

.log-modal-info p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: #555;
}

.log-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.log-entries {
    padding: 16px 0;
}

.log-entry {
    display: grid;
    grid-template-columns: 160px 80px 1fr;
    gap: 12px;
    padding: 12px 24px;
    border-bottom: 1px solid #f0f0f0;
    align-items: start;
}

.log-entry:hover {
    background: #f8f9fa;
}

.log-entry.no-logs {
    display: block;
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 24px;
}

.log-timestamp {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
}

.log-level {
    font-weight: bold;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
}

.log-level-info {
    background: #e3f2fd;
    color: #1976d2;
}

.log-level-warning {
    background: #fff3e0;
    color: #f57c00;
}

.log-level-error {
    background: #ffebee;
    color: #d32f2f;
}

.log-level-critical {
    background: #fce4ec;
    color: #c2185b;
    font-weight: bold;
}

.log-message {
    font-size: 0.9rem;
    color: #333;
    word-break: break-word;
    line-height: 1.4;
}

.log-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    text-align: right;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .log-modal {
        padding: 10px;
    }
    
    .log-modal-content {
        width: 100%;
        max-height: calc(100vh - 20px);
        min-height: 300px;
    }
    
    .log-modal-header {
        padding: 16px 20px;
    }
    
    .log-modal-header h3 {
        font-size: 1.2rem;
    }
    
    .log-modal-info {
        padding: 12px 20px;
    }
    
    .log-entry {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 20px;
    }
    
    .log-timestamp {
        font-size: 0.8rem;
    }
    
    .log-level {
        justify-self: start;
        width: fit-content;
    }
    
    .log-modal-footer {
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .log-modal {
        padding: 5px;
    }
    
    .log-modal-content {
        border-radius: 8px;
        max-height: calc(100vh - 10px);
    }
    
    .log-modal-header {
        padding: 12px 16px;
    }
    
    .log-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .log-entry {
        padding: 10px 16px;
    }
}