/* 全画面で共有する配色、ブランド表示、本文幅、空表示、主要ボタンを定義する。 */
:root {
  --blue: #1769e0;
  --navy: #13233d;
  --line: #dfe5ee;
  --muted: #6d7785;
  --bg: #f5f7fa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 14px;
}

.user-account-bar {
  height: 44px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

/* 環境別CSSの配色を最上段へ反映し、暗い背景上の主要な文字を読みやすく保つ。 */
.user-account-bar.environment-header {
  border-bottom-color: var(--environment-header-bg);
  background: var(--environment-header-bg);
  color: var(--environment-header-fg);
}

.environment-header .user-identity,
.environment-header .user-identity:hover,
.environment-header .user-identity:focus-visible,
.environment-header .gantt-header-context h1 {
  color: var(--environment-header-fg);
}

.account-header-left {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

.account-header-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.user-identity {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.user-identity:hover {
  color: var(--blue);
}

.fullscreen-header-button {
  min-height: 32px;
  margin-right: 88px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.fullscreen-header-button:hover,
.fullscreen-header-button:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  outline: 0;
}

.account-menu {
  position: relative;
}

.account-menu-button {
  width: 34px;
  height: 32px;
  padding: 7px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
}

.account-menu-button span {
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #475569;
}

.account-menu-button:hover,
.account-menu-button:focus-visible {
  border-color: var(--blue);
  outline: 0;
}

.account-menu-panel {
  position: absolute;
  z-index: 100;
  top: calc(100% + 6px);
  right: 0;
  width: 230px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}

.desktop-site-switch {
  min-height: 50px;
  padding: 7px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
}

.account-menu-link {
  min-height: 38px;
  padding: 9px 8px;
  display: block;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  text-decoration: none;
}

.account-menu-link:hover,
.account-menu-link:focus-visible {
  background: #f1f5f9;
  color: var(--blue);
  outline: 0;
}

.account-menu-field {
  padding: 9px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.account-menu-field span {
  font-size: 12px;
  font-weight: 700;
}

.account-menu-field select {
  width: 100%;
  font-size: 13px;
}

.desktop-site-switch span {
  display: flex;
  flex-direction: column;
}

.desktop-site-switch strong {
  font-size: 13px;
}

.desktop-site-switch small {
  color: var(--muted);
  font-size: 11px;
}

.desktop-site-switch input {
  width: 34px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--blue);
}

.account-menu-logout {
  width: 100%;
  padding: 9px 8px;
  border: 0;
  background: transparent;
  color: #334155;
  text-align: left;
}

.account-menu-logout:hover,
.account-menu-logout:focus-visible {
  background: #f1f5f9;
  color: #b42318;
  outline: 0;
}

.user-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8f1ff;
  color: #1769e0;
  font-size: 12px;
  font-weight: 700;
}

.user-avatar-large {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
  font-size: 22px;
}

.user-settings-page {
  max-width: 720px;
}

.user-settings-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-settings-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.user-settings-card h1 {
  margin-bottom: 24px;
}

.user-icon-setting {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-icon-setting .form-control {
  min-width: 0;
  flex: 1 1 auto;
}

.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  text-decoration: none;
  font-size: 16px;
  white-space: nowrap;
}

.brand:hover {
  color: var(--navy);
}

.brand-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 7px;
  object-fit: contain;
}

.brand-logo-large {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-radius: 10px;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

h2 {
  font-size: 17px;
}

.page-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.empty-state {
  padding: 70px 24px;
  text-align: center;
  background: #fff;
  border: 1px dashed #cdd5e1;
  border-radius: 12px;
  color: var(--muted);
}

.btn-primary {
  background: #1769e0;
  border-color: #1769e0;
}

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 16px;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(400px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(19, 35, 61, 0.1);
}

.login-brand {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 18px;
}

.login-card h1 {
  margin-bottom: 8px;
  text-align: center;
}

.login-card > p {
  margin-bottom: 24px;
  color: var(--muted);
  text-align: center;
}

.logout-form {
  margin: 0;
}
