/* Approved workspace sign-in surfaces (Restaurant OS + Platform Admin).
 *
 * Ported verbatim from apps/web/src/app/globals.css at the pre-consolidation
 * main commit (the deleted WorkspaceLogin component's styles). These render the
 * LAST APPROVED login visuals inside the ONE canonical query-based SPA at
 * /?mode=restaurant and /?mode=admin. Customer auth is unaffected.
 * Desktop + tablet + mobile responsive behavior is preserved exactly. */

.workspace-login {
  --login-forest: #142d25;
  --login-ivory: #f7f5ef;
  --login-border: #dedbd2;
  --login-muted: #6d706d;
  min-height: 100svh;
  background: var(--login-ivory);
  color: var(--login-forest);
}

.workspace-login svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.workspace-login-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.55rem;
}

.workspace-login-form label {
  display: grid;
  gap: 0.58rem;
  color: #172820;
  font-size: 0.91rem;
  font-weight: 650;
}

.workspace-login-form input {
  width: 100%;
  height: 3.15rem;
  border: 1px solid #d7d8d4;
  border-radius: 0.78rem;
  outline: none;
  background: rgba(255, 255, 255, 0.82);
  padding: 0 1.05rem;
  color: #172820;
  font-size: 0.98rem;
  font-weight: 450;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.workspace-login-form input::placeholder {
  color: #a4a7a5;
}

.workspace-login-form input:focus {
  border-color: #2c6554;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(44, 101, 84, 0.12);
}

.workspace-password-field {
  position: relative;
  display: block;
}

.workspace-password-field input {
  padding-right: 3.35rem;
}

.workspace-password-field button {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  translate: 0 -50%;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #747977;
  cursor: pointer;
}

.workspace-password-field button:hover {
  background: #f1f1ed;
  color: var(--login-forest);
}

.workspace-login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.55rem;
  margin-top: 0.2rem;
  border: 0;
  border-radius: 0.85rem;
  background: linear-gradient(115deg, #173f35, #0f392e);
  padding: 0.8rem 1.1rem;
  color: #fff;
  font-size: 0.97rem;
  font-weight: 680;
  box-shadow: 0 9px 22px rgba(20, 45, 37, 0.16);
  cursor: pointer;
  transition: translate 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.workspace-login-submit span {
  flex: 1;
  text-align: center;
}

.workspace-login-submit svg {
  width: 1.2rem;
  height: 1.2rem;
}

.workspace-login-submit:hover:not(:disabled) {
  translate: 0 -1px;
  box-shadow: 0 12px 28px rgba(20, 45, 37, 0.22);
}

.workspace-login-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.workspace-login-error {
  margin: -0.2rem 0 0;
  border: 1px solid #efc9c3;
  border-radius: 0.75rem;
  background: #fff4f1;
  padding: 0.75rem 0.85rem;
  color: #9e3d2e;
  font-size: 0.82rem;
  font-weight: 550;
  line-height: 1.45;
}

.workspace-login-intro {
  margin: 0.45rem 0 0;
  color: var(--login-muted);
  font-size: 1.02rem;
  line-height: 1.5;
}

.workspace-login-assurance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--login-border);
  padding-top: 1rem;
  color: #777b79;
  font-size: 0.79rem;
  line-height: 1.4;
}

.workspace-login-assurance svg {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  color: #6b746f;
}

.workspace-login-platform {
  position: relative;
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.platform-login-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.45rem;
  border-bottom: 1px solid rgba(196, 193, 184, 0.58);
  padding: 0.65rem clamp(1.35rem, 4vw, 3.75rem);
}

.platform-login-header > img {
  width: 10.5rem;
  height: auto;
}

.platform-login-header > span {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #707573;
  font-size: 0.91rem;
  font-weight: 520;
}

.platform-login-stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 1.5rem 1.5rem 1rem;
}

.platform-login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 29rem);
  border: 1px solid rgba(203, 202, 196, 0.78);
  border-radius: 1.45rem;
  background: rgba(255, 255, 255, 0.86);
  padding: clamp(1.45rem, 3vw, 2.2rem);
  box-shadow: 0 22px 54px rgba(54, 60, 56, 0.08);
  backdrop-filter: blur(18px);
}

