/* =========================================
   全体のリセットと基本レイアウト
   ========================================= */
body, html { margin: 0; padding: 0; height: 100%; font-family: "游ゴシックMedium", "Noto Sans JP", sans-serif; background-color: #F4F6F8; color: #333; }
.app-container { display: flex; height: 100vh; overflow: hidden; }
.hidden { display: none !important; }

/* =========================================
   🌟 左側：サイドメニュー
   ========================================= */
.sidebar { width: 240px; background-color: #3B597B; color: white; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-logo { background-color: #0A3260; padding: 20px; font-size: 20px; font-weight: bold; letter-spacing: 1px; display: flex; align-items: center; justify-content: center; height: 30px; }
.sidebar-nav { margin-top: 15px; flex-grow: 1; }
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { padding: 15px 20px; margin: 5px 15px; cursor: pointer; display: flex; align-items: center; border-radius: 8px; transition: 0.2s; font-weight: bold; font-size: 15px; }
.sidebar-nav li:hover { background-color: rgba(255,255,255,0.1); }
.sidebar-nav li.active { background-color: #FA8A76; color: white; box-shadow: 0 4px 10px rgba(250, 138, 118, 0.3); }
.nav-icon { margin-right: 12px; font-size: 18px; width: 24px; text-align: center; }

/* =========================================
   🌟 右側：メインエリアとヘッダー
   ========================================= */
.main-area { flex-grow: 1; display: flex; flex-direction: column; overflow-y: auto; background-color: #F0F2F5; }
.main-header { background-color: white; padding: 0 30px; height: 70px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); z-index: 10; }
.company-name { font-size: 18px; font-weight: bold; color: #1E2D3D; }

/* ⚙️ 歯車アイコンとドロップダウン */
.header-actions { position: relative; display: inline-block; padding: 20px 0; }
.settings-icon { font-size: 24px; cursor: pointer; color: #555; transition: transform 0.3s; }
.header-actions:hover .settings-icon { transform: rotate(45deg); }
.dropdown-content { display: none; position: absolute; right: 0; top: 60px; background-color: white; min-width: 180px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 100; border-radius: 8px; overflow: hidden; border: 1px solid #E4E7EB; }
.dropdown-content a { color: #333; padding: 14px 20px; text-decoration: none; display: block; font-size: 14px; font-weight: bold; transition: background 0.2s; }
.dropdown-content a:hover { background-color: #F4F6F8; color: #FA8A76; }
.header-actions:hover .dropdown-content { display: block; }

/* =========================================
   🌟 コンテンツ領域（カードデザイン）
   ========================================= */
.content { padding: 40px; }
.card { background-color: white; border-radius: 8px; padding: 40px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); max-width: 800px; margin: 0 auto; }
.page-title { border-left: 6px solid #3B597B; padding-left: 15px; margin-top: 0; color: #1E2D3D; font-size: 24px; margin-bottom: 30px; letter-spacing: 1px; }

/* 入力フォームのグレー枠 */
.form-box { background-color: #F9FAFB; border: 1px solid #E4E7EB; border-radius: 8px; padding: 30px; margin-bottom: 40px; }
.form-label { font-weight: bold; color: #555; display: flex; align-items: center; margin-bottom: 15px; font-size: 15px; }
.required-badge { background-color: #E74C3C; color: white; font-size: 12px; padding: 4px 8px; border-radius: 4px; margin-right: 12px; letter-spacing: 1px; }

/* プルダウン */
.custom-select { width: 100%; padding: 16px; border-radius: 6px; border: 1px solid #CFD8DC; font-size: 16px; outline: none; background-color: white; cursor: pointer; color: #333; transition: border 0.3s; }
.custom-select:focus { border-color: #FA8A76; }

/* 次へボタン */
.btn-wrapper { text-align: center; }
.btn-next { background-color: #FA8A76; color: white; border: none; padding: 16px 80px; border-radius: 6px; font-size: 16px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(250, 138, 118, 0.3); letter-spacing: 2px; }
.btn-next:hover { background-color: #E57361; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(250, 138, 118, 0.4); }

/* =========================================
   プレビュー画面用のスタイル
   ========================================= */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px; }
.design-card { border: 1px solid #CFD8DC; border-radius: 12px; padding: 20px; text-align: center; cursor: pointer; transition: 0.3s; }
.design-card:hover { border-color: #3B597B; transform: translateY(-5px); box-shadow: 0 8px 16px rgba(59, 89, 123, 0.15); }
.preview-board { border: 1px solid #CFD8DC; border-radius: 8px; padding: 40px; margin-top: 20px; }
.editable-area { border: 2px dashed transparent; padding: 10px; border-radius: 8px; cursor: pointer; transition: 0.3s; }
.editable-area:hover { border-color: #FA8A76; background-color: #FAFAFA; transform: translateY(-2px); }
.btn-cancel { background-color: #ECEFF1; border: none; padding: 12px 24px; border-radius: 6px; cursor: pointer; font-weight: bold; }
/* モーダル用 */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(30, 45, 61, 0.8); z-index: 1000; }
.modal-content { background-color: white; max-width: 500px; margin: 10% auto; padding: 30px; border-radius: 12px; }
input[type="text"], input[type="file"] { width: 90%; padding: 12px; margin-top: 10px; margin-bottom: 20px; border: 1px solid #CFD8DC; border-radius: 6px; }

/* デザインサンプルのサムネイル画像 */
.design-thumb {
    width: 100%;
    height: 150px;
    object-fit: contain; /* 画像の全体が見えるように収める */
    background-color: #F9FAFB;
    border: 1px solid #E4E7EB;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
/* =========================================
   デザイン選択画面（2x2 画像グリッド）
   ========================================= */
.design-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2列に分割 */
    gap: 30px;
    margin-top: 20px;
}

.design-image-card {
    border: 2px solid #E4E7EB;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
}

.design-image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    border-color: #3B597B;
}

.design-image-card img {
    width: 100%;
    height: auto;
    display: block;
}
/* =========================================
   完全再現：デザイン1 (sample3.pngベース)
   ========================================= */
.zumen-d1 {
    background-color: white;
    width: 100%;
    max-width: 1100px;
    aspect-ratio: 297 / 210; /* 🌟 A4横サイズの比率に完全に固定！絶対に潰れません */
    margin: 0 auto;
    font-family: "游明朝", "Yu Mincho", serif;
    color: #333;
    border: 1px solid #CFD8DC;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

/* 編集用の画像・間取り図ブロック（肌色） */
.z-box {
    background-color: #FDE8D7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    box-sizing: border-box;
}
.z-box:hover {
    background-color: #F8D8BC;
    outline: 2px dashed #FA8A76;
}

/* ヘッダーエリア */
.zumen-d1-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 4px solid #888; /* 実物のような太い線 */
    height: 18%; /* 高さをパーセントで固定 */
    box-sizing: border-box;
}

/* メインエリア（左右分割） */
.zumen-d1-body {
    display: flex;
    height: 60%; /* 高さをパーセントで固定 */
    border-bottom: 1px solid #888;
    box-sizing: border-box;
}

.zumen-d1-left {
    width: 68%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    box-sizing: border-box;
}

.zumen-d1-right {
    width: 32%;
    border-left: 4px solid #888; /* 実物のような太い線 */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* 設備・フッターエリア */
.zumen-d1-equipment {
    height: 8%;
    border-bottom: 4px solid #1E2D3D;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.zumen-d1-footer {
    height: 14%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    font-family: "游ゴシックMedium", "Noto Sans JP", sans-serif;
    align-items: center;
    box-sizing: border-box;
}
/* =========================================
   APB（パンフレット生成）専用のスタイル
   ========================================= */
.apb-section-title {
    font-size: 18px;
    color: #1E2D3D;
    border-bottom: 2px solid #D3B582;
    padding-bottom: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: bold;
}

/* アップロード枠のスタイル */
.file-upload-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.file-upload-box {
    flex: 1;
    background-color: #FFFFFF;
    border: 2px dashed #D3B582;
    border-radius: 10px;
    padding: 20px;
    transition: 0.3s;
}
.file-upload-box:hover {
    border-color: #00C2A0;
    background-color: #FAFAFA;
}
.file-upload-box label {
    display: block;
    font-weight: bold;
    color: #1E2D3D;
    margin-bottom: 10px;
}
.file-upload-box input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #CFD8DC;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
}

/* ラジオボタン・チェックボックスのスタイル */
.radio-group, .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.radio-group label, .checkbox-group label {
    cursor: pointer;
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 生成ボタン（ミントグリーン） */
.btn-apb-generate {
    background-color: #00C2A0;
    color: white;
    border: none;
    padding: 16px 60px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 194, 160, 0.2);
    transition: all 0.3s ease;
    letter-spacing: 1px;
}
.btn-apb-generate:hover {
    background-color: #00A88B;
    box-shadow: 0 6px 20px rgba(0, 194, 160, 0.3);
    transform: translateY(-2px);
}
/* 🌟 APB画面用：横幅拡大とファイルアップロードのモダンなデザイン設定 */
.apb-card {
    max-width: 1400px !important; 
    width: 100% !important;
}

.file-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* 🌟 全体をクリック可能にするための設定（破線デザインに変更） */
label.file-upload-card {
    display: block; 
    background-color: #FAFAFA;
    border: 2px dashed #CFD8DC; /* 枠を少し太めの破線に変更 */
    border-radius: 8px;
    padding: 24px 20px;
    transition: all 0.3s ease;
    cursor: pointer; /* 枠全体を指マークに */
}

label.file-upload-card:hover {
    border-color: #00C2A0;
    background-color: #F0FAF8; /* マウスを乗せると薄いミントグリーンに */
}

.file-upload-card .upload-title {
    display: block;
    font-weight: bold;
    color: #1E2D3D;
    margin-bottom: 12px;
    font-size: 15px;
}

/* 🌟 内側の input 枠線と背景を完全に消去し、外枠と一体化 */
.file-upload-card input[type="file"] {
    display: block;
    width: 100%;
    padding: 0;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 14px;
}

/* 「ファイルを選択」ボタン自体のデザインを少し整える */
.file-upload-card input[type="file"]::file-selector-button {
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid #CFD8DC;
    background-color: #FFFFFF;
    color: #1E2D3D;
    cursor: pointer;
    margin-right: 12px;
    transition: all 0.2s;
}
.file-upload-card input[type="file"]::file-selector-button:hover {
    background-color: #F4F6F8;
    border-color: #B0BEC5;
}