/* Dasher テーマへの最小限の追加スタイル */

/* ===== 提供元ポータルのアクセントを青系に =====
 * Dasher 既定の緑 (#00a76f) を上書き。提供元ポータルは青系。特権管理者は紫系（.chrome-admin）。
 * アクセント: #74b9ff(明) / #2e86de(基) / #1f6fc4(暗) / #0984e3(hover) */
:root,
[data-bs-theme="light"] {
  --ds-primary-lighter: #d6e9ff;
  --ds-primary-light: #74b9ff;
  --ds-primary-dark: #1f6fc4;
  --ds-primary-darker: #0b3d73;
  --ds-primary: #2e86de;
  --ds-primary-rgb: 46, 134, 222;
  --ds-primary-text-emphasis: #1f6fc4;
  --ds-primary-bg-subtle: #e8f2fc;
  --ds-primary-border-subtle: #74b9ff;
  --ds-link-color: #2e86de;
  --ds-link-color-rgb: 46, 134, 222;
  --ds-link-hover-color: #0984e3;
  --ds-link-hover-color-rgb: 9, 132, 227;
  --ds-focus-ring-color: rgba(46, 134, 222, 0.25);
  --ds-box-shadow-primary: rgba(46, 134, 222, 0.24) 0px 8px 16px 0px;
  --bs-primary: #2e86de;
  --bs-primary-rgb: 46, 134, 222;
  --bs-link-color: #2e86de;
  --bs-link-hover-color: #0984e3;
}
[data-bs-theme="dark"] {
  --ds-primary-lighter: #1a3a66;
  --ds-primary-light: #2e86de;
  --ds-primary-dark: #74b9ff;
  --ds-primary-darker: #a8d4ff;
  --ds-primary: #54a0ff;
  --ds-primary-rgb: 84, 160, 255;
  --ds-primary-text-emphasis: #74b9ff;
  --ds-primary-bg-subtle: rgba(84, 160, 255, 0.16);
  --ds-primary-border-subtle: #2e86de;
  --ds-link-color: #54a0ff;
  --ds-link-color-rgb: 84, 160, 255;
  --ds-link-hover-color: #74b9ff;
  --ds-link-hover-color-rgb: 116, 185, 255;
  --ds-focus-ring-color: rgba(84, 160, 255, 0.35);
  --ds-box-shadow-primary: rgba(84, 160, 255, 0.24) 0px 8px 16px 0px;
  --bs-primary: #54a0ff;
  --bs-primary-rgb: 84, 160, 255;
  --bs-link-color: #54a0ff;
  --bs-link-hover-color: #74b9ff;
}

/* theme.css のハードコード緑を変数経由に寄せる */
a {
  color: var(--ds-link-color);
}
a:hover {
  color: var(--ds-link-hover-color);
}
.btn-primary {
  --ds-btn-color: #fff;
  --ds-btn-bg: #2e86de;
  --ds-btn-border-color: #2e86de;
  --ds-btn-hover-color: #fff;
  --ds-btn-hover-bg: #1f6fc4;
  --ds-btn-hover-border-color: #1f6fc4;
  --ds-btn-focus-shadow-rgb: 46, 134, 222;
  --ds-btn-active-color: #fff;
  --ds-btn-active-bg: #0984e3;
  --ds-btn-active-border-color: #0984e3;
  --ds-btn-disabled-color: #fff;
  --ds-btn-disabled-bg: #2e86de;
  --ds-btn-disabled-border-color: #2e86de;
}
.btn-outline-primary {
  --ds-btn-color: #2e86de;
  --ds-btn-border-color: #2e86de;
  --ds-btn-hover-color: #fff;
  --ds-btn-hover-bg: #2e86de;
  --ds-btn-hover-border-color: #2e86de;
  --ds-btn-focus-shadow-rgb: 46, 134, 222;
  --ds-btn-active-color: #fff;
  --ds-btn-active-bg: #2e86de;
  --ds-btn-active-border-color: #2e86de;
  --ds-btn-disabled-color: #2e86de;
  --ds-btn-disabled-border-color: #2e86de;
}
.form-check-input:checked {
  background-color: var(--ds-primary);
  border-color: var(--ds-primary);
}
.form-check-input:focus {
  border-color: var(--ds-primary-light, #74b9ff);
  box-shadow: 0 0 0 0.25rem var(--ds-focus-ring-color);
}
.form-range::-webkit-slider-thumb { background-color: var(--ds-primary); }
.form-range::-moz-range-thumb { background-color: var(--ds-primary); }
.list-group-item.active {
  background-color: var(--ds-primary);
  border-color: var(--ds-primary);
}
.page-link:hover,
.page-item.active .page-link {
  background-color: var(--ds-primary);
  border-color: var(--ds-primary);
}
.nav-pills .nav-link.active {
  background-color: var(--ds-primary);
}
.progress-bar {
  background-color: var(--ds-primary);
}
.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--ds-primary);
}

