/*
Theme Name: DX Original Sidebar Theme
Description: DX研修システム用テーマ - タブレット対応完全版
Version: 2.1.0
Author: DX Team
*/

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #000437;
    background-color: #f7fafc;
    overflow-x: hidden;
}

/* ========== レイアウト基本設定 ========== */

/* デスクトップサイドバー */
.dashboard-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    z-index: 500;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

/* サイドバーロゴ */
.sidebar-logo {
    padding: 32px 24px 24px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

.sidebar-logo .logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #000437;
    letter-spacing: -0.025em;
}

.sidebar-logo .custom-logo {
    max-height: 40px;
    width: auto;
}

/* サイドバーナビゲーション */
.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
}

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

.nav-menu .menu-item {
    margin-bottom: 8px;
}

.nav-menu .nav-link {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: #000437;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-menu .nav-link:hover {
    background: #edf2f7;
    color: #000437;
    transform: translateX(4px);
}

.nav-menu .current-menu-item .nav-link,
.nav-menu .menu-item .nav-link.active {
    background: #000437;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 4, 55, 0.4);
    transform: translateX(8px);
}

/* より具体的なアクティブ状態の指定 */
.nav-menu .current-menu-item > .nav-link,
.nav-menu .current_page_item > .nav-link,
.nav-menu .current-page-ancestor > .nav-link {
    background: #000437 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 4, 55, 0.4) !important;
    transform: translateX(8px) !important;
}

.nav-menu .nav-link i {
    width: 20px;
    height: 20px;
    margin-right: 16px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu .nav-link span {
    font-size: 15px;
}

/* サイドバーログアウト */
.sidebar-logout {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #e53e3e;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 14px;
}

.logout-link:hover {
    background: #fed7d7;
    color: #c53030;
}

/* メインエリア */
.dashboard-main {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* デスクトップヘッダー */
.dashboard-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.breadcrumb-text {
    font-size: 14px;
    color: #000437;
    font-weight: 500;
}

.page-greeting {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    letter-spacing: -0.025em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: #718096;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background: #edf2f7;
    color: #000437;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.user-avatar:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.user-avatar .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ダッシュボードコンテンツ */
.dashboard-content {
    flex: 1;
    padding: 32px;
}

.content-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    padding: 40px;
    margin-bottom: 24px;
}

.content-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
    letter-spacing: -0.025em;
}

.content-text {
    color: #4a5568;
    line-height: 1.8;
}

/* ========== モバイル・タブレットヘッダー ========== */

.mobile-header {
    display: none;
    background: #ffffff;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
}

.mobile-logo .custom-logo {
    max-height: 32px;
    width: auto;
}

/* モバイルヘッダーアクション */
.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-header-action-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #718096;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-header-action-btn:hover {
    background: #edf2f7;
    color: #4a5568;
}

.mobile-user-avatar-header {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.mobile-user-avatar-header:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.mobile-user-avatar-header .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ハンバーガーボタン */
.mobile-hamburger-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.mobile-hamburger-btn:hover {
    background: #f7fafc;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: #4a5568;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-hamburger-btn:hover .hamburger-line {
    background: #2d3748;
}

/* アクティブ状態のハンバーガー */
.mobile-hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.mobile-hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ========== モバイルメニュー ========== */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    display: flex; /* 追加 */
    align-items: center; /* 追加 */
    justify-content: flex-end; /* 追加 */
}

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

.mobile-menu {
    position: absolute; /* fixed から absolute に変更 */
    top: 20px;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    height: calc(100vh - 40px);
    background: #ffffff;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    border-radius: 12px;
}

/* 極小画面（480px以下）での調整 */
@media (max-width: 480px) {
    .mobile-menu {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
        transform: translateX(100%);
    }
    .mobile-menu-overlay.active .mobile-menu {
        transform: translateX(0);
    }
}

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

/* メニューヘッダー */
.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    flex-shrink: 0;
}

.mobile-close-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    font-size: 20px;
    color: #4a5568;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-close-btn:hover {
    background: #f7fafc;
    color: #2d3748;
}

/* ユーザープロフィール */
.mobile-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.mobile-user-profile:hover {
    background: rgba(102, 126, 234, 0.1);
}

.mobile-user-profile::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.mobile-user-profile:hover::before {
    left: 100%;
}

.mobile-user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-user-avatar .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-user-info {
    flex: 1;
    min-width: 0;
}

