/* ================================================================
   JapanConnect Quote System - Frontend CSS
   Redesign v3.1 - LP風モダンデザイン（二重ラベル問題修正済み）
   ================================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700;800;900&display=swap');

/* ===== CSS Variables ===== */
:root {
    --brand-blue: #2563eb;
    --brand-dark: #1e3a8a;
    --brand-light: #eff6ff;
    --brand-accent: #3b82f6;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --bg-white: #ffffff;
    --bg-subtle: #f8fafc;
    --bg-section: #f1f5f9;
    --border-light: #e2e8f0;
    --border-default: #cbd5e1;
    --success: #059669;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Base ===== */
.jc-quote-container *, .jc-quote-container *::before, .jc-quote-container *::after { box-sizing: border-box; }

.jc-quote-container {
    max-width: 1100px; margin: 0 auto; padding: 40px 24px 60px;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    color: var(--text-primary); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.02em; line-height: 1.7;
}

/* Page Title */
.jc-quote-container > h2 {
    font-size: 28px; font-weight: 900; color: var(--text-primary);
    margin: 0 0 8px 0; padding: 0; border: none; letter-spacing: -0.02em; line-height: 1.3;
}
.jc-quote-container > h2 + p { color: var(--text-secondary); font-size: 14px; line-height: 1.8; margin-bottom: 36px; }

/* ===== Form Wrapper (ログイン・会員登録ページ) ===== */
.jc-quote-form-wrapper {
    background: var(--bg-white); padding: 40px; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); border: 1px solid var(--border-light);
}
.jc-quote-form-wrapper.wide { max-width: 800px; margin: 0 auto; }

/* h2 in wrapper */
.jc-quote-form-wrapper h2 {
    margin-top: 0; font-size: 24px; font-weight: 900; color: var(--brand-dark);
    border-bottom: none; padding-bottom: 0; letter-spacing: -0.02em;
}

/* Auth header */
.jc-auth-header { margin-bottom: 32px !important; }
.jc-auth-header h2 { position: relative; display: inline-block; }
.jc-auth-header h2::after {
    content: ''; display: block; width: 48px; height: 3px;
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-accent));
    border-radius: 2px; margin: 12px auto 0;
}
.jc-auth-header p { color: var(--text-muted) !important; font-size: 14px !important; margin-top: 8px; }

/* ★ h3 inside form wrapper - border-leftを完全除去、::beforeのバーのみ */
.jc-quote-form-wrapper h3 {
    margin-top: 32px; margin-bottom: 16px; color: var(--text-primary);
    font-size: 15px; font-weight: 800;
    border-left: none !important; border-bottom: none !important;
    padding-left: 0 !important; padding-bottom: 0 !important;
    display: flex; align-items: center; gap: 10px; line-height: 1.4;
}
.jc-quote-form-wrapper h3::before {
    content: ''; display: inline-block; width: 4px; height: 20px;
    background: linear-gradient(180deg, var(--brand-blue), var(--brand-accent));
    border-radius: 2px; flex-shrink: 0;
}

/* ★ h4 サブ見出し (会社情報, 担当者情報 etc.) - 統一スタイル */
.jc-quote-form-wrapper h4,
.jc-section h4,
.jc-quote-form h4 {
    font-size: 14px; font-weight: 700; color: var(--text-primary);
    margin: 24px 0 12px 0; padding: 0; border: none;
    display: flex; align-items: center; gap: 8px; letter-spacing: 0.01em;
}
.jc-quote-form-wrapper h4::before,
.jc-section h4::before,
.jc-quote-form h4::before {
    content: ''; display: inline-block; width: 3px; height: 16px;
    background: var(--brand-accent); border-radius: 2px; flex-shrink: 0;
}

/* ===== Form ===== */
.jc-quote-form { margin-top: 20px; }
.jc-form-group { margin-bottom: 20px; }
.jc-form-group label {
    display: block; font-weight: 600; margin-bottom: 6px;
    color: var(--text-primary); font-size: 13px; letter-spacing: 0.01em;
}

