:root {
  --ss-navy: #2A3F54;
  --ss-teal: #1ABB9C;
  --ss-teal-dark: #169F85;
  --ss-accent: #0A929D;
  --ss-text: #2A3F54;
  --ss-muted: #6b7c8a;
  --ss-line: #e4ebf0;
  --ss-white: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ss-text);
  background:
    radial-gradient(circle at top right, rgba(26, 187, 156, 0.16), transparent 34%),
    radial-gradient(circle at bottom left, rgba(10, 146, 157, 0.14), transparent 30%),
    var(--ss-navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 16px 40px;
}

.login-panel {
  width: 100%;
  max-width: 460px;
  background: var(--ss-white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.login-banner {
  width: 100%;
  aspect-ratio: 3 / 1;
  background: url("/img/smartSignBanner.png") center center / cover no-repeat;
}

.card {
  background: var(--ss-white);
  width: 100%;
  margin: 0;
  border-radius: 0;
  border-top: 3px solid var(--ss-teal);
  padding: 28px 24px 26px;
  box-shadow: none;
  text-align: center;
  position: relative;
  z-index: 2;
}

h1 {
  margin: 0 0 10px;
  color: var(--ss-navy);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--ss-muted);
  line-height: 1.5;
  margin: 0 0 20px;
}

.install-btn {
  background: var(--ss-teal);
  color: var(--ss-white);
  border: 1px solid var(--ss-teal);
  padding: 14px 28px;
  font-size: 1.02rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  min-height: 50px;
  box-shadow: 0 8px 18px rgba(26, 187, 156, 0.28);
  transition: transform 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.install-btn:hover {
  background: var(--ss-teal-dark);
  border-color: var(--ss-teal-dark);
  transform: translateY(-1px);
}

.install-btn:active {
  transform: translateY(1px);
}

.status-message,
.ios-instructions {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.status-message {
  background: rgba(26, 187, 156, 0.1);
  border: 1px solid rgba(26, 187, 156, 0.35);
  color: var(--ss-teal-dark);
  font-weight: 500;
}

.ios-instructions {
  background: #f5f8fa;
  border: 1px dashed var(--ss-accent);
  color: var(--ss-text);
  text-align: left;
}

.ios-instructions ol {
  margin: 8px 0 0 18px;
}

.ios-instructions li {
  margin-bottom: 6px;
}

.icon-share {
  font-weight: 700;
  color: #007aff;
}

.qr-panel {
  margin-top: 8px;
  padding-top: 8px;
}

.qr-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 16px;
  color: var(--ss-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qr-divider::before,
.qr-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ss-line);
}

.qr-frame {
  width: min(230px, 100%);
  height: 230px;
  margin: 0 auto;
  padding: 12px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--ss-line);
  box-shadow: 0 8px 24px rgba(42, 63, 84, 0.08);
}

.qr-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.apple-logo {
  margin: 14px 0 0;
  color: var(--ss-navy);
}

.apple-logo svg {
  width: 28px;
  height: auto;
  fill: currentColor;
}

.qr-text {
  margin: 10px 0 0;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ss-muted);
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 18px;
  padding: 13px 28px;
  border-radius: 10px;
  background: #fff;
  color: var(--ss-accent);
  border: 2px solid var(--ss-accent);
  font-size: 1.02rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.back-btn:hover {
  background: rgba(10, 146, 157, 0.06);
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  body {
    --ss-top-gap: env(safe-area-inset-top, 0px);
    padding: var(--ss-top-gap) 16px 24px;
    align-items: stretch;
  }

  .login-panel {
    max-width: none;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .login-banner {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    aspect-ratio: 3 / 1;
    background-image: url("/img/smartSignBanner-mobile.png");
    border-radius: 0;
  }

  .card {
    margin-top: -36px;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    padding: 22px 18px 20px;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 1.35rem;
  }

  .qr-frame {
    width: 200px;
    height: 200px;
  }
}
