/* Hide logo above .page-header-wrapper on login page */
body.login-page .page-header-wrapper::before,
.page-header-wrapper.login-page::before {
  display: none !important;
  content: none !important;
}
/* Login Page Background */
body {
  background-color: var(--brand-light-grey) !important;
}
.navbar-light{
    visibility: hidden !important;
}

/* Page Content Wrapper - White Box Container */
.page-content-wrapper {
  background: white !important;
  max-width: 440px !important;
  margin: 2rem auto !important;
  padding: 2.5rem !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Logo */
.page-card-head .app-logo,
.page-content-wrapper .app-logo {
  content: url("/assets/securatecherp/images/logo.png") !important;
  display: block !important;
  margin: 0 auto 1.5rem !important;
  width: 900px !important;  
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
}

.page-card-head .app-logo img,
.page-content-wrapper .app-logo img {
  max-width: 100% !important;
  height: auto !important;
}

/* Login Title */
.page-card-head h4,
.page-content-wrapper h4 {
  visibility: hidden !important;
  position: relative !important;
  height: 1.5em !important;
  text-align: center !important;
}

.page-card-head h4::before,
.page-content-wrapper h4::before {
  content: "Login to Securatec ERP" !important;
  visibility: visible !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  color: var(--brand-blue) !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
}

/* Login Page Container */
.page-card,
.page-login,
.login-content {
  background: white !important;
  border: none !important;
  box-shadow: none !important;
  padding: 15px 0px !important;
}

.page-card {
  border: none !important;
  box-shadow: none !important;
}

/* Login Button */
.btn-primary, 
.page-card .btn-primary,
.login-content .btn-primary {
  background-color: var(--brand-button-blue) !important;
  padding: 9px 8px !important
}

.btn-primary:hover,
.page-card .btn-primary:hover,
.login-content .btn-primary:hover {
  background-color: var(--brand-blue) !important;
  border-color: var(--brand-blue) !important;
  padding: 9px 8px !important
}

.page-card input[type="text"]:focus,
.page-card input[type="password"]:focus,
.page-card input[type="email"]:focus {
  border-color: var(--brand-button-blue) !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}


/* Links */
.page-card a {
  color: var(--brand-button-blue) !important;
}

.page-card a:hover {
  color: var(--brand-blue) !important;
}

.form-control, 
.btn.btn-block.btn-default.btn-sm.btn-login-option.btn-login-with-email-link{
    height: 37px !important;
}

/* Input icon alignment */
.for-login .field-icon,.toggle-password {
    top: calc(50% - 8px)    !important;
}

/* Login with Email Link button — centered */
.login-button-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}
.login-button-wrapper .btn-login-with-email-link {
    text-align: center !important;
}

/* Sign Up Message Button */
.text-center.sign-up-message {
    background-color: var(--brand-blue) !important;
    color: white !important;
    padding: 9px 8px !important;
    border-radius: var(--border-radius) !important;
    display: block !important;
    text-align: center !important;
    font-weight: 500 !important;
    margin-top: 1rem !important;
    text-decoration: none !important;
    border: none !important;
    transition: background 0.2s;
}

  /* sign up btton */
  .text-center.sign-up-message:hover {
    background-color: var(--brand-button-blue) !important;
    color: white !important;
    text-decoration: none !important;
}

.text-center.sign-up-message a {
    color: white !important;
    text-decoration: none !important;
}

.text-center.sign-up-message a:hover {
    color: white !important;
}

/* 404 ERROR PAGE  */

/* Full-page centered layout */
.error-page {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 70vh !important;
  text-align: center !important;
  padding: 2rem 1.5rem !important;
}

/* Hide the default Frappe 404 illustration */
img.img-404[src="/assets/frappe/images/ui-states/404.png"] {
  display: none !important;
}

