/* 
 * Consolidated stylesheet (fixed parser)
 * - Base rules first
 * - Media queries grouped, mobile-first
 */
/* メインスタイル */
@import url('common.css');

/* 基本設定（色変数はcommon.cssへ移行済み） */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Material Icons */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
}

/* アイコンサイズ */
.icon-sm {
    font-size: 1rem;
}

.icon-md {
    font-size: 1.2rem;
}

.icon-lg {
    font-size: 1.5rem;
}

/* アイコン色 */
.icon-primary {
    color: var(--primary-color);
}

.icon-secondary {
    color: var(--secondary-color);
}

.icon-white {
    color: white;
}

.icon-inherit {
    color: inherit;
}

/* ヘッダー */
.header {
    background: linear-gradient(to right, #B6CE29, #61D956);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.9rem;
}


.header-left .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

/* Modal z-index fix */
.modal {
    z-index: 2000 !important;
}

.modal-backdrop {
    z-index: 1050;
    /* Default bootstrap value, just ensuring modal is higher */
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.logo-link:hover {
    text-decoration: none;
    color: inherit;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ユーザー情報 */
.user-info-desktop {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

/* ナビゲーションボタン */
.desktop-nav-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.desktop-nav-btn,
.desktop-logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    text-decoration: none;
}

.desktop-nav-btn:focus,
.desktop-logout-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.desktop-nav-btn:hover,
.desktop-logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: white;
}

.desktop-nav-btn .material-icons,
.desktop-logout-btn .material-icons {
    color: white;
    font-size: 1.2rem;
}

.notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background-color: var(--danger-color);
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 0.1rem 0.3rem;
    border-radius: 50%;
    min-width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ハンバーガーメニュー */
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-menu:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.hamburger-menu:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(0.4rem, 0.4rem);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(0.4rem, -0.4rem);
}

/* モバイルメニュー */
.mobile-menu {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    background-color: white;
    width: 100%;
    max-width: 300px;
    height: 100%;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

/* モバイル用ユーザー情報 */
.user-info-mobile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* モバイルナビゲーション */
.mobile-nav {
    padding: 1rem 0;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #495057;
    text-decoration: none;
    transition: background-color 0.2s ease;
    position: relative;
}

.mobile-nav-item:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.mobile-nav-item .material-icons {
    color: #6c757d;
    font-size: 1.5rem;
}

.mobile-nav-item:hover .material-icons {
    color: var(--primary-color);
}

.mobile-nav-item .nav-text {
    font-size: 1rem;
    font-weight: 500;
}

.mobile-nav-item .notification-badge {
    background-color: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.4rem;
    border-radius: 50%;
    min-width: 1.2rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    position: relative;
    top: auto;
    right: auto;
}

.mobile-nav-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #e9ecef;
}

.mobile-nav-item.logout-link,
.logout-link {
    color: var(--danger-color) !important;
}

.mobile-nav-item.logout-link:hover,
.logout-link:hover {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

.mobile-nav-item.logout-link .material-icons,
.logout-link .material-icons {
    color: var(--danger-color) !important;
}

.logout-link:hover .material-icons {
    color: #721c24 !important;
}

/* ユーザー情報 */
.user-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.user-plan {
    font-size: 0.75rem;
    opacity: 0.8;
}

.user-points {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.user-points:hover {
    opacity: 0.8;
}

.user-points .material-icons {
    font-size: 1.1rem;
    color: inherit;
}

.points-value {
    font-size: 0.9rem;
    font-weight: bold;
}

/* レイアウト（共通） */
.layout {
    display: flex;
    min-height: 100vh;
    padding-top: 4rem;
    /* ヘッダーの高さ分 */
}

/* サイドバー（共通） */
.sidebar {
    width: 250px;
    background-color: #f8f9fa;
    border-right: 1px solid #e9ecef;
    position: fixed;
    top: 4rem;
    left: 0;
    height: calc(100vh - 4rem);
    overflow-y: auto;
    z-index: 10;
}

.sidebar-content {
    padding: 1.5rem 1rem;
}

.sidebar-comment {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    text-align: center;
    font-style: italic;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-nav .nav-item {
    margin: 0;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-nav .nav-item:last-child {
    border-bottom: none;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    width: 100%;
    text-decoration: none;
    transition: all 0.2s;
    color: #495057;
    background-color: transparent;
    border: none;
    box-sizing: border-box;
}

.sidebar-nav .nav-link:hover {
    background-color: transparent;
    color: #495057;
}

.sidebar .sidebar-nav .nav-list .nav-item.active .nav-link {
    background-color: #e3f2fd !important;
    color: #1976d2 !important;
    font-weight: 600 !important;
    border-left: 4px solid #1976d2 !important;
    padding-left: 12px !important;
}

.sidebar .sidebar-nav .nav-list .nav-item.active .nav-link:hover {
    background-color: #bbdefb !important;
    color: #1565c0 !important;
}

.sidebar .sidebar-nav .nav-list .nav-item.active .nav-link .nav-icon {
    color: #1976d2 !important;
}





.sidebar-nav .nav-item.highlight-pink .nav-link {
    background-color: transparent;
    color: #495057;
    font-weight: 600;
}

.sidebar-nav .nav-item.highlight-pink .nav-link:hover {
    background-color: transparent;
    color: #495057;
}

.sidebar-nav .nav-link .nav-icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav .nav-link .nav-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* アプリケーションコンテナ */
.app-container {
    display: flex;
    min-height: calc(100vh - 4rem);
}

/* メインコンテンツエリア（共通） */
.main {
    flex: 1;
    margin-left: 250px;
    background-color: white;
    min-height: calc(100vh - 4rem);
    position: relative;
    z-index: 10;
}

.main-content {
    padding: 2rem;
}

/* ボトムナビゲーション（モバイル版） */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f5f5dc;
    border-top: 1px solid #e9ecef;
    padding: 0.5rem 0;
    z-index: 1000;
}

/* デスクトップ表示時はボトムナビを非表示 */


.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0.375rem;
    min-width: 3rem;
    text-decoration: none;
    color: inherit;
}

.bottom-nav-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
}

.bottom-nav-item.active {
    background-color: rgba(183, 207, 41, 0.2);
    text-decoration: none;
    color: inherit;
}

.bottom-nav-item:focus {
    text-decoration: none;
    color: inherit;
    outline: 2px solid #b7cf29;
    outline-offset: 2px;
}

.bottom-nav-item .nav-icon {
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav-item .nav-text {
    font-size: 0.7rem;
    font-weight: 500;
    color: #495057;
}

.bottom-nav-item.active .nav-text {
    color: var(--primary-color);
    font-weight: 600;
}

/* メインコンテンツセクション */
.content-section {
    margin-top: 4rem;
    margin-bottom: 2rem;
    background-color: transparent;
    /* 一覧は外枠カード不要のため */
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.section-header {
    background: linear-gradient(to right, #B6CE29, #61D956);
    color: inherit;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

/* 検索・絞り込み（コンパクト＆下線のみ） */
.product-filters {
    font-size: .9rem;
}

.product-filters .filters-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    /* 初期状態で回り込みを禁止 */
    justify-content: flex-end;
    min-width: 0;
}

.product-filters .form-control {
    background: transparent;
    border: none;
    border-bottom: 1px solid #ced4da;
    border-radius: 0;
    padding: .25rem .25rem;
    height: auto;
    box-shadow: none;
}

.product-filters .form-control:focus {
    border-bottom: 2px solid var(--primary-color);
    outline: none;
    box-shadow: none;
}

.product-filters .btn {
    padding: .35rem .75rem;
    font-size: .85rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.product-filters .btn-outline-secondary {
    border: 1px solid #ced4da;
}

/* ボタン内アイコンのセンタリング */
.btn .material-icons {
    line-height: 1;
    vertical-align: middle;
    font-size: 1.1rem;
}

/* フィルター要素にアイコンを付与 */
.product-filters .filter-control {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-shrink: 0;
    min-width: fit-content;
}

/* 並び替えセレクトの安定した幅 */
.product-filters .filter-control:not(.search-field) {
    flex: 0 0 auto;
    width: 140px;
    /* 幅を少し縮小して折返しを防止 */
}

/* ボタンの安定した幅 */
.product-filters .btn {
    flex: 0 0 auto;
    min-width: 80px;
    white-space: nowrap;
}

.product-filters .filter-icon {
    font-size: 1rem;
    color: #6c757d;
}

/* 検索フィールド専用スタイル */


.product-filters .filter-control.search-field input {
    width: 100%;
}

/* 見出しとトグルボタンのコンテナ */
.section-title-with-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* モバイル用検索トグルボタン */
.mobile-search-toggle {
    display: none;
    background: #b7cf29;
    color: white;
    border: none;
    padding: 0.4rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    min-width: 40px;
    height: 40px;
}

.mobile-search-toggle:hover {
    background: #9bb023;
}

.mobile-search-toggle .material-icons {
    font-size: 1.2rem;
}

/* 検索フォームコンテナ */
.search-form-container {
    display: block;
    /* ベースは表示 */
}

.search-form-container .product-filters {
    display: inline-block;
}

/* タブレット表示時の検索エリア */
@media (min-width: 768px) and (max-width: 1023px) {
    .search-form-container {
        display: block !important;
    }

    .mobile-search-toggle {
        display: none;
    }

    .filters-row {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        /* ギャップをさらに縮小 */
        justify-content: flex-end;
        flex-wrap: nowrap;
        /* 回り込みを防ぐ */
        width: 100%;
        /* 100%幅を確保 */
        min-width: 0;
        /* フレックスアイテムの縮小を許可 */
        overflow: hidden;
        /* はみ出しを防ぐ */
    }

    /* より高い詳細度でwrapを確実に無効化 */
    .product-filters .filters-row {
        flex-wrap: nowrap;
        width: 100%;
    }


    .filter-control {
        display: flex;
        align-items: center;
        gap: 0.125rem;
        /* ギャップをさらに縮小 */
        flex-shrink: 0;
        /* 縮小を防ぐ */
        white-space: nowrap;
        /* テキストの折り返しを防ぐ */
        min-width: fit-content;
        /* 内容に応じた最小幅 */
    }

    .search-field {
        min-width: 120px;
        /* 最小幅をさらに縮小 */
        max-width: 300px;
        /* 最大幅を調整 */
        flex-shrink: 1;
        /* 必要に応じて縮小を許可 */
        flex-grow: 1;
        /* 利用可能なスペースを活用 */
    }

    .search-field .form-control {
        width: 100%;
        min-width: 0;
        /* 入力フィールドの縮小を許可 */
        font-size: 0.875rem;
        /* フォントサイズを縮小 */
        padding: 0.375rem 0.5rem;
        /* パディングを縮小 */
    }

    /* ボタンの最小幅を設定 */
    .filters-row .btn {
        flex-shrink: 0;
        white-space: nowrap;
        min-width: 64px;
        /* 最低幅を固定して配置の安定性を確保 */
        font-size: 0.875rem;
        /* フォントサイズを縮小 */
        padding: 0.375rem 0.75rem;
        /* パディングを縮小 */
    }

    /* セレクトボックスのスタイル調整 */
    .filter-control select {
        font-size: 0.875rem;
        padding: 0.375rem 0.5rem;
        min-width: 80px;
        /* セレクトボックスの最小幅をさらに縮小 */
        max-width: 120px;
        /* 最大幅を縮小 */
    }
}


/* タブレット表示時の改善 */


/* レスポンシブ対応 */





.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.section-name {
    font-size: 1rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 修理依頼ボタンのカスタムスタイル */
.btn-repair-request {
    background-color: #F564BC;
    border-color: #F564BC;
    color: white;
}

.btn-repair-request:hover {
    background-color: #e04fa8;
    border-color: #e04fa8;
    color: white;
}

.view-all-link {
    color: #b7cf29;
    text-decoration: none;
    font-size: 0.8rem;
    opacity: 0.9;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.view-all-link:hover {
    opacity: 1;
    color: #9bb023;
    text-decoration: none;
}

.view-all-link .material-icons {
    font-size: 1rem;
}

.section-content {
    padding: 0;
}

.section-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.tutorial-note {
    color: #6c757d;
    font-size: 0.8rem;
    margin: 0.5rem 0 0 0;
    font-style: italic;
}

/* フッター */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.footer-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.footer-section h5 {
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    background-color: #e9ecef;
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

.footer-bottom p {
    color: #6c757d;
    font-size: 0.8rem;
    margin: 0;
}

/* アカウント作成完了画面 */
.completion-step {
    text-align: center;
}

.completion-step .success-icon {
    margin-bottom: 1.5rem;
    text-align: center;
}

.completion-step .success-icon i {
    font-size: 4rem;
    color: #6c757d;
}

/* .completion-options { }  未使用候補（コメントアウトで温存）*/
/* .completion-options .btn { } */
/* .completion-options .btn:hover { } */
/* .completion-options .btn i { } */

/* レスポンシブ対応 */


/* 開発用認証コード表示 */
.verification-code-display {
    margin-bottom: 1.5rem;
}

.verification-code-display h6 {
    margin-bottom: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.verification-code {
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    background-color: white;
    border: 2px solid #17a2b8;
    border-radius: 0.375rem;
    text-align: center;
}

.verification-code-text {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #17a2b8;
    letter-spacing: 0.2em;
    display: block;
}

/* レスポンシブデザイン */
/* デスクトップ版 (1024px以上) */


/* タブレット版 (768px - 1023px) */


/* モバイル版 (767px以下) */


/* ナビゲーションバー（未使用のため削除候補） */
/* .navbar-brand { }
.navbar-text { }
.navbar .btn-outline-light { }
.navbar .btn-outline-light:hover { } */



.form-group {
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    transition: all 0.2s ease;
    letter-spacing: 0.025em;
}

/* Bootstrap badge styles for form labels */

.optional-badge::before {
    content: "○";
    margin-right: 0.25rem;
    font-size: 0.7rem;
}

/* フォーカス時のラベル効果を無効化 */
.form-group:focus-within .form-label {
    color: inherit;
    transform: none;
}

/* ラベルのホバー効果 */
.form-label:hover {
    color: #34495e;
    transform: translateY(-1px);
}



.btn-primary {}

.btn-primary:hover {}

.btn-primary:disabled,
.btn-primary.disabled {}

.btn-secondary {}

.btn-secondary:hover {}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}





/* ローディングのスタイル */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* レスポンシブデザイン */
/* 共通: フォームをCSS Gridで2カラム化（md以上） */
.responsive-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .responsive-form {
        grid-template-columns: 1fr 1fr;
    }

    .responsive-form .full {
        grid-column: 1 / -1;
    }
}

/* ラジオの横並び崩れ防止（デスクトップ） */
.form-check-group {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
}

.form-check-group .form-check {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    width: auto !important;
    float: none !important;
    clear: none !important;
}

/* Bootstrapのform-checkを完全に上書き */
.form-check-group .form-check:not(:last-child) {
    margin-right: 1rem !important;
    margin-bottom: 0 !important;
}

.form-check-group .form-check:last-child {
    margin-bottom: 0 !important;
}

/* Bootstrap form-check-inline のサポート */
.form-check-inline {
    display: inline-block !important;
    margin-right: 1rem !important;
    margin-bottom: 0 !important;
}

.form-check-inline .form-check-input {
    margin-right: 0.25rem !important;
    margin-top: 0 !important;
}

.form-check-inline .form-check-label {
    margin-bottom: 0 !important;
}


/* 編集画面の更新/削除ボタンを横並びに */
.product-form .form-actions {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.product-form .form-actions .btn {
    flex: 1;
    min-width: 0;
}

/* OTP入力フィールドのスタイル */
.otp-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.5rem;
}

/* パスワード強度インジケーター */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-weak {
    background-color: var(--danger-color);
}

.strength-medium {
    background-color: var(--warning-color);
}

.strength-strong {
    background-color: var(--success-color);
}



/* 拡張ユーザー登録フォームのスタイル */
.form-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

@media (max-width: 767.98px) {
    .form-actions {
        flex-direction: column;
        /* モバイルは縦積み */
    }

    .form-actions .btn {
        width: 100%;
    }
}





.form-actions .btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.form-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.form-actions .btn:active {
    transform: translateY(0);
}

.form-check {
    margin: 1rem 0;
}

.form-check-input {
    margin-top: 0.25rem;
}

.form-check-label {
    font-size: 0.9rem;
    line-height: 1.4;
}

.form-check-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* 名前フィールドのレイアウト */
.row .col-6 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.row .col-6:first-child {
    padding-left: 0;
}

.row .col-6:last-child {
    padding-right: 0;
}

/* 任意フィールドのラベル */
.text-muted {
    font-size: 0.8rem;
    font-weight: normal;
}

/* 確認ページのスタイル */
.confirmation-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.confirmation-section {
    margin-bottom: 1.5rem;
}

.confirmation-section:last-child {
    margin-bottom: 0;
}

.confirmation-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.confirmation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.confirmation-item:last-child {
    border-bottom: none;
}

.confirmation-label {
    font-weight: 500;
    color: var(--secondary-color);
    min-width: 120px;
}

.confirmation-value {
    font-weight: 400;
    color: var(--dark-color);
    text-align: right;
    flex: 1;
    margin-left: 1rem;
}

.confirmation-value.text-success {
    color: var(--success-color);
    font-weight: 500;
}

/* レスポンシブ対応 */


/* 利用規約モーダルのカスタムスタイル */

.terms-content {
    line-height: 1.6;
    color: var(--dark-color);
}

.terms-content h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 1.5rem 0 0.75rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e9ecef;
}

.terms-content h6:first-child {
    margin-top: 0;
}

.terms-content p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.terms-content ul {
    margin: 0.5rem 0 1rem 1.5rem;
    padding: 0;
}

.terms-content li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.terms-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--primary-color);
    text-align: center;
}

.terms-footer p {
    margin: 0.25rem 0;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* レスポンシブ対応 */


/* サイドメニューのアクティブ状態スタイル */
.sidebar .sidebar-nav .nav-list .nav-item.active .nav-link {
    background-color: #e8f5e8 !important;
    color: #2e7d32 !important;
    font-weight: 600 !important;
    border-left: 4px solid #4caf50 !important;
    padding-left: 12px !important;
}

.sidebar .sidebar-nav .nav-list .nav-item.active .nav-link:hover {
    background-color: #c8e6c9 !important;
    color: #1b5e20 !important;
}

.sidebar .sidebar-nav .nav-list .nav-item.active .nav-link .nav-icon {
    color: #4caf50 !important;
}

/* ファイルアップロード機能のスタイル - Bootstrapのform-controlを使用 */

/* ライトボックススタイル */
.image-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-lightbox.active {
    display: block;
    opacity: 1;
}

.image-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.image-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    margin: 5vh auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-lightbox-content img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.image-lightbox-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.image-lightbox-close:hover {
    background: rgba(255, 255, 255, 1);
}

/* モバイル対応 */


.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.file-icon {
    width: 48px;
    height: 48px;
    background-color: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon i {
    font-size: 24px;
    color: #4caf50;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.file-size {
    color: #666;
    font-size: 0.875rem;
}

.btn-delete-file {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn-delete-file:hover {
    background-color: #f8d7da;
}

.image-preview {
    text-align: center;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.upload-progress {
    text-align: center;
    padding: 1rem;
}

.progress-bar {
    width: 100%;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background-color: #4caf50;
    width: 0%;
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

.upload-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
}

.upload-error i {
    color: #dc3545;
}

/* 既存ファイル表示のスタイル */
.existing-files {
    margin-top: 1rem;
}

.existing-file-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.existing-file-item .file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 編集画面の種類ごとの既存画像は縦積みで、削除ボタンを画像の下に表示 */
.existing-files.by-type .file-info {
    flex-direction: column;
    align-items: center;
}

.existing-files.by-type .file-thumb,
.existing-files.by-type .image-preview {
    width: 100%;
}

.existing-files.by-type .product-thumbnail {
    max-width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
}

.existing-files.by-type .file-actions {
    width: 100%;
    margin-top: 0.75rem;
    display: block;
    text-align: center;
}

.existing-files.by-type .file-actions .btn {
    width: 220px;
}

/* プレビュー表示でも削除を下部ブロックに */

.existing-file-item .file-icon {
    width: 48px;
    height: 48px;
    background-color: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.existing-file-item .file-icon i {
    font-size: 24px;
    color: #4caf50;
}

.existing-file-item .file-details {
    flex: 1;
}

.existing-file-item .file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.existing-file-item .file-type {
    color: #666;
    font-size: 0.875rem;
    text-transform: capitalize;
}

.existing-file-item .file-actions {
    display: flex;
    gap: 0.5rem;
}

.existing-file-item .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* 削除確認モーダルのスタイル */



/* 製品一覧の画像表示スタイル */
/* Bootstrap card customization for products */
.product-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: pointer;
}

/* Bootstrap card-img-top スタイル */
.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: contain;
    /* 初期値はcontain、JavaScriptで動的に変更 */
    border-radius: 0.375rem 0.375rem 0 0;
}

.product-placeholder.card-img-top {
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 0.375rem 0.375rem 0 0;
    color: #6c757d;
}

.product-placeholder.card-img-top i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.product-placeholder.card-img-top span {
    font-size: 0.9rem;
    font-weight: 500;
}

.product-category-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.product-category-info .badge {
    font-size: 0.75rem;
}


.file-preview {
    margin-top: 0.5rem;
}

.file-thumbnail {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: #e9ecef;
    border-radius: 4px;
}

.file-info i {
    color: #6c757d;
}

.clickable-file {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 1rem;
}

.clickable-file:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    transform: scale(1.02);
}


.delete-btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}


.form-section {
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
}

/* アラート自動フェード機能 */
.alert {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.alert.show {
    opacity: 1;
    transform: translateY(0);
}

.alert.fade-out {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Warningカードスタイル（未使用のため保留・削除候補） */
/*
.warning-card { }
.warning-card .card-header { }
.warning-card .card-title { }
.warning-card .card-title i { }
.warning-card .card-body { }
.warning-list { }
.warning-list li { }
.warning-list li:last-child { }
*/

/* ファイルアクション用スタイル */
.file-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 0.5rem auto 0;
    width: 100%;
    max-width: 300px;
    padding: 0.75rem;
}

.file-actions .btn,
.delete-btn {
    flex: 1;
    width: 50%;
    min-width: 0;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}






/* 削除確認モーダルのスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin: 0 0 1rem 0;
    color: #495057;
    line-height: 1.5;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 100px;
    padding: 0.5rem 1rem;
}

/* モバイル表示時のモーダル調整 */


/* 利用規約・プライバシーポリシーページのスタイル */
.terms-container {
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
}

.terms-header {
    padding: 2rem;
    text-align: center;
}

.terms-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    text-align: left;
}

.terms-meta {
    padding: 1rem;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    text-align: right;
}

.terms-meta p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.terms-content {
    padding: 2rem;
}

.terms-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.terms-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.terms-section-title {
    color: #b7cf29;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #b7cf29;
    display: inline-block;
}

.terms-section-content {
    line-height: 1.7;
    color: #495057;
}

.terms-section-content p {
    margin-bottom: 1rem;
}

.terms-list {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.terms-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.terms-footer {
    background: #f8f9fa;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.terms-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* レスポンシブ対応 */


.product-placeholder i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.product-placeholder span {
    font-size: 0.875rem;
}


/* 製品登録フォームのバリデーションスタイル */
.field-error {
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 0.25rem;
    display: none;
}

/* フォーム改善 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* ローディング状態 */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}


/* 製品削除ボタンのスタイル */
.delete-product-btn {
    background-color: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
    transition: all 0.2s ease;
}

.delete-product-btn:hover {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.delete-product-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.delete-product-btn .material-icons {
    font-size: 16px;
    margin-right: 4px;
}

/* ファイル削除・表示ボタンのスタイル */
.delete-file-btn,
.view-btn {
    flex: 1;
    width: 50%;
    min-width: 0;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.delete-file-btn .material-icons,
.view-btn .material-icons {
    font-size: 16px;
    margin-right: 4px;
}

/* カテゴリー情報のスタイル */

.category-L {
    background: #e8f5e8;
    color: #2e7d32;
}

.category-M {
    background: #fff3e0;
    color: #f57c00;
}

.category-S {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* ラジオボタングループのスタイル */
.form-check-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    margin: 0;
}

.form-check-label {
    margin: 0;
    font-weight: normal;
}

/* カテゴリー選択の横並びレイアウト */
.category-selection {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* デスクトップ・タブレット表示での横並び */



/* Progress Indicator */
.progress-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 30px;
    background-color: transparent;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    margin-right: 20px;
    flex: 1;
}

.progress-step:last-child {
    margin-right: 0;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 3px solid #e0e0e0;
}

.progress-step.active .step-circle {
    background-color: #b7cf29;
    color: white;
    border-color: #b7cf29;
}

.progress-step.completed .step-circle {
    background-color: #b7cf29;
    color: white;
    border-color: #b7cf29;
}

.step-label {
    font-size: 1rem;
    color: #666;
    text-align: center;
    max-width: 150px;
    line-height: 1.4;
}

.progress-step.active .step-label {
    color: #b7cf29;
    font-weight: bold;
}

.progress-step.completed .step-label {
    color: #333;
}

.progress-line {
    height: 2px;
    background-color: #e0e0e0;
    flex: 1;
    margin: 0 10px;
    position: relative;
    top: -25px;
}

.progress-step.completed+.progress-line {
    background-color: #b7cf29;
}

/* Terms Content */
.terms-content {
    max-height: 50vh;
    overflow-y: auto;
    padding: 15px;
    border-radius: 8px;
}

.terms-content h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.terms-content p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}

/* Cost Estimate */
.cost-estimate {
    margin-top: 20px;
}

.cost-estimate h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: bold;
}

.cost-explanation {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.cost-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cost-range {
    background-color: #b7cf29;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
}

.cost-range .range-text {
    display: block;
    margin-bottom: 5px;
}

.cost-range .range-amount {
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}



/* 選択されたファイルのプレビュー用スタイル */
.file-selection-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    margin-bottom: 10px;
}

.file-selection-item .file-thumb {
    flex-shrink: 0;
}

.file-selection-item .file-thumb img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.file-selection-item .file-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.file-selection-item .file-icon i {
    font-size: 24px;
    color: #6c757d;
}

.file-selection-item .file-actions {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-selection-item .file-name {
    font-weight: 500;
    color: #495057;
    word-break: break-all;
}

.file-selection-item .file-size {
    font-size: 0.875rem;
    color: #6c757d;
}

.file-selection-item .btn {
    align-self: flex-start;
}

/* === Consolidated Media Queries === */




@media (max-width: 767px) {
    .product-filters {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .filters-row {
        gap: 0.5rem !important;
    }

    .filter-control {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    .filter-icon {
        font-size: 0.9rem !important;
        flex-shrink: 0;
    }

    .filter-control select,
    .filter-control input {
        flex: 1;
    }

    /* ---- merged ---- */

    .header {
        padding: 0.5rem 1rem;
    }

    .header-left .logo {
        font-size: 1.2rem;
    }

    .user-info-desktop {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .desktop-nav-buttons {
        display: none;
    }

    .desktop-logout-btn {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .sidebar {
        display: none;
    }

    .main {
        margin-left: 0;
    }

    .main-content {
        padding: 1rem;
    }

    .bottom-nav {
        display: flex;
    }

    .footer {
        margin-top: 2rem;
    }

    .footer-content {
        padding: 1.5rem 1rem;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    .footer-section h4 {
        font-size: 1.1rem;
    }

    .footer-section h5 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .footer-section p {
        font-size: 0.8rem;
    }

    .footer-section ul li a {
        font-size: 0.8rem;
    }

    .footer-bottom {
        padding: 0.75rem;
    }

    .footer-bottom p {
        font-size: 0.7rem;
    }

    .content-section {
        margin-bottom: 1rem;
    }

    .section-header {
        padding: 0.5rem 0.75rem;
    }

    .section-content {
        padding: 0.75rem;
    }

    /* ---- merged ---- */


    /* ---- merged ---- */

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .modal-footer .btn:last-child {
        margin-bottom: 0;
    }
}


@media (max-width: 768px) {
    .completion-step .success-icon i {
        font-size: 3.5rem;
    }

    .completion-options .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }

    /* ---- merged ---- */

    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 2rem;
        padding: 2rem 1rem;
        max-width: 100%;
    }

    .form-actions .btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        min-height: 52px;
    }

    .row .col-6 {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .confirmation-container {
        padding: 1rem;
    }

    .confirmation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .confirmation-label {
        min-width: auto;
        font-size: 0.9rem;
    }

    .confirmation-value {
        text-align: left;
        margin-left: 0;
        font-size: 0.95rem;
    }

    /* ---- merged ---- */

    .terms-content h6 {
        font-size: 0.95rem;
    }

    .terms-content p,
    .terms-content li {
        font-size: 0.85rem;
    }

    /* ---- merged ---- */

    .image-lightbox-content {
        padding: 1rem;
    }

    .image-lightbox-content img {
        max-width: 95%;
        max-height: 95%;
    }

    .image-lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.2rem;
    }

    /* ---- merged ---- */

    .terms-container {
        margin: 0 1rem;
        border-radius: 0;
    }

    .terms-header {
        padding: 1.5rem 1rem;
    }

    .terms-content {
        padding: 1.5rem 1rem;
    }

    .terms-footer {
        padding: 1.5rem 1rem;
    }

    .terms-actions {
        flex-direction: column;
        align-items: center;
    }

    .terms-actions .btn {
        width: 100%;
        max-width: 300px;
    }

    /* ---- merged ---- */

    .cost-estimate {
        padding: 15px;
    }

    .cost-info {
        gap: 10px;
    }

    .cost-description {
        padding: 12px;
        font-size: 0.9rem;
    }

    .cost-range {
        padding: 12px;
        font-size: 1rem;
    }

    .cost-range .range-amount {
        font-size: 1.2rem;
    }

    /* ---- merged ---- */

    .file-selection-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .file-selection-item .file-actions {
        width: 100%;
    }
}


@media (min-width: 768px) and (max-width: 1023px) {
    .filters-row {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .product-filters .filter-control.search-field {
        width: 200px;
        max-width: 250px;
        flex: 0 0 auto;
    }

    .product-filters .filter-control:not(.search-field) {
        width: 140px;
        flex: 0 0 auto;
    }

    .filters-row .btn {
        flex: 0 0 auto;
        min-width: 70px;
        width: auto;
    }

    /* ---- merged ---- */

    .sidebar {
        display: none;
    }

    .main {
        margin-left: 0;
        padding-bottom: 6rem;
    }

    .user-info-desktop {
        display: flex;
    }

    .hamburger-menu {
        display: flex;
    }

    .desktop-nav-buttons {
        display: none;
    }

    .desktop-logout-btn {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .bottom-nav {
        display: flex;
    }

    .footer {
        margin-top: 2rem;
    }

    .footer-content {
        padding: 1.5rem 1rem;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    .footer-section h4 {
        font-size: 1.1rem;
    }

    .footer-section h5 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .footer-section p {
        font-size: 0.8rem;
    }

    .footer-section ul li a {
        font-size: 0.8rem;
    }

    .footer-bottom {
        padding: 0.75rem;
    }

    .footer-bottom p {
        font-size: 0.7rem;
    }
}


/* モバイル表示時の検索エリア */
@media (max-width: 767px) {
    .mobile-search-toggle {
        display: flex;
    }

    .search-form-container {
        display: block;
        /* モバイルでも表示 */
    }

    .product-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .product-filters .filter-group {
        min-width: unset;
        width: 100%;
    }

    .filters-row {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        width: 100% !important;
    }

    .filters-row .filter-control {
        width: 100% !important;
        min-width: unset !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    .filters-row .filter-control select,
    .filters-row .filter-control input {
        width: 100% !important;
        max-width: none !important;
        min-width: unset !important;
        padding: 0.75rem !important;
        border: 1px solid #ced4da !important;
        border-radius: 0.375rem !important;
        background: white !important;
    }

    .filters-row .btn {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        justify-content: center;
    }

    .filters-row .btn-success {
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }
}


@media (min-width: 768px) {

    /* ---- merged ---- */

    .category-selection {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1rem;
        align-items: end;
    }

    .category-selection .form-group {
        margin-bottom: 0;
    }
}


/* デスクトップ表示時の検索エリア */
@media (min-width: 1024px) {
    .bottom-nav {
        display: none !important;
    }

    /* ---- merged ---- */

    .search-form-container {
        width: 100%;
        margin-left: auto;
        margin-right: 0;
    }

    .filters-row {
        gap: 0.5rem;
        /* デスクトップでも適度に詰める */
        flex-wrap: nowrap;
        /* wrapを禁止 */
        width: 100%;
        min-width: 0;
    }

    /* デスクトップ表示時の安定した幅設定 */
    .product-filters .filter-control.search-field {
        width: 220px;
        max-width: 250px;
    }

    .product-filters .filter-control:not(.search-field) {
        width: 150px;
    }

    .product-filters .btn {
        min-width: 70px;
        padding: 0.35rem 0.75rem;
    }

    /* ---- merged ---- */

    .footer {
        margin-left: 250px;
        width: calc(100% - 250px);
    }

    .bottom-nav {
        display: none !important;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 4rem;
        width: 250px;
        height: calc(100vh - 4rem);
        z-index: 10;
        display: block;
    }

    .main {
        margin-left: 250px;
        width: calc(100% - 250px);
    }

    .hamburger-menu {
        display: none;
    }

    .desktop-nav-buttons {
        display: flex;
    }

    .desktop-logout-btn {
        display: flex;
    }

    .mobile-menu {
        display: none;
    }

    /* ---- merged ---- */

}

/* ラジオの横並び崩れ防止（デスクトップ） */
.form-check-group {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
}

.form-check-group .form-check {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    width: auto !important;
    float: none !important;
    clear: none !important;
}

/* Bootstrapのform-checkを完全に上書き */
.form-check-group .form-check:not(:last-child) {
    margin-right: 1rem !important;
    margin-bottom: 0 !important;
}

.form-check-group .form-check:last-child {
    margin-bottom: 0 !important;
}

/* Bootstrap form-check-inline のサポート */
.form-check-inline {
    display: inline-block !important;
    margin-right: 1rem !important;
    margin-bottom: 0 !important;
}

.form-check-inline .form-check-input {
    margin-right: 0.25rem !important;
    margin-top: 0 !important;
}

.form-check-inline .form-check-label {
    margin-bottom: 0 !important;
}


/* 編集画面の更新/削除ボタンを横並びに */
.product-form .form-actions {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.product-form .form-actions .btn {
    flex: 1;
    min-width: 0;
}

/* readonlyフィールドのスタイル（disabledと同じ見た目） */
.form-control[readonly],
.form-select[readonly] {
    background-color: #e9ecef !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}

.form-control[readonly]:focus,
.form-select[readonly]:focus {
    background-color: #e9ecef !important;
    border-color: #ced4da !important;
    box-shadow: none !important;
}

/* モーダルのz-index問題を修正 */
#imageModal.modal {
    z-index: 2000 !important;
}

#deleteConfirmModal.modal {
    z-index: 2010 !important;
}

#companyInfoModal.modal {
    z-index: 2020 !important;
}

#chatModal.modal {
    z-index: 2030 !important;
}

#paymentModal.modal {
    z-index: 2040 !important;
}

.modal-backdrop.show {
    z-index: 1990 !important;
}

#paymentModal .modal-dialog {
    z-index: 2041 !important;
}

#paymentModal .modal-content {
    z-index: 2042 !important;
}

#imageModal .modal-header {
    position: relative;
    z-index: 3;
}

#imageModal .modal-header .btn-close {
    position: relative;
    z-index: 4;
}

#deleteConfirmModal .modal-header {
    position: relative;
    z-index: 3;
}

#deleteConfirmModal .modal-header .btn-close {
    position: relative;
    z-index: 4;
}

#imageModal .modal-body .carousel {
    position: relative;
    z-index: 1;
}

#imageModal .carousel-control-prev,
#imageModal .carousel-control-next {
    z-index: 1;
}

#imageModal .modal-dialog {
    margin-left: auto;
    margin-right: auto;
    max-width: 90vw;
    width: 90vw;
}

#deleteConfirmModal .modal-dialog {
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

/* Progress triangle icons */
.progress-triangle-icon {
    color: var(--secondary-color);
    transition: color 0.2s ease;
}

.progress-triangle-icon.is-active {
    color: var(--primary-color);
}

/* Collapsible cards - reserve space for toggle button */
.repair-info-collapsible .card-body {
    padding-bottom: 4rem;
}

/* カテゴリクイック選択ボタン */
.category-quick-select {
    margin-bottom: 1.5rem;
}

.category-quick-select-label,
.category-selection-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.category-quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
}

.category-quick-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.category-quick-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.category-quick-btn:active {
    transform: scale(0.95);
}

.category-quick-btn img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
}

.category-quick-btn span {
    display: none;
}

/* モバイル表示（4個ずつ2行） */
@media (max-width: 768px) {
    .category-quick-buttons {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }

    .category-quick-btn img {
        width: 60px;
        height: 60px;
    }
}