/* HS-LOGIN-UI-POLISH-001: Consolidated internal login page UI */

:root {
  --navy: #0B1F3A;
  --navy-soft: #123A63;
  --baby-blue: #BFE7FF;
  --baby-blue-strong: #8FD3FF;
  --card-bg: #F8FAFC;
  --input-bg: #EEF6FF;
  --border-grey: #DDE3EA;
  --border-soft: rgba(221, 227, 234, 0.72);
  --text-main: #1F2933;
  --text-muted: #6B7280;
  --white: #FFFFFF;
  --danger: #B42318;
  --shadow-card: 0 26px 70px rgba(0, 0, 0, 0.24);
  --shadow-soft: 0 12px 34px rgba(11, 31, 58, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
}

html {
  background: var(--navy);
}

body {
  font-family: 'Lato', Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(191, 231, 255, 0.16), transparent 34%),
    radial-gradient(circle at bottom right, rgba(143, 211, 255, 0.14), transparent 32%),
    linear-gradient(145deg, #07182d 0%, #0B1F3A 48%, #102f52 100%);
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  align-content: center;
  gap: 18px;
  padding: 34px 16px 28px;
  overflow-x: hidden;
}

.login-brand-wrap {
  width: 100%;
  max-width: 430px;
  text-align: center;
  padding: 0;
  margin: 0;
}

.login-brand-logo {
  width: 176px;
  max-width: 66vw;
  height: auto;
  display: block;
  margin: 0 auto 10px;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.login-wrapper {
  width: 100%;
  max-width: 430px;
}

.brand {
  text-align: center;
  margin-bottom: 18px;
}

.brand-title {
  color: var(--white);
  font-size: 31px;
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 7px;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.login-card {
  width: 100%;
  max-width: 410px;
  margin: 0 auto;
  background: rgba(248, 250, 252, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  padding: 24px 24px 26px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
}

.login-tabs {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-grey);
}

.login-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 4px 0 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Lato', Arial, sans-serif;
  cursor: pointer;
}

.login-tab.active {
  color: var(--navy);
  border-bottom-color: var(--baby-blue-strong);
}

.login-tab:hover {
  color: var(--navy-soft);
  border-bottom-color: var(--navy-soft);
}

.login-panel {
  display: none;
}

.login-panel.active-panel {
  display: block;
}

h3,
h4 {
  margin: 0 0 18px;
  color: var(--navy);
  font-size: 21px;
  line-height: 1.25;
  font-weight: 500;
}

h4 {
  margin-top: 26px;
  font-size: 15px;
}

.form-group {
  margin-bottom: 15px;
}

input,
select {
  width: 100%;
  height: 44px;
  border: none;
  border-bottom: 1px solid #CBD6E2;
  border-radius: 0;
  background: var(--input-bg);
  padding: 9px 10px;
  font-size: 14px;
  color: var(--navy);
  font-family: 'Lato', Arial, sans-serif;
  outline: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

input::placeholder {
  color: #7A8796;
}

input:focus,
select:focus {
  border-bottom-color: var(--navy);
  background: #F5FAFF;
  box-shadow: inset 0 -1px 0 var(--navy);
}

button {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--navy);
  color: var(--navy);
  padding: 3px 0 4px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Lato', Arial, sans-serif;
  cursor: pointer;
}

button:hover {
  color: var(--navy-soft);
  border-bottom-color: var(--baby-blue-strong);
}

.login-panel > button,
#team_reset_btn {
  margin-top: 10px;
}

.hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.45;
}

.error {
  display: none;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 10px;
  background: rgba(180, 35, 24, 0.06);
}

.divider {
  height: 1px;
  background: var(--border-grey);
  margin: 26px 0 22px;
}

.login-footer-tagline {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-align: center;
  padding: 0;
  margin: 8px 0 0;
}

body > h1,
body > h2 {
  display: none;
}

body > p,
body > .subtitle,
body > .login-subtitle {
  color: rgba(255, 255, 255, 0.60);
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  margin: -4px 0 6px;
  letter-spacing: 0.01em;
}

.phase3-light-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.phase3-light-btn-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
}

.phase3-light-icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.phase3-light-btn-label {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

@media (max-width: 768px) {
  body {
    gap: 16px;
    padding: 34px 12px 24px;
    align-content: center;
  }

  .login-brand-logo {
    width: 164px;
    margin-bottom: 8px;
  }

  .login-wrapper {
    max-width: 390px;
  }

  .brand {
    margin-bottom: 16px;
  }

  .brand-title {
    font-size: 28px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .login-card {
    width: calc(100vw - 24px);
    max-width: 390px;
    border-radius: 20px;
    padding: 21px 20px 23px;
  }

  .login-tabs {
    margin-bottom: 20px;
  }

  h3 {
    font-size: 20px;
  }

  input,
  select {
    height: 43px;
  }

  .login-footer-tagline {
    font-size: 11px;
    margin-top: 6px;
  }
}

@media (max-height: 640px) {
  body {
    align-content: start;
    padding-top: 22px;
  }

  .login-brand-logo {
    width: 148px;
  }

  .brand {
    margin-bottom: 12px;
  }

  .login-card {
    padding-top: 18px;
    padding-bottom: 20px;
  }

  .login-footer-tagline {
    margin-top: 4px;
  }
}

/* HS-LOGIN-BUTTON-ENTER-001: Primary internal login action */
.login-primary-btn {
  width: 100%;
  height: 44px;
  margin-top: 12px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--navy);
  border-radius: 12px;
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-soft);
  letter-spacing: 0.01em;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.login-primary-btn:hover {
  color: var(--white);
  background: var(--navy-soft);
  border-color: var(--navy-soft);
  box-shadow: 0 14px 34px rgba(11, 31, 58, 0.18);
  transform: translateY(-1px);
}

.login-primary-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 22px rgba(11, 31, 58, 0.14);
}

