/* ===================== Enterprise Login — Government edition ===================== */
.login-body { background: #f2f6f6; overflow-x: hidden; }
.login { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(460px, 1fr); min-height: 100vh; min-height: 100dvh; }

/* ---------- Cover ---------- */
.login-cover { position: relative; overflow: hidden; color: #fff; background: #071533; isolation: isolate; }
.login-cover::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, rgba(232, 199, 106, 0) 0%, rgba(232, 199, 106, .75) 28%, rgba(232, 199, 106, .75) 72%, rgba(232, 199, 106, 0) 100%); }
.lc-slides { position: absolute; inset: 0; z-index: -3; }
.lc-slide { position: absolute; inset: -3%; background-size: cover; background-position: center; opacity: 0; transform: scale(1.06); transition: opacity 1.6s ease, transform 9s linear; }
.lc-slide.active { opacity: 1; transform: scale(1); }
.lc-overlay { position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(90deg, rgba(4, 11, 31, .9) 0%, rgba(4, 30, 36, .82) 26%, rgba(9, 26, 64, .58) 48%, rgba(7, 46, 54, .2) 72%, rgba(7, 46, 54, 0) 100%),
    linear-gradient(0deg, rgba(4, 11, 31, .8) 0%, rgba(4, 11, 31, 0) 34%),
    linear-gradient(180deg, rgba(4, 11, 31, .55) 0%, rgba(4, 11, 31, 0) 20%);
}
/* formal hairline frame */
.lc-overlay::after { content: ''; position: absolute; inset: 16px; border: 1px solid rgba(232, 199, 106, .16); pointer-events: none; }
.lc-orbs { display: none; }
.lc-content { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 36px 56px; gap: 30px; }
.lc-brand { display: flex; align-items: center; gap: 14px; }
.lc-brand img { width: 58px; height: 58px; border-radius: 14px; background: #fff; padding: 5px; object-fit: contain; box-shadow: 0 0 0 1px rgba(232, 199, 106, .7), 0 0 0 4px rgba(232, 199, 106, .12), 0 12px 30px rgba(0, 0, 0, .35); }
.lc-brand b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.lc-brand span { font-size: 13.5px; color: #e9d59b; letter-spacing: .01em; }
.lc-hero { max-width: 640px; animation: fade-up .9s var(--ease) both .1s; }
.lc-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 4px; background: rgba(4, 30, 36, .78); border: 1px solid rgba(232, 199, 106, .45); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: #f1e2b4; }
.lc-kicker i { color: #e8a86f; }
.lc-hero h1 { color: #fff; font-size: clamp(30px, 3.4vw, 50px); line-height: 1.18; font-weight: 700; letter-spacing: -.025em; margin: 22px 0 14px; text-wrap: balance; text-shadow: 0 2px 28px rgba(4, 11, 31, .5); }
.lc-hero p { font-size: 17px; opacity: .9; max-width: 540px; line-height: 1.65; text-shadow: 0 1px 16px rgba(4, 11, 31, .6); }
.lc-features { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.lc-features span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 5px; font-size: 13.5px; font-weight: 600;
  background: linear-gradient(180deg, #0a3f49 0%, #0c1f4b 100%); border: 1px solid rgba(255, 255, 255, .1); border-top-color: rgba(232, 199, 106, .7);
  box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .7); color: #f2f6f6; }
.lc-features i { font-size: 18px; color: #e8a86f; }
.lc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 150px)); gap: 12px; margin-top: 30px; }
.lc-stats > div { padding: 16px 16px 14px; border-radius: 6px;
  background: linear-gradient(180deg, #0b4550 0%, #072e36 100%); border: 1px solid rgba(255, 255, 255, .09); border-top-color: #c47a35;
  box-shadow: inset 0 1px 0 rgba(232, 199, 106, .55), 0 24px 40px -22px rgba(0, 0, 0, .75); }
.lc-stats i { font-size: 24px; color: #e8a86f; }
.lc-stats b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 8px; color: #fff; }
.lc-stats span { font-size: 12.5px; color: rgba(226, 232, 245, .78); }
.lc-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.lc-announce { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 5px; background: rgba(4, 30, 36, .86); border: 1px solid rgba(255, 255, 255, .1); box-shadow: inset 2px 0 0 #c47a35; font-size: 13.5px; }
.lc-announce i { color: #e8a86f; font-size: 18px; flex-shrink: 0; }
.lc-marquee { overflow: hidden; white-space: nowrap; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.lc-marquee span { display: inline-block; padding-left: 100%; animation: marquee 22s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.lc-dots { display: flex; gap: 8px; }
.lc-dots button { width: 10px; height: 10px; border-radius: 2px; border: 0; background: rgba(255, 255, 255, .32); transition: .35s var(--ease); padding: 0; }
.lc-dots button.active { width: 30px; background: #e8a86f; }

/* ---------- Panel ---------- */
.login-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 26px 40px;
  background: radial-gradient(900px 520px at 100% 0%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 62%), linear-gradient(180deg, #f8f9fc 0%, #f1f4f9 100%); }
/* faint Thai prajam-yam lattice */
.login-panel::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%231b3f8b' stroke-opacity='.075' stroke-width='1'%3E%3Cpath d='M32 0L64 32L32 64L0 32Z'/%3E%3Cpath d='M32 32C35.5 26.5 35.5 20 32 14C28.5 20 28.5 26.5 32 32C37.5 28.5 44 28.5 50 32C44 35.5 37.5 35.5 32 32C35.5 37.5 35.5 44 32 50C28.5 44 28.5 37.5 32 32C26.5 35.5 20 35.5 14 32C20 28.5 26.5 28.5 32 32Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 64px 64px; background-position: center top;
  -webkit-mask-image: radial-gradient(120% 70% at 100% 0%, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 75%); mask-image: radial-gradient(120% 70% at 100% 0%, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 75%); }
.lp-top { position: relative; display: flex; justify-content: space-between; align-items: center; }
.lp-help { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.lp-card { position: relative; width: 100%; max-width: 440px; margin: 20px auto; animation: fade-up .7s var(--ease) both .15s; }
.lp-logo { width: 84px; height: 84px; border-radius: 22px; background: #fff; padding: 8px; box-shadow: 0 18px 36px -18px rgba(7, 46, 54, .55), 0 0 0 1px #e7dcc0; margin-bottom: 20px; position: relative; }
.lp-logo::after { content: ''; position: absolute; inset: -6px; border-radius: 26px; border: 1px solid rgba(196, 122, 53, .45); }
.lp-logo img { width: 100%; height: 100%; object-fit: contain; }
.lp-card h2 { font-size: 30px; font-weight: 750; letter-spacing: -.025em; color: #072e36; }
.lp-sub { color: var(--muted); margin: 6px 0 22px; font-size: 15px; }
.lp-sub b { color: var(--gold-ink); }
.lp-portal { width: 100%; margin-bottom: 18px; }
.lp-portal button { flex: 1; justify-content: center; }
.lp-form { display: flex; flex-direction: column; gap: 16px; }
.lp-input .input { height: 52px; border-radius: 12px; font-size: 15.5px; background: #fff; }
.lp-input > i:first-child { font-size: 20px; }
.lp-input .input-addon { right: 8px; }
.lp-submit { height: 54px; border-radius: 12px; font-size: 16px; margin-top: 4px; }
.lp-submit i { transition: transform .25s var(--ease); }
.lp-submit:hover i { transform: translateX(4px); }
.lp-error { margin-bottom: 16px; }
.lp-error.shake { animation: shake .5s var(--ease); }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.lp-caps { color: var(--amber-ink); }
.lp-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.lp-divider::before, .lp-divider::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.lp-divider span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lp-demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lp-demo-btn { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--text-2); text-align: left; transition: .2s var(--ease); min-width: 0; line-height: 1.25; }
.lp-demo-btn span { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone); font-size: 16px; flex-shrink: 0; }
.lp-demo-btn:hover { border-color: var(--tone); transform: translateY(-2px); box-shadow: 0 10px 18px -12px var(--tone); }
.lp-demo-btn.picked { background: var(--tone); color: #fff; }
.lp-demo-btn.picked span { background: rgba(255, 255, 255, .2); color: #fff; }
.lp-foot { position: relative; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted-2); }
.lp-foot span { display: inline-flex; align-items: center; gap: 6px; }
.lp-foot i { color: var(--gold); }

@media (min-width: 1024px) {
  .login-cover { position: sticky; top: 0; height: 100vh; height: 100dvh; }
}
@media (min-width: 1024px) and (max-height: 860px) {
  .lp-logo { width: 64px; height: 64px; border-radius: 18px; margin-bottom: 14px; padding: 6px; }
  .lp-logo::after { border-radius: 22px; }
  .lp-card h2 { font-size: 26px; }
  .lp-sub { margin-bottom: 16px; }
  .lp-form { gap: 12px; }
  .lp-input .input { height: 48px; }
  .lp-submit { height: 50px; }
  .lp-divider { margin: 18px 0 10px; }
  .lc-content { padding: 28px 48px; }
  .lc-hero h1 { margin: 16px 0 10px; }
  .lc-stats { margin-top: 20px; }
}

/* ---------- Mobile: hero + sheet (app feel) ---------- */
@media (max-width: 1023px) {
  .login { grid-template-columns: 1fr; }
  .login-cover { min-height: 42vh; min-height: 42dvh; }
  .login-cover::after, .lc-overlay::after { display: none; }
  .lc-overlay { background:
    linear-gradient(90deg, rgba(4, 11, 31, .88) 0%, rgba(7, 21, 51, .7) 55%, rgba(7, 46, 54, .35) 100%),
    linear-gradient(0deg, rgba(4, 11, 31, .75) 0%, rgba(4, 11, 31, 0) 45%); }
  .lc-content { padding: calc(20px + env(safe-area-inset-top)) 22px 64px; justify-content: flex-start; gap: 18px; }
  .lc-brand img { width: 48px; height: 48px; border-radius: 12px; }
  .lc-brand b { font-size: 16px; }
  .lc-hero h1 { font-size: 26px; margin: 14px 0 8px; }
  .lc-hero p, .lc-features, .lc-kicker, .lc-bottom .lc-dots { display: none; }
  .lc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; gap: 8px; }
  .lc-stats > div { padding: 10px 12px; border-radius: 6px; }
  .lc-stats b { font-size: 21px; margin-top: 2px; }
  .lc-stats i { display: none; }
  .lc-bottom { position: absolute; left: 22px; right: 22px; bottom: 44px; }
  .lc-announce { font-size: 12.5px; }
  .login-panel { margin-top: -34px; border-radius: 24px 24px 0 0; padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -1px 0 rgba(232, 199, 106, .55), 0 -20px 40px -20px rgba(4, 11, 31, .45); z-index: 2; }
  .login-panel::after { content: ''; position: absolute; top: 9px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: var(--line-2); }
  .lp-top { padding-top: 10px; }
  .lp-card { margin: 12px auto; }
  .lp-logo { display: none; }
  .lp-card h2 { font-size: 25px; }
  .lp-sub { margin-bottom: 16px; }
  .lp-demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-foot { justify-content: center; text-align: center; }
}
@media (max-width: 380px) {
  .lp-portal button { padding: 6px 8px; font-size: 12.5px; }
}
