/* マイページ専用のスタイル。管理ポータル（admin.css）とは独立して変更してよい。 */
:root{
  --bg:#fafafa;
  --panel:#ffffff;
  --line:rgba(0,0,0,.12);
  --text:#333333;
  --muted:#767676;
  --primary:#2481ab;
  --primary-soft:#e6f1f5;
  --danger:#c0392b;
  --success:#2e7d4f;
  --warning:#b45309;
  --shadow:0 1px 2px rgba(0,0,0,.08);
  --radius:3px;
}
html{font-size:14px}
@media(min-width:768px){
  html{font-size:16px}
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:游ゴシック,"Yu Gothic",YuGothic,"Hiragino Kaku Gothic ProN","Hiragino Kaku Gothic Pro",メイリオ,Meiryo,"MS Gothic",sans-serif;
  background:var(--bg);
  color:var(--text);
}
button,input,select,textarea{font:inherit}
a{color:var(--primary)}
a:hover{color:#7ca4e4}
.app{
  min-height:100vh;
}

/* ヘッダー：上部固定バーにメニューを配置（供給地点情報.htm の配色仕様を踏襲した独自実装） */
.gheader{
  position:fixed;top:0;left:0;right:0;z-index:100;
  background:#3b3b3b;color:#fff;
  display:flex;align-items:center;
  height:60px;padding:0 20px;
}
.gheader .brand{font-size:16px;font-weight:700;padding-right:28px;white-space:nowrap;margin:0}
.gheader .brand small{display:block;color:#bbb;font-size:10px;font-weight:500;margin-top:2px}
.gheader-nav{display:flex;height:100%;flex:1}
.gheader-nav a{
  display:flex;align-items:center;gap:6px;color:#ddd;
  padding:0 16px;height:100%;font-size:13px;white-space:nowrap;text-decoration:none;
}
.gheader-nav a:hover{background:#4a4a4a;color:#fff}
.gheader-nav a.active{background:#ebebeb;color:#333;font-weight:700}
.gheader-user{font-size:12px;color:#ddd;white-space:nowrap;padding-left:16px;display:flex;align-items:center;gap:10px}

.breadcrumbs{
  position:fixed;top:60px;left:0;right:0;z-index:90;
  background:#ebebeb;color:#666;font-size:12px;
  padding:6px 20px;
}
.breadcrumbs a{color:#333}

.main{
  padding:100px 28px 36px;
  max-width:1280px;
  margin:0 auto;
}
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:18px;
}
h1{
  font-size:25px;
  margin:0 0 6px;
}
.subtitle{color:var(--muted);font-size:13px}
.admin-chip{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 12px;
  font-size:12px;
  box-shadow:var(--shadow);
  display:flex;
  align-items:center;
  gap:10px;
}
.toolbar{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:14px;
  margin-bottom:16px;
  box-shadow:var(--shadow);
}
.search-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.search-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:12px}
.input,.select{
  border:1px solid var(--line);
  border-radius:9px;
  padding:9px 11px;
  background:#fff;
  min-height:40px;
  font-size:14px;
}
.input{min-width:220px}
.btn{
  border:0;
  border-radius:9px;
  padding:10px 15px;
  cursor:pointer;
  font-weight:700;
}
/* キーボード操作時にフォーカス位置が分かるようにする */
.btn:focus,.btn:active:focus{
  box-shadow:0 0 0 .1rem #fff,0 0 0 .25rem #258cfb;
}
.btn-primary{background:var(--primary);color:#fff}
.btn-secondary{background:#eef2f7;color:#26364d}
.btn-danger{background:#fee2e2;color:#991b1b}
.btn-outline{background:#fff;border:1px solid var(--line);color:#334155}

/* 検索・追加・編集ボタン：供給地点情報.htm の配色仕様（グレー塗りつぶし・太字・角丸なし）を踏襲した独自実装 */
.submtbtn{
  border:0;border-radius:0;background:#3a3a3a;color:#fff;
  font-weight:700;font-size:14px;height:25px;line-height:25px;
  padding:0 24px;cursor:pointer;letter-spacing:.05em;
}
.submtbtn.c_glay{background:#acacac;color:#333;padding:0 20px}
.submtbtn:hover{opacity:.8}
.search_btn{
  border:0;border-radius:0;background:#cfcfcf;color:#333;
  font-weight:700;font-size:14px;height:25px;line-height:25px;
  padding:0 20px;cursor:pointer;
}
.search_btn:hover{opacity:.8}
.grid-2{
  display:grid;
  grid-template-columns:38% 1fr;
  gap:16px;
}
.panel{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.panel-header{
  padding:15px 17px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.panel-header h2{font-size:16px;margin:0}
.panel-body{padding:16px}
.tree{
  list-style:none;
  padding:0;
  margin:0;
  font-size:13px;
}
.tree ul{list-style:none;margin:4px 0 4px 18px;padding:0;border-left:1px dashed #cfd7e4}
.tree li{margin:4px 0}
.tree-item{
  display:flex;
  align-items:center;
  gap:7px;
  padding:8px 9px;
  border-radius:8px;
  cursor:pointer;
}
.tree-item:hover{background:#f4f7fb}
.tree-item.active{background:var(--primary-soft);color:#174ea6;font-weight:700}
.badge{
  display:inline-block;
  border-radius:999px;
  padding:3px 8px;
  font-size:11px;
  font-weight:700;
}
.badge-blue{background:#dbeafe;color:#1d4ed8}
.badge-green{background:#dcfce7;color:#166534}
.badge-gray{background:#eef2f7;color:#475569}
.badge-orange{background:#ffedd5;color:#9a3412}
.form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.field label{
  display:block;
  color:#475569;
  font-size:12px;
  margin-bottom:6px;
  font-weight:700;
}
.field input,.field select,.field textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:9px;
  padding:10px 11px;
  background:#fff;
}
.field textarea{min-height:88px;resize:vertical}
.field.full{grid-column:1/-1}
.helper{font-size:11px;color:var(--muted);margin-top:5px}
.section-title{
  font-size:13px;
  font-weight:800;
  margin:18px 0 10px;
  padding-bottom:8px;
  border-bottom:1px solid var(--line);
}
.table-wrap{overflow:auto}
table{
  width:100%;
  border-collapse:collapse;
  font-size:12.5px;
}
th,td{
  border-bottom:1px solid var(--line);
  text-align:left;
  padding:11px 10px;
  white-space:nowrap;
}
th{
  background:#f8fafc;
  color:#475569;
  position:sticky;
  top:0;
}
tr:hover td{background:#fbfdff}
.status-on{color:var(--success);font-weight:700}
.status-off{color:#94a3b8;font-weight:700}
.card-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}
.kpi{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px;
  box-shadow:var(--shadow);
}
.kpi .label{font-size:11px;color:var(--muted)}
.kpi .value{font-size:23px;font-weight:800;margin-top:4px}
/* 入力画面のセクション見出し（クリックで開閉するアコーディオン） */
.accordion{
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
}
.accordion-item + .accordion-item{border-top:1px solid var(--line)}
.accordion-header{
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  border:0;
  background:#f8fafc;
  color:#475569;
  padding:12px 14px;
  font-size:13px;
  font-weight:700;
  text-align:left;
  cursor:pointer;
}
.accordion-header:hover{background:#f1f5f9}
.accordion-header.open{color:var(--primary)}
.accordion-caret{transition:transform .25s ease}
.accordion-header.open .accordion-caret{transform:rotate(90deg)}

/* 0fr → 1fr の遷移で、内容の高さを問わず開閉をアニメーションさせる */
.accordion-panel{
  display:grid;
  grid-template-rows:0fr;
  transition:grid-template-rows .25s ease;
  background:var(--panel);
}
.accordion-panel.open{grid-template-rows:1fr}
.accordion-panel-inner{overflow:hidden;min-height:0}
.accordion-body{padding:16px 14px}

.actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:16px;
}
.note{
  background:#fff7ed;
  border:1px solid #fed7aa;
  color:#9a3412;
  border-radius:10px;
  padding:10px 12px;
  font-size:12px;
  margin-bottom:14px;
}
.modal{
  position:fixed;inset:0;
  background:rgba(15,23,42,.45);
  display:none;align-items:center;justify-content:center;
  padding:20px;
}
.modal.show{display:flex}
.modal-card{
  background:#fff;
  border-radius:14px;
  width:min(620px,100%);
  box-shadow:0 30px 70px rgba(15,23,42,.25);
}
.modal-card .panel-body{max-height:70vh;overflow:auto}
@media(max-width:980px){
  .grid-2{grid-template-columns:1fr}
  .card-grid{grid-template-columns:repeat(2,1fr)}
}

/* ---- 画面モック（user_permissions.html）からの追加分 ---- */

/* Alpine.js 読み込み前に x-show 対象がちらつくのを防ぐ */
[x-cloak]{display:none!important}

/* ボタンスタイルを a 要素にも適用するための調整 */
a.btn,a.submtbtn,a.search_btn{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
}
a.tree-item{color:inherit;text-decoration:none}

/* Bootstrap Icons：文字と並べたときのベースライン・間隔を揃える */
.bi{line-height:1;vertical-align:-.125em}
a.submtbtn .bi,button.submtbtn .bi,.btn .bi{margin-right:6px}

/* Tabulator：本画面の配色・字送りに合わせる（既定テーマの上書き） */
.tabulator{border:0;background:transparent;font-size:12.5px}
.tabulator .tabulator-header{background:#f8fafc;border-bottom:1px solid var(--line)}
.tabulator .tabulator-header .tabulator-col{background:#f8fafc;color:#475569}
.tabulator .tabulator-row{border-bottom:1px solid var(--line)}
.tabulator .tabulator-row.tabulator-row-even{background:#fff}
.tabulator .tabulator-row:hover{background:#fbfdff}

/* OS 側でアニメーションを抑制している場合は動きを止める */
@media(prefers-reduced-motion:reduce){
  .accordion-panel,.accordion-caret{transition:none}
}

/* 入力画面・確認ステップの読み取り専用サマリ。文字サイズは入力欄に合わせる */
.confirm-list{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:14px 18px;
  margin:0;
}
.confirm-list dt{color:#475569;font-size:13px;font-weight:700;line-height:1.6}
.confirm-list dd{margin:0;font-size:15px;line-height:1.6}

.link-button{
  border:0;
  background:transparent;
  color:var(--primary);
  font-weight:700;
  cursor:pointer;
  padding:0;
}

.alert-error,.alert-success{
  border-radius:10px;
  padding:10px 12px;
  font-size:13px;
  margin-bottom:14px;
}
.alert-error{background:#fee2e2;border:1px solid #fecaca;color:#991b1b}
.alert-success{background:#dcfce7;border:1px solid #bbf7d0;color:#166534}

/* ログイン画面 */
.auth-body{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:100vh;
  padding:20px;
}
.auth-card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:28px;
  width:min(420px,100%);
}
.auth-brand{
  font-size:18px;
  font-weight:700;
  color:#10233f;
  margin-bottom:22px;
}
.auth-brand small{
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-top:5px;
  font-weight:500;
}
.auth-title{font-size:22px;margin:0 0 6px}
.auth-card .field{margin-top:14px}
.auth-submit{width:100%;justify-content:center;background:#3a3a3a;color:#fff}
.checkbox-label{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:500;
  color:var(--text);
  font-size:13px;
}
.checkbox-label input{width:auto}
