:root {
  --ink: #102021;
  --muted: #647575;
  --line: #dce5e2;
  --paper: #fffdf8;
  --soft: #f4f0e6;
  --teal: #0c5f61;
  --dark: #123537;
  --gold: #e6ad30;
  --coral: #d9654f;
  --green: #367b4a;
  --shadow: 0 22px 70px rgba(12, 32, 33, 0.14);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.member-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  display: block;
  flex: 0 0 auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(12, 59, 62, 0.14);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.member-header nav {
  display: flex;
  gap: 18px;
  color: #385151;
  font-size: 14px;
  font-weight: 750;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.38fr);
  gap: 26px;
  align-items: end;
  padding: 70px clamp(18px, 5vw, 70px) 42px;
  background:
    linear-gradient(90deg, rgba(16, 35, 36, 0.92), rgba(12, 95, 97, 0.6)),
    url("../assets/hero-business-malaysia.png") center/cover;
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-hero .eyebrow {
  color: #f8cc72;
}

.dashboard-hero h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1;
  letter-spacing: 0;
}

.dashboard-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.72;
}

.login-card,
.form-section,
.metric-card,
.phone-preview,
.share-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 14px 42px rgba(18, 32, 33, 0.08);
}

.login-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  color: var(--ink);
}

.login-status {
  display: inline-flex;
  width: max-content;
  border-radius: 999px;
  background: #fff0cf;
  color: #7c4b00;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 850;
}

label {
  display: grid;
  gap: 7px;
  color: #3c5555;
  font-size: 12px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

textarea {
  min-height: 108px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(12, 95, 97, 0.12);
}

button {
  border: 0;
  border-radius: var(--radius);
  background: var(--teal);
  color: #fff;
  font-weight: 850;
  padding: 12px 14px;
}

.login-card button,
.share-panel button[data-generate-image] {
  background: var(--gold);
  color: #251a00;
}

.workspace {
  display: grid;
  grid-template-columns: 260px minmax(420px, 1fr) minmax(340px, 0.72fr);
  gap: 18px;
  align-items: start;
  padding: 34px clamp(18px, 5vw, 70px) 70px;
}

.side-panel,
.profile-form,
.preview-column {
  display: grid;
  gap: 16px;
}

.side-panel,
.preview-column {
  position: sticky;
  top: 86px;
}

.metric-card {
  padding: 18px;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--teal);
  font-size: 26px;
}

.metric-card button {
  width: 100%;
  margin-top: 12px;
}

.metric-card.dark {
  background: var(--dark);
  color: #fff;
}

.metric-card.dark strong {
  color: #fff;
}

.metric-card.dark p {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.6;
}

.progress {
  height: 9px;
  margin-top: 14px;
  border-radius: 999px;
  background: #e7ece8;
  overflow: hidden;
}

.progress span {
  display: block;
  width: 76%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.form-section {
  padding: 22px;
}

.section-title {
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 0;
  font-size: 26px;
}

.section-title p:not(.eyebrow) {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.wide {
  grid-column: 1 / -1;
}

.product-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product-editor-card {
  display: grid;
  gap: 13px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbf9f3;
  padding: 16px;
}

.product-editor-card > span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #d7eee6;
  color: var(--teal);
  font-weight: 900;
}

.product-editor-card textarea {
  min-height: 120px;
}

.event-application-section {
  background: #fffdf8;
}

.event-terms-box {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbf9f3;
  padding: 16px;
}

.event-terms-box h3 {
  margin: 0;
  color: var(--teal);
  font-size: 19px;
}

.event-terms-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.event-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

.event-check-row input {
  flex: 0 0 auto;
  width: 20px;
  margin-top: 2px;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.event-actions a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--teal);
  padding: 11px 14px;
  font-weight: 850;
}

.event-actions button {
  background: var(--gold);
  color: #251a00;
}

.event-registration-list-section {
  background: #fff;
}

.event-list-controls {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}

.registration-actions {
  display: grid;
  gap: 9px;
  align-items: end;
}

.registration-actions strong {
  display: block;
  color: var(--teal);
  font-size: 14px;
}

.registration-actions button {
  background: var(--dark);
}

.registration-list {
  display: grid;
  gap: 12px;
}

.registration-card,
.empty-registration-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbf9f3;
  padding: 16px;
}

