/* Hyphen Group - Modern Login Style for ERPNext v15 */

:root {
  --hyphen-blue: #1e3a8a;
  --hyphen-blue-dark: #1e40af;
  --hyphen-blue-light: #3b5998;
  --hyphen-accent-green: #4ade80;
  --hyphen-white: #ffffff;
  --hyphen-gray-light: #f8fafc;
  --hyphen-gray: #e2e8f0;
  --hyphen-gray-dark: #cbd5e1;
  --hyphen-text: #1e293b;
  --hyphen-text-light: #64748b;
}

/* ===== BACKGROUND & BODY ===== */
body,
html {
  background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 50%, #f5f7fa 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--hyphen-text);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* ===== LOGIN PAGE CONTAINER ===== */
.for-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 85vh;
  padding: 20px;
  position: relative;
}

/* ===== DECORATIVE BACKGROUND ELEMENTS ===== */
.for-login::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(30, 58, 138, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.for-login::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

/* ===== LOGO SECTION ===== */
.page-card-head {
  text-align: center;
  margin-bottom: 35px;
  animation: fadeInDown 0.6s ease-out;
  position: relative;
  z-index: 1;
}

.app-logo {
  height: 90px;
  width: auto;
  margin-bottom: 25px;
  filter: drop-shadow(0 4px 20px rgba(30, 58, 138, 0.15));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.app-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 25px rgba(30, 58, 138, 0.25));
}

.page-card-head h4 {
  font-size: 26px;
  font-weight: 700;
  color: var(--hyphen-blue);
  letter-spacing: -0.5px;
  margin: 0;
  position: relative;
}

.page-card-head h4::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--hyphen-blue) 0%, var(--hyphen-accent-green) 100%);
  border-radius: 2px;
}

/* ===== LOGIN CARD ===== */
.page-card,
.login-content {
  background: var(--hyphen-white);
  border-radius: 16px;
  padding: 45px;
  box-shadow: 0 10px 50px rgba(30, 58, 138, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 420px;
  animation: fadeInUp 0.7s ease-out;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(30, 58, 138, 0.08);
}

/* ===== FORM GROUPS ===== */
.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--hyphen-text-light);
  margin-bottom: 10px;
  display: block;
}

/* ===== INPUT FIELDS ===== */
.email-field,
.password-field {
  position: relative;
}

.form-control {
  width: 100%;
  padding: 14px 16px 14px 45px;
  border: 2px solid var(--hyphen-gray);
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: var(--hyphen-gray-light);
  color: var(--hyphen-text);
  box-sizing: border-box;
}

.form-control:focus {
  background: var(--hyphen-white);
  border-color: var(--hyphen-blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

.form-control::placeholder {
  color: var(--hyphen-text-light);
}

/* ===== FIELD ICONS ===== */
.field-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hyphen-blue);
  pointer-events: none;
  font-size: 18px;
  opacity: 0.7;
}

/* ===== PASSWORD TOGGLE ===== */
.toggle-password {
  position: absolute;
  right: 15px;
  top: 50% !important;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--hyphen-blue);
  transition: color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.toggle-password:hover {
  color: var(--hyphen-blue-dark);
}

/* ===== FORGOT PASSWORD ===== */
.forgot-password-message {
  text-align: right;
  margin-top: 12px;
  margin-bottom: 0;
}

.forgot-password-message a {
  color: var(--hyphen-blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.forgot-password-message a:hover {
  color: var(--hyphen-blue-dark);
  text-decoration: underline;
}

/* ===== PAGE CARD BODY ===== */
.page-card-body {
  margin-bottom: 24px;
}

/* ===== PAGE CARD ACTIONS ===== */
.page-card-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== PRIMARY BUTTON ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--hyphen-blue) 0%, var(--hyphen-blue-dark) 100%);
  color: var(--hyphen-white);
  border: none;
  padding: 14px 28px !important;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(30, 58, 138, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover:not(:disabled)::before {
  left: 100%;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--hyphen-blue-dark) 0%, var(--hyphen-blue) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(30, 58, 138, 0.35);
}

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

