@import "global.css";

/* ChefBox v2 — /entrar (role picker + login) */

.topbar-entrar {
  grid-template-columns: auto 1fr auto;
}

.entrar-main {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s-6);
  min-height: calc(100vh - 200px);
}

.pane { display: none; }
.pane.active, .pane:not([hidden]) { display: block; }

.pane-head {
  text-align: center;
  margin-bottom: var(--s-8);
  position: relative;
}
.pane-head h1 {
  margin: 0 0 var(--s-2);
  font-size: 32px; font-weight: 800;
  color: var(--ink-strong);
  letter-spacing: -.02em;
}
.pane-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.back-inline {
  position: absolute;
  left: 0; top: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 13px; font-weight: 600;
  border-radius: var(--r-full);
  transition: var(--fast) var(--ease);
}
.back-inline:hover { background: var(--surface); color: var(--ink-strong); }
.back-inline svg { width: 15px; }

/* ============================================
   ROLE PICKER
   ============================================ */
.role-grid {
  display: grid;
  gap: var(--s-4);
}
@media (min-width: 720px) {
  .role-grid { grid-template-columns: 1fr; }
}

.role-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-5);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-align: left;
  transition: var(--fast) var(--ease);
  cursor: pointer;
  grid-template-areas:
    "icon title"
    "icon desc";
}
.role-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.role-icon {
  grid-area: icon;
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
}
.role-icon svg { width: 30px; }
.role-card strong {
  grid-area: title;
  font-size: 17px; font-weight: 800;
  color: var(--ink-strong);
}
.role-card span {
  grid-area: desc;
  font-size: 13px; color: var(--muted);
  line-height: 1.5;
}

/* ============================================
   FORM (customer/courier)
   ============================================ */
.entrar-form {
  display: grid;
  gap: var(--s-4);
  max-width: 460px;
  margin: 0 auto;
}
.entrar-form .form-field label {
  font-size: 13px; font-weight: 700;
  color: var(--ink-strong);
  margin-bottom: 6px;
  display: block;
}
.entrar-form .form-field label small {
  font-weight: 400; color: var(--muted);
}
.entrar-form .form-field input,
.entrar-form .form-field select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 15px;
  outline: 0;
  transition: var(--fast) var(--ease);
  background: var(--bg);
}
.entrar-form .form-field input:focus,
.entrar-form .form-field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.entrar-form .help {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.entrar-form .primary-cta {
  margin-top: var(--s-2);
  height: 52px;
  font-size: 15px;
}
.entrar-note {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: var(--s-4) 0 0;
}

/* ============================================
   STORE OPTIONS
   ============================================ */
.store-options {
  display: grid;
  gap: var(--s-3);
  max-width: 560px;
  margin: 0 auto;
}
.store-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: var(--fast) var(--ease);
}
.store-option:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.store-option-existing {
  border-style: dashed;
  background: var(--surface);
}
.option-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
}
.option-icon svg { width: 22px; }
.option-body strong {
  display: block;
  font-size: 15px; font-weight: 700;
  color: var(--ink-strong);
  margin-bottom: 3px;
}
.option-body span {
  font-size: 13px; color: var(--muted);
  line-height: 1.4;
}
.option-chev {
  width: 20px;
  color: var(--muted-2);
}

/* Link inline dentro do entrar-note (ex: "Enviar de novo") */
.link-inline {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
}
.link-inline:hover { color: #b8121e; }
.link-inline:disabled { opacity: 0.5; cursor: default; text-decoration: none; }

/* Input do codigo OTP: destacar */
#fldOtpCode {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  border-style: dashed;
  background: var(--surface);
}
#fldOtpCode:focus { border-style: solid; background: var(--bg); }
#fldOtpCode::placeholder { letter-spacing: 0.15em; font-weight: 400; font-size: 20px; opacity: .5; }
#fldOtpCode.otp-pasted { border-color: var(--success) !important; background: var(--success-tint) !important; box-shadow: 0 0 0 3px rgba(80,167,115,.2) !important; transition: none; }
#fldOtpCode.otp-pasted::selection { background: var(--success); color: #fff; }
.role-customer{background:#fdecea;color:#EA1D2C}
.role-store{background:#eaf7ee;color:#177245}
.role-courier{background:#f2ecfb;color:#5b3aa8}
.opt-marketplace{background:#fef3e3;color:#a35907}
.opt-erp{background:#eaf7ee;color:#177245}
.opt-existing{background:#e9f3fb;color:#1a5a91}
