/* 
 * Multi-Business Hub - プレミアムCSSデザインシステム
 * 日本語コメント・モダンなグラデーション・ガラスモフィズムを採用
 */

:root {
    /* カラーパレット定義 */
    --bg-dark: #0a0b10;
    --bg-content: #0e111a;
    --glass-bg: rgba(25, 30, 48, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);
    
    --accent-blue: #00d2ff;
    --accent-cyan: #00d2ff;
    --accent-purple: #9d4edd;
    --accent-green: #38b000;
    --accent-orange: #ff7b00;
    --accent-emerald: #10b981;
    
    --text-primary: #f8f9fa;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;
    
    --font-sans: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-neon-blue: 0 0 15px rgba(0, 210, 255, 0.25);
    --shadow-neon-purple: 0 0 15px rgba(157, 78, 221, 0.25);
    --shadow-neon-emerald: 0 0 15px rgba(16, 185, 129, 0.25);
}

/* 基本リセット & グローバルスタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 210, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(157, 78, 221, 0.06) 0%, transparent 45%);
    background-attachment: fixed;
}

/* ガラスモフィズムの共通クラス */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-main);
}

/* アプリケーション全体レイアウト */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* サイドバーのスタイリング */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 20px;
    z-index: 100;
    border-radius: 0 24px 24px 0;
    border-left: none;
    border-top: none;
    border-bottom: none;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 20px;
    box-shadow: var(--shadow-neon-blue);
}

.logo-text h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-text span {
    font-size: 11px;
    color: var(--text-muted);
}

/* ナビゲーションメニュー */
.nav-links {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.3s, transform 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-link:hover i {
    transform: scale(1.1);
}

.nav-link.active {
    color: var(--text-primary);
    padding-left: 13px; /* ボーダー分の調整 */
}

/* サイドバーのビジネススクロールセクション */
.sidebar-section-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 25px;
    margin-bottom: 8px;
    padding-left: 16px;
    opacity: 0.6;
}

.sidebar-scroll-area {
    max-height: calc(100vh - 430px); /* プロフィールや設定が隠れないように上限を制限 */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}

/* カスタムスクロールバーのデザイン */
.sidebar-scroll-area::-webkit-scrollbar {
    width: 4px;
}
.sidebar-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}
.sidebar-scroll-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 通常時（非アクティブ）のアイコン個別カラー (不透明度 40% のうっすらとしたテーマカラー) */
.nav-link[data-tab="dashboard"] i { color: rgba(0, 210, 255, 0.4); }
.nav-link[data-tab="philosophy"] i { color: rgba(0, 210, 255, 0.4); }
.nav-link[data-tab="config"] i { color: rgba(255, 255, 255, 0.35); }
.nav-link[data-tab="lead-scout"] i { color: rgba(157, 78, 221, 0.4); }
.nav-link[data-tab="content-vender"] i { color: rgba(56, 176, 0, 0.4); }
.nav-link[data-tab="micro-saas"] i { color: rgba(255, 123, 0, 0.4); }
.nav-link[data-tab="blog-publisher"] i { color: rgba(16, 185, 129, 0.4); }

/* 各メニュー別のアクティブ＆ホバー時の個別プレミアムカラー設定 (100%鮮やかな発光) */
.nav-link[data-tab="dashboard"]:hover i, .nav-link[data-tab="dashboard"].active i {
    color: var(--accent-blue);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}
.nav-link[data-tab="dashboard"].active {
    border-left: 3px solid var(--accent-blue);
    background: linear-gradient(90deg, rgba(0, 210, 255, 0.15) 0%, rgba(157, 78, 221, 0.05) 100%);
    box-shadow: inset 0 0 10px rgba(0, 210, 255, 0.05);
}

.nav-link[data-tab="philosophy"]:hover i, .nav-link[data-tab="philosophy"].active i {
    color: var(--accent-blue);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}
.nav-link[data-tab="philosophy"].active {
    border-left: 3px solid var(--accent-blue);
    background: linear-gradient(90deg, rgba(0, 210, 255, 0.15) 0%, rgba(157, 78, 221, 0.05) 100%);
    box-shadow: inset 0 0 10px rgba(0, 210, 255, 0.05);
}

.nav-link[data-tab="config"]:hover i, .nav-link[data-tab="config"].active i {
    color: var(--text-primary);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}
.nav-link[data-tab="config"].active {
    border-left: 3px solid var(--text-secondary);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.02);
}

.nav-link[data-tab="lead-scout"]:hover i, .nav-link[data-tab="lead-scout"].active i {
    color: var(--accent-purple);
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.5);
}
.nav-link[data-tab="lead-scout"].active {
    border-left: 3px solid var(--accent-purple);
    background: linear-gradient(90deg, rgba(157, 78, 221, 0.15) 0%, rgba(157, 78, 221, 0.05) 100%);
    box-shadow: inset 0 0 10px rgba(157, 78, 221, 0.05);
}

