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

/* Apple風デザイン: システムフォント優先・広い余白・大きめの角丸・薄いボーダー・柔らかい影 */
:root {
    --primary: #0f2257;
    --primary-light: #2c4a8c;
    --accent: #e0252b;
    --bg: #f5f5f7;
    --card: #ffffff;
    --text: #1d1d1f;
    --muted: #86868b;
    --border: #e8e8ed;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow-card: 0 1px 1px rgba(0,0,0,0.02), 0 4px 24px rgba(0,0,0,0.05);
    --shadow-pop: 0 8px 30px rgba(0,0,0,0.12);
    --focus-ring: 0 0 0 4px rgba(44,74,140,0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.01em;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }

/* 管理画面レイアウト（左サイドバー） */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 210px;
    flex-shrink: 0;
    background: var(--primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-sidebar .sidebar-brand { padding: 26px 22px 18px; }
.admin-sidebar .sidebar-brand img { width: 100%; max-width: 150px; height: auto; display: block; }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; padding: 8px 12px; }
.sidebar-nav a {
    display: block;
    padding: 10px 14px;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 9px;
    transition: background 0.18s ease, color 0.18s ease;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,0.14); color: #fff; font-weight: 600; }
.sidebar-nav a.nav-action { color: var(--accent); }
.sidebar-nav a.nav-action:hover, .sidebar-nav a.nav-action.active { color: #ff6b6f; }
.sidebar-logout {
    display: block;
    margin: 8px 12px 14px;
    padding: 10px 14px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-radius: 0;
    padding-top: 16px;
}
.sidebar-logout:hover { color: #fff; }
.admin-main { flex: 1; min-width: 0; }

/* メインコンテンツ */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }

/* カード */
.card {
    background: var(--card);
    border-radius: var(--radius);
    border: none;
    padding: 26px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}
.card-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
    color: var(--text);
}

/* フォーム */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 500;
}
.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    -webkit-appearance: none;
    appearance: none;
}
.form-group select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2386868b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px;
}
.form-group textarea { min-height: 84px; resize: vertical; }
.form-group input:not([type="checkbox"]):not([type="radio"]):focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: var(--focus-ring);
}
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; min-width: 0; }