.jc-form-group input[type="text"], .jc-form-group input[type="email"],
.jc-form-group input[type="password"], .jc-form-group input[type="tel"],
.jc-form-group input[type="number"], .jc-form-group input[type="date"],
.jc-form-group textarea, .jc-form-group select {
    width: 100%; padding: 12px 16px; border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
    color: var(--text-primary); background: var(--bg-white);
    transition: var(--transition); box-sizing: border-box; outline: none; -webkit-appearance: none;
}
.jc-form-group input:hover, .jc-form-group textarea:hover, .jc-form-group select:hover { border-color: var(--border-default); }
.jc-form-group input:focus, .jc-form-group textarea:focus, .jc-form-group select:focus {
    border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.jc-form-group input::placeholder, .jc-form-group textarea::placeholder { color: var(--text-light); }
.jc-form-group textarea { resize: vertical; min-height: 100px; }
.jc-form-group small { display: block; margin-top: 6px; color: var(--text-muted) !important; font-size: 12px; line-height: 1.5; }
.jc-form-group .required { color: var(--danger); }
.jc-form-row { display: flex; gap: 16px; }
.jc-form-row .jc-form-group { flex: 1; }

/* ===== Buttons ===== */
.jc-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border: none; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer;
    text-decoration: none; text-align: center; transition: var(--transition);
    letter-spacing: 0.02em; gap: 6px; line-height: 1.4; color: inherit;
}
.jc-btn-primary {
    background: linear-gradient(135deg, var(--brand-blue) 0%, #1d4ed8 100%);
    color: #fff !important; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.jc-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35); transform: translateY(-1px); color: #fff !important;
}
.jc-btn-primary:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2); }
.jc-btn-secondary {
    background: var(--bg-white); color: var(--text-secondary) !important;
    border: 1.5px solid var(--border-default); box-shadow: var(--shadow-sm);
}
.jc-btn-secondary:hover {
    background: var(--bg-subtle); border-color: var(--brand-blue);
    color: var(--brand-blue) !important; box-shadow: var(--shadow-md);
}
.jc-btn-small { padding: 6px 12px; font-size: 12px; }
.jc-btn-large { padding: 16px 36px; font-size: 16px; border-radius: var(--radius-md); letter-spacing: 0.04em; }

/* Link Text */
.jc-link-text { text-align: center; margin-top: 20px; }
.jc-link-text a { color: var(--brand-blue); text-decoration: none; font-weight: 600; border-bottom: 1px solid transparent; transition: var(--transition); }
.jc-link-text a:hover { border-bottom-color: var(--brand-blue); }

/* Auth Footer */
.jc-auth-footer { margin-top: 32px !important; padding-top: 24px; border-top: 1px solid var(--border-light); }
.jc-auth-footer p { color: var(--text-muted) !important; font-size: 14px; }
.jc-auth-links { margin-top: 20px !important; }
.jc-auth-links a { color: var(--brand-blue) !important; text-decoration: none !important; font-size: 14px; font-weight: 600; transition: var(--transition); }
.jc-auth-links a:hover { opacity: 0.8; }

/* Messages */
.jc-message { padding: 14px 18px; margin-bottom: 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; line-height: 1.6; }
.jc-message.success { background: var(--success-bg); color: #065f46; border: 1px solid var(--success-border); }
.jc-message.error { background: var(--danger-bg); color: #991b1b; border: 1px solid var(--danger-border); }

/* Mypage Header */
.jc-mypage-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 32px; padding-bottom: 20px; border-bottom: none; position: relative;
}
.jc-mypage-header::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--brand-blue), transparent); border-radius: 2px;
}
.jc-mypage-header h2 { margin: 0; color: var(--text-primary); border: none; }
.jc-mypage-info { background: var(--bg-white); padding: 24px; border-radius: var(--radius-md); margin-bottom: 30px; border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }
.jc-mypage-info h3 { margin: 0 0 12px 0; color: var(--text-primary); font-size: 15px; font-weight: 700; }

