/*
  app.css - Clean Production
  Project: Eucerin Campaign Frontend
  Font: Kanit
  Structure:
  01 Settings / Variables
  02 Base / Reset
  03 Layout
  04 Navigation
  05 Components
  06 Forms / Upload / Search
  07 Tables / History
  08 Modals / Loading / Toast
  09 Pages
  10 Animations
  11 Responsive
*/

/* =========================================================
   01 Settings / Variables
========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --rose: #bf7e84;
  --rose-2: #a96f75;
  --red: #103347;
  --nav: #bd7f84;
  --blue: #003a5d;
  --text: #103347;
  --muted: #667085;
  --card: #fff;
  --line: #eee;
  --green: #06c755;
  --soft-rose: #fff7f8;
  --soft-border: #ead9dc;
  --shadow-sm: 0 4px 10px rgba(16, 24, 40, .07);
  --shadow-md: 0 8px 18px rgba(16, 24, 40, .12);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, .18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

/* =========================================================
   02 Base / Reset
========================================================= */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: 'Kanit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: #eee;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(235,235,235,.86)),
    radial-gradient(circle at 10% 0%, rgba(255,255,255,.95), transparent 35%),
    linear-gradient(120deg, transparent 0 42%, rgba(255,255,255,.55) 42% 54%, transparent 54%);
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.empty {
  padding: 30px 10px;
  color: var(--muted);
  text-align: center;
}

/* =========================================================
   03 Layout
========================================================= */
.app-shell {
  width: 100%;
  max-width: 768px;
  min-height: 100vh;
  margin: 0 auto;
  background: rgba(255,255,255,.2);
  box-shadow: 0 0 35px rgba(0,0,0,.08);
}

.app-main {
  padding: 38px 22px 56px;
}

.campaign-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16,24,40,.08);
}

.campaign-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 70% 20%, rgba(255,255,255,.28), transparent 28%),
    linear-gradient(180deg, transparent 70%, rgba(189,127,132,.12));
}

.campaign-hero::after {
  content: '';
  position: absolute;
  inset: -40% -70%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.18) 45%, rgba(255,255,255,.55) 50%, rgba(255,255,255,.18) 55%, transparent 65%);
  animation: heroShine 4.8s ease-in-out infinite;
}

.campaign-hero img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: center;
  animation: heroFloatZoom 7s ease-in-out infinite;
  will-change: transform, filter;
}

.home-full-banner {
  position: relative;
  width: 100%;
  margin: -18px auto 28px;
  overflow: hidden;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background: #fff;
  box-shadow: 0 12px 30px rgba(16,24,40,.12);
}

.home-full-banner img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.home-banner-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 46px 24px 20px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.92));
}

.home-banner-copy {
  max-width: 520px;
  margin: 0 auto;
  color: var(--blue);
  text-align: center;
  text-shadow: 0 1px 0 rgba(255,255,255,.65);
}

.home-banner-copy span {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(189,127,132,.16);
  color: #9b555f;
  font-size: 15px;
  font-weight: 900;
}

.home-banner-copy h1 {
  margin: 0;
  font-size: clamp(24px, 5.4vw, 44px);
  font-weight: 900;
  line-height: 1.05;
}

.home-banner-copy p {
  margin: 8px 0 0;
  color: #111;
  font-size: clamp(13px, 3vw, 18px);
  font-weight: 800;
}

/* =========================================================
   04 Navigation
========================================================= */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  padding: 10px 10px 12px;
  color: #fff;
  background: linear-gradient(135deg, #d9a2a6 0%, #bd7f84 48%, #9f666d 100%);
  box-shadow: 0 10px 24px rgba(110,58,65,.25);
}

.top-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 58%);
}

.top-nav .nav-item {
  position: relative;
  display: flex;
  min-height: 112px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 9px 6px;
  border-radius: 18px;
  font-weight: 800;
  line-height: 1.12;
  text-align: center;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.top-nav .nav-item::after {
  content: '';
  position: absolute;
  right: 20%;
  bottom: 7px;
  left: 20%;
  height: 3px;
  border-radius: 99px;
  background: rgba(255,255,255,0);
  transition: .18s;
}

.top-nav .nav-item:hover,
.top-nav .nav-item.active {
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24), 0 8px 18px rgba(70,30,40,.12);
  transform: translateY(-1px);
}