.nav-link[data-tab="content-vender"]:hover i, .nav-link[data-tab="content-vender"].active i {
    color: var(--accent-green);
    text-shadow: 0 0 10px rgba(56, 176, 0, 0.5);
}
.nav-link[data-tab="content-vender"].active {
    border-left: 3px solid var(--accent-green);
    background: linear-gradient(90deg, rgba(56, 176, 0, 0.15) 0%, rgba(56, 176, 0, 0.05) 100%);
    box-shadow: inset 0 0 10px rgba(56, 176, 0, 0.05);
}

.nav-link[data-tab="micro-saas"]:hover i, .nav-link[data-tab="micro-saas"].active i {
    color: var(--accent-orange);
    text-shadow: 0 0 10px rgba(255, 123, 0, 0.5);
}
.nav-link[data-tab="micro-saas"].active {
    border-left: 3px solid var(--accent-orange);
    background: linear-gradient(90deg, rgba(255, 123, 0, 0.15) 0%, rgba(255, 123, 0, 0.05) 100%);
    box-shadow: inset 0 0 10px rgba(255, 123, 0, 0.05);
}

.nav-link[data-tab="blog-publisher"]:hover i, .nav-link[data-tab="blog-publisher"].active i {
    color: var(--accent-emerald);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}
.nav-link[data-tab="blog-publisher"].active {
    border-left: 3px solid var(--accent-emerald);
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    box-shadow: inset 0 0 10px rgba(16, 185, 129, 0.05);
}

.nav-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-link.disabled:hover {
    background: none;
    color: var(--text-secondary);
}

/* バッジスタイル */
.badge {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    opacity: 0.4; /* 通常時（非アクティブ）はうっすら表示して他の要素と調和 */
    transition: all 0.3s ease;
}

.nav-link:hover .badge, .nav-link.active .badge {
    opacity: 1; /* アクティブ/ホバー時にクッキリ表示 */
    transform: scale(1.05);
}

.badge-green {
    background: rgba(56, 176, 0, 0.2);
    color: #55ff00;
    border: 1px solid rgba(56, 176, 0, 0.3);
}

.badge-blue {
    background: rgba(0, 210, 255, 0.2);
    color: #a3f7ff;
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.badge-emerald {
    background: rgba(16, 185, 129, 0.2);
    color: #5effc8;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ユーザープロファイル */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    position: relative;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

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

.user-meta h4 {
    font-size: 14px;
    color: var(--text-primary);
}

.user-meta p {
    font-size: 11px;
    color: var(--text-muted);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.status-indicator.online {
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
}

/* メインコンテンツエリア */
.main-content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
    height: 100vh;
}

/* トップバーのスタイリング */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1000;
}

.welcome-msg h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.welcome-msg p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.system-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.btn-notification {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.btn-notification:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.noti-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-orange);
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-dark);
}

/* KPIカードグリッド */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 35px;
}

.kpi-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.kpi-card:hover {
    transform: translateY(-5px);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-primary);
    flex-shrink: 0;
}

.card-revenue .kpi-icon {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(0, 210, 255, 0.05));
    border: 1px solid rgba(0, 210, 255, 0.3);
    color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.1);
}

.card-active-biz .kpi-icon {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.2), rgba(157, 78, 221, 0.05));
    border: 1px solid rgba(157, 78, 221, 0.3);
    color: var(--accent-purple);
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.1);
}

.card-pending .kpi-icon {
    background: linear-gradient(135deg, rgba(255, 123, 0, 0.2), rgba(255, 123, 0, 0.05));
    border: 1px solid rgba(255, 123, 0, 0.3);
    color: var(--accent-orange);
    box-shadow: 0 0 10px rgba(255, 123, 0, 0.1);
}

.kpi-body h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.value-container {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 8px 0;
}

