/* 展示会備品申請システム - 共通スタイル */

/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* グローバルメニュー */
.global-nav {
    background: #003d6b;
    /* 画像に合わせた濃い青色 */
    height: 80px;
    box-shadow: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    box-sizing: border-box;
}

.nav-inner {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 100%;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-brand {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    font-weight: normal;
    /* 画像に合わせて通常の太さに */
    white-space: nowrap;
}

.nav-exhibitor-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.95em;
}

.exhibitor-name {
    font-weight: normal;
}

.booth-number {
    font-weight: normal;
}

/* 言語選択 */
.lang-selector {
    display: flex;
    align-items: center;
}

.lang-selector select {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.9em;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
}

.lang-selector select:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.lang-selector select option {
    background: #003d6b;
    color: white;
}

/* メインコンテンツラップ */
.main-content-wrap {
    flex: 1;
    padding-top: 80px;
    /* 固定ヘッダー分 */
    width: 100%;
}

/* コンテナ */
.container {
    width: 1300px !important;
    max-width: 1300px !important;
    margin: 0 auto !important;
    padding: 20px 0 !important;
    box-sizing: border-box !important;
}

/* ヘッダー */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: none !important;
}

.page-header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

.exhibitor-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.exhibitor-info h2 {
    font-size: 1.5em;
    margin-bottom: 5px;
}

/* メッセージ */
.message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.message.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.message.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

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

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

/* メインコンテンツ */
.main-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: none !important;
    margin-bottom: 30px;
}

.main-content h2 {
    color: #003366;
    margin-top: 30px !important;
    margin-bottom: 15px !important;
    padding-bottom: 10px;
    border-bottom: 2px solid #003366;
    width: 1300px !important;
    box-sizing: border-box;
}

/* 備品グリッド */
.items-grid {
    display: grid;
    grid-template-columns: repeat(4, 280px);
    gap: 10px;
    margin-bottom: 30px;
    margin-right: 340px;
    /* カートとの重なりを防ぐための余白 */
}

.item-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: none !important;
    width: 280px;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: none !important;
    border-color: #667eea;
}

.item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f3f4f6;
    position: relative;
    border-radius: 8px 8px 0 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 商品全体を表示 */
    background: #fff;
    transition: transform 0.5s ease;
}

.item-card:hover .item-image img {
    transform: scale(1.5);
    /* 1.5倍に拡大 */
}

.item-info {
    padding: 20px;
}

.item-info h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.item-code {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 8px;
}

.item-price {
    color: #10b981;
    font-size: 1.3em;
    font-weight: bold;
    margin: 10px 0;
}

.item-stock {
    color: #666;
    margin-bottom: 10px;
}

.item-description {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
    margin-top: 10px;
}

.item-order {
    padding: 15px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.item-order label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.quantity-input,
.notes-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.quantity-input:focus,
.notes-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: none !important;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: none !important;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.form-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.no-items {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1em;
}

/* テーブル */
.history-table {
    width: 1300px !important;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 0 !important;
    overflow: hidden;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
}

.history-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.history-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #ccc !important;
}

.history-table th:first-child,
.history-table td:first-child {
    width: 200px;
}

.history-table th,
.history-table td {
    white-space: nowrap;
    /* テキストの折り返しを禁止 */
    padding: 12px 15px;
}

.history-table td {
    border: 1px solid #ccc !important;
}

.history-section {
    width: 100%;
    overflow-x: auto;
    /* 長い品名で溢れた場合に横スクロールを許可 */
}

/* 確認画面のテーブルも同様に折り返しを防止 */
.confirm-table td {
    white-space: nowrap;
}


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

/* ステータスバッジ */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-completed {
    background: #dbeafe;
    color: #1e40af;
}

/* フッター (管理画面準拠) */
.footer {
    background: #003366;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9em;
    width: 100%;
    margin-top: 30px;
}

/* ページトップボタン */
.page-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 5px;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 2000;
    box-shadow: none !important;
}

.page-top.show {
    opacity: 1;
    visibility: visible;
}

.page-top:hover {
    background: #0056b3;
    transform: translateY(-5px);
}

