/* NCD Plus Solution AI — Login */
html {
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

body.login-page {
  display: block;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Kanit', system-ui, sans-serif;
  font-size: 12px;
  background: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── Left panel ── */
.login-brand {
  position: relative;
  padding: 3.5rem 3.5rem 2.5rem;
  background: linear-gradient(168deg, #0e5285 0%, #0a3d6e 30%, #072f52 65%, #041e36 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 90% 80% at 30% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.login-brand-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 180, 228, 0.2) 0%, transparent 65%);
  top: -180px;
  right: -160px;
  pointer-events: none;
  animation: glow-drift 12s ease-in-out infinite alternate;
}

.login-brand-glow--2 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(94, 200, 242, 0.1) 0%, transparent 70%);
  bottom: -100px;
  left: -80px;
  top: auto;
  right: auto;
  animation-delay: -4s;
}

.login-brand-line {
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(94, 200, 242, 0.25), transparent);
}

@keyframes glow-drift {
  from { transform: translate(0, 0); }
  to { transform: translate(-20px, 16px); }
}

.login-brand-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fade-up 0.6s ease-out;
}

.login-brand-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.login-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 20px;
  background: #fff;
  padding: 12px;
  margin-bottom: 1.5rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 0 6px rgba(0, 180, 228, 0.12),
    0 12px 40px rgba(0, 0, 0, 0.25);
}

.login-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.333rem 0.833rem 0.333rem 0.583rem;
  border-radius: 999px;
  border: 1px solid rgba(94, 200, 242, 0.3);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  color: #a8e4f7;
  font-size: 0.667rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.login-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ec8f2;
  box-shadow: 0 0 10px rgba(94, 200, 242, 0.8);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.login-brand-title {
  margin: 0 0 0.75rem;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
}

.login-brand-ai {
  color: #00b4e4;
  background: linear-gradient(90deg, #5ec8f2 0%, #00b4e4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-brand-desc {
  margin: 0;
  font-size: 1.083rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.7;
  max-width: 340px;
}

.login-features-panel {
  padding: 1.25rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-features-heading {
  margin: 0 0 1rem;
  font-size: 0.667rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(94, 200, 242, 0.85);
}

.login-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.583rem;
}

.login-features--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.login-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.6rem 0.65rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}

.login-features li:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(94, 200, 242, 0.2);
  transform: translateX(4px);
}

.login-feature-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(0, 180, 228, 0.2), rgba(0, 180, 228, 0.06));
  border: 1px solid rgba(94, 200, 242, 0.25);
  display: grid;
  place-items: center;
  color: #7dd3f0;
}

.login-feature-icon--health {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.28);
}

.login-feature-icon--ai {
  color: #818cf8;
  background: rgba(129, 140, 248, 0.14);
  border-color: rgba(129, 140, 248, 0.28);
}

.login-feature-icon--food {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.28);
}

.login-feature-icon--watch {
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.14);
  border-color: rgba(34, 211, 238, 0.28);
}

.login-feature-icon--rights {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.14);
  border-color: rgba(74, 222, 128, 0.28);
}

.login-feature-icon--lab {
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.14);
  border-color: rgba(45, 212, 191, 0.28);
}

.login-feature-icon svg {
  width: 18px;
  height: 18px;
}

.login-feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.login-feature-text strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.login-feature-text small {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.35;
}

/* Module preview chips (right panel) */
.login-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1rem;
  max-width: 380px;
}

.login-modules span {
  font-size: 0.7rem;
  font-weight: 500;
  color: #0a3d6e;
  background: #e8f6fc;
  border: 1px solid #c5dff0;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  line-height: 1.2;
}

.login-brand-tag {
  margin: 0;
  font-size: 0.667rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

/* ── Right panel ── */
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 2rem 5.5rem;
  background: #fafcfd;
  position: relative;
}