.value-container .currency {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.value-container .value {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.value-container .total, .value-container .unit {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 5px;
}

.trend {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend.positive {
    color: #55ff00;
}

.text-warning {
    color: #ffaa00 !important;
}

.text-green {
    color: #55ff00 !important;
}

.text-purple {
    color: #ce8eff !important;
}

.card-bg-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* メインコンテンツ分割グリッド */
.dashboard-layout-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    align-items: start;
}

/* セクションカード */
.section-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: 1px solid var(--glass-border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-group i {
    font-size: 20px;
}

.title-group h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.badge-count {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
}

.text-accent-blue { color: var(--accent-blue); }
.text-accent-purple { color: var(--accent-purple); }
.text-accent-cyan { color: var(--accent-cyan); }

/* 社長承認タスクカードリスト */
.inbox-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.task-card {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.task-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 210, 255, 0.2);
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.01);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.biz-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.tag-content {
    background: rgba(56, 176, 0, 0.15);
    color: #55ff00;
    border: 1px solid rgba(56, 176, 0, 0.2);
}

.tag-saas {
    background: rgba(255, 123, 0, 0.15);
    color: var(--accent-orange);
    border: 1px solid rgba(255, 123, 0, 0.2);
}

.tag-lead {
    background: rgba(157, 78, 221, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(157, 78, 221, 0.2);
}

.task-time {
    font-size: 11px;
    color: var(--text-muted);
}

.task-body h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.task-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.task-data {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.data-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.data-item span {
    font-size: 10px;
    color: var(--text-muted);
}

.data-item strong {
    font-size: 13px;
    color: var(--text-primary);
}

.data-item.highlight strong {
    font-size: 13px;
}

/* 下書き表示用ボックス */
.draft-box {
    margin-top: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border-left: 3px solid var(--accent-purple);
    border-radius: 0 8px 8px 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
}

/* フッターボタン操作 */
.task-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.2);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* タスク完了後のエフェクト */
.task-card.fade-out {
    opacity: 0;
    transform: scale(0.95);
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    overflow: hidden;
    border: none;
}

/* 空の状態 */
.empty-inbox {
    text-align: center;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.empty-inbox i {
    font-size: 40px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px var(--accent-green));
}

.empty-inbox h3 {
    color: var(--text-primary);
    font-size: 18px;
}

.empty-inbox p {
    color: var(--text-muted);
    font-size: 13px;
}

/* AIエージェント稼働ステータスログ */
.log-console {
    background: rgba(5, 7, 12, 0.85);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-family: 'Courier New', Courier, monospace;
    height: 250px;
    overflow-y: auto;
}

.log-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.log-row {
    font-size: 12px;
    line-height: 1.5;
    color: #a3f7ff;
}

.log-time {
    color: var(--text-muted);
}

.log-agent {
    color: var(--accent-purple);
    font-weight: bold;
}

/* パルスアニメーション */
.pulse-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-green);
    position: relative;
}

.pulse-indicator::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent-green);
    animation: pulse 1.8s infinite ease-in-out;
    top: 0;
    left: 0;
}

.live-tag {
    font-size: 9px;
    font-weight: 800;
    color: var(--accent-green);
    border: 1px solid rgba(56, 176, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 1px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(3.5);
        opacity: 0;
    }
}

/* ビジネス概況・CSSグラフ */
.mini-chart {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 15px 0;
}

.chart-bar-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chart-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.chart-label span {
    color: var(--text-secondary);
}

.chart-label strong {
    color: var(--text-primary);
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-out;
}

.bar-lead {
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-orange));
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.3);
}

/* ビジネス情報リスト */
.biz-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
}

.biz-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.biz-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* 本番アセットリスト用のプレミアムスタイリング & ホバー効果 */
.deployed-list .biz-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.deployed-list .biz-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.bg-lead { background-color: var(--accent-purple); box-shadow: 0 0 8px var(--accent-purple); }

