/* ══════════════════════════════════════════════
   Deepos — Login
══════════════════════════════════════════════ */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex/ibm-plex-sans-full-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex/ibm-plex-sans-full-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/ibm-plex/ibm-plex-sans-full-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/ibm-plex/ibm-plex-sans-full-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex/ibm-plex-mono-full-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex/ibm-plex-mono-full-500.woff2') format('woff2');
}


:root {
  --bg:         #F6F7F9;
  --surface:    #FFFFFF;
  --primary:    #0F6B6D;
  --primary-dk: #0E1620;
  --text:       #12151A;
  --text-soft:  #3A424C;
  --text-light: #5C6570;
  --border:     #E2E5EA;
  --danger:     #C62828;
  --danger-lt:  #FDECEC;
  --font:       'IBM Plex Sans', 'Noto Sans', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.login-bg {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.login-left {
  flex: 1;
  background: var(--primary-dk);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

.login-left-grid { display: none; }

.login-left::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 20% 80%, rgba(15,107,109,.45), transparent 60%);
  pointer-events: none;
}

.ll-inner {
  position: relative; z-index: 1;
  padding: 48px 52px;
  max-width: 460px;
}

.ll-logo {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 44px;
}

.ll-emblem {
  width: auto; min-width: 44px; height: 44px; padding: 0 10px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  letter-spacing: 0;
  flex-shrink: 0;
}

.ll-brand {
  font-size: 18px; font-weight: 700; color: #fff; line-height: 1.2;
  letter-spacing: 0.06em;
}
.ll-sub {
  font-size: 12px; color: rgba(255,255,255,.45); font-weight: 500; margin-top: 2px;
}

.ll-tagline {
  font-size: 32px; font-weight: 600; color: #fff;
  line-height: 1.2; letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.ll-tagline span { color: #7EC8C9; }

.ll-desc {
  font-size: 14px; color: rgba(255,255,255,.62);
  line-height: 1.6; margin-bottom: 32px; max-width: 360px;
}

.ll-features { display: flex; flex-direction: column; gap: 12px; }
.ll-feature {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: rgba(255,255,255,.78); font-weight: 500;
}
.lf-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0;
}

.login-right {
  width: 480px; max-width: 100%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 24px;
}

.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px 32px;
  box-shadow: 0 1px 2px rgba(16,24,40,.06);
}

.lc-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  margin-bottom: 16px;
  background: transparent;
}
.lc-head { margin-bottom: 28px; }
.lc-title {
  font-size: 22px; font-weight: 600; color: var(--text);
  letter-spacing: -0.02em; margin-bottom: 6px;
}
.lc-sub {
  font-size: 13.5px; color: var(--text-light); line-height: 1.5;
}

.lc-error {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--danger-lt); border: 1px solid #f0b4b4;
  color: var(--danger); border-radius: 8px;
  padding: 12px 14px; font-size: 13px; margin-bottom: 18px; line-height: 1.45;
}
.le-icon { font-weight: 700; }

.lc-form { display: flex; flex-direction: column; gap: 16px; }
.lf-group { display: flex; flex-direction: column; gap: 6px; }
.lf-label {
  font-size: 12.5px; font-weight: 600; color: var(--text-soft);
}
.lf-input-wrap { position: relative; }
.lf-icon-left {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-light); font-size: 12px; pointer-events: none;
}
.lf-input {
  width: 100%; height: 42px;
  padding: 0 40px 0 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font); font-size: 14px; color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.lf-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,107,109,.22);
}
.lf-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: none; cursor: pointer;
  color: var(--text-light); padding: 6px; font-size: 13px;
}
.lf-eye:hover { color: var(--primary); }

.lf-btn {
  margin-top: 8px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 6px;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.lf-btn:hover { background: #0C5759; }
.lf-btn-arrow { opacity: .85; }

.lc-footer {
  margin-top: 22px; text-align: center;
  font-size: 12px; color: var(--text-light);
}

@media (max-width: 900px) {
  html {
    height: auto;
    overflow-x: hidden;
  }
  body {
    display: block;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--primary-dk);
    -webkit-text-size-adjust: 100%;
  }
  .login-bg {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }
  .login-left {
    display: flex;
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 18px max(16px, env(safe-area-inset-left));
  }
  .login-has-logo .ll-inner { display: none; }
  .login-no-logo .ll-inner { padding: 0; max-width: none; }
  .login-no-logo .ll-logo { margin: 0; justify-content: center; }
  .login-no-logo .ll-logo > div:last-child,
  .login-no-logo .ll-tagline,
  .login-no-logo .ll-desc,
  .login-no-logo .ll-features { display: none; }
  .login-no-logo .ll-emblem {
    width: auto; min-width: 0; height: 36px; padding: 0 12px;
    border-radius: 8px; font-size: 13px;
  }
  .login-right {
    width: 100%;
    max-width: 100%;
    flex: 1 0 auto;
    background: transparent;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0 max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    margin-top: -8px;
  }
  .login-card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    border: none;
    border-radius: 18px;
    padding: 22px 18px 16px;
    background: var(--surface);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .32);
  }
  .lc-head { margin-bottom: 18px; }
  .lc-logo {
    height: 40px;
    width: auto;
    max-width: 100%;
    max-height: 44px;
    object-fit: contain;
    margin-bottom: 12px;
  }
  .lc-title { font-size: 20px; margin-bottom: 0; }
  .lc-sub { display: none; }
  .lc-form { gap: 14px; }
  .lf-group { gap: 8px; }
  .lf-label { font-size: 13px; }
  .lf-input {
    height: 48px;
    border-radius: 12px;
    font-size: 16px;
    padding: 0 52px 0 40px;
  }
  .lf-eye {
    width: 44px;
    height: 44px;
    right: 4px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
  }
  .lf-btn {
    width: 100%;
    height: 48px;
    margin-top: 4px;
    border-radius: 12px;
    font-size: 16px;
    flex-shrink: 0;
  }
  .lc-footer { margin-top: 8px; }
  .lc-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 12px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
  }
}