.top-nav .nav-item.active::after {
  background: #fff;
}

.top-nav .nav-ico,
.nav-ico-svg {
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  color: #fff;
  background: rgba(255,255,255,.08);
  box-shadow: 0 5px 14px rgba(96,44,53,.14);
}

.top-nav .nav-ico {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 18px;
  font-size: 38px;
  font-weight: 300;
  line-height: 1;
}

.top-nav-svg {
  gap: 8px;
  padding: 12px 12px 13px;
  background: linear-gradient(135deg, #d7a0a5 0%, #bd7f84 50%, #9f666d 100%);
}

.top-nav-svg .nav-item {
  min-height: 112px;
  border-radius: 20px;
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}

.top-nav-svg .nav-item.active,
.top-nav-svg .nav-item:hover {
  background: rgba(255,255,255,.22);
}

.nav-ico-svg {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: rgba(255,255,255,.10);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 8px 18px rgba(75,36,44,.18);
}

.nav-ico-svg svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #fff;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-ico-svg svg path:first-child[fill] {
  fill: none;
}

.top-nav .nav-doc { font-size: 32px; }
.top-nav .nav-user { font-size: 34px; }

.top-nav .nav-profile-img,
.nav-profile-badge {
  object-fit: cover;
  background: #fff;
}

.top-nav .nav-profile-img {
  width: 54px;
  height: 54px;
  margin-bottom: 8px;
  border: 3px solid rgba(255,255,255,.95);
  border-radius: 50%;
  box-shadow: 0 5px 16px rgba(70,30,40,.24);
}

.nav-profile-badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 25px;
  height: 25px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 3px 9px rgba(0,0,0,.24);
}

.nav-ico-profile.has-profile-photo {
  overflow: hidden;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  box-shadow: 0 8px 18px rgba(75,36,44,.20), 0 0 0 2px rgba(255,255,255,.58);
}

.nav-profile-photo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.nav-ico-profile.has-profile-photo svg,
.nav-profile-badge {
  display: none !important;
}

.top-nav-svg .nav-item.active .nav-ico-profile.has-profile-photo {
  box-shadow: 0 8px 18px rgba(75,36,44,.20), 0 0 0 3px #fff;
}

.top-nav .nav-text {
  display: grid;
  gap: 2px;
}

.top-nav b {
  font-size: 18px;
}

.top-nav small {
  font-size: 14px;
  font-weight: 700;
  opacity: .95;
}

/* =========================================================
   05 Components
========================================================= */
.page-title,
.section-title {
  margin: 0 0 28px;
  color: var(--blue);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.card {
  margin: 0 0 36px;
  padding: 34px 30px;
  border: 1px solid rgba(0,0,0,.05);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-md);
}

.content-box {
  font-size: 18px;
  line-height: 1.7;
}

.content-box img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 24px;
  border: 0;
  border-radius: 15px;
  appearance: none;
  font-family: inherit;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #bb8b90, #bc888d);
  box-shadow: 4px 5px 0 rgba(0,0,0,.28);
}

.btn-line {
  color: #fff;
  background: var(--green);
}

.btn-ghost {
  color: var(--red);
  background: #fff;
}

.btn-block {
  width: 100%;
}

/* =========================================================
   06 Forms / Upload / Search
========================================================= */
.form-group {
  min-width: 0;
  margin-bottom: 26px;
}

.label {
  display: block;
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 18px 20px;
  border: 0;
  border-radius: var(--radius-sm);
  outline: none;
  color: #fff;
  background: var(--nav);
  box-shadow: inset 0 3px 6px rgba(0,0,0,.18);
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
}

.input::placeholder,
.textarea::placeholder {
  color: #fff;
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  box-shadow: 0 0 0 4px rgba(189,127,132,.22), inset 0 3px 6px rgba(0,0,0,.18);
}