/* モバイルレスポンシブ対応 */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 1200px) {
    /* 各コンテナが内部の幅で溢れるのを防止 */
    .dashboard-accounting-grid > div,
    .dashboard-layout-grid > section,
    .section-card {
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .dashboard-layout-grid {
        grid-template-columns: 1fr;
    }
    
    /* 画面全体の左右スクロール（横揺れ）を完全に防止 */
    html, body {
        width: 100vw;
        max-width: 100%;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }
    
    .app-layout {
        width: 100vw;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* サイドバーを非表示にし、下部ナビへ切り替える */
    .sidebar {
        display: none !important;
    }
    
    .main-content {
        padding: 16px;
        padding-bottom: calc(85px + env(safe-area-inset-bottom, 16px)) !important; /* 下部ナビ（セーフエリア含む）と重ならない十分な余白 */
        width: 100vw;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    /* 秘書要約パネルをスマホ向けに縦並びカードとして最適化 */
    .agent-summary-panel {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 16px !important;
        border-radius: 12px !important;
    }
    
    .agent-avatar-wrapper {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
    }
    
    .summary-content {
        width: 100%;
    }
    
    .summary-header {
        flex-direction: row !important;
        justify-content: space-between;
        width: 100%;
        align-items: center;
    }
    
    /* 売上テーブル等の中身のはみ出しが全体を揺らさないよう、スクロールを局所化 */
    .sales-history-container, 
    .dashboard-accounting-grid > div > div:last-child {
        width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }
    
    /* トップバーをモバイル向けにコンパクト化 */
    .top-bar {
        padding: 12px 16px;
        margin-bottom: 16px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-radius: 12px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .welcome-msg h1 {
        font-size: 18px;
    }
    
    .welcome-msg p {
        display: none; /* スマホでは説明文を非表示 */
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .system-time {
        display: none; /* スマホでは時計を非表示にして省スペース化 */
    }
    
    /* KPIカードを2カラムのコンパクト設計に変更 */
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
        margin-bottom: 20px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 推定収益カードだけは目立たせるため1カラム分を横断させる */
    .kpi-card.card-revenue {
        grid-column: span 2;
    }
    
    .kpi-card {
        padding: 14px;
        gap: 12px;
        border-radius: 12px;
    }
    
    .kpi-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .kpi-body h3 {
        font-size: 11px;
    }
    
    .value-container .value {
        font-size: 20px;
    }
    
    .value-container .currency {
        font-size: 14px;
    }
    
    .trend {
        font-size: 9px;
        margin-top: 2px;
    }
    
    /* 各ビジネス内の4連KPIグリッドもスマホでは2列に並べる */
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        width: 100%;
        box-sizing: border-box;
    }
    
    .metric-card {
        padding: 12px !important;
        border-radius: 12px !important;
    }
    
    .metric-value {
        font-size: 1.3rem !important;
    }
    
    .metric-title {
        font-size: 0.7rem !important;
    }
    
    /* コントロール操作パネル（インプット・ボタン）の縦積み化 */
    .control-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    
    .control-row > div, 
    .control-row .select-group, 
    .control-row .input-group {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .control-row button, 
    .control-row .btn {
        width: 100% !important;
        justify-content: center;
        height: 48px !important;
    }
    
    /* 承認待ちタスク（INBOX）のパラメータ（想定純利等）の縦積み化（文字潰れ防止） */
    .task-data {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        padding: 10px !important;
    }
    
    .data-item {
        flex-direction: row !important;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        padding-bottom: 4px;
    }
    
    .data-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .data-item span {
        font-size: 11px;
    }
    
    .data-item strong {
        font-size: 12px;
    }
    
    /* 【超重要】テーブル要素を完全カード化しスマホの100%幅に収めるレスポンシブトランスフォーム */
    .table-container table, 
    .table-container thead, 
    .table-container tbody, 
    .table-container th, 
    .table-container td, 
    .table-container tr,
    table[id^="table-"],
    table[id^="table-"] thead,
    table[id^="table-"] tbody,
    table[id^="table-"] th,
    table[id^="table-"] td,
    table[id^="table-"] tr {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    /* ヘッダー行を非表示にして縦の潰れを解消 */
    .table-container thead,
    table[id^="table-"] thead {
        display: none !important;
    }
    
    .table-container tbody,
    table[id^="table-"] tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    /* 1つの行（tr）を1枚のカードに変身させる */
    .table-container tr,
    table[id^="table-"] tr {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 12px;
        padding: 12px 16px;
        margin-bottom: 0;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    /* セル（td）を縦並びのリスト項目化 */
    .table-container td,
    table[id^="table-"] td {
        padding: 8px 0 !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
        text-align: left !important;
        font-size: 0.8rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }
    
    /* 最初の列（名前やタイトルなど）をカードのヘッダーとして太字で目立たせる */
    .table-container td:first-child,
    table[id^="table-"] td:first-child {
        font-size: 0.95rem;
        font-weight: 700;
        color: #fff;
        padding-bottom: 10px !important;
        margin-bottom: 6px;
        display: block; /* タイトル行は1行まるごと使う */
    }
    
    .table-container td:first-child > div,
    table[id^="table-"] td:first-child > div {
        justify-content: flex-start !important;
    }
    
    /* 最後の列（アクションボタン等）はカードフッターとしてボーダーで区切る */
    .table-container td:last-child,
    table[id^="table-"] td:last-child {
        border-bottom: none !important;
        padding-top: 10px !important;
        margin-top: 6px;
        justify-content: center; /* ボタンは中央に */
    }
    
    /* アクションボタンをスマホサイズに全幅化 */
    .table-container td:last-child .btn,
    table[id^="table-"] td:last-child .btn {
        width: 100% !important;
        justify-content: center;
        padding: 8px 0;
    }
    
    /* 会計・売上分析のレイアウトを縦並びにする */
    .dashboard-accounting-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        margin-bottom: 20px !important;
        width: 100%;
        box-sizing: border-box;
    }
    
    .dashboard-layout-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 円グラフの凡例を折り返し対応 */
    .chart-legend {
        flex-wrap: wrap;
        justify-content: center !important;
        gap: 10px 16px !important;
        padding-top: 12px !important;
    }
    
    /* モバイル時のグリッド1カラム化強制設定 */
    .philosophy-core-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    /* テーブルカード内のはみ出しテキストを綺麗に折り返す */
    .table-container td .lead-text,
    table[id^="table-"] td .lead-text {
        white-space: normal !important;
        word-break: break-all !important;
        max-width: 100% !important;
        font-size: 0.8rem;
    }
    
    /* スマホ専用下部ナビゲーションバーのプレミアム化（セーフエリア・タップ領域改善） */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: auto; /* 高さはパディングで動的確保 */
        padding-top: 10px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 16px)); /* iOSセーフエリア対応で押しやすさを極限まで改善 */
        background: rgba(10, 12, 22, 0.92);
        backdrop-filter: blur(25px) saturate(180%);
        -webkit-backdrop-filter: blur(25px) saturate(180%);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 9999;
        justify-content: space-around;
        align-items: center;
        padding-left: 8px;
        padding-right: 8px;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
        box-sizing: border-box;
    }
    
    .mobile-bottom-nav .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 10px; /* 見やすさ向上のため拡大 */
        font-weight: 600;
        flex: 1; /* 6等分に完璧にフィット */
        height: 52px; /* タップ領域を縦方向に拡張し押しやすさを極限まで向上 */
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        background: none !important;
        border: none !important;
        border-radius: 8px !important;
        padding: 0 !important;
        box-shadow: none !important;
        -webkit-tap-highlight-color: transparent; /* タップ時の青い枠を消す */
    }
    
    .mobile-bottom-nav .nav-link i {
        font-size: 20px; /* 見やすさ向上のため拡大 */
        transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    
    .mobile-bottom-nav .nav-link.active {
        color: #ce8eff; /* より鮮やかなパープル */
    }
    
    .mobile-bottom-nav .nav-link.active i {
        transform: translateY(-4px) scale(1.1); /* 選択時によりダイナミックに浮き上がらせる */
        filter: drop-shadow(0 0 8px rgba(157, 78, 221, 0.8));
    }
    
    /* アクティブなアイテムの上部に細いインジケータラインを表示 */
    .mobile-bottom-nav .nav-link.active::before {
        content: "";
        position: absolute;
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 16px;
        height: 3px;
        background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
        border-radius: 2px;
        box-shadow: 0 0 8px var(--accent-purple);
    }
    
    /* バッジを下部ナビに重ねるためのデザイン（ドット化して混雑を回避） */
    .mobile-bottom-nav .nav-link .badge {
        position: absolute;
        top: 4px;
        right: calc(50% - 16px); /* アイコンの右上(アイコンの半分位置から右へ16px) */
        margin: 0;
        width: 8px;
        height: 8px;
        padding: 0 !important;
        font-size: 0 !important; /* 文字を完全に非表示 */
        border-radius: 50% !important; /* 丸いドット */
        box-shadow: 0 0 6px currentColor;
        opacity: 1 !important;
        transform: none !important;
        border: 1px solid #0a0c16 !important; /* ナビ背景と同色のボーダーで浮き立たせる */
    }

    /* ログコンソールのはみ出し防止 */
    .log-console {
        overflow-x: hidden !important;
    }
    .log-row {
        word-break: break-all !important;
        white-space: pre-wrap !important;
    }
    
    /* セクションカードのスマホ向けパディング縮小 */
    .section-card {
        padding: 16px !important;
        gap: 12px !important;
    }

    /* デプロイ済みアセットのはみ出し防止 */
    .deployed-list .biz-item {
        min-width: 0 !important;
        gap: 8px !important;
    }
    .deployed-list .biz-item .biz-info {
        min-width: 0 !important;
        flex: 1 !important;
    }
    .deployed-list .biz-item strong {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 140px !important;
    }
    
    /* 20ビジネスのカード（ポートフォリオ）へのホバー・タップ用スタイル */
    .portfolio-item-card.active {
        cursor: pointer;
    }
    .portfolio-item-card.active:hover {
        background: rgba(157, 78, 221, 0.08) !important;
        border-color: var(--accent-purple) !important;
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(157, 78, 221, 0.15);
    }

    /* 動的データ描画時のはみ出しを徹底防止するコンテナサイズ制御 */
    .task-card,
    .sales-log-card,
    .deployed-list .biz-item,
    .sales-history-list,
    .sales-history-container,
    .inbox-list {
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 動的テキスト要素の自動折り返し強制 */
    .task-desc,
    .draft-box,
    .log-row,
    .sales-log-card span,
    .deployed-list .biz-item strong,
    .deployed-list .biz-item span {
        word-break: break-all !important;
        white-space: normal !important;
    }
}


/* ==========================================================================
   LeadScout AI - Design System Integration
   ========================================================================== */

:root {
    /* LeadScout AI 用のカラー・エフェクト変数 */
    --primary: hsl(250, 85%, 65%);
    --primary-glow: hsla(250, 85%, 65%, 0.25);
    --secondary: hsl(175, 85%, 45%);
    --secondary-glow: hsla(175, 85%, 45%, 0.25);
    --accent-red: hsl(355, 85%, 60%);
    --border-color: hsla(224, 20%, 26%, 0.4);
    --border-hover: hsla(224, 20%, 36%, 0.6);
    --glass-blur: blur(12px);
}

/* 業務指標ダッシュボード */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.metric-card {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: var(--glass-blur);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: background 0.3s;
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-main);
}

.metric-card:hover::before {
    background: var(--accent-purple);
}

.metric-card.highlight:hover::before {
    background: var(--accent-blue);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--accent-purple);
}

.metric-card.highlight .metric-icon {
    color: var(--accent-blue);
}

.metric-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.metric-delta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.metric-delta.positive {
    color: var(--accent-blue);
}

.metric-delta.neutral {
    color: var(--text-muted);
}

/* メインワークプレイス（検索とテーブル） */
.workspace-card {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-main);
}

/* タブボタン構造 */
.tab-header {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* コントロール群 */
.control-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 1.25rem;
    color: var(--text-muted);
}

.main-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.main-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.25);
}

