* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* モード選択スタイル */
.mode-selection-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 40px 20px;
}

.mode-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-color: #667eea;
}

.mode-card h3 {
    color: #333;
    font-size: 1.5em;
    margin: 15px 0 10px 0;
}

.mode-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.mode-description {
    color: #666;
    font-size: 1em;
    margin-bottom: 20px;
    line-height: 1.6;
}

.mode-features {
    list-style: none;
    text-align: left;
    margin: 20px 0;
    padding: 0;
}

.mode-features li {
    color: #555;
    font-size: 0.95em;
    margin: 10px 0;
    padding-left: 10px;
}

.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.mode-select-btn {
    background: linear-gradient(135deg, #132131 0%, #1e2f3f 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.mode-ranking-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.mode-ranking-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 87, 108, 0.4);
}

.mode-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #132131 0%, #1e2f3f 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #132131 0%, #1e2f3f 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

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

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 20px;
}

.auth-section {
    margin-top: 20px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.tab-button {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tab-button.active {
    background: white;
    color: #667eea;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
    margin: 0 auto;
}

.auth-form input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
}

.auth-form button {
    padding: 10px 20px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-form button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

.user-info button {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.main-content {
    padding: 40px;
}

.step-section {
    display: none;
}

.step-section.active {
    display: block;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.step-section h2 {
    color: #667eea;
    font-size: 2em;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

/* モード選択に戻るボタン */
.btn-back-to-mode {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-back-to-mode:hover {
    background: #e8e8e8;
    border-color: #999;
    color: #333;
    transform: translateX(-2px);
}

.btn-back-to-mode:active {
    transform: translateX(-1px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
}

.btn-primary {
    padding: 12px 30px;
    background: linear-gradient(135deg, #132131 0%, #1e2f3f 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 10px;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    padding: 12px 30px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 10px;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.result-box {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-box {
    padding: 15px;
    background: #e7f3ff;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #0056b3;
}

.error-message {
    color: #dc3545;
    margin-top: 10px;
    padding: 10px;
    background: #f8d7da;
    border-radius: 5px;
}

.success-message {
    color: #28a745;
    font-weight: bold;
    margin-bottom: 15px;
}

/* SPIN質問表示 */
.spin-questions {
    margin-top: 20px;
}

.spin-category {
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.spin-category h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.spin-category ul {
    list-style: none;
    padding-left: 0;
}

.spin-category li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.spin-category li:last-child {
    border-bottom: none;
}

/* チャット画面 */
.chat-container {
    max-width: 800px;
    margin: 0 auto;
}

/* 企業概要表示（チャット画面の上部） */
.company-summary {
    background: #f0f7ff;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.company-summary-header {
    margin-bottom: 15px;
}

.company-summary-header h3 {
    color: #667eea;
    font-size: 1.2em;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.company-summary-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.company-summary-item {
    color: #333;
    font-size: 0.95em;
    line-height: 1.6;
}

.company-summary-item strong {
    color: #555;
    margin-right: 8px;
}

/* 商談成功率パネル（詳細診断モード用） */
.success-meter {
    background: linear-gradient(135deg, #132131 0%, #1e2f3f 100%);
    border: 2px solid #132131;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 4px 6px rgba(19, 33, 49, 0.3);
}

.success-meter-header {
    margin-bottom: 15px;
}

.success-meter-header h3 {
    color: white;
    font-size: 1.2em;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.success-meter-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.success-probability-display {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 10px;
}

.success-probability-value {
    font-size: 3em;
    font-weight: bold;
    color: white;
    line-height: 1;
}

.success-probability-unit {
    font-size: 1.5em;
    color: rgba(255, 255, 255, 0.9);
    margin-left: 5px;
}

.success-delta-display {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    animation: slideIn 0.3s ease-out;
}

.success-delta-value {
    font-size: 1.5em;
    font-weight: bold;
}

.success-delta-value.positive {
    color: #4ade80;
}

.success-delta-value.negative {
    color: #f87171;
}

.success-delta-unit {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
}

.success-reason-display {
    padding: 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    margin-top: 5px;
}

.success-reason-text {
    color: white;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0;
}

.success-spin-meta {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.success-spin-item {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9em;
    line-height: 1.4;
    margin: 0;
}

.success-system-notes {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.9em;
    line-height: 1.5;
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.success-probability-value.updating {
    animation: pulse 0.5s ease-in-out;
}

/* 企業情報表示（詳細診断モードのステップ1） */
.company-info-display {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.company-info-item {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

.company-info-item strong {
    color: #667eea;
    margin-right: 10px;
}

.form-help {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

.chat-messages {
    height: 500px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
    margin-bottom: 20px;
}

.message {
    margin-bottom: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    max-width: 70%;
    word-wrap: break-word;
}

.message.salesperson {
    background: #132131;
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.customer {
    background: #e0e0e0;
    color: #333;
    margin-right: auto;
}

.message-header {
    font-size: 0.8em;
    opacity: 0.8;
    margin-bottom: 5px;
}

.message-content {
    font-size: 1em;
    line-height: 1.5;
}

/* 有償プランへの誘導メッセージ */
.upgrade-message {
    margin: 20px auto;
    max-width: 70%;
    text-align: center;
}

.upgrade-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.upgrade-text {
    font-size: 1.1em;
    margin-bottom: 15px;
    font-weight: 500;
}

.upgrade-button {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.upgrade-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #f0f0f0;
}

.chat-input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.chat-input-area input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.btn-mic {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
}

.btn-mic:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.btn-mic.recording {
    background: #dc3545;
    animation: pulse 1.5s infinite;
}

.btn-mic.recording:hover {
    background: #c82333;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.recording-time {
    color: #dc3545;
    font-weight: bold;
    font-size: 14px;
    min-width: 50px;
    text-align: center;
}

.chat-actions {
    text-align: center;
}

/* スコアリング結果 */
.scoring-result {
    margin-top: 20px;
}

.score-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.score-total {
    text-align: center;
    font-size: 3em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 20px;
}

.score-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.score-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.score-item-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.score-item-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #667eea;
}

.feedback-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.feedback-section h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.feedback-text {
    line-height: 1.8;
    color: #333;
}

/* セッション一覧 */
.session-list {
    margin-top: 20px;
}

.session-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.session-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.session-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.session-item-id {
    font-family: monospace;
    color: #666;
    font-size: 0.9em;
}

.session-item-status {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
}

.session-item-status.active {
    background: #28a745;
    color: white;
}

.session-item-status.finished {
    background: #6c757d;
    color: white;
}

.session-item-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
    color: #666;
}

.action-buttons {
    margin-top: 30px;
    text-align: center;
}

/* ローディング */
.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* ログビューアー */
.log-viewer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60vh;
    background: white;
    border-top: 3px solid #667eea;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.log-viewer-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-viewer-header h2 {
    margin: 0;
    color: #667eea;
    font-size: 1.2em;
}

.log-viewer-actions {
    display: flex;
    gap: 10px;
}

.log-viewer-filters {
    padding: 10px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 15px;
    font-size: 0.9em;
}

.log-viewer-filters label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.log-viewer-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
}

.log-entry {
    padding: 8px 12px;
    margin-bottom: 5px;
    border-left: 4px solid #ccc;
    border-radius: 4px;
    background: #f8f9fa;
}

.log-entry.log-info {
    border-left-color: #17a2b8;
    background: #e7f3ff;
}

.log-entry.log-warning {
    border-left-color: #ffc107;
    background: #fff3cd;
}

.log-entry.log-error {
    border-left-color: #dc3545;
    background: #f8d7da;
}

.log-entry.log-debug {
    border-left-color: #6c757d;
    background: #e9ecef;
}

.log-header {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
    font-weight: bold;
}

.log-level {
    color: #667eea;
}

.log-time {
    color: #666;
    font-size: 0.9em;
}

.log-message {
    margin-bottom: 5px;
    white-space: pre-wrap;
    word-break: break-word;
}

.log-data {
    margin-top: 5px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    font-size: 0.85em;
    max-height: 200px;
    overflow-y: auto;
}

.log-viewer-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    border: 3px solid white;
    font-size: 1.8em;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    z-index: 999;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.log-viewer-toggle:hover {
    background: #5568d3;
    transform: scale(1.15);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
}

.log-viewer-toggle:active {
    transform: scale(1.05);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .container {
        border-radius: 0;
        margin: 0;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .message {
        max-width: 85%;
    }
    
    .score-details {
        grid-template-columns: 1fr;
    }
}

/* ランキングスタイル */
.ranking-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.ranking-empty {
    text-align: center;
    padding: 40px;
    color: #666;
}

.ranking-empty p {
    margin: 10px 0;
    font-size: 1.1em;
}

.ranking-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ranking-table thead {
    background: linear-gradient(135deg, #132131 0%, #1e2f3f 100%);
    color: white;
}

.ranking-table th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
    font-size: 1em;
}

.ranking-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.ranking-table tbody tr:hover {
    background-color: #f5f5f5;
}

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

.rank-1 {
    background-color: #fff9e6 !important;
}

.rank-1 .rank-cell {
    font-weight: bold;
    color: #ffd700;
    font-size: 1.2em;
}

.rank-2 {
    background-color: #f0f0f0 !important;
}

.rank-2 .rank-cell {
    font-weight: bold;
    color: #c0c0c0;
    font-size: 1.1em;
}

.rank-3 {
    background-color: #ffe4d6 !important;
}

.rank-3 .rank-cell {
    font-weight: bold;
    color: #cd7f32;
    font-size: 1.1em;
}

.rank-cell {
    font-weight: bold;
    text-align: center;
    width: 60px;
}

.username-cell {
    font-weight: 500;
    color: #333;
}

.score-cell {
    text-align: right;
    font-weight: 500;
    color: #555;
}

.score-cell.composite {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1em;
}

.count-cell {
    text-align: center;
    color: #666;
}

.industry-cell,
.company-cell {
    font-weight: 500;
    color: #444;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.date-cell {
    font-size: 0.9em;
    color: #666;
    white-space: nowrap;
}

.score-cell.total {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1em;
}

/* クロージング提案スタイル */
.closing-proposal {
    background: linear-gradient(135deg, #132131 0%, #1e2f3f 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 4px 8px rgba(19, 33, 49, 0.3);
    animation: slideIn 0.3s ease-out;
}

.closing-proposal-header {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.closing-proposal-content {
    font-size: 1em;
    line-height: 1.6;
}

.closing-proposal-content p {
    margin: 8px 0;
}

.closing-proposal-content strong {
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
}

/* クロージングフェーズインジケーター */
.closing-phase-indicator {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
    animation: pulse 2s infinite;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 温度スコア表示スタイル */
.temperature-icon {
    display: inline-block;
    margin-left: 8px;
    font-size: 1.2em;
    font-weight: bold;
}

.temperature-icon.temp-up {
    color: #28a745;
}

.temperature-icon.temp-down {
    color: #dc3545;
}

.temperature-icon.temp-same {
    color: #6c757d;
}

.temperature-score-panel {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.temperature-gauge-container {
    flex-shrink: 0;
    text-align: center;
}

.temperature-gauge-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    font-weight: bold;
}

.temperature-gauge {
    width: 120px;
    height: 120px;
}

.gauge-svg {
    width: 100%;
    height: 100%;
}

.gauge-text {
    font-size: 24px;
    font-weight: bold;
    fill: #667eea;
}

.temperature-chart-container {
    flex: 1;
    height: 100px;
}

.temperature-chart-container canvas {
    width: 100%;
    height: 100%;
}

/* 失注（Loss Case）スタイル */
.loss-response {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 4px 8px rgba(245, 87, 108, 0.3);
    animation: slideIn 0.3s ease-out;
}

.loss-response-header {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.loss-response-content {
    font-size: 1em;
    line-height: 1.6;
}

.loss-response-content p {
    margin: 8px 0;
}

.loss-response-content strong {
    font-size: 1.05em;
    display: inline-block;
    margin-right: 5px;
}

/* 失注フェーズインジケーター */
.loss-phase-indicator {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
    animation: pulse 2s infinite;
}

@media (max-width: 768px) {
    .ranking-table {
        font-size: 0.9em;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 8px;
    }
    
    .mode-buttons {
        flex-direction: column;
    }
}

/* ダッシュボードスタイル */
.dashboard-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

/* 統計カードグリッド */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #132131 0%, #1e2f3f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 1.6em;
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-top: 4px;
}

/* ダッシュボードセクション */
.dashboard-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
}

.dashboard-section h3 {
    color: #333;
    font-size: 1.2em;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-section h3 i {
    color: #667eea;
}

/* 直近のセッション履歴リスト */
.recent-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-session-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.recent-session-item:hover {
    background: #f0f4ff;
    border-color: #667eea;
}

.recent-session-date {
    font-size: 0.85em;
    color: #888;
    min-width: 100px;
    flex-shrink: 0;
}

.recent-session-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: hidden;
}

.recent-session-industry {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-session-mode {
    font-size: 0.8em;
    padding: 3px 8px;
    border-radius: 4px;
    background: #e8e8e8;
    color: #666;
    flex-shrink: 0;
}

.recent-session-mode.simple {
    background: #e7f3ff;
    color: #0056b3;
}

.recent-session-mode.detailed {
    background: #f0e7ff;
    color: #6f42c1;
}

.recent-session-score {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1em;
    min-width: 60px;
    text-align: right;
    flex-shrink: 0;
}

.recent-session-score.no-score {
    color: #aaa;
    font-weight: normal;
    font-size: 0.9em;
}

/* 設定セクション（Coming Soon） */
.settings-section {
    opacity: 0.85;
}

.settings-placeholder {
    padding: 30px;
    text-align: center;
    color: #888;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #e0e0e0;
}

.settings-placeholder i {
    font-size: 2em;
    margin-bottom: 10px;
    color: #bbb;
    display: block;
}

.settings-placeholder p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.6;
}

.coming-soon-badge {
    font-size: 0.7em;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #d35400;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    vertical-align: middle;
    margin-left: 8px;
}

.loading-text {
    color: #888;
    text-align: center;
    padding: 20px;
}

.empty-sessions-message {
    text-align: center;
    padding: 30px;
    color: #888;
}

.empty-sessions-message i {
    font-size: 2.5em;
    color: #ddd;
    margin-bottom: 15px;
    display: block;
}

.empty-sessions-message p {
    margin: 5px 0;
}

.empty-sessions-message .btn-primary {
    margin-top: 15px;
}

/* ダッシュボードレスポンシブ */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 1.6em;
    }
    
    .recent-session-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .recent-session-date {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .recent-session-info {
        flex-wrap: wrap;
    }
}

/* ====================================
   チャット画面 - 2カラムレイアウト
   ==================================== */
.chat-two-column {
    display: flex;
    gap: 20px;
    height: 100%;
    overflow: hidden;
}

.chat-left-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-right-column {
    width: 350px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    padding-right: 10px;
}

.chat-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #132131 0%, #1e2f3f 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.2em;
}

/* 企業概要サイドバー */
.company-summary-sidebar {
    background: #f0f7ff;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.9em;
}

.company-summary-sidebar h4 {
    color: #667eea;
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

/* 成功率パネルサイドバー */
.success-meter-sidebar {
    background: linear-gradient(135deg, #132131 0%, #1e2f3f 100%);
    border: 2px solid #132131;
    border-radius: 8px;
    padding: 15px;
    color: white;
}

.success-meter-sidebar .success-meter-header h3 {
    color: white;
    font-size: 1.1em;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.success-meter-sidebar .success-probability-value {
    font-size: 2.5em;
    font-weight: bold;
    color: white;
}

/* アクションボタンサイドバー */
.chat-actions-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* チャット2カラムモバイル対応 */
@media (max-width: 1024px) {
    .chat-two-column {
        flex-direction: column;
    }

    .chat-right-column {
        width: 100%;
        max-height: 300px;
    }
}

/* ====================================
   サイドバーメニュー
   ==================================== */

/* アプリ全体のレイアウト */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* サイドバー */
.sidebar {
    width: 60px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
}

.sidebar-logo {
    margin-bottom: 30px;
    padding: 10px;
}

.sidebar-logo-icon {
    font-size: 1.8em;
}

.sidebar-logo-img {
    width: 40px;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.sidebar-item {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1.2em;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-item.active {
    background: linear-gradient(135deg, #132131 0%, #1e2f3f 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(19, 33, 49, 0.4);
}

/* ツールチップ */
.sidebar-tooltip {
    position: absolute;
    left: 60px;
    background: #1a1a2e;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sidebar-item:hover .sidebar-tooltip {
    opacity: 1;
    visibility: visible;
    left: 70px;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* メインラッパー（サイドバー分のオフセット） */
.main-wrapper {
    flex: 1;
    margin-left: 60px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* コンテナの調整 */
.main-wrapper .container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
}

/* サイドバーモバイル対応 */
@media (max-width: 768px) {
    .sidebar {
        width: 50px;
        padding: 10px 0;
    }
    
    .sidebar-item {
        width: 38px;
        height: 38px;
        font-size: 1em;
    }
    
    .sidebar-logo-icon {
        font-size: 1.4em;
    }
    
    .main-wrapper {
        margin-left: 50px;
    }
    
    .sidebar-tooltip {
        display: none;
    }
}

/* モーダル */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

/* ヘッダー調整（サイドバー付きレイアウト用） */
.header {
    background: linear-gradient(135deg, #132131 0%, #1e2f3f 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
}

.logo-icon {
    font-size: 1.3em;
}

.logo-text {
    color: white;
}

.header-logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

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

.header-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: white;
    font-weight: 500;
}

.header-auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-login,
.btn-register {
    padding: 8px 20px;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover,
.btn-register:hover {
    background: white;
    color: #667eea;
}

.btn-logout {
    padding: 8px 20px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}