.mobile-user-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-user-info p {
    font-size: 13px;
    color: #000437;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-settings-hint {
    font-size: 11px;
    color: #667eea;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.mobile-chevron {
    color: #a0aec0;
    font-size: 14px;
    flex-shrink: 0;
}

/* ログインプロンプト */
.mobile-login-prompt {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff, #ffffff);
    border: 1px solid #bae6fd;
    border-radius: 12px;
}

.login-prompt-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.login-prompt-content {
    flex: 1;
}

.login-prompt-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
}

.login-prompt-content p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #000437;
    line-height: 1.4;
}

.mobile-login-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.mobile-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 統計セクション */
.mobile-stats-section {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.mobile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.mobile-stat-item {
    text-align: center;
    padding: 16px 8px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.mobile-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.mobile-stat-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 16px;
}

.mobile-stat-points {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.mobile-stat-rewards {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.mobile-stat-tasks {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

.mobile-stat-number {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
    line-height: 1;
}

.mobile-stat-label {
    font-size: 11px;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* メニューリスト */
.mobile-menu-list {
    flex: 1;
    padding: 0;
    overflow-y: auto;
}

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f7fafc;
    position: relative;
}

.mobile-menu-item:hover {
    background: #f7fafc;
    color: #2d3748;
}

.mobile-menu-item.active {
    background: linear-gradient(135deg, rgba(0, 4, 55, 0.1), rgba(0, 4, 55, 0.15));
    color: #000437;
    border-left: 4px solid #000437;
}

.mobile-menu-item.active::before {
    content: '';
    position: absolute;
    right: 20px;
    width: 8px;
    height: 8px;
    background: #000437;
    border-radius: 50%;
}

.mobile-menu-icon {
    width: 24px;
    height: 24px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-size: 16px;
}

.mobile-menu-item:hover .mobile-menu-icon,
.mobile-menu-item.active .mobile-menu-icon {
    color: inherit;
}

.mobile-menu-text {
    font-size: 16px;
    font-weight: 500;
    flex: 1;
}

/* メニューフッター */
.mobile-menu-footer {
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.mobile-logout {
    color: #e53e3e !important;
}

.mobile-logout:hover {
    background: #fed7d7 !important;
    color: #c53030 !important;
}

.mobile-login {
    color: #3182ce !important;
}

.mobile-login:hover {
    background: #ebf8ff !important;
    color: #2c5282 !important;
}

/* ========== モバイルログイン・アカウント設定モーダル ========== */

.mobile-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-login-modal.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.mobile-login-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.mobile-login-modal .modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(30px);
    transition: transform 0.3s ease;
}

.mobile-login-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.mobile-login-modal .modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    position: relative;
}

.mobile-login-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
}

.mobile-login-modal .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f7fafc;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-login-modal .modal-close:hover {
    background: #edf2f7;
    color: #4a5568;
}

.mobile-login-modal .modal-body {
    padding: 24px;
}

/* フォームスタイル */
.mobile-login-modal .form-group {
    margin-bottom: 20px;
}

.mobile-login-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.mobile-login-modal .form-group label i {
    margin-right: 6px;
    color: #667eea;
    width: 16px;
}

.mobile-login-modal input[type="text"],
.mobile-login-modal input[type="email"],
.mobile-login-modal input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.mobile-login-modal input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mobile-login-modal .password-input-wrapper {
    position: relative;
}

.mobile-login-modal .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: color 0.2s;
}

.mobile-login-modal .password-toggle:hover {
    color: #4a5568;
    background: #f7fafc;
}

.mobile-login-modal .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
}