.select-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 240px;
}

.select-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.custom-select {
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.custom-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.25);
}

/* リードテーブルリスト */
#lead-scout-view table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

#lead-scout-view th {
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
}

#lead-scout-view td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
    vertical-align: middle;
    color: var(--text-secondary);
}

#lead-scout-view tr {
    transition: background-color 0.2s;
}

#lead-scout-view tr:hover td {
    background-color: rgba(255, 255, 255, 0.015);
}

.lead-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lead-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.lead-username {
    font-weight: 600;
    color: var(--text-primary);
}

.lead-source-tag {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.lead-text {
    max-width: 420px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
}

.analysis-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.analysis-badge.hot {
    background-color: rgba(34, 197, 94, 0.1);
    color: #55ff00;
}

.analysis-badge.warm {
    background-color: rgba(234, 179, 8, 0.1);
    color: #ffaa00;
}

.analysis-badge.cold {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ff5555;
}

/* モーダル表示 (DMテンプレート) */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 15, 30, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

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

.modal-card {
    background-color: var(--bg-content);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    padding: 2rem;
    box-shadow: var(--shadow-main);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.textarea-wrapper {
    position: relative;
}

.dm-textarea {
    width: 100%;
    height: 200px;
    padding: 1.25rem;
    background-color: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.6;
    outline: none;
    resize: none;
    transition: border-color 0.3s;
}

.dm-textarea:focus {
    border-color: var(--accent-blue);
}

/* ローディングと空ステート */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 2rem;
    color: var(--text-muted);
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--glass-border) 0%, rgba(255,255,255,0.05) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 11, 16, 0.85);
    backdrop-filter: blur(4px);
    z-index: 5;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--accent-purple);
    border-bottom-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

