:root{
  --purple:#534AB7;
  --purple-dark:#3C3489;
  --purple-light:#EEEDFE;
  --purple-soft:#CECBF6;
  --purple-soft-hover:#AFA9EC;
  --gray-bg:#F1EFE8;
  --gray-fill:#D3D1C7;
  --text-main:#26211C;
  --text-muted:#8A8880;
  --border:#E4E1D6;
  --white:#FFFFFF;
  --danger:#C0392B;
}
*{box-sizing:border-box;}
body{
  margin:0;
  font-family:'Sarabun', sans-serif;
  background:var(--gray-bg);
  color:var(--text-main);
  min-height:100vh;
}
.page{
  max-width:480px;
  margin:0 auto;
  min-height:100vh;
  background:var(--white);
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:2rem 1.25rem 3rem;
  position:relative;
}

.logo-box{
  width:100%;
  max-width:340px;
  aspect-ratio:3/1;
  border-radius:8px;
  background:var(--purple-light);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex-shrink:0;
}
.logo-box img{ width:100%; height:100%; object-fit:contain; }
.logo-box span{ font-size:12px; color:var(--purple-dark); font-weight:600; }
.logo-box.small{ max-width:340px; }

.login-card{
  width:100%;
  max-width:340px;
  margin-top:2.5rem;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}
.login-title{ font-size:19px; font-weight:600; margin:14px 0 2px; }
.login-sub{ font-size:13px; color:var(--text-muted); margin:0 0 20px; }

.field{
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--border);
  border-radius:8px;
  padding:0 12px;
  height:44px;
  margin-bottom:12px;
}
.field input{
  border:none; outline:none; flex:1;
  font-size:15px; font-family:inherit; background:transparent; color:var(--text-main);
}

.btn{
  width:100%; height:44px; border-radius:8px; border:none;
  background:var(--purple-soft); color:var(--purple-dark);
  font-size:15px; font-weight:600; font-family:inherit; cursor:pointer; margin-top:6px;
}
.btn:hover{ background:var(--purple-soft-hover); }
.btn.secondary{ background:var(--white); color:var(--text-main); border:1px solid var(--border); }
.btn.secondary:hover{ background:var(--gray-bg); }
.btn.small{ height:36px; font-size:13px; width:auto; padding:0 16px; }

.error-msg{ color:var(--danger); font-size:13px; margin:-4px 0 10px; min-height:16px; }
.save-msg{ font-size:13px; color:var(--purple-dark); margin-top:8px; min-height:16px; }

.admin-entry-btn{
  position:fixed; left:14px; bottom:14px;
  background:none; border:none; color:var(--white);
  font-size:12px; font-family:inherit; cursor:pointer; padding:6px 8px; z-index:10;
  text-decoration:none;
}

.member-header{ display:flex; flex-direction:column; align-items:center; gap:4px; margin-bottom:1.5rem; }
.member-caption{ font-size:12.5px; color:var(--text-muted); text-align:center; max-width:300px; }

.main-image-frame{
  width:280px; max-height:70vh;
  background:var(--gray-bg); border-radius:12px;
  display:flex; align-items:center; justify-content:center; overflow:hidden; margin-bottom:1.5rem;
}
.main-image-frame img{ width:100%; height:100%; object-fit:contain; }
.placeholder-icon{ color:var(--gray-fill); }

.banners{
  width:280px;
  display:flex; flex-direction:column; border-radius:8px; overflow:hidden; line-height:0;
}
.banner-item{ width:100%; aspect-ratio:3/1; background:var(--gray-bg); display:block; cursor:pointer; }
.banner-item img{ width:100%; height:100%; object-fit:contain; display:block; }
.banner-item.no-link{ cursor:default; }

.logout-row{ margin-top:2rem; }

.admin-wrap{ width:100%; max-width:420px; display:flex; flex-direction:column; gap:1.5rem; }
.admin-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:0.5rem; }
.admin-header h2{ font-size:17px; font-weight:600; margin:0; }

.tabs{ display:flex; gap:0; border-bottom:1px solid var(--border); margin-bottom:0.5rem; }
.tab-btn{
  flex:1; background:none; border:none; font-family:inherit; font-size:14px; font-weight:600;
  color:var(--text-muted); padding:10px 0; cursor:pointer; border-bottom:2px solid transparent;
}
.tab-btn.active{ color:var(--purple); border-bottom-color:var(--purple); }
.tab-panel.hidden{ display:none; }
.tab-panel{ display:flex; flex-direction:column; gap:1.5rem; }

.section{ border:1px solid var(--border); border-radius:12px; padding:16px; }
.section h3{ font-size:14px; font-weight:600; margin:0 0 12px; }

.upload-zone{
  border:1.5px dashed var(--border); border-radius:8px; padding:12px; text-align:center;
  cursor:pointer; background:var(--gray-bg);
}
.upload-hint{ font-size:12px; color:var(--text-muted); }
.upload-zone.logo-zone, .upload-zone.banner-zone{
  aspect-ratio:3/1; display:flex; align-items:center; justify-content:center; flex-direction:column;
}
.upload-zone.logo-zone img, .upload-zone.banner-zone img{ width:100%; height:100%; object-fit:contain; }
.upload-zone.main-zone{ min-height:140px; display:flex; align-items:center; justify-content:center; flex-direction:column; }
.upload-zone.main-zone img{ max-width:100%; max-height:220px; object-fit:contain; }

label.small-label{ font-size:12.5px; color:var(--text-muted); display:block; margin:12px 0 6px; }
.banner-block{ border-top:1px solid var(--border); padding-top:14px; margin-top:14px; }
.banner-block:first-child{ border-top:none; padding-top:0; margin-top:0; }

select{
  width:100%; height:40px; border-radius:8px; border:1px solid var(--border);
  font-family:inherit; font-size:14px; padding:0 10px; background:var(--white); color:var(--text-main);
}
input[type=text], input[type=tel], input[type=password], textarea{
  width:100%; border:1px solid var(--border); border-radius:8px; padding:8px 10px;
  font-family:inherit; font-size:14px; color:var(--text-main);
}
textarea{ resize:vertical; min-height:50px; }
.file-input-hidden{ display:none; }