@import url("/fonts/proxima-nova/proxima-nova.css");

/* ==========================================================================
   Global styles (affect all pages — keep original values)
   ========================================================================== */

.app {
  background-color: #0c0c0f;
  font-family: 'Proxima-Nova';
}
.app-name {
  color: white;
  text-align: center;
  display: block;
  font-size: 18px;
}
.oauth-login-text {
  font-style: normal;
  font-weight: 600;
  font-size: 18px;
  line-height: 48px;
  color: #FFFFFF;
}
.oauth-login-label {
  color: #7F7F8C;
  margin-bottom: 4px;
}
.container {
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 50px;
}
.login-container {
  width: 420px;
  padding: 40px;
  background: #1A1A1F;
  border-radius: 10px;
}
/*
Hide webkit autofill background
*/
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 50px #0c0c0f inset;
  -webkit-text-fill-color: #ffffff;
  caret-color: white;
}

input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 50px #0c0c0f inset;
  -webkit-text-fill-color: #ffffff;
  caret-color: white;
}

/*
Hide Firefox autofill background
*/
input {
  filter: none;
  border: none;
}

.list-group-sm > div.list-group-item {
  padding: 0;
  border: none;
  background: transparent;
}

.list-group-item > input {
  border-radius: 2px;
  padding: 0 12px;
  box-sizing: border-box;
  line-height: 30px;
  color: #ffffff;
  outline: none;
  width: 100%;
  height: 49px;
  margin-bottom: 30px;
  font-size: 12px;
  font-weight: 600;
  background-color: #0c0c0f;
  letter-spacing: 1px;
  border-radius: 8px;
}

.list-group-item > input:hover,
.list-group-item > input:active,
.list-group-item > input:focus {
  border: 1px solid #2d5de0;
}

.list-group-item > .ng-isolate-scope {
  margin-left: 12px;
  margin-top: 30px;
}

.form-validation .form-control.ng-dirty.ng-valid, .form-validation .form-control.ng-dirty.ng-valid:focus {
  border: 1px solid #2d5de0;
}
.list-group-item:first-of-type {
  margin-bottom: 16px;
}

.list-group-item:last-of-type {
  margin-bottom: 32px;
}

.login-help {
  font-style: normal;
  font-weight: 700;
  font-size: 12px;
}
.login-help > a {
  color: #2c69f4;
}
.login-help > a:hover {
  color: #4574f5;
}
.login-continue .login-pwd-link, .login-continue .login-loggedout-link, .login-help .login-pwd-link {
  color: #2c69f4;
  font-weight: 700;
}
.login-continue .login-pwd-link:hover, .login-continue .login-loggedout-link:hover, .login-help .login-pwd-link:hover {
  color: #4574f5;
}
.login-continue .btn-cnt {
  margin-left: unset;
  width: 100%;
  margin-bottom: 18px;
}
.login-continue, .login-help {
  flex-flow: column-reverse;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-top: 8px;
}
.login-continue {
  flex-flow: column-reverse;
}
.forgot-pwd-link {
  margin-left: unset !important;
}
.btn-grey {
  background-color: #2c69f4;
  border-radius: 2px;
  border: 1px solid #2c69f4;
  letter-spacing: 1px;
  text-transform: capitalize;
  font-size: 12px;
  height: 44px;
  width: 100%;
  position: relative;
  font-weight: 700;
  color: #ffffff;
  border-radius: 32px;
}

.btn-grey:hover, .btn-grey:active, .btn-grey:focus {
  border: 1px solid #2c69f4;
  background-color: #4574f5;
}

.btn-grey:disabled {
  color: #ffffff;
  background-color: #2c69f4;
  border: 1px solid #2c69f4;
  opacity: 1;
}

.btn-grey:disabled:hover {
  border: 1px solid #2c69f4;
  background-color: #2c69f4;
}

.text-center > a {
  color: #2c69f4;
  font-size: 14px;
  display: inline-block;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
}

.text-center > a:hover {
  color: #4574f5;
}

.support-link {
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.8);
}
.support-link:hover, .support-link:active, .support-link:focus {
  color: rgba(255, 255, 255, 0.6);
}
small.text-muted {
  color: #ffffff;
}

.text-default {
  color: #98a6ad;
}

.logo-signin {
  display: none;
}
.password-container {
  width: 350px;
}
.oauth-logo {
  background-image: url("/img/CREE8_NEW_LOGO.png");
  background-repeat: no-repeat;
  background-size: 150px 26px;
  width: 150px;
  height: 26px;
  margin: 32px auto 24px auto;
  background-position: center;
}

