/**
 * メール配信管理システム - スタイルシート
 * Version: 4.7.0
 */

:root {
    --primary: #0078d4;
    --primary-dark: #005a9e;
    --primary-light: #2b88d8;
    --success: #107c10;
    --success-dark: #0b5c0b;
    --warning: #ffb900;
    --danger: #d13438;
    --bg-gradient-start: #e8eef5;
    --bg-gradient-end: #d4dde9;
    --card-bg: rgba(255, 255, 255, 0.98);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-muted: #8888a0;
    --border-color: #d0d7e2;
    --input-bg: #f5f7fa;
    --section-bg: #ffffff;
}

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

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    padding: 20px;
    line-height: 1.6;
    margin: 0;
}

/* 背景パターン */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(0, 120, 212, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 90, 158, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0;
    width: 100%;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
    margin-bottom: 16px;
}

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

.card-header {
    background: linear-gradient(135deg, #005a9e 0%, #0078d4 100%);
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 90, 158, 0.15);
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

/* ヘッダー上段: タイトル + ヘルプ */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
}

.header-title-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.card-header h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    letter-spacing: 0.5px;
}

.card-header h1::before {
    content: '✉️';
    font-size: 1.8rem;
}

.version-badge {
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255,255,255,0.3);
}

/* ヘルプボタン（右上） */
.help-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
    font-weight: 500;
}

.help-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-1px);
}

/* ヘッダーアクションボタン */
.header-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.header-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-action-btn .btn-icon {
    font-size: 1.1rem;
}

.header-action-btn .btn-text {
    white-space: nowrap;
}

.header-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.header-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.header-action-btn:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 各ボタンの色 */
.customer-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.customer-btn:hover {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5);
}

.survey-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.survey-btn:hover {
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5);
}

.monitor-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.monitor-btn:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
}

.manual-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.manual-btn:hover {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
}

/* 後方互換性のため残す */
.dashboard-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dashboard-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ステップナビゲーション */
.step-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    border-bottom: 2px solid #d0d7e2;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.step-circle.inactive {
    background: #e8ecf1;
    color: #94a3b8;
    border-color: #d0d7e2;
}

.step-circle.active {
    background: linear-gradient(135deg, #0078d4 0%, #2b88d8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.35);
    border-color: #0078d4;
}

.step-circle.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.step-item.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step-item.completed .step-label {
    color: #10b981;
}

.step-arrow {
    color: #cbd5e1;
    font-size: 1.2rem;
    margin: 0 16px;
    font-weight: 300;
}

/* ステップコンテンツ */
.step-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

/* ステップフッター */
.step-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 28px;
    border-top: 2px solid #e8ecf1;
}

.step-footer .btn {
    min-width: 150px;
}

/* 詳細設定パネル */
.advanced-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 20px;
}

.advanced-toggle:hover {
    background: #f1f5f9;
}

.advanced-toggle .arrow {
    transition: transform 0.3s ease;
}

.advanced-toggle.open .arrow {
    transform: rotate(90deg);
}

.advanced-panel {
    display: none;
    padding: 16px;
    margin-top: 8px;
    background: #fafbfc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.advanced-panel.open {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}

.advanced-section {
    padding: 12px;
    margin-bottom: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

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

.advanced-section-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* モーダル */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 900px;
    max-height: 90vh;
    width: 92%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, #00bcf2 100%);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
}

.help-section {
    margin-bottom: 28px;
}

.help-section h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.help-section p, .help-section li {
    color: var(--text-secondary);
    line-height: 1.8;
}

.help-section ul, .help-section ol {
    padding-left: 24px;
    margin: 10px 0;
}

.help-section li {
    margin-bottom: 6px;
}

.help-section code {
    background: #f0f2f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 0.9em;
    color: #d63384;
}

.code-block {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    margin: 12px 0;
    white-space: pre-wrap;
}

.help-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.help-table th, .help-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.help-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-primary);
}

.help-table td {
    color: var(--text-secondary);
}

.card-body {
    padding: 24px 32px 32px 32px;
}

.hidden { display: none !important; }

