.chat-window{height:100%;background:#fff;border-radius:16px;box-shadow:0 10px 40px #0000001a;display:flex;flex-direction:column;overflow:hidden}.chat-header{padding:1.5rem 2rem;border-bottom:2px solid #e2e8f0;background:linear-gradient(135deg,#f8fafc,#e2e8f0);display:flex;justify-content:space-between;align-items:center}.chat-title h2{color:#1e293b;font-size:1.25rem;margin-bottom:.25rem}.session-id{font-size:.75rem;color:#64748b;font-family:monospace}.new-chat-btn{background:#fff;border:2px solid #6366f1;color:#6366f1;padding:.625rem 1.25rem;border-radius:8px;cursor:pointer;font-weight:600;transition:all .3s}.new-chat-btn:hover{background:#6366f1;color:#fff;transform:translateY(-2px)}.messages-container{flex:1;overflow-y:auto;padding:2rem;background:#f8fafc}.welcome-message{text-align:center;padding:4rem 2rem;color:#64748b}.welcome-message h3{font-size:2rem;color:#1e293b;margin-bottom:1rem}.welcome-message p{font-size:1.125rem;margin-bottom:.5rem}.message{margin-bottom:1.5rem;display:flex;gap:1rem;animation:slideIn .3s ease}@keyframes slideIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message.user{flex-direction:row-reverse}.message-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.25rem;flex-shrink:0;box-shadow:0 2px 8px #0000001a}.message.user .message-avatar{background:linear-gradient(135deg,#6366f1,#8b5cf6)}.message.assistant .message-avatar{background:linear-gradient(135deg,#fbbf24,#f59e0b)}.message-content{max-width:70%;display:flex;flex-direction:column;gap:.25rem}.message-text{padding:1rem 1.25rem;border-radius:16px;line-height:1.6;word-wrap:break-word}.message.user .message-text{background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;border-bottom-right-radius:4px}.message.assistant .message-text{background:#fff;color:#1e293b;border-bottom-left-radius:4px;box-shadow:0 2px 8px #0000000d}.message-time{font-size:.75rem;color:#94a3b8;padding:0 .5rem}.message.user .message-time{text-align:right}.typing-indicator{display:flex;gap:1rem}.typing-dots{display:flex;align-items:center;gap:.5rem;padding:1rem 1.25rem;background:#fff;border-radius:16px 16px 16px 4px;box-shadow:0 2px 8px #0000000d}.typing-dots span{width:8px;height:8px;border-radius:50%;background:#6366f1;animation:typing 1.4s infinite}.typing-dots span:nth-child(2){animation-delay:.2s}.typing-dots span:nth-child(3){animation-delay:.4s}@keyframes typing{0%,60%,to{transform:translateY(0);opacity:.7}30%{transform:translateY(-10px);opacity:1}}.chat-input-container{padding:1.5rem;border-top:1px solid #e2e8f0;background:#fff}.chat-input-wrapper{display:flex;gap:1rem;background:#f8fafc;border-radius:12px;padding:.5rem;border:2px solid #e2e8f0;transition:border-color .3s}.chat-input-wrapper:focus-within{border-color:#6366f1}.chat-input-wrapper input{flex:1;border:none;background:transparent;padding:.75rem;font-size:1rem;outline:none;color:#1e293b}.chat-input-wrapper input::placeholder{color:#94a3b8}.chat-input-wrapper button{background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;border:none;padding:.75rem 2rem;border-radius:8px;cursor:pointer;font-weight:600;transition:all .3s}.chat-input-wrapper button:hover:not(:disabled){transform:scale(1.05);box-shadow:0 4px 12px #6366f166}.chat-input-wrapper button:disabled{opacity:.5;cursor:not-allowed;transform:none}.debug-panel{background:#fff;border-radius:16px;box-shadow:0 10px 40px #0000001a;height:100%;overflow:hidden;display:flex;flex-direction:column}.debug-empty{padding:3rem 2rem;text-align:center;color:#64748b}.debug-empty h3{font-size:1.5rem;color:#1e293b;margin-bottom:.5rem}.debug-tabs{display:flex;border-bottom:2px solid #e2e8f0;background:#f8fafc}.debug-tab{flex:1;padding:1rem;border:none;background:transparent;cursor:pointer;font-weight:600;color:#64748b;transition:all .3s;border-bottom:3px solid transparent}.debug-tab:hover{color:#6366f1;background:#6366f10d}.debug-tab.active{color:#6366f1;background:#fff;border-bottom-color:#6366f1}.debug-content{flex:1;overflow-y:auto;padding:1.5rem}.debug-section-block{background:#f8fafc;border-radius:12px;padding:1.25rem;margin-bottom:1rem;border:1px solid #e2e8f0}.debug-section-block h3{color:#1e293b;font-size:.875rem;text-transform:uppercase;letter-spacing:.05em;margin-bottom:1rem;font-weight:700;display:flex;align-items:center;gap:.5rem}.objective-text{font-size:1rem;color:#1e293b;line-height:1.6;padding:.75rem;background:#fff;border-radius:8px;border-left:4px solid #6366f1}.emotion-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}.emotion-item{display:flex;flex-direction:column;gap:.5rem;padding:.75rem;background:#fff;border-radius:8px}.emotion-label{font-size:.75rem;color:#64748b;text-transform:uppercase;letter-spacing:.05em;font-weight:600}.emotion-value{font-size:1.125rem;color:#1e293b;font-weight:700;text-transform:capitalize}.safety-badge{display:inline-block;padding:.75rem 1.5rem;border-radius:8px;font-size:.875rem;font-weight:700;color:#fff;text-align:center;letter-spacing:.05em}.instruction-item{margin-bottom:1rem;padding:.75rem;background:#fff;border-radius:8px}.instruction-item strong{display:block;color:#6366f1;font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;margin-bottom:.5rem}.instruction-item p{color:#1e293b;line-height:1.6}.instruction-item ul{margin:.5rem 0 0 1rem;color:#334155}.instruction-item ul li{margin-bottom:.25rem}.question-text{font-style:italic;color:#6366f1;font-weight:600}.instruction-item.avoid{border-left:4px solid #ef4444}.instruction-item.avoid strong{color:#ef4444}.confidence-bar{height:40px;background:#e2e8f0;border-radius:8px;overflow:hidden;position:relative}.confidence-fill{height:100%;background:linear-gradient(90deg,#10b981,#6366f1);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;transition:width .5s ease}.stage-badge-large{padding:1.5rem;border-radius:12px;color:#fff;font-size:1.125rem;font-weight:700;text-align:center;box-shadow:0 4px 12px #0003}.progress-container{display:flex;align-items:center;gap:1rem}.progress-bar{flex:1;height:12px;background:#e2e8f0;border-radius:6px;overflow:hidden}.progress-bar.small{height:8px;margin:.5rem 0}.progress-fill{height:100%;background:linear-gradient(90deg,#10b981,#6366f1);transition:width .5s ease;border-radius:6px}.progress-text{font-weight:700;color:#6366f1;min-width:45px}.progress-label{font-size:.75rem;color:#64748b}.metric-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}.metric-card{background:#fff;padding:1.25rem;border-radius:8px;text-align:center;box-shadow:0 2px 8px #0000000d;border:2px solid #e2e8f0;transition:all .3s}.metric-card:hover{border-color:#6366f1;transform:translateY(-2px);box-shadow:0 4px 12px #6366f133}.metric-card.large{grid-column:1 / -1}.metric-value{font-size:2rem;font-weight:700;color:#6366f1;margin-bottom:.25rem}.metric-label{font-size:.75rem;color:#64748b;text-transform:uppercase;letter-spacing:.05em;font-weight:600}.stage-detail{padding:.75rem;background:#fff;border-radius:8px;margin-bottom:.5rem;color:#334155}.stage-detail strong{color:#1e293b}.summary-text{padding:1rem;background:#fff;border-radius:8px;color:#334155;line-height:1.6;border-left:4px solid #8b5cf6}.topic-card{background:#fff;padding:1rem;border-radius:8px;margin-bottom:.75rem;border:2px solid #e2e8f0}.topic-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.topic-header h4{color:#1e293b;font-size:1rem;margin:0}.topic-status{padding:.25rem .75rem;border-radius:12px;font-size:.75rem;font-weight:600;text-transform:uppercase}.topic-status.active{background:#d1fae5;color:#065f46}.topic-status.resolved{background:#dbeafe;color:#1e40af}.topic-status.inactive{background:#f1f5f9;color:#64748b}.topic-detail{font-size:.875rem;color:#64748b;margin-bottom:.5rem}.topic-detail strong{color:#475569}.detail-list{list-style:none;padding:0;margin:0}.detail-list li{padding:.75rem;background:#fff;border-radius:8px;margin-bottom:.5rem;color:#334155;border-left:3px solid #6366f1}.emotion-card{display:flex;gap:1rem}.trend-badge{padding:.5rem 1rem;border-radius:20px;font-size:.875rem;font-weight:600;text-transform:capitalize}.trend-badge.improving{background:#d1fae5;color:#065f46}.trend-badge.worsening{background:#fee2e2;color:#991b1b}.trend-badge.stable{background:#dbeafe;color:#1e40af}.trend-badge.unclear{background:#f1f5f9;color:#64748b}.stage-metric-card{background:#fff;padding:1rem;border-radius:8px;margin-bottom:.75rem;border:2px solid #e2e8f0}.stage-metric-card h4{color:#1e293b;font-size:.875rem;margin-bottom:.75rem;font-weight:700}.stage-stats{display:flex;gap:1rem;flex-wrap:wrap}.stat-item{display:flex;flex-direction:column;gap:.25rem}.stat-label{font-size:.75rem;color:#64748b;text-transform:uppercase;letter-spacing:.05em}.stat-value{font-size:1rem;font-weight:700;color:#1e293b}.trend-list{display:flex;flex-direction:column;gap:.5rem}.trend-item{display:flex;justify-content:space-between;align-items:center;padding:.75rem;background:#fff;border-radius:8px;border:2px solid #e2e8f0}.trend-name{color:#334155;font-weight:600;text-transform:capitalize}.trend-count{background:#6366f1;color:#fff;padding:.25rem .75rem;border-radius:12px;font-size:.875rem;font-weight:700}.debug-content::-webkit-scrollbar{width:8px}.debug-content::-webkit-scrollbar-track{background:#f1f5f9;border-radius:4px}.debug-content::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}.debug-content::-webkit-scrollbar-thumb:hover{background:#94a3b8}@media (max-width: 768px){.metric-grid,.emotion-grid{grid-template-columns:1fr}}.auth-container{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#667eea,#764ba2);padding:2rem}.auth-card{background:#fff;border-radius:20px;padding:3rem;max-width:450px;width:100%;box-shadow:0 20px 60px #0000004d}.auth-header{text-align:center;margin-bottom:2rem}.auth-header h1{font-size:2.5rem;color:#1e293b;margin-bottom:.5rem}.auth-header p{color:#64748b;font-size:1rem}.auth-form{display:flex;flex-direction:column;gap:1.5rem}.form-group{display:flex;flex-direction:column;gap:.5rem}.form-group label{font-weight:600;color:#334155;font-size:.875rem;text-transform:uppercase;letter-spacing:.05em}.form-group input{padding:.875rem 1rem;border:2px solid #e2e8f0;border-radius:10px;font-size:1rem;transition:all .3s}.form-group input:focus{outline:none;border-color:#6366f1;box-shadow:0 0 0 3px #6366f11a}.error-message{background:#fee2e2;color:#991b1b;padding:.875rem;border-radius:8px;font-size:.875rem;font-weight:600}.auth-button{background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;border:none;padding:1rem;border-radius:10px;font-size:1rem;font-weight:600;cursor:pointer;transition:all .3s}.auth-button:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 10px 30px #6366f166}.auth-button:disabled{opacity:.6;cursor:not-allowed}.auth-toggle{text-align:center;margin-top:1.5rem;padding-top:1.5rem;border-top:1px solid #e2e8f0}.auth-toggle p{color:#64748b;font-size:.875rem}.auth-toggle button{background:none;border:none;color:#6366f1;font-weight:600;cursor:pointer;margin-left:.5rem;text-decoration:underline}:root{--primary: #6366f1;--secondary: #8b5cf6;--success: #10b981;--warning: #f59e0b;--danger: #ef4444;--dark: #1e293b;--light: #f8fafc;--border: #e2e8f0}*{margin:0;padding:0;box-sizing:border-box}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:linear-gradient(135deg,#667eea,#764ba2);min-height:100vh;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.app-container{max-width:1920px;margin:0 auto;height:100vh;display:flex;flex-direction:column}.app-header{background:#fffffff2;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:1rem 2rem;display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid var(--border);box-shadow:0 2px 10px #0000001a}.header-left{display:flex;align-items:center;gap:1rem}.app-header h1{color:var(--dark);font-size:1.5rem;font-weight:700;margin:0}.header-subtitle{font-size:.875rem;color:#64748b;font-weight:500}.header-right{display:flex;align-items:center;gap:1rem}.user-name{color:var(--dark);font-weight:600;font-size:.875rem}.toggle-debug{background:var(--primary);color:#fff;border:none;padding:.75rem 1.5rem;border-radius:8px;cursor:pointer;font-weight:600;transition:all .3s;font-size:.875rem}.toggle-debug:hover{background:var(--secondary);transform:translateY(-2px);box-shadow:0 4px 12px #6366f166}.logout-btn{background:#fff;color:var(--danger);border:2px solid var(--danger);padding:.75rem 1.5rem;border-radius:8px;cursor:pointer;font-weight:600;transition:all .3s;font-size:.875rem}.logout-btn:hover{background:var(--danger);color:#fff;transform:translateY(-2px)}.main-layout{flex:1;display:flex;gap:1.5rem;padding:1.5rem;overflow:hidden}.chat-section{flex:1;min-width:0}.debug-section{width:450px;overflow-y:auto}@media (max-width: 1400px){.debug-section{width:380px}}@media (max-width: 1200px){.main-layout{flex-direction:column}.debug-section{width:100%;max-height:400px}.app-header{padding:1rem}.app-header h1{font-size:1.25rem}.header-subtitle{display:none}}@media (max-width: 768px){.header-right{flex-direction:column;gap:.5rem}.toggle-debug,.logout-btn{padding:.5rem 1rem;font-size:.75rem}.user-name{display:none}.main-layout{padding:1rem;gap:1rem}}.loading-spinner{display:inline-block;width:20px;height:20px;border:3px solid rgba(255,255,255,.3);border-radius:50%;border-top-color:#fff;animation:spin 1s ease-in-out infinite}@keyframes spin{to{transform:rotate(360deg)}}.text-center{text-align:center}.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.p-1{padding:.5rem}.p-2{padding:1rem}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.fade-in{animation:fadeIn .3s ease}@keyframes slideIn{0%{opacity:0;transform:translate(-20px)}to{opacity:1;transform:translate(0)}}.slide-in{animation:slideIn .4s ease}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:#f1f5f9;border-radius:5px}::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:5px}::-webkit-scrollbar-thumb:hover{background:#94a3b8}button:focus-visible,input:focus-visible{outline:2px solid var(--primary);outline-offset:2px}@media print{.app-header,.debug-section,.chat-input-container{display:none}.main-layout{flex-direction:column}}
