/* ============================================
   空き家ブック ダッシュボード — ログイン画面
   Design: Japanese Minimalism × Global Dashboard
   Primary: Forest Green (#2D7D46)
   Accent: Amber (#E8873A)
   ============================================ */

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

:root {
  --primary: #2D7D46;
  --primary-light: #4A9B5F;
  --primary-dark: #1F5630;
  --accent: #E8873A;
  --accent-light: #F0A456;
  --background: #F7F5F0;
  --card-bg: #FFFFFF;
  --text-primary: #2D2D2D;
  --text-secondary: #666666;
  --border-color: #E0DDD8;
  --input-bg: #FAFAF8;
  --success: #4CAF50;
}

html, body {
  height: 100%;
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
}

/* ============================================
   Main Container
   ============================================ */

.login-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ============================================
   Left Side - Branding
   ============================================ */

.login-left {
  display: none;
  flex: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 60px 40px;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 600px;
  height: 600px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.login-left::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -30%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
}

@media (min-width: 1024px) {
  .login-left {
    display: flex;
  }
}

.login-branding {
  position: relative;
  z-index: 1;
}

.logo-box {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.logo-box svg {
  width: 48px;
  height: 48px;
}

.login-branding h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-branding p {
  font-size: 14px;
  opacity: 0.9;
  font-weight: 300;
}

.login-features {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.feature-item h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-item p {
  font-size: 12px;
  opacity: 0.85;
  font-weight: 300;
}

/* ============================================
   Right Side - Login Form
   ============================================ */

.login-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
  background-color: var(--background);
}

@media (min-width: 1024px) {
  .login-right {
    padding: 60px 40px;
  }
}

.login-form-wrapper {
  width: 100%;
  max-width: 420px;
}

.login-header {
  margin-bottom: 32px;
  text-align: center;
}

.login-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.login-header p {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ============================================
   Role Selector
   ============================================ */

.role-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  background: var(--card-bg);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.role-option {
  flex: 1;
  position: relative;
}

.role-option input {
  display: none;
}

.role-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-option input:checked + .role-label {
  background-color: var(--primary);
  color: white;
}

.role-label svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Form Elements
   ============================================ */

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background-color: var(--input-bg);
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-group input::placeholder {
  color: #999;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(45, 125, 70, 0.1);
}

/* ============================================
   Form Options
   ============================================ */

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 8px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  user-select: none;
}

.remember-me input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.forgot-password {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-password:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* ============================================
   Login Button
   ============================================ */

.login-button {
  padding: 12px 16px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(45, 125, 70, 0.15);
}

.login-button:hover {
  background-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(45, 125, 70, 0.25);
  transform: translateY(-2px);
}

.login-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(45, 125, 70, 0.15);
}

/* ============================================
   Divider
   ============================================ */

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border-color);
}

/* ============================================
   Social Login
   ============================================ */

.social-login {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--card-bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.social-button:hover {
  background-color: var(--input-bg);
  border-color: #ccc;
}

.social-button svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   Sign Up Link
   ============================================ */

.signup-link {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.signup-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.signup-link a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* ============================================
   Footer
   ============================================ */

.login-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  flex-wrap: wrap;
  margin-top: auto;
}

.login-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-footer a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.separator {
  opacity: 0.3;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
  }

  .login-right {
    padding: 40px 20px;
    justify-content: flex-start;
    padding-top: 60px;
  }

  .login-form-wrapper {
    max-width: 100%;
  }

  .login-header h2 {
    font-size: 24px;
  }

  .login-header p {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .login-right {
    padding: 30px 16px;
    padding-top: 40px;
  }

  .login-header h2 {
    font-size: 20px;
  }

  .login-form-wrapper {
    max-width: 100%;
  }

  .role-selector {
    margin-bottom: 24px;
  }

  .form-options {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .login-footer {
    font-size: 10px;
  }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-form-wrapper {
  animation: fadeIn 0.4s ease-out;
}

/* ============================================
   Dark Mode Support (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-primary: #f5f5f5;
    --text-secondary: #999;
    --border-color: #444;
    --input-bg: #333;
  }
}