/* ブランドマーク（ロゴ代替の四角アイコン） */
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ds-primary, #2e86de);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  flex-shrink: 0;
}
img.brand-mark,
img.auth-brand-mark,
.brand-mark-img {
  object-fit: contain;
  background: transparent !important;
  color: transparent;
  padding: 0;
}

/* 管理画面のブランド背景は文字マーク用。画像アイコンには乗せない */
.chrome-admin img.brand-mark,
.chrome-admin img.auth-brand-mark,
.chrome-admin .brand-mark-img {
  background: transparent !important;
}

/* トップバーのユーザーアバター */
.avatar-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ds-primary-bg-subtle, #e8f2fc);
  color: var(--ds-primary-text-emphasis, #1f6fc4);
  font-weight: 700;
}

/* 会員IDの大きな表示 */
.big-id {
  font-family: var(--bs-font-monospace, monospace);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 2px;
}

/* ヘルプ（チャット） */
.chat {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-height: 460px;
  overflow-y: auto;
  padding: .5rem;
}

/* ヘルプページ: ビューポート高さいっぱい */
.help-page {
  --help-chrome: 9.25rem; /* topbar + container上下padding + footer */
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--help-chrome));
  min-height: 28rem;
  margin-bottom: 0;
}
.help-page-head { flex: 0 0 auto; }
.help-layout {
  flex: 1 1 auto;
  min-height: 0;
}
.help-layout-client {
  display: flex;
  flex-direction: column;
  max-width: 56rem;
}
.help-layout-staff {
  /* bootstrap .row を縦方向にも伸ばす */
  align-content: stretch;
}
.help-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
@media (min-width: 992px) {
  .help-layout-staff {
    flex: 1 1 auto;
    min-height: 0;
  }
  .help-pane {
    height: 100%;
  }
}
.help-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.help-card-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.help-threads-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.help-thread-meta {
  flex: 0 0 auto;
}
.help-page .chat {
  flex: 1 1 auto;
  max-height: none;
  min-height: 10rem;
}
.help-page .chat-form {
  flex: 0 0 auto;
  margin-top: .75rem;
}
.help-page .chat-form textarea {
  min-height: 5.5rem;
  max-height: 30vh;
  resize: vertical;
}
body:has(.help-page) .custom-container {
  padding-top: 1rem !important;
  padding-bottom: .5rem !important;
}
body:has(.help-page) .custom-container > footer {
  padding-top: .75rem !important;
  padding-bottom: .75rem !important;
}
@media (max-width: 991.98px) {
  .help-page {
    height: auto;
    min-height: 0;
  }
  .help-pane {
    height: auto;
  }
  .help-card {
    min-height: 22rem;
  }
  .help-page .chat {
    min-height: 14rem;
    max-height: 50vh;
  }
}
.chat .msg {
  display: flex;
  flex-direction: column;
  max-width: 72%;
}
.chat .msg .bubble {
  padding: .55rem .85rem;
  border-radius: .9rem;
  font-size: .88rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat .msg .bubble a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .12em;
  word-break: break-all;
}
.chat .msg .bubble a:hover {
  opacity: .85;
}
.chat .msg .meta { font-size: .68rem; opacity: .6; margin-top: .2rem; padding: 0 .25rem; }
.chat .msg .help-msg-subject {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  max-width: min(100%, 36rem);
  margin: 0 0 .35rem;
  padding: 0 .15rem;
}
.chat .msg .help-msg-subject-text {
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--bs-body-color);
  word-break: break-word;
}
.chat .msg .help-msg-detail-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: .05rem;
  padding: 0;
  border: 0;
  border-radius: .35rem;
  background: transparent;
  color: var(--bs-secondary-color, #64748b);
  line-height: 1;
  cursor: pointer;
}
.chat .msg .help-msg-detail-btn:hover,
.chat .msg .help-msg-detail-btn:focus-visible {
  color: var(--bs-primary, #635bff);
  background: rgba(128, 128, 128, .12);
}
.chat .msg .help-msg-detail-btn .ti { font-size: 1.05rem; }
.help-msg-detail-dl dt { font-weight: 600; color: var(--bs-secondary-color, #64748b); }
.help-msg-detail-dl dd { margin-bottom: .85rem; }
.help-msg-detail-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: .88rem;
  line-height: 1.45;
  padding: .75rem .9rem;
  border-radius: .5rem;
  background: rgba(128, 128, 128, .12);
  max-height: 50vh;
  overflow: auto;
}
.chat .from-user {
  align-self: flex-end;
  align-items: flex-end;
}
.chat .from-user .bubble {
  background: var(--bs-primary, #635bff);
  color: #fff;
  border-bottom-right-radius: .2rem;
}
.chat .from-admin {
  align-self: flex-start;
  align-items: flex-start;
}
/* テーマ非依存で常に本文色とコントラストが取れる中間グレーの半透明バブル */
.chat .from-admin .bubble {
  background: rgba(128, 128, 128, .22);
  color: var(--bs-body-color);
  border-bottom-left-radius: .2rem;
}
/* 管理画面: 自分(admin)を右・相手を左（ポータル会員画面とは左右反転） */
.chat.chat-staff .from-admin {
  align-self: flex-end;
  align-items: flex-end;
}
.chat.chat-staff .from-admin .bubble {
  background: var(--bs-primary, #635bff);
  color: #fff;
  border-bottom-right-radius: .2rem;
  border-bottom-left-radius: .9rem;
}
.chat.chat-staff .from-user {
  align-self: flex-start;
  align-items: flex-start;
}
.chat.chat-staff .from-user .bubble {
  background: rgba(128, 128, 128, .22);
  color: var(--bs-body-color);
  border-bottom-left-radius: .2rem;
  border-bottom-right-radius: .9rem;
}
.chat-form { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.chat-form textarea { min-height: 120px; resize: vertical; }
.chat-form .chat-send { align-self: flex-end; }

/* ヘルプのスレッド一覧: 選択中(active)は背景が濃色になるため文字を白で可読に */
.list-group-item.active,
.list-group-item.active .text-secondary,
.list-group-item.active .text-muted,
.list-group-item.active .small,
.list-group-item.active .font-monospace { color: #fff !important; }
.list-group-item.active .badge.text-bg-secondary {
  background-color: rgba(255, 255, 255, .28) !important;
  color: #fff !important;
}
/* メール由来の問い合わせを示すアイコン */
.mail-origin { color: var(--bs-primary, #635bff); font-size: 1.15rem; vertical-align: -2px; }
.list-group-item.active .mail-origin { color: #fff !important; }

/* 認証画面のロゴマーク中央寄せ */
.auth-brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--ds-primary, #2e86de); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.4rem;
}
img.auth-brand-mark {
  display: inline-block;
  vertical-align: middle;
}

/* ===== 特権管理者パネル（AdminCore）専用の識別デザイン =====
 * 提供元パネルと取り違えないよう、サイドバーを濃いスレート＋紫のアクセントにする。
 * Dasher テーマ（html.expanded #miniSidebar …）を確実に上書きするため !important を使用。
 * アクセント: #a78bfa(明) / #8b5cf6(基) / #7c3aed(暗) */
.chrome-admin #miniSidebar,
.chrome-admin #miniSidebar .brand-logo,
.chrome-admin #miniSidebar .navbar-nav {
  background-color: #14121c !important;
  border-right-color: #2e2a3a !important;
}
.chrome-admin #miniSidebar .site-logo-text { color: #f8fafc !important; }
.chrome-admin #miniSidebar .site-logo-text small { color: #a78bfa !important; }
.chrome-admin #miniSidebar .nav-link { color: #b4aec4 !important; }
.chrome-admin #miniSidebar .nav-link:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, .07) !important;
}
.chrome-admin #miniSidebar .nav-link.active {
  color: #ffffff !important;
  background-color: rgba(139, 92, 246, .20) !important;
  box-shadow: inset 3px 0 0 #a78bfa;
}
.chrome-admin #miniSidebar .nav-link.active .ti { color: #a78bfa !important; }

/* ブランドマーク／アバターを紫に（文字マーク・アバターのみ。img は除外） */
.chrome-admin .brand-mark:not(img),
.chrome-admin .avatar-initial {
  background: #8b5cf6 !important;
  color: #ffffff !important;
}

/* トップバー上端に紫のアクセントストライプ */
.chrome-admin .navbar-glass {
  border-top: 3px solid #8b5cf6;
}

/* コンテンツ領域にごく薄い紫のティントを敷いて全体の雰囲気を変える */
.chrome-admin #content {
  background-color: rgba(139, 92, 246, .04);
}

/* モバイル用オフキャンバスのヘッダにもアクセント */
.chrome-admin #mobileNav .offcanvas-header { border-bottom: 3px solid #8b5cf6; }

/* 特権管理のプライマリ系 UI も紫に寄せる */
.chrome-admin .btn-primary {
  --bs-btn-bg: #8b5cf6; --bs-btn-border-color: #8b5cf6;
  --bs-btn-hover-bg: #7c3aed; --bs-btn-hover-border-color: #7c3aed;
  --bs-btn-active-bg: #6d28d9; --bs-btn-active-border-color: #6d28d9;
  --bs-btn-disabled-bg: #8b5cf6; --bs-btn-disabled-border-color: #8b5cf6;
}
.chrome-admin a:not(.btn) { color: #7c3aed; }
.chrome-admin a:not(.btn):hover { color: #6d28d9; }

/* ===== 管理者ログイン（AdminCore）ヒーロー：グラデーション + グラスカード ===== */
body.auth-admin { background: #100a1a; }
.auth-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 15% 10%, #8b5cf6 0%, rgba(139,92,246,0) 55%),
              radial-gradient(1000px 700px at 90% 90%, #a78bfa 0%, rgba(167,139,250,0) 50%),
              linear-gradient(135deg, #1a0b2e 0%, #3b0764 45%, #7c3aed 100%);
}
/* 背景の光彩ブロブ */
.auth-blob {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; z-index: 0;
  pointer-events: none;
}
.auth-blob-1 { width: 420px; height: 420px; top: -120px; left: -100px; background: #a78bfa; }
.auth-blob-2 { width: 460px; height: 460px; bottom: -160px; right: -120px; background: #7c3aed; }

.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  padding: 2.25rem 2rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  color: #f3e8ff;
}
.auth-card .auth-brand-mark {
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .25);
}
.auth-card .auth-title { font-size: 1.5rem; font-weight: 800; color: #fff; }
.auth-card .auth-title small { font-weight: 500; color: #ddd6fe; font-size: .95rem; }
.auth-card .auth-sub { color: rgba(243, 232, 255, .72); font-size: .9rem; }
.auth-card .form-label { color: rgba(243, 232, 255, .85); font-size: .82rem; font-weight: 600; }

/* アイコン付き入力欄 */
.auth-input { position: relative; }
.auth-input > .ti:first-child {
  position: absolute; top: 50%; left: .9rem; transform: translateY(-50%);
  color: rgba(243, 232, 255, .6); font-size: 1.05rem; pointer-events: none;
}
.auth-input .form-control {
  height: 48px;
  padding-left: 2.5rem;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  border-radius: .7rem;
}
.auth-input .form-control::placeholder { color: rgba(243, 232, 255, .5); }
.auth-input .form-control:focus {
  background: rgba(255, 255, 255, .16);
  border-color: #a78bfa;
  box-shadow: 0 0 0 .2rem rgba(139, 92, 246, .30);
  color: #fff;
}
.auth-input .auth-input-toggle {
  position: absolute; top: 50%; right: .5rem; transform: translateY(-50%);
  padding: .35rem .5rem; cursor: pointer; color: rgba(243, 232, 255, .6);
}

/* ログインボタン（白ベース + 紫文字） */
.btn-auth {
  background: #fff; color: #2e1065; font-weight: 700; border: none;
  border-radius: .7rem; height: 48px;
  transition: transform .05s ease, box-shadow .15s ease, background .15s ease;
}
.btn-auth:hover { background: #f5f3ff; color: #7c3aed; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.btn-auth:active { transform: translateY(1px); }

/* bare ページ右上の言語スイッチャーを明色に */
body.auth-admin .btn-ghost { color: rgba(255, 255, 255, .85) !important; }
body.auth-admin .btn-ghost:hover { color: #fff !important; background: rgba(255, 255, 255, .12) !important; }

/* ===== ライトモードのモダン配色調整 =====
 * 既定テーマの info（鮮やかな水色 #cafdf5 / #61f3f3）は彩度が高く目が疲れるため、
 * 落ち着いたスレート系に置き換える。 */
:root:not([data-bs-theme="dark"]) {
  --ds-info-bg-subtle: #eef2f7;      /* slate-100 相当 */
  --ds-info-border-subtle: #dbe3ec;  /* slate-200 相当 */
  --bs-info-bg-subtle: #eef2f7;
  --bs-info-border-subtle: #dbe3ec;
}
/* info アラート（DNS案内ボックス等）を穏やかなスレートに */
:root:not([data-bs-theme="dark"]) .alert-info {
  --bs-alert-color: #334155;
  --bs-alert-bg: #f3f6fa;
  --bs-alert-border-color: #e2e8f0;
  --bs-alert-link-color: #1e293b;
}
:root:not([data-bs-theme="dark"]) .alert-info .text-secondary { color: #64748b !important; }
:root:not([data-bs-theme="dark"]) .alert-info code { color: #0f172a; }

/* info ボックス内の DNS テーブルは背景を白基調にして視認性を上げる */
:root:not([data-bs-theme="dark"]) .alert-info .mail-dns-table {
  --bs-table-bg: transparent;
  --bs-table-color: #334155;
}
:root:not([data-bs-theme="dark"]) .alert-info .mail-dns-table thead th {
  border-bottom-color: #dbe3ec;
  color: #64748b;
}

/* カードやテーブルヘッダのコントラストを少しやわらげてモダンに */
:root:not([data-bs-theme="dark"]) .table-light {
  --bs-table-bg: #f7f9fc;
  --bs-table-color: #334155;
}

/* Abuse 詳細: セクションを枠線で明確化（Bootstrap utility 併用。暗色でもコントラスト確保） */
.abuse-detail-section {
  border-width: 1px !important;
  border-style: solid !important;
  border-color: rgba(128, 128, 128, .45) !important;
  overflow: hidden;
}
.abuse-detail-section-title {
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}
.abuse-detail-section-body {
  /* padding は Bootstrap の p-3 に委譲 */
}

/* ========== Abuse 公開フォーム ========== */
body.abuse-public {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 118, 110, .12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(30, 64, 175, .10), transparent 50%),
    linear-gradient(180deg, #f4f6f8 0%, #e8edf2 100%);
  color: #1a2332;
}
.abuse-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 1rem 3rem;
}
.abuse-card {
  width: 100%;
  max-width: 720px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(26, 35, 50, .08);
  border-radius: 1.25rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
  padding: 2rem 1.75rem 1.5rem;
  backdrop-filter: blur(8px);
}
.abuse-langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .35rem .75rem;
  margin: 0 0 1.25rem;
  font-size: .82rem;
}
.abuse-langs a {
  color: #64748b;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.abuse-langs a:hover { color: #0f172a; }
.abuse-langs a.is-active {
  color: #0f766e;
  font-weight: 600;
  border-bottom-color: rgba(15, 118, 110, .45);
}
.abuse-head { margin-bottom: 1.5rem; }
.abuse-brand {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .8rem;
  letter-spacing: .04em;
  color: #0f766e;
  margin: 0 0 .35rem;
  font-weight: 600;
}
.abuse-title {
  font-family: "Source Serif 4", "Noto Serif JP", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 650;
  line-height: 1.25;
  margin: 0 0 .5rem;
  color: #0f172a;
}
.abuse-lead {
  margin: 0;
  color: #64748b;
  font-size: .95rem;
  line-height: 1.55;
}
.abuse-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: .75rem;
  padding: .75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: .9rem;
}
.abuse-form fieldset {
  border: 0;
  margin: 0 0 1.5rem;
  padding: 0;
}
.abuse-form legend {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: .85rem;
  padding: 0;
  float: none;
  width: auto;
}
.abuse-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem 1rem;
}
.abuse-field { display: flex; flex-direction: column; gap: .35rem; margin: 0; }
.abuse-field-full { grid-column: 1 / -1; }
.abuse-field > span {
  font-size: .85rem;
  font-weight: 600;
  color: #334155;
}
.abuse-field em { color: #b45309; font-style: normal; }
.abuse-field input,
.abuse-field textarea {
  border: 1px solid #cbd5e1;
  border-radius: .65rem;
  padding: .65rem .8rem;
  font-size: .95rem;
  background: #fff;
  color: #0f172a;
  transition: border-color .15s, box-shadow .15s;
}
.abuse-field input:focus,
.abuse-field textarea:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .15);
}
.abuse-consent-help {
  font-size: .88rem;
  color: #64748b;
  margin: 0 0 .75rem;
}
.abuse-radios { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.abuse-radio {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
}
.abuse-actions { margin-top: .5rem; }
.abuse-altcha {
  margin: .75rem 0 .5rem;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}
.abuse-altcha altcha-widget {
  display: block;
  max-width: 100%;
}
.altcha-field {
  width: 100%;
  max-width: 100%;
  --altcha-max-width: 100%;
}
.altcha-field altcha-widget {
  display: block;
  width: 100%;
  max-width: 100%;
}
.altcha-field-help {
  margin-top: .5rem;
}
.abuse-altcha-help {
  margin: .35rem 0 0;
  font-size: .75rem;
  line-height: 1.35;
  color: #64748b;
}
.abuse-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .65rem 1.4rem;
  border: 0;
  border-radius: .7rem;
  background: #0f766e;
  color: #fff !important;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.abuse-submit:hover { background: #0d9488; color: #fff; }
.abuse-submit:active { transform: translateY(1px); }
.abuse-foot {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  font-size: .85rem;
  color: #64748b;
}
.abuse-foot a { color: #0f766e; font-family: "IBM Plex Mono", ui-monospace, monospace; }
.abuse-result { text-align: center; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.abuse-result .abuse-submit { margin-top: 1.25rem; }
@media (max-width: 640px) {
  .abuse-grid { grid-template-columns: 1fr; }
  .abuse-card { padding: 1.5rem 1.15rem; }
}

/* Abuse ドメイン一覧のドメイン名 */
.abuse-domain-name {
  font-family: "Source Serif 4", "Noto Serif JP", Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .01em;
  text-decoration: none;
}
.abuse-domain-name:hover {
  text-decoration: underline;
}

/* Abuse ステータスフィルタ: 色付きボタン上の件数バッジ */
.abuse-status-filters .btn .badge {
  font-weight: 600;
}

/* 顧客詳細プロフィール */
.customer-profile-dl dt { font-weight: 500; margin-bottom: .35rem; }
.customer-profile-dl dd { margin-bottom: .65rem; }

/* 顧客詳細・請求サマリー */
.billing-summary-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--bs-secondary-color, #64748b);
  margin-bottom: .45rem;
}
.billing-summary-date {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.billing-summary-date-icon {
  font-size: 1rem;
  opacity: .7;
  color: var(--bs-secondary-color, #64748b);
}
.billing-summary-amount {
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.015em;
  line-height: 1.25;
}
.billing-summary-amount-sm {
  font-size: 1.05rem;
}
.billing-summary-tax-tag {
  font-size: .72rem;
  font-weight: 500;
  color: var(--bs-secondary-color, #64748b);
  margin-left: .25rem;
}
.billing-summary-meta {
  margin-top: .2rem;
  font-size: .75rem;
  color: var(--bs-secondary-color, #64748b);
  line-height: 1.4;
}
.billing-summary-empty {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--bs-secondary-color, #64748b);
}
.billing-summary-amount-block {
  margin-top: .55rem;
  padding-top: .55rem;
  border-top: 1px dashed rgba(128, 128, 128, .35);
}
.billing-summary-amount-block-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--bs-secondary-color, #64748b);
  margin-bottom: .2rem;
}
[data-bs-theme="dark"] .billing-summary-amount-block {
  border-top-color: rgba(255, 255, 255, .14);
}

/* 稼働サーバ・逆引きホスト */
.active-ptr-host {
  font-size: 11px;
  line-height: 1.35;
  color: var(--bs-secondary-color, #64748b);
}
.active-product-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.active-provider-company,
.active-provider-host {
  font-size: 12px;
  line-height: 1.35;
  color: var(--bs-secondary-color, #64748b);
}
.active-provider-company {
  margin-top: .15rem;
}

/* ヘルプ対応・スタッフ一言メモ */
.help-staff-memo .help-staff-memo-input {
  resize: vertical;
  min-height: 2.6rem;
  background-color: #f1f5f9;
  border-color: #e2e8f0;
}
.help-staff-memo .help-staff-memo-input:focus {
  background-color: #eef2f7;
  border-color: var(--bs-primary, #635bff);
  box-shadow: 0 0 0 .2rem rgba(99, 91, 255, .15);
}
[data-bs-theme="dark"] .help-staff-memo .help-staff-memo-input {
  background-color: #0a0d12;
  border-color: #1a222d;
  color: var(--bs-body-color);
}
[data-bs-theme="dark"] .help-staff-memo .help-staff-memo-input:focus {
  background-color: #07090d;
  border-color: var(--bs-primary, #635bff);
  box-shadow: 0 0 0 .2rem rgba(99, 91, 255, .2);
}

/* サイドバー: 本文高さへの追従を止め、余白スクロールを防ぐ */
html.expanded #miniSidebar,
html.collapsed #miniSidebar {
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}
html.expanded #miniSidebar .navbar-nav,
html.collapsed #miniSidebar .navbar-nav {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding-bottom: 0.75rem !important;
}
#miniSidebar .simplebar-content-wrapper {
  overflow-x: hidden !important;
}
/* メニューが収まるときはスクロールバーを出さない（はみ出すときだけ） */
#miniSidebar .simplebar-track.simplebar-vertical {
  visibility: hidden;
}
#miniSidebar.simplebar-scrollable-y .simplebar-track.simplebar-vertical {
  visibility: visible;
}

/* ===== 稼働サーバ ステータス詳細（モダン表示） ===== */
.status-pretty { font-size: .95rem; color: var(--bs-body-color); }
.status-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.1rem;
  border-radius: 12px;
  border: 1px solid transparent;
}
.status-hero.is-ok {
  background: rgba(0, 167, 111, .08);
  border-color: rgba(0, 167, 111, .22);
}
.status-hero.is-ng {
  background: rgba(220, 53, 69, .08);
  border-color: rgba(220, 53, 69, .22);
}
.status-hero-badge {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .04em;
}
.status-hero.is-ok .status-hero-badge { color: #007867; }
.status-hero.is-ng .status-hero-badge { color: #b02a37; }
.status-hero-meta {
  text-align: end;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--bs-secondary-color);
}
.status-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
}
.status-summary-item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .7rem .85rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, .04);
  border: 1px solid rgba(15, 23, 42, .08);
  color: var(--bs-body-color);
}
.status-summary-item strong {
  color: var(--bs-body-color);
  font-weight: 700;
}
.status-section { margin-top: 1.1rem; }

/* ディスク使用量バー */
.status-disk-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .45rem;
}
.status-disk-pct {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
}
.status-disk-cap {
  font-size: .85rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--bs-secondary-color, #64748b);
}
.status-disk-bar {
  height: .7rem;
  border-radius: 999px;
  background: rgba(128, 128, 128, .18);
  overflow: hidden;
}
.status-disk-bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width .25s ease;
}
.status-disk-ok .status-disk-pct { color: #007867; }
.status-disk-ok .status-disk-bar-fill { background: linear-gradient(90deg, #0d9488, #14b8a6); }
.status-disk-warn .status-disk-pct { color: #b45309; }
.status-disk-warn .status-disk-bar-fill { background: linear-gradient(90deg, #d97706, #f59e0b); }
.status-disk-danger .status-disk-pct { color: #b02a37; }
.status-disk-danger .status-disk-bar-fill { background: linear-gradient(90deg, #dc2626, #ef4444); }
.status-disk-sub {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  margin-top: .4rem;
  font-size: .78rem;
  color: var(--bs-secondary-color, #64748b);
}
[data-bs-theme="dark"] .status-disk-ok .status-disk-pct { color: #5ddea8; }
[data-bs-theme="dark"] .status-disk-warn .status-disk-pct { color: #fbbf24; }
[data-bs-theme="dark"] .status-disk-danger .status-disk-pct { color: #f18a96; }
[data-bs-theme="dark"] .status-disk-bar { background: rgba(255, 255, 255, .08); }

/* 一覧テーブル用コンパクトディスクバー */
.status-disk-list {
  min-width: 7rem;
  max-width: 11rem;
  flex: 1 1 auto;
}
.status-disk-list .status-disk-pct { font-size: 1rem; }
.status-disk-list .status-disk-bar { height: .45rem; }
.status-disk-list .status-disk-meta { margin-bottom: .3rem; }
.status-disk-list .status-disk-cap-below {
  margin-top: .28rem;
  font-size: 10px;
  white-space: nowrap;
  line-height: 1.3;
}
.active-status-cell {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 8.5rem;
}
.active-status-cell > .btn {
  flex-shrink: 0;
}

.status-section-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--bs-secondary-color);
  margin-bottom: .55rem;
}
.status-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .55rem;
}
.status-service {
  border-radius: 10px;
  padding: .65rem .75rem;
  border: 1px solid rgba(15, 23, 42, .08);
  background: rgba(15, 23, 42, .03);
  color: var(--bs-body-color);
}
.status-service-ok {
  background: rgba(0, 167, 111, .1);
  border-color: rgba(0, 167, 111, .35);
}
.status-service-ng {
  background: rgba(220, 53, 69, .1);
  border-color: rgba(220, 53, 69, .35);
}
.status-service-name {
  font-size: .75rem;
  color: var(--bs-secondary-color);
  text-transform: capitalize;
  margin-bottom: .15rem;
}
.status-service-val {
  font-weight: 700;
  font-family: var(--bs-font-monospace, ui-monospace, monospace);
  font-size: .9rem;
  text-transform: lowercase;
}
.status-service-ok .status-service-val { color: #007867; }
.status-service-ng .status-service-val { color: #b02a37; }
.status-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.status-chip {
  display: inline-block;
  padding: .28rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-family: var(--bs-font-monospace, ui-monospace, monospace);
  color: var(--bs-body-color);
  background: rgba(15, 23, 42, .06);
  border: 1px solid rgba(15, 23, 42, .1);
}
.status-kv {
  display: grid;
  gap: .35rem;
}
.status-kv-row {
  display: grid;
  grid-template-columns: minmax(120px, 36%) 1fr;
  gap: .75rem;
  align-items: center;
  padding: .45rem .65rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, .04);
  border: 1px solid rgba(15, 23, 42, .06);
  color: var(--bs-body-color);
}
.status-kv-key {
  font-size: .82rem;
  color: var(--bs-secondary-color);
  text-transform: capitalize;
}
.status-kv-val {
  font-weight: 600;
  font-size: .9rem;
  color: var(--bs-body-color);
}
.status-bool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: .85rem;
}
.status-bool-ok { background: rgba(0,167,111,.18); color: #007867; }
.status-bool-ng { background: rgba(220,53,69,.18); color: #b02a37; }
.status-bool-neutral {
  width: auto;
  padding: 0 .4rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, .08);
  color: var(--bs-body-color);
}
.status-raw-fallback {
  background: rgba(15, 23, 42, .04);
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 10px;
  padding: .85rem 1rem;
  font-size: .82rem;
  color: var(--bs-body-color);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 40vh;
  overflow: auto;
}
.product-active-card .card-body { padding: 1.25rem 1.35rem; }

/* ダークモード: 白カード＋薄い文字のコントラスト崩れを防ぐ */
[data-bs-theme="dark"] .status-hero.is-ok {
  background: rgba(0, 167, 111, .16);
  border-color: rgba(0, 167, 111, .4);
}
[data-bs-theme="dark"] .status-hero.is-ng {
  background: rgba(220, 53, 69, .16);
  border-color: rgba(220, 53, 69, .4);
}
[data-bs-theme="dark"] .status-hero.is-ok .status-hero-badge { color: #5ddea8; }
[data-bs-theme="dark"] .status-hero.is-ng .status-hero-badge { color: #f18a96; }
[data-bs-theme="dark"] .status-summary-item,
[data-bs-theme="dark"] .status-kv-row,
[data-bs-theme="dark"] .status-chip,
[data-bs-theme="dark"] .status-raw-fallback,
[data-bs-theme="dark"] .status-service:not(.status-service-ok):not(.status-service-ng),
[data-bs-theme="dark"] .status-bool-neutral {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
  color: #e8edf5;
}
[data-bs-theme="dark"] .status-summary-item strong,
[data-bs-theme="dark"] .status-kv-val {
  color: #f8fafc;
}
[data-bs-theme="dark"] .status-kv-key,
[data-bs-theme="dark"] .status-service-name,
[data-bs-theme="dark"] .status-section-title,
[data-bs-theme="dark"] .status-hero-meta,
[data-bs-theme="dark"] .status-summary-item .text-secondary {
  color: #9aa6b8 !important;
}
[data-bs-theme="dark"] .status-service-ok {
  background: rgba(0, 167, 111, .18);
  border-color: rgba(0, 167, 111, .45);
}
[data-bs-theme="dark"] .status-service-ng {
  background: rgba(220, 53, 69, .18);
  border-color: rgba(220, 53, 69, .45);
}
[data-bs-theme="dark"] .status-service-ok .status-service-val { color: #5ddea8; }
[data-bs-theme="dark"] .status-service-ng .status-service-val { color: #f18a96; }
[data-bs-theme="dark"] .status-bool-ok { background: rgba(0,167,111,.28); color: #5ddea8; }
[data-bs-theme="dark"] .status-bool-ng { background: rgba(220,53,69,.28); color: #f18a96; }

@media (max-width: 576px) {
  .status-kv-row { grid-template-columns: 1fr; gap: .2rem; }
  .status-hero { flex-direction: column; align-items: flex-start; }
  .status-hero-meta { text-align: start; }
}

/* 申し込み確認: 見積書風モーダル */
.quote-doc {
  border: 1px solid var(--bs-border-color);
  border-radius: .75rem;
  padding: 1.35rem 1.5rem 1.15rem;
  background: var(--bs-body-bg);
}
.quote-doc .quote-title {
  font-family: "Source Serif 4", "Noto Serif JP", serif;
  font-weight: 650;
  letter-spacing: .28em;
  font-size: 1.55rem;
}
.quote-doc .quote-table {
  --bs-table-bg: transparent;
}
.quote-doc .quote-table tfoot tr:last-child td {
  border-bottom: 0;
}
[data-bs-theme="dark"] .quote-doc {
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .12);
}

/* 見積モーダル: 無料期間注釈 */
.application-trial-notice {
  width: 100%;
  padding: .9rem 1rem;
  border-radius: .65rem;
  border: 1px solid rgba(13, 110, 253, .35);
  background: rgba(13, 110, 253, .12);
  color: var(--bs-body-color);
  text-align: start;
}
.application-trial-notice-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .35rem;
  color: #3d8bfd;
}
.application-trial-notice-body {
  font-size: .925rem;
  line-height: 1.55;
}
[data-bs-theme="light"] .application-trial-notice {
  border-color: rgba(13, 110, 253, .28);
  background: rgba(13, 110, 253, .08);
}
[data-bs-theme="light"] .application-trial-notice-title {
  color: #0d6efd;
}

/* 申し込みステータスバッジ */
.badge.app-status {
  font-weight: 600;
  padding: .35em .7em;
  letter-spacing: .02em;
  border: 0;
}
.badge.app-status-pending { background-color: #3d8bfd !important; color: #fff !important; }          /* 申し込み中 */
button.badge.app-status-action {
  cursor: pointer;
  line-height: inherit;
}
button.badge.app-status-action:hover,
button.badge.app-status-action:focus-visible {
  filter: brightness(0.92);
  outline: 2px solid rgba(61, 139, 253, 0.45);
  outline-offset: 2px;
}
.badge.app-status-approved { background-color: #7c69ef !important; color: #fff !important; }         /* 承認済み */
.badge.app-status-active { background-color: #12b886 !important; color: #fff !important; }           /* 稼働中 */
.badge.app-status-active_trial { background-color: #0ca678 !important; color: #fff !important; }     /* 稼働中(無料期間) */
.badge.app-status-cancelled { background-color: #868e96 !important; color: #fff !important; }        /* キャンセル */
.badge.app-status-cancel_requested { background-color: #f59f00 !important; color: #1a1a1a !important; } /* 解約申請中 */
.badge.app-status-terminated { background-color: #495057 !important; color: #f1f3f5 !important; }    /* 解約済み */
.badge.app-status-rejected { background-color: #fa5252 !important; color: #fff !important; }         /* 却下 */