.loading-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, var(--text-primary) 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textPulse 1.5s infinite ease-in-out;
}

/* アニメーションキーフレーム */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes textPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes modalScaleUp {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* 業務指標ダッシュボードの点滅 */
.highlight-effect {
    animation: metricPulse 0.8s ease-out;
}

@keyframes metricPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 210, 255, 0); }
    30% { transform: scale(1.05); box-shadow: 0 0 20px rgba(0, 210, 255, 0.25); border-color: var(--accent-blue); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 210, 255, 0); }
}

/* --- 売上上昇時のキラリと光るエフェクト --- */
@keyframes revenue-glow {
    0% {
        box-shadow: var(--shadow-main);
        text-shadow: none;
    }
    50% {
        box-shadow: 0 0 25px rgba(245, 158, 11, 0.6), inset 0 0 15px rgba(245, 158, 11, 0.3);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(245, 158, 11, 0.8);
        transform: scale(1.05);
        border-color: #f59e0b;
    }
    100% {
        box-shadow: var(--shadow-main);
        text-shadow: none;
    }
}
.revenue-animating {
    animation: revenue-glow 0.8s ease-in-out;
}

/* トースト通知 */
.toast {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    color: #fff;
    min-width: 280px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}
.toast-icon {
    font-size: 1.5rem;
    color: #10b981;
}
.toast-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
}
.toast-msg {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* データ直販モーダル */
#direct-sale-modal input:focus, #direct-sale-modal select:focus {
    border-color: var(--accent-blue);
}

/* ==========================================================================
   管理者ログイン画面 (認証用) Styles
   ========================================================================== */

.app-layout.logged-out {
    filter: blur(15px);
    pointer-events: none;
    transition: filter 0.5s ease;
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 10, 18, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.login-overlay.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    width: 90%;
    max-width: 420px;
    padding: 40px 35px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.02);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.05) 0%, rgba(157, 78, 221, 0.05) 50%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.login-card * {
    position: relative;
    z-index: 1;
}

