/* 店舗管理画面ログイン（templates/home/home.html） */
:root {
  --bg: #f4f5f7;
  --bg-accent: #e8ecf4;
  --card: #ffffff;
  --text: #16181d;
  --muted: #6b7280;
  --border: #e3e5ea;
  --input: #ffffff;
  --primary: #1f2937;
  --primary-hover: #111827;
  --primary-text: #ffffff;
  --focus: #3b82f6;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --error-text: #b91c1c;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px rgba(16, 24, 40, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-accent: #151a22;
    --card: #171a21;
    --text: #eef0f4;
    --muted: #9aa1ad;
    --border: #2a2f39;
    --input: #11141a;
    --primary: #f3f4f6;
    --primary-hover: #ffffff;
    --primary-text: #111827;
    --focus: #60a5fa;
    --error-bg: #2a1416;
    --error-border: #5b2227;
    --error-text: #fca5a5;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  background: radial-gradient(1200px 600px at 50% -10%, var(--bg-accent), var(--bg));
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.login-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px 28px 28px;
}

.login-head { text-align: center; margin-bottom: 24px; }

.brand-mark {
  display: inline-block;
  margin: 0 auto 16px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.login-head h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.login-sub { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.login-error {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--error-border);
  border-radius: 10px;
  background: var(--error-bg);
  color: var(--error-text);
  font-size: 13px;
  line-height: 1.5;
}

.login-error p { margin: 0; }

.login-form { display: grid; gap: 16px; }

.field { display: grid; gap: 6px; }

.field label { font-size: 13px; font-weight: 600; }

.field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input::placeholder { color: var(--muted); opacity: 0.7; }

.field input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent);
}

.password-wrap { position: relative; }

.password-wrap input { padding-right: 64px; }

.toggle-pw {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.toggle-pw:hover { color: var(--text); }

.toggle-pw:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: var(--primary-text);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.btn-primary:hover { background: var(--primary-hover); }

.btn-primary:active { transform: translateY(1px); }

.btn-primary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.btn-primary:disabled { opacity: 0.6; cursor: progress; }

.signed-in { display: grid; gap: 12px; text-align: center; }

.signed-in p { margin: 0; font-size: 14px; color: var(--muted); word-break: break-all; }

.login-foot { font-size: 12px; color: var(--muted); }

@media (max-width: 420px) {
  .login-card { padding: 28px 20px 22px; border-radius: 14px; }
}
