/* =========================================================
   Tour Links — painel de controle de grupos VIP
   ========================================================= */
:root {
  --navy:        #003575;
  --navy-deep:   #002756;
  --cream:       #FFFEE4;
  --green-cta:   #A6D77A;
  --green-cta-deep: #7DB94C;
  --ink:         #0B2545;
  --line:        rgba(255,255,255,.16);
  --danger:      #FF6B6B;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--navy);
  color: #fff;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}
button { font: inherit; cursor: pointer; }
input  { font: inherit; }

#app {
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
}

.screen { display: flex; flex-direction: column; gap: 24px; min-height: calc(100dvh - 40px); }

/* ---------- BRAND (login) ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12vh;
}
.brand img { border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.brand h1 {
  font-size: 26px;
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.brand p { margin: 4px 0 0; opacity: 0.7; font-size: 14px; }

/* ---------- TOPBAR (list/edit) ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.topbar__title { flex: 1; min-width: 0; }
.topbar h1 {
  font-size: 22px;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.topbar p { margin: 2px 0 0; opacity: 0.65; font-size: 13px; }

.muted { opacity: 0.55; }

/* ---------- FORM ---------- */
.field { display: block; }
.field__label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.75;
}
.field__hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.55;
}
.field__hint code {
  background: rgba(255,255,255,0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11.5px;
}
input[type="password"],
input[type="url"],
input[type="text"] {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.01em;
  transition: border-color .15s, background .15s;
}
input:focus {
  outline: none;
  border-color: var(--green-cta);
  background: rgba(255,255,255,0.10);
}
input::placeholder { color: rgba(255,255,255,.35); }

#pin {
  text-align: center;
  font-size: 22px;
  letter-spacing: 0.4em;
  padding: 18px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 0;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn--primary {
  background: var(--green-cta);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--green-cta-deep);
  width: 100%;
  padding: 16px;
  font-size: 17px;
}
.btn--primary:hover { background: #B5E08F; }
.btn--ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  padding: 8px 14px;
  font-size: 14px;
}
.btn--ghost:hover { background: rgba(255,255,255,0.14); }

#btn-back {
  width: 40px; height: 40px;
  padding: 0;
  font-size: 18px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.actions .btn--primary { flex: 1; width: auto; }

/* ---------- LIST ---------- */
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.empty {
  text-align: center;
  opacity: 0.55;
  padding: 32px 12px;
  font-size: 14px;
}
.landing-row {
  display: block;
  text-align: left;
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  color: #fff;
  transition: background .15s, border-color .15s, transform .15s;
}
.landing-row:hover  { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,.28); }
.landing-row:active { transform: scale(.99); }
.landing-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.landing-row__label {
  font-weight: 700;
  font-size: 16px;
}
.landing-row__slug {
  font-size: 11.5px;
  opacity: 0.55;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: rgba(255,255,255,.06);
  padding: 2px 7px;
  border-radius: 4px;
}
.landing-row__url {
  font-size: 12.5px;
  opacity: 0.7;
  word-break: break-all;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.landing-row.is-placeholder .landing-row__url {
  color: var(--danger);
  opacity: 0.85;
}

/* ---------- FEEDBACK ---------- */
.error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.14);
  border: 1px solid rgba(255, 107, 107, 0.36);
  color: #ffd9d9;
  font-size: 14px;
}
.success {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(166, 215, 122, 0.18);
  border: 1px solid rgba(166, 215, 122, 0.46);
  color: var(--green-cta);
  font-size: 14px;
  font-weight: 600;
}
.meta {
  margin: 18px 0 0;
  font-size: 12px;
  opacity: 0.5;
}

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.32);
  z-index: 100;
  animation: toast-in .25s ease both;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.install-hint {
  margin-top: auto;
  padding: 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  font-size: 12.5px;
  opacity: 0.7;
  text-align: center;
}

/* ---------- LOGIN form layout ---------- */
#login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}

#edit-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 8px;
}

@media (min-width: 600px) {
  #app { padding-top: 40px; }
  .brand { margin-top: 8vh; }
}
