/* Joel RPG Bot - 共通スタイル */

:root {
    --joel-primary: #4CAF50;      /* グリーン（サバイバル） */
    --joel-secondary: #FF9800;    /* オレンジ（警告・BMH） */
    --joel-danger: #F44336;       /* レッド（危険・HP低下） */
    --joel-info: #2196F3;         /* ブルー（情報） */
    --joel-dark: #212121;         /* ダークグレー（背景） */
    --joel-light: #FAFAFA;        /* ライトグレー（テキスト） */
    --joel-darker: #0f0f0f;       /* 濃いグレー */
    --primary: #4CAF50;
    --primary-dark: #3d9b42;
    --success: #57F287;
    --warning: #FEB529;
    --danger: #ED4245;
    --text: #FFFFFF;
    --text-secondary: #B9BBBE;
    --text-color: #DCDDDE;
    --text-muted: #9CA3AF;
    --border: #222838;
    --border-color: #242b3b;
    --card-bg: #11151d;
    --input-bg: #0d1017;
    --shadow-strong: 0 12px 40px rgba(0,0,0,0.35);
    --shadow-soft: 0 8px 24px rgba(0,0,0,0.22);
}

/* === グローバル設定 === */

body {
    background-color: var(--joel-dark);
    color: var(--joel-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.bg-darker {
    background-color: var(--joel-darker) !important;
}

/* === ヘッダースタイル === */

.dashboard-header {
    background: linear-gradient(135deg, var(--joel-darker) 0%, #1a1a1a 100%);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* === Rekt同構成レイアウト === */
.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 114px;
    background: radial-gradient(circle at 20% 20%, rgba(76, 175, 80, 0.08), transparent 35%),
                radial-gradient(circle at 80% 10%, rgba(255, 152, 0, 0.08), transparent 30%),
                #0f1115;
}

.dashboard-header {
    background-color: #101219;
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    min-height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    flex-wrap: nowrap;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    box-shadow: var(--shadow-strong);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    background-color: rgba(76, 175, 80, 0.12);
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    white-space: nowrap;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.user-profile .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #81c784;
    object-fit: cover;
}

.role-badge {
    background-color: var(--primary) !important;
    color: white !important;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px !important;
    font-weight: 600;
}

.logout-btn {
    padding: 8px 14px;
    background-color: rgba(237, 66, 69, 0.15);
    color: #FCA5A5;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(237, 66, 69, 0.4);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.logout-btn:hover {
    background-color: var(--danger);
    color: white;
    border-color: var(--danger);
}

.dashboard-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 1098;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: rgba(16,18,25,0.96);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: thin;
    width: 100%;
    box-shadow: var(--shadow-soft);
}

.dashboard-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.dashboard-nav a:hover {
    color: var(--text);
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.3);
}

.dashboard-nav a.active {
    color: var(--text);
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
}

.dashboard-main {
    padding: 20px 0 40px;
    max-width: 100%;
    margin: 60px 0 0 0;
    width: 100%;
    display: flex;
    overflow: hidden;
    position: relative;
}

.layout-3col {
    display: flex;
    gap: 20px;
    width: 100%;
    justify-content: center;
    align-items: stretch;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 16px;
}

.layout-main {
    flex: 1;
    min-width: 0;
    max-width: 1120px;
    overflow-y: auto;
    padding: 20px 10px;
}

.sidebar-left,
.sidebar-right {
    flex-shrink: 0;
    overflow-y: auto;
    padding: 20px;
}

.sidebar-left {
    width: 280px;
    background-color: rgba(0, 0, 0, 0.1);
    border-right: 1px solid var(--border);
}

.sidebar-right {
    width: 320px;
    background-color: rgba(0, 0, 0, 0.1);
    border-left: 1px solid var(--border);
}

.sidebar-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
}

