* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: #F5F5F5;
  color: #1A1A1A;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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

.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: 1152px; margin: 0 auto; padding: 0 24px; }
.main-content { flex: 1; }

/* ====== HEADER ====== */
.header { background: #fff; border-bottom: 1px solid #E0E0E0; }
.header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.header-logo { height: 32px; }
.header-back { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #555; transition: color 0.2s; }
.header-back:hover { color: #1A1A1A; }

/* Language Switcher */
.lang-switcher { display: flex; align-items: center; gap: 4px; margin-left: auto; margin-right: 20px; }
.lang-btn { background: none; border: none; font-size: 12px; font-weight: 700; color: #999; cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: all 0.2s; font-family: inherit; letter-spacing: 0.05em; }
.lang-btn:hover { color: #1A1A1A; }
.lang-btn.active { background: #FEC600; color: #1A1A1A; }
.lang-sep { color: #D0D0D0; font-size: 12px; }

/* ====== PROGRESS BAR ====== */
.progress-bar { background: #fff; border-bottom: 1px solid #E0E0E0; padding: 20px 0; }
.progress-steps { max-width: 600px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.progress-step { display: flex; align-items: center; flex: 1; }
.step-circle {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.step-circle.done { background: #FEC600; color: #1A1A1A; }
.step-circle.active { background: #FEC600; color: #1A1A1A; box-shadow: 0 0 0 3px rgba(254,198,0,0.25); }
.step-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 6px; text-align: center; }
.step-label.done { color: #999; }
.step-label.active { color: #1A1A1A; }
.step-col { display: flex; flex-direction: column; align-items: center; }
.step-line { flex: 1; height: 2px; background: #FEC600; border-radius: 1px; margin: 0 12px; position: relative; top: -14px; }

/* ====== MAIN LAYOUT ====== */
.payment-layout { display: flex; gap: 32px; align-items: flex-start; justify-content: center; padding: 48px 0; }
.payment-form-col { flex: 1; max-width: 540px; }
.payment-sidebar-col { width: 320px; flex-shrink: 0; }
@media (max-width: 900px) { .payment-layout { flex-direction: column; align-items: center; } .payment-sidebar-col { width: 100%; max-width: 540px; } }

/* ====== CARD DECLINED BANNER ====== */
.decline-banner { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: #FDF2F2; border: 1px solid #F5C6CB; border-radius: 10px; margin: 16px 0 20px 0; animation: shakeIn 0.4s ease-out; }
.decline-banner.hidden { display: none !important; }
.decline-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(217,64,64,0.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.decline-content { flex: 1; }
.decline-title { font-size: 14px; font-weight: 700; color: #D94040; margin-bottom: 2px; }
.decline-text { font-size: 12px; color: #8B4444; line-height: 1.5; }
@keyframes shakeIn {
  0% { transform: translateX(-6px); opacity: 0; }
  25% { transform: translateX(6px); opacity: 1; }
  50% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

/* ====== CARD ====== */
.card { background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.card-body { padding: 32px; }
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: #1A1A1A; }
.page-subtitle { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #555; margin-top: 8px; }
.section-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #777; display: block; margin-bottom: 6px; }
.section-label .tooltip { position: relative; display: inline-block; margin-left: 4px; cursor: pointer; }
.tooltip-text {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: 200px; padding: 8px 12px; background: #1A1A1A; color: #fff;
  font-size: 12px; font-weight: 400; border-radius: 8px; z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15); text-transform: none; letter-spacing: normal;
}
.tooltip-text::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #1A1A1A; }

/* ====== FORM ====== */
.form-input {
  width: 100%; height: 48px; border: 1px solid #D0D0D0; border-radius: 8px;
  font-size: 16px; color: #1A1A1A; padding: 0 14px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.form-input:focus { border-color: #FEC600; box-shadow: 0 0 0 3px rgba(254,198,0,0.2); }
.form-input.error { border-color: #D94040; }
.form-input::placeholder { color: #bbb; }
.form-row { margin-bottom: 16px; }
.form-row-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-wrapper { position: relative; }
.input-wrapper .card-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.input-wrapper .form-input { padding-right: 48px; }
.error-text { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #D94040; margin-top: 6px; }
.info-text { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #888; margin-top: 4px; }
.info-text.valid { color: #2D9E5F; }
.info-text.invalid { color: #D94040; }

/* Checkbox */
.checkbox-row { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.checkbox-btn {
  width: 18px; height: 18px; border-radius: 3px; border: 2px solid #D0D0D0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all 0.2s; background: #fff;
}
.checkbox-btn.checked { background: #FEC600; border-color: #FEC600; }
.checkbox-label { font-size: 13px; color: #555; }

/* Security Badges */
.security-row { display: flex; align-items: center; justify-content: center; gap: 32px; padding: 20px 0; border-top: 1px solid #EEEEEE; border-bottom: 1px solid #EEEEEE; margin-bottom: 20px; }
.security-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.security-item svg { width: 26px; height: 26px; color: #777; }
.security-item span { font-size: 10px; color: #888; text-align: center; }

/* Accepted Cards + Datatrans */
.cards-accept-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.cards-label { display: flex; align-items: center; gap: 10px; }
.cards-label span { font-size: 12px; color: #888; }
.cards-logos { display: flex; align-items: center; gap: 10px; }
.card-logo-gray { filter: grayscale(100%); opacity: 0.45; transition: all 0.2s; }
.card-logo-gray:hover { filter: grayscale(0%); opacity: 1; }
.datatrans-badge {
  display: flex; align-items: center; gap: 6px; padding: 5px 12px;
  background: #F0FAFB; border-radius: 100px; border: 1px solid rgba(0,162,184,0.15);
}
.datatrans-badge span { font-size: 12px; font-weight: 600; color: #00A2B8; }

/* Buttons */
.btn-primary {
  width: 100%; height: 56px; background: #FEC600; border: none; border-radius: 8px;
  font-size: 18px; font-weight: 700; color: #1A1A1A; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.2s, transform 0.1s; font-family: inherit;
}
.btn-primary:hover { background: #E5B200; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-outline {
  padding: 0 20px; height: 48px; border: 2px solid #FEC600; border-radius: 8px;
  background: #fff; font-size: 15px; font-weight: 600; color: #1A1A1A; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  transition: background 0.2s; font-family: inherit;
}
.btn-outline:hover { background: #FEC600; }
.btn-outline:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-link { font-size: 13px; font-weight: 600; color: #1A1A1A; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; border: none; background: none; font-family: inherit; }
.btn-link:hover { color: #FEC600; }
.terms-text { text-align: center; font-size: 11px; color: #999; margin-top: 16px; line-height: 1.6; }
.terms-text a { text-decoration: underline; color: #555; }
.terms-text a:hover { color: #1A1A1A; }

/* ====== NOTICE CARD ====== */
.notice-card { overflow: hidden; position: sticky; top: 32px; }
.notice-header { background: #1A1A1A; padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
.notice-logo { height: 36px; width: auto; }
.notice-brand { display: flex; flex-direction: column; }
.notice-brand-text { font-size: 14px; font-weight: 800; letter-spacing: 0.12em; color: #fff; text-transform: uppercase; }
.notice-brand-n { color: #FEC600; }
.notice-brand-tagline { font-size: 10px; color: #999; letter-spacing: 0.03em; margin-top: 1px; }

.notice-body { padding: 24px 20px; }
.notice-icon-wrap { width: 56px; height: 56px; border-radius: 50%; background: rgba(217,64,64,0.08); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.notice-title { font-size: 16px; font-weight: 700; color: #D94040; text-align: center; margin-bottom: 12px; }
.notice-text { font-size: 13px; color: #555; text-align: center; line-height: 1.6; margin-bottom: 20px; }
.notice-text strong { color: #D94040; }

.notice-services { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.notice-service-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #FDF2F2; border-radius: 6px; border: 1px solid #FADEDE; }
.notice-service-item svg { flex-shrink: 0; }
.notice-service-item span { font-size: 12px; font-weight: 500; color: #D94040; }

.notice-urgent { display: flex; align-items: center; gap: 8px; padding: 12px; background: #FDF2F2; border: 1px solid #FADEDE; border-radius: 8px; }
.notice-urgent svg { flex-shrink: 0; }
.notice-urgent span { font-size: 12px; font-weight: 600; color: #D94040; }

/* ====== FOOTER ====== */
.metanet-footer { background: #fff; border-top: 1px solid #E0E0E0; }
.footer-columns { display: grid; grid-template-columns: repeat(7, 1fr); gap: 24px; padding: 40px 0; }
@media (max-width: 1024px) { .footer-columns { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .footer-columns { grid-template-columns: repeat(2, 1fr); } }
.footer-col-title { font-size: 14px; font-weight: 700; color: #1A1A1A; margin-bottom: 12px; }
.footer-col-list { list-style: none; }
.footer-col-list li { margin-bottom: 6px; }
.footer-col-list a { font-size: 13px; color: #555; transition: color 0.2s; }
.footer-col-list a:hover { color: #FEC600; }
.footer-contact-bar { border-top: 1px solid #EEEEEE; padding: 24px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-contact-left { display: flex; align-items: center; gap: 24px; }
.footer-contact-left a { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #555; transition: color 0.2s; }
.footer-contact-left a:hover { color: #1A1A1A; }
.footer-socials { display: flex; align-items: center; gap: 10px; }
.footer-social-btn { width: 32px; height: 32px; border-radius: 50%; background: #F5F5F5; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.footer-social-btn:hover { background: #FEC600; }
.footer-social-btn svg { width: 16px; height: 16px; color: #555; }
.footer-fineprint { border-top: 1px solid #EEEEEE; background: #FAFAFA; padding: 16px 0; }
.footer-fineprint p { font-size: 11px; color: #888; text-align: center; line-height: 1.5; }
.footer-fineprint a { text-decoration: underline; }
.footer-fineprint a:hover { color: #1A1A1A; }
.footer-copyright { border-top: 1px solid #EEEEEE; }
.footer-copyright-inner { padding: 16px 0; display: flex; align-items: center; justify-content: space-between; }
.footer-copyright p { font-size: 12px; color: #888; }

/* ====== SPINNER ====== */
.spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== OTP MODAL ====== */
.modal-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-box { background: #fff; border-radius: 16px; box-shadow: 0 24px 64px rgba(0,0,0,0.2); width: 100%; max-width: 420px; overflow: hidden; transform: translateY(12px) scale(0.97); transition: transform 0.3s; }
.modal-overlay.active .modal-box { transform: translateY(0) scale(1); }
.modal-header { background: #F8F8F8; border-bottom: 1px solid #E0E0E0; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; }
.modal-header .secure-logos { display: flex; align-items: center; gap: 10px; }
.modal-header .secure-logos img { height: 32px; width: auto; object-fit: contain; }
.modal-close { width: 32px; height: 32px; border-radius: 50%; border: none; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.modal-close:hover { background: #E0E0E0; }
.modal-close svg { width: 16px; height: 16px; color: #555; }
.modal-body { padding: 24px; }
.modal-datatrans { display: flex; justify-content: center; margin-bottom: 20px; }
.modal-datatrans-inner { display: flex; align-items: center; gap: 6px; padding: 6px 16px; background: #F0FAFB; border-radius: 100px; border: 1px solid rgba(0,162,184,0.15); }
.modal-datatrans-inner span { font-size: 14px; font-weight: 600; color: #00A2B8; }
.modal-icon-wrap { width: 56px; height: 56px; border-radius: 50%; background: rgba(254,198,0,0.1); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.modal-icon-wrap svg { width: 24px; height: 24px; color: #FEC600; }
.modal-title { text-align: center; font-size: 18px; font-weight: 700; color: #1A1A1A; margin-bottom: 4px; }
.modal-desc { text-align: center; font-size: 14px; color: #555; margin-bottom: 20px; }
.modal-card-hint { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; background: #F5F5F5; border-radius: 8px; margin-bottom: 20px; }
.modal-card-hint .card-brand { font-family: monospace; font-size: 14px; color: #555; }
.otp-input-wrap { margin-bottom: 20px; }
.otp-input { width: 100%; height: 56px; border: 2px solid #D0D0D0; border-radius: 12px; font-size: 24px; font-family: monospace; letter-spacing: 0.4em; text-align: center; color: #1A1A1A; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.otp-input:focus { border-color: #FEC600; box-shadow: 0 0 0 3px rgba(254,198,0,0.2); }
.otp-input.error { border-color: #D94040; }
.otp-input::placeholder { color: #ccc; }
.modal-footer-bar { background: #F8F8F8; border-top: 1px solid #E0E0E0; padding: 12px 24px; text-align: center; }
.modal-footer-bar p { font-size: 11px; color: #888; }
.countdown-text { text-align: center; font-size: 12px; color: #888; margin-top: 12px; }
.resend-wrap { text-align: center; margin-top: 12px; }

/* ====== LOADING SCREENS ====== */
.loading-overlay { position: fixed; inset: 0; z-index: 100; background: #fff; display: none; flex-direction: column; align-items: center; justify-content: center; animation: fadeIn 0.5s ease-out; }
.loading-overlay.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.loading-logo-wrap { text-align: center; margin-bottom: 32px; }
.loading-logo-wrap img { height: 56px; margin-bottom: 16px; }
.loading-logo-wrap .metanet-word { font-size: 28px; font-weight: 800; letter-spacing: 0.15em; color: #1A1A1A; text-transform: uppercase; }
.loading-logo-wrap .metanet-word span { color: #FEC600; }
.loading-subtitle { font-size: 16px; color: #555; margin-bottom: 48px; text-align: center; max-width: 400px; line-height: 1.5; }
.loading-progress-wrap { width: 100%; max-width: 480px; padding: 0 24px; margin-bottom: 24px; }
.loading-progress-track { width: 100%; height: 8px; background: #F0F0F0; border-radius: 4px; overflow: hidden; position: relative; }
.loading-progress-fill { height: 100%; width: 0%; background: #FEC600; border-radius: 4px; transition: width 0.5s ease-out; box-shadow: 0 0 12px rgba(254,198,0,0.4); }
.loading-progress-fill::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 60px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { transform: translateX(-60px); } 100% { transform: translateX(60px); } }
.loading-percentage { font-size: 14px; font-weight: 600; color: #555; margin-top: 10px; text-align: center; }
.loading-step-text { font-size: 14px; color: #777; margin-top: 16px; text-align: center; min-height: 20px; }
.loading-step-text strong { color: #1A1A1A; font-weight: 600; }
.loading-timer { font-size: 12px; color: #999; margin-top: 8px; text-align: center; }
.loading-spinner-ring { width: 48px; height: 48px; border: 4px solid #F0F0F0; border-top-color: #FEC600; border-radius: 50%; animation: spin 0.9s linear infinite; margin-bottom: 24px; }
.loading-footer-brand { position: absolute; bottom: 32px; left: 0; right: 0; text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px; }
.loading-footer-brand img { height: 24px; opacity: 0.5; }
.loading-footer-brand span { font-size: 12px; color: #aaa; letter-spacing: 0.05em; }

/* ====== OTP METHOD SELECTION ====== */
.method-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.method-card {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border: 2px solid #E8E8E8; border-radius: 12px; cursor: pointer;
  transition: all 0.2s; background: #fff;
}
.method-card:hover { border-color: #FEC600; background: #FEFDF5; }
.method-card.selected { border-color: #FEC600; background: #FEF9E7; box-shadow: 0 2px 8px rgba(254,198,0,0.15); }
.method-icon-wrap {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.method-info { display: flex; flex-direction: column; flex: 1; }
.method-name { font-size: 15px; font-weight: 600; color: #1A1A1A; }
.method-desc { font-size: 12px; color: #888; margin-top: 2px; }
.method-check { flex-shrink: 0; }
.method-check-circle {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #D0D0D0;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.method-card.selected .method-check-circle { background: #FEC600; border-color: #FEC600; }
.method-card.selected .method-check-circle::after {
  content: ''; width: 6px; height: 10px; border: solid #1A1A1A; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.bank-app-waiting { padding: 16px 0; }
.bank-app-actions { margin-top: 8px; }
.sms-waiting-box { padding: 16px 0; }

/* ====== SUCCESS ====== */
.success-wrap { max-width: 480px; margin: 0 auto; padding: 64px 24px; text-align: center; }
.success-icon-wrap { width: 80px; height: 80px; border-radius: 50%; background: rgba(45,158,95,0.1); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.success-icon-wrap svg { width: 40px; height: 40px; color: #2D9E5F; }
.success-title { font-size: 24px; font-weight: 700; color: #1A1A1A; margin-bottom: 8px; }
.success-desc { font-size: 15px; color: #555; margin-bottom: 32px; }

.hidden { display: none !important; }
