/* AI コンシェルジュ - メインスタイルシート */

/* Noto Sans フォント読み込み */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

/* 基本設定 - 落ち着いた読みやすいデザイン */
:root {
    /* メインカラー: シルバー・グレー系 */
    --primary-color: #64748b;
    --primary-dark: #475569;
    --primary-light: #94a3b8;
    --secondary-color: #f8fafc;
    --accent-color: #e2e8f0;
    
    /* フィードバックカラー（控えめ） */
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0284c7;
    
    /* 背景とテキスト */
    --light-color: #F9FAFB;
    --dark-color: #374151;
    --text-color: #374151;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --background-color: #FFFFFF;
    --card-background: #FFFFFF;
    
    /* ボーダーとライン */
    --border-color: #E5E7EB;
    --border-light: #F3F4F6;
    --border-dark: #D1D5DB;
    
    /* シャドウ（より控えめに） */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --box-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
    --box-shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --box-shadow-xl: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --transition: all 0.2s ease-in-out;
}

/* 全体レイアウト - 読みやすいタイポグラフィ */
body {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    letter-spacing: 0.025em;
    font-size: 16px;
}

.container {
    max-width: 1200px !important;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ナビゲーションとコンテンツの幅完全統一 */
.navbar .container,
.admin-dashboard,
main .container {
    max-width: 1140px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* ダッシュボード内のすべての要素の幅調整 */
.admin-dashboard .row {
    margin-left: 0;
    margin-right: 0;
}

.admin-dashboard > .row {
    width: 100%;
}

/* ナビゲーション - シルバーグレー系デザイン */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    border-bottom: 1px solid var(--primary-dark);
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(10px);
    z-index: 1030 !important;
    position: relative;
    width: 100% !important;
}

/* ナビゲーションの確実な最前面表示 */
.navbar-collapse {
    z-index: 1040 !important;
}

.navbar-nav {
    z-index: 1040 !important;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
    color: white !important;
    letter-spacing: 0.02em;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius);
    margin: 0 0.25rem;
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: var(--box-shadow-sm);
}

/* ドロップダウンメニューのz-index調整 */
.dropdown-menu {
    z-index: 9999 !important;
    box-shadow: var(--box-shadow-lg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--card-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: absolute !important;
}

/* ドロップダウン関連の要素も最前面に */
.dropdown {
    z-index: 1040 !important;
    position: relative;
}

.dropdown-toggle::after {
    display: inline-block !important;
}

.dropdown-item {
    color: var(--text-color);
    padding: 0.75rem 1.25rem;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 400;
}

.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--text-color);
}

.dropdown-item:focus {
    background-color: var(--light-color);
    color: var(--text-color);
}

.dropdown-item i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

.dropdown-divider {
    border-color: var(--border-color);
    margin: 0.5rem 0;
}

/* タイポグラフィ - 読みやすさを重視 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: 0.025em;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.875rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

h5 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

h6 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

p {
    line-height: 1.75;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-muted);
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

/* スペーシングユーティリティ */
.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.py-6 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

/* カスタムユーティリティ */
.rounded-lg {
    border-radius: var(--border-radius-lg) !important;
}

.shadow-sm {
    box-shadow: var(--box-shadow-sm) !important;
}

.shadow {
    box-shadow: var(--box-shadow) !important;
}

.shadow-lg {
    box-shadow: var(--box-shadow-lg) !important;
}

.border-light {
    border-color: var(--border-light) !important;
}

.bg-light-custom {
    background-color: var(--light-color) !important;
}

.bg-primary-light {
    background-color: rgba(91, 155, 213, 0.1) !important;
}

.bg-success-light {
    background-color: rgba(16, 185, 129, 0.1) !important;
}

.bg-warning-light {
    background-color: rgba(245, 158, 11, 0.1) !important;
}

.bg-danger-light {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* ヒーローセクション */
.hero-section {
    background: linear-gradient(135deg, #F3F4F6, #E5E7EB);
    color: var(--text-color);
    padding: 5rem 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.6;
}

/* 特徴セクション */
.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
    background: var(--card-background);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--primary-color);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-description {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* カード */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    background-color: var(--card-background);
    position: relative;
    z-index: auto;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.025em;
}

.card-body {
    padding: 1.5rem;
    color: var(--text-color);
}

/* フォーム - 見やすく読みやすいデザイン */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 400;
    transition: var(--transition);
    background-color: var(--card-background);
    color: var(--text-color);
    line-height: 1.5;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.12);
    background-color: white;
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

.form-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 0.25rem;
}

.input-group-text {
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.8rem 1rem;
}

