/* 绿泥供应链管理系统 - 登录页面样式 */

* {
  box-sizing: border-box;
}

:root {
  --primary: #2d7a3e;
  --primary-dark: #1a4a27;
  --primary-light: #4a9e58;
  --secondary: #f0f4f0;
  --accent: #b8d4c1;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--text-primary);
}

body {
  background: linear-gradient(135deg, #f5faf7 0%, #eef4f1 50%, #e8f1ed 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(45,122,62,0.03)" stroke-width="1"/></pattern><radialGradient id="blob1" cx="20%" cy="30%"><stop offset="0%%" style="stop-color:rgba(74,158,88,0.1)"/><stop offset="100%%" style="stop-color:transparent"/></radialGradient></defs><rect width="1000" height="1000" fill="url(%23grid)"/><circle cx="200" cy="300" r="400" fill="url(%23blob1)"/><circle cx="800" cy="700" r="350" fill="url(%23blob1)"/></svg>');
  pointer-events: none;
  z-index: 0;
}

.wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.container {
  width: 100%;
  max-width: 480px;
  position: relative;
}

.card {
  background: var(--bg);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(45, 122, 62, 0.08), 0 0 1px rgba(45, 122, 62, 0.1);
  overflow: hidden;
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 56px 40px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent);
  border-radius: 50%;
}

.header::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06), transparent);
  border-radius: 50%;
}

.logo {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 40px;
  margin: 0 auto 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 2;
}

.title {
  font-size: 26px;
  color: #fff;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 2;
}

.subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 10px;
  letter-spacing: 0.2px;
  position: relative;
  z-index: 2;
  font-weight: 500;
}

.body {
  padding: 44px 40px;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fafbfa;
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
  color: var(--text-primary);
  font-family: inherit;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: #d1d5db;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(45, 122, 62, 0.08);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  margin-bottom: 28px;
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 15px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(45, 122, 62, 0.2);
  text-transform: uppercase;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(45, 122, 62, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(45, 122, 62, 0.15);
}

.link {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.footer {
  padding: 28px 40px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(245, 250, 247, 0.5), transparent);
  text-align: center;
}

.muted {
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: 0.2px;
  line-height: 1.6;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.remember label {
  margin: 0;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
}

.signup-link {
  text-align: center;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.signup-link a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.3s ease;
}

.signup-link a:hover {
  color: var(--primary-dark);
}

/* 消息提示框 */
.message-box {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  background-color: rgba(29, 78, 216, 0.1);
  color: #1d4ed8;
  border: 1px solid rgba(29, 78, 216, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.message-box.visible {
  opacity: 1;
}

.message-box.error {
  background-color: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.2);
}

.message-box.success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.2);
}

/* 响应式设计 */
@media (max-width: 600px) {
  .wrap {
    padding: 16px;
  }

  .card {
    border-radius: 16px;
  }

  .header {
    padding: 40px 28px 32px;
  }

  .logo {
    width: 72px;
    height: 72px;
    font-size: 32px;
    margin-bottom: 16px;
  }

  .title {
    font-size: 22px;
  }

  .subtitle {
    font-size: 13px;
  }

  .body {
    padding: 32px 24px;
  }

  .form-group {
    margin-bottom: 16px;
  }

  label {
    font-size: 13px;
    margin-bottom: 8px;
  }

  input[type="text"],
  input[type="password"] {
    padding: 12px 14px;
    font-size: 16px;
  }

  .actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .actions > div:last-child {
    align-self: flex-end;
  }

  .btn-submit {
    padding: 13px;
  }

  .footer {
    padding: 20px 24px;
  }
}