.login-primary-btn:focus-visible {
  outline: 3px solid rgba(143, 211, 255, 0.55);
  outline-offset: 3px;
}


/* HS-CLIENT-LOGIN-UI-POLISH-001: Client login page professional polish only */
body.client-login-polish {
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 36px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  background:
    radial-gradient(circle at 50% 22%, rgba(56,189,248,0.16), transparent 32%),
    linear-gradient(145deg, #07182D 0%, #0B1F3A 58%, #12365D 100%) !important;
  color: #FFFFFF !important;
  overflow-x: hidden !important;
}

body.client-login-polish .login-brand-wrap {
  width: min(410px, calc(100vw - 36px)) !important;
  max-width: 410px !important;
  margin: 0 auto 2px !important;
  text-align: center !important;
}

body.client-login-polish .login-brand-logo {
  width: 154px !important;
  max-width: 154px !important;
  margin: 0 auto 10px !important;
  display: block !important;
}

body.client-login-polish .login-footer-tagline {
  margin: 0 auto 14px !important;
  color: rgba(255,255,255,0.86) !important;
  font-size: 14px !important;
  letter-spacing: 0.04em !important;
  text-align: center !important;
}

body.client-login-polish .brand {
  width: min(410px, calc(100vw - 36px)) !important;
  max-width: 410px !important;
  margin: 0 auto 14px !important;
  text-align: center !important;
}

body.client-login-polish .brand-title {
  margin: 0 !important;
  color: #FFFFFF !important;
  font-size: 36px !important;
  line-height: 1.08 !important;
  font-weight: 500 !important;
  letter-spacing: -0.025em !important;
}

body.client-login-polish .brand-subtitle {
  width: min(380px, calc(100vw - 48px)) !important;
  margin: 8px auto 0 !important;
  color: rgba(255,255,255,0.72) !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  font-weight: 400 !important;
}

body.client-login-polish .login-wrapper {
  width: min(410px, calc(100vw - 36px)) !important;
  max-width: 410px !important;
  margin: 0 auto !important;
}

body.client-login-polish .login-card {
  width: 100% !important;
  max-width: 410px !important;
  margin: 0 auto !important;
  padding: 28px 28px 24px !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,0.96) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28) !important;
  backdrop-filter: none !important;
}

body.client-login-polish .login-card h3 {
  margin: 0 0 22px !important;
  color: #0B1F3A !important;
  font-size: 20px !important;
  line-height: 1.25 !important;
  font-weight: 500 !important;
}

body.client-login-polish .form-group {
  margin-bottom: 15px !important;
}

body.client-login-polish input,
body.client-login-polish select {
  height: 46px !important;
  width: 100% !important;
  padding: 0 0 8px !important;
  border: 0 !important;
  border-bottom: 1px solid #CBD5E1 !important;
  background: transparent !important;
  color: #0B1F3A !important;
  font-size: 14px !important;
  outline: none !important;
}

body.client-login-polish input::placeholder {
  color: #7A8AA0 !important;
}

body.client-login-polish input:focus {
  border-bottom-color: #38BDF8 !important;
}

body.client-login-polish button,
body.client-login-polish .login-primary-btn,
body.client-login-polish button[type="submit"] {
  width: 100% !important;
  height: 46px !important;
  margin: 12px 0 0 !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #0B1F3A !important;
  color: #FFFFFF !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 46px !important;
  text-align: center !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

body.client-login-polish button:hover,
body.client-login-polish .login-primary-btn:hover,
body.client-login-polish button[type="submit"]:hover {
  background: #12365D !important;
}

body.client-login-polish .form-note,
body.client-login-polish .login-help,
body.client-login-polish .forgot-password-note {
  margin-top: 16px !important;
  padding-top: 16px !important;
  border-top: 1px solid #E2E8F0 !important;
  color: #64748B !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

body.client-login-polish a {
  color: #0B1F3A !important;
  border-bottom: 1px solid #0B1F3A !important;
  text-decoration: none !important;
  font-size: 13px !important;
}

body.client-login-polish a:hover {
  color: #38BDF8 !important;
  border-bottom-color: #38BDF8 !important;
}

@media (max-width: 560px) {
  body.client-login-polish {
    padding: 24px 16px !important;
    justify-content: flex-start !important;
  }

  body.client-login-polish .login-brand-logo {
    width: 140px !important;
  }

  body.client-login-polish .brand-title {
    font-size: 32px !important;
  }

  body.client-login-polish .login-card {
    padding: 24px 22px 22px !important;
    border-radius: 18px !important;
  }
}

/* HS-CLIENT-LOGIN-RESET-LINK-002: Make client reset request action a text link, not a full button */
body.client-login-polish .client-login-support {
  margin-top: 16px !important;
  padding-top: 16px !important;
  border-top: 1px solid #E2E8F0 !important;
  color: #64748B !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

body.client-login-polish .client-login-support button,
body.client-login-polish .client-login-support button[type="button"] {
  display: inline !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #0B1F3A !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #0B1F3A !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  text-align: left !important;
  cursor: pointer !important;
}

body.client-login-polish .client-login-support button:hover,
body.client-login-polish .client-login-support button:focus {
  color: #38BDF8 !important;
  border-bottom-color: #38BDF8 !important;
  background: transparent !important;
  outline: none !important;
}
