@charset "UTF-8";
/**
 * SALUTO - Auth Pages Specific CSS
 * /login.html & /signup.html 専用スタイル（改行防止・ユーザビリティ最適化版）
 */

:root {
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #0F172A;
  --text-muted: #64748B;
  --primary: #2563EB;
  --accent: #10B981;
  --coral: #FF6B6B;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #F8FAFC;
  color: var(--text);
  margin: 0;
  word-break: normal;
  overflow-wrap: break-word;
  line-break: strict;
}

.main-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
}

/* ログインカード */
.login-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  padding: 44px 40px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #38BDF8);
}

.login-title {
  font-size: clamp(1.3rem, 3.2vw, 1.6rem);
  font-weight: 900;
  margin-bottom: 8px;
  text-align: center;
  line-height: 1.35;
  color: #0F172A;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.login-desc {
  color: var(--text-muted);
  font-size: .9rem;
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.6;
}

.btn-demo {
  width: 100%;
  background: #F1F5F9;
  border: 1px solid var(--border);
  color: #0F172A;
  font-weight: 700;
  font-size: .9rem;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 12px;
  transition: background .2s;
}

.btn-demo:hover {
  background: #E2E8F0;
}

.login-card-foot {
  text-align: center;
  margin-top: 24px;
  font-size: .86rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.login-card-foot a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  margin-left: 4px;
}

.login-card-foot a:hover {
  text-decoration: underline;
}

/* サインアップカード（プラン3列でも絶対に中途半端な改行が起きない横幅設計） */
.signup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  max-width: 680px;
  width: 100%;
  padding: 44px 44px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
}

.signup-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--coral));
}

.signup-head {
  text-align: center;
  margin-bottom: 28px;
}

.signup-head .badge,
.badge-trial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ECFDF5;
  color: #047857;
  font-weight: 800;
  font-size: .78rem;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
  border: 1px solid #A7F3D0;
  line-height: 1.4;
}

.signup-title {
  font-size: clamp(1.35rem, 3.2vw, 1.7rem);
  font-weight: 900;
  margin-bottom: 12px;
  line-height: 1.35;
  color: #0F172A;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.signup-desc {
  color: #475569;
  font-size: .88rem;
  line-height: 1.75;
  margin: 0 auto;
  max-width: 560px;
}

/* 意味のまとまりを維持し中途半端な折り返しを防ぐユーティリティ */
.ib {
  display: inline-block;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group-mb0 {
  margin-bottom: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.form-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .86rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 7px;
  line-height: 1.4;
}

.req {
  display: inline-block;
  background: #FEE2E2;
  color: #DC2626;
  font-size: .68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.4;
}

.opt {
  display: inline-block;
  background: #F1F5F9;
  color: #64748B;
  font-size: .68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.4;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-size: .94rem;
  font-family: inherit;
  color: #0F172A;
  background: #FFFFFF;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
  line-height: 1.5;
}

.form-control::placeholder {
  color: #94A3B8;
}

.form-control:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.form-control-textarea {
  resize: vertical;
  min-height: 80px;
}

/* プラン選択カード（3カラム均等・改行崩れ完全防止） */
.plan-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  border: 2px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px 10px 14px;
  cursor: pointer;
  text-align: center;
  background: #FFFFFF;
  transition: border-color .2s, background-color .2s, box-shadow .2s, transform .15s;
  position: relative;
  user-select: none;
}

.plan-card:hover {
  border-color: #93C5FD;
  background: #F8FAFC;
  transform: translateY(-1px);
}

.plan-card.selected {
  border-color: #10B981;
  background: #ECFDF5;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

.plan-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-card-badge {
  display: inline-block;
  font-size: .66rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
  line-height: 1.3;
  white-space: nowrap;
}

.plan-card-badge.badge-free {
  background: #F1F5F9;
  color: #475569;
}

.plan-card-badge.badge-trial-tag {
  background: #D1FAE5;
  color: #065F46;
}

.plan-card-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}

.plan-card-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.plan-card-name {
  font-size: 1.02rem;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.plan-card-sub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: .74rem;
  color: #475569;
  line-height: 1.45;
  width: 100%;
}

.plan-price-line {
  display: block;
  font-weight: 700;
  color: #1E293B;
  white-space: nowrap;
}

.plan-price-sub {
  display: block;
  font-size: .7rem;
  color: #64748B;
  white-space: nowrap;
}

/* 送信ボタン */
.btn-submit,
.btn-submit-signup,
.btn-submit-primary {
  width: 100%;
  background: linear-gradient(135deg, #FF6B6B, #EE5253);
  color: #FFFFFF;
  font-weight: 900;
  font-size: 1.05rem;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 8px 22px rgba(238, 82, 83, 0.30);
  transition: transform .15s, box-shadow .15s, opacity .2s;
  font-family: inherit;
  line-height: 1.4;
}

.btn-submit:hover:not(:disabled),
.btn-submit-signup:hover:not(:disabled),
.btn-submit-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(238, 82, 83, 0.40);
}

.btn-submit:disabled,
.btn-submit-signup:disabled,
.btn-submit-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.login-card .btn-submit {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}

.login-card .btn-submit:hover:not(:disabled) {
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.38);
}

.terms-text {
  font-size: .78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
  line-height: 1.7;
}

.terms-link,
.terms-text a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
  white-space: nowrap;
}

.error-msg {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: .86rem;
  font-weight: 600;
  color: #DC2626;
  margin-bottom: 18px;
  display: none;
  line-height: 1.6;
}

.success-card {
  text-align: center;
  display: none;
  padding: 16px 0;
}

.success-card .icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.success-card h2 {
  font-size: 1.45rem;
  font-weight: 900;
  margin-bottom: 10px;
  color: #059669;
}

.success-card p {
  color: #475569;
  font-size: .92rem;
  line-height: 1.8;
}

.success-back-wrap {
  margin-top: 20px;
}

.success-back-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.success-back-link:hover {
  text-decoration: underline;
}

/* タブレット・モバイル最適化（幅が狭い画面では無理に3列にせず横長カード1列にして改行崩れをゼロに） */
@media (max-width: 640px) {
  .main-wrap {
    padding: 28px 16px;
  }
  .signup-card,
  .login-card {
    padding: 28px 20px;
    border-radius: 18px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .plan-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .plan-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    text-align: left;
  }
  .plan-card-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .plan-card-badge {
    margin-bottom: 2px;
  }
  .plan-card-top {
    justify-content: flex-start;
    margin-bottom: 0;
  }
  .plan-card-sub {
    align-items: flex-end;
    text-align: right;
    width: auto;
  }
}
