* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --card-w: 520px;
}
body {
  min-height: 100vh;
  background: #0a0806;
  color: #f7f4ef;
  font-family: "Outfit", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 100px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Ctext x='50%25' y='40%25' dominant-baseline='middle' text-anchor='middle' transform='rotate(-35 90 90)' font-family='Georgia,serif' font-size='18' font-weight='700' letter-spacing='4' fill='%23c9a96e' opacity='0.12'%3EKartuNama%3C/text%3E%3Ctext x='50%25' y='75%25' dominant-baseline='middle' text-anchor='middle' transform='rotate(-35 90 90)' font-family='Georgia,serif' font-size='18' font-weight='700' letter-spacing='4' fill='%23c9a96e' opacity='0.12'%3EKartuNama%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}
.nav {
  width: 100%;
  max-width: var(--card-w);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 24px;
  gap: 16px;
}
.logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  color: #f7f4ef;
  text-decoration: none;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.logo span { color: #c9a96e; }
#card-nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-cta {
  font-size: 12px;
  color: #c9a96e;
  text-decoration: none;
  border: 1px solid rgba(201,169,110,0.3);
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-cta:hover { background: rgba(201,169,110,0.1); }
.nav-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #f7f4ef;
  white-space: nowrap;
  overflow: hidden;
  max-width: 200px;
}
.nav-user-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(201,169,110,0.15);
  border: 1px solid rgba(201,169,110,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c9a96e;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.nav-user-name {
  color: #e8e4dc;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-container {
  width: 100%;
  max-width: var(--card-w);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.card-wrap {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7);
  position: relative;
  margin-bottom: 16px;
}
.company-logo-container {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  width: var(--avatar-size, 68px);
  height: var(--avatar-size, 68px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.company-logo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
}
.card-wrap.has-company-logo .card-name,
.card-wrap.has-company-logo .card-title {
  padding-right: var(--company-logo-reserve, 78px);
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.card-inner {
  padding: 32px 28px 24px;
  position: relative;
  z-index: 1;
}
.card-motif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 16px;
}
.card-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 4px;
}
.card-title {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 18px;
}
.divider {
  height: 1px;
  opacity: 0.2;
  margin-bottom: 16px;
}
.card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  opacity: 0.85;
}
.card-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  opacity: 0.8;
}
.watermark {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.3;
  text-align: center;
  padding: 10px 0 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 8px;
}
.logo-watermark-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 180px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.25s ease;
}
.btn-vcf {
  background: linear-gradient(135deg, #c9a96e, #b8924a);
  color: #1a1008;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(201,169,110,0.25);
  letter-spacing: 0.02em;
}
.btn-vcf:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 28px rgba(201,169,110,0.4);
  transform: translateY(-1px);
}
.btn-wa {
  background: rgba(37,211,102,0.1);
  border: 1px solid rgba(37,211,102,0.35);
  color: #25d366;
  font-weight: 500;
}
.btn-wa:hover {
  background: rgba(37,211,102,0.2);
  border-color: rgba(37,211,102,0.6);
  box-shadow: 0 4px 16px rgba(37,211,102,0.2);
  transform: translateY(-1px);
}
.btn-copy {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: #a09880;
  font-weight: 500;
  transition: all 0.25s ease;
}
.btn-copy:hover {
  background: rgba(201,169,110,0.08);
  border-color: rgba(201,169,110,0.35);
  color: #c9a96e;
  transform: translateY(-1px);
}
.btn-row {
  display: flex;
  gap: 10px;
}
.btn-row .btn { flex: 1; }
.btn-ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #a09880;
}
.btn-ghost:hover { background: rgba(255,255,255,0.09); }
.not-found {
  text-align: center;
  padding: 48px 24px;
}
.not-found h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  color: #c9a96e;
  margin-bottom: 12px;
}
.not-found p {
  color: #5a5248;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 24px;
}
.footer-cta {
  text-align: center;
  font-size: 12px;
  color: #5a5248;
  width: 100%;
}
.footer-cta a { color: #c9a96e; text-decoration: none; }
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1e1b16;
  border: 1px solid rgba(201,169,110,0.25);
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 13px;
  color: #f7f4ef;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
  white-space: nowrap;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }
