/* つばめガス 統合ポータル — Liquid Glass スタイル（自前同梱・CDN不使用）。
   社内デザイン標準 v2.0（Liquid Glass）の要点を、外部 glass.css に依存せず移植。
   - ガラス3段階（thin / regular / thick）、セマンティック青、大きめ角丸
   - 必須ルール：本文コントラスト、操作要素44px、focus可視、reduced-motion 尊重
   フォントは system-ui を使用。標準の Zen Kaku Gothic New / Noto Sans JP を使う場合は
   自前同梱して --body / --display を差し替える（CDN直リンクは Fortigate FQDN 制限のため避ける）。 */

:root {
  --blue: #1F6BFF;
  --blue-ink: #1551c9;
  --ink: #0B1424;
  --ink-2: #2c3a52;
  --muted: #54617A;

  --glass-fill: rgba(255, 255, 255, 0.34);
  --glass-thick-fill: rgba(255, 255, 255, 0.64);
  --glass-thin-fill: rgba(255, 255, 255, 0.20);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-border-soft: rgba(140, 151, 173, 0.28);

  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow: 0 8px 30px rgba(17, 28, 54, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans JP", sans-serif;
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* 背景シーン：淡いグラデ＋ぼかしたカラーブロブ（ガラスの透過が映える土台） */
.bg-scene {
  background:
    radial-gradient(1200px 600px at 12% -5%, rgba(63, 99, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(123, 107, 255, 0.16), transparent 55%),
    radial-gradient(800px 600px at 80% 100%, rgba(22, 179, 179, 0.14), transparent 55%),
    linear-gradient(180deg, #eef1f8, #e7ecf6);
  background-attachment: fixed;
}

/* ガラス素材3段階 */
.glass, .glass-thin, .glass-thick {
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.glass {
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
}
.glass-thin {
  background: var(--glass-thin-fill);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
}
.glass-thick {
  background: var(--glass-thick-fill);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  backdrop-filter: blur(26px) saturate(150%);
}

.shell { max-width: 1040px; margin: 0 auto; padding: 22px 24px 64px; }

/* トップバー */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 12px 12px 20px;
  border-radius: var(--r-pill);
  margin-bottom: 30px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; position: relative; flex: 0 0 auto;
  background: linear-gradient(150deg, var(--blue), #7b6bff);
  box-shadow: 0 4px 12px rgba(63, 99, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 9px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
}
.userchip {
  margin-left: auto; display: flex; align-items: center; gap: 14px;
  padding: 7px 8px 7px 16px; border-radius: var(--r-pill);
}
.u-text { line-height: 1.25; text-align: right; }
.u-name { font-weight: 700; font-size: 14px; }
.u-meta { font-size: 12px; color: var(--muted); }

/* ボタン（操作要素は最小44px・R4） */
.btn {
  font: inherit; font-weight: 700; font-size: 14px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: var(--r-pill);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #4f7bff); color: #fff;
  box-shadow: 0 6px 16px rgba(63, 99, 255, 0.4);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.5); color: var(--ink);
  border: 1px solid var(--glass-border-soft);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.75); }

/* ヒーロー（本文は背景の上＝ガラス越しにしない・R7） */
.hero { margin: 8px 4px 20px; }
.hero h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; margin: 0 0 6px; letter-spacing: .4px; }
.hero .sub { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .5px; }

/* タイル */
.tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-top: 16px;
}
.tile {
  padding: 22px 20px; border-radius: var(--r-lg);
  display: flex; align-items: center; gap: 14px; min-height: 84px;
  transition: transform .18s, box-shadow .18s;
}
.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(17, 28, 54, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.tile-ico {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff;
  background: linear-gradient(150deg, var(--blue), #7b6bff);
  box-shadow: 0 4px 12px rgba(63, 99, 255, 0.4);
}
.tile-label { font-weight: 700; font-size: 16px; }

/* セクション見出し（管理メニュー等） */
.section-label { margin: 28px 4px 0; color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .5px; }

/* 管理タイルは業務タイルとアイコン色で区別 */
.tile-admin .tile-ico {
  background: linear-gradient(150deg, #6b7689, #3a465c);
  box-shadow: 0 4px 12px rgba(44, 58, 82, 0.4);
}

/* 中央カード（login / denied / preparing / error） */
.center { max-width: 460px; margin: 6vh auto 0; }
.panel { padding: 30px 28px; border-radius: var(--r-lg); text-align: center; }
.panel h1 { font-size: 20px; margin: 0 0 10px; }
.panel p { margin: 0 0 18px; color: var(--ink-2); }

.empty { color: var(--muted); margin-top: 18px; }

@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .topbar { flex-wrap: wrap; }
  .userchip { margin-left: 0; width: 100%; justify-content: space-between; }
}

/* 動きに敏感な人へ配慮（R6） */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
}
