/* 共通スタイル */
* {
    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;
    color: #333;
}

/* ヘッダー */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header h1 {
    font-size: 1.5rem;
}

/* サイドバー */
.sidebar {
    width: 250px;
    background-color: #34495e;
    height: calc(100vh - 60px);
    padding: 1rem 0;
    position: fixed;
    left: 0;
    top: 60px;
    z-index: 999;
    overflow-y: auto;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin: 0.5rem 0;
}

.sidebar nav ul li a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    display: block;
    transition: background-color 0.3s;
}

.sidebar nav ul li a:hover {
    background-color: #2c3e50;
}

/* メインコンテンツ */
.main-content {
    margin-left: 250px;
    margin-top: 60px;
    padding: 2rem;
}

/* ログインフォーム */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #2c3e50;
}

/* フォーム */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group > label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group > textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

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

/* ボタン */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5568d3;
}

.login-box .btn-primary {
    width: 100%;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* テーブル */
.table-container {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

table thead {
    background-color: #f8f9fa;
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

table th {
    font-weight: 600;
    color: #495057;
}

table tbody tr:hover {
    background-color: #f8f9fa;
}

/* ページタイトル */
.page-title {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* アクションボタン */
.action-buttons {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

/* 詳細表示 */
.detail-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.section-title:first-child {
    margin-top: 0;
}

.detail-row {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-label {
    width: 200px;
    font-weight: 600;
    color: #495057;
    flex-shrink: 0;
}

.detail-value {
    flex: 1;
    color: #212529;
}

/* タグ */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background-color: #f0f0f0;
    border: 1px solid #d0d0d0;
    border-radius: 16px;
    font-size: 0.875rem;
    color: #555;
}

.tag-other {
    background-color: #fff3e0;
    border-color: #ffb74d;
    color: #e65100;
}

.tag-main-category {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
}

.tag-subcategory {
    background-color: #e8eaf6;
    border-color: #9fa8da;
    color: #3f51b5;
}

.tag-day {
    background-color: #e1f5fe;
    border-color: #4fc3f7;
    color: #0277bd;
}

.tag-time {
    background-color: #f3e5f5;
    border-color: #ba68c8;
    color: #6a1b9a;
}

/* カテゴリーセクション */
.category-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.category-section:last-child {
    margin-bottom: 0;
}

.category-header {
    margin-bottom: 0.75rem;
}

.subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-description {
    color: #495057;
    line-height: 1.6;
    padding: 0.75rem;
    background-color: white;
    border-radius: 4px;
    border-left: 3px solid #ffb74d;
}

/* スケジュール表示 */
.schedule-section {
    margin-bottom: 1rem;
}

.schedule-section:last-child {
    margin-bottom: 0;
}

.schedule-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

/* 登録関連 */
.register-note {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

/* セラピストID */
.therapist-id {
    color: #757575;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* 必須マーク */
.required {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-left: 0.25rem;
}

/* チェックボックスグループ */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.category-checkbox-section {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.category-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.checkbox-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.checkbox-items label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal !important;
    margin-bottom: 0 !important;
    color: #555 !important;
}

.checkbox-items input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
    width: auto !important;
    padding: 0 !important;
}

.category-checkbox-section textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    resize: vertical;
    font-family: inherit;
}

.category-checkbox-section textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* メモテキストエリア */
.memo-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

.memo-textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* バッジ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-matching {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge-contact {
    background-color: #fff3e0;
    color: #f57c00;
}

.badge-phone {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* ステータスバッジ */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background-color: #ffebee;
    color: #c62828;
}

.status-processing {
    background-color: #fff9c4;
    color: #f57f17;
}

.status-completed {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* ヒアリング情報用ステータス */
.status-assigned {
    background-color: #fff9c4;
    color: #f57f17;
}

.status-negotiating {
    background-color: #fff3e0;
    color: #e65100;
}

.status-done {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-not-done {
    background-color: #f5f5f5;
    color: #757575;
}

/* 小さいボタン */
.btn-small {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s;
    margin-right: 0.5rem;
}

.btn-small.btn-primary {
    background-color: #667eea;
    color: white;
    width: auto;
}

.btn-small.btn-primary:hover {
    background-color: #5568d3;
}

.btn-small.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-small.btn-secondary:hover {
    background-color: #7f8c8d;
}
