:root {
  --bg1: #e6f7ec;
  --bg2: #f0faf4;
  --card: #ffffff;
  --text: #333333;
  --muted: #676767;
  --line: #e5e7eb;
  --primary: #00B14F;
  /* เขียว Grab */
  --primary2: #008f3f;
  /* เขียวเข้ม */
  --shadow: 0 8px 30px rgba(0, 177, 79, .10);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Thai", "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 500px at 20% 0%, var(--bg1), transparent 60%),
    radial-gradient(1200px 600px at 80% 20%, var(--bg2), transparent 60%),
    #f6f9ff;
}

.page {
  min-height: 100vh;
}

.brandbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, .7);
  border-bottom: 1px solid rgba(229, 231, 235, .7);
}

.brand {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary2), var(--primary));
  box-shadow: 0 10px 24px rgba(0, 177, 79, .22);
}

.brandName {
  font-weight: 800;
  font-size: 16px;
  line-height: 1.1;
}

.brandTag {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.wrap {
  max-width: 980px;
  margin: 18px auto 40px;
  padding: 0 14px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(229, 231, 235, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -.2px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 650;
  font-size: 13px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 12px;
  outline: none;
  font-size: 14px;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(0, 177, 79, .7);
  box-shadow: 0 0 0 4px rgba(0, 177, 79, .14);
  background: #fff;
}

.section {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(229, 231, 235, .9);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 252, .8), rgba(255, 255, 255, .9));
}

.sectionTitle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  margin-bottom: 6px;
}

.sectionSubTitle {
  margin-top: 10px;
  font-weight: 800;
  color: #0b1220;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary2), var(--primary));
  box-shadow: 0 6px 14px rgba(0, 177, 79, .2);
}

.row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 10px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn2,
.btnPrimary {
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  width: 100%;
}

.btn2 {
  background: linear-gradient(135deg, #0b1220, #1f2937);
  color: #fff;
}

.btnPrimary {
  margin-top: 14px;
  background: linear-gradient(135deg, var(--primary2), var(--primary));
  color: #fff;
  box-shadow: 0 16px 34px rgba(0, 177, 79, .22);
}

.btnPrimary:active {
  transform: translateY(1px);
}

.chkrow {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.chkrow input {
  width: 18px;
  height: 18px;
}

.hr {
  border: 0;
  border-top: 1px solid rgba(229, 231, 235, .9);
  margin: 16px 0 10px;
}

.msg {
  margin-top: 12px;
}

.ok {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(22, 163, 74, .08);
  border: 1px solid rgba(22, 163, 74, .18);
  color: #065f46;
  font-weight: 700;
}

.err {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .18);
  color: #7f1d1d;
  font-weight: 700;
}

/* MAP */
.mapWrap {
  margin-top: 10px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, .9);
  background: #fff;
}

#map {
  width: 100%;
  height: 320px;
  display: block;
}

/* Select2 ให้เข้าธีม */
.select2-container--default .select2-selection--single {
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f8fafc;
  display: flex;
  align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 12px;
  padding-right: 34px;
  line-height: 44px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 44px;
  right: 10px;
}

.select2-container--default .select2-selection--single:focus {
  outline: none;
}

.select2-dropdown {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.select2-search__field {
  border-radius: 12px !important;
}

/* Image preview */
.imgPreview {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.imgItem {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, .9);
  background: #fff;
}

.imgItem img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.imgRemove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(15, 23, 42, .75);
  color: #fff;
  font-weight: 900;
  line-height: 28px;
}

@media (max-width: 560px) {
  .card {
    padding: 14px;
  }

  #map {
    height: 260px;
  }

  .grid2 {
    grid-template-columns: 1fr;
  }

  .imgPreview {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* schedule rows */
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.row3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

@media (max-width:640px) {
  .row2 {
    grid-template-columns: 1fr 1fr;
  }

  .row3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* ให้ select2 ในแถว schedule สูงเท่า input และไม่ตัดข้อความแปลกๆ */
.select2-container .select2-selection--single {
  height: 44px;
  border: 1px solid #ddd;
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  box-sizing: border-box;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 44px;
  padding-left: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 44px;
  right: 10px;
}