/* 共有デザイントークン — index.html (QUIRIO HDR Retouch) の :root 定義から抽出。
   ログイン/サインアップ/料金/マイページ/管理画面など全ページで読み込む。 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-page:    #070809;
  --bg-surface: #0e1014;
  --bg-topbar:  #15181e;
  --bg-panel:   #11141a;
  --bg-card:    #1a1e26;
  --bg-active:  #1f2530;

  --text-primary:   #e7e9ee;
  --text-secondary: #aeb4be;
  --text-tertiary:  #6f7682;

  --accent:      #a07bf5;
  --accent-dark: #7c4ddb;
  --success:     #5ec27a;
  --error:       #e05252;

  --border-subtle: rgba(255,255,255,0.07);

  --topbar-h: 60px;
  --left-w:   330px;
  --right-w:  270px;
  --app-max:  1240px;
  --app-h:    780px;
  --radius-app:  16px;
  --radius-card: 9px;
}

:root[data-theme="light"] {
  --bg-page:    #eef0f3;
  --bg-surface: #ffffff;
  --bg-topbar:  #ffffff;
  --bg-panel:   #f7f8fa;
  --bg-card:    #ffffff;
  --bg-active:  #e9ebef;

  --text-primary:   #1b1e24;
  --text-secondary: #5b6270;
  --text-tertiary:  #9099a6;

  --border-subtle: rgba(15,23,42,0.09);
}

[data-theme="light"] .app,
[data-theme="light"] .auth-card {
  box-shadow: 0 24px 80px rgba(15,23,42,0.12);
}
[data-theme="light"] .drop-zone {
  border-color: rgba(15,23,42,0.15);
}

body {
  font-family: 'Zen Kaku Gothic New', system-ui, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 13px;
  line-height: 1.5;
}

/* ── Top bar (共有) ───────────────────────── */
.top-bar {
  height: var(--topbar-h);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  flex-shrink: 0;
}
.top-bar-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  text-decoration: none;
}
.top-bar-badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .06em;
}

/* ── Theme toggle (共有) ──────────────────── */
.theme-toggle {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.theme-toggle-icon { font-size: 13px; line-height: 1; opacity: 0.55; }
.theme-toggle-track {
  position: relative;
  width: 38px;
  height: 21px;
  border-radius: 11px;
  background: var(--bg-active);
  transition: background 0.2s;
  flex-shrink: 0;
}
.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  transition: left 0.2s;
}
[data-theme="light"] .theme-toggle-track { background: var(--accent); }
[data-theme="light"] .theme-toggle-thumb { left: 19px; }

/* ── User menu (top-bar右端、契約者向けページ共通) ─ */
.user-menu {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.user-menu-email {
  font-size: 12px;
  color: var(--text-secondary);
}
.user-menu a, .user-menu button {
  font-size: 12px;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.user-menu a:hover, .user-menu button:hover { color: var(--text-primary); }

/* ── フォーム部品(共有) ───────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label {
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: .06em;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus { border-color: var(--accent); }
.field-error {
  font-size: 11px;
  color: var(--error);
  min-height: 14px;
}

.btn-primary {
  width: 100%;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-card);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  letter-spacing: .04em;
  font-family: 'Zen Kaku Gothic New', sans-serif;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  letter-spacing: .04em;
  font-family: 'Zen Kaku Gothic New', sans-serif;
}
.btn-outline:hover { background: var(--bg-active); }

.banner {
  padding: 10px 14px;
  border-radius: var(--radius-card);
  font-size: 12px;
  margin-bottom: 16px;
}
.banner-error { background: rgba(224,82,82,0.12); color: var(--error); }
.banner-success { background: rgba(94,194,122,0.12); color: var(--success); }

/* ── 認証カード（login/signup/forgot/reset共通レイアウト） ─ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border-radius: var(--radius-app);
  padding: 32px 28px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.65);
}
.auth-card h1 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.auth-card .auth-subtitle {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  font-size: 11px;
  color: var(--text-tertiary);
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}
.auth-links {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.auth-links a { color: var(--accent); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

/* ── ステータスバッジ（マイページ/管理画面共通） ─ */
.status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .04em;
}
.status-badge.ok { background: rgba(94,194,122,0.15); color: var(--success); }
.status-badge.warn { background: rgba(224,82,82,0.15); color: var(--error); }
.status-badge.neutral { background: var(--bg-active); color: var(--text-secondary); }