.login-header {
    margin-bottom: 30px;
}

.login-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 15px;
    box-shadow: 0 8px 24px rgba(157, 78, 221, 0.3);
}

.login-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.login-error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ff5555;
    font-size: 0.8rem;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: left;
}

.login-card .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-card .form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.login-card .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-card .input-wrapper i {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-card .input-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 42px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.login-card .input-wrapper input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(157, 78, 221, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(0, 210, 255, 0.4);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    color: #ff5555;
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-top: 15px;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ff3333;
}

.philosophy-core-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 経営理念 & 20のビジネスポートフォリオ スタイリング */
.philosophy-core-grid .section-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.philosophy-core-grid .section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    background: rgba(25, 30, 48, 0.6);
}

.portfolio-grid .portfolio-item-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-grid .portfolio-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.portfolio-grid .portfolio-item-card.active:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.05);
}

.portfolio-grid .portfolio-item-card.locked {
    position: relative;
    cursor: not-allowed;
}

.portfolio-grid .portfolio-item-card.locked::before {
    content: '\f023'; /* FontAwesome lock icon code */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.2rem;
    color: var(--text-muted);
    opacity: 0.3;
    transition: all 0.3s;
}

.portfolio-grid .portfolio-item-card.locked:hover::before {
    opacity: 0.7;
    color: var(--accent-orange);
    transform: scale(1.1);
}

/* ==========================================================================
   AI自律組織図（AI Org Chart）スタイリング定義
   ========================================================================== */
.org-chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    position: relative;
    width: 100%;
}

.org-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 30px;
}

.row-ceo {
    margin-bottom: 5px;
}

.row-middle {
    margin: 10px 0;
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: space-around;
}

.row-agents {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 1000px;
}

/* 組織図ノードカード */
.org-node {
    background: rgba(20, 25, 40, 0.65);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    width: 100%;
    max-width: 400px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.org-node:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    background: rgba(25, 30, 48, 0.8);
}

/* ノード個別テーマカラー & ネオンシャドウ */
.node-ceo {
    border-top: 3px solid #ffd700;
    box-shadow: 0 0 15px rgba(253, 215, 0, 0.05);
}
.node-ceo:hover {
    box-shadow: 0 0 25px rgba(253, 215, 0, 0.15);
    border-color: #ffe033;
}

.node-cto {
    border-top: 3px solid var(--accent-orange);
    box-shadow: 0 0 15px rgba(255, 123, 0, 0.05);
}
.node-cto:hover {
    box-shadow: 0 0 25px rgba(255, 123, 0, 0.15);
    border-color: #ff9d33;
}

.node-controller {
    border-top: 3px solid var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.05);
}
.node-controller:hover {
    box-shadow: 0 0 25px rgba(0, 210, 255, 0.15);
    border-color: #33e0ff;
}

.node-auditor {
    border-top: 3px solid #ff4444;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.05);
}
.node-auditor:hover {
    box-shadow: 0 0 25px rgba(255, 68, 68, 0.15);
    border-color: #ff6666;
}

