/* R200 style.css · local-carpool */
:root {
  --primary: #F97316; --secondary: #FB923C; --accent: #0891B2;
  --bg: #FFF7ED; --card: #FFFFFF; --text: #7C2D12; --text-secondary: #78716C;
  --border: #FED7AA; --success: #16A34A; --warning: #EAB308; --danger: #DC2626;
  --contact-footer-h: 92px; --bottom-nav-h: 52px;
  --bottom-chrome-h: calc(var(--contact-footer-h) + var(--bottom-nav-h));
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
  max-width: 480px; margin: 0 auto; min-height: 100vh;
}
body.has-contact-footer.has-bottom-nav { padding-bottom: calc(var(--bottom-chrome-h) + 16px + var(--safe-area-bottom)); }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

.app-header {
  padding: 12px 16px; background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; position: sticky; top: 0; z-index: 100;
}
.app-header h1 { font-size: 17px; font-weight: 700; }
.app-sub { font-size: 12px; opacity: 0.9; margin-top: 4px; }
.header-row { display: flex; justify-content: space-between; align-items: center; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-share { font-size: 18px; color: #fff; padding: 8px; }
.nav-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 10px; display: inline-flex; align-items: center; justify-content: center;
}
.hidden { display: none !important; }

#main { padding: 12px 16px 20px; min-height: 50vh; }
.page-title { font-size: 18px; margin-bottom: 10px; }
.section-title { font-size: 15px; margin: 14px 0 8px; }
.trip-meta, .empty-hint { font-size: 12px; color: var(--text-secondary); }
.empty-hint { padding: 12px 0; text-align: center; }

.bottom-nav {
  position: fixed; bottom: calc(var(--contact-footer-h) + var(--safe-area-bottom));
  left: 0; right: 0; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--card); border-top: 1px solid var(--border); z-index: 80; padding: 4px 0; min-height: var(--bottom-nav-h);
}
.bottom-nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 44px; font-size: 0.58rem; color: var(--text-secondary); border: none; background: transparent; cursor: pointer;
}
.bottom-nav-btn span { font-size: 1.1rem; }
.bottom-nav-btn.active { color: var(--primary); font-weight: 700; }
.bottom-nav-btn.fab-tab span { font-size: 1.4rem; color: var(--primary); }