/* Company logo above the 404 content */
.error-page::before {
  content: "" !important;
  display: block !important;
  width: 200px !important;
  height: 70px !important;
  background: url("/assets/securatecherp/images/logo.png") center / contain no-repeat !important;
  margin-bottom: 2rem !important;
}

/* Custom 404 illustration - HIDDEN */
.error-page::after {
  display: none !important;
}

/* Big "404" heading — replace original text */
.error-page h2.mb-1.mt-4 {
  font-size: 0 !important;          /* hide original text */
  line-height: 1 !important;
  margin: 0 0 0.5rem !important;
  position: relative !important;
}
.error-page h2.mb-1.mt-4::after {
  content: "404" !important;
  display: block !important;
  font-size: 5.5rem !important;
  font-weight: 800 !important;
  letter-spacing: -2px !important;
  color: var(--brand-blue) !important;
  line-height: 1 !important;
}

/* Sub-text */
.error-page .error-text {
  font-size: 1.05rem !important;
  color: var(--gray-500) !important;
  max-width: 360px !important;
  margin: 0 auto !important;
  line-height: 1.5 !important;
}

/* "Back to Home" button */
.error-page .back-to-home {
  margin-top: 1.75rem !important;
}
.error-page .back-to-home .btn-primary {
  background-color: var(--brand-button-blue) !important;
  border-color: var(--brand-button-blue) !important;
  color: white !important;
  padding: 0.65rem 2.5rem !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  transition: background 0.2s, transform 0.15s !important;
}
.error-page .back-to-home .btn-primary:hover {
  background-color: var(--brand-blue) !important;
  border-color: var(--brand-blue) !important;
  transform: translateY(-1px) !important;
}

/* Page wrapper override for 404  */
body:has(.error-page) .page-content-wrapper {
  background: transparent !important;
  box-shadow: none !important;
  max-width: 600px !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Hide web sidebar & footer on 404 */
.web-sidebar {
  display: none !important;
}

.web-footer {
  display: none !important;
}

/* Hide "Manage third party apps" section */
a[href="/third_party_apps"] {
  display: none !important;
}

/* Hide ONLY the "Manage third party apps" item + description */
.col:has(.my-account-item-desc):has(a[href="/third_party_apps"]) 
  .my-account-item,
.col:has(.my-account-item-desc):has(a[href="/third_party_apps"]) 
  .my-account-item-desc {
  display: none !important;
}
.btn.btn-primary.btn-block.btn-update{
    background-color: var(--brand-button-blue) !important;
}

/* FOOTER */
.page-footer,
footer.page-footer,
.web-footer,
footer {
  background: var(--brand-blue) !important;
  color: white !important;
  padding: 0.75rem 1.5rem !important;
  margin-top: 2rem !important;
  border-top: none !important;
  text-align: center !important;
  font-size: 0.8rem !important;
  width: 100% !important;
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1000 !important;
}

.page-footer *,
footer.page-footer *,
.web-footer *,
footer * {
  color: white !important;
}

.page-footer::after,
footer::after {
  content: "Powered by MB Technologies (Pvt) Ltd" !important;
  display: block !important;
  color: white !important;
}

.page-footer a,
footer a {
  color: white !important;
}

.page-footer a:hover,
footer a:hover {
  opacity: 1 !important;
}

.btn.btn-sm.btn-secondary.small,
button.btn.btn-sm.btn-secondary.small {
  background-color: #d9534f !important;
  color: white !important;
  padding: 5 !important;
  min-height: auto !important;
  line-height: 1 !important;
}

/* ============================================
   MY ACCOUNT PAGE
   ============================================ */

/* Page wrapper on account page */
body:has(.my-account-container) .page-content-wrapper {
  background: white !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
  max-width: 580px !important;
  margin: 2rem auto !important;
  padding: 2rem 2rem 1.5rem !important;
  border-radius: 12px !important;
}

/* Hide sidebar on My Account page and make main column full width */
body:has(.my-account-container) .sidebar-column.col-sm-2 {
  display: none !important;
}
body:has(.my-account-container) .main-column.col-sm-10 {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
}

#page-me .sidebar-column {
  display: none !important;
}

