:root {
  color-scheme: light;
  --ink: #16202a;
  --muted: #607080;
  --line: #d7dde3;
  --panel: #ffffff;
  --surface: #eef4f6;
  --accent: #0c7c80;
  --accent-dark: #08666a;
  --focus: #f2b84b;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Yu Gothic", "Meiryo", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    linear-gradient(135deg, rgba(12, 124, 128, 0.12), rgba(242, 184, 75, 0.14)),
    var(--surface);
}

button,
input {
  font: inherit;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 460px);
  align-items: stretch;
}

.brand-panel {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: clamp(28px, 6vw, 72px);
  background:
    linear-gradient(145deg, rgba(5, 46, 52, 0.88), rgba(12, 124, 128, 0.84)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900' viewBox='0 0 900 900'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.12' stroke-width='2'%3E%3Cpath d='M78 149h720M78 277h720M78 405h720M78 533h720M78 661h720M78 789h720M149 78v720M277 78v720M405 78v720M533 78v720M661 78v720M789 78v720'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  color: #fff;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.brand-mark span {
  width: 28px;
  height: 28px;
  border: 4px solid #f2b84b;
  border-left-color: #ffffff;
  transform: rotate(45deg);
}

.brand-label {
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0;
  opacity: 0.84;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: clamp(28px, 6vw, 56px);
  background: var(--panel);
  border-left: 1px solid rgba(22, 32, 42, 0.08);
}

.panel-heading {
  margin-bottom: 30px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

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

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

label {
  color: #334250;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 124, 128, 0.16);
}

.password-row {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
}

.icon-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #334250;
  background: #fff;
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-button:focus-visible {
  outline: 3px solid rgba(242, 184, 75, 0.48);
  outline-offset: 2px;
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.message {
  min-height: 22px;
  color: var(--danger);
  font-size: 14px;
}

.message.is-info {
  color: var(--muted);
}

.primary-button {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.primary-button:focus-visible {
  outline: 3px solid rgba(242, 184, 75, 0.6);
  outline-offset: 2px;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

@media (max-width: 760px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 32vh;
    align-items: flex-end;
  }

  .login-panel {
    min-height: 68vh;
    border-left: 0;
    border-top: 1px solid rgba(22, 32, 42, 0.08);
  }
}

@media (max-width: 420px) {
  .brand-panel,
  .login-panel {
    padding: 24px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }
}