/* ボタン */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: opacity 0.18s ease, transform 0.12s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--primary); color: #fff; }
.btn-outline { background: #fff; border: 1px solid #d2d2d7; color: var(--text); }
.btn-outline:hover { opacity: 1; border-color: #b8b8bf; background: #fafafa; }
.btn-success { background: #248a5a; color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }

/* ステータスバッジ */
.badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    line-height: 1.3;
}
.badge-sub {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.85;
}
.badge-sm { padding: 3px 10px; }
.badge-sm .badge-sub { font-size: 9px; }
.badge-lg { padding: 8px 20px; font-size: 14px; }
.badge-lg .badge-sub { font-size: 11px; }

/* 進捗タイムライン（履歴ログ） */
.history-log { list-style: none; margin: 0; padding: 0; }
.history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.history-item:last-child { border-bottom: none; }
.history-time { font-size: 12px; color: var(--muted); min-width: 118px; }
.history-body { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.history-note { font-size: 13px; color: #6e6e73; }
.history-manual { font-size: 14px; color: var(--text); font-weight: 500; }
.history-add-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.history-add-form input[type="text"] {
    flex: 1;
    min-width: 220px;
    padding: 10px 14px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.history-add-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: var(--focus-ring);
}

/* 修理詳細ページ：横幅に余裕がある画面ではカードを2列に並べる */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) {
    .card-grid { grid-template-columns: 1fr 1fr; }
    .card-grid > .card-wide { grid-column: 1 / -1; }
}

/* 設定画面：タブ切り替え（セグメンテッドコントロール風） */
.settings-tabs {
    display: inline-flex;
    gap: 2px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    background: #e8e8ed;
    border-radius: 11px;
    padding: 3px;
}
.tab-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #494950;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
    background: #fff;
    color: var(--text);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* テーブル */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
    background: transparent;
    color: var(--muted);
    padding: 13px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}
.th-sort { color: var(--muted); text-decoration: none; transition: color 0.18s ease; }
.th-sort:hover { color: var(--text); text-decoration: none; }
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}
tr:hover td { background: #f7f7f9; }
tr:last-child td { border-bottom: none; }

/* 一覧の行クリックで詳細へ移動できることを示す */
tbody tr[data-href] { cursor: pointer; }

/* ページネーション */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
}
.page-btn {
    display: inline-block;
    min-width: 34px;
    padding: 7px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: background 0.18s ease;
}
.page-btn:hover { background: #ececf0; }
.page-btn.current { background: var(--primary); color: #fff; font-weight: 600; }
.page-ellipsis { color: var(--muted); padding: 0 2px; }
.page-info { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 500; }

/* フィルターバー */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    align-items: center;
}
.filter-bar input,
.filter-bar select {
    padding: 8px 13px;
    border: 1px solid #d2d2d7;
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.filter-bar input:focus,
.filter-bar select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: var(--focus-ring);
}

/* ステータスカウント */
.status-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}
.status-card {
    background: var(--card);
    border: none;
    border-radius: 12px;
    padding: 14px 15px;
    text-align: center;
    min-width: 128px;
    max-width: 150px;
    cursor: pointer;
    transition: box-shadow 0.18s ease, transform 0.12s ease;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-card);
}
.status-card:hover { box-shadow: var(--shadow-pop); transform: translateY(-2px); }
.status-card.active { box-shadow: 0 0 0 2px var(--primary), var(--shadow-card); }
.status-card .count { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; color: var(--primary); }
.status-card .label { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.5; font-weight: 500; }
.status-card .label-sub { font-size: 10px; color: #b8bcc8; font-weight: 400; }

/* アラート */
.alert {
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}
.alert-success { background: #e8f6ee; color: #1a6b40; border: none; }
.alert-danger  { background: #fdeceb; color: #a02226; border: none; }

/* 修理詳細 */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.detail-item label { font-size: 12px; color: var(--muted); font-weight: 500; }
.detail-item p { font-size: 15px; margin-top: 2px; }

/* お客様向けページ */
.customer-page { max-width: 500px; margin: 40px auto; padding: 0 16px; }
.customer-page .logo { text-align: center; margin-bottom: 28px; }
.customer-page .logo img { height: 46px; margin-bottom: 8px; }
.customer-page .logo p { color: var(--muted); font-size: 13px; font-weight: 500; }

.status-timeline { margin: 20px 0; }
.timeline-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.timeline-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}
.timeline-dot.done { background: var(--primary); border-color: var(--primary); color: #fff; }
.timeline-dot.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.timeline-label { padding-top: 3px; font-size: 14px; color: var(--muted); font-weight: 500; }
.timeline-label.current { color: var(--text); font-weight: 700; }
.timeline-sub { display: block; font-size: 11px; font-weight: 400; color: #b8bcc8; }

/* レスポンシブ */
@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; flex-direction: row; align-items: center; overflow-x: auto; overflow-y: visible; box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset; }
    .admin-sidebar .sidebar-brand { padding: 0 12px; flex-shrink: 0; }
    .admin-sidebar .sidebar-brand img { height: 30px; }
    .sidebar-nav { flex-direction: row; flex: none; padding: 8px 6px; gap: 2px; }
    .sidebar-nav a { padding: 9px 12px; white-space: nowrap; font-size: 13px; }
    .sidebar-logout { border-top: none; margin: 0; padding: 9px 14px; white-space: nowrap; flex-shrink: 0; }
    .container { padding: 24px 16px; }
}

@media (max-width: 600px) {
    .form-row { flex-direction: column; }
    .detail-grid { grid-template-columns: 1fr; }
    th, td { padding: 9px 8px; font-size: 13px; }
}

/* ログインページ */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--primary) 0%, #060f2e 100%);
}
.login-box {
    background: #fff;
    border-radius: 20px;
    padding: 44px 36px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.login-box img { height: 48px; margin-bottom: 14px; }
.login-box p { color: var(--muted); font-size: 13px; margin-bottom: 28px; font-weight: 500; }

/* お客様向け修理レポート・診断書（管理画面：入力フォーム） */
.report-section-block { margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.report-section-block label { font-size: 12px; color: var(--muted); font-weight: 500; }
.report-repeat-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.report-repeat-row .form-group { margin-bottom: 0; flex: 1; }
.report-rank-preset-list { margin-bottom: 8px; }
.report-rank-fixed-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: var(--bg);
    border-radius: 9px;
    padding: 9px 13px;
}
.report-repeat-row-remove {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid #d2d2d7;
    border-radius: 9px;
    background: #fff;
    color: #b0b3bd;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.report-repeat-row-remove:hover { color: #a02226; border-color: #f3b8bb; background: #fdeceb; }

/* 複数受付：修理品ごとの入力ブロック */
.item-entry-block {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 18px 6px;
    margin-bottom: 18px;
    background: #fafafc;
}
.item-entry-block .item-entry-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}
.item-entry-remove {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 26px;
    height: 26px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid #d2d2d7;
    background: #fff;
    color: #86868b;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.item-entry-remove:hover { color: #a02226; border-color: #f3b8bb; background: #fdeceb; }
.report-repeat-add { display: block; margin-bottom: 4px; }
.report-save-row { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.report-photo-upload-form { margin-top: 4px; }

/* お客様向け修理レポート・診断書（管理画面：写真一覧） */
.report-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}
.report-photo-item { border: 1px solid var(--border); border-radius: 12px; padding: 8px; }
.report-photo-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; display: block; }
.report-photo-meta { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }

/* お客様向け修理レポート・診断書（お客様ページ） */
.report-section-title { font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 12px; }
.report-field-text { font-size: 14px; line-height: 1.7; white-space: pre-wrap; }

.report-rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.report-rank-item { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.report-rank-label { font-size: 11px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.report-rank-value { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border: 1.5px solid; border-radius: 20px; }

.report-photo-compare { display: flex; gap: 14px; margin-bottom: 14px; }
.report-photo-compare-col { flex: 1; min-width: 0; }
.report-photo-compare-label { font-size: 12px; font-weight: 500; color: var(--muted); text-align: center; margin-bottom: 6px; }
.report-photo-compare-col img { width: 100%; border-radius: 10px; display: block; margin-bottom: 6px; }
.report-photo-general { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.report-photo-general img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; display: block; }
.report-photo-caption { font-size: 11px; color: var(--muted); margin-top: 3px; text-align: center; }

.report-advice-list { list-style: none; }
.report-advice-list li { font-size: 14px; line-height: 1.6; padding: 8px 0 8px 20px; position: relative; border-bottom: 1px solid var(--border); }
.report-advice-list li:last-child { border-bottom: none; }
.report-advice-list li::before { content: ''; position: absolute; left: 4px; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

@media (max-width: 480px) {
    .report-photo-compare { flex-direction: column; }
}

/* 売上ダッシュボード：サマリーカード（前期比ピル付き） */
.metric-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.metric-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 18px 22px;
}
.metric-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.metric-value { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin-top: 2px; line-height: 1.3; }
.metric-delta {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    padding: 3px 11px;
}
.metric-delta.up { background: #e8f6ee; color: #1a6b40; }
.metric-delta.down { background: #fdeceb; color: #a02226; }
.metric-delta.flat { background: #f0f0f2; color: var(--muted); }
.metric-unit { font-size: 14px; font-weight: 500; color: var(--muted); }
.metric-cards.cols-4 { grid-template-columns: repeat(4, 1fr); }
.metric-card.metric-link { text-decoration: none; color: var(--text); display: block; transition: box-shadow 0.18s ease, transform 0.12s ease; }
.metric-card.metric-link:hover { box-shadow: var(--shadow-pop); transform: translateY(-2px); }
.metric-card.metric-warn .metric-value { color: var(--accent); }
.today-heading { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.today-heading span { font-weight: 500; color: #b8bcc8; }

/* ロゴ画像が無い店舗向けのテキストブランド表示（render_shop_logo_img()のフォールバック） */
.brand-text { display: inline-block; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--primary); }
.brand-text-white { color: #fff; }
.sidebar-brand .brand-text-white { font-size: 17px; }
@media (max-width: 600px) {
    .metric-cards, .metric-cards.cols-4 { grid-template-columns: 1fr 1fr; }
    .metric-value { font-size: 23px; }
}

/* 売上ダッシュボード：期間の前後移動 */
.period-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.period-nav select {
    padding: 8px 13px;
    border: 1px solid #d2d2d7;
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
}
.period-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid #d2d2d7;
    color: var(--text);
    text-decoration: none;
    font-size: 11px;
    transition: background 0.18s ease, border-color 0.18s ease;
}
.period-arrow:hover { background: #fafafa; border-color: #b8b8bf; }
.period-label { font-size: 15px; font-weight: 600; padding: 0 4px; }

/* 売上ダッシュボード：横棒グラフ */
.bar-chart-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.bar-chart-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.bar-chart-label { width: 150px; flex-shrink: 0; font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 14px; background: var(--bg); border-radius: 7px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 7px; min-width: 2px; }
.bar-value { flex-shrink: 0; width: 150px; text-align: right; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; color: var(--primary); }
.bar-count { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 500; color: var(--muted); }
@media (max-width: 600px) {
    .bar-chart-label { width: 90px; font-size: 12px; }
    .bar-value { width: 110px; font-size: 13px; }
}

/* 売上ダッシュボード：縦棒グラフ（日別/月別/年別）。横スクロールさせず、本数に応じて幅が縮む */
.vbar-chart { display: flex; align-items: flex-end; gap: 3px; padding: 4px 2px 8px; }
.vbar-col { display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 0; max-width: 70px; cursor: default; }
.vbar-track { width: 100%; max-width: 28px; height: 160px; background: var(--bg); border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.vbar-fill { width: 100%; background: var(--primary); border-radius: 6px 6px 0 0; min-height: 2px; }
.vbar-label { margin-top: 6px; font-size: 11px; color: var(--text); font-weight: 500; white-space: nowrap; text-align: center; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vbar-sub { display: block; font-size: 9px; color: var(--muted); font-weight: 400; }
.vbar-amount { font-size: 10px; color: var(--muted); font-weight: 600; margin-bottom: 4px; white-space: nowrap; min-height: 14px; }
@media (max-width: 600px) {
    .vbar-chart { gap: 2px; }
    .vbar-label { font-size: 9px; }
    .vbar-sub { font-size: 8px; }
}

/* 修理受付：お客様のサイン */
.signature-pad-canvas-wrap { position: relative; border: 2px dashed var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.signature-pad-canvas-wrap canvas { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.signature-pad-placeholder { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); text-align: center; font-size: 13px; color: var(--muted); pointer-events: none; }
.signature-pad-block.paper-mode .signature-pad-canvas-wrap { opacity: 0.35; }
.signature-image-preview { max-width: 320px; max-height: 140px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

/* ===== 料金プランによる機能ロック表示 ===== */
.plan-lock {
  background: #fff8e6; border: 1px solid #ffd580; color: #8a5a00;
  border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; line-height: 1.7;
}
.plan-lock a { color: #0d6efd; font-weight: 700; margin-left: 4px; }
.plan-locked-wrap { opacity: 0.45; filter: grayscale(1); pointer-events: none; user-select: none; }
.nav-locked { opacity: 0.5; }
.nav-locked::after { content: " 🔒"; font-size: 11px; }
