/* =========================================================
   BESMA Top Page
   対象：index.php のみ
   方針：TOPを「説明」ではなく「目的別入口」にする
========================================================= */
.besma-top-page {
  --top-green: #34CFA3;
  --top-green-dark: #18A982;
  --top-blue: #5AB8FF;
  --top-gradient: linear-gradient(135deg, var(--top-green), var(--top-blue));
  --top-text: #111827;
  --top-muted: #64748b;
  --top-border: #e5e7eb;
  --top-border-strong: #cbd5e1;
  --top-soft: #f8fafc;
  --top-shadow: 0 8px 22px rgba(15, 23, 42, .06);
  --top-shadow-hover: 0 14px 34px rgba(15, 23, 42, .075);
  background: #fff !important;
  color: var(--top-text);
}

.besma-top-page main,
.besma-top-page .section,
.besma-top-page .top-section,
.besma-top-page .top-hero,
.besma-top-page .top-stats,
.besma-top-page .top-shortcuts {
  background: #fff !important;
  background-image: none !important;
}

.besma-top-page .container {
  max-width: 1120px !important;
}

.besma-top-page a { text-decoration: none; }

/* Header */
.besma-top-page .site-header {
  background: rgba(255,255,255,.96) !important;
  border-bottom: 1px solid var(--top-border) !important;
  backdrop-filter: blur(10px);
}
.besma-top-page .header-inner {
  max-width: 1120px !important;
  min-height: 64px;
  padding: 0 20px !important;
}
.besma-top-page .brand-mark {
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  background: var(--top-gradient) !important;
  box-shadow: none !important;
}
.besma-top-page .brand strong {
  font-size: 21px !important;
  letter-spacing: -.035em !important;
  color: var(--top-green-dark) !important;
}
.besma-top-page .brand small {
  font-size: 10px !important;
  color: var(--top-muted) !important;
}
.besma-top-page .header-nav a {
  color: var(--top-muted) !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  padding: 8px 10px !important;
  border-radius: 999px !important;
}
.besma-top-page .header-nav a:hover {
  background: #ecfdf5 !important;
  color: var(--top-green-dark) !important;
}