.login-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(0, 180, 228, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(10, 61, 110, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.login-panel-inner {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  max-width: 100%;
  animation: fade-up 0.5s ease-out;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  margin-bottom: 1.75rem;
}

.login-welcome {
  display: inline-flex;
  align-items: center;
  gap: 0.333rem;
  margin: 0 0 0.5rem;
  padding: 0.333rem 0.75rem;
  font-size: 0.917rem;
  font-weight: 500;
  color: #007aa3;
  background: linear-gradient(135deg, rgba(0, 180, 228, 0.1), rgba(0, 180, 228, 0.04));
  border: 1px solid rgba(0, 180, 228, 0.15);
  border-radius: 999px;
}

.login-welcome svg {
  color: #00b4e4;
  flex-shrink: 0;
}

.login-title {
  margin: 0 0 0.417rem;
  font-size: 2.167rem;
  font-weight: 700;
  color: #0a3d6e;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.login-subtitle {
  margin: 0;
  font-size: 1rem;
  color: #64748b;
  line-height: 1.55;
}

.login-card {
  background: #fff;
  border: 1px solid #e8f0f6;
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow:
    0 1px 2px rgba(10, 61, 110, 0.04),
    0 4px 6px rgba(10, 61, 110, 0.02),
    0 16px 40px rgba(10, 61, 110, 0.07);
}

.login-alert {
  padding: 0.667rem 0.833rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 1rem;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.login-alert[hidden] {
  display: none !important;
}

.login-empty {
  text-align: center;
  padding: 1.25rem 0.5rem;
}

.login-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.833rem;
  border-radius: 12px;
  background: rgba(0, 180, 228, 0.1);
  display: grid;
  place-items: center;
  color: #00b4e4;
}

.login-empty p {
  margin: 0;
  font-size: 1rem;
  color: #64748b;
  line-height: 1.5;
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 0.667rem;
}

.login-actions.is-loading {
  min-height: 120px;
  align-items: center;
  justify-content: center;
}

.login-skeleton {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e8f0f6 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.login-skeleton + .login-skeleton {
  margin-top: 0.667rem;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.login-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.667rem;
  width: 100%;
  min-height: 46px;
  padding: 0.667rem 1rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    box-shadow 0.2s,
    transform 0.15s,
    border-color 0.2s,
    background 0.2s;
  animation: fade-up 0.4s ease-out backwards;
}

.login-btn:nth-child(1) { animation-delay: 0.05s; }
.login-btn:nth-child(2) { animation-delay: 0.1s; }
.login-btn:nth-child(3) { animation-delay: 0.15s; }
.login-btn:nth-child(4) { animation-delay: 0.2s; }

.login-btn:hover:not(.is-disabled) {
  text-decoration: none;
  transform: translateY(-2px);
}

.login-btn:active:not(.is-disabled) {
  transform: translateY(0);
}

.login-btn.is-disabled {
  cursor: not-allowed;
  pointer-events: none;
  border-color: #e8eef4 !important;
  box-shadow: none !important;
}

.login-btn.is-disabled .login-btn-content {
  filter: blur(2.5px);
  opacity: 0.55;
  user-select: none;
}

.login-btn.is-disabled.login-btn--thaid {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.login-btn-status {
  position: absolute;
  top: 50%;
  right: 0.667rem;
  transform: translateY(-50%);
  z-index: 2;
  font-size: 0.667rem;
  font-weight: 500;
  color: #64748b;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  padding: 0.167rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  filter: none;
  opacity: 1;
}

.login-btn--thaid.is-disabled .login-btn-status {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
}

.login-btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.667rem;
  width: 100%;
}

.login-btn--google {
  background: #fff;
  color: #1e293b;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.login-btn--google:hover:not(.is-disabled) {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  color: #1e293b;
}

.login-btn--thaid {
  background: linear-gradient(135deg, #1a7bc4 0%, #0a3d6e 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(10, 61, 110, 0.28);
}

.login-btn--thaid:hover:not(.is-disabled) {
  background: linear-gradient(135deg, #1e8fd9 0%, #0c4a7a 100%);
  color: #fff;
  box-shadow: 0 6px 22px rgba(10, 61, 110, 0.35);
}

.login-btn--alt {
  background: #fff;
  color: #334155;
  border-color: #e8eef4;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.login-btn--alt:hover:not(.is-disabled) {
  border-color: #00b4e4;
  color: #0a3d6e;
  background: #f8fdff;
}

.login-btn-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 6px;
  overflow: hidden;
}

.login-btn-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.login-btn-label {
  flex: 1;
  text-align: left;
  line-height: 1.3;
}

.login-btn.is-disabled .login-btn-label {
  padding-right: 4.5rem;
}

.login-btn:not(.is-disabled) .login-btn-label {
  text-align: center;
  padding-right: 24px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 0.833rem;
  margin: 0.333rem 0;
  color: #94a3b8;
  font-size: 0.833rem;
  font-weight: 400;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.login-more-label {
  margin: 0.667rem 0 0.25rem;
  font-size: 0.833rem;
  font-weight: 500;
  color: #94a3b8;
  text-align: center;
  letter-spacing: 0.02em;
}

.login-oauth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.583rem;
}

.login-btn--compact {
  min-height: 42px;
  padding: 0.5rem 0.583rem;
  font-size: 0.833rem;
}

.login-btn--compact .login-btn-status {
  font-size: 0.583rem;
  right: 0.333rem;
  padding: 0.1rem 0.333rem;
}

.login-btn--compact .login-btn-label {
  font-size: 0.833rem;
  text-align: left !important;
  padding-right: 0 !important;
}

.login-btn--compact.is-disabled .login-btn-label {
  padding-right: 0 !important;
}

.login-btn--compact.is-disabled .login-btn-content {
  padding-right: 3.5rem;
}

.login-btn--compact .login-btn-icon svg {
  width: 20px;
  height: 20px;
}

.login-hint {
  margin: 1rem 0 0;
  padding: 0.667rem 0.75rem;
  font-size: 0.833rem;
  color: #64748b;
  text-align: center;
  line-height: 1.5;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
}

.login-legal {
  margin-top: 1.25rem;
  font-size: 0.833rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.6;
}

.login-legal a {
  color: #1a6eb5;
  font-weight: 500;
}

.login-legal a:hover {
  color: #00b4e4;
}

/* Footer */
.login-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 1.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(0deg, #fafcfd 60%, transparent);
}

.login-copyright {
  font-size: 0.833rem;
  color: #94a3b8;
  margin: 0;
}

.login-status-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.333rem;
}

.login-status-label {
  font-size: 0.667rem;
  font-weight: 500;
  color: #00b4e4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-status-bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 20px;
}

.login-status-bar {
  width: 5px;
  border-radius: 3px;
  background: #e2e8f0;
  transition: height 0.3s, background 0.3s;
  height: 10px;
}

.login-status-bar.is-online {
  height: 18px;
  background: linear-gradient(180deg, #5ec8f2, #00b4e4);
}

.login-status-bar.is-offline {
  height: 8px;
  background: #fca5a5;
}

/* ── Responsive ── */

/* Tablet landscape / narrow desktop */
@media (max-width: 1200px) {
  .login-brand {
    padding: 2.5rem 2rem 2rem;
  }

  .login-brand-inner {
    max-width: 100%;
    gap: 1.5rem;
  }

  .login-brand-title {
    font-size: 2.1rem;
  }

  .login-panel {
    padding: 2rem 1.5rem 5rem;
  }
}

/* Tablet & mobile — single column */
@media (max-width: 960px) {
  .login-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-brand {
    padding: 2rem max(1.25rem, env(safe-area-inset-left)) 1.5rem
      max(1.25rem, env(safe-area-inset-right));
    min-height: auto;
    justify-content: flex-start;
  }

  .login-brand-inner {
    gap: 1.25rem;
    max-width: 560px;
    margin: 0 auto;
  }

  .login-brand-hero {
    align-items: center;
    text-align: center;
  }

  .login-logo-frame {
    width: 72px;
    height: 72px;
    margin-bottom: 0.85rem;
  }

  .login-badge {
    margin-bottom: 0.75rem;
  }

  .login-brand-title {
    font-size: 1.75rem;
  }

  .login-brand-desc {
    max-width: none;
    font-size: 1rem;
  }

  .login-features-panel {
    padding: 0.85rem;
  }

  .login-features--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .login-features li {
    padding: 0.55rem 0.6rem;
    gap: 0.55rem;
  }

  .login-feature-text strong {
    font-size: 0.85rem;
  }

  .login-feature-text small {
    font-size: 0.7rem;
  }

  .login-brand-tag {
    text-align: center;
  }

  .login-panel {
    padding: 1.75rem max(1.25rem, env(safe-area-inset-right)) max(5rem, calc(4.5rem + env(safe-area-inset-bottom)))
      max(1.25rem, env(safe-area-inset-left));
    min-height: auto;
  }

  .login-panel-inner {
    width: min(440px, 100%);
    margin: 0 auto;
  }

  .login-header {
    margin-bottom: 1.25rem;
    text-align: center;
  }

  .login-title {
    font-size: 1.5rem;
  }

  .login-subtitle {
    font-size: 0.95rem;
  }

  .login-modules {
    max-width: 100%;
    margin-bottom: 0.85rem;
  }

  .login-footer {
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem max(1.25rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom))
      max(1.25rem, env(safe-area-inset-left));
    text-align: center;
  }

  .login-status-wrap {
    align-items: center;
  }

  .login-oauth-grid {
    grid-template-columns: 1fr 1fr;
  }

  .login-btn--compact.is-disabled .login-btn-status {
    display: block;
    position: static;
    transform: none;
    margin-top: 0.25rem;
    align-self: center;
  }

  .login-btn--compact.is-disabled .login-btn-content {
    flex-direction: row;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .login-features-panel {
    display: none;
  }

  .login-brand {
    padding-top: 1.5rem;
    padding-bottom: 1.25rem;
  }

  .login-brand-inner {
    gap: 1rem;
  }

  .login-brand-title {
    font-size: 1.5rem;
  }

  .login-brand-desc {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .login-features--grid {
    grid-template-columns: 1fr;
  }

  .login-features li:hover {
    transform: none;
  }

  .login-panel {
    padding-top: 1.5rem;
  }

  .login-header {
    margin-bottom: 1rem;
  }

  .login-welcome {
    font-size: 0.85rem;
  }

  .login-title {
    font-size: 1.35rem;
  }

  .login-subtitle {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .login-modules {
    gap: 0.35rem;
    justify-content: center;
  }

  .login-modules span {
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
  }

  .login-card {
    padding: 1rem;
  }

  .login-btn {
    min-height: 44px;
  }

  .login-btn--compact {
    min-height: 44px;
  }

  .login-oauth-grid {
    grid-template-columns: 1fr;
  }

  .login-legal {
    font-size: 0.78rem;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .login-brand-title {
    font-size: 1.35rem;
  }

  .login-logo-frame {
    width: 64px;
    height: 64px;
  }

  .login-feature-icon {
    width: 32px;
    height: 32px;
  }

  .login-feature-icon svg {
    width: 16px;
    height: 16px;
  }

  .login-modules span {
    font-size: 0.6rem;
  }

  .login-panel-inner {
    width: 100%;
  }
}

/* Short viewport — scroll ได้ */
@media (max-height: 720px) {
  body.login-page {
    overflow-y: auto;
  }

  .login-layout {
    min-height: auto;
  }

  .login-brand {
    padding-top: 1.25rem;
    padding-bottom: 1rem;
  }

  .login-brand-inner {
    gap: 0.85rem;
  }

  .login-features-panel {
    padding: 0.75rem;
  }

  .login-features--grid {
    gap: 0.35rem;
  }

  .login-features li {
    padding: 0.45rem 0.5rem;
  }

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

  .login-panel {
    padding-top: 1.25rem;
    padding-bottom: max(4.5rem, calc(3.5rem + env(safe-area-inset-bottom)));
  }

  .login-header {
    margin-bottom: 0.85rem;
  }
}

/* Split view แนวนอนบนมือถือ */
@media (max-width: 960px) and (orientation: landscape) and (max-height: 520px) {
  .login-brand {
    padding: 1rem 1.25rem;
  }

  .login-brand-inner {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    grid-template-areas:
      'hero hero'
      'features features';
    gap: 0.75rem;
    align-items: start;
  }

  .login-brand-hero {
    grid-area: hero;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 0.5rem 1rem;
  }

  .login-logo-frame {
    margin-bottom: 0;
  }

  .login-features-panel {
    display: none;
  }

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

  .login-panel {
    padding-top: 1rem;
    padding-bottom: 4rem;
  }

  .login-modules {
    display: none;
  }

  .login-header {
    margin-bottom: 0.65rem;
  }
}