/* ===== DEFAULT BUTTON ===== */
.btn-default {
  background: var(--hyphen-gray-light);
  color: var(--hyphen-blue);
  border: 2px solid var(--hyphen-gray);
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-default:hover {
  background: var(--hyphen-white);
  border-color: var(--hyphen-blue);
  color: var(--hyphen-blue-dark);
  box-shadow: 0 2px 10px rgba(30, 58, 138, 0.1);
}

/* ===== BLOCK BUTTON ===== */
.btn-block {
  width: 100%;
  display: block;
}

/* ===== BUTTON SIZE ===== */
.btn-sm {
  padding: 11px 18px;
  font-size: 14px;
}

/* ===== SOCIAL LOGINS DIVIDER ===== */
.social-logins {
  margin-top: 28px;
}

.login-divider {
  font-size: 13px;
  color: var(--hyphen-text-light);
  margin: 24px 0;
  position: relative;
  text-align: center;
}

.login-divider::before,
.login-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--hyphen-gray);
}

.login-divider::before {
  left: 0;
}

.login-divider::after {
  right: 0;
}

/* ===== SOCIAL LOGIN BUTTONS ===== */
.social-login-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-button-wrapper {
  width: 100%;
}

.btn-login-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 18px;
  border: 2px solid var(--hyphen-gray);
  background: var(--hyphen-white);
  color: var(--hyphen-text);
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-login-option:hover {
  border-color: var(--hyphen-blue);
  background: rgba(30, 58, 138, 0.05);
  color: var(--hyphen-blue);
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(30, 58, 138, 0.1);
}

/* ===== SIGN UP MESSAGE ===== */
.sign-up-message {
  margin-top: 24px;
  font-size: 14px;
  color: var(--hyphen-text-light);
  text-align: center;
}

.sign-up-message a {
  color: var(--hyphen-blue);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.sign-up-message a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--hyphen-blue) 0%, var(--hyphen-accent-green) 100%);
  transition: width 0.3s ease;
}

.sign-up-message a:hover::after {
  width: 100%;
}

.sign-up-message a:hover {
  color: var(--hyphen-blue-dark);
}

/* ===== GREEN ACCENT (Subtle) ===== */
.page-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--hyphen-blue) 0%, var(--hyphen-accent-green) 50%, var(--hyphen-blue) 100%);
  border-radius: 16px 16px 0 0;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {

  .page-card,
  .login-content {
    padding: 35px 25px;
    max-width: 95%;
  }

  .page-card-head h4 {
    font-size: 22px;
  }

  .app-logo {
    height: 70px;
  }

  .form-control {
    padding: 13px 14px 13px 42px;
    font-size: 16px;
  }

  .btn-primary {
    padding: 13px 24px !important;
    font-size: 15px;
  }

  .btn-default {
    padding: 11px 20px;
    font-size: 14px;
  }

  .for-login::before,
  .for-login::after {
    display: none;
  }
}

@media (max-width: 480px) {

  .page-card,
  .login-content {
    padding: 30px 20px;
  }

  .app-logo {
    height: 60px;
  }

  .page-card-head {
    margin-bottom: 25px;
  }
}

/* ===== DISABLED STATE ===== */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== TEXT UTILITIES ===== */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--hyphen-text-light);
}

.text-normal {
  font-weight: 400;
}

/* ===== MARGIN & PADDING UTILITIES ===== */
.my-5 {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

/* ===== LOADING STATE ===== */
.btn-primary.loading {
  position: relative;
  color: transparent;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid var(--hyphen-white);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* ===== FOCUS VISIBLE (Accessibility) ===== */
*:focus-visible {
  outline: 2px solid var(--hyphen-accent-green);
  outline-offset: 2px;
}

/* ===== SUCCESS MESSAGE ===== */
.indicator.green {
  background-color: var(--hyphen-accent-green) !important;
}

/* ===== ERROR STATES ===== */
.form-control.is-invalid {
  border-color: #ef4444;
}

.invalid-feedback {
  color: #ef4444;
  font-size: 12px;
  margin-top: 6px;
}