.mobile-login-modal .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.mobile-login-modal .mobile-login-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mobile-login-modal .mobile-login-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.mobile-login-modal .mobile-login-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 結果表示 */
.mobile-login-result {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.mobile-login-result.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.mobile-login-result.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.mobile-login-result.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* 追加オプション */
.mobile-login-options {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.login-help-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.help-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.help-link:hover {
    background: #f7faff;
    color: #5a67d8;
}

.login-security-info {
    text-align: center;
    margin-top: 16px;
}

.login-security-info p {
    font-size: 12px;
    color: #718096;
    margin: 0;
}

/* パスワードリセット専用 */
.forgot-instructions {
    margin-bottom: 20px;
    padding: 16px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
}

.forgot-instructions p {
    margin: 0;
    font-size: 14px;
    color: #1e40af;
    line-height: 1.5;
}

/* ========== アカウント設定モーダル専用スタイル ========== */

.account-info-section {
    margin-bottom: 24px;
}

.account-avatar-section {
    text-align: center;
    margin-bottom: 20px;
}

.current-avatar-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e2e8f0;
}

.change-avatar-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.change-avatar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.account-details {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.detail-item label {
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.detail-item span {
    color: #1a202c;
    font-size: 14px;
}

.account-actions {
    margin-top: 20px;
}

.action-section {
    margin-bottom: 20px;
}

.action-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    width: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.action-btn:hover {
    background: #f7fafc;
    border-color: #667eea;
    transform: translateY(-1px);
}

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

.action-btn i:first-child {
    width: 24px;
    height: 24px;
    color: #667eea;
    font-size: 16px;
    flex-shrink: 0;
}

.action-content {
    flex: 1;
    text-align: left;
}

.action-title {
    display: block;
    font-weight: 600;
    color: #1a202c;
    font-size: 14px;
    margin-bottom: 2px;
}

.action-desc {
    display: block;
    font-size: 12px;
    color: #718096;
}

.action-btn i:last-child {
    color: #a0aec0;
    font-size: 12px;
    flex-shrink: 0;
}

/* 学習進捗表示 */
.progress-summary {
    background: linear-gradient(135deg, #f0f9ff, #ffffff);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 16px;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.progress-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-bar-container {
    margin-top: 12px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* モーダルフッター */
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8fafc;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

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

/* タブレット：1024px以下（重要：ここでヘッダー重複を解決） */
@media (max-width: 1024px) {
    /* デスクトップサイドバーを完全に隠す */
    .dashboard-sidebar {
        display: none !important;
    }
    
    /* デスクトップヘッダーを完全に隠す */
    .dashboard-header {
        display: none !important;
    }
    
    /* モバイルヘッダーを表示 */
    .mobile-header {
        display: flex !important;
    }
    
    /* メインエリアの調整 */
    .dashboard-main {
        margin-left: 0 !important;
        padding-top: 80px !important; /* モバイルヘッダーの高さ分 */
    }
    
    /* コンテンツエリアの調整 */
    .dashboard-content {
        padding: 32px;
    }
    
    .content-card {
        padding: 32px;
    }
    
    /* タブレット用のモバイルヘッダーアクション調整 */
    .mobile-header-actions {
        gap: 12px;
    }
    
    .mobile-header-action-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .mobile-user-avatar-header {
        width: 40px;
        height: 40px;
    }
    
    /* モバイルメニューの幅をタブレット用に調整 */
    .mobile-menu {
        width: 360px;
    }
    
    /* 統計グリッドの調整 */
    .mobile-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .mobile-stat-item {
        padding: 20px 12px;
    }
    
    .mobile-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .mobile-stat-number {
        font-size: 18px;
    }
    
    .mobile-stat-label {
        font-size: 12px;
    }
    
    /* メニューアイテムの調整 */
    .mobile-menu-item {
        padding: 18px 24px;
    }
    
    .mobile-menu-icon {
        width: 26px;
        height: 26px;
        font-size: 18px;
        margin-right: 18px;
    }
    
    .mobile-menu-text {
        font-size: 17px;
    }
}

/* モバイル：768px以下 */
@media (max-width: 768px) {
    /* コンテンツエリアの調整 */
    .dashboard-content {
        padding: 20px;
    }
    
    .content-card {
        padding: 20px;
        border-radius: 12px;
    }
    
    /* モバイルヘッダーアクション調整 */
    .mobile-header-actions {
        gap: 6px;
    }
    
    .mobile-header-action-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .mobile-user-avatar-header {
        width: 32px;
        height: 32px;
    }
}

/* 極小画面：480px以下 */
@media (max-width: 480px) {
    .mobile-menu {
        width: 100vw;
        left: 0;
        transform: translateX(100%);
    }
    
    .mobile-menu-overlay.active .mobile-menu {
        transform: translateX(0);
    }
    
    .mobile-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .mobile-stat-item {
        padding: 12px 4px;
    }
    
    .mobile-stat-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .mobile-stat-number {
        font-size: 14px;
    }
    
    .mobile-stat-label {
        font-size: 10px;
    }
    
    .page-greeting {
        font-size: 20px;
    }
    
    .content-card {
        padding: 20px;
        border-radius: 12px;
    }
    
    .mobile-login-prompt {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    /* モバイルモーダルの調整 */
    .mobile-login-modal .modal-content {
        width: 95%;
        margin: 20px;
        border-radius: 16px;
    }
    
    .mobile-login-modal .modal-body {
        padding: 20px;
    }
    
    .login-help-links {
        gap: 10px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
}

/* デスクトップ：1025px以上（従来通り） */
@media (min-width: 1025px) {
    /* デスクトップでは通常通り */
    .mobile-header {
        display: none !important;
    }
    
    .dashboard-sidebar {
        display: flex !important;
    }
    
    .dashboard-header {
        display: flex !important;
    }
    
    .dashboard-main {
        margin-left: 260px !important;
        padding-top: 0 !important;
    }
}

/* ========== ダークモード対応 ========== */

[data-wp-dark-mode-active="true"] {
    color-scheme: dark;
}

[data-wp-dark-mode-active="true"] body {
    background-color: #1a202c;
    color: #e2e8f0;
}

[data-wp-mode-active="true"] .dashboard-sidebar {
    background: #2d3748;
    border-color: #4a5568;
}

[data-wp-dark-mode-active="true"] .dashboard-header {
    background: rgba(45, 55, 72, 0.95);
    border-color: #4a5568;
}

[data-wp-dark-mode-active="true"] .mobile-header {
    background: #2d3748;
    border-color: #4a5568;
}

[data-wp-dark-mode-active="true"] .mobile-menu {
    background: #2d3748;
}

[data-wp-dark-mode-active="true"] .mobile-menu-header {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    border-color: #4a5568;
}

[data-wp-dark-mode-active="true"] .mobile-stats-section {
    background: #4a5568;
    border-color: #718096;
}

[data-wp-dark-mode-active="true"] .mobile-stat-item {
    background: #2d3748;
}

[data-wp-dark-mode-active="true"] .mobile-menu-item {
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-wp-dark-mode-active="true"] .mobile-menu-item:hover {
    background: #4a5568;
    color: #f7fafc;
}

[data-wp-dark-mode-active="true"] .mobile-menu-footer {
    border-color: #4a5568;
}

[data-wp-dark-mode-active="true"] .mobile-login-prompt {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    border-color: #4a5568;
}

[data-wp-dark-mode-active="true"] .mobile-logo .logo-text {
    color: #f7fafc;
}

[data-wp-dark-mode-active="true"] .hamburger-line {
    background: #e2e8f0;
}

[data-wp-dark-mode-active="true"] .mobile-hamburger-btn:hover .hamburger-line {
    background: #f7fafc;
}

[data-wp-dark-mode-active="true"] .mobile-header-action-btn {
    color: #e2e8f0;
}

[data-wp-dark-mode-active="true"] .mobile-header-action-btn:hover {
    background: #4a5568;
    color: #f7fafc;
}

[data-wp-dark-mode-active="true"] .content-card {
    background: #2d3748;
    border-color: #4a5568;
}

[data-wp-dark-mode-active="true"] .mobile-login-modal .modal-content {
    background: #2d3748;
}

[data-wp-dark-mode-active="true"] .mobile-login-modal .modal-header,
[data-wp-dark-mode-active="true"] .modal-footer {
    background: #4a5568;
    border-color: #718096;
}

[data-wp-dark-mode-active="true"] .account-details {
    background: #4a5568;
}

[data-wp-dark-mode-active="true"] .action-btn {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

[data-wp-dark-mode-active="true"] .action-btn:hover {
    background: #2d3748;
    border-color: #667eea;
}

[data-wp-dark-mode-active="true"] .progress-summary {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    border-color: #4a5568;
}

[data-wp-dark-mode-active="true"] .mobile-login-modal input {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

[data-wp-dark-mode-active="true"] .mobile-login-modal input:focus {
    border-color: #667eea;
    background: #2d3748;
}

/* ========== アニメーション効果 ========== */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.mobile-menu-overlay.active {
    animation: fadeIn 0.3s ease;
}

.mobile-menu-overlay.active .mobile-menu {
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* スクロールバーカスタマイズ */
.mobile-menu::-webkit-scrollbar {
    width: 4px;
}

.mobile-menu::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.mobile-menu::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* スムーズなトランジション */
* {
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-item,
.mobile-login-btn,
.mobile-close-btn,
.mobile-hamburger-btn,
.mobile-header-action-btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* タッチデバイス用の改善 */
@media (hover: none) and (pointer: coarse) {
    .mobile-menu-item:hover {
        background: transparent;
    }
    
    .mobile-menu-item:active {
        background: #f7fafc;
        color: #2d3748;
    }
    
    .mobile-login-btn:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }
    
    .mobile-login-btn:active {
        transform: translateY(1px);
    }
    
    .mobile-header-action-btn:hover {
        background: transparent;
    }
    
    .mobile-header-action-btn:active {
        background: #edf2f7;
    }
}

/* ========== 追加のユーティリティクラス ========== */

.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.slide-up {
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.5s ease forwards;
}

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

.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* プリント用スタイル */
@media print {
    .mobile-header,
    .dashboard-sidebar,
    .dashboard-header,
    .mobile-menu-overlay {
        display: none !important;
    }
    
    .dashboard-main {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }
    
    .dashboard-content {
        padding: 0 !important;
    }
}

/* ========== 通知パネルとヘルプパネル ========== */

.notification-panel,
.help-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.notification-panel.show,
.help-panel.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-header,
.help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.notification-header h3,
.help-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-panel {
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    transition: color 0.2s ease;
}

.close-panel:hover {
    color: #2d3748;
}

.notification-content,
.help-content {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: #f7fafc;
}

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

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.notification-icon-course {
    background-color: #e0e7ff;
    color: #5a67d8;
}

.notification-icon-achievement {
    background-color: #fef3c7;
    color: #f59e0b;
}

.notification-icon-user {
    background-color: #dbeafe;
    color: #3b82f6;
}

.notification-icon-system {
    background-color: #e5e7eb;
    color: #6b7280;
}

.notification-text {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.notification-desc {
    font-size: 14px;
    color: #000437;
    line-height: 1.4;
}

.notification-time {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 4px;
}

.notification-footer {
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.view-all-notifications {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.view-all-notifications:hover {
    color: #5a67d8;
}

/* ヘルプパネル固有のスタイル */
.help-section {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.help-section:last-child {
    border-bottom: none;
}

.help-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-faq {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: #f7fafc;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.faq-item:hover {
    background: #edf2f7;
}

.faq-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #2d3748;
    gap: 10px;
}

.faq-link i:last-child {
    margin-left: auto;
    color: #a0aec0;
}

/* ========== マニュアルページ用スタイル ========== */
.manual-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    line-height: 1.8;
    color: #333;
}

.manual-content-wrapper h1 {
    font-size: 36px;
    color: #000437;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 20px;
}

.manual-content-wrapper h2 {
    font-size: 28px;
    color: #000437;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 5px solid #667eea;
}

.manual-content-wrapper h3 {
    font-size: 22px;
    color: #000437;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-left: 10px;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 5px;
}

.manual-content-wrapper p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.8;
}

.manual-content-wrapper ol {
    list-style-type: decimal;
    margin-left: 25px;
    margin-bottom: 20px;
    padding-left: 0;
}

.manual-content-wrapper ol li {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.6;
}

.manual-content-wrapper ol li:last-child {
    margin-bottom: 0;
}

.manual-content-wrapper a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.manual-content-wrapper a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.manual-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ダークモード対応 */
[data-wp-dark-mode-active="true"] .manual-content-wrapper {
    background: #2d3748;
    color: #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

[data-wp-dark-mode-active="true"] .manual-content-wrapper h1,
[data-wp-dark-mode-active="true"] .manual-content-wrapper h2,
[data-wp-dark-mode-active="true"] .manual-content-wrapper h3 {
    color: #f7fafc;
}

[data-wp-dark-mode-active="true"] .manual-content-wrapper h1 {
    border-bottom-color: #4a5568;
}

[data-wp-dark-mode-active="true"] .manual-content-wrapper h2 {
    border-left-color: #764ba2;
}

[data-wp-dark-mode-active="true"] .manual-content-wrapper h3 {
    border-bottom-color: #4a5568;
}

[data-wp-dark-mode-active="true"] .manual-content-wrapper a {
    color: #9f7aea;
}

[data-wp-dark-mode-active="true"] .manual-content-wrapper a:hover {
    color: #b794f4;
}

[data-wp-dark-mode-active="true"] .manual-image {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}