/* Order Flow */
.jc-order-flow { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 24px; margin: 30px 0; box-shadow: var(--shadow-sm); }
.jc-order-flow h3 { margin: 0 0 20px 0; color: var(--brand-dark); font-size: 16px; font-weight: 700; }
.jc-flow-steps { display: flex; gap: 12px; }
.jc-flow-step { flex: 1; background: var(--bg-subtle); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 16px; display: flex; gap: 12px; transition: var(--transition); }
.jc-flow-step:hover { border-color: var(--brand-accent); box-shadow: var(--shadow-sm); }
.jc-step-number { flex-shrink: 0; width: 30px; height: 30px; background: linear-gradient(135deg, var(--brand-blue), var(--brand-dark)); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.jc-step-content { flex: 1; }
.jc-step-content h4 { margin: 0 0 6px 0; color: var(--text-primary); font-size: 13px; font-weight: 700; }
.jc-step-content h4::before { display: none; }
.jc-step-content p { margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.jc-note { color: var(--text-muted); font-size: 11px; }
.jc-warning { color: var(--danger); font-size: 11px; font-weight: 700; }

/* Order Details */
.jc-order-details { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 24px; margin: 20px 0 30px 0; box-shadow: var(--shadow-sm); }
.jc-documents-notice { background: var(--info-bg); border: 1px solid var(--info-border); border-radius: var(--radius-sm); padding: 16px; margin: 20px 0 30px 0; }
.jc-documents-notice p { margin: 0; color: var(--brand-dark); font-size: 12px; line-height: 1.7; }
.jc-order-details h3 { margin: 0 0 16px 0; color: var(--brand-dark); font-size: 15px; font-weight: 700; }
.jc-detail-box { background: var(--bg-subtle); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; }
.jc-detail-box:last-child { margin-bottom: 0; }
.jc-detail-box h4 { margin: 0 0 10px 0; color: var(--text-primary); font-size: 13px; font-weight: 700; }
.jc-detail-box h4::before { display: none; }
.jc-detail-box ul { margin: 0 0 10px 0; padding-left: 18px; }
.jc-detail-box li { color: var(--text-secondary); font-size: 12px; line-height: 1.8; margin-bottom: 4px; }
.jc-detail-box p { color: var(--text-secondary); font-size: 12px; line-height: 1.8; margin: 0 0 8px 0; }
.jc-detail-box p:last-child { margin-bottom: 0; }
.jc-warning-box { background: var(--warning-bg); border: 1px solid var(--warning-border); border-radius: var(--radius-sm); padding: 12px 14px; margin: 10px 0; }
.jc-warning-box p { color: #92400e; font-size: 12px; line-height: 1.7; margin: 0 0 4px 0; }
.jc-warning-box p:last-child { margin-bottom: 0; }
.jc-check-note { color: var(--text-muted); font-size: 11px; line-height: 1.7; margin-top: 10px; }
.jc-red-text { color: var(--danger) !important; }
.jc-support-time { color: var(--text-light); font-size: 11px; margin-top: 5px; }
.jc-mypage-actions { text-align: center; margin: 30px 0; }
.jc-mypage-actions .jc-btn { font-size: 16px; padding: 16px 48px; }

/* ===== Section (見積フォームのカードブロック) ===== */
.jc-section {
    background: var(--bg-white); padding: 28px; margin-bottom: 20px;
    border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); transition: var(--transition); position: relative;
}
.jc-section:hover { box-shadow: var(--shadow-md); }

/* セクション直下のh3 */
.jc-section > h3 {
    margin-top: 0 !important; margin-bottom: 16px;
    color: var(--text-primary) !important;
    border-bottom: none !important; border-left: none !important;
    padding-bottom: 0 !important; padding-left: 0 !important;
    font-size: 18px !important; font-weight: 800 !important;
    letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; line-height: 1.4;
}
.jc-section > h3::before {
    content: ''; display: inline-block; width: 4px; height: 22px;
    background: linear-gradient(180deg, var(--brand-blue), var(--brand-accent));
    border-radius: 2px; flex-shrink: 0;
}

/* ===== Tables ===== */
.jc-quote-table {
    width: 100%; border-collapse: separate; border-spacing: 0; background: var(--bg-white);
    margin-top: 20px; font-size: 13px; border-radius: var(--radius-md); overflow: hidden;
    border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); table-layout: auto;
}
.jc-quote-table thead { background: linear-gradient(135deg, var(--brand-dark), var(--brand-blue)); color: #fff; }
.jc-quote-table th { padding: 14px 16px; text-align: left; font-weight: 700; font-size: 12px; letter-spacing: 0.04em; border-bottom: none; }
.jc-quote-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
.jc-quote-table td[data-label="操作"] { white-space: nowrap; }
.jc-quote-table tbody tr { transition: var(--transition); }
.jc-quote-table tbody tr:hover { background: var(--brand-light); }
.jc-quote-table tbody tr:last-child td { border-bottom: none; }

/* Status Labels */
.jc-status { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 100px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.jc-status-draft { background: #f3f4f6; color: #374151; }
.jc-status-requested { background: var(--warning-bg); color: var(--warning); }
.jc-status-processing { background: var(--info-bg); color: var(--brand-blue); }
.jc-status-completed { background: var(--success-bg); color: var(--success); }

/* Option Group */
.jc-option-group { margin-bottom: 16px; padding: 20px; background: var(--bg-subtle); border-radius: var(--radius-md); border: 1px solid var(--border-light); transition: var(--transition); }
.jc-option-group:hover { border-color: var(--border-default); }
.jc-checkbox-label { display: flex; align-items: center; font-size: 14px; cursor: pointer; gap: 8px; flex-wrap: wrap; }
.jc-checkbox-label input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-blue); cursor: pointer; flex-shrink: 0; }
.jc-checkbox-label strong { font-weight: 700; color: var(--text-primary); }
.jc-price-info { color: var(--brand-blue); font-size: 14px; font-weight: 700; }

/* Totals Section */
.jc-totals-section {
    background: var(--bg-white) !important; border: 2px solid var(--brand-blue) !important;
    border-radius: var(--radius-lg) !important; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08) !important;
    position: relative; overflow: hidden;
}
.jc-totals-section::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-accent), #8b5cf6);
}
.jc-totals { max-width: 400px; margin-left: auto; }
.jc-total-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-light); font-size: 14px; color: var(--text-secondary); align-items: center; }
.jc-grand-total { font-size: 20px !important; font-weight: 900 !important; color: var(--brand-dark) !important; border-bottom: none !important; padding: 18px 0 4px !important; letter-spacing: -0.01em; }
.jc-total-summary { max-width: 400px; margin-left: auto; }
.jc-total-summary .jc-total-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-light); font-size: 14px; color: var(--text-secondary); align-items: center; }
.jc-total-summary .jc-grand-total { font-size: 20px !important; font-weight: 900 !important; color: var(--brand-dark) !important; border-bottom: none !important; padding: 18px 0 4px !important; letter-spacing: -0.01em; }