/* ボタン - 落ち着いたスタイル */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    line-height: 1.5;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
    box-shadow: var(--box-shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
    color: white;
    border-color: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow-sm);
}

.btn-secondary:hover {
    background: var(--border-light);
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
    color: var(--text-color);
    border-color: var(--border-dark);
}

.btn-success {
    background: var(--success-color);
    color: white;
    border: 1px solid var(--success-color);
    box-shadow: var(--box-shadow-sm);
}

.btn-success:hover {
    background: #157347;
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
    color: white;
    border-color: #157347;
}

.btn-warning {
    background: var(--warning-color);
    color: #000;
    border: 1px solid var(--warning-color);
    box-shadow: var(--box-shadow-sm);
}

.btn-warning:hover {
    background: #ffca2c;
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
    color: #000;
    border-color: #ffca2c;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border: 1px solid var(--danger-color);
    box-shadow: var(--box-shadow-sm);
}

.btn-danger:hover {
    background: #bb2d3b;
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
    color: white;
    border-color: #bb2d3b;
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--box-shadow-sm);
}

.btn-outline-secondary {
    border: 1px solid var(--border-color);
    color: var(--text-color);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--box-shadow-sm);
}

/* アラート - 優しい色合い */
.alert {
    border-radius: var(--border-radius);
    border: none;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-success {
    background-color: #F0FDF4;
    color: #166534;
    border-left-color: var(--success-color);
}

.alert-danger {
    background-color: #FEF2F2;
    color: #991B1B;
    border-left-color: var(--danger-color);
}

.alert-warning {
    background-color: #FFFBEB;
    color: #92400E;
    border-left-color: var(--warning-color);
}

.alert-info {
    background-color: #EFF6FF;
    color: #1E40AF;
    border-left-color: var(--info-color);
}

/* ダッシュボード - 統一されたデザイン */
.dashboard-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.stat-card {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow-sm);
    position: relative;
    z-index: auto;
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    color: var(--text-muted);
}

/* AI生成フォーム - 読みやすいデザイン */
.ai-form {
    background: var(--card-background);
    border: 1px solid var(--border-color);
}

.ai-result {
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    white-space: pre-wrap;
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
    line-height: 1.75;
    color: var(--text-color);
    font-size: 0.95rem;
    min-height: 200px;
    position: relative;
}

/* プログレスバー - 洗練されたスタイル */
.progress {
    border-radius: var(--border-radius);
    height: 8px;
    background-color: var(--border-light);
    overflow: hidden;
}

.progress-bar {
    border-radius: var(--border-radius);
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    transition: var(--transition);
}

/* バッジ - 統一されたスタイル */
.badge {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    letter-spacing: 0.025em;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

/* テーブル - クリーンなデザイン */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow-sm);
    background: var(--card-background);
}

