/* Loco Portal — mobile-first design system.
   White / green / grey. Trustworthy SaaS feel. Big tap targets. */

:root {
  --green: #16a34a;
  --green-dark: #15803d;
  --green-soft: #dcfce7;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #111827;
  --ink-soft: #6b7280;
  --line: #e5e7eb;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --info: #2563eb;
  --info-soft: #dbeafe;
  --muted-soft: #f3f4f6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
  --maxw: 1040px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Noto Sans JP", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: var(--green-dark); }

/* ---- App shell ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar .brand {
  font-weight: 800;
  font-size: 18px;
  color: var(--green-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar .brand .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); display: inline-block;
}
.topbar .spacer { flex: 1; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px;
}

/* ---- Context switcher ---- */
.context-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.context-bar label { font-size: 12px; color: var(--ink-soft); }
select, .select {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  min-height: 44px;
  min-width: 140px;
}

/* ---- Category sections ---- */
.category-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: 0.02em;
  margin: 22px 4px 10px;
}

/* ---- Service cards ---- */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.card {
  flex: 0 1 300px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card.is-muted { background: #fbfcfd; }
.card.is-locked { background: #fbfbfb; }
.card-cat { font-size: 11px; font-weight: 700; color: var(--ink-soft); text-align: center; }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--green-soft); color: var(--green-dark);
  display: grid; place-items: center; font-weight: 800; font-size: 18px;
  flex-shrink: 0;
}
.card-title { font-weight: 700; font-size: 16px; margin: 0; }
/* Wordmark logos: uniform text height, centred in a fixed logo area.
   Some services have no image logo yet -> render the name as a wordmark. */
.card-logo-wrap { height: 52px; display: flex; align-items: center; justify-content: center; }
.logo { height: 32px; width: auto; max-width: 92%; object-fit: contain; display: block; }
.logo-text { font-weight: 800; font-size: 22px; letter-spacing: 0.01em; color: var(--ink); }
.logo-lg { height: 56px; }
.logo-text-lg { font-size: 40px; color: var(--green-dark); }
.card.is-muted .logo, .main-card.is-muted .logo { opacity: 0.5; filter: grayscale(0.2); }
.card-copy { color: var(--ink-soft); font-size: 12.5px; margin: 0; text-align: center; min-height: 34px; }
.card-desc { color: var(--ink-soft); font-size: 12px; margin: 0; }
.card-meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--ink-soft);
  border-top: 1px dashed var(--line); padding-top: 10px;
}
.card-meta b { color: var(--ink); font-weight: 600; }
.card-actions { display: flex; gap: 8px; margin-top: auto; justify-content: center; }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  white-space: nowrap;
}
.badge.ok { background: var(--green-soft); color: var(--green-dark); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.muted { background: var(--muted-soft); color: var(--ink-soft); }

/* ---- Buttons ---- */
.btn {
  font: inherit; font-weight: 700;
  border: 1px solid transparent; border-radius: 10px;
  padding: 12px 16px; min-height: 44px;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--green); color: #fff; flex: 1; }
.btn-primary:hover:not(:disabled) { background: var(--green-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--muted-soft); }
.btn-sm { padding: 8px 12px; min-height: 38px; font-size: 13px; }

/* ---- Onboarding / empty ---- */
.notice {
  background: var(--green-soft);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.notice h3 { margin: 0 0 6px; }
.empty {
  text-align: center; color: var(--ink-soft);
  padding: 48px 16px;
}

/* ---- Auth / forms ---- */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 16px;
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.field input {
  width: 100%; font: inherit; padding: 12px; min-height: 46px;
  border: 1px solid var(--line); border-radius: 10px;
}
.hint { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }

/* ---- Tables (admin) ---- */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.table th { background: var(--muted-soft); font-size: 12px; color: var(--ink-soft); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---- Footer / legal links ---- */
.footer {
  max-width: var(--maxw); margin: 24px auto; padding: 16px;
  color: var(--ink-soft); font-size: 12px;
  display: flex; flex-wrap: wrap; gap: 12px;
}
.footer a { color: var(--ink-soft); }

/* ---- Legal docs ---- */
.doc { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
.doc h1 { font-size: 24px; }
.doc h2 { font-size: 18px; margin-top: 28px; }
.doc p, .doc li { color: #374151; }
.doc .meta { color: var(--ink-soft); font-size: 13px; }

/* ---- Misc (simple gateway) ---- */
.who { font-size: 13px; color: var(--ink-soft); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead { color: var(--ink-soft); margin: 4px 4px 20px; text-align: center; }
.auth-title { margin: 0 0 6px; color: var(--green-dark); display: flex; align-items: center; gap: 8px; font-size: 22px; }
.auth-title .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green); display: inline-block; }
code { background: var(--muted-soft); padding: 1px 6px; border-radius: 6px; font-size: 12px; }

.skeleton { background: linear-gradient(90deg,#eee,#f5f5f5,#eee); border-radius: 8px; height: 120px; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.6} }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== camomile Business Tools ===== */

/* Hero */
.hero { text-align: center; padding: 18px 8px 8px; }
.hero-title { font-size: 30px; font-weight: 800; margin: 0 0 8px; color: var(--ink);
  background: linear-gradient(90deg, var(--green-dark), #0ea5a0); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.hero-sub { font-size: 16px; color: var(--ink); font-weight: 600; margin: 0 auto 10px; max-width: 680px; }
.hero-desc { font-size: 13.5px; color: var(--ink-soft); margin: 0 auto; max-width: 720px; line-height: 1.8; }

/* Section labels */
.section-label { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; color: var(--ink-soft);
  margin: 28px 4px 12px; }

/* MAIN SERVICE card */
.main-card { background: linear-gradient(180deg, #f0fdf4, #ffffff); border: 1px solid #bbf7d0;
  border-radius: 18px; padding: 24px; box-shadow: var(--shadow); margin-top: 8px; }
.main-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.main-badge { background: var(--green); color: #fff; letter-spacing: 0.08em; }
.main-card-logo { display: flex; align-items: center; justify-content: flex-start; min-height: 64px; margin: 4px 0 8px; }
.main-card-copy { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.main-card-desc { font-size: 14px; line-height: 1.8; text-align: left; max-width: 760px; }
.main-actions { justify-content: flex-start; margin-top: 14px; flex-wrap: wrap; }
.main-actions .btn-primary { flex: 0 0 auto; padding: 12px 28px; }

/* Feature tags */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.tag { font-size: 11px; color: var(--green-dark); background: var(--green-soft);
  border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.card .tag-row { justify-content: center; }

/* Other-tools card tweaks */
.card-actions .btn-ghost { flex: 0 0 auto; }
.card-actions .btn-primary { flex: 1 1 auto; }

/* Contact band */
.contact-band { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); margin: 28px 0 8px; }
.contact-band strong { font-size: 15px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,0.55);
  display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: 16px; max-width: 560px; width: 100%; max-height: 88vh;
  overflow: auto; padding: 24px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent;
  font-size: 26px; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.modal-logo { min-height: 48px; display: flex; align-items: center; margin-bottom: 6px; }
.modal-copy { font-weight: 700; font-size: 16px; margin: 6px 0; }
.modal-detail { color: #374151; font-size: 14px; line-height: 1.9; margin: 8px 0 14px; }
.modal-h { font-size: 13px; color: var(--ink-soft); margin: 12px 0 8px; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

@media (max-width: 640px) {
  .hero-title { font-size: 24px; }
  .logo-text-lg { font-size: 30px; }
  .main-card { padding: 18px; }
  .contact-band { flex-direction: column; align-items: stretch; text-align: center; }
}
