/* =====================================================
   ケアマネエージェント — cm.css
   ===================================================== */

:root {
  --primary:    #0369A1;
  --primary-lt: #BAE6FD;
  --primary-dk: #0C4A6E;
  --accent:     #0EA5E9;
  --success:    #16A34A;
  --warn:       #D97706;
  --error:      #DC2626;
  --bg:         #F8FAFC;
  --card:       #FFFFFF;
  --border:     #E2E8F0;
  --text:       #1E293B;
  --muted:      #64748B;
  --radius:     10px;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: 'Noto Sans JP', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }

/* ── ヘッダー ─────────────────────────────────────── */
.site-header {
  background: var(--primary-dk);
  color: white;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo-icon { font-size: 1.3rem; }
.logo-accent { color: var(--primary-lt); }
.header-nav { display: flex; align-items: center; gap: 16px; font-size: .875rem; }
.header-nav a { color: rgba(255,255,255,.9); text-decoration: none; }
.header-nav a:hover { color: white; }
.nav-jigyosho { color: rgba(255,255,255,.7); font-size: .8rem; }
.nav-btn-sm {
  background: var(--accent);
  color: white !important;
  padding: 4px 14px;
  border-radius: 20px;
  font-weight: 600;
}
.nav-logout { color: rgba(255,255,255,.7) !important; font-size: .8rem; }

/* ── フッター ─────────────────────────────────────── */
.site-footer { background: var(--primary-dk); color: rgba(255,255,255,.7); padding: 20px 16px; margin-top: 48px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .8rem; }
.footer-nav { display: flex; gap: 16px; }
.footer-nav a { color: rgba(255,255,255,.7); text-decoration: none; }
.footer-nav a:hover { color: white; }

/* ── 共通 ─────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.main-content { min-height: calc(100vh - 58px - 80px); }

/* ── ボタン ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .15s;
  gap: 6px;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dk); }
.btn-outline { background: white; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-lt); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-hero { padding: 16px 40px; font-size: 1.05rem; border-radius: 50px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── フォーム ─────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; color: var(--muted); }
.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  transition: border-color .15s;
}
.form-input:focus { outline: none; border-color: var(--accent); }
.form-input-sm { padding: 4px 8px; font-size: .8rem; border: 1px solid var(--border); border-radius: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: .8rem; color: var(--muted); margin-bottom: 12px; }
.req { color: var(--error); font-size: .75rem; }

/* ── アラート ─────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .875rem; }
.alert-error { background: #FEF2F2; border-left: 4px solid var(--error); color: #991B1B; }
.alert-success { background: #F0FDF4; border-left: 4px solid var(--success); color: #166534; }
.alert-warn { background: #FFFBEB; border-left: 4px solid var(--warn); color: #92400E; }
.alert-ok { color: var(--success); font-weight: 600; }

/* ── 認証ページ ────────────────────────────────────── */
.auth-page .main-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.auth-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}
.auth-card-wide { max-width: 560px; }
.auth-logo {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-dk);
  margin-bottom: 8px;
  line-height: 1.3;
}
.auth-logo span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.auth-desc { text-align: center; font-size: .875rem; color: var(--muted); margin-bottom: 24px; }
.auth-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background .15s;
}
.auth-btn:hover { background: var(--primary-dk); }
.auth-footer-links { text-align: center; font-size: .85rem; color: var(--muted); margin-top: 20px; }
.auth-footer-links a { color: var(--primary); text-decoration: none; }
.sep { margin: 0 8px; }

/* ── ダッシュボード ─────────────────────────────────── */
.dashboard-container { padding: 32px 16px; }
.dash-header { margin-bottom: 24px; }
.dash-header h1 { font-size: 1.5rem; font-weight: 700; }
.dash-welcome { color: var(--muted); font-size: .9rem; }
.dash-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.dash-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--border);
}
.dash-card-ok { border-left-color: var(--success); }
.dash-card-warn { border-left-color: var(--warn); }
.dash-card-icon { font-size: 2rem; }
.dash-card-label { font-size: .8rem; color: var(--muted); }
.dash-card-value { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.dash-actions { display: flex; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }
.dash-section { background: white; border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); }
.dash-section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.dash-section-desc { font-size: .875rem; color: var(--muted); margin-bottom: 16px; }
.upload-area { border: 2px dashed var(--border); border-radius: 8px; padding: 24px; text-align: center; }
.upload-hint { font-size: .8rem; color: var(--muted); margin-top: 8px; }
.user-list-table-wrap { margin-top: 20px; }
.user-list-table-wrap h3 { font-size: .95rem; font-weight: 600; margin-bottom: 8px; }
.user-list { columns: 3; font-size: .875rem; list-style: disc inside; color: var(--text); }
.user-list li { margin-bottom: 2px; }
.text-muted { color: var(--muted); font-size: .875rem; }