/* Form Actions */
.jc-form-actions { text-align: center; padding-top: 32px; margin-top: 12px; border-top: none; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.jc-form-actions .jc-btn { margin-left: 0; }
.jc-form-actions .jc-btn-primary.jc-btn-large {
    background: linear-gradient(135deg, var(--brand-blue) 0%, #1d4ed8 100%); color: #fff !important;
    padding: 18px 48px; font-size: 16px; font-weight: 800; border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3); letter-spacing: 0.04em; transition: var(--transition);
}
.jc-form-actions .jc-btn-primary.jc-btn-large:hover { box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4); transform: translateY(-2px); }
.jc-form-actions .jc-btn-secondary { background: var(--bg-white); color: var(--text-muted) !important; border: 1.5px solid var(--border-default); padding: 18px 36px; font-size: 16px; border-radius: var(--radius-md); }

/* Modal */
.jc-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 10000; overflow: auto; }
.jc-modal.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.jc-modal-content { background: var(--bg-white); max-width: 800px; margin: 40px auto; padding: 36px; border-radius: var(--radius-xl); position: relative; box-shadow: var(--shadow-xl); animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.jc-modal-close { position: absolute; top: 16px; right: 20px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: bold; color: var(--text-muted); cursor: pointer; border-radius: 50%; transition: var(--transition); line-height: 1; }
.jc-modal-close:hover { background: var(--bg-section); color: var(--text-primary); }

/* Quote Detail */
.jc-quote-detail h2 { margin-top: 0; color: var(--brand-dark); border-bottom: none; padding-bottom: 0; }
.jc-quote-detail h2::after { content: ''; display: block; width: 48px; height: 3px; background: linear-gradient(90deg, var(--brand-blue), var(--brand-accent)); border-radius: 2px; margin-top: 12px; }
.jc-detail-section { margin-bottom: 28px; }
.jc-detail-section h3 { color: var(--text-primary); border-left: 3px solid var(--brand-blue) !important; padding-left: 12px !important; margin-bottom: 16px; font-size: 15px; font-weight: 700; }
.jc-detail-section h3::before { display: none; }
.jc-detail-table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-light); }
.jc-detail-table th, .jc-detail-table td { padding: 12px 14px; border: none; border-bottom: 1px solid var(--border-light); text-align: left; font-size: 13px; }
.jc-detail-table thead { background: var(--bg-subtle); }
.jc-detail-table thead th { font-weight: 700; color: var(--text-primary); font-size: 12px; letter-spacing: 0.02em; }
.jc-detail-table tbody tr:last-child td { border-bottom: none; }
.jc-category-row { background: var(--brand-light) !important; }
.jc-category-row td { color: var(--brand-dark); font-weight: 700; font-size: 13px; }
.jc-detail-totals .jc-total-row { font-size: 15px; }

