body {
  background-color: #f5f5f5;
}

/* 登录页面主要内容 */
.login-container {
  width: 100%;
  padding: 0 20px;
  min-height: calc(100vh - 342px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-main {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.login-card {
  flex: 2;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 50px;
  max-width: 700px;
}

.side-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.login-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 4px;
  color: #095f70;
  text-align: left;
}

.login-subtitle {
  font-size: 20px;
  margin-bottom: 25px;
  color: #333;
  font-weight: 600;
  text-align: left;
}

/* 第一部分：不起眼的注释 */
.service-notice {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  padding: 15px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.5;
  color: #666;
  border-radius: 4px;
}

.service-notice p {
  margin-bottom: 8px;
}

.service-notice p:last-child {
  margin-bottom: 0;
}

/* 第二部分：稍微起眼的注释 */
.login-warning {
  background-color: #fff9e6;
  border: 1px solid #ffd700;
  border-left: 4px solid #ffc11c;
  padding: 15px 15px 15px 50px;
  margin-bottom: 30px;
  font-size: 14px;
  line-height: 1.5;
  color: #666;
  position: relative;
  border-radius: 0 4px 4px 0;
}

.login-warning::before {
  content: "!";
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-color: #ffc11c;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.login-warning p {
  margin-bottom: 8px;
}

.login-warning p:last-child {
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 5px;
  text-align: left;
}

.form-label {
  display: block;
  margin-bottom: 15px;
  font-weight: bold;
  font-size: 15px;
  color: #333;
  text-align: left;
}

.form-input {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: all 0.3s;
  background-color: #fafafa;
}

.form-input:focus {
  border-color: #095f70;
  background-color: white;
  outline: none;
  box-shadow: 0 0 0 2px rgba(9, 95, 112, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  font-size: 15px;
  text-align: left;
}

.checkbox-group input {
  margin-right: 10px;
  width: 18px;
  height: 18px;
}

.checkbox-group-pw {
  font-size: 13px;
  margin-bottom: 20px;
}

.login-button {
  width: 100%;
  padding: 13px;
  background-color: #ffc11c;
  color: black;
  border: none;
  border-radius: 6px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-bottom: 20px;
  text-align: center;
  -webkit-user-select: none;
  /* Safari */
  user-select: none;
}

.login-button:hover {
  background-color: #d6a10f;
}

input:-internal-autofill-selected {
  background-color: white !important;
}

.link-button {
  display: block;
  text-align: left;
  color: #1ba1ff;
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 15px;
  padding: 10px 0;
}

.link-button:hover {
  text-decoration: underline;
}

/* 侧边栏卡片样式 */
.reservation-card,
.register-card {
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 25px;
  text-align: left;
}

.reservation-title,
.register-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #095f70;
  text-align: left;
}

.reservation-description {
  font-size: 15px;
  margin-bottom: 25px;
  line-height: 1.5;
  color: #666;
  text-align: left;
}

.register-description {
  font-size: 15px;
  margin-bottom: 25px;
  line-height: 1.5;
  color: #666;
  text-align: left;
  font-weight: bold;
  color: red;
}

.secondary-button {
  display: inline-block;
  padding: 14px 30px;
  background-color: #f0f0f0;
  color: #333;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
  min-width: 160px;
  text-align: center;
}

.secondary-button:hover {
  background-color: #e0e0e0;
}

.register-button {
  display: inline-block;
  padding: 16px 30px;
  background-color: #ffc11c;
  color: #222;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
  min-width: 200px;
  text-align: center;
}

.register-button:hover {
  background-color: #e6ae0f;
}

.login-notice {
  background-color: #f9f9f9;
  padding: 15px;
  margin-top: 20px;
  font-size: 13px;
  border-radius: 4px;
  border-left: 3px solid #095f70;
}

.login-notice a {
  color: #1ba1ff;
}

.login-button-back {
  width: 100%;
  padding: 13px;
  background-color: #1ba1ff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-bottom: 20px;
  text-align: center;
}

.login-button-back:hover {
  background-color: #0f7ece;
}

.password-wrapper {
  position: relative;
}

/* 关键：绝对居中不受 focus 边框影响 */
.password-wrapper .input-icon {
  position: absolute;
  top: 0;
  bottom: 0;
  margin: auto 0;
  /* 垂直自动居中 */
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

#clear-password {
  display: none;
}

.password-wrapper .clear-icon {
  right: 44px;
}

.password-wrapper .eye-icon {
  right: 10px;
}

.password-wrapper .input-icon svg {
  display: block;
  /* 防止 baseline 造成偏移 */
}


/* 三栏表单行 */
.form-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 20px;
}

.form-label-column {
  flex: 0 0 190px;
  padding-top: 12px;
  font-weight: bold;
  font-size: 15px;
  color: #333;
  text-align: left;
}

.name-padding {
  padding-left: 40px;
  font-size: 13px;
}

.form-input-column {
  flex: 0 0 320px;
}

.form-input-column {
  flex: 0 0 320px;
}

.form-note-column {
  flex: 1;
  padding-top: 12px;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.required {
  color: #ff1d1c;
  margin-left: 4px;
}

.form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.3s;
  background-color: #fafafa;
}

.form-input:focus {
  border-color: #095f70;
  background-color: white;
  outline: none;
  box-shadow: 0 0 0 2px rgba(9, 95, 112, 0.1);
}


.form-code-switch {
  font-size: 14px;
  color: #1ba1ff;
  margin-bottom: 10px;
  cursor: pointer;
  -webkit-user-select: none;
  /* Safari */
  user-select: none;
}

#form-label-code {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

#form-label-code.open {
  max-height: 200px;
  /* 根据内容高度调大一点 */
  opacity: 1;
}