.input[type='date'] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.25;
}

.input[type='date']::-webkit-date-and-time-value {
  min-height: 1.25em;
  text-align: left;
}

.hint {
  color: var(--muted);
  font-size: 16px;
}

.upload-box {
  padding: 38px 18px;
  border: 3px dashed #cfd6df;
  border-radius: 0;
  color: #7b8794;
  background: #fff;
  text-align: center;
}

.upload-box b {
  color: #111;
  font-size: 18px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.preview-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: #eee;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 99px;
  color: #fff;
  background: #111;
}

.radio-row,
.radio-choice {
  display: flex;
  align-items: center;
}

.radio-row {
  gap: 16px;
  margin: 8px 0 22px;
  font-weight: 800;
}

.radio-dot {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--nav);
}

.radio-choice {
  gap: 16px;
  margin: 8px 0 10px;
  color: #111;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.radio-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-choice span {
  display: inline-block;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 2px solid var(--nav);
  border-radius: 50%;
  background: var(--nav);
  box-shadow: inset 0 0 0 8px var(--nav);
}

.radio-choice input:checked + span {
  background: #fff;
  box-shadow: inset 0 0 0 8px var(--nav);
}

.radio-choice.shop-radio {
  margin: 0;
  padding: 13px 12px;
  border: 1px solid var(--soft-border);
  border-radius: var(--radius-md);
  background: var(--soft-rose);
  box-shadow: var(--shadow-sm);
  transition: .18s ease;
}

.radio-choice.shop-radio:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(16,24,40,.10);
}

.radio-choice.shop-radio input:checked + span + b {
  color: #7a2630;
}

.radio-choice.shop-radio:has(input:checked) {
  border-color: var(--nav);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(189,127,132,.16), 0 8px 16px rgba(16,24,40,.10);
}

.shop-radio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-shop-grid {
  margin-top: 8px;
}

.quick-shop-grid .shop-radio b {
  font-size: 16px;
  line-height: 1.25;
}

.search-select-wrap,
.google-branch-wrap {
  position: relative;
}

.search-select-wrap::after {
  content: '⌕';
  position: absolute;
  top: 50%;
  right: 18px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  pointer-events: none;
  transform: translateY(-50%);
}

.search-input {
  padding-right: 58px;
}

.google-branch-wrap {
  z-index: 40;
}

.google-branch-wrap::after {
  content: '⌕';
  position: absolute;
  top: 16px;
  right: 20px;
  color: var(--nav);
  font-size: 28px;
  font-weight: 900;
  pointer-events: none;
}

.google-branch-input {
  padding: 18px 54px 18px 22px !important;
  border: 2px solid rgba(189,127,132,.55) !important;
  border-radius: 18px !important;
  color: #111 !important;
  background: #fff !important;
  box-shadow: 0 6px 18px rgba(0,0,0,.08) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
}

.google-branch-input::placeholder {
  color: #777 !important;
}

.google-branch-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 80;
  display: none;
  max-height: 310px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.google-branch-wrap.open .google-branch-panel {
  display: block;
}

.google-branch-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: 13px;
  color: #111;
  background: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.google-branch-item:hover,
.google-branch-item.active {
  background: #f7e8ea;
}

.branch-pin {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--nav);
  background: #f2dadd;
  font-weight: 900;
}

.branch-name {
  display: block;
  line-height: 1.25;
}

.google-branch-empty {
  padding: 16px 14px;
  color: #777;
  font-weight: 700;
  text-align: center;
}

.accept-box {
  margin: 0 0 26px;
  padding: 16px 18px;
  border: 1px solid #efd4d8;
  border-radius: 18px;
  background: var(--soft-rose);
  box-shadow: 0 6px 16px rgba(189,127,132,.10);
}

.accept-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 8px 0;
  color: #111;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
}

.accept-row input {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--nav);
}

.accept-row input[readonly] {
  pointer-events: none;
}