/* ログインセクション */
.auth-section {
    text-align: center;
    padding: 20px 0;
}

.auth-section p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1rem;
}

.microsoft-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

/* フォーム要素 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group label .required {
    color: var(--danger);
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 120, 212, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.5;
}

.form-hint.warning {
    color: #b45309;
    background: #fef3c7;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid var(--warning);
}

/* ユーザー情報バー */
.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fc 0%, #eef1f5 100%);
    border-radius: 12px;
    margin-bottom: 24px;
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, #00bcf2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-email {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* ボタン */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0078d4 0%, #2b88d8 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(0, 120, 212, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 120, 212, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #2d9d2d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 124, 16, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 124, 16, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    width: auto;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-outline:hover {
    background: var(--input-bg);
    border-color: #b8c2d0;
    color: var(--text-primary);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* セクション区切り */
.section {
    background: var(--section-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.section:hover {
    border-color: #b8c2d0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e8ecf1;
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.section-icon.test {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.section-icon.bulk {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* プレースホルダーボタン */
.placeholder-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #c0c8d8;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.placeholder-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,120,212,0.25);
}

        .placeholder-btn.gift-placeholder {
            background: linear-gradient(135deg, #fff7e6, #ffefcc);
            border-color: #ffc107;
        }
        
        .placeholder-btn.gift-placeholder:hover {
            background: linear-gradient(135deg, #ffc107, #ffb300);
            color: #333;
        }

        .placeholder-btn.survey-placeholder {
            background: linear-gradient(135deg, #f5f3ff, #ede9fe);
            border-color: #8b5cf6;
            color: #7c3aed;
        }
        
        .placeholder-btn.survey-placeholder:hover {
            background: linear-gradient(135deg, #8b5cf6, #7c3aed);
            color: white;
            border-color: #7c3aed;
        }

/* ファイル入力 */
.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-display {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    background: var(--input-bg);
    transition: all 0.3s ease;
}

.file-input-wrapper:hover .file-input-display {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.1);
}

.file-icon {
    font-size: 2rem;
}

.file-text {
    flex: 1;
}

.file-text-main {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.file-text-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* アンケート質問アイテム */
.survey-question-item {
    border: 1px solid #bae6fd;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: white;
    transition: all 0.2s;
}

.survey-question-item:hover {
    box-shadow: 0 4px 8px rgba(14, 165, 233, 0.15);
    border-color: #0ea5e9;
}

.survey-question-item select,
.survey-question-item input[type="text"],
.survey-question-item textarea {
    transition: border-color 0.2s;
}

.survey-question-item select:focus,
.survey-question-item input[type="text"]:focus,
.survey-question-item textarea:focus {
    border-color: #0ea5e9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* アンケート管理モーダル用スタイル */
.survey-list-item {
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.survey-list-item:hover {
    background: #f0f9ff;
    border-color: #0ea5e9;
    transform: translateX(2px);
}

.survey-list-item.active {
    background: #e0f2fe;
    border-color: #0284c7;
    border-width: 2px;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
}

/* ログエリア */
.log-section {
    margin-top: 24px;
}

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

.log-title {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-area {
    height: 200px;
    overflow-y: auto;
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 16px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    border-radius: 12px;
    line-height: 1.8;
}

.log-area::-webkit-scrollbar {
    width: 8px;
}

.log-area::-webkit-scrollbar-track {
    background: #313244;
    border-radius: 4px;
}

.log-area::-webkit-scrollbar-thumb {
    background: #585b70;
    border-radius: 4px;
}

.log-entry {
    padding: 4px 0;
}

.log-time {
    color: #6c7086;
}

.log-success {
    color: #a6e3a1;
}

.log-error {
    color: #f38ba8;
}

.log-warning {
    color: #fab387;
}

/* フッター・更新履歴 */
.footer {
    margin-top: 20px;
}

.copyright {
    text-align: center;
    padding: 20px 0;
    margin-top: 16px;
    color: #6b7280;
    font-size: 0.85rem;
}

.copyright p {
    margin: 0;
}

.footer-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.footer-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    transition: background 0.2s ease;
}

.footer-title:hover {
    background: #f0f2f5;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-icon.open {
    transform: rotate(180deg);
}

.changelog {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.changelog.hidden {
    display: none;
}

.changelog-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
}

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

.changelog-version {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, #00bcf2 100%);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 10px;
}

.changelog-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.changelog-item ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.changelog-item li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

/* プログレスバー */
.progress-container {
    margin-top: 16px;
    display: none;
}

.progress-container.active {
    display: block;
}

.progress-bar-wrapper {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #00bcf2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* コンテンツタイプタブ */
.content-type-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    background: var(--input-bg);
    padding: 4px;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tab-btn:hover {
    background: rgba(0, 120, 212, 0.1);
    color: var(--primary);
}

.tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.editor-panel {
    animation: fadeIn 0.2s ease;
}

.code-editor {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    min-height: 200px;
}

/* プレビューエリア */
.preview-container {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.preview-header {
    background: linear-gradient(135deg, #f8f9fc 0%, #eef1f5 100%);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.preview-content {
    padding: 20px;
    min-height: 150px;
    max-height: 400px;
    overflow-y: auto;
    color: var(--text-primary);
    line-height: 1.8;
}

.preview-content img {
    max-width: 100%;
    height: auto;
}

.preview-content a {
    color: var(--primary);
}

/* テンプレートボタン */
.template-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.template-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.template-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: inherit;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 120, 212, 0.05);
}

/* 送信結果リスト */
.results-section {
    margin-top: 24px;
    display: none;
}

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

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.results-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-summary {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.summary-success {
    background: #d4edda;
    color: #155724;
}

.summary-error {
    background: #f8d7da;
    color: #721c24;
}

.summary-skip {
    background: #fff3cd;
    color: #856404;
}

.results-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.results-filter {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.results-filter:hover {
    border-color: var(--primary);
}

.results-filter.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.results-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.results-table th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    z-index: 1;
}

.results-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.results-table tr:hover {
    background: #f8f9fc;
}

/* ソート可能なヘッダー */
.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.sortable-header:hover {
    background: #e9ecef !important;
}

.sortable-header.sorted {
    background: #e3f2fd !important;
    color: #1976d2;
}

.sort-icon {
    font-size: 0.75rem;
    margin-left: 4px;
    opacity: 0.5;
}

.sortable-header.sorted .sort-icon {
    opacity: 1;
    color: #1976d2;
}

/* ダッシュボード */
.dashboard {
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.dashboard.hidden .dashboard-content {
    display: none;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    user-select: none;
}

.dashboard-header:hover {
    opacity: 0.95;
}

.dashboard-toggle {
    transition: transform 0.3s;
}

.dashboard.hidden .dashboard-toggle {
    transform: rotate(-90deg);
}

.dashboard-content {
    padding: 20px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.dashboard-card {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background: currentColor;
}

.card-total { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); color: #4338ca; }
.card-success { background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%); color: #16a34a; }
.card-error { background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); color: #dc2626; }
.card-skip { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #d97706; }

.card-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.card-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.card-label {
    font-size: 0.85rem;
    margin-top: 8px;
    opacity: 0.8;
}

.dashboard-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}

.dashboard-panel {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.panel-title {
    font-weight: 600;
    color: #334155;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

/* 開封率パネル */
.open-rate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.open-rate-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.open-rate-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 8;
}

.circle-progress {
    fill: none;
    stroke: #10b981;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.open-rate-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.open-rate-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #10b981;
}

.open-rate-stats {
    display: flex;
    gap: 24px;
}

.open-stat {
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    display: block;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #334155;
}

/* グラフ */
.chart-container {
    height: 150px;
    display: flex;
    flex-direction: column;
}

.chart-bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding-bottom: 8px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, #3b82f6, #60a5fa);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.3s;
    position: relative;
}

.chart-bar:hover {
    opacity: 0.8;
}

.chart-bar-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.chart-bar:hover .chart-bar-tooltip {
    opacity: 1;
}

.chart-labels {
    display: flex;
    gap: 4px;
    font-size: 0.7rem;
    color: #94a3b8;
}

.chart-label {
    flex: 1;
    text-align: center;
}

/* 最近の送信履歴 */
.recent-list {
    max-height: 200px;
    overflow-y: auto;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid #e2e8f0;
}

.recent-status {
    font-size: 1.1rem;
}

.recent-email {
    flex: 1;
    font-family: monospace;
    font-size: 0.85rem;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-time {
    font-size: 0.75rem;
    color: #94a3b8;
}

.recent-empty {
    text-align: center;
    color: #94a3b8;
    padding: 20px;
    font-size: 0.9rem;
}

/* ダッシュボードモーダル */
.dashboard-modal-content {
    max-width: 900px;
    width: 95%;
}

.dashboard-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.dashboard-modal-header h2 {
    color: white;
}

.dashboard-modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

.status-skip {
    background: #fff3cd;
    color: #856404;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.resend-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #fd7e14 0%, #ffc107 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.resend-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 126, 20, 0.3);
}

.resend-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.result-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.select-all-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}

.select-all-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.selected-count {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* レスポンシブ */
@media (max-width: 640px) {
    body {
        padding: 12px;
    }

    .card-header {
        padding: 16px;
    }

    .header-top-row {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
    }

    .header-title-area {
        flex-direction: column;
        gap: 8px;
    }

    .card-header h1 {
        font-size: 1.2rem;
    }

    .card-header h1::before {
        font-size: 1.4rem;
    }

    .header-actions {
        gap: 8px;
    }

    .header-action-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .header-action-btn .btn-icon {
        font-size: 1rem;
    }

    .card-body {
        padding: 16px;
    }

    .user-bar {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .section {
        padding: 16px;
        margin-bottom: 12px;
    }

    .content-type-tabs {
        flex-direction: column;
    }

    .tab-btn {
        justify-content: flex-start;
        padding: 12px 16px;
    }
}

/* ========================================
   アンケート管理モーダル
   ======================================== */

/* タブナビゲーション */
.survey-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
}

.survey-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.survey-tab:hover {
    color: #8b5cf6;
    background: #f5f3ff;
}

.survey-tab.active {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
}

/* タブコンテンツ */
.survey-tab-content {
    display: block;
}

.survey-tab-content.hidden {
    display: none;
}

/* アンケート一覧 */
.survey-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.survey-list-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.btn-refresh {
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-refresh:hover {
    background: #e5e7eb;
}

.survey-list-container {
    max-height: 400px;
    overflow-y: auto;
}

.survey-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
}

.survey-item-info {
    flex: 1;
}

.survey-item-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.survey-item-meta {
    font-size: 0.85rem;
    color: #6b7280;
}

.survey-item-actions {
    display: flex;
    gap: 8px;
}

.survey-item-actions button {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-view {
    background: #dbeafe;
    color: #1d4ed8;
}

.btn-view:hover {
    background: #bfdbfe;
}

.btn-copy-link {
    background: #d1fae5;
    color: #059669;
}

.btn-copy-link:hover {
    background: #a7f3d0;
}

.btn-delete-survey {
    background: #fee2e2;
    color: #dc2626;
}

.btn-delete-survey:hover {
    background: #fecaca;
}

.btn-preview-survey {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
    font-weight: 500;
}

.btn-preview-survey:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.2);
}

/* 新規作成フォーム */
.survey-form {
    max-width: 700px;
}

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

.survey-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.survey-form label .required {
    color: #dc2626;
}

.survey-questions-container {
    margin-bottom: 16px;
}

.survey-question-item {
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
}

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

.survey-question-header span {
    font-weight: 600;
    color: #8b5cf6;
}

.btn-remove-question {
    padding: 4px 10px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-remove-question:hover {
    background: #fecaca;
}

.question-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-move-question {
    padding: 4px 8px;
    background: #e0f2fe;
    color: #0369a1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.btn-move-question:hover {
    background: #bae6fd;
}

.btn-move-question:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.survey-question-item .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.survey-question-item .form-group {
    margin-bottom: 12px;
}

.survey-question-item label {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.survey-question-item input,
.survey-question-item select,
.survey-question-item textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

.survey-question-item input:focus,
.survey-question-item select:focus,
.survey-question-item textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-row {
    display: flex;
    gap: 8px;
}

.option-row input {
    flex: 1;
}

.option-row button {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-add-option {
    background: #dbeafe;
    color: #1d4ed8;
}

.btn-remove-option {
    background: #fee2e2;
    color: #dc2626;
}

.btn-add-question {
    width: 100%;
    padding: 12px;
    background: #f5f3ff;
    border: 2px dashed #c4b5fd;
    border-radius: 8px;
    color: #8b5cf6;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-question:hover {
    background: #ede9fe;
    border-color: #8b5cf6;
}

.survey-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.survey-form-actions .btn {
    padding: 10px 24px;
}

.survey-form-actions .btn-secondary {
    background: #f3f4f6;
    color: var(--text-primary);
    border: 1px solid #d1d5db;
}

.survey-form-actions .btn-secondary:hover {
    background: #e5e7eb;
}

/* 回答一覧 */
.survey-response-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 20px;
}

.btn-export {
    padding: 10px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-export:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.survey-responses-container {
    max-height: 400px;
    overflow-y: auto;
}

.survey-response-item {
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
}

.survey-response-header-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.response-email {
    font-weight: 600;
    color: var(--text-primary);
}

.response-date {
    font-size: 0.85rem;
    color: #6b7280;
}

.response-answers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.response-answer {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
    font-size: 0.9rem;
}

.answer-question {
    font-weight: 500;
    color: #6b7280;
}

.answer-value {
    color: var(--text-primary);
}

.loading-text,
.info-text {
    text-align: center;
    color: #6b7280;
    padding: 40px;
}

.no-data-text {
    text-align: center;
    color: #9ca3af;
    padding: 40px;
    font-style: italic;
}

/* ========================================
   集計ダッシュボード
   ======================================== */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 20px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card.stat-highlight {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #93c5fd;
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
}

.dashboard-charts {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.dashboard-question-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.dashboard-question-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.chart-wrapper {
    padding: 12px 0;
}

.chart-container-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
}

.chart-pie-container {
    max-width: 250px;
    margin: 0 auto;
}

.chart-bar-container {
    max-height: 200px;
}

.chart-full-container {
    max-height: 200px;
    margin: 0 auto;
}

.chart-summary {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
}

/* 評価グラフ */
.rating-average {
    text-align: center;
    margin-bottom: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
}

.rating-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #b45309;
}

.rating-max {
    font-size: 1.2rem;
    color: #92400e;
}

.rating-stars {
    font-size: 1.5rem;
    color: #f59e0b;
    margin-top: 4px;
    letter-spacing: 2px;
}

/* テキスト回答 */
.text-responses-wrapper {
    padding: 8px 0;
}

.text-responses-list {
    max-height: 300px;
    overflow-y: auto;
}

.text-response-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.text-response-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.text-response-email {
    font-weight: 500;
}

.text-response-content {
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* 日付回答の表示 */
.date-summary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.date-summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #93c5fd;
}

.date-value {
    font-weight: 500;
    color: #1e40af;
}

.date-count {
    background: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1d4ed8;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .chart-container-row {
        grid-template-columns: 1fr;
    }
    
    .chart-pie-container {
        max-width: 200px;
    }
}

/* ==================== AiMeet 出展社取得セクション ==================== */
.aimeet-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
}

.aimeet-step-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.aimeet-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.aimeet-row .form-group {
    flex: 1;
    min-width: 180px;
    margin-bottom: 0;
}

.aimeet-notice {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.aimeet-msg-success {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    color: #166534;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
}

.aimeet-msg-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
}

/* ユーザーバー アクションボタン群 */
.user-bar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-icon-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* セクション左アクセントライン */
.section {
    border-left: 3px solid var(--primary);
    padding-left: 16px;
    margin-bottom: 20px;
}

/* ボタン アクセシビリティ フォーカス */
.btn:focus-visible {
    outline: 3px solid rgba(0, 120, 212, 0.5);
    outline-offset: 2px;
}