.sidebar-title {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.stat-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9em;
    align-items: center;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label-left {
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.stat-value-right {
    color: var(--text);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
    min-width: 0;
}

.dashboard-header h1 {
    text-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    letter-spacing: 0.5px;
}

.dashboard-header .nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.dashboard-header .nav-link:hover {
    color: var(--joel-primary) !important;
}

.dashboard-header .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--joel-primary);
    transition: width 0.3s ease;
}

.dashboard-header .nav-link:hover::after {
    width: 100%;
}

/* === ボタンスタイル === */

.btn-outline-success {
    border-color: var(--joel-primary);
    color: var(--joel-primary);
}

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

.btn-joel {
    background: linear-gradient(135deg, var(--joel-primary) 0%, #81c784 100%);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-joel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.3);
}

/* === カード スタイル === */

.card {
    background-color: var(--joel-darker);
    border: 1px solid #333333;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--joel-primary);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.1);
}

.card-header {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(129, 199, 132, 0.05) 100%);
    border-bottom: 1px solid #333333;
    border-radius: 8px 8px 0 0;
}

/* === テーブルスタイル === */

.table {
    color: var(--joel-light);
}

.table-dark {
    background-color: var(--joel-darker);
}

.table-dark tbody + tbody {
    border-top-color: #333333;
}

.table-hover tbody tr:hover {
    background-color: rgba(76, 175, 80, 0.1);
}

.table thead th {
    border-bottom: 2px solid #333333;
    color: var(--joel-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
}

/* === バッジ === */

.badge {
    font-weight: 600;
    padding: 6px 10px;
    font-size: 12px;
}

/* === プログレスバー === */

.progress {
    background-color: #333333;
}

.progress-bar {
    font-weight: 600;
    font-size: 12px;
    line-height: 20px;
}

/* === リスト === */

.list-group-item {
    background-color: var(--joel-darker);
    border: 1px solid #333333;
    color: var(--joel-light);
}

.list-group-item.active {
    background-color: var(--joel-primary);
    border-color: var(--joel-primary);
}

/* === モーダル === */

.modal-content {
    background-color: var(--joel-darker);
    border: 1px solid #333333;
}

.modal-header {
    border-bottom: 1px solid #333333;
}

.modal-footer {
    border-top: 1px solid #333333;
}

/* === フォーム === */

.form-control,
.form-select {
    background-color: #333333;
    border: 1px solid #444444;
    color: var(--joel-light);
}

.form-control:focus,
.form-select:focus {
    background-color: #3a3a3a;
    border-color: var(--joel-primary);
    color: var(--joel-light);
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

.form-control::placeholder {
    color: #888888;
}

/* === リンク === */

a {
    color: var(--joel-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #81c784;
    text-decoration: underline;
}

/* === アラート === */

.alert {
    border: none;
    border-radius: 8px;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #81c784;
}

.alert-info {
    background-color: rgba(33, 150, 243, 0.1);
    color: #64b5f6;
}

.alert-warning {
    background-color: rgba(255, 152, 0, 0.1);
    color: #ffb74d;
}

.alert-danger {
    background-color: rgba(244, 67, 54, 0.1);
    color: #ef5350;
}

/* === フッター === */

footer {
    margin-top: 60px;
    background: linear-gradient(135deg, var(--joel-darker) 0%, #1a1a1a 100%);
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--joel-primary);
}

/* === レスポンシブ === */

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
    }

    .dashboard-header .col-md-6 {
        width: 100%;
        margin-bottom: 15px;
    }

    .table {
        font-size: 12px;
    }
}

/* === ユーティリティ === */

.hover-text-light:hover {
    color: var(--joel-light) !important;
}

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

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

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

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

/* === ローディング === */

.spinner {
    border: 3px solid #333333;
    border-top: 3px solid var(--joel-primary);
}

/* === グラデーション === */

.gradient-text-joel {
    background: linear-gradient(135deg, var(--joel-primary) 0%, #81c784 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === スクロールバー === */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--joel-darker);
}

::-webkit-scrollbar-thumb {
    background: #444444;
    border-radius: 5px;
}

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