/* ==========================================================
   9W Withdraw - Luxury Dark + Gold
   ========================================================== */

* {
  box-sizing: border-box;
  font-family: 'Pyidaungsu', 'Myanmar Text', 'Noto Sans Myanmar', sans-serif;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #1a1a1a;
  --bg-2: #202020;
  --bg-input: #242424;
  --bg-hover: #2a2a2a;

  --gold: #d4af37;
  --gold-bright: #f4d03f;
  --gold-dark: #8b6f1f;
  --gold-gradient: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #8b6f1f 100%);

  --white: #ffffff;
  --gray: #9a9a9a;
  --gray-dark: #666666;

  --red: #ff4757;
  --green: #2ed573;
  --yellow: #facc15;
  --orange: #ff8c00;

  --border: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.25);
  --border-focus: rgba(212, 175, 55, 0.6);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
}

html, body {
  background: var(--bg);
  color: var(--white);
  min-height: 100vh;
  padding: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================
   Top Bar
   ========================================================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  gap: 12px;
}

.topbar-title {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  padding: 0;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.top-icon:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.top-icon:active {
  transform: translateY(0) scale(0.96);
}

.top-icon svg {
  transition: transform 0.3s ease;
}

.top-icon:hover svg {
  transform: scale(1.1);
}

/* ==========================================================
   Page
   ========================================================== */
.page {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* ==========================================================
   Section Title
   ========================================================== */
.section-title {
  font-size: 14px;
  color: var(--white);
  font-weight: 600;
  margin: 28px 0 14px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 4px;
}

.section-title:first-of-type {
  margin-top: 0;
}

.icon-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--gold);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 10px var(--gold); }
  50%      { box-shadow: 0 0 16px var(--gold), 0 0 24px rgba(212, 175, 55, 0.5); }
}

/* ==========================================================
   Labels
   ========================================================== */
label {
  display: block;
  font-size: 13px;
  color: var(--white);
  opacity: 0.9;
  margin: 16px 0 8px 4px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ==========================================================
   Inputs
   ========================================================== */
input[type="text"],
input[type="password"],
input[type="number"] {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--white);
  font-size: 15px;
  outline: none;
  transition: all 0.25s ease;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

input::placeholder {
  color: var(--gray-dark);
  font-size: 14px;
}

input:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

input:focus {
  border-color: var(--border-focus);
  background: var(--bg-2);
  box-shadow:
    0 0 0 3px rgba(212, 175, 55, 0.1),
    var(--shadow-sm);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* ==========================================================
   Password Wrap + Eye Button
   ========================================================== */
.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 52px;
}

.eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  font-family: inherit;
}

.eye-btn:hover {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.2);
}

.eye-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.eye-btn svg {
  display: block;
  pointer-events: none;
}

/* ==========================================================
   Amount Hint
   ========================================================== */
.amount-hint {
  font-size: 12px;
  color: var(--white);
  opacity: 0.85;
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  line-height: 1.6;
}

/* ==========================================================
   Bank Grid
   ========================================================== */
.bank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.bank-option {
  position: relative;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.bank-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.6s;
}

.bank-option:hover::before {
  left: 100%;
}

.bank-option:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.bank-option.selected {
  border-color: var(--gold);
  background: linear-gradient(145deg, #2a230d 0%, #1f1a0d 100%);
  box-shadow:
    0 0 0 1px var(--gold),
    0 6px 20px rgba(212, 175, 55, 0.25);
  transform: translateY(-3px);
}

/* ==========================================================
   Bank Logo
   ========================================================== */
.bank-logo {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.bank-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bank-option:hover .bank-logo {
  transform: scale(1.06);
  border-color: var(--border-hover);
}

.bank-option.selected .bank-logo {
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* ==========================================================
   Bank Name + Sub
   ========================================================== */
.bank-name {
  font-weight: 700;
  color: var(--white);
  font-size: 15px;
  letter-spacing: 0.4px;
}

.bank-sub {
  font-size: 11px;
  color: var(--white);
  opacity: 0.65;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

/* ==========================================================
   Check Mark
   ========================================================== */
.check-mark {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background: var(--gold-gradient);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  opacity: 0;
  transform: scale(0.3) rotate(-90deg);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
}

.bank-option.selected .check-mark {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* ==========================================================
   Info Box
   ========================================================== */
.info-box {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--white);
  opacity: 0.95;
  margin-top: 14px;
  line-height: 1.7;
  animation: slideDown 0.3s ease;
}

.info-box b {
  color: var(--gold);
  opacity: 1;
}

/* ==========================================================
   Dynamic Fields
   ========================================================== */
.dynamic-fields {
  margin-top: 16px;
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   Submit Button
   ========================================================== */
#submitBtn {
  position: relative;
  width: 100%;
  padding: 16px;
  margin-top: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: var(--gold-gradient);
  color: #000;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  letter-spacing: 0.4px;
  overflow: hidden;
  box-shadow:
    0 4px 16px rgba(212, 175, 55, 0.3),
    var(--shadow-sm);
}

#submitBtn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transition: left 0.6s;
}

#submitBtn:not(:disabled):hover::before {
  left: 100%;
}

#submitBtn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(212, 175, 55, 0.4),
    0 0 40px rgba(212, 175, 55, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
}

#submitBtn:not(:disabled):active {
  transform: translateY(0) scale(0.99);
}

#submitBtn:disabled {
  background: var(--bg-input);
  color: var(--gray-dark);
  cursor: not-allowed;
  border-color: var(--border);
  box-shadow: none;
}

