:root {
  --bg: #16161e;
  --panel: #1e1f2b;
  --panel2: #262838;
  --line: #34374d;
  --txt: #e6e9f2;
  --mut: #8b90a8;
  --accent: #89b4fa;
  --accent2: #f9b387;
  --ok: #a6e3a1;
  --warn: #f9e2af;
  --red: #f38ba8;
  --viol: #cba6f7;
}

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

body {
  background: #0d0d12;
  color: var(--txt);
  font-family: system-ui, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 18px 0;
}

.phone {
  width: 390px;
  max-width: 100vw;
  background: var(--bg);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid #2a2c3c;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  font-size: 15px;
  flex-shrink: 0;
}

header b { color: var(--accent); }

main {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.ctxh {
  font-size: 9.5px;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.coupes-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.coupe-tile {
  flex: 1 1 calc(33% - 8px);
  min-width: 90px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--txt);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s;
}

.coupe-tile:hover { border-color: var(--accent); }
.coupe-tile .ico { font-size: 22px; }
.coupe-tile .lbl { font-size: 10.5px; line-height: 1.3; }

.coupe-tile.entry {
  flex: 1 1 100%;
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 14px;
  border-color: var(--accent2);
}

.coupe-tile.entry .ico { font-size: 28px; }
.coupe-tile.entry .lbl { font-size: 12px; text-align: left; }
.coupe-tile.entry .sublbl { font-size: 10px; color: var(--mut); text-align: left; }

.lock-col {
  flex: 1 1 calc(33% - 8px);
  min-width: 90px;
  display: flex;
  flex-direction: column;
}

.lock-name {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  padding: 8px 6px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
}

.lockbody {
  flex: 1;
  border: 1px dashed var(--line);
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: repeating-linear-gradient(45deg,#1a1b24,#1a1b24 6px,#16171f 6px,#16171f 12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  text-align: center;
}

.lockbody .ico { font-size: 18px; opacity: .7; }
.lockbody .st { font-size: 9px; color: var(--mut); line-height: 1.3; }
.lockbody .no { font-size: 9px; color: var(--red); border: 1px solid var(--red); border-radius: 20px; padding: 2px 6px; }

.info-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11px;
  color: #cfd3e6;
  line-height: 1.5;
}

.info-panel b { color: var(--accent); }

/* Coupe pages */
.back-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.coupe-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pending-badge {
  background: var(--panel);
  border: 1px dashed var(--accent2);
  border-radius: 10px;
  padding: 14px 12px;
  font-size: 11px;
  color: var(--accent2);
  line-height: 1.5;
  text-align: center;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 11px;
  color: var(--mut);
}

.form-group input {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--txt);
  font-size: 14px;
  padding: 9px 12px;
  font-family: inherit;
  width: 100%;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group input::placeholder { color: var(--mut); }

button.submit-btn {
  padding: 11px 0;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #0d0d12;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  width: 100%;
}

button.submit-btn:hover { opacity: 0.85; }

.result-msg {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
  color: var(--mut);
  line-height: 1.5;
  min-height: 36px;
}

.err { font-size: 11px; color: var(--red); padding: 8px; }

@media (max-width: 420px) {
  .phone { border-radius: 0; border-left: none; border-right: none; min-height: 100vh; }
  body { padding: 0; }
}