@media (max-width: 600px) {
  :root { --card-w: 100%; }
  body { padding: 16px 16px 90px; cursor: default !important; }
  .nav { padding: 12px 0; margin-bottom: 16px; gap: 12px; }
  .logo { font-size: 18px; }
  #card-nav-auth { gap: 8px; }
  .nav-user-avatar { width: 28px; height: 28px; font-size: 12px; }
  .nav-user-name { font-size: 13px; }
  .nav-logout-btn { padding: 5px 12px; font-size: 12px; }
  .card-inner { padding: 28px 22px 22px; }
  .card-name { font-size: 26px; }
  .avatar { width: 56px; height: 56px; font-size: 22px; }
  .btn { font-size: 13px; padding: 12px; border-radius: 10px; }
  .card-row { font-size: 12px; }
  .card-icon { width: 24px; height: 24px; font-size: 10px; }
  .card-title { font-size: 9px; }
  * { cursor: default !important; }
}
@media (max-width: 380px) {
  body { padding: 12px 12px 80px; cursor: default !important; }
  .nav { padding: 10px 0; margin-bottom: 12px; gap: 8px; }
  .logo { font-size: 16px; }
  #card-nav-auth { gap: 6px; }
  .nav-user-avatar { width: 26px; height: 26px; font-size: 11px; }
  .nav-user-name { font-size: 12px; max-width: 80px; }
  .nav-logout-btn { padding: 4px 10px; font-size: 11px; }
  .card-inner { padding: 22px 18px 18px; }
  .card-name { font-size: 22px; }
  .avatar { width: 48px; height: 48px; font-size: 20px; }
  .btn { font-size: 12px; padding: 11px 8px; }
  .nav-user-pill { max-width: 130px; }
  .card-row { font-size: 11px; }
  .card-icon { width: 22px; height: 22px; }
  .watermark { font-size: 8px; }
  * { cursor: default !important; }
}
/* Preview mode: sembunyikan chrome saat dimuat dalam iframe dashboard */
body.preview-mode .nav,
body.preview-mode .footer-cta,
body.preview-mode #free-upgrade-banner,
body.preview-mode #actions-mount { display: none !important; }
body.preview-mode { background: transparent; min-height: unset; overflow: hidden; }
body.preview-mode #card-mount { padding-top: 0 !important; margin: 0; }

/* Preview mode takes precedence over all other rules */
body.preview-mode:not(.owner-logged-in) .nav { display: none !important; }
body.preview-mode.owner-logged-in .nav { display: none !important; }
body.preview-mode:not(.pro-user) .nav { display: none !important; }

/* Pro user: sembunyikan background watermark saja */
body.pro-user { background-image: none !important; }
body.pro-user .footer-cta { display: block !important; }

/* Hide nav for pro cards unless owner is logged in */
body.pro-user:not(.owner-logged-in) .nav { display: none !important; }
body.pro-user:not(.owner-logged-in) nav { display: none !important; }

/* Show nav if owner is logged in */
body.owner-logged-in .nav { display: flex !important; }

/* By default, hide nav and footer - they will be shown if card owner is not pro */
body:not(.pro-user) .nav { display: flex !important; }
body:not(.pro-user) .footer-cta { display: block !important; }
body:not(.pro-user) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Ctext x='50%25' y='40%25' dominant-baseline='middle' text-anchor='middle' transform='rotate(-35 90 90)' font-family='Georgia,serif' font-size='18' font-weight='700' letter-spacing='4' fill='%23c9a96e' opacity='0.12'%3EKartuNama%3C/text%3E%3Ctext x='50%25' y='75%25' dominant-baseline='middle' text-anchor='middle' transform='rotate(-35 90 90)' font-family='Georgia,serif' font-size='18' font-weight='700' letter-spacing='4' fill='%23c9a96e' opacity='0.12'%3EKartuNama%3C/text%3E%3C/svg%3E") !important; background-repeat: repeat !important; background-size: 180px 180px !important; }

/* Initially hide nav and footer until JavaScript determines pro status */
.nav, .footer-cta { display: none !important; }
