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

:root {
  --orange: #ff5500;
  --orange-dim: #cc3300;
  --orange-glow: rgba(255, 85, 0, 0.45);
  --orange-faint: rgba(255, 85, 0, 0.10);
  --green: #00e676;
  --red: #ff1744;
  --bg: #080808;
  --bg2: #0f0f0f;
  --bg3: #161616;
  --border: rgba(255, 85, 0, 0.30);
  --text: #e8e8e8;
  --text-dim: #777;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.07) 2px, rgba(0,0,0,0.07) 4px);
  pointer-events: none;
  z-index: 9999;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(200,30,0,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(200,30,0,0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.page {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  padding: 0 0 30px;
}

/* ── Header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--orange-faint);
  gap: 12px;
}

.page-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 14px var(--orange-glow);
}

.back-btn {
  font-size: 13px;
  color: var(--orange);
  cursor: pointer;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 12px;
  transition: all 0.2s;
  white-space: nowrap;
}
.back-btn:hover { border-color: var(--orange); box-shadow: 0 0 8px var(--orange-glow); }

/* ── Card ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  margin: 16px 20px 0;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 16px; height: 16px;
  border-top: 2px solid var(--orange);
  border-left: 2px solid var(--orange);
}
.card::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 16px; height: 16px;
  border-bottom: 2px solid var(--orange);
  border-right: 2px solid var(--orange);
}

/* ── Form elements ── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

input::placeholder, textarea::placeholder { color: var(--text-dim); }

input:focus, select:focus, textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 10px var(--orange-glow);
}

select { cursor: pointer; }
select option { background: var(--bg3); }

textarea { resize: vertical; min-height: 80px; }

/* ── Buttons ── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #ff6600, #cc2200);
  color: #fff;
  box-shadow: 0 0 16px var(--orange-glow);
}
.btn-primary:hover { box-shadow: 0 0 28px var(--orange-glow); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 1px solid var(--orange);
}
.btn-outline:hover { box-shadow: 0 0 12px var(--orange-glow); background: var(--orange-faint); }

.btn-danger {
  background: linear-gradient(135deg, #cc0022, #880011);
  color: #fff;
  box-shadow: 0 0 14px rgba(255,23,68,0.4);
}
.btn-danger:hover { box-shadow: 0 0 24px rgba(255,23,68,0.6); }

.btn-success {
  background: linear-gradient(135deg, #00c853, #007733);
  color: #fff;
  box-shadow: 0 0 14px rgba(0,200,83,0.4);
}
.btn-success:hover { box-shadow: 0 0 24px rgba(0,200,83,0.5); }

.btn-sm {
  width: auto;
  padding: 7px 16px;
  font-size: 11px;
}

/* ── Status badges ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.badge-pending  { background: rgba(255,165,0,0.15); color: orange; border: 1px solid rgba(255,165,0,0.4); }
.badge-confirmed{ background: rgba(0,200,83,0.12); color: var(--green); border: 1px solid rgba(0,200,83,0.4); }
.badge-rejected { background: rgba(255,23,68,0.12); color: var(--red); border: 1px solid rgba(255,23,68,0.4); }
.badge-expired  { background: rgba(100,100,100,0.15); color: #888; border: 1px solid rgba(100,100,100,0.4); }

/* ── Tabs ── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin: 16px 20px 0;
  gap: 0;
}

.tab {
  flex: 1;
  padding: 11px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--orange); border-bottom-color: var(--orange); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Toast ── */
.toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: var(--bg3);
  border: 1px solid var(--orange);
  box-shadow: 0 0 20px var(--orange-glow);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 9998;
  white-space: nowrap;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--red); box-shadow: 0 0 20px rgba(255,23,68,0.4); }
.toast.success { border-color: var(--green); box-shadow: 0 0 20px rgba(0,200,83,0.4); }

/* ── Divider ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 16px 0;
}

/* ── Info rows ── */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,85,0,0.08);
  font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-dim); }
.info-row .value { font-weight: 600; }

/* ── Copy block ── */
.copy-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 14px;
}
.copy-wrap .copy-text {
  flex: 1;
  font-family: monospace;
  font-size: 13px;
  color: var(--orange);
  word-break: break-all;
}
.copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-dim);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.copy-btn:hover { border-color: var(--orange); color: var(--orange); }

/* ── Link ── */
a.link {
  color: var(--orange);
  text-decoration: none;
  font-size: 13px;
}
a.link:hover { text-decoration: underline; }

/* ── Spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ── */
.empty {
  text-align: center;
  color: var(--text-dim);
  padding: 40px 20px;
  font-size: 14px;
}

/* ── Nav bottom ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(255,85,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 10px 14px;
  z-index: 100;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
  text-decoration: none;
}
.nav-item:hover, .nav-item.active { color: var(--orange); filter: drop-shadow(0 0 5px var(--orange-glow)); }
.nav-icon { font-size: 20px; }

/* ── Table ── */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.tbl td {
  padding: 10px;
  border-bottom: 1px solid rgba(255,85,0,0.07);
  vertical-align: top;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--orange-faint); }

/* ── Countdown ── */
.countdown { font-size: 12px; color: orange; font-weight: 600; }
.countdown.urgent { color: var(--red); }

@media (max-width: 540px) {
  .page { max-width: 100%; }
  .page-title { font-size: 15px; }
}