.registration-card {
  display: grid;
  gap: 14px;
}

.registration-card span {
  color: var(--coral);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.registration-card h3 {
  margin: 5px 0 6px;
  font-size: 22px;
}

.registration-card p {
  margin: 0;
  color: var(--muted);
}

.registration-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.registration-card div {
  min-width: 0;
}

.registration-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.registration-card dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 750;
}

.registration-card dd a {
  color: var(--teal);
}

.empty-registration-list {
  color: var(--muted);
  text-align: center;
}

.ai-assistant-section {
  background:
    linear-gradient(135deg, rgba(12, 95, 97, 0.94), rgba(18, 53, 55, 0.96)),
    url("../assets/hero-business-malaysia.png") center/cover;
  color: #fff;
}

.ai-assistant-section .section-title p:not(.eyebrow),
.ai-assistant-section label {
  color: rgba(255, 255, 255, 0.76);
}

.ai-assistant-section input,
.ai-assistant-section select,
.ai-assistant-section textarea {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.95);
}

.ai-member-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(320px, 1.22fr);
  gap: 16px;
}

.ai-member-form,
.ai-member-output {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.ai-member-form {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  padding: 16px;
}

.ai-member-output {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(230, 173, 48, 0.2), rgba(255, 255, 255, 0.08));
  padding: 16px;
}

.ai-member-output textarea {
  min-height: 96px;
}

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.ai-actions button {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.ai-actions button:last-child,
.ai-member-form .ai-actions button:last-child {
  background: var(--gold);
  color: #251a00;
}

.slug-input,
.copy-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.slug-input span {
  padding-left: 12px;
  color: var(--muted);
  font-size: 14px;
}

.slug-input input,
.copy-field input {
  border: 0;
  box-shadow: none;
}

.copy-field {
  grid-template-columns: 1fr auto;
}

.copy-field button {
  height: 100%;
  border-radius: 0;
}

.phone-preview {
  overflow: hidden;
}

.phone-top {
  height: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  background: #e8eee9;
}

.card-cover {
  min-height: 330px;
  display: grid;
  align-content: end;
  gap: 9px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(18, 53, 55, 0.96), rgba(12, 95, 97, 0.78)),
    url("../assets/hero-business-malaysia.png") center/cover;
  color: #fff;
}

.logo-preview {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: var(--radius);
  background: #fff;
  color: var(--teal);
  font-weight: 900;
  overflow: hidden;
}

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

.card-cover p {
  margin: 10px 0 0;
  color: #f8cc72;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-cover h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.04;
}

.card-cover h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.4;
}

.card-cover span {
  color: rgba(255, 255, 255, 0.72);
}

.card-body {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.preview-products {
  display: grid;
  gap: 10px;
}

.preview-product {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbf9f3;
  padding: 12px;
}

.preview-product span {
  color: var(--coral);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-product strong {
  color: var(--ink);
  font-size: 15px;
}

.preview-product p {
  font-size: 13px;
  line-height: 1.55;
}

.contact-stack {
  display: grid;
  gap: 9px;
}

.contact-stack a {
  display: block;
  border-radius: var(--radius);
  background: #eef5f2;
  color: var(--teal);
  font-weight: 850;
  padding: 12px 14px;
}

.contact-stack a:first-child {
  background: var(--teal);
  color: #fff;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-row a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 850;
}

.share-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.share-panel h2 {
  margin: 0;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.button-grid button {
  min-height: 44px;
  padding-inline: 10px;
}

canvas {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f3f7f5;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px clamp(18px, 5vw, 70px);
  background: #102324;
  color: rgba(255, 255, 255, 0.78);
}

footer a {
  color: #f8cc72;
  font-weight: 850;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  transform: translateY(20px);
  opacity: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 11px 16px;
  font-weight: 850;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .side-panel,
  .preview-column {
    position: static;
  }

  .side-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .member-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .side-panel,
  .form-grid,
  .product-editor-grid,
  .ai-member-layout,
  .button-grid,
  .event-list-controls,
  .registration-card dl {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .member-header nav {
    flex-wrap: wrap;
  }

  .dashboard-hero {
    padding-top: 42px;
  }

  .dashboard-hero h1 {
    font-size: 40px;
  }

  .card-cover h2 {
    font-size: 32px;
  }
}