@media screen and (max-width: 767px) {
  .login-main {
    flex-direction: column;
  }

  .login-card,
  .side-section {
    width: 100%;
  }

  .side-section {
    flex-direction: row;
  }

  .reservation-card,
  .register-card {
    flex: 1;
  }

  .login-container {
    padding: 0;
  }

  .login-card {
    padding: 60px 20px;
  }

  .side-section {
    flex-direction: column;
  }

  .reservation-card,
  .register-card {
    padding: 20px;
  }

  .login-title {
    font-size: 20px;
    text-align: center;
  }

  .login-title-sub {
    font-size: 12px;
    color: rgb(115, 115, 115);
    text-align: center;
    margin-bottom: 20px;
  }

  .login-subtitle {
    font-size: 18px;
  }

  .login-warning {
    padding: 15px 15px 15px 40px;
  }

  .login-warning::before {
    left: 12px;
    width: 18px;
    height: 18px;
    font-size: 11px;
  }
}

/* 错误提示样式 */
.login-error {
  background-color: #fff2f2;
  border: 1px solid #ffcdd2;
  border-left: 4px solid #ff1d1c;
  padding: 15px 15px 15px 50px;
  margin-bottom: 25px;
  font-size: 14px;
  line-height: 1.5;
  color: #d32f2f;
  position: relative;
  border-radius: 0 4px 4px 0;
}

.login-error::before {
  content: "!";
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-color: #ff1d1c;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.login-error-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.login-error-message {
  margin: 0;
}

@media screen and (max-width: 767px) {
  .login-error {
    padding: 15px 15px 15px 40px;
    margin-bottom: 20px;
    font-size: 13px;
    border-left-width: 3px;
  }

  .login-error::before {
    left: 12px;
    width: 18px;
    height: 18px;
    font-size: 11px;
  }

  .login-error-title {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .login-error-message {
    font-size: 13px;
    line-height: 1.4;
  }

  .login-warning {
    display: none;
  }
}


@media screen and (max-width: 767px) {

  /* 关键：让 side-section 不再作为一个整体参与排序，
     里面的两个卡片直接变成 login-main 的子元素 */
  .side-section {
    display: contents;
  }

  /* 排序：注册最上、登录中间、预约确认最底 */
  .register-card {
    width: 100%;
    order: -2;
  }

  .login-card {
    order: -1;
  }

  .reservation-card {
    order: 99;
  }

  .reservation-card {
    width: 100%;
  }

  .secondary-button {
    width: 100%;
  }

  .register-button {
    width: 100%;
  }

  .form-row {
    flex-direction: column;
    gap: 10px;
  }

  .form-label-column {
    padding-top: 0;
    padding-bottom: 5px;
  }

  .form-label-column,
  .form-input-column,
  .form-note-column {
    flex: 1;
    width: 100%;
  }


  .form-label-column,
  .form-input-column,
  .form-note-column {
    flex: 1;
    width: 100%;
  }
}