/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #2c5f5b;
  color: #333;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== Background Decorations ===== */

/* Diagonal stripe clusters */
.bg-stripes {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 180px;
  display: flex;
  gap: 14px;
  z-index: 0;
  pointer-events: none;
}

.bg-stripes-left {
  left: -30px;
  transform: rotate(-45deg);
  transform-origin: top left;
}

.bg-stripes-right {
  right: -30px;
  transform: rotate(-45deg);
  transform-origin: top right;
}

.bg-stripes .stripe {
  width: 28px;
  height: 250%;
  background: linear-gradient(180deg, rgba(167, 143, 75, 0.35) 0%, rgba(167, 143, 75, 0.08) 100%);
  border-radius: 14px;
}

.bg-stripes-left .stripe:nth-child(1) {
  height: 180%;
  margin-top: 80px;
}

.bg-stripes-left .stripe:nth-child(2) {
  height: 200%;
  margin-top: 40px;
}

.bg-stripes-left .stripe:nth-child(3) {
  height: 250%;
  margin-top: 0;
}

.bg-stripes-left .stripe:nth-child(4) {
  height: 220%;
  margin-top: 60px;
}

.bg-stripes-left .stripe:nth-child(5) {
  height: 160%;
  margin-top: 100px;
}

.bg-stripes-right .stripe:nth-child(1) {
  height: 160%;
  margin-top: 100px;
}

.bg-stripes-right .stripe:nth-child(2) {
  height: 220%;
  margin-top: 60px;
}

.bg-stripes-right .stripe:nth-child(3) {
  height: 250%;
  margin-top: 0;
}

.bg-stripes-right .stripe:nth-child(4) {
  height: 200%;
  margin-top: 40px;
}

.bg-stripes-right .stripe:nth-child(5) {
  height: 180%;
  margin-top: 80px;
}

/* Decorative circle */
.bg-circle {
  position: fixed;
  left: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid rgba(167, 143, 75, 0.25);
  z-index: 0;
  pointer-events: none;
}

/* ===== Page Layout ===== */
.page-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ===== Card ===== */
.card {
  background: #faf8f3;
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  padding: 40px 48px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
}

/* ===== Logo ===== */
.logo-wrapper {
  margin-bottom: 16px;
}

.logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #2c5f5b;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* ===== Card Header Text ===== */
.card-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.card-subtitle {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 4px;
}

.card-notice {
  font-size: 0.78rem;
  color: #c45a2d;
  font-style: italic;
  margin-bottom: 28px;
}

/* ===== Form ===== */
form {
  text-align: left;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.form-row.three-col .form-group {
  flex: 1;
}

.form-row.two-col .form-group {
  flex: 1;
}

.form-row.full-width .form-group {
  flex: 1;
}

/* ===== Form Group ===== */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #444;
  margin-bottom: 6px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.required {
  color: #c45a2d;
}

.auto-generate {
  color: #2c8f5b;
  font-weight: 600;
  font-size: 0.68rem;
  cursor: pointer;
  margin-left: 6px;
  letter-spacing: 0;
  text-transform: none;
  transition: color 0.2s ease;
}

.auto-generate:hover {
  color: #1a6b40;
}

/* ===== Input Wrapper ===== */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #999;
  pointer-events: none;
  z-index: 1;
}

.input-wrapper input,
.input-wrapper select {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-size: 0.88rem;
  border: 1.5px solid #e0ddd5;
  border-radius: 10px;
  background: #f5f3ee;
  color: #333;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
  font-family: inherit;
}

.input-wrapper input.no-icon,
.input-wrapper select {
  padding-left: 14px;
}

.input-wrapper input::placeholder {
  color: #b0ab9e;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
  border-color: #2c5f5b;
  box-shadow: 0 0 0 3px rgba(44, 95, 91, 0.1);
  background: #fff;
}

.input-wrapper input.error,
.input-wrapper select.error {
  border-color: #c45a2d;
  box-shadow: 0 0 0 3px rgba(196, 90, 45, 0.1);
}

/* Select wrapper */
.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ===== Submit Button ===== */
.form-actions {
  margin-top: 24px;
}

.form-actions button {
  width: 100%;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #c45a2d, #d4723f);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.15s ease, box-shadow 0.3s ease;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(196, 90, 45, 0.3);
}

.form-actions button:hover {
  background: linear-gradient(135deg, #b04e25, #c4633a);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196, 90, 45, 0.4);
}

.form-actions button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(196, 90, 45, 0.3);
}

/* ===== Dashed Divider ===== */
.dashed-divider {
  border-top: 2px dashed #d5d0c5;
  margin: 24px 0 16px;
}

/* ===== Card Footer ===== */
.card-footer {
  text-align: center;
  font-size: 0.84rem;
  color: #888;
}

.sign-in-link {
  color: #1a1a1a;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.sign-in-link:hover {
  color: #2c5f5b;
}

/* ===== Modal Overlay ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== Modal ===== */
.modal {
  background: #faf8f3;
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px 18px;
  border-bottom: 1px solid #e8e4db;
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1a1a1a;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #333;
}

/* Modal Body */
.modal-body {
  padding: 22px 28px;
}

/* Notice Box */
.notice-box {
  background: #fffbea;
  border: 1px solid #e6c54a;
  border-left: 4px solid #e6c54a;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 22px;
}

.notice-box p {
  font-size: 0.85rem;
  color: #7a6a2a;
  line-height: 1.5;
}

/* Info Table */
.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid #eae7df;
}

.info-table tr:last-child {
  border-bottom: none;
}

.info-table td {
  padding: 12px 4px;
  font-size: 0.88rem;
  vertical-align: top;
}

.info-label {
  font-weight: 700;
  color: #666;
  width: 130px;
  white-space: nowrap;
}

.info-value {
  color: #1a1a1a;
}

/* Modal Footer */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 28px 22px;
  border-top: 1px solid #e8e4db;
}

.btn-close,
.btn-confirm {
  padding: 10px 24px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-close {
  background: #fff;
  color: #555;
  border: 1.5px solid #d5d0c5;
}

.btn-close:hover {
  background: #f0ede5;
}

.btn-confirm {
  background: #333;
  color: #fff;
  border: none;
}

.btn-confirm:hover {
  background: #555;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .card {
    padding: 30px 24px;
    border-radius: 16px;
  }

  .form-row.three-col,
  .form-row.two-col {
    flex-direction: column;
    gap: 14px;
  }

  .bg-stripes {
    display: none;
  }

  .bg-circle {
    display: none;
  }

  .modal-body {
    padding: 16px 20px;
  }

  .modal-footer {
    padding: 14px 20px 18px;
  }

  .info-label {
    width: 110px;
  }
}