/* Relleu Studio — pantalles d'entrada, instal·lació i administració */

.authbody, .adminbody { height: auto; min-height: 100%; background: var(--ground); }

/* ---------- entrada i instal·lació ---------- */
.authbody { display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.authcard {
  display: grid; grid-template-columns: 1fr 1fr; width: min(940px, 100%);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden;
}
.authcard.wide { grid-template-columns: 1fr; max-width: 640px; }
.authside {
  background: linear-gradient(160deg, #0a2440, #0e528f);
  color: #eaf2fa; padding: 38px 34px; display: flex; flex-direction: column; gap: 16px; justify-content: center;
}
.authside .logo { color: #fff; }
.authside .logo span { color: rgba(255, 255, 255, .65); }
.authside p { margin: 0; opacity: .9; font-size: 14.5px; }
.authside ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; opacity: .85; }
.authform { padding: 34px 32px; display: flex; flex-direction: column; gap: 15px; }
.authform h1 { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.authform .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.logo.big { font-size: 22px; }
.btn.big { justify-content: center; padding: 12px 18px; font-size: 15px; }
.small { font-size: 12.5px; color: var(--muted); margin: 0; }
.err, .ok { margin: 0; padding: 11px 13px; border-radius: 9px; font-size: 13.5px; font-weight: 600; }
.err { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.ok { background: var(--accent-soft); color: var(--accent); }
code { background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 1px 5px; border-radius: 5px; font-size: .92em; }

/* ---------- administració ---------- */
.adminbar {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
}
.adminbar .sp { flex: 1; }
.adminbar a.btn { text-decoration: none; }
.adminwrap { width: min(1060px, 100%); margin: 0 auto; padding: 22px 18px 70px; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.card h2 { font-family: var(--display); font-size: 17px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.card h3 { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 6px 0 0; }
.card p { margin: 0; }
.uhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.uhead code { margin-left: auto; }
.tagpill { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--panel); border: 1px solid var(--line); color: var(--muted); padding: 3px 8px; border-radius: 99px; }
.tagpill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.gridform { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; align-items: start; }
.gridform .field.end { align-self: end; }
.gridform .field.end .btn { width: 100%; justify-content: center; }
.field label.chk, .chk { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.35; color: var(--text); cursor: pointer; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); text-transform: none; letter-spacing: 0; font-weight: 500; }
.field label.chk input, .chk input { margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.field label.chk:hover, .chk:hover { border-color: var(--accent); }
.sub { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.sub summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.sub summary:hover { color: var(--accent); }
.sub .gridform { margin-top: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl small { color: var(--muted); }
.inline { display: flex; gap: 7px; align-items: center; }
.inline.right { justify-content: flex-end; }
.btn.danger { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: var(--danger); color: var(--danger); }

/* ---------- verificació en dos passos ---------- */
.otpin { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 22px; letter-spacing: .32em; text-align: center; }
.qrrow { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.qrbox { background: #fff; padding: 12px; border-radius: 12px; border: 1px solid var(--line); line-height: 0; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 17px; letter-spacing: .08em; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; word-break: break-all; }
.pass { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.pass li { padding-left: 2px; }
.codis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.codis code { display: block; text-align: center; padding: 10px 6px; font-size: 15px; letter-spacing: .06em; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.otppill { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; }
.otppill.on { background: var(--accent-soft); color: var(--accent); }
.otppill.off { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
@media print {
  .adminbar, .inline, .note, .sub { display: none !important; }
  .card { border: 0; }
}

/* ---------- avís de fitxers antics ---------- */
.stalewarn {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  background: #8a4b12; color: #fff; padding: 12px 18px; border-radius: 10px;
  font-size: 13px; font-weight: 600; max-width: min(520px, 92vw); z-index: 200;
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, .7);
}

/* ---------- menú d'usuari a l'editor ---------- */
.who { position: relative; }
.whomenu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column;
}
.whomenu a, .whomenu button {
  text-align: left; background: none; border: 0; border-radius: 7px; padding: 9px 11px;
  font-size: 13px; font-weight: 600; color: inherit; text-decoration: none; cursor: pointer;
}
.whomenu a:hover, .whomenu button:hover { background: var(--accent-soft); color: var(--accent); }
.themepick { padding: 9px 11px 11px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.themepick > span { display: block; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.themepick .seg { width: 100%; }
.themepick .seg button { flex: 1; padding: 6px 8px; text-align: center; border-radius: 7px; }
.themepick .seg button:hover { background: var(--accent-soft); color: var(--accent); }
.themepick .seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }

@media (max-width: 760px) {
  .authcard { grid-template-columns: 1fr; }
  .authside { display: none; }
  .authform { padding: 26px 20px; }
  .adminwrap { padding: 16px 12px 60px; }
  .card { padding: 16px; }
}

/* ---------- consultes rebudes ---------- */
.whomenu .pill { display: inline-block; min-width: 18px; margin-left: 7px; padding: 1px 6px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; text-align: center; }
.leads { display: flex; flex-direction: column; gap: 10px; }
.lead { border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; display: flex; flex-direction: column; gap: 7px; background: var(--surface); }
.lead.nova { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.lead .top { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.lead .top b { font-size: 15px; }
.lead .top .when { margin-left: auto; font-size: 12px; color: var(--muted); }
.lead .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.lead .msg { font-size: 14px; white-space: pre-line; }
.lead .acts { display: flex; gap: 7px; flex-wrap: wrap; }
.lead .acts .btn { font-size: 12.5px; padding: 6px 11px; }
.leadempty { color: var(--muted); font-size: 14px; margin: 0; }
#whoBtn .pill { background: var(--danger); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 800; padding: 1px 6px; margin-left: 6px; }

/* idioma de la interfície a les pantalles d'entrada */
.uilanghere{position:fixed;top:14px;right:14px;z-index:5}
.uilanghere .themepick{margin:0;padding:6px 8px;background:var(--surface);border:1px solid var(--line);border-radius:10px}

/* a la franja fosca de les pantalles d'entrada, sempre el logo de text blanc */
.authside .logo img.lt, :root .authside .logo img.lt { display: none !important; }
.authside .logo img.dk, :root .authside .logo img.dk { display: block !important; }
.logo.big img.lg { height: 44px; }
.logo.big { flex-direction: column; align-items: flex-start; gap: 6px; }

/* actualització des d'un zip (administració) */
.inlineform { display: flex; gap: 6px; align-items: center; }
.inlineform input[type="password"] { width: 130px; padding: 6px 8px; }

/* banda d'avís quan una administradora gestiona les webs d'un client */
.imperson { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; gap: 12px; align-items: center;
  flex-wrap: wrap; padding: 9px 16px; background: #8a4b12; color: #fff; font-size: 13px; }
.imperson span { opacity: .85; flex: 1; min-width: 160px; }
.imperson a { color: #fff; text-decoration: underline; font-weight: 600; }
.uhead .inline { margin-left: auto; }
body:has(.imperson) .app { padding-bottom: 44px; }
