:root {
  --bg: #060b14;
  --bg-2: #0f1c2f;
  --card: rgba(18, 28, 46, 0.85);
  --accent: #5be5c8;
  --accent-2: #7ea8ff;
  --text: #f3f6ff;
  --muted: #93a6c5;
  --border: rgba(255,255,255,0.06);
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(4, 13, 34, 0.35);
  font-family: "DM Sans", "Inter", "SF Pro Display", "Segoe UI Variable", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(130% 90% at 12% 10%, #13243f, #060b14 58%),
              radial-gradient(90% 120% at 90% 0%, #0b3156, transparent 60%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-dot {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 28px rgba(91, 229, 200, 0.35);
}

.brand-text .title { font-weight: 800; letter-spacing: 0.2px; }
.brand-text .subtitle { color: var(--muted); font-size: 13px; }

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 6px rgba(91, 229, 200, 0.15);
}

.label { margin: 0; font-weight: 700; letter-spacing: 0.1px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 12px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field.inline {
  flex-direction: row;
  gap: 12px;
}

.field.inline > div { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.field.duo input { font-size: 26px; font-weight: 800; padding: 16px; }

label { color: var(--muted); font-size: 13px; }

input {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 229, 200, 0.2);
  background: rgba(255,255,255,0.06);
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 15px;
  color: #031024;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(91, 229, 200, 0.28);
  transition: transform 0.08s ease, box-shadow 0.18s ease, background 0.18s ease;
  touch-action: manipulation;
}

button:active { transform: translateY(1px) scale(0.99); }
button:hover { box-shadow: 0 12px 28px rgba(91, 229, 200, 0.32); }

button.ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}

button.ghost.danger { border-color: rgba(255, 107, 107, 0.4); color: var(--danger); }
button.small { padding: 8px 10px; font-size: 13px; }
button.primary { flex: 1; }
.actions button { flex: 1; }
button.tiny { padding: 8px 10px; font-size: 12px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 30px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--muted);
}

.pill.muted { background: rgba(255,255,255,0.04); color: var(--muted); }

.keypad {
  margin: 6px 0 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.keypad button {
  padding: 16px 12px;
  font-size: 18px;
  font-weight: 800;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}

.keypad button.wide {
  grid-column: span 2;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.list .item {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.item .item-body {
  border: none;
  background: transparent;
  text-align: left;
  padding: 0;
  color: inherit;
}

.item strong { font-size: 16px; }
.item .meta { color: var(--muted); font-size: 12px; }

.right { display: flex; align-items: flex-end; justify-content: flex-end; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(120%);
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(6, 11, 20, 0.95);
  border: 1px solid var(--border);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  max-width: 420px;
  text-align: center;
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 720px) {
  .top { flex-direction: column; align-items: flex-start; }
  .status-row { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .grid { grid-template-columns: 1fr; }
  .field.inline { flex-direction: column; }
  .actions { flex-direction: column; }
  .actions button { width: 100%; }
  .list .item { grid-template-columns: 1fr; }
}