/* Common */
.top-eyebrow,
.top-action-card span,
.top-status-card span,
.top-area-card span,
.top-coming-card span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: var(--top-green-dark);
  font-size: 11px;
  font-weight: 900;
}
.top-eyebrow { gap: 7px; min-height: 28px; padding: 5px 10px; font-size: 12px; }
.top-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--top-gradient);
}
.top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.top-btn.primary {
  color: #fff !important;
  background: var(--top-gradient);
  box-shadow: 0 10px 22px rgba(52,207,163,.22);
}
.top-btn.primary-soft {
  color: #fff !important;
  background: linear-gradient(135deg, var(--top-green-dark), var(--top-blue));
  box-shadow: 0 10px 22px rgba(52,207,163,.18);
}
.top-btn.outline {
  color: var(--top-green-dark) !important;
  background: #fff;
  border-color: rgba(52,207,163,.45);
}
.top-btn.outline:hover { background: #ecfdf5; }

/* Hero */
.top-hero {
  padding: 24px 0 14px;
  border-bottom: 1px solid #eef2f7;
}
.top-hero-panel {
  padding: 2px 0;
}
.top-hero h1 {
  margin: 12px 0 8px;
  max-width: 760px;
  color: var(--top-text);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.14;
  letter-spacing: -.045em;
}
.top-lead {
  margin: 0;
  max-width: 740px;
  color: #475569;
  font-size: 14px;
  line-height: 1.8;
  font-weight: 650;
}
.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

/* Shortcuts */
.top-shortcuts { padding: 14px 0 0; }
.top-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.top-shortcut-card,
.top-item-card,
.top-action-card,
.top-status-card,
.top-area-card,
.top-coming-card,
.top-stat-card {
  background: #fff;
  border: 1px solid var(--top-border);
  box-shadow: var(--top-shadow);
}
.top-shortcut-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 16px;
  padding: 12px;
  color: inherit;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.top-shortcut-card:hover,
.top-item-card:hover,
.top-action-card:hover {
  border-color: var(--top-border-strong);
  box-shadow: var(--top-shadow-hover);
}
.top-shortcut-card > span {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(52,207,163,.16), rgba(90,184,255,.12));
  border: 1px solid #eef2f7;
  font-size: 19px;
}
.top-shortcut-card strong {
  display: block;
  color: var(--top-text);
  font-size: 14px;
  line-height: 1.35;
}
.top-shortcut-card small {
  display: block;
  margin-top: -2px;
  color: var(--top-muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

/* Stats */
.top-stats { padding: 14px 0 0; }
.top-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.top-stat-card {
  border-radius: 16px;
  padding: 12px;
}
.top-stat-card strong {
  display: block;
  color: var(--top-green-dark);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.045em;
}
.top-stat-card span {
  display: block;
  margin-top: 5px;
  color: var(--top-muted);
  font-size: 12px;
  font-weight: 850;
}

/* Sections */
.top-section { padding: 26px 0; }
.top-section-soft {
  background: #fff !important;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
}
.top-section-head {
  max-width: 820px;
  margin: 0 0 12px;
}
.top-section-head.with-action {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}
.top-section-head h2 {
  margin: 0 0 6px;
  color: var(--top-text);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.3;
  letter-spacing: -.035em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.top-section-head h2::before {
  content: "";
  width: 5px;
  height: 1.1em;
  border-radius: 999px;
  background: var(--top-gradient);
  flex: 0 0 auto;
}
.top-section-head p {
  margin: 0;
  color: var(--top-muted);
  font-size: 13px;
  line-height: 1.75;
}
.top-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.top-card-grid,
.top-action-grid {
  display: grid;
  gap: 10px;
}
.top-card-grid.cols-3,
.top-action-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.top-action-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.top-action-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Item Cards */
.top-item-card {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr);
  gap: 11px;
  min-width: 0;
  border-radius: 16px;
  padding: 12px;
  color: inherit;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.top-item-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(52,207,163,.16), rgba(90,184,255,.12));
  border: 1px solid #eef2f7;
  font-size: 24px;
}
.top-item-body span {
  display: block;
  color: var(--top-muted);
  font-size: 11px;
  font-weight: 900;
}
.top-item-body h3 {
  margin: 4px 0 6px;
  color: var(--top-text);
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -.025em;
}
.top-item-body small {
  display: block;
  color: var(--top-muted);
  font-size: 12px;
  line-height: 1.55;
  font-weight: 850;
}

/* Action / Status Cards */
.top-action-card,
.top-status-card,
.top-coming-card {
  border-radius: 16px;
  padding: 14px;
}
.top-action-card {
  display: grid;
  gap: 8px;
  color: inherit;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.top-action-card strong,
.top-status-card strong,
.top-coming-card h3,
.top-area-card h3 {
  display: block;
  margin: 2px 0 0;
  color: var(--top-text);
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: -.025em;
}
.top-action-card small,
.top-status-card small,
.top-coming-card p,
.top-area-card p {
  color: #475569;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 750;
}
.top-status-card {
  display: grid;
  gap: 8px;
  min-height: 116px;
  align-content: start;
}

/* Area */
.top-area-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: center;
  border-radius: 18px;
  padding: 16px;
}
.top-area-form {
  display: grid;
  gap: 7px;
}
.top-area-form label {
  color: var(--top-muted);
  font-size: 12px;
  font-weight: 900;
}
.top-area-form div {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px;
}
.top-area-form input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--top-border);
  background: #f9fafb;
  border-radius: 11px;
  padding: 9px 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  outline: none;
}
.top-area-form input:focus {
  border-color: var(--top-green);
  box-shadow: 0 0 0 4px rgba(52,207,163,.14);
  background: #fff;
}
.top-area-form button {
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 11px;
  border: 1px solid rgba(52,207,163,.45);
  background: #fff;
  color: var(--top-green-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}
.top-area-form small {
  color: var(--top-muted);
  font-size: 11px;
  line-height: 1.55;
  font-weight: 750;
}

/* Footer */
.besma-top-page .footer {
  padding: 30px 0;
  color: var(--top-muted);
  background: #fff !important;
}
.besma-top-page .footer-inner {
  border-top: 1px solid var(--top-border);
  padding-top: 18px;
}
.besma-top-page .footer a {
  color: var(--top-muted);
  font-size: 13px;
}
.besma-top-page .footer a:hover { color: var(--top-green-dark); }

@media (max-width: 900px) {
  .top-shortcut-grid,
  .top-card-grid.cols-3,
  .top-action-grid.cols-3,
  .top-action-grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .top-section-head.with-action,
  .top-area-card {
    grid-template-columns: 1fr;
    display: grid;
  }
  .top-head-actions { justify-content: flex-start; }
  .top-area-card { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .besma-top-page .header-inner {
    min-height: 58px;
    padding: 0 12px !important;
  }
  .top-hero { padding: 18px 0 12px; }
  .top-hero h1 { font-size: 28px; }
  .top-actions,
  .top-head-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .top-btn { width: 100%; }
  .top-shortcut-grid,
  .top-card-grid.cols-3,
  .top-action-grid.cols-2,
  .top-action-grid.cols-3,
  .top-action-grid.cols-4,
  .top-stats-grid {
    grid-template-columns: 1fr;
  }
  .top-shortcut-card,
  .top-item-card {
    grid-template-columns: 46px minmax(0,1fr);
    border-radius: 14px;
  }
  .top-shortcut-card > span,
  .top-item-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    font-size: 21px;
  }
  .top-area-form div {
    grid-template-columns: 1fr;
  }
  .top-area-form button {
    width: 100%;
  }
}
