/* ====== ECU • EDD Auth (full page) ====== */

:root{
  --ecu-bg: #ffffff;
  --ecu-text: #0f172a;
  --ecu-muted: #6b7280;
  --ecu-border: #e5e7eb;
  --ecu-primary: #2563eb;
  --ecu-primary-600:#1d4ed8;
  --ecu-ring: rgba(37,99,235,.35);
  --ecu-radius: 14px;
}

/* พื้นหลังหน้าฟอร์มให้นิ่ง */
body.ecu-auth-page{
  background: #f8fafc;
}

/* คอนเทนเนอร์กลางจอ */
.ecu-auth-wrap{
  /* min-height: calc(100svh - 120px);  กันช่วง header/footer */
 /* display: grid;*/
  place-items: center;
  padding: clamp(16px, 3vw, 32px);
}

/* การ์ด */
.ecu-card{
  width: min(420px, 92vw);
  background: var(--ecu-bg);
  color: var(--ecu-text);
  border: 1px solid var(--ecu-border);
  border-radius: var(--ecu-radius);
  box-shadow: 0 12px 30px rgba(2,6,23,.08);
  padding: clamp(16px, 2.5vw, 28px);
}

/* หัวเรื่อง/คำโปรย */
.ecu-card h1{
  margin: 0 0 .25rem;
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 800;
  letter-spacing: .2px;
}
.ecu-card p.ecu-sub{
  margin: 0 0 1rem;
  color: var(--ecu-muted);
}

/* ฟอร์ม EDD */
.ecu-form{
  display: grid;
  gap: 14px;
}

.ecu-row{
  display: grid; gap: 6px;
}

.ecu-row label{
  font-size: 13px; color: var(--ecu-muted);
}

.ecu-input,
.ecu-form input[type="text"],
.ecu-form input[type="email"],
.ecu-form input[type="password"]{
  width: 100%;
  border: 1px solid var(--ecu-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--ecu-text);
  outline: none;
  transition: box-shadow .18s, border-color .18s;
}
.ecu-form input:focus{
  border-color: var(--ecu-primary);
  box-shadow: 0 0 0 4px var(--ecu-ring);
}

/* checkbox/remember */
.ecu-inline{
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
}
.ecu-check{ display: inline-flex; gap: 8px; align-items: center; color: var(--ecu-muted); font-size: 13px; }
.ecu-check input{ width: 16px; height: 16px; }

/* ปุ่ม */
.ecu-btn{
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%; height: 42px;
  border: 1px solid var(--ecu-border);
  border-radius: 10px;
  background: #f3f4f6; color: #111827;
  font-weight: 600; cursor: pointer;
  transition: background .18s, border-color .18s, transform .06s ease;
}
.ecu-btn:active{ transform: translateY(1px); }
.ecu-btn:hover{ background: #eef2ff; border-color: #dbeafe; }

.ecu-btn--primary{
  background: var(--ecu-primary); color: #fff; border-color: var(--ecu-primary);
}
.ecu-btn--primary:hover{ background: var(--ecu-primary-600); border-color: var(--ecu-primary-600); }

/* ลิงก์ */
.ecu-link{ color: var(--ecu-primary); text-decoration: none; }
.ecu-link:hover{ text-decoration: underline; }

/* ข้อความแจ้งเตือนจาก EDD */
.ecu-alert,
.edd_errors,
.edd_success{
  margin: 8px 0 0;
  font-size: 13px;
}
.edd_errors{ color: #b91c1c; }
.edd_success{ color: #065f46; }

/* ทำให้คอมโพเนนต์ EDD ดิบๆ ดูตามธีม */
.edd_form fieldset, .edd_form legend{ border:0; margin:0; padding:0; }
.edd_form p, .edd_form .edd-description{ margin:0; color:var(--ecu-muted); font-size:.9rem; }
.edd_form input[type="text"],
.edd_form input[type="email"],
.edd_form input[type="password"]{ @supports not (selector(:has(*))){} } /* no-op: กัน build บางตัว */

/* ป้องกัน scrollbar เกิน */
.ecu-card{ overflow: hidden; }