/* ==========================================================================
   Login page overrides (scoped to .container.w-auto-xs — login pages only)
   ========================================================================== */

.container.w-auto-xs {
  height: 100vh;
  height: 100dvh;
  justify-content: center;
  padding: 32px 16px;
  box-sizing: border-box;
  font-family: Inter, sans-serif;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.gray-bg {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

body.gray-bg .app {
  background-color: #14141a;
  font-family: Inter, sans-serif;
}

.container.w-auto-xs .login-container {
  width: 432px;
  max-width: 100%;
  padding: 32px;
  background: linear-gradient(to bottom, #14141a, #1d1d23);
  border-radius: 16px;
  border: 1px solid #25262c;
}

.container.w-auto-xs .oauth-logo {
  background-image: url("/img/cree8-logo-white.svg");
  background-size: 138px 24px;
  width: 138px;
  height: 24px;
  margin: 0 auto 32px;
}

.container.w-auto-xs .oauth-login-label {
  color: #adb5bd;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 16px;
}

.container.w-auto-xs .text-default {
  color: #adb5bd;
}

/* Login autofill */
.container.w-auto-xs input:-webkit-autofill,
.container.w-auto-xs input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 50px #14141a inset;
  -webkit-text-fill-color: #ffffff;
  caret-color: white;
}

/* Login inputs */
.container.w-auto-xs .list-group-item > input {
  padding: 8px 12px;
  line-height: 24px;
  height: 40px;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 400;
  background-color: #14141a;
  letter-spacing: 0;
  border-radius: 8px;
  border: 1px solid #25262c;
  font-family: Inter, sans-serif;
  transition: border-color 0.15s ease;
}

.container.w-auto-xs .list-group-item > input::placeholder {
  color: #494e55;
}

.container.w-auto-xs .list-group-item > input:hover {
  border-color: #494e55;
}

.container.w-auto-xs .list-group-item > input:active,
.container.w-auto-xs .list-group-item > input:focus {
  border: 1px solid #ffe354;
}

.container.w-auto-xs .form-validation .form-control.ng-dirty.ng-valid,
.container.w-auto-xs .form-validation .form-control.ng-dirty.ng-valid:focus {
  border: 1px solid #ffe354;
}

.container.w-auto-xs .list-group-item:first-of-type {
  margin-bottom: 0;
}

.container.w-auto-xs .list-group-item:last-of-type {
  margin-bottom: 16px;
}

/* Login buttons */
.container.w-auto-xs .btn-grey {
  background-color: #494e55;
  border-radius: 8px;
  border: 1px solid transparent;
  letter-spacing: 0.28px;
  font-size: 14px;
  height: auto;
  min-height: 40px;
  font-weight: 600;
  font-family: Inter, sans-serif;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  padding: 12px;
  line-height: 16px;
}

.container.w-auto-xs .btn-grey:hover,
.container.w-auto-xs .btn-grey:active,
.container.w-auto-xs .btn-grey:focus {
  border: 1px solid #494e55;
  background-color: #25262c;
  color: #eaecee;
}

.container.w-auto-xs .btn-grey:disabled {
  color: #6c757d;
  background-color: transparent;
  border: 1px solid #25262c;
  opacity: 1;
  cursor: not-allowed;
}

.container.w-auto-xs .btn-grey:disabled:hover {
  border: 1px solid #25262c;
  background-color: transparent;
}

/* Login links */
.container.w-auto-xs .text-center > a {
  color: #eaecee;
  font-size: 12px;
  text-decoration: none;
  font-weight: 600;
}

.container.w-auto-xs .text-center > a:hover {
  color: #ffffff;
}

.container.w-auto-xs .login-help {
  font-weight: 600;
}

.container.w-auto-xs .login-help > a {
  color: #eaecee;
}

.container.w-auto-xs .login-help > a:hover {
  color: #ffffff;
}

.container.w-auto-xs .login-continue .login-pwd-link,
.container.w-auto-xs .login-continue .login-loggedout-link,
.container.w-auto-xs .login-help .login-pwd-link {
  color: #eaecee;
  font-weight: 600;
}

.container.w-auto-xs .login-continue {
  flex-flow: column;
}

.container.w-auto-xs .login-continue .btn-cnt {
  margin-bottom: 16px;
}

/* ==========================================================================
   Login-specific new components (only used on login pages)
   ========================================================================== */

/* Input wrapper with clear/check/eye buttons */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background-color: #14141a;
  border: 1px solid #25262c;
  border-radius: 8px;
  transition: border-color 0.15s ease;
}

.input-wrapper:hover {
  border-color: #494e55;
}

.input-wrapper:focus-within {
  border-color: #ffe354;
}

.input-wrapper > input {
  flex: 1;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  margin-bottom: 0 !important;
  height: 40px;
  border-radius: 8px;
}

.input-clear,
.input-check {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.input-clear { width: 16px; height: 16px; }
.input-check { width: 12px; height: 12px; cursor: default; }

.input-clear svg { width: 16px; height: 16px; }

/* Error state */
.input-wrapper--error {
  border-color: #FF6052 !important;
}

.input-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: #ffffff;
  line-height: 16px;
}

.input-error svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Filled valid state */
.input-wrapper--filled {
  background-color: #1d1d23;
  border-color: #25262c;
}

.input-wrapper--filled > input {
  background-color: #1d1d23 !important;
}

/* Eye toggle for password */
.input-eye {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  margin-right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

/* Login header with back button */
.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.login-header .oauth-logo {
  margin: 0;
}

.login-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(73, 78, 85, 0.2);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.login-back-btn:hover {
  background-color: rgba(73, 78, 85, 0.4);
}

.login-back-placeholder {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  opacity: 0;
}

/* Login actions (button group) */
.login-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

/* Outline button */
.btn-outline {
  background-color: transparent;
  border-radius: 8px;
  border: 1px solid #25262c;
  letter-spacing: 0.28px;
  text-transform: capitalize;
  font-size: 14px;
  min-height: 40px;
  width: 100%;
  font-weight: 600;
  color: #ffffff;
  font-family: Inter, sans-serif;
  transition: background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  padding: 12px;
  line-height: 16px;
}

.btn-outline:hover {
  border-color: #494e55;
  background-color: rgba(73, 78, 85, 0.2);
}

/* Subtle button */
.btn-subtle {
  background-color: rgba(73, 78, 85, 0.2);
  border-radius: 8px;
  border: 1px solid transparent;
  letter-spacing: 0.28px;
  text-transform: capitalize;
  font-size: 14px;
  min-height: 40px;
  width: 100%;
  font-weight: 600;
  color: #ffffff;
  font-family: Inter, sans-serif;
  transition: background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  padding: 12px;
  line-height: 16px;
}

.btn-subtle:hover {
  background-color: rgba(73, 78, 85, 0.4);
  border-color: #494e55;
}

/* OAuth redirecting loader */
.oauth-loader-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top: 4px solid #ffe354;
  border-right: 4px solid #ffe354;
  margin: 0 auto;
  animation: spin 1s linear infinite;
  box-sizing: border-box;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Support button */
.support-btn {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #25262c;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24px;
  text-transform: capitalize;
  font-family: Inter, sans-serif;
  cursor: pointer;
  text-decoration: none;
  line-height: 16px;
  white-space: nowrap;
}

.support-btn:hover {
  border-color: #494e55;
  color: #eaecee;
}

.support-btn .support-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .support-btn {
    bottom: 40px;
  }
}

/* Sign up prompt */
.signup-prompt {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  letter-spacing: 0.24px;
  text-transform: capitalize;
  font-family: Inter, sans-serif;
  justify-content: center;
  margin-top: 32px;
}

.signup-prompt span { color: #eaecee; font-weight: 400; }
.signup-prompt a { color: #eaecee; font-weight: 600; text-decoration: none; cursor: pointer; }
.signup-prompt a:hover { color: #ffffff; }

/* Headline & description */
.login-headline {
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -0.48px;
  color: #ffffff;
  margin-bottom: 4px;
}

.login-description {
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  color: #adb5bd;
}

/* User selector (already logged in) */
.user-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  height: 50px;
  background-color: #25262c;
  border-radius: 8px;
  cursor: pointer;
}

.user-selector-avatar {
  width: 32px;
  height: 32px;
  border-radius: 72px;
  overflow: hidden;
  background-color: #1d1d23;
  flex-shrink: 0;
}

.user-selector-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-selector-name {
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Password requirements */
.password-requirements {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: -0.12px;
  color: #494e55;
}

.password-requirements > div {
  display: flex;
  align-items: center;
  gap: 4px;
}

.password-requirements .req-met {
  color: #494e55;
}

.req-check {
  display: flex;
  align-items: center;
  padding: 2px;
  background-color: #25262c;
  border-radius: 24px;
  flex-shrink: 0;
}

.req-check svg {
  width: 16px;
  height: 16px;
}

.req-check--met svg path {
  stroke: #FFE354;
}

/* Logged out section */
.logged-out {
  color: #adb5bd;
  text-align: center;
  font-size: 14px;
  margin-bottom: 16px;
}