/* ── 履歴テーブル ──────────────────────────────────── */
.history-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.history-table th { background: #F1F5F9; text-align: left; padding: 8px 12px; font-weight: 600; border-bottom: 2px solid var(--border); }
.history-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.history-table .ok { color: var(--success); font-weight: 600; }
.history-table .err { color: var(--error); font-weight: 600; }
.history-table a { color: var(--primary); text-decoration: none; font-weight: 500; }
.err-msg { color: var(--error); font-size: .8rem; }

/* ── WebApp ───────────────────────────────────────── */
.webapp-page .main-content { padding: 0; }
.cm-app { display: flex; min-height: calc(100vh - 58px); }

.cm-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--primary-dk);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.sidebar-logo { padding: 20px 16px 8px; font-size: .9rem; font-weight: 700; color: var(--primary-lt); }
.sidebar-user { padding: 4px 16px 16px; font-size: .8rem; color: rgba(255,255,255,.7); border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-nav { padding: 8px 0; flex: 1; }
.sidebar-link {
  display: block;
  padding: 10px 16px;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: .875rem;
  transition: background .1s;
}
.sidebar-link:hover, .sidebar-link.active { background: rgba(255,255,255,.1); color: white; }
.sidebar-bottom { padding: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-logout {
  width: 100%;
  background: transparent;
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.2);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: .8rem;
}
.sidebar-logout:hover { color: white; border-color: rgba(255,255,255,.5); }

.cm-main { flex: 1; overflow-y: auto; }
.tab-content { display: flex; flex-direction: column; min-height: calc(100vh - 58px); }
.tab-content.active { display: flex; }

.create-panel { padding: 28px; max-width: 680px; }
.panel { padding: 28px; }
.panel-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.panel-desc { color: var(--muted); font-size: .875rem; margin-bottom: 24px; }

.create-form { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.user-select-wrap { position: relative; }

.progress-area { background: white; border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow); margin-bottom: 16px; }
.progress-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--primary-lt);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-bar-wrap { background: var(--border); border-radius: 100px; height: 6px; margin-top: 12px; overflow: hidden; }
.progress-bar { background: var(--primary); height: 100%; border-radius: 100px; transition: width .4s ease; }