/* ==========================================================
   Messages
   ========================================================== */
.msg {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
  line-height: 1.6;
  font-weight: 500;
  animation: slideDown 0.3s ease;
  border: 1px solid transparent;
  color: var(--white);
}

.msg.ok {
  background: rgba(46, 213, 115, 0.08);
  color: var(--green);
  border-color: rgba(46, 213, 115, 0.3);
}

.msg.err {
  background: rgba(255, 71, 87, 0.08);
  color: var(--red);
  border-color: rgba(255, 71, 87, 0.3);
}

/* ==========================================================
   Modal
   ========================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  max-width: 480px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.modal-header h2 {
  color: var(--white);
  font-size: 17px;
  margin: 0;
  display: flex;
  align-items: center;
  font-weight: 700;
}

.modal-header .close {
  background: transparent;
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--white);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  line-height: 1;
}

.modal-header .close:hover {
  color: var(--red);
  border-color: rgba(255, 71, 87, 0.4);
  background: rgba(255, 71, 87, 0.05);
  transform: rotate(90deg);
}

/* ==========================================================
   History Item
   ========================================================== */
.history-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid #555;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.history-item:hover {
  border-color: var(--border-hover);
  transform: translateX(3px);
}

.history-item.pending  { border-left-color: var(--yellow); }
.history-item.approved { border-left-color: var(--green); }
.history-item.rejected { border-left-color: var(--red); }
.history-item.wrong    { border-left-color: var(--orange); }

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.history-id {
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.status-badge.pending {
  background: rgba(250, 204, 21, 0.12);
  color: var(--yellow);
  border-color: rgba(250, 204, 21, 0.3);
}
.status-badge.approved {
  background: rgba(46, 213, 115, 0.12);
  color: var(--green);
  border-color: rgba(46, 213, 115, 0.3);
}
.status-badge.rejected {
  background: rgba(255, 71, 87, 0.12);
  color: var(--red);
  border-color: rgba(255, 71, 87, 0.3);
}
.status-badge.wrong {
  background: rgba(255, 140, 0, 0.12);
  color: var(--orange);
  border-color: rgba(255, 140, 0, 0.3);
}

.history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.history-field {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.history-field label {
  font-size: 10px;
  color: var(--white);
  opacity: 0.55;
  margin: 0 0 4px 0;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.history-field .value {
  font-size: 13px;
  color: var(--white);
  font-weight: 500;
  word-break: break-all;
  line-height: 1.4;
}

.history-field .value.gold {
  color: var(--gold);
  font-weight: 700;
}

.history-note {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  border: 1px solid transparent;
  color: var(--white);
}

.history-note.approved {
  background: rgba(46, 213, 115, 0.06);
  color: var(--green);
  border-color: rgba(46, 213, 115, 0.2);
}
.history-note.rejected {
  background: rgba(255, 71, 87, 0.06);
  color: var(--red);
  border-color: rgba(255, 71, 87, 0.2);
}
.history-note.wrong {
  background: rgba(255, 140, 0, 0.06);
  color: var(--orange);
  border-color: rgba(255, 140, 0, 0.2);
}

.history-time {
  margin-top: 12px;
  font-size: 11px;
  color: var(--white);
  opacity: 0.5;
  text-align: right;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ==========================================================
   Security Button
   ========================================================== */
.security-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--gold-gradient);
  color: #000;
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow:
    0 4px 16px rgba(212, 175, 55, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: inherit;
}

.security-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(212, 175, 55, 0.4),
    0 0 40px rgba(212, 175, 55, 0.2);
}

.security-btn:active {
  transform: translateY(0) scale(0.98);
}

/* ==========================================================
   Empty
   ========================================================== */
.empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--white);
  opacity: 0.65;
  font-size: 14px;
  line-height: 1.9;
}

/* ==========================================================
   Utility
   ========================================================== */
.hidden {
  display: none !important;
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 400px) {
  body { padding: 12px; }
  .topbar-title { font-size: 16px; }
  .top-icon { width: 38px; height: 38px; }
  .bank-logo { width: 50px; height: 50px; }
  .bank-name { font-size: 14px; }
  .history-grid { grid-template-columns: 1fr; }
  .modal { padding: 18px; }
}

/* ==========================================================
   Scrollbar
   ========================================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.25);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.45);
}

::selection {
  background: rgba(212, 175, 55, 0.3);
  color: var(--white);
}