.node-business-agent {
    max-width: 100%;
}
.node-business-agent:hover {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

/* ノード内パーツ */
.org-node .node-icon {
    font-size: 24px;
    min-width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.node-ceo .node-icon { color: #ffd700; background: rgba(253, 215, 0, 0.05); }
.node-controller .node-icon { color: var(--accent-cyan); background: rgba(0, 210, 255, 0.05); }
.node-auditor .node-icon { color: #ff4444; background: rgba(255, 68, 68, 0.05); }

.org-node .node-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.org-node .node-body h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.org-node .node-role {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.org-node .node-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 4px;
}

/* 接続コネクター線 */
.org-connector-down {
    color: var(--text-muted);
    font-size: 16px;
    height: 30px;
    display: flex;
    align-items: center;
    opacity: 0.6;
}

.org-connector-horizontal {
    color: var(--text-muted);
    font-size: 20px;
    display: flex;
    align-items: center;
    opacity: 0.6;
}

.org-connector-split {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 10px 0;
}

.org-connector-split .split-line {
    width: 66%;
    height: 1px;
    background: var(--glass-border);
    position: relative;
}

.org-connector-split .split-arrows {
    display: flex;
    justify-content: space-between;
    width: 66%;
    margin-top: 5px;
}

.org-connector-split .split-arrows span {
    color: var(--text-muted);
    font-size: 14px;
    opacity: 0.5;
}

/* モバイル・レスポンシブ対応 */
@media (max-width: 1200px) {
    .org-chart-container {
        padding: 10px 0;
    }
    .org-row {
        flex-direction: column;
        gap: 15px;
        width: 100% !important;
    }
    .row-middle {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        width: 100% !important;
        max-width: 100% !important;
    }
    .org-node {
        margin: 5px 0;
        width: 100% !important;
        max-width: 100% !important;
    }
    .org-connector-horizontal {
        transform: rotate(90deg);
        height: 20px;
        display: block !important;
        margin: 5px 0;
    }
    .org-connector-split {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin: 10px 0 !important;
    }
    .org-connector-split .split-line {
        display: none !important;
    }
    .org-connector-split .split-arrows {
        display: flex !important;
        justify-content: center !important;
        width: auto !important;
        margin-top: 0 !important;
        flex-direction: row !important;
        gap: 0 !important;
    }
    .org-connector-split .split-arrows span {
        display: none !important;
    }
    .org-connector-split .split-arrows span:first-child {
        display: inline-block !important;
        font-size: 16px !important;
        opacity: 0.6 !important;
    }
    .row-agents {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        width: 100% !important;
    }
}
/* Auto-Pilot Toggle Switch Style */
.switch-container {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-container .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    transition: .3s;
    border-radius: 24px;
}

.switch-container input:checked + .slider {
    background-color: var(--accent-cyan) !important;
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
}

.switch-container .slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.switch-container input:checked + .slider::before {
    transform: translateX(22px);
}

/* ==========================================================================
   Agent Brain & Context Compaction Premium Styling
   ========================================================================== */

.agent-brain-panel {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.brain-meter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.brain-meter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
}

.brain-meter-title {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.brain-meter-value {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.brain-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.brain-progress-bar {
    height: 100%;
    border-radius: 3px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s ease;
}

/* 脳負荷メーターの色状態 */
.brain-progress-bar.ok {
    background: linear-gradient(90deg, #00f2fe, #4facfe);
    box-shadow: 0 0 6px rgba(79, 172, 254, 0.5);
}

.brain-progress-bar.warning {
    background: linear-gradient(90deg, #f12711, #f5af19);
    box-shadow: 0 0 6px rgba(245, 175, 25, 0.5);
}

.brain-progress-bar.danger {
    background: linear-gradient(90deg, #ff0844, #ffb199);
    box-shadow: 0 0 8px rgba(255, 8, 68, 0.8);
    animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
    0% { opacity: 0.7; box-shadow: 0 0 4px rgba(255, 8, 68, 0.5); }
    100% { opacity: 1; box-shadow: 0 0 10px rgba(255, 8, 68, 0.9); }
}

/* 80%以上限界状態でのエージェントカード赤枠警告点滅 */
.org-node.brain-overloaded {
    border: 1px solid rgba(255, 8, 68, 0.5) !important;
    animation: redNeonPulse 2s infinite ease-in-out;
}

@keyframes redNeonPulse {
    0% {
        box-shadow: 0 0 5px rgba(255, 8, 68, 0.1), inset 0 0 5px rgba(255, 8, 68, 0.05);
        border-color: rgba(255, 8, 68, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 8, 68, 0.4), inset 0 0 8px rgba(255, 8, 68, 0.15);
        border-color: rgba(255, 8, 68, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 8, 68, 0.1), inset 0 0 5px rgba(255, 8, 68, 0.05);
        border-color: rgba(255, 8, 68, 0.3);
    }
}

/* コンパクションボタン */
.btn-compact {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-top: 4px;
}

.btn-compact:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-compact.active-needed {
    background: linear-gradient(135deg, rgba(255, 8, 68, 0.15), rgba(255, 177, 153, 0.15));
    border: 1px solid rgba(255, 8, 68, 0.4);
    color: #ffb199;
    box-shadow: 0 0 8px rgba(255, 8, 68, 0.1);
    animation: btnBreath 2s infinite ease-in-out;
}

.btn-compact.active-needed:hover {
    background: linear-gradient(135deg, rgba(255, 8, 68, 0.3), rgba(255, 177, 153, 0.3));
    border-color: rgba(255, 8, 68, 0.8);
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 8, 68, 0.3);
}

@keyframes btnBreath {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* 処理中の回転アニメーション */
.spinning {
    animation: spin 1s linear infinite;
}

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

/* ホバーツールチップ用ポップオーバー */
.brain-rules-tooltip {
    display: none;
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 100;
    pointer-events: none;
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    transition: opacity 0.3s;
}

.brain-rules-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(10, 15, 30, 0.95) transparent transparent transparent;
}

.brain-meter-wrapper:hover .brain-rules-tooltip {
    display: block;
    animation: fadeInTooltip 0.2s ease-out;
}

@keyframes fadeInTooltip {
    from { opacity: 0; transform: translate(-50%, 8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.tooltip-title {
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 4px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tooltip-list {
    margin: 0;
    padding-left: 12px;
    text-align: left;
}

.tooltip-list li {
    margin-bottom: 4px;
}

