/* Machwale Workshop — mobile-first login (PWA entry) */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body.ws-login-app {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
}

body.ws-login-app {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #eef1f5;
  color: #0f172a;
  -webkit-text-size-adjust: 100%;
}

.ws-login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
}

.ws-login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 420px;
  margin-bottom: 20px;
}

.ws-login-brand img {
  height: 72px;
  width: auto;
  max-width: 100%;
  margin-bottom: 10px;
}

.ws-login-brand__title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
}

.ws-login-brand__sub {
  margin: 6px 0 0;
  font-size: 14px;
  color: #64748b;
}

.ws-login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e8f0;
}

.ws-login-card__title {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.ws-login-expired {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.ws-login-submit:disabled {
  opacity: 0.72;
  cursor: wait;
}

.ws-login-field {
  margin-bottom: 14px;
}

.ws-login-field:last-of-type {
  margin-bottom: 18px;
}

.ws-login-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.4;
  color: #0f172a;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ws-login-input:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.ws-login-input.is-invalid {
  border-color: #dc2626;
}

.ws-login-error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #dc2626;
}

.ws-login-submit {
  display: block;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: #1d4ed8;
  cursor: pointer;
}

.ws-login-submit:active {
  background: #1e40af;
}

.ws-login-foot {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12px;
}

.ws-login-foot a {
  color: #1d4ed8;
  text-decoration: none;
}

/* Desktop: optional side hero (hidden on phones) */
.ws-login-hero {
  display: none;
}

@media (min-width: 768px) {
  body.ws-login-app {
    background: #fff;
  }

  .ws-login-page {
    flex-direction: row;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    max-width: none;
  }

  .ws-login-hero {
    display: flex;
    flex: 1 1 45%;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: #eef1f5;
    background-position: center bottom;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
  }

  .ws-login-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.45);
  }

  .ws-login-hero__inner {
    position: relative;
    z-index: 1;
    text-align: center;
  }

  .ws-login-hero__inner img {
    height: 80px;
    width: auto;
  }

  .ws-login-hero__inner p {
    margin: 12px 0 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
  }

  .ws-login-main {
    flex: 1 1 55%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #eef1f5;
  }

  .ws-login-brand {
    display: none;
  }
}

@media (max-width: 767px) {
  .ws-login-main {
    width: 100%;
    max-width: 420px;
  }
}