/* No Data */
.jc-no-data { text-align: center; padding: 48px 24px; color: var(--text-muted); background: var(--bg-subtle); border-radius: var(--radius-md); border: 1px dashed var(--border-default); font-size: 14px; }

/* Document Table */
.jc-document-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 16px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-light); }
.jc-document-table th, .jc-document-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); text-align: left; font-size: 13px; }
.jc-document-table thead { background: var(--bg-subtle); font-weight: 700; }
.jc-document-table tbody tr:hover { background: var(--brand-light); }
.jc-document-table tbody tr:last-child td { border-bottom: none; }

/* Loading */
.jc-loading { display: inline-block; width: 20px; height: 20px; border: 2.5px solid var(--border-light); border-top: 2.5px solid var(--brand-blue); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle; margin-left: 10px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Request Detail */
.jc-request-detail-section { padding: 20px 0; }
.jc-detail-group { margin-bottom: 24px; padding: 20px; background: var(--bg-subtle); border-radius: var(--radius-md); border-left: 4px solid var(--brand-blue); border-top: none; border-right: none; border-bottom: none; }
.jc-detail-group h3 { margin: 0 0 16px 0; color: var(--brand-dark); font-size: 16px; border-left: none !important; padding-left: 0 !important; }
.jc-detail-group h3::before { display: none; }
.jc-email-input-row { margin-bottom: 15px; }
.address-select, .address-input { transition: var(--transition); }
.jc-input { padding: 10px 14px; border: 1.5px solid var(--border-light); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; transition: var(--transition); outline: none; }
.jc-input:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.jc-sent-checkbox { width: 20px; height: 20px; cursor: pointer; accent-color: var(--brand-blue); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media screen and (max-width: 768px) {
    .jc-quote-container { padding: 24px 16px 48px; }
    .jc-quote-container > h2 { font-size: 22px; }
    .jc-quote-form-wrapper { padding: 24px 20px; }
    .jc-form-row { flex-direction: column; gap: 0; }
    .jc-mypage-header { flex-direction: column; align-items: flex-start; gap: 15px; }

    .jc-quote-table { display: block; border: none; box-shadow: none; background: transparent; }
    .jc-quote-table thead { display: none; }
    .jc-quote-table tbody { display: block; }
    .jc-quote-table tr { display: block; margin-bottom: 12px; border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 18px; background: var(--bg-white); box-shadow: var(--shadow-sm); transition: var(--transition); }
    .jc-quote-table tr:active { box-shadow: var(--shadow-md); }
    .jc-quote-table td { display: block; text-align: left !important; padding: 6px 0 !important; border: none !important; font-size: 13px; white-space: normal; }
    .jc-quote-table td:before { content: attr(data-label); font-weight: 700; display: inline-block; width: 100px; color: var(--brand-dark); font-size: 12px; }
    .jc-quote-table td:first-child { font-size: 15px; font-weight: 800; color: var(--brand-dark); border-bottom: 1px solid var(--border-light) !important; padding-bottom: 12px !important; margin-bottom: 8px; }
    .jc-quote-table td:first-child:before { display: none; }
    .jc-quote-table .jc-btn { display: block; width: 100%; margin: 4px 0; text-align: center; }

    .jc-section { padding: 20px; margin-bottom: 16px; border-radius: var(--radius-md); }
    .jc-section > h3 { font-size: 16px !important; }

    .jc-order-flow { padding: 16px; }
    .jc-flow-steps { flex-direction: column; gap: 10px; }
    .jc-flow-step { padding: 12px; }
    .jc-step-content h4 { font-size: 12px; }
    .jc-step-content p { font-size: 11px; }
    .jc-order-details { padding: 16px; }
    .jc-documents-notice { padding: 12px; }
    .jc-documents-notice p { font-size: 11px; }
    .jc-detail-box { padding: 14px; }
    .jc-detail-box h4 { font-size: 12px; }
    .jc-detail-box li, .jc-detail-box p { font-size: 11px; }
    .jc-warning-box { padding: 10px 12px; }
    .jc-warning-box p { font-size: 11px; }
    .jc-check-note, .jc-support-time { font-size: 10px; }

    .jc-form-actions { flex-direction: column; padding-top: 24px; }
    .jc-form-actions .jc-btn-primary.jc-btn-large, .jc-form-actions .jc-btn-secondary { width: 100%; padding: 16px 24px; }
    .jc-totals, .jc-total-summary { max-width: 100%; }
    .jc-modal-content { margin: 16px; padding: 24px; border-radius: var(--radius-lg); }
}

/* ================================================================
   Inline style overrides (PHP出力要素)
   ================================================================ */
.jc-section[style*="border: 2px solid #0066cc"] { border: 2px solid var(--brand-blue) !important; background: linear-gradient(135deg, var(--brand-light) 0%, #e0edff 100%) !important; border-radius: var(--radius-lg) !important; }
.jc-section [style*="position:absolute"][style*="background:#0066cc"] { background: linear-gradient(135deg, var(--brand-blue), #1d4ed8) !important; border-radius: 0 var(--radius-lg) 0 var(--radius-md) !important; padding: 5px 18px !important; font-size: 11px !important; font-weight: 800 !important; letter-spacing: 0.06em !important; }
.jc-section [style*="border-left: 4px solid #0066cc"] { border-left: 4px solid var(--brand-blue) !important; background: var(--brand-light) !important; border-radius: var(--radius-sm) !important; padding: 18px !important; }
.jc-section [style*="border-left: 4px solid #f59e0b"] { border-left: 4px solid var(--warning) !important; background: var(--warning-bg) !important; border-radius: var(--radius-sm) !important; }
.jc-section [style*="border: 2px solid #c0392b"] { border: 1.5px solid var(--danger) !important; border-radius: var(--radius-sm) !important; background: var(--danger-bg) !important; }
.jc-section [style*="background: #fff8e1"][style*="display:inline-block"], .jc-section [style*="background: #fce4ec"][style*="display:inline-block"], .jc-section [style*="background: #e8f5e9"][style*="display:inline-block"] { border-radius: 100px !important; padding: 5px 16px !important; font-size: 12px !important; }
.jc-section span[style*="border-radius:20px"] { border-radius: 100px !important; padding: 4px 12px !important; font-size: 12px !important; font-weight: 600 !important; border-color: var(--border-light) !important; background: var(--bg-white) !important; }
.jc-section[style*="background: #f0f9f4"] { background: var(--success-bg) !important; border: 2px solid var(--success) !important; border-radius: var(--radius-lg) !important; }
.jc-section[style*="background: #f0f9f4"] h3[style*="color: #46b450"] { color: var(--success) !important; }
.jc-section [style*="border-left: 3px solid #0066cc"] { border-left: 3px solid var(--brand-blue) !important; background: var(--bg-subtle) !important; border-radius: var(--radius-sm) !important; padding: 16px !important; font-size: 13px !important; }
.jc-section [style*="font-weight: bold"][style*="color: #0066cc"] { color: var(--brand-blue) !important; }

/* Dynamic rows */
.jc-section .esim-row, .jc-section .wifi-router-row, .jc-section .data-charge-row { background: var(--bg-subtle); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; transition: var(--transition); }
.jc-section .esim-row:hover, .jc-section .wifi-router-row:hover, .jc-section .data-charge-row:hover { border-color: var(--border-default); box-shadow: var(--shadow-sm); }

/* Remove buttons */
.jc-section .remove-row, .jc-section [onclick*="remove"], .jc-section button[style*="color: red"], .jc-section button[style*="color:#c00"] { color: var(--danger) !important; background: transparent !important; border: 1px solid var(--danger-border) !important; border-radius: var(--radius-sm) !important; padding: 4px 10px !important; font-size: 12px !important; font-weight: 600 !important; cursor: pointer; transition: var(--transition); }
.jc-section .remove-row:hover, .jc-section [onclick*="remove"]:hover { background: var(--danger-bg) !important; }

/* Select in section */
.jc-section select { padding: 10px 14px; border: 1.5px solid var(--border-light); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; background: var(--bg-white); color: var(--text-primary); transition: var(--transition); outline: none; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.jc-section select:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }

/* Inputs in section */
.jc-section input[type="text"], .jc-section input[type="number"], .jc-section input[type="date"], .jc-section input[type="email"], .jc-section input[type="tel"], .jc-section input[type="password"] { padding: 10px 14px; border: 1.5px solid var(--border-light); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; background: var(--bg-white); color: var(--text-primary); transition: var(--transition); outline: none; }
.jc-section input:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.jc-section textarea { padding: 12px 14px; border: 1.5px solid var(--border-light); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; background: var(--bg-white); color: var(--text-primary); transition: var(--transition); outline: none; resize: vertical; min-height: 100px; }
.jc-section textarea:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }

/* Scrollbar */
.jc-quote-container ::-webkit-scrollbar { width: 6px; }
.jc-quote-container ::-webkit-scrollbar-track { background: var(--bg-subtle); border-radius: 3px; }
.jc-quote-container ::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }
.jc-quote-container ::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ===== 見積フォームのみ幅を制限 ===== */
#jc-quote-create-form,
#jc-quote-guest-form {
    max-width: 900px;
}

/* ===== マイページ テーブル横スクロール対応 ===== */
.jc-quote-container .jc-quote-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* テーブルのステータスラベル改行防止 */
.jc-quote-table .jc-status {
    white-space: nowrap;
    display: inline-flex;
}

/* ===== eSIM スペック情報パネル ===== */
.jc-esim-spec-panel {
    overflow: hidden;
    box-sizing: border-box;
}

.jc-spec-row {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
    font-size: 13px;
    line-height: 1.5;
}
.jc-spec-row:last-child {
    border-bottom: none;
}

.jc-spec-label {
    color: #555;
    flex-shrink: 0;
    width: 40%;
    max-width: 180px;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.jc-spec-value {
    color: #333;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.jc-spec-notes {
    margin-top: 8px;
    padding: 8px 10px;
    background: #fff3cd;
    border-radius: 4px;
    color: #856404;
    font-size: 12px;
    line-height: 1.6;
}

/* スマホ向け: ラベルと値を縦並びに */
@media (max-width: 480px) {
    .jc-spec-row {
        flex-direction: column;
        gap: 1px;
        padding: 5px 0;
    }
    .jc-spec-label {
        width: 100%;
        max-width: none;
        font-size: 11px;
        color: #888;
    }
    .jc-spec-value {
        font-size: 13px;
        padding-left: 8px;
    }
}