.platform-login-badge {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 0.92rem;
  background: linear-gradient(145deg, #245b4a, #0e352b);
  color: #fff;
  box-shadow: 0 9px 18px rgba(20, 45, 37, 0.18);
}

.platform-login-badge svg {
  width: 1.55rem;
  height: 1.55rem;
}

.workspace-login-eyebrow {
  margin: 1rem 0 0;
  color: #727775;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.platform-login-card h1 {
  margin: 0.55rem 0 0;
  color: #123b30;
  font-size: clamp(2.15rem, 4vw, 2.7rem);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.platform-login-ribbon {
  position: absolute;
  right: -12rem;
  bottom: -12rem;
  width: 38rem;
  height: 29rem;
  rotate: -8deg;
  border: 2px solid rgba(35, 73, 61, 0.065);
  border-radius: 48% 52% 0 0;
}

.platform-login-ribbon::after {
  position: absolute;
  inset: 3.7rem 4.3rem -5rem;
  border: 2px solid rgba(35, 73, 61, 0.05);
  border-radius: inherit;
  content: "";
}

.workspace-login-platform > footer,
.restaurant-login-panel > footer {
  position: relative;
  z-index: 2;
  padding: 0.75rem 1rem 1rem;
  color: #777b79;
  font-size: 0.72rem;
  text-align: center;
}

.workspace-login-restaurant {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.13fr) minmax(30rem, 0.87fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding: 1.45rem;
}

.restaurant-login-visual {
  position: relative;
  min-height: calc(100svh - 2.9rem);
  overflow: hidden;
  border-radius: 1.75rem;
  background: #27372f;
  box-shadow: 0 18px 54px rgba(28, 33, 29, 0.15);
}

.restaurant-login-visual > img:first-child {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.restaurant-login-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 21, 16, 0.12) 30%, rgba(6, 19, 14, 0.12) 48%, rgba(6, 16, 12, 0.82) 100%);
}

.restaurant-login-logo {
  position: absolute;
  top: clamp(2rem, 4vw, 3rem);
  left: clamp(2rem, 4vw, 3.2rem);
  width: clamp(10rem, 17vw, 13rem);
  height: auto;
}

.restaurant-login-copy {
  position: absolute;
  right: clamp(2rem, 5vw, 4rem);
  bottom: clamp(2.5rem, 6vw, 4.7rem);
  left: clamp(2rem, 5vw, 4rem);
  color: #fff;
}

.restaurant-login-copy p {
  margin: 0 0 1.05rem;
  font-size: 0.72rem;
  font-weight: 680;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.restaurant-login-copy h1 {
  max-width: 42rem;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.65rem, 5vw, 4.35rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.03;
}

.restaurant-login-copy span {
  display: block;
  margin-top: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
}

.restaurant-login-panel {
  display: grid;
  min-height: calc(100svh - 2.9rem);
  grid-template-rows: 1fr auto;
}

.restaurant-login-content {
  align-self: center;
  width: min(100%, 29.8rem);
  margin: 0 auto;
  padding: 3rem 1rem 1.5rem;
}

.restaurant-workspace-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 999px;
  background: #dde6db;
  padding: 0.68rem 1rem;
  color: #24443a;
  font-size: 0.79rem;
  font-weight: 550;
}

.restaurant-workspace-pill svg {
  width: 1.25rem;
  height: 1.25rem;
}

.restaurant-login-content h2 {
  margin: 1.5rem 0 0;
  color: #123b30;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 5vw, 4.15rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1;
}

.restaurant-login-content .workspace-login-form {
  margin-top: 2.55rem;
}

@media (max-width: 960px) {
  .workspace-login-restaurant {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .restaurant-login-visual {
    min-height: 27rem;
  }

  .restaurant-login-panel {
    min-height: auto;
  }

  .restaurant-login-content {
    padding-block: 4rem 2rem;
  }
}

@media (max-width: 600px) {
  .platform-login-header {
    min-height: 4.35rem;
  }

  .platform-login-header > img {
    width: 8rem;
  }

  .platform-login-header > span {
    font-size: 0;
  }

  .platform-login-stage {
    align-items: start;
    padding: 2rem 1rem;
  }

  .platform-login-card {
    padding: 1.6rem;
  }

  .workspace-login-restaurant {
    padding: 0;
  }

  .restaurant-login-visual {
    min-height: 22rem;
    border-radius: 0 0 1.7rem 1.7rem;
  }

  .restaurant-login-logo {
    top: 1.5rem;
    left: 1.5rem;
    width: 9rem;
  }

  .restaurant-login-copy {
    right: 1.5rem;
    bottom: 2rem;
    left: 1.5rem;
  }

  .restaurant-login-copy h1 {
    font-size: 2.45rem;
  }

  .restaurant-login-copy span {
    font-size: 0.88rem;
  }

  .restaurant-login-content {
    padding: 3rem 1.35rem 1.5rem;
  }

  .restaurant-login-content h2 {
    font-size: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-login *,
  .workspace-login *::before,
  .workspace-login *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