.accept-row .link-btn,
.link-btn {
  padding: 0;
  border: 0;
  color: var(--red);
  background: transparent;
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.mt8 {
  margin-top: 8px;
}

/* =========================================================
   07 Tables / History
========================================================= */
.table-wrap {
  overflow: auto;
  border: 8px solid rgba(255,255,255,.95);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 16px rgba(0,0,0,.14);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 16px 14px;
  border: 1px solid #ddd;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}

th {
  color: #fff;
  background: var(--nav);
  font-weight: 800;
}

.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
}

.badge-upload {
  color: #8a5b00;
  background: #fff5cf;
}

.badge-approved {
  color: #137333;
  background: #e7f8ed;
}

.badge-rejected {
  color: #b42318;
  background: #fde8e8;
}

.receipt-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  border: 6px solid rgba(255,255,255,.95) !important;
  border-radius: 18px !important;
}

.receipt-table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  border-collapse: collapse;
}

.receipt-table th,
.receipt-table td {
  padding: 10px 6px;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  text-align: center;
  vertical-align: middle;
  font-size: clamp(10px, 2.1vw, 14px);
  line-height: 1.35;
}

.receipt-table th {
  font-weight: 900;
}

.receipt-table th:nth-child(1),
.receipt-table td:nth-child(1) { width: 22%; }
.receipt-table th:nth-child(2),
.receipt-table td:nth-child(2) { width: 17%; }
.receipt-table th:nth-child(3),
.receipt-table td:nth-child(3) { width: 22%; }
.receipt-table th:nth-child(4),
.receipt-table td:nth-child(4) { width: 15%; }
.receipt-table th:nth-child(5),
.receipt-table td:nth-child(5) { width: 10%; }
.receipt-table th:nth-child(6),
.receipt-table td:nth-child(6) { width: 14%; }

.receipt-table .badge {
  display: inline-block;
  max-width: 100%;
  padding: 5px 7px;
  border-radius: 999px;
  font-size: clamp(9px, 2vw, 12px);
  white-space: normal;
}

.history-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 8px;
}

.pager-btn,
.pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--soft-border);
  border-radius: 999px;
  color: #7a4b52;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-weight: 900;
}

.pager-num.active {
  color: #fff;
  border-color: var(--nav);
  background: var(--nav);
}

.pager-btn.disabled {
  opacity: .45;
  pointer-events: none;
}

