:root {
  --orange: #FF7A00;
  --orange-dark: #e56d00;
  --bg: #f4f5f7;
  --row-bg: #eef0f2;
  --text: #1c1c1e;
  --muted: #6b7280;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.card-page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  padding-bottom: 40px;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 8px;
}

.brand-logo {
  height: 42px;
  width: auto;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.icon-btn {
  background: var(--orange);
  border: none;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn:active { background: var(--orange-dark); }

/* Profile */
.profile-section {
  padding: 20px 24px 0;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 10px auto 18px;
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--orange);
  background: #f0f0f0;
}

.dept-badge {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.staff-name {
  font-size: 24px;
  font-weight: 800;
  margin: 6px 0 2px;
}

.staff-title {
  color: var(--orange);
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 22px;
}

/* Action rows */
.action-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--row-bg);
  border-radius: 14px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.action-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-right {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.action-row.primary {
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}

.action-row.primary .action-right {
  color: #fff;
  font-size: 18px;
}

.action-row.arrow { color: var(--orange); }

/* WhatsApp floating button */
.wa-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25D366;
  margin-bottom: 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Footer */
.company-footer {
  border-top: 1px solid #eee;
  padding-top: 20px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.company-footer p { margin: 2px 0; }

.company-name {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}

.company-reg { font-style: italic; }

.company-footer a {
  color: var(--orange);
  text-decoration: none;
}

/* Not found state */
.not-found {
  text-align: center;
  padding: 80px 24px;
}
.not-found .brand-logo { height: 50px; margin-bottom: 30px; }

/* QR modal */
.qr-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.qr-modal-inner {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}
.qr-modal-inner img { width: 220px; height: 220px; display: block; margin: 0 auto 16px; }
.qr-close {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 480px) {
  .card-page { max-width: 100%; }
}
