/* ===== Site-wide tokens & reset ===== */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500&display=swap");

html {
  box-sizing: border-box;
  font-size: 16px;
}

*, *::before, *::after {
  box-sizing: inherit;
}

:root {
  /* Colors */
  --bg: #000000;
  --text: #ffffff;
  --muted: #c9c9c9;

  /* Surfaces */
  --card: rgba(255,255,255,0.06);
  --card-border: rgba(255,255,255,0.12);

  /* Accents */
  --accent1: #f97316;
  --accent2: #fb923c;

  /* Rounding */
  --radius: 10px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;

  /* Layout metrics */
  --topbar-h: 55px;
  --footer-h: 65px;

  /* Unified container */
  --container-max: 980px;
  --container-pad: 16px;

  /* Component paddings & gaps */
  --section-gap: 12px;
  --card-pad: 16px;
  --item-pad: 10px;
  --chip-pad-y: 6px;
  --chip-pad-x: 8px;
}

/* ===== Global styles ===== */
body {
  margin: 0;
  padding: 0;
  background: #000;
  color: var(--text);
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

li, a {
    text-decoration: none;
    text-decoration-color: #fff;
    text-decoration-line: none;
}


/* ===== Containers ===== */
.shell,
.container,
.container-unified {
  width: 100%;
  margin-inline: auto;
}

/* ===== Page layout ===== */
.dash .page {
  padding: calc(var(--topbar-h) + .5rem) 0 calc(var(--footer-h) + var(--space-5)) !important;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap) !important;
  width: 100%;
}

/* ===== Generic card surfaces ===== */
.card,
.glass,
.settings-card,
.market-strip,
.alert {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: var(--card-pad);
  backdrop-filter: blur(6px);
  box-sizing: border-box;
}

/* ===== Divider ===== */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.12), transparent);
  margin: var(--section-gap) 0;
}

/* ===== Buttons & Inputs ===== */
button, .btn {
  font: inherit;
  font-weight: 300;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--card-border);
  padding: var(--space-3) var(--space-5);
  border-radius: 9999px;
  cursor: pointer;
  transition: transform .08s ease, background .2s ease, border-color .2s ease;
}

button:hover, .btn:hover {
  background: rgba(255,255,255,0.08);
}

button:active, .btn:active {
  transform: translateY(1px);
}

input, textarea {
  width: 100%;
  font: inherit;
  font-weight: 300;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: var(--space-3) var(--space-4);
  outline: none;
  line-height: 2;
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
}

/* ===== Quick actions ===== */
.q-menu {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: var(--section-gap);
  padding: var(--chip-pad-y) var(--chip-pad-x);
  border-radius: 14px;
  background: transparent;
}

.q-icon {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  transition: background .15s, transform .12s, border-color .15s, color .15s;
}

.q-icon svg { width: 22px; height: 22px; }

.q-icon:hover {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
}

/* ===== Withdraw Page Styles ===== */
main.page.withdraw {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  flex-direction: column;
  margin-top: 56px;
  background: #000000;
}

.withdraw .card {
  width: 100%;
  max-width: 800px;
  margin: 0 1em;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.withdraw .page-title {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 500;
  text-align: left;
}

.withdraw .alert {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 10px;
  text-align: center;
}

.withdraw .form-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.withdraw .row-1,
.withdraw .row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .withdraw .row-2 { 
    grid-template-columns: 1fr 1fr; 
  }
}

.withdraw .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.withdraw .field label {
  font-size: 12px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.2;
  margin: 1em 0 0.5em;
  padding: 0;
}

.withdraw .hint {
  font-size: 12px;
  color: orange;
  margin: 16px 0 0;
}

.withdraw input[type="number"],
.withdraw input[type="text"],
.withdraw select,
.withdraw textarea {
  width: 100%;
  height: auto;
  padding: 10px 16px;
  border-radius: 32px;
  border: 1px solid #2a2a2a;
  background: #000;
  color: #e5e7eb;
  transition: border .15s ease, box-shadow .15s ease, background .15s ease;
  font: inherit;
  font-weight: 300;
  box-sizing: border-box;
}

.withdraw textarea {
  min-height: 88px;
  height: auto;
  resize: vertical;
}

.withdraw input::placeholder,
.withdraw textarea::placeholder {
  color: #6b7280;
}

.withdraw input:focus,
.withdraw select:focus,
.withdraw textarea:focus {
  outline: none;
  border-color: var(--accent1);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, .18),
              0 0 0 4px rgba(251, 146, 60, .10);
}

/* Unified Select Styling */
.withdraw select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23ffffff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px;
}

.withdraw select:-moz-focusring {
  color: transparent;
  text-shadow: 0 0 0 #fff;
}

.withdraw select::-ms-expand {
  display: none;
}

.withdraw .form-cta { 
  margin-top: 1em; 
}

.withdraw .btn.primary {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 9999px;
  border: 1px solid #ffffff22;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
  font-weight: 600;
  letter-spacing: .2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .06s, filter .15s, box-shadow .15s;
}

.withdraw .btn.primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 18px rgba(255, 94, 0, .25);
}

.withdraw .btn.primary:active {
  transform: translateY(1px);
}

/* ===== Responsive ===== */
@media (max-width: 375px) {
  .card, .glass, .settings-card, .market-strip { padding: var(--card-pad); }
  .balance h1 { font-size: 1.25rem; }
}