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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
.header {
    background-color: #ff8c00;
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 18px;
    font-weight: 500;
}

.header-icons {
    display: flex;
    gap: 15px;
}

.header-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

/* メインコンテナ */
.main-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* サイドバー */
.sidebar {
    width: 300px;
    background-color: white;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.group-selector {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.group-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.member-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.member-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.member-item:hover {
    background-color: #f0f0f0;
}

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ff8c00;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 12px;
}

.member-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.member-info p {
    font-size: 12px;
    color: #666;
}

/* チャットエリア */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f0f0f0;
}

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

.chat-title {
    font-size: 16px;
    font-weight: 500;
}

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

.action-button {
    background-color: #ff8c00;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.action-button:hover {
    background-color: #e67c00;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    background-color: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.message-name {
    font-weight: 500;
    font-size: 14px;
}

.message-time {
    font-size: 12px;
    color: #666;
}

.message-text {
    font-size: 14px;
    line-height: 1.5;
}

.ai-message .message-avatar {
    background-color: #ff8c00;
}

.ai-message .message-content {
    background-color: #fff3e0;
}

/* 調整さん風UI */
.schedule-table {
    margin-top: 10px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.schedule-table table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.schedule-table th {
    background-color: #f5f5f5;
    font-weight: 500;
    font-size: 14px;
}

.schedule-table td {
    font-size: 14px;
}

.schedule-status {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    border-radius: 50%;
    font-weight: bold;
}

.status-ok {
    background-color: #4CAF50;
    color: white;
}

.status-maybe {
    background-color: #FFC107;
    color: white;
}

.status-ng {
    background-color: #f44336;
    color: white;
}

/* 入力エリア */
.chat-input-container {
    background-color: white;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: #ff8c00;
}

.send-button {
    background-color: #ff8c00;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.send-button:hover {
    background-color: #e67c00;
}

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

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.modal-title {
    font-size: 20px;
    font-weight: 500;
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.summary-content {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.summary-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* AI提案カード */
.ai-suggestion-card {
    background-color: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.ai-suggestion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #f57c00;
    font-weight: 500;
}

.ai-suggestion-content {
    font-size: 14px;
    line-height: 1.5;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .modal-content {
        padding: 20px;
    }
}