/* Company logo above the header */
.my-account-container::before {
  content: "" !important;
  display: block !important;
  width: 180px !important;
  height: 55px !important;
  background: url("/assets/securatecherp/images/logo.png") center / contain no-repeat !important;
  margin: 0 auto 1.25rem !important;
}

/* Header */
.my-account-header {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: var(--brand-blue, #0E2342) !important;
  margin-bottom: 1.25rem !important;
  padding-bottom: 0.6rem !important;
  border-bottom: 2px solid var(--gray-500) !important;
  text-align: center !important;
}

/* Account info rows container */
.my-account-container .account-info {
  gap: 0 !important;
}

/* Hide the entire "Manage third party apps" row */
.my-account-container .account-info > .col:has(a[href="/third_party_apps"]) {
  display: none !important;
}

/* Each row item */
.my-account-container .account-info > .col {
  background: white !important;
  border-radius: 10px !important;
  padding: 1.1rem 1.4rem !important;
  margin-bottom: 0.6rem !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
  border-left: none !important;
  transition: box-shadow 0.2s !important;
}
.my-account-container .account-info > .col:hover {
  box-shadow: 0 3px 12px rgba(14, 35, 66, 0.1) !important;
}

/* Avatar row — profile card feel */
.my-account-container .account-info > .col:first-child {
  background: var(--brand-light-grey, #f7f5f5) !important;
  border-left: none !important;
  padding: 1.25rem 1.5rem !important;
  margin-bottom: 0.75rem !important;
}

/* Avatar circle */
.my-account-avatar .avatar-frame.standard-image {
  background: var(--brand-blue, #0E2342) !important;
  color: white !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  width: 42px !important;
  height: 42px !important;
  line-height: 42px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Account name */
.my-account-name {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: #1e293b !important;
}

/* Row item title */
.my-account-item {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: #1e293b !important;
}

/* Row item description */
.my-account-item-desc {
  font-size: 0.82rem !important;
  color: #64748b !important;
  margin-top: 2px !important;
}

/* Edit / action links */
.my-account-item-link a {
  color: var(--brand-button-blue, #15419a) !important;
  text-decoration: none !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: color 0.15s !important;
}
.my-account-item-link a:hover {
  color: var(--brand-blue, #0E2342) !important;
}

/* Icons in action links */
.my-account-item-link .icon {
  width: 16px !important;
  height: 16px !important;
}
.edit-profile-icon,
.right-icon {
  stroke: var(--brand-button-blue, #15419a) !important;
}
.my-account-item-link a:hover .edit-profile-icon,
.my-account-item-link a:hover .right-icon {
  stroke: var(--brand-blue, #0E2342) !important;
}

/* EDIT PROFILE / WEB FORM */

/* Page wrapper for profile form */
body:has(.web-form-container) .page-content-wrapper {
  background: white !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
  max-width: 720px !important;
  margin: 2rem auto !important;
  padding: 2rem 2.5rem 1.5rem !important;
  border-radius: 12px !important;
}

/* Logo above profile form */
body:has(.web-form-container) .page-content-wrapper::before {
  content: "" !important;
  display: block !important;
  width: 160px !important;
  height: 50px !important;
  background: url("/assets/securatecherp/images/logo.png") center / contain no-repeat !important;
  margin: 0 auto 1.5rem !important;
}

/* Profile title (h1) */
.web-form-container .web-form-title h1 {
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: var(--brand-blue, #0E2342) !important;
}

/* Header area */
.web-form-head {
  padding-bottom: 1rem !important;
  margin-bottom: 0.5rem !important;
  border-bottom: 2px solid var(--brand-light-grey, #f7f5f5) !important;
}

.web-form-head .title {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
}

/* Edit / action buttons in header */
.web-form-actions .edit-button,
.web-form-actions .btn-default {
  background: var(--brand-button-blue, #15419a) !important;
  color: white !important;
  border: none !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
  font-size: 0.85rem !important;
  padding: 0.4rem 1.2rem !important;
  transition: background 0.2s !important;
}
.web-form-actions .edit-button:hover,
.web-form-actions .btn-default:hover {
  background: var(--brand-blue, #0E2342) !important;
  color: white !important;
}

/* Form sections */
.web-form-container .form-section {
  background: #fafbfc !important;
  border-radius: 10px !important;
  padding: 1.25rem 1.5rem !important;
  margin-bottom: 1rem !important;
  border: 1px solid #f0f0f0 !important;
}

/* Section heading */
.web-form-container .section-head {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: var(--brand-blue, #0E2342) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  padding-bottom: 0.5rem !important;
  margin-bottom: 0.75rem !important;
  border-bottom: 1px solid #eee !important;
}

/* Form labels */
.web-form-container .control-label {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
}

/* Required asterisk color */
.web-form-container .control-label.reqd::after {
  color: var(--gray-500) !important;
}

/* Form values (read-only) */
.web-form-container .control-value.like-disabled-input {
  background: white !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 6px !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.92rem !important;
  color: #1e293b !important;
  min-height: 38px !important;
}

/* Bold value */
.web-form-container .control-value.like-disabled-input.bold {
  font-weight: 600 !important;
  color: #1e293b !important;
}

/* Form inputs when editing */
.web-form-container .form-control {
  border-radius: 6px !important;
  border: 1px solid #e2e8f0 !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.92rem !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}
.web-form-container .form-control:focus {
  border-color: var(--brand-button-blue, #15419a) !important;
  box-shadow: 0 0 0 2px rgba(21, 65, 154, 0.12) !important;
}

/* Footer actions area */
.web-form-footer {
  padding-top: 1rem !important;
  margin-top: 0.5rem !important;
  border-top: 1px solid #f0f0f0 !important;
}

/* Delete button */
.web-form-footer .delete-btn {
  background: transparent !important;
  color: #ef4444 !important;
  border: 1px solid #ef4444 !important;
  border-radius: 6px !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  padding: 0.4rem 1.2rem !important;
  transition: background 0.2s !important;
}
.web-form-footer .delete-btn:hover {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border-color: #dc2626 !important;
}

/* Submit / Save button */
.web-form-footer .btn-primary {
  background: var(--brand-button-blue, #15419a) !important;
  border-color: var(--brand-button-blue, #15419a) !important;
  color: white !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  padding: 0.5rem 1.5rem !important;
  transition: background 0.2s !important;
}
.web-form-footer .btn-primary:hover {
  background: var(--brand-blue, #0E2342) !important;
  border-color: var(--brand-blue, #0E2342) !important;
}

/* Not-saved indicator pill */
.web-form-head .indicator-pill.orange {
  background: #fff4ed !important;
  color: var(--gray-500) !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
  padding: 0.2rem 0.75rem !important;
}

/* Success page */
.success-page .success-icon {
  stroke: var(--brand-button-blue, #15419a) !important;
  width: 48px !important;
  height: 48px !important;
}
.success-page .success-title {
  color: var(--brand-blue, #0E2342) !important;
  font-weight: 700 !important;
}
.success-page a {
  color: var(--brand-button-blue, #15419a) !important;
  font-weight: 500 !important;
}

/*  RESET PASSWORD PAGE */

/* Override the generic white card for reset password */
body:has(.for-reset-password) .page-content-wrapper {
  background: transparent !important;
  box-shadow: none !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Full-height centered container */
body:has(.for-reset-password) main.container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 85vh !important;
  padding: 2rem 1rem !important;
}

/* The form card itself */
body:has(.for-reset-password) .page_content {
  background: white !important;
  max-width: 420px !important;
  width: 100% !important;
  padding: 2.5rem 2.5rem 2rem !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 24px rgba(14, 35, 66, 0.08), 0 1px 4px rgba(0,0,0,0.04) !important;
  position: relative !important;
}

/* Logo — injected above the heading */
.for-reset-password::before {
  content: "" !important;
  display: block !important;
  width: 170px !important;
  height: 50px !important;
  background: url("/assets/securatecherp/images/logo.png") center / contain no-repeat !important;
  margin: 0 auto 1.75rem !important;
}

/* Subtle accent line under the logo */
.for-reset-password::after {
  content: "" !important;
  display: block !important;
  width: 48px !important;
  height: 3px !important;
  background: linear-gradient(90deg, var(--brand-blue, #0E2342), var(--brand-button-blue, #15419a)) !important;
  border-radius: 3px !important;
  position: absolute !important;
  top: 70px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

/* Heading — visible, styled */
.for-reset-password .page-card-head {
  padding: 0 0 0.75rem 0 !important;
  margin: 0 !important;
  text-align: center !important;
}
.for-reset-password .page-card-head h4 {
  visibility: visible !important;
  position: static !important;
  height: auto !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: var(--brand-blue, #0E2342) !important;
  text-align: center !important;
  margin: 0 !important;
  letter-spacing: -0.01em !important;
}
.for-reset-password .page-card-head h4::before {
  display: none !important;
}

/* Card body reset */
.for-reset-password .page-card {
  padding: 0.5rem 0 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Uniform tight spacing between fields */
.for-reset-password .form-group {
  margin-bottom: 0.75rem !important;
}
.for-reset-password .form-control.mb-4 {
  margin-bottom: 0 !important;
}

/* Input fields — polished look */
.for-reset-password .form-control {
  height: 46px !important;
  border-radius: 10px !important;
  border: 1.5px solid #e8ecf0 !important;
  padding: 0.6rem 1rem !important;
  font-size: 0.93rem !important;
  background: #fafbfc !important;
  color: #1e293b !important;
  transition: all 0.2s ease !important;
}
.for-reset-password .form-control::placeholder {
  color: #a0aec0 !important;
  font-weight: 400 !important;
}
.for-reset-password .form-control:focus {
  border-color: var(--brand-button-blue, #15419a) !important;
  box-shadow: 0 0 0 3px rgba(21, 65, 154, 0.1) !important;
  background: white !important;
  outline: none !important;
}

/* Confirm button — gradient with depth */
.for-reset-password .btn-update {
  background: linear-gradient(135deg, var(--brand-button-blue, #15419a) 0%, #1a4fbd 100%) !important;
  border: none !important;
  color: white !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  height: 46px !important;
  margin-top: 0.5rem !important;
  letter-spacing: 0.02em !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 2px 8px rgba(14, 35, 66, 0.2) !important;
}
.for-reset-password .btn-update:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--brand-blue, #0E2342) 0%, var(--brand-button-blue, #15419a) 100%) !important;
  box-shadow: 0 4px 16px rgba(14, 35, 66, 0.3) !important;
  transform: translateY(-1px) !important;
}
.for-reset-password .btn-update:disabled {
  opacity: 0.45 !important;
  box-shadow: none !important;
}

/* Strength indicator — slim, rounded */
.for-reset-password .password-strength-indicator {
  height: 3px !important;
  border-radius: 3px !important;
  margin-top: 6px !important;
  margin-bottom: 0 !important;
}

/* Messages */
.for-reset-password .password-strength-message,
.for-reset-password .password-mismatch-message {
  font-size: 0.8rem !important;
  text-align: center !important;
  margin-top: 0.5rem !important;
}

/* Sign-up link row */
.for-reset-password .sign-up-message {
  margin-top: 1.5rem !important;
  font-size: 0.88rem !important;
  border-radius: 10px !important;
}

/* Hide breadcrumbs & page header on reset page */
body:has(.for-reset-password) .page-breadcrumbs,
body:has(.for-reset-password) .page-header-wrapper {
  display: none !important;
}