.contact-footer {
  position: fixed; left: 0; right: 0; bottom: 0; background: #1a1a1a; z-index: 850;
  padding: 0.55rem 0.75rem calc(0.55rem + var(--safe-area-bottom)); min-height: var(--contact-footer-h);
}
.contact-footer__btns { display: grid; grid-template-columns: repeat(3, minmax(0, 88px)); justify-content: center; gap: 0.4rem; max-width: 320px; margin: 0 auto; }
.contact-footer__cta, .contact-footer__btn {
  display: flex; align-items: center; justify-content: center; min-height: 36px; border-radius: 8px; font-size: 0.72rem; border: none;
}
.contact-footer__cta { background: var(--primary); color: #fff; font-weight: 700; }
.contact-footer__btn { background: #333; color: #fff; }
.contact-footer__brand { text-align: center; color: #888; font-size: 0.62rem; margin-top: 6px; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(249, 115, 22, 0.06);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--card); cursor: pointer; font-size: 14px;
}
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-block { display: flex; width: 100%; }
.form-group { display: block; margin-bottom: 10px; font-size: 13px; }
.form-input { width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }

.chip, .chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card);
  font-size: 12px; cursor: pointer;
}
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.role-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.sticky-role { position: sticky; top: 56px; z-index: 90; background: var(--bg); padding: 4px 0; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick-btn { border: 1px solid var(--border); background: var(--card); border-radius: 12px; padding: 12px 8px; text-align: center; font-size: 12px; cursor: pointer; }
.quick-btn span { display: block; font-size: 22px; margin-bottom: 4px; }

.trip-card__head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.trip-card__route { font-weight: 700; font-size: 14px; }
.badge { font-size: 10px; padding: 2px 8px; border-radius: 999px; background: var(--border); }
.badge-recruiting { background: #FFEDD5; color: var(--primary); }
.badge-confirmed { background: #DCFCE7; color: var(--success); }
.badge-completed { background: #E5E7EB; color: #374151; }

.activity-card__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quota-bar { height: 6px; background: var(--border); border-radius: 3px; margin: 8px 0; overflow: hidden; }
.quota-bar__fill { height: 100%; background: var(--primary); border-radius: 3px; }

.kanban-board { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 360px) { .kanban-board { grid-template-columns: repeat(3, 1fr); } }
.kanban-col { background: var(--card); border: 1px solid var(--border); border-radius: 12px; min-height: 120px; }
.kanban-col__head { padding: 8px 10px; font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
.kanban-col__body { padding: 8px; }
.kanban-card { padding: 10px; margin-bottom: 8px; }
.kanban-card__route { font-size: 12px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px; }
.route-arrow { color: var(--primary); }

.carpooler-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.carpooler-card__top { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 20px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.stats-grid strong { display: block; font-size: 18px; color: var(--primary); }
.stats-grid span { font-size: 10px; color: var(--text-secondary); }

.step-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.step-dot.active { background: var(--primary); }
.step-label { font-size: 12px; color: var(--primary); margin-bottom: 10px; font-weight: 700; }
.publish-actions { display: flex; gap: 8px; margin-top: 12px; }
.publish-actions .btn { flex: 1; }

.msg-card.unread { border-color: var(--primary); }
.page-head-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rsvp-row { padding: 8px 0; border-bottom: 1px solid var(--border); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 900;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal { width: 100%; max-width: 360px; max-height: 85vh; overflow: auto; }
.modal-title { margin-bottom: 10px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

.toast-container { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 950; pointer-events: none; }
.toast-item {
  background: rgba(30,30,30,.92); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 13px; margin-bottom: 8px; opacity: 0; transition: opacity .2s;
}
.toast-item.show { opacity: 1; }

.share-main { padding: 20px 16px 24px; max-width: 480px; margin: 0 auto; }
.share-card { text-align: center; padding: 20px 16px; }
.share-icon { font-size: 56px; margin-bottom: 8px; }
.share-slogan { color: var(--primary); font-weight: 600; margin: 8px 0 16px; font-size: 14px; }
.share-link { font-size: 11px; color: var(--text-secondary); word-break: break-all; margin: 8px 0 12px; }
.share-qr { display: flex; justify-content: center; margin: 12px 0; }
.share-trips { margin-top: 16px; }
.share-trip-card { margin-bottom: 8px; }
.share-page.has-contact-footer { padding-bottom: calc(var(--contact-footer-h) + 16px + var(--safe-area-bottom)); }

.star-input { margin: 8px 0; }
.star-btn {
  border: none; background: none; font-size: 28px; color: var(--border); cursor: pointer; padding: 0 2px;
}
.star-btn.active { color: #F6AD55; }
.review-stars { color: #F6AD55; font-size: 14px; margin-bottom: 6px; }
.review-card { padding: 10px; }
.poster-area { margin: 8px 0; overflow-x: auto; }
.poster-canvas { max-width: 100%; height: auto; border-radius: 8px; }
.modal-actions-inline { margin-top: 12px; }

.offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  background: var(--warning); color: #111; text-align: center; font-size: 12px; padding: 6px 12px;
}

body[data-brand="local-carpool"].share-page .chat-widget {
  bottom: calc(var(--contact-footer-h) + 12px + var(--safe-area-bottom)) !important;
}

body[data-brand="local-carpool"].has-bottom-nav .chat-widget {
  bottom: calc(var(--bottom-chrome-h) + 12px + var(--safe-area-bottom)) !important;
}