/* 認証フォーム */
.auth-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: none !important;
}

.auth-container h1 {
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
}

.auth-container label {
    display: block;
    margin-bottom: 20px;
    font-weight: 500;
}

.auth-container input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1em;
    margin-top: 8px;
}

.auth-container button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-container button:hover {
    transform: translateY(-2px);
    box-shadow: none !important;
}

/* ログテーブル */
.log-table {
    width: 1300px !important;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: none !important;
    border: 1px solid #cbd5e0 !important;
    border-collapse: collapse;
}

.log-table th {
    background: #667eea;
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-size: 0.9em;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.log-table td {
    padding: 12px 10px;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.9em;
}

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

.user-agent {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 15px;
    background: white;
    color: #667eea;
    border: 1px solid #667eea;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #667eea;
    color: white;
}

.pagination a.active {
    background: #667eea;
    color: white;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .items-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 1.5em;
    }

    .main-content {
        padding: 20px;
    }

    .history-table {
        font-size: 0.85em;
    }

    .history-table th,
    .history-table td {
        padding: 8px;
    }

    /* サイドバーをモバイルで非表示にするか、ハンバーガーメニューに */
    .layout-with-sidebar {
        flex-direction: column;
    }

    .sidebar-left {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* ====================================
   サイドバーデザイン
   ==================================== */

/* サイドバー付きレイアウト */
.layout-with-sidebar {
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
}

/* 左サイドバー */
.sidebar-left {
    width: 250px;
    flex-shrink: 0;
    position: fixed;
    left: 0;
    top: 80px;
    bottom: 0;
    background: white;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    z-index: 100;
}

/* サイドメニュー */
#side-menu {
    background: white;
}

#side-menu .menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#side-menu .menu-list li {
    border-bottom: 1px solid #e8e8e8;
    transition: background 0.2s ease;
}

#side-menu .menu-list li:last-child {
    border-bottom: none;
}

#side-menu .menu-list li a,
#side-menu .menu-list li {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: normal;
    cursor: pointer;
    background: white;
}

#side-menu .menu-list li a {
    color: inherit;
}

/* ホバー状態 */
#side-menu .menu-list li:hover:not(.active) {
    background: #f5f5f5;
}

/* アクティブ状態 */
#side-menu .menu-list li.active {
    background: linear-gradient(90deg, #7b68ee 0%, #9370db 100%);
    color: white;
    font-weight: 500;
}

#side-menu .menu-list li.active a {
    color: white;
}

/* メインコンテンツエリアの調整 */
.layout-with-sidebar .container {
    flex: 1;
    margin-left: 300px;
    padding: 20px 0;
    box-sizing: border-box;
}

.layout-with-sidebar .main-content {
    background: transparent;
    padding: 0;
}

/* ====================================
   動的コンテンツ読み込み用スタイル
   ==================================== */

/* ローディング表示 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 60px 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f4f6;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

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

.loading-container p {
    color: #667eea;
    font-size: 1.1em;
    font-weight: 500;
}

/* エラー表示 */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 60px 20px;
    text-align: center;
}

.error-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.error-container h2 {
    color: #ef4444;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.error-container p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.error-message {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #ef4444;
    margin: 20px 0;
    font-weight: 500;
}

/* ====================================
   画像モーダル (グローバル)
   ==================================== */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.image-modal.show {
    display: flex;
}

.image-modal-content {
    position: relative;
    width: 500px;
    height: 500px;
    background: #fff;
    border: 6px solid #ef7d16;
    /* オレンジの太枠 */
    padding: 20px;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: -45px;
    right: -45px;
    width: 40px;
    height: 40px;
    background: none;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}
/* ====================================
   home.phppX^C
   ==================================== */

.home-welcome {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.home-welcome h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.welcome-subtitle {
    font-size: 1.2em;
    opacity: 0.95;
}

.home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.home-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.home-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}

.card-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.home-card h3 {
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.home-card p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.home-info {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.home-info h2 {
    color: #667eea;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.info-item {
    text-align: center;
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: #f3f4f6;
    transform: scale(1.05);
}

.info-item h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.info-item p {
    color: #666;
    margin: 0;
}