.result-area { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 16px; }
.result-success, .result-error { text-align: center; }
.result-icon { font-size: 2.5rem; margin-bottom: 8px; }
.result-success h3 { color: var(--success); margin-bottom: 8px; }
.result-error h3 { color: var(--error); margin-bottom: 8px; }
.result-message { color: var(--muted); font-size: .875rem; margin-bottom: 20px; }
.result-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* シナリオ会話 */
.scenario-panel { flex: 1; border-top: 1px solid var(--border); background: #F8FAFC; padding: 16px; }
.chat-messages { max-width: 600px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; gap: 8px; align-items: flex-end; }
.chat-msg.user { flex-direction: row-reverse; }
.chat-avatar { font-size: 1.3rem; }
.chat-bubble {
  background: white;
  border-radius: 14px 14px 14px 4px;
  padding: 10px 14px;
  font-size: .875rem;
  max-width: 72%;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.user-bubble {
  background: var(--primary);
  color: white;
  border-radius: 14px 14px 4px 14px;
}

/* 設定 */
.settings-section { background: white; border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.settings-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--primary-dk); }
.settings-desc { font-size: .8rem; color: var(--muted); margin-bottom: 12px; }
.settings-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.settings-row label { font-size: .85rem; font-weight: 600; width: 180px; flex-shrink: 0; }
.settings-row .form-input { max-width: 300px; }
.settings-test-result { padding: 8px 12px; border-radius: 6px; font-size: .85rem; }
.settings-test-result.ok { background: #F0FDF4; color: var(--success); }
.settings-test-result.err { background: #FEF2F2; color: var(--error); }

/* ── LP ─────────────────────────────────────────── */
.lp-hero {
  background: linear-gradient(135deg, var(--primary-dk), var(--primary));
  color: white;
  padding: 80px 16px 64px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: .85rem;
  margin-bottom: 20px;
}
.hero-title { font-size: 2.2rem; font-weight: 700; line-height: 1.3; margin-bottom: 16px; }
.hero-title .accent { color: var(--primary-lt); }
.hero-subtitle { font-size: 1.05rem; color: rgba(255,255,255,.9); margin-bottom: 32px; line-height: 1.8; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.hero-note { font-size: .8rem; color: rgba(255,255,255,.7); }
.hero-actions .btn-outline { color: white; border-color: rgba(255,255,255,.5); background: transparent; }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,.1); }

.lp-problem { padding: 56px 16px; background: white; }
.lp-solution { padding: 56px 16px; }
.lp-features { padding: 56px 16px; background: white; }
.lp-pricing { padding: 56px 16px; }
.lp-cta { padding: 64px 16px; background: var(--primary); color: white; text-align: center; }
.lp-cta h2 { font-size: 1.6rem; margin-bottom: 8px; }
.lp-cta p { opacity: .9; margin-bottom: 24px; }
.lp-cta .btn-primary { background: white; color: var(--primary); }
.lp-cta .btn-primary:hover { background: var(--primary-lt); }
.cta-contact { font-size: .875rem; opacity: .8; margin-top: 16px; }
.cta-contact a { color: white; }

.section-title { text-align: center; font-size: 1.5rem; font-weight: 700; margin-bottom: 36px; }
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.problem-card { background: var(--bg); border-radius: var(--radius); padding: 24px; text-align: center; font-size: .9rem; line-height: 1.7; }
.problem-icon { font-size: 2rem; margin-bottom: 8px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { background: white; border-radius: var(--radius); padding: 28px; text-align: center; box-shadow: var(--shadow); position: relative; }
.step-num { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.step-icon { font-size: 2rem; margin: 8px 0; }
.step-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: .875rem; color: var(--muted); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { border-radius: var(--radius); padding: 20px; }
.feature-icon { font-size: 1.8rem; margin-bottom: 8px; }
.feature-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: .85rem; color: var(--muted); }

.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 680px; margin: 0 auto 24px; }
.pricing-card { background: white; border-radius: 16px; padding: 32px; box-shadow: var(--shadow); border: 2px solid var(--border); text-align: center; position: relative; }
.pricing-standard { border-color: var(--primary); }
.pricing-badge { display: inline-block; background: var(--bg); color: var(--muted); border-radius: 12px; padding: 2px 10px; font-size: .75rem; margin-bottom: 12px; }
.pricing-badge.popular { background: var(--primary); color: white; }
.pricing-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.pricing-price { font-size: 2rem; font-weight: 700; color: var(--primary-dk); margin-bottom: 20px; }
.pricing-price span { font-size: .9rem; font-weight: 400; color: var(--muted); }
.pricing-features { list-style: none; text-align: left; margin-bottom: 24px; }
.pricing-features li { padding: 6px 0; font-size: .9rem; border-bottom: 1px solid var(--border); }
.pricing-note { text-align: center; font-size: .8rem; color: var(--muted); }

/* ── 法的ページ ─────────────────────────────────── */
.legal-container { padding: 40px 16px; max-width: 800px; }
.legal-container h1 { font-size: 1.5rem; margin-bottom: 4px; }
.legal-date { color: var(--muted); font-size: .85rem; margin-bottom: 24px; }
.legal-container h2 { font-size: 1rem; font-weight: 700; margin: 24px 0 8px; color: var(--primary-dk); }
.legal-container p, .legal-container li { font-size: .9rem; line-height: 1.8; }
.legal-container ul { padding-left: 20px; }
.legal-container a { color: var(--primary); }

/* ── フォームページ ──────────────────────────────── */
.form-page .form-container { padding: 40px 16px; max-width: 640px; }
.form-page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; }
.contact-form .btn-primary { margin-top: 8px; }

/* ── 管理者ページ ────────────────────────────────── */
.admin-page .main-content { padding: 0 }
.admin-container { padding: 28px 16px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-header h1 { font-size: 1.3rem; font-weight: 700; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: white; border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow); }
.stat-num { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: .8rem; color: var(--muted); }
.admin-section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .85rem; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th { background: var(--primary-dk); color: white; text-align: left; padding: 10px 12px; font-weight: 600; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:hover td { background: #F8FAFC; }
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .75rem; font-weight: 600; }
.status-trial    { background: #FFF7ED; color: #C2410C; }
.status-active   { background: #F0FDF4; color: var(--success); }
.status-suspended{ background: #FEF2F2; color: var(--error); }
.status-canceled { background: #F1F5F9; color: var(--muted); }
.status-free     { background: #EFF6FF; color: #1D4ED8; }
.btn-link { color: var(--primary); text-decoration: none; font-size: .85rem; font-weight: 600; }
.admin-detail-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 24px; }
.detail-card { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.detail-card h2 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.detail-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.detail-table th { text-align: left; padding: 8px; color: var(--muted); width: 180px; border-bottom: 1px solid var(--border); }
.detail-table td { padding: 8px; border-bottom: 1px solid var(--border); }
.ok { color: var(--success); font-weight: 600; }
.err { color: var(--error); font-weight: 600; }
.err-msg { color: var(--error); font-size: .8rem; }

/* ── トースト ─────────────────────────────────────── */
.cm-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-dk);
  color: white;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 600;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 9999;
}
.cm-toast.error { background: var(--error); }

/* ── レスポンシブ ──────────────────────────────────── */
@media (max-width: 768px) {
  .cm-sidebar { display: none; }
  .hero-title { font-size: 1.5rem; }
  .steps-grid, .problem-grid, .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .dash-cards { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .history-table { font-size: .78rem; }
}

/* ── 新料金フロー ─────────────────────────────────── */
.pricing-single-wrap { max-width: 720px; margin: 0 auto; }
.pricing-card-single { background: white; border-radius: 20px; padding: 40px 36px; box-shadow: 0 4px 24px rgba(3,105,161,.12); border: 2px solid var(--primary); }
.pricing-flow { display: flex; align-items: flex-start; gap: 0; justify-content: center; }
.pricing-flow-step { flex: 1; text-align: center; padding: 0 20px; }
.pricing-flow-arrow { font-size: 2rem; color: var(--primary); font-weight: 700; align-self: center; padding: 0 8px; flex-shrink: 0; }
.flow-badge { display: inline-block; background: var(--bg); color: var(--primary-dk); border: 2px solid var(--primary); border-radius: 20px; padding: 4px 16px; font-size: .8rem; font-weight: 700; margin-bottom: 12px; }
.flow-badge-paid { background: var(--primary); color: white; border-color: var(--primary); }
.flow-price { font-size: 2rem; font-weight: 700; color: var(--primary-dk); margin-bottom: 4px; }
.flow-price span { font-size: .9rem; font-weight: 400; color: var(--muted); }
.flow-label { font-size: .85rem; color: var(--muted); margin-bottom: 16px; font-weight: 600; }
.flow-features { list-style: none; text-align: left; font-size: .875rem; line-height: 1.9; }
.flow-features li::before { content: '✓ '; color: var(--primary); font-weight: 700; }
@media (max-width: 768px) {
  .pricing-flow { flex-direction: column; align-items: center; }
  .pricing-flow-arrow { transform: rotate(90deg); padding: 8px 0; }
  .pricing-card-single { padding: 28px 20px; }
}

/* ── 規約同意チェックボックス ── */
.form-check { display: flex; align-items: flex-start; gap: 10px; font-size: .875rem; color: var(--muted); margin-bottom: 16px; cursor: pointer; line-height: 1.6; }
.form-check input[type=checkbox] { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; accent-color: var(--primary); cursor: pointer; }
.form-check a { color: var(--primary); text-decoration: underline; }

/* ── Dashboard (新レイアウト) ──────────────────────── */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.card-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 16px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.card-status  { }
.card-launch  { }
.card-drive   { grid-column: 1 / -1; }
.card-upload  { grid-column: 1 / -1; }

.status-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.status-date { font-size: 12px; color: var(--muted); }
.jigyosho-name { font-size: 20px; font-weight: bold; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: bold;
}
.badge-green  { background: #DCFCE7; color: #166534; }
.badge-blue   { background: #DBEAFE; color: #1E40AF; }
.badge-yellow { background: #FEF9C3; color: #92400E; }
.badge-red    { background: #FEE2E2; color: #991B1B; }
.badge-gray   { background: #F1F5F9; color: #475569; }

.btn-launch {
  display: inline-block;
  background: white;
  color: #0369A1;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
}
.btn-launch:hover { opacity: .9; }

.drive-done { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.check-icon { font-size: 24px; }

.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.upload-icon { font-size: 36px; margin-bottom: 10px; }

.user-chip {
  display: inline-block;
  background: #EFF6FF;
  color: #1D4ED8;
  border-radius: 99px;
  padding: 2px 10px;
  font-size: 12px;
  margin: 2px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th, .data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background: var(--bg);
  font-weight: bold;
  color: var(--muted);
}
.data-table tr:hover td { background: #EFF6FF; }

@media (max-width: 640px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .card-drive, .card-upload { grid-column: 1; }
}