.table th {
    background-color: var(--light-color);
    border: none;
    font-weight: 600;
    color: var(--text-color);
    padding: 1rem;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

.table td {
    border-color: var(--border-light);
    vertical-align: middle;
    padding: 1rem;
    font-size: 0.95rem;
    color: var(--text-color);
}

.table tbody tr:hover {
    background-color: var(--light-color);
    transition: var(--transition);
}

/* フッター */
footer {
    margin-top: auto;
}

.footer-custom {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #ffffff;
    border-top: 1px solid #334155;
}

.footer-title {
    color: #ffffff !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer-text {
    color: #e2e8f0 !important;
    margin-bottom: 0;
    opacity: 0.9;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* 幅拡張に伴うレイアウト調整 */
@media (min-width: 1400px) {
    /* より大きな画面でのカード間隔調整 */
    .admin-dashboard .row {
        margin-left: -20px !important;
        margin-right: -20px !important;
    }
    
    .admin-dashboard .row > * {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    /* テーブルの表示改善 */
    .admin-dashboard .table-responsive {
        overflow-x: visible;
    }
    
    /* カードヘッダーとボディの間隔調整 */
    .admin-dashboard .card-header {
        padding: 1.5rem 2rem;
    }
    
    .admin-dashboard .card-body {
        padding: 2rem;
    }
    
    /* ボタングループの間隔改善 */
    .admin-dashboard .btn-group .btn {
        min-width: 2.5rem;
    }
    
    /* モーダルサイズ調整 */
    .admin-dashboard .modal-lg {
        max-width: 900px;
    }
    
    .admin-dashboard .modal-xl {
        max-width: 1200px;
    }
    
    /* 店舗設定タブのレイアウト改善 */
    .nav-tabs .nav-link {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* フォーム要素の間隔調整 */
    .row.mb-3 {
        margin-bottom: 2rem !important;
    }
    
    /* カードグリッドの改善 */
    .col-lg-6.mb-4 {
        margin-bottom: 2.5rem !important;
    }
    
    /* テキストエリアの高さ調整 */
    .form-control[rows="4"] {
        min-height: 120px;
    }
    
    /* ボタンの最小幅設定 */
    .btn-primary, .btn-secondary {
        min-width: 120px;
    }
}

/* テーブルレイアウト改善（1440px対応） */
@media (min-width: 1400px) {
    .admin-dashboard .table {
        font-size: 0.9rem;
    }
    
    .admin-dashboard .table th,
    .admin-dashboard .table td {
        padding: 1rem 1.5rem;
        vertical-align: middle;
    }
    
    /* テーブルヘッダーの改善 */
    .admin-dashboard .table thead th {
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
        padding: 1.25rem 1.5rem;
    }
    
    /* ボタングループ内ボタンの間隔 */
    .admin-dashboard .btn-group-sm .btn {
        padding: 0.5rem 1rem;
        margin-right: 0.25rem;
    }
    
    .admin-dashboard .btn-group-sm .btn:last-child {
        margin-right: 0;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* ローディング */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ツールチップ */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: var(--border-radius);
}

/* スクロールバー */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ユーティリティクラス */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--box-shadow-lg);
}

.border-radius-custom {
    border-radius: var(--border-radius);
}

/* ダークモード対応の準備 */
[data-theme="dark"] {
    --primary-color: #7CB3F0;
    --primary-dark: #5B9BD5;
    --secondary-color: #9CA3AF;
    --success-color: #34D399;
    --warning-color: #FBBF24;
    --danger-color: #F87171;
    --info-color: #60A5FA;
    --light-color: #374151;
    --dark-color: #F9FAFB;
    --text-color: #F9FAFB;
    --text-muted: #D1D5DB;
    --text-light: #9CA3AF;
    --background-color: #1F2937;
    --card-background: #374151;
    --border-color: #4B5563;
    --border-light: #374151;
}

/* フォーカス状態の改善 */
.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* アクセシビリティの改善 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* プリントスタイル */
@media print {
    .navbar,
    .btn,
    .alert {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
}

/* ダークモードスタイルは将来実装 */

/* 管理者ダッシュボード専用スタイル */
.admin-dashboard {
    margin-top: 2rem;
    max-width: 1140px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

/* ダッシュボード内の全要素をコンテナ幅に制限 */
.admin-dashboard .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
}

/* 統計カードの幅制限 */
.admin-dashboard .row.mb-5.g-4,
.admin-dashboard .row.mb-4,
.admin-dashboard .row.mb-5 {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.admin-dashboard .card {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    max-width: 100% !important;
}

.admin-dashboard .card:hover {
    box-shadow: var(--box-shadow-lg);
    transform: translateY(-1px);
}

.admin-dashboard .card-header {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.admin-dashboard .card-body {
    padding: 2rem;
}

/* コンテナ幅の統一とレイアウト改善 */
.container {
    max-width: 1200px !important;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px !important;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px !important;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px !important;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px !important;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px !important;
    }
}

/* ナビゲーションとコンテンツの幅完全統一 */
.navbar .container,
.admin-dashboard,
main .container {
    max-width: 1140px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* ダッシュボード内のすべての要素の幅調整 */
.admin-dashboard .row {
    margin-left: 0;
    margin-right: 0;
}

.admin-dashboard > .row {
    width: 100%;
}

/* 統計カードの改善 */
.admin-dashboard .stats-card {
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.admin-dashboard .stats-card .card-body {
    padding: 2rem;
}

/* タブナビゲーションの改善 */
.admin-dashboard .nav-tabs {
    border: none;
    margin-bottom: 0;
}

.admin-dashboard .nav-tabs .nav-link {
    border: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    color: var(--text-muted);
    font-weight: 500;
    padding: 1rem 1.5rem;
    margin-right: 0.25rem;
    transition: var(--transition);
    background-color: var(--secondary-color);
}

.admin-dashboard .nav-tabs .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--accent-color);
}

.admin-dashboard .nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: white;
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
}

/* タブコンテンツの改善 */
.admin-dashboard .tab-content {
    border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) var(--border-radius-lg);
}

.admin-dashboard .tab-pane .card {
    border-top-left-radius: 0;
}

/* テーブルの改善 */
.admin-dashboard .table {
    margin-bottom: 0;
}

.admin-dashboard .table th {
    border-top: none;
    border-bottom: 2px solid var(--border-color);
    background-color: var(--light-color);
    font-weight: 600;
    color: var(--text-color);
    padding: 1rem;
    font-size: 0.875rem;
}

.admin-dashboard .table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: var(--border-light);
}

.admin-dashboard .table-hover tbody tr:hover {
    background-color: var(--light-color);
    transform: none;
}

/* 検索・フィルターセクションの改善 */
.admin-dashboard .filter-section {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.admin-dashboard .form-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.admin-dashboard .form-control,
.admin-dashboard .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: var(--transition);
}

.admin-dashboard .form-control:focus,
.admin-dashboard .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(107, 114, 128, 0.15);
}

/* ボタンの改善 */
.admin-dashboard .btn {
    font-weight: 500;
    border-radius: var(--border-radius);
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    transition: var(--transition);
    border-width: 1px;
}

.admin-dashboard .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.admin-dashboard .btn-group .btn {
    margin: 0;
}

/* モーダルの改善 */
.admin-dashboard .modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-xl);
}

