/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'IBM Plex Mono', monospace; }

:root {
  --bg: #e5e5e5;
  --fg: #000000;
  --border: #000000;
  --accent: #ffffff;
  --gray: #888888;
  --red: #cc0000;
  --green: #008800;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* HEADER */
.top-bar {
  border-bottom: 2px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  font-weight: 700;
  background: var(--fg);
  color: var(--bg);
}
.status .blink { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* LAYOUT */
.layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* SIDEBAR */
.sidebar {
  width: 240px;
  border-right: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.menu-label { padding: 15px; font-size: 0.8rem; font-weight: 700; border-bottom: 1px solid var(--border); }
.nav-menu { display: flex; flex-direction: column; }
.nav-btn {
  padding: 15px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.1s;
}
.nav-btn:hover { background: var(--fg); color: var(--bg); }
.nav-btn.active { background: var(--fg); color: var(--bg); }

.terminal-log {
  margin-top: auto;
  padding: 15px;
  font-size: 0.7rem;
  color: var(--gray);
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

/* CONTENT */
.content-area {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}
.view { display: none; }
.view.active { display: block; animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border);
  padding-bottom: 15px;
  margin-bottom: 20px;
}
.view-header h1 { font-size: 1.5rem; font-weight: 700; }
.badge { background: var(--fg); color: var(--bg); padding: 4px 8px; font-size: 0.7rem; font-weight: 700; }

/* STEPS */
.step { display: none; }
.step.active { display: block; }
.desc { font-size: 0.9rem; font-weight: 600; margin-bottom: 15px; }
.btn-back {
  background: none; border: 1px solid var(--border); padding: 5px 10px;
  font-size: 0.8rem; font-weight: 700; cursor: pointer; margin-bottom: 15px;
}
.btn-back:hover { background: var(--fg); color: var(--bg); }

/* GRID LIST */
.grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.card-item {
  border: 2px solid var(--border);
  padding: 15px;
  cursor: pointer;
  background: var(--bg);
  transition: 0.1s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-item:hover { background: var(--fg); color: var(--bg); }
.card-title { font-weight: 700; font-size: 0.9rem; }
.card-price { font-size: 0.8rem; }

/* PAYMENT */
.qr-box {
  border: 2px solid var(--border);
  background: white;
  padding: 10px;
  display: inline-block;
  margin-bottom: 15px;
}
.qr-box img { width: 200px; height: 200px; object-fit: contain; }
.big-text { font-size: 2rem; font-weight: 700; margin-bottom: 20px; }
.btn-row { display: flex; gap: 10px; justify-content: center; }

.btn { padding: 12px 20px; border: 2px solid var(--border); font-weight: 700; cursor: pointer; font-size: 0.9rem; transition: 0.1s; }
.btn.primary { background: var(--fg); color: var(--bg); }
.btn.danger { background: var(--red); color: white; border-color: var(--red); }
.btn.outline { background: transparent; color: var(--fg); }
.btn:hover { opacity: 0.8; }
.w-full { width: 100%; }
.mt-2 { margin-top: 10px; }
.text-center { text-align: center; }

.success-mark { font-size: 3rem; font-weight: 700; margin: 20px 0; }
.number-box { border: 2px dashed var(--border); padding: 20px; display: inline-block; }

/* HISTORY */
.tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 2px solid var(--border); padding-bottom: 10px; }
.tab { background: none; border: 1px solid var(--border); padding: 8px 16px; font-weight: 700; cursor: pointer; }
.tab.active { background: var(--fg); color: var(--bg); }

.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
  border: 1px solid var(--border);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.history-info h3 { font-size: 0.9rem; }
.history-info p { font-size: 0.75rem; color: var(--gray); }
.history-price { font-weight: 700; font-size: 1rem; }
.badge-status { display: inline-block; padding: 2px 6px; font-size: 0.65rem; font-weight: 700; border: 1px solid var(--border); margin-top: 5px; }
.badge-status.success { background: var(--green); color: white; border-color: var(--green); }
.badge-status.pending { background: #ffcc00; color: black; border-color: #ffcc00; }

/* INFO BLOCK */
.info-block { border: 2px solid var(--border); padding: 20px; margin-bottom: 20px; }
.info-block h3 { font-size: 1rem; margin-bottom: 10px; border-bottom: 1px solid var(--border); padding-bottom: 5px; }
.info-block ol { padding-left: 20px; font-size: 0.9rem; line-height: 1.8; }

/* LOADER */
.loader {
  position: fixed; inset: 0; background: rgba(229,229,229,0.9);
  display: flex; justify-content: center; align-items: center; z-index: 999;
}
.loader.hidden { display: none; }
.loader-text { font-size: 1.5rem; font-weight: 700; animation: blink 0.8s infinite; }

@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 2px solid var(--border); }
  .terminal-log { display: none; }
  .nav-menu { flex-direction: row; overflow-x: auto; }
  .nav-btn { flex: 1; text-align: center; border-bottom: none; border-right: 1px solid var(--border); }
}