@media (max-width: 900px) and (max-height: 700px) {
  .login-left {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 12px;
  }
  .login-card { padding: 16px 16px 12px; }
  .lc-head { margin-bottom: 12px; }
  .lc-logo { height: 36px; margin-bottom: 8px; }
  .lc-form { gap: 10px; }
  .lf-input, .lf-btn { height: 44px; }
}

/* Desktop shell: centered, capped, quiet. Mobile rules above stay in force under 901px. */
.ll-logo-chip { display: none; }

@media (min-width: 901px) {
  html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
  }
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #F3F4F6;
    padding: 28px 24px;
  }
  .login-bg {
    flex: 0 1 auto;
    width: min(1120px, 100%);
    max-width: 1120px;
    min-width: 0;
    height: min(640px, calc(100vh - 64px));
    min-height: 560px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(14, 22, 32, .08);
  }
  .login-left { flex: 1 1 auto; min-width: 0; }
  .login-left::after { display: none; }
  .ll-inner {
    width: 100%;
    max-width: 520px;
    padding: 48px 44px;
  }
  .ll-logo { margin-bottom: 40px; }
  .ll-brand { display: none; }
  .ll-tagline {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.15;
    margin-bottom: 14px;
  }
  .ll-desc {
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.55;
    color: rgba(255,255,255,.58);
  }
  .ll-feature { font-size: 13.5px; color: rgba(255,255,255,.72); }
  .ll-logo-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: none;
  }
  .ll-logo-chip img {
    display: block;
    height: 40px;
    width: auto;
    max-width: 210px;
    object-fit: contain;
  }
  .login-has-logo .ll-emblem,
  .login-has-logo .ll-logo > div:last-child,
  .login-has-logo .lc-logo { display: none; }
  .login-has-logo .ll-logo { display: block; }
  .lc-sub {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.45;
    color: #667085;
  }
  .login-right {
    flex: 0 0 440px;
    width: 440px;
    max-width: 46%;
    min-width: 0;
    background: #fff;
    padding: 48px 40px;
  }
  .login-card {
    width: 100%;
    max-width: 360px;
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  .lc-head { margin-bottom: 28px; }
  .lc-title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 0;
  }
  .lc-form { gap: 18px; }
  .lf-group { gap: 8px; }
  .lf-label { font-size: 13px; }
  .lf-input {
    height: 44px;
    border-radius: 10px;
    font-size: 16px;
    padding: 0 48px 0 40px;
  }
  .lf-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 107, 109, .2);
  }
  .lf-eye {
    width: 44px;
    height: 44px;
    right: 2px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .lf-btn {
    width: 100%;
    height: 44px;
    margin-top: 4px;
    border-radius: 10px;
    font-size: 16px;
  }
  .lf-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 107, 109, .28);
  }
  .lc-footer { margin-top: 16px; }
  .lc-footer a {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
  }
  .lc-footer a:hover { text-decoration: underline; }
}

@media (min-width: 901px) and (max-width: 1100px) {
  body { padding: 16px; }
  .login-bg {
    height: min(640px, calc(100vh - 32px));
    min-height: 520px;
    border-radius: 16px;
  }
  .login-right {
    flex-basis: 400px;
    width: 400px;
    padding: 28px 20px;
  }
  .ll-inner { padding: 28px 24px; }
  .ll-tagline { font-size: 26px; }
  .login-card { padding: 28px 22px 20px; }
}


/* Login document only: white opening, the existing logo, and the English slogan. */
body.deepos-login-intro {
  background: #fff;
}
body.deepos-login-intro .lc-slogan {
  margin: 0 0 16px;
}
body.deepos-login-intro .lc-slogan p {
  margin: 0;
  color: #123C7B;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.2px;
  line-height: 1.35;
}
body.deepos-login-intro .lc-slogan-line {
  display: block;
  width: 42px;
  height: 2px;
  margin-top: 14px;
  border-radius: 2px;
  background: #0F6B6D;
}
body.deepos-login-intro .lc-title {
  color: #123C7B;
}
@media (max-width: 900px) {
  body.deepos-login-intro,
  body.deepos-login-intro .login-bg,
  body.deepos-login-intro .login-right,
  body.deepos-login-intro .login-card {
    background: #fff !important;
    background-color: #fff !important;
  }
  body.deepos-login-intro .login-left {
    display: none !important;
  }
  body.deepos-login-intro .login-card {
    box-shadow: none;
    border: none;
  }
  body.deepos-login-intro .lc-head,
  body.deepos-login-intro .lc-slogan,
  body.deepos-login-intro .lc-title {
    text-align: center;
  }
  body.deepos-login-intro .lc-logo {
    margin-left: auto;
    margin-right: auto;
  }
  body.deepos-login-intro .lc-slogan-line {
    margin-left: auto;
    margin-right: auto;
  }
}
@media (min-width: 901px) {
  body.deepos-login-intro {
    background: #fff;
  }
}
