* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: #f2f3f5;
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #222;
}

.wrap { width: 100%; max-width: 460px; margin: 0 auto; padding: 30px 16px 50px; }
.wrap-center { display: flex; justify-content: center; }

/* ---- Brand ---- */
.brand-name { font-size: 22px; font-weight: 800; color: #1e3a8a; margin: 0; }
.brand-name .gold { color: #c99a3d; }
.brand-sub { color: #888; font-size: 13px; margin: 4px 0 0; }

/* ---- Top bar (dashboard/settings) ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.topbar-brand { font-size: 16px; font-weight: 800; color: #1e3a8a; }
.topbar-brand .gold { color: #c99a3d; }
.logout-link { font-size: 13px; color: #999; text-decoration: none; font-weight: 600; }
.logout-link:hover { color: #c62828; }
.back-btn {
  width: 36px; height: 36px; border-radius: 10px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-decoration: none; color: #1e3a8a; flex-shrink: 0;
}
.back-btn svg { width: 18px; height: 18px; }

/* ---- Cards / forms ---- */
.form-card, .card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  padding: 24px;
  margin-bottom: 18px;
}
.form-card h2, .card h2 {
  margin: 0 0 18px; font-size: 15.5px; color: #222;
  display: flex; align-items: center; gap: 8px;
}
.card h2 svg { width: 17px; height: 17px; color: #1e3a8a; }
.step-note { color: #888; font-size: 13px; margin: -10px 0 20px; }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-weight: 700; font-size: 13.5px; color: #333; margin-bottom: 7px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="password"], .field input[type="file"], .field input[type="date"], .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #d5d8de; border-radius: 10px;
  font-size: 14.5px; font-family: inherit;
}
.field input:focus, .field textarea:focus { outline: none; border-color: #1e3a8a; }
.char-count { text-align: right; font-size: 11.5px; color: #999; margin-top: 4px; }

.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; }
.alert-error { background: #ffe6e6; color: #b00020; border: 1px solid #f5b5b5; }
.alert-success { background: #e6f7ec; color: #1b7a3d; border: 1px solid #a9dfba; }
.alert-info { background: #fff8e5; color: #8a6300; border: 1px solid #ffe08a; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 20px; border-radius: 10px; border: none;
  font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; box-sizing: border-box;
}
.btn-primary { background: linear-gradient(120deg, #1e3a8a, #3949ab); color: #fff; box-shadow: 0 6px 18px rgba(30,58,138,0.28); }
.btn-outline { background: #fff; color: #1e3a8a; border: 2px solid #1e3a8a; }
.btn-danger { background: #fff; color: #c62828; border: 2px solid #c62828; }
.btn-sm { width: auto; padding: 8px 14px; font-size: 13px; }

.bottom-link, .center { text-align: center; margin-top: 18px; font-size: 14px; color: #666; }
.link { color: #1e3a8a; font-weight: 700; text-decoration: none; }
.forgot-link { text-align: right; margin: -8px 0 18px; }
.forgot-link a { color: #1e3a8a; font-size: 13px; text-decoration: none; font-weight: 600; }

/* ---- Logo upload ---- */
.logo-upload-box, .logo-box {
  width: 100%; height: 90px; border: 2px dashed #ccc; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; background: #fafbfc;
  margin-bottom: 8px; overflow: hidden; color: #999; font-size: 13px;
}
.logo-upload-box img, .logo-box img { max-height: 100%; max-width: 100%; object-fit: contain; }
.logo-row { display: flex; align-items: center; gap: 16px; }
.logo-preview {
  width: 72px; height: 72px; border-radius: 14px;
  background: linear-gradient(135deg, #1e3a8a, #5c6bc0);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; color: #fff; font-weight: 800; font-size: 22px;
}
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.logo-upload-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: #f0f2fa; color: #1e3a8a; border: none; border-radius: 9px;
  padding: 10px 16px; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.logo-upload-btn svg { width: 15px; height: 15px; }
.logo-hint { font-size: 11.5px; color: #999; margin-top: 6px; }

/* ---- Reset password steps ---- */
.step { display: none; }
.step.active { display: block; }
.success-wrap { text-align: center; padding: 20px 0; }
.success-check {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #1fa855, #35c26a);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.success-check svg { width: 32px; height: 32px; }
.resend { text-align: center; margin-top: 14px; font-size: 13px; color: #888; }
.resend a { color: #1e3a8a; font-weight: 600; text-decoration: none; cursor: pointer; }

/* ================= DASHBOARD ================= */
.greeting-card {
  background: linear-gradient(120deg, #1e3a8a, #3949ab 60%, #5c6bc0);
  border-radius: 18px; padding: 22px 22px 20px; color: #fff; margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(30,58,138,0.28); position: relative; overflow: hidden;
}
.greeting-card::after {
  content: ''; position: absolute; width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 70%);
  top: -60px; right: -60px; border-radius: 50%;
}
.greeting-name { font-size: 19px; font-weight: 800; margin: 0 0 12px; position: relative; z-index: 1; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 20px; font-size: 12.5px; font-weight: 700; position: relative; z-index: 1; }
.status-badge.premium { background: linear-gradient(120deg, #f4d58d, #c99a3d); color: #3a2a00; }
.status-badge.free { background: rgba(255,255,255,0.18); color: #fff; }
.status-badge svg { width: 14px; height: 14px; }
.status-sub { font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 8px; position: relative; z-index: 1; }

.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); display: flex; align-items: center; gap: 12px; }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.stat-icon svg { width: 21px; height: 21px; }
.stat-icon.blue { background: linear-gradient(135deg,#1e3a8a,#5c6bc0); }
.stat-icon.red { background: linear-gradient(135deg,#b5262e,#e0525c); }
.stat-num { font-size: 20px; font-weight: 800; color: #14142b; line-height: 1.1; }
.stat-label { font-size: 11px; color: #888; margin-top: 2px; }

.tool-btn {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  border-radius: 22px; padding: 36px 24px; text-decoration: none; margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(30,58,138,0.18); position: relative; overflow: hidden;
}
.tool-btn::after { content: ''; position: absolute; width: 180px; height: 180px; background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%); top: -70px; right: -70px; border-radius: 50%; }
.tool-1 { background: linear-gradient(135deg,#1e3a8a,#5c6bc0); }
.tool-2 { background: linear-gradient(135deg,#b5262e,#e0525c); }
.tool-btn-icon { width: 68px; height: 68px; border-radius: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: rgba(255,255,255,0.18); position: relative; z-index: 1; }
.tool-btn-icon svg { width: 34px; height: 34px; }
.tool-btn-title { font-size: 21px; font-weight: 800; color: #fff; display: block; position: relative; z-index: 1; }
.tool-btn-sub { font-size: 13px; color: rgba(255,255,255,0.8); position: relative; z-index: 1; }
.tool-btn-cta { margin-top: 4px; background: rgba(255,255,255,0.2); color: #fff; padding: 8px 20px; border-radius: 20px; font-size: 13px; font-weight: 700; position: relative; z-index: 1; }

.utility-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.utility-btn { display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff; border-radius: 12px; padding: 14px 10px; text-decoration: none; color: #333; font-weight: 700; font-size: 13.5px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border: none; cursor: pointer; width: 100%; }
.utility-btn svg { width: 17px; height: 17px; color: #1e3a8a; flex-shrink: 0; }

.panel { display: none; margin-top: 12px; }
.panel.open { display: block; }

table.history-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.history-table th, table.history-table td { padding: 8px 6px; border-bottom: 1px solid #f0f0f0; text-align: left; }
table.history-table th { color: #999; font-weight: 700; font-size: 11px; text-transform: uppercase; }
.empty-history { text-align: center; color: #aaa; font-size: 13px; padding: 10px 0; }

/* ---- Social toggle rows (settings) ---- */
.social-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f2f2f4; }
.social-row:last-child { border-bottom: none; }
.social-left { display: flex; align-items: center; gap: 12px; }
.social-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.social-icon svg { width: 19px; height: 19px; }
.social-name { font-size: 14px; font-weight: 700; color: #333; }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #d9dbe0; border-radius: 24px; transition: 0.2s; }
.slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.switch input:checked + .slider { background: linear-gradient(120deg,#1e3a8a,#3949ab); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.saved-toast { display: none; text-align: center; background: #e6f7ec; color: #1b7a3d; padding: 10px; border-radius: 10px; font-size: 13.5px; font-weight: 700; margin-top: 14px; }
.saved-toast.show { display: block; }

/* ---- Home page ---- */
.home-header { text-align: center; padding-bottom: 20px; }
.home-logo { font-size: clamp(26px, 6vw, 32px); font-weight: 800; letter-spacing: -0.5px; margin: 0 0 12px; color: #1e3a8a; }
.home-logo .gold { color: #c99a3d; }
.home-tagline { color: #555; font-size: 15px; font-weight: 600; margin: 0 0 20px; min-height: 20px; letter-spacing: 0.2px; }
.type-cursor { display: inline-block; width: 2px; background: #1e3a8a; margin-left: 2px; animation: blink 0.9s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.float-icon-wrap { position: relative; width: 110px; height: 100px; margin: 0 auto; display: flex; align-items: flex-end; justify-content: center; }
.float-icon { width: 84px; height: auto; position: relative; z-index: 2; animation: float-bob 3.2s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(30,58,138,0.18)); }
.float-shadow { position: absolute; bottom: 4px; width: 56px; height: 12px; border-radius: 50%; background: radial-gradient(ellipse, rgba(30,58,138,0.38), transparent 72%); z-index: 1; animation: shadow-pulse 3.2s ease-in-out infinite; }
@keyframes float-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes shadow-pulse { 0%, 100% { transform: scale(1); opacity: 0.55; } 50% { transform: scale(0.72); opacity: 0.28; } }
.home-main { display: flex; flex-direction: column; gap: 16px; padding: 30px 0 28px; }
.auth-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 16px; padding-bottom: 26px; font-size: 14px; }
.auth-row a { color: #1e3a8a; text-decoration: none; font-weight: 600; }
.auth-row span { color: #ccc; }
.home-footer { text-align: center; padding-top: 18px; border-top: 1px solid #e2e4e9; }
.home-footer a { color: #777; text-decoration: none; font-size: 12.5px; margin: 0 8px; display: inline-block; }
.home-footer a:hover { color: #1e3a8a; }
.home-footer .copy { margin-top: 10px; color: #aaa; font-size: 11.5px; }

/* ---- Premium upsell box ---- */
.premium-box { background: linear-gradient(150deg, #14142b, #1e3a8a 70%, #3949ab); border-radius: 20px; padding: 26px 22px; color: #fff; box-shadow: 0 10px 30px rgba(20,20,43,0.35); position: relative; overflow: hidden; margin-bottom: 18px; }
.premium-box::after { content: ''; position: absolute; width: 200px; height: 200px; background: radial-gradient(circle, rgba(212,175,106,0.25), transparent 70%); top: -80px; right: -80px; border-radius: 50%; }
.premium-badge-top { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.12); padding: 6px 14px; border-radius: 20px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.4px; margin-bottom: 14px; position: relative; z-index: 1; color: #f4d58d; }
.premium-badge-top svg { width: 13px; height: 13px; }
.premium-title { font-size: 19px; font-weight: 800; margin: 0 0 6px; position: relative; z-index: 1; }
.premium-sub { font-size: 13px; color: rgba(255,255,255,0.75); margin: 0 0 20px; position: relative; z-index: 1; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; position: relative; z-index: 1; }
.price-card { background: rgba(255,255,255,0.08); border: 2px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 12px 6px; text-align: center; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.price-card:active { transform: scale(0.96); }
.price-card.selected { border-color: #f4d58d; }
.price-card.best { background: linear-gradient(135deg, #d4af6a, #f4d58d); border-color: transparent; }
.price-card.best.selected { border-color: #fff; }
.price-card.best .price-label, .price-card.best .price-amount, .price-card.best .price-period { color: #3a2a00; }
.price-tag { position: relative; top: -20px; background: #b5262e; color: #fff; font-size: 9px; font-weight: 800; padding: 2px 8px; border-radius: 8px; display: inline-block; letter-spacing: 0.3px; }
.price-label { font-size: 11px; color: rgba(255,255,255,0.7); font-weight: 700; margin-bottom: 4px; }
.price-amount { font-size: 18px; font-weight: 800; color: #fff; }
.price-period { font-size: 10px; color: rgba(255,255,255,0.6); }
.whatsapp-btn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #25D366; color: #fff; text-decoration: none; padding: 14px; border-radius: 12px; font-size: 15px; font-weight: 700; position: relative; z-index: 1; box-shadow: 0 6px 18px rgba(37,211,102,0.35); }
.whatsapp-btn svg { width: 22px; height: 22px; }
.premium-note { text-align: center; font-size: 11.5px; color: rgba(255,255,255,0.55); margin-top: 12px; position: relative; z-index: 1; }
