/* ============================================================================
 * ファイル名 : assets/css/admin-staff.css
 * 役割 : 共通スタイル（Ace Group 2026版 - デザイン完全維持 ＋ 中央ロック ＋ 操作無効化）
 * ========================================================================== */

:root {
  --primary: #26c8c4;
  --photo-accent: #ff6b6b;
  --video-accent: #4c6ef5;
  --bg: #f4f7f7;
  --err: #e03131;
  --warn-bg: #fff9db;
  --warn-border: #fab005;
  --text: #333;
}

/* --- 1. Base & Layout --- */
* {
  box-sizing: border-box;
}
body {
  font-family: -apple-system, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background: var(--bg);
  margin: 0;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

/* 通知表示中にJavaScriptから付与され、スクロールを完全に禁止する */
body.msg-open {
  overflow: hidden !important;
  height: 100% !important;
}

body:not(.login-body) {
  padding-bottom: 60px;
}

.container {
  padding: 20px 15px;
  max-width: 500px;
  margin: 0 auto;
}

/* --- 2. Dashboard Header --- */
header {
  background: #fff;
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
header .title {
  flex-grow: 1;
  text-align: center;
}
.store-name {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
}
/* 戻るボタンのスタイル */
.btn-back {
  position: absolute;
  left: 15px;
  color: var(--primary);
  font-size: 1.4rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  line-height: 1;
}
.btn-back:active {
  opacity: 0.5;
}

/* --- 3. Login Page Specific (Original Design) --- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: 0 20px;
}
.login-container {
  background: #fff;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 380px;
}
.logo {
  text-align: center;
  margin-bottom: 30px;
}
.logo-text {
  color: var(--primary);
  font-size: 1.8rem;
  font-weight: 900;
}
.logo-sub {
  display: block;
  font-size: 0.8rem;
  color: #999;
  margin-top: 5px;
  font-weight: bold;
}

/* --- 4. Dashboard Elements --- */

/* 状況表示カード */
.status-card {
  background: #fff;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  margin-bottom: 20px;
}
.status-card h2 {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.status-card .current-val {
  font-weight: 700;
  color: var(--text);
}

/* メニューグリッド */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 25px;
}
.menu-item {
  background: #fff;
  padding: 25px 10px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: all 0.2s;
  text-align: center;
}
.menu-item:active {
  transform: scale(0.96);
}
.menu-item i {
  font-size: 2rem;
  color: var(--primary);
}
.menu-item span {
  font-size: 0.9rem;
  font-weight: 800;
}

/* 外部リンク（サイトを確認） */
.external-links-wrap {
  display: flex;
  gap: 10px;
}
.btn-external {
  display: block;
  background: #fff;
  padding: 15px;
  border-radius: 15px;
  text-align: center;
  text-decoration: none;
  color: #666;
  font-size: 0.85rem;
  font-weight: 800;
  flex: 1;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

/* --- 5. Forms & Inputs --- */
.field {
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #666;
}
.input-group {
  position: relative;
}
input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  border: 2px solid #eee;
  border-radius: 12px;
  padding: 12px;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s;
  background: #fff;
}
input:focus, textarea:focus {
  border-color: var(--primary);
  background: #f0fdfd;
}

.toggle-pass {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toggle-pass svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.remember-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 25px;
  cursor: pointer;
}
.remember-wrap input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.remember-wrap span {
  font-size: 0.9rem;
  font-weight: 700;
  color: #666;
}

/* --- 6. Buttons --- */
.btn-submit {
  width: 100%;
  border: none;
  border-radius: 50px;
  padding: 18px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 6px 15px rgba(38, 200, 196, 0.3);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 25px;
}
.btn-submit:active {
  transform: translateY(2px);
}
.btn-submit:disabled {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

/* --- 7. Strong Central Lock Overlay (Notification) --- */
/* 全画面を覆う半透明のロック背景 */
.msg-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.6) !important; /* 60%の黒背景でロック */
  backdrop-filter: blur(4px); /* 背景をぼかす */
  -webkit-backdrop-filter: blur(4px);
  z-index: 100000 !important; /* 全ての上に配置 */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: opacity 0.5s ease;
  visibility: visible;
  opacity: 1;
}

/* 中央配置のメッセージボックス */
.msg {
  background: #fff !important;
  width: 85% !important;
  max-width: 320px !important;
  padding: 40px 20px !important;
  border-radius: 30px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 20px !important;
  animation: msg-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes msg-pop {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.msg-text {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.5;
  color: var(--text);
}

.msg-success {
  color: var(--primary) !important;
  border: 4px solid var(--primary) !important;
}

.msg-error {
  color: var(--err) !important;
  border: 4px solid var(--err) !important;
}

/* その場でスッと消えるフェードアウト処理（移動なし） */
.msg-fade-out {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* --- 8. Management UI (account-manage.php) --- */
.manage-card {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  margin-bottom: 25px;
}
.manage-card h3 {
  font-size: 1rem;
  margin: 0 0 15px;
  border-bottom: 2px solid #f0fdfd;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.store-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.store-table th {
  text-align: left;
  color: #999;
  padding: 10px;
  border-bottom: 1px solid #eee;
}
.store-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f9f9f9;
}
.btn-icon {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 5px;
}
.btn-edit {
  color: var(--primary);
}
.btn-del {
  color: #ccc;
  transition: color 0.2s;
}
.btn-del:hover {
  color: var(--err);
}
.realtime-err {
  color: var(--err);
  font-size: 0.75rem;
  font-weight: 800;
  margin-top: 6px;
  display: none;
}

/* --- 作業別色分けの追加分（末尾に追記） --- */
/* 追加：やわらかい青 */
.msg-add { color: #1971c2 !important; border: 4px solid #a5d8ff !important; background: #f0f7ff !important; }
/* 削除：やわらかい赤 */
.msg-delete { color: #e03131 !important; border: 4px solid #ffc9c9 !important; background: #fff5f5 !important; }
/* 静止フェードアウト */
.msg-fade-out { opacity: 0 !important; pointer-events: none !important; }

/* --- 9. 全画面ローダー（共通） --- */
.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 10000;
  display: none; /* 初期状態は非表示 */
  align-items: center;
  justify-content: center;
  flex-direction: column;
  touch-action: none;
  user-select: none;
}

/* ローダーが表示されている時のクラス */
.global-loader.is-visible {
  display: flex;
}

.loader-flower {
  position: relative;
  width: 64px;
  height: 64px;
  animation: loader-spin 1.05s linear infinite;
}

.loader-flower i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.18;
  transform: rotate(calc(var(--i) * 45deg)) translate(26px);
}

/* 1番目から3番目の花びらを濃くして回転を見せる */
.loader-flower i:nth-child(1) { opacity: 0.95; }
.loader-flower i:nth-child(2) { opacity: 0.75; }
.loader-flower i:nth-child(3) { opacity: 0.55; }

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}
/* 引っ張って更新のスタイル */
#ptr-indicator {
    position: fixed;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #7494c0;
    font-size: 14px;
    transition: transform 0.2s;
    z-index: 9999;
    border-bottom: 1px solid #ddd;
}

body.ptr-pulling #ptr-indicator {
    transform: translateY(50px);
}

body.ptr-refreshing #ptr-indicator {
    transform: translateY(50px);
}