.pager-note {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

/* =========================================================
   08 Modals / Loading / Toast
========================================================= */
body.modal-open {
  overflow: hidden;
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
  text-align: center;
}

.loading-card {
  width: min(86vw, 340px);
  padding: 34px 28px;
  border: 1px solid rgba(189,127,132,.18);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(58,31,36,.22);
}

.loader {
  width: 46px;
  height: 46px;
  margin: 12px auto;
  border: 5px solid #e7c0c4;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.internet-loader {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  height: 46px;
}

.internet-loader span {
  display: block;
  width: 10px;
  border-radius: 99px;
  background: linear-gradient(180deg, #c8003a, var(--nav));
  animation: netbar .9s ease-in-out infinite;
}

.internet-loader span:nth-child(1) { height: 16px; animation-delay: 0s; }
.internet-loader span:nth-child(2) { height: 28px; animation-delay: .12s; }
.internet-loader span:nth-child(3) { height: 40px; animation-delay: .24s; }

.loading p {
  margin: 8px 0 4px;
  color: var(--blue);
  font-size: 18px;
  font-weight: 800;
}

.loading small {
  color: var(--muted);
  font-weight: 600;
}

.offline-bar {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 130;
  max-width: 92%;
  padding: 10px 16px;
  border-radius: 99px;
  color: #fff;
  background: #b42318;
  box-shadow: 0 10px 24px rgba(0,0,0,.2);
  font-weight: 800;
  text-align: center;
  transform: translateX(-50%);
}

.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  z-index: 120;
  max-width: 90%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: #fff;
  background: #111;
  box-shadow: 0 12px 26px rgba(0,0,0,.25);
  transform: translateX(-50%);
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.app-modal.hidden {
  display: none !important;
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.48);
  backdrop-filter: blur(3px);
}

.app-modal-card {
  position: relative;
  width: min(92vw, 680px);
  max-height: 86vh;
  overflow: auto;
  padding: 34px 30px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 26px 70px rgba(0,0,0,.28);
  animation: modalPop .18s ease-out;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #9f666d;
  background: #f6e6e8;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.policy-modal-card h2,
.success-modal-card h2 {
  margin: 0 46px 15px 0;
  color: var(--blue);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.2;
}

.policy-content {
  max-height: 56vh;
  overflow: auto;
  padding: 14px 10px;
  border: 1px solid #f0e1e3;
  border-radius: var(--radius-md);
  color: #111;
  background: #fff;
  font-size: 16px;
  line-height: 1.75;
}

.policy-content img {
  max-width: 100%;
  height: auto;
}

.modal-ok {
  margin-top: 20px;
  padding: 15px 20px;
  font-size: 22px;
}

.success-modal-card {
  width: min(92vw, 620px);
  padding: 46px 34px 38px;
  text-align: center;
}

.success-check {
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  margin: 0 auto 24px;
  border: 16px solid var(--nav);
  border-radius: 50%;
  color: var(--nav);
  font-size: 100px;
  font-weight: 900;
  line-height: 1;
}

.success-modal-card h2 {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 46px;
  letter-spacing: 1px;
}

.success-modal-card p {
  margin: 0 0 28px;
  color: #111;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.45;
}

/* =========================================================
   09 Pages
========================================================= */
.register-card {
  overflow: hidden;
  padding: 34px 28px;
}

.receipt-example {
  display: block;
  width: 70%;
  max-width: 360px;
  margin: 20px auto;
  border-radius: 0;
}

.home-actions,
.home-welcome-card {
  margin-top: 34px;
}

.thanks-card {
  padding: 64px 36px;
  text-align: center;
}

.thanks-check {
  color: var(--nav);
  font-size: 170px;
  line-height: 1;
}

.thanks-card h1 {
  margin: 20px 0;
  color: var(--blue);
  font-size: 48px;
}

.thanks-card p {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.45;
}

.profile-head {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 42px 30px 36px;
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  text-align: center;
}

.profile-head::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% -10%, rgba(189,127,132,.20), transparent 45%);
}

.profile-head > * {
  position: relative;
}

.profile-avatar {
  display: block;
  width: 128px;
  height: 128px;
  margin: 0 auto 18px;
  border: 6px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
  box-shadow: 0 14px 30px rgba(123,64,72,.24);
}

.profile-name {
  margin: 0 0 22px;
  color: #111;
  font-size: 32px;
  font-weight: 800;
}

.profile-subtitle {
  margin: 0 0 10px;
  color: #111;
  font-size: 22px;
}

.profile-note {
  margin-top: 18px;
  color: #111;
  font-size: 20px;
}

.profile-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 440px;
  margin: 22px auto 0;
}

.profile-meta .meta-box {
  padding: 10px 12px;
  border: 1px solid #efd4d8;
  border-radius: 14px;
  color: #6b3c43;
  background: #f8eef0;
  font-weight: 700;
}

.profile-meta small {
  display: block;
  color: #8a6066;
  font-size: 12px;
  font-weight: 600;
}

.page-title.profile-title {
  margin-bottom: 24px;
}

.right-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  margin: 8px auto;
  padding: 12px 28px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(180deg, #c98d93, #b5757c);
  box-shadow: 0 10px 18px rgba(130,62,72,.20);
  font-size: 34px;
  font-weight: 700;
}

.right-pill .js-count-right {
  display: inline-block;
  min-width: 1ch;
}

.campaign-status-page {
  padding: 30px 14px 70px;
}

.status-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 34px 20px;
  border: 1px solid rgba(185,124,124,.18);
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 28px rgba(16,24,40,.12);
  text-align: center;
}

.status-card .status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  margin: 0 auto 18px;
  border-radius: 999px;
  color: var(--nav);
  background: #f7e9ea;
  font-size: 56px;
  font-weight: 900;
}

.status-card h1 {
  margin: 0 0 12px;
  color: #00345a;
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 900;
  line-height: 1.2;
}

.status-card p {
  max-width: 430px;
  margin: 0 auto 18px;
  color: #111;
  font-size: clamp(16px, 3.4vw, 22px);
  font-weight: 800;
  line-height: 1.55;
}

.status-card .btn {
  max-width: 440px;
  margin: 0 auto;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 24px;
  padding: 12px 18px;
  border: 1px solid var(--soft-border);
  border-radius: 16px;
  color: #7a4b52;
  background: #fff0f2;
  font-size: clamp(15px, 3.2vw, 20px);
  font-weight: 900;
}

/* =========================================================
   10 Animations
========================================================= */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes netbar {
  0%, 100% {
    opacity: .45;
    transform: scaleY(.65);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes heroFloatZoom {
  0%, 100% {
    transform: scale(1) translateY(0);
    filter: saturate(1);
  }
  50% {
    transform: scale(1.018) translateY(-3px);
    filter: saturate(1.06);
  }
}

@keyframes heroShine {
  0%, 38% {
    opacity: 0;
    transform: translateX(-55%);
  }
  50% {
    opacity: .95;
  }
  70%, 100% {
    opacity: 0;
    transform: translateX(55%);
  }
}

/* =========================================================
   11 Responsive
========================================================= */
@media (prefers-reduced-motion: reduce) {
  .campaign-hero img,
  .campaign-hero::after {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .receipt-table-wrap {
    width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 5px solid rgba(255,255,255,.95) !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 6px 14px rgba(0,0,0,.10) !important;
  }

  .receipt-table,
  .receipt-table thead,
  .receipt-table tbody {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  .receipt-table thead { display: table-header-group !important; }
  .receipt-table tbody { display: table-row-group !important; }

  .receipt-table tr {
    display: table-row !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .receipt-table th,
  .receipt-table td {
    display: table-cell !important;
    width: auto !important;
    padding: 6px 2px !important;
    border: 1px solid #ddd !important;
    border-bottom: 1px solid #ddd !important;
    font-size: clamp(7.5px, 1.85vw, 10.5px) !important;
    line-height: 1.22 !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  .receipt-table td::before {
    content: none !important;
    display: none !important;
  }

  .receipt-table .badge {
    padding: 3px 4px !important;
    font-size: clamp(7px, 1.75vw, 9.5px) !important;
    white-space: normal !important;
    justify-self: auto !important;
  }
}

@media (max-width: 520px) {
  .app-main {
    padding: 26px 12px 40px;
  }

  .top-nav,
  .top-nav-svg {
    padding: 7px 6px 8px;
  }

  .top-nav-svg { gap: 4px; }

  .top-nav .nav-item,
  .top-nav-svg .nav-item {
    min-height: 76px;
    padding: 5px 2px;
    border-radius: 12px;
  }

  .top-nav .nav-ico {
    width: 33px;
    height: 33px;
    margin-bottom: 4px;
    border-radius: 11px;
    font-size: 24px;
  }

  .nav-ico-svg {
    width: 34px;
    height: 34px;
    margin-bottom: 4px;
    border-radius: 11px;
  }

  .nav-ico-svg svg {
    width: 22px;
    height: 22px;
    stroke-width: 3.2;
  }

  .nav-ico-profile.has-profile-photo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
  }

  .nav-profile-badge {
    right: -3px;
    bottom: -3px;
    width: 17px;
    height: 17px;
    border-width: 1.5px;
  }

  .top-nav .nav-doc { font-size: 21px; }
  .top-nav .nav-user { font-size: 22px; }

  .top-nav .nav-profile-img {
    width: 36px;
    height: 36px;
    margin-bottom: 4px;
    border-width: 2px;
  }

  .top-nav b,
  .top-nav-svg b {
    font-size: 11px;
  }

  .top-nav small {
    font-size: 10px;
  }

  .top-nav-svg small {
    font-size: 9px;
  }

  .page-title,
  .section-title {
    margin-bottom: 20px;
    font-size: 26px;
  }

  .card {
    margin-bottom: 28px;
    padding: 24px 20px;
    border-radius: 8px;
  }

  .label { font-size: 15px; }

  .input,
  .select,
  .textarea {
    padding: 14px;
    border-radius: 7px;
    font-size: 16px;
  }

  .btn {
    padding: 18px 16px;
    font-size: 22px;
  }

  .preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .radio-choice {
    font-size: 15px;
  }

  .radio-choice span {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
  }

  .shop-radio-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .radio-choice.shop-radio {
    padding: 11px 10px;
  }

  .quick-shop-grid .shop-radio b {
    font-size: 14px;
  }

  .google-branch-input {
    padding: 15px 48px 15px 16px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
  }

  .google-branch-wrap::after {
    top: 12px;
    right: 16px;
  }

  .google-branch-panel {
    max-height: 260px;
    border-radius: 14px;
  }

  .google-branch-item {
    padding: 12px;
    font-size: 15px;
  }

  .branch-pin {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
  }

  .home-full-banner {
    width: calc(100% + 8px);
    margin: -10px -4px 24px;
    border-radius: 0 0 18px 18px;
  }

  .home-banner-overlay {
    padding: 34px 14px 14px;
  }

  .receipt-table-wrap {
    width: calc(100% + 16px);
    margin-right: -8px;
    margin-left: -8px;
  }

  .receipt-table th,
  .receipt-table td {
    padding: 8px 3px;
    font-size: 10.5px;
  }

  .receipt-table th:nth-child(1),
  .receipt-table td:nth-child(1) { width: 24%; }
  .receipt-table th:nth-child(2),
  .receipt-table td:nth-child(2) { width: 18%; }
  .receipt-table th:nth-child(3),
  .receipt-table td:nth-child(3) { width: 22%; }
  .receipt-table th:nth-child(4),
  .receipt-table td:nth-child(4) { width: 14%; }
  .receipt-table th:nth-child(5),
  .receipt-table td:nth-child(5) { width: 8%; }
  .receipt-table th:nth-child(6),
  .receipt-table td:nth-child(6) { width: 14%; }

  .app-modal {
    padding: 14px;
  }

  .app-modal-card {
    padding: 28px 20px;
    border-radius: 18px;
  }

  .policy-modal-card h2 {
    font-size: 23px;
  }

  .policy-content {
    max-height: 58vh;
    font-size: 14px;
  }

  .accept-row {
    font-size: 14px;
  }

  .modal-ok {
    font-size: 18px;
  }

  .success-check {
    width: 110px;
    height: 110px;
    border-width: 12px;
    font-size: 74px;
  }

  .success-modal-card h2 {
    font-size: 34px;
  }

  .success-modal-card p {
    font-size: 18px;
  }

  .thanks-check {
    font-size: 120px;
  }

  .thanks-card h1 {
    font-size: 38px;
  }

  .thanks-card p {
    font-size: 20px;
  }

  .right-pill {
    font-size: 28px;
  }

  .receipt-example {
    width: 86%;
  }

  .profile-head {
    padding: 28px 18px;
    border-radius: 14px;
  }

  .profile-avatar {
    width: 96px;
    height: 96px;
  }

  .profile-name {
    font-size: 24px;
  }

  .profile-subtitle {
    font-size: 17px;
  }

  .profile-note {
    font-size: 16px;
  }

  .profile-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .campaign-status-page {
    padding: 22px 10px 60px;
  }

  .status-card {
    padding: 28px 14px;
    border-radius: 18px;
  }

  .status-card .status-icon {
    width: 86px;
    height: 86px;
    font-size: 46px;
  }
}

/* =========================================================
   Receipt member inputs
========================================================= */
.member-receipt-box {
  margin: 0 0 28px;
  padding: 20px 18px 4px;
  border: 1px solid var(--soft-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff, var(--soft-rose));
  box-shadow: var(--shadow-sm);
}

.member-receipt-box .form-group {
  margin-bottom: 18px;
}

.member-receipt-box .input[readonly] {
  opacity: 1;
  cursor: default;
  color: #fff;
  background: var(--nav);
  -webkit-text-fill-color: #fff;
}

.member-receipt-box .input[readonly]:focus {
  box-shadow: inset 0 3px 6px rgba(0,0,0,.18);
}

@media (max-width: 520px) {
  .member-receipt-box {
    padding: 16px 14px 2px;
    border-radius: 12px;
  }
}


/* Purchase channel: project นี้ปิด Store/Branch search และใช้ 2 ช่องทาง EVEANDBOY */
.purchase-channel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.purchase-channel-card {
  align-items: flex-start;
  min-height: 104px;
  padding: 16px 14px !important;
}

.purchase-channel-card b,
.purchase-channel-card small {
  display: block;
}

.purchase-channel-card b {
  font-size: 17px;
  line-height: 1.25;
}

.purchase-channel-card small {
  margin-top: 3px;
  color: #6b3c43;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 520px) {
  .purchase-channel-grid {
    grid-template-columns: 1fr;
  }
  .purchase-channel-card {
    min-height: auto;
  }
}

/* =========================================================
   Android camera/gallery upload improvements
========================================================= */
.receipt-upload-box {
  border-radius: 18px;
  border-color: #ead9dc;
  background: #fffafa;
}

.upload-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 10px;
}

.upload-action-btn {
  display: flex;
  min-height: 104px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 10px;
  border: 1px solid var(--soft-border);
  border-radius: 18px;
  color: #6b3c43;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-family: inherit;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.upload-action-btn:hover,
.upload-action-btn:active {
  border-color: var(--nav);
  box-shadow: 0 10px 22px rgba(189,127,132,.18);
  transform: translateY(-1px);
}

.upload-action-btn span {
  font-size: 30px;
  line-height: 1;
}

.upload-action-btn b {
  color: #7a2630;
  font-size: 17px;
  font-weight: 900;
}

.upload-action-btn small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hidden-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.upload-count-note {
  margin: 10px 0 4px;
  color: #7a4b52;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.preview-file-box {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 10px;
  color: #7a4b52;
  background: #f7e8ea;
  font-weight: 900;
  text-align: center;
}

.preview-file-box small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 520px) {
  .upload-action-grid {
    grid-template-columns: 1fr;
  }

  .upload-action-btn {
    min-height: 86px;
  }
}

/* =========================================================
   Android / iPhone smart upload chooser
========================================================= */
.upload-action-grid-single {
  grid-template-columns: 1fr;
}

.upload-main-btn {
  min-height: 96px;
  background: linear-gradient(180deg, #fff, #fff7f8);
}

.upload-sheet.hidden {
  display: none !important;
}

.upload-sheet {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.upload-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
}

.upload-sheet-card {
  position: relative;
  width: min(100%, 520px);
  padding: 22px 18px 18px;
  border-radius: 26px 26px 18px 18px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(0,0,0,.30);
  animation: uploadSheetUp .18s ease-out;
}

.upload-sheet-card h3 {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.upload-sheet-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.upload-sheet-option,
.upload-sheet-cancel {
  width: 100%;
  border: 0;
  border-radius: 18px;
  font-family: inherit;
  cursor: pointer;
}

.upload-sheet-option {
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 12px;
  align-items: center;
  margin: 10px 0;
  padding: 14px;
  color: #111;
  background: #fff7f8;
  box-shadow: inset 0 0 0 1px var(--soft-border);
  text-align: left;
}

.upload-sheet-option span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #fff;
  font-size: 26px;
  box-shadow: var(--shadow-sm);
}

.upload-sheet-option b {
  color: #7a2630;
  font-size: 17px;
  font-weight: 900;
}

.upload-sheet-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.upload-sheet-cancel {
  margin-top: 8px;
  padding: 14px;
  color: #7a4b52;
  background: #f2f2f2;
  font-size: 16px;
  font-weight: 900;
}

@keyframes uploadSheetUp {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