.admin-dashboard .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.admin-dashboard .modal-body {
    padding: 2rem;
}

.admin-dashboard .modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* ページネーションの改善 */
.admin-dashboard .pagination {
    margin-bottom: 0;
    gap: 0.25rem;
}

.admin-dashboard .page-link {
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}

.admin-dashboard .page-link:hover {
    background-color: var(--light-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.admin-dashboard .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* バッジの改善 */
.admin-dashboard .badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
}

/* アラートの改善 */
.admin-dashboard .alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-sm);
    font-weight: 500;
    padding: 1rem 1.25rem;
}

/* レスポンシブ改善 */
@media (max-width: 768px) {
    .admin-dashboard .card-body {
        padding: 1.5rem;
    }
    
    .admin-dashboard .filter-section {
        padding: 1rem;
    }
    
    .admin-dashboard .modal-body {
        padding: 1.5rem;
    }
    
    .admin-dashboard .table {
        font-size: 0.8125rem;
    }
    
    .admin-dashboard .table th,
    .admin-dashboard .table td {
        padding: 0.75rem 0.5rem;
    }
}

/* 追加の余白調整 */
.admin-dashboard .mb-4 {
    margin-bottom: 2rem !important;
}

.admin-dashboard .mb-5 {
    margin-bottom: 2.5rem !important;
}

.admin-dashboard .g-3 > * {
    margin-bottom: 1rem;
}

.admin-dashboard .g-4 > * {
    margin-bottom: 1.5rem;
}

/* ダッシュボードタイトルの改善 */
.admin-dashboard h1, .admin-dashboard h2 {
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.admin-dashboard h5 {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.admin-dashboard h6 {
    color: var(--text-color);
    font-weight: 600;
}

/* アイコンとテキストの間隔 */
.admin-dashboard .fa + span,
.admin-dashboard .fas + span,
.admin-dashboard .far + span {
    margin-left: 0.5rem;
}

.admin-dashboard span + .fa,
.admin-dashboard span + .fas,
.admin-dashboard span + .far {
    margin-left: 0.5rem;
}

/* Bootstrapのcontainerクラスの強制統一 */
.container {
    width: 100% !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px !important;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px !important;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px !important;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1170px !important;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1440px !important;
    }
}

/* 確実なレイアウト統一 */
.navbar .container,
.admin-dashboard,
.admin-dashboard-container,
main .container {
    max-width: 1440px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Bootstrapグリッドシステムの調整 */
.admin-dashboard .row {
    --bs-gutter-x: 1.5rem !important;
    --bs-gutter-y: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    margin-top: calc(-1 * var(--bs-gutter-y)) !important;
    margin-right: calc(-0.5 * var(--bs-gutter-x)) !important;
    margin-left: calc(-0.5 * var(--bs-gutter-x)) !important;
}

.admin-dashboard .row > * {
    flex-shrink: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-right: calc(var(--bs-gutter-x) * 0.5) !important;
    padding-left: calc(var(--bs-gutter-x) * 0.5) !important;
    margin-top: var(--bs-gutter-y) !important;
}

/* クイックアクションボタンのスタイル改善 */
.quick-action-btn {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quick-action-btn:hover small {
    color: #000 !important;
    font-weight: 500;
}

.quick-action-btn.btn-outline-primary:hover small {
    color: #ffffff !important;
}

.quick-action-btn.btn-outline-success:hover small {
    color: #ffffff !important;
}

.quick-action-btn.btn-outline-info:hover small {
    color: #ffffff !important;
}

.quick-action-btn.btn-outline-warning:hover small {
    color: #000000 !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .quick-actions-container {
        flex-direction: column !important;
    }
    
    .quick-action-btn {
        min-width: 100% !important;
        margin-bottom: 1rem !important;
    }
}
