/* Work Client Theme - Client Authentication (Login / Register / Forgot)
   Injected ONLY on client authentication pages via hooks.
   Scoped to html.wct-auth to prevent accidental styling on other pages.

   Perfex CRM login structure:
   body.customers.customers_login
     nav.navbar.navbar-default.header
     #wrapper > #content
       .container > .row > .mtop40
         .col-md-4 > h1.login-heading
         .col-md-4 > form.login-form
           .panel_s > .panel-body
             .form-group (inputs)
             .btn-info.btn-block (login btn)
             .btn-default.btn-block (register btn)
     footer
*/

html.wct-auth{
  --client-primary: #2563eb;
  --client-primary-soft: #e8eeff;
  --client-primary-rgba-08: rgba(37,99,235,.08);
  --client-primary-rgba-12: rgba(37,99,235,.12);
  --client-primary-rgba-18: rgba(37,99,235,.18);
  --client-bg: #f7f9fc;
  --client-text: #0f172a;
  --client-card-bg: #ffffff;
  --client-border: #e2e8f0;
  --client-button-bg: var(--client-primary);
  --client-button-hover: #1d4ed8;
  --client-button-active: #1e40af;
  --client-button-text: #ffffff;
  --client-font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --client-font-size: 14px;
  --client-card-radius: 18px;
  --client-card-shadow: 0 18px 60px rgba(2, 6, 23, 0.12);
  --client-transition: 180ms;
}

/* ============================================================
   BASE: html & body
============================================================ */
html.wct-auth{
  height: 100%;
}

html.wct-auth body{
  min-height: 100vh;
  font-family: var(--client-font-family) !important;
  font-size: var(--client-font-size) !important;
  color: var(--client-text) !important;
  background: var(--client-bg) !important;
  display: flex;
  flex-direction: column;
}

/* Decorative gradient blobs */
html.wct-auth body::before,
html.wct-auth body::after{
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

html.wct-auth body::before{
  inset: -20% -20% auto -20%;
  height: 70vh;
  background:
    radial-gradient(600px circle at 15% 20%, var(--client-primary-rgba-18), transparent 60%),
    radial-gradient(520px circle at 70% 10%, var(--client-primary-rgba-12), transparent 55%);
}

html.wct-auth body::after{
  inset: auto -20% -20% -20%;
  height: 70vh;
  background:
    radial-gradient(600px circle at 80% 70%, var(--client-primary-rgba-18), transparent 60%),
    radial-gradient(520px circle at 20% 85%, var(--client-primary-rgba-12), transparent 55%);
  opacity: .85;
}

/* ============================================================
   NAVBAR
============================================================ */
html.wct-auth nav.navbar.header{
  background: rgba(255,255,255,.72) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none !important;
  border-bottom: 1px solid rgba(226,232,240,.5) !important;
  box-shadow: 0 1px 8px rgba(0,0,0,.04) !important;
  margin-bottom: 0 !important;
  position: relative;
  z-index: 100;
}

html.wct-auth nav.navbar.header .navbar-brand img{
  max-height: 38px;
  width: auto;
}

html.wct-auth nav.navbar.header .navbar-nav > li > a{
  color: var(--client-text) !important;
  font-family: var(--client-font-family) !important;
  font-weight: 500;
  border-radius: 10px;
  transition: background var(--client-transition) ease, color var(--client-transition) ease;
  padding: 8px 18px !important;
  margin: 7px 3px;
}

html.wct-auth nav.navbar.header .navbar-nav > li > a:hover{
  background: var(--client-primary-rgba-08) !important;
  color: var(--client-primary) !important;
}

html.wct-auth nav.navbar.header .navbar-nav > li > a.active,
html.wct-auth nav.navbar.header .navbar-nav > li.active > a{
  background: linear-gradient(135deg, var(--client-button-bg), var(--client-button-hover)) !important;
  color: var(--client-button-text) !important;
  border-radius: 10px;
  box-shadow: 0 4px 16px var(--client-primary-rgba-18);
}

/* ============================================================
   CONTENT WRAPPER
============================================================ */
html.wct-auth #wrapper{
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}

html.wct-auth #content{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px 40px;
}

/* Center the form container */
html.wct-auth #content > .container{
  max-width: 480px;
  width: 100%;
}

/* Hide the first empty container */
html.wct-auth #content > .container:first-child:not(:only-child){
  display: none;
}

html.wct-auth .mtop40{
  margin-top: 0 !important;
}

/* Make the column full width inside our centered container */
html.wct-auth .col-md-4.col-md-offset-4,
html.wct-auth .col-sm-8.col-sm-offset-2{
  width: 100% !important;
  margin-left: 0 !important;
  float: none !important;
  padding: 0 !important;
}

/* ============================================================
   LOGIN HEADING
============================================================ */
html.wct-auth .login-heading{
  font-family: var(--client-font-family) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  color: var(--client-text) !important;
  margin-bottom: 24px !important;
  margin-top: 0 !important;
  text-align: center;
}

/* ============================================================
   FORM CARD (panel_s)
============================================================ */
html.wct-auth .panel_s{
  background: rgba(255,255,255,.82) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(226,232,240,.6) !important;
  border-radius: var(--client-card-radius) !important;
  box-shadow: var(--client-card-shadow) !important;
  overflow: hidden;
  margin-bottom: 0 !important;
}

html.wct-auth .panel-body{
  padding: 32px 28px !important;
}

/* ============================================================
   FORM LABELS
============================================================ */
html.wct-auth label,
html.wct-auth .control-label{
  font-family: var(--client-font-family) !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  color: var(--client-text) !important;
  margin-bottom: 6px !important;
}

/* ============================================================
   FORM INPUTS & SELECT
============================================================ */
html.wct-auth .form-control,
html.wct-auth input[type="text"],
html.wct-auth input[type="email"],
html.wct-auth input[type="password"],
html.wct-auth input[type="number"],
html.wct-auth select,
html.wct-auth textarea{
  height: 44px !important;
  border: 1.5px solid rgba(226,232,240,.9) !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,.92) !important;
  font-family: var(--client-font-family) !important;
  font-size: 14px !important;
  color: var(--client-text) !important;
  padding: 8px 14px !important;
  box-shadow: none !important;
  transition: border-color var(--client-transition) ease, box-shadow var(--client-transition) ease;
}

html.wct-auth .form-control:focus,
html.wct-auth input:focus,
html.wct-auth select:focus,
html.wct-auth textarea:focus{
  border-color: var(--client-primary) !important;
  box-shadow: 0 0 0 3px var(--client-primary-rgba-12) !important;
  outline: none !important;
}

/* Fix select arrow */
html.wct-auth select.form-control{
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left 12px center !important;
  padding-left: 32px !important;
}

html[dir="ltr"].wct-auth select.form-control{
  background-position: right 12px center !important;
  padding-left: 14px !important;
  padding-right: 32px !important;
}

/* ============================================================
   FORM GROUPS
============================================================ */
html.wct-auth .form-group{
  margin-bottom: 18px !important;
}

/* ============================================================
   CHECKBOX (Remember me)
============================================================ */
html.wct-auth .checkbox{
  margin-bottom: 20px !important;
}

html.wct-auth .checkbox label{
  font-size: 13px !important;
  color: rgba(15,23,42,.7) !important;
}

/* ============================================================
   LOGIN BUTTON (btn-info)
============================================================ */
html.wct-auth .btn-info,
html.wct-auth .btn-primary{
  height: 46px !important;
  background: linear-gradient(135deg, var(--client-button-bg), var(--client-button-hover)) !important;
  border: none !important;
  border-radius: 12px !important;
  color: var(--client-button-text) !important;
  font-family: var(--client-font-family) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: .2px;
  box-shadow: 0 8px 24px var(--client-primary-rgba-18) !important;
  transition: transform var(--client-transition) ease, box-shadow var(--client-transition) ease;
  margin-bottom: 10px !important;
}

html.wct-auth .btn-info:hover,
html.wct-auth .btn-primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 32px var(--client-primary-rgba-18) !important;
}

html.wct-auth .btn-info:active,
html.wct-auth .btn-primary:active{
  transform: translateY(0);
}

html.wct-auth .btn-info:focus,
html.wct-auth .btn-primary:focus{
  outline: none !important;
  box-shadow: 0 0 0 3px var(--client-primary-rgba-12), 0 8px 24px var(--client-primary-rgba-18) !important;
}

/* ============================================================
   REGISTER BUTTON (btn-default)
============================================================ */
html.wct-auth .btn-default{
  height: 46px !important;
  background: rgba(255,255,255,.9) !important;
  border: 1.5px solid rgba(226,232,240,.9) !important;
  border-radius: 12px !important;
  color: var(--client-text) !important;
  font-family: var(--client-font-family) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  transition: border-color var(--client-transition) ease, background var(--client-transition) ease, transform var(--client-transition) ease;
  margin-bottom: 14px !important;
}

html.wct-auth .btn-default:hover{
  border-color: var(--client-primary) !important;
  background: var(--client-primary-rgba-08) !important;
  color: var(--client-primary) !important;
  transform: translateY(-1px);
}

/* ============================================================
   LINKS (Forgot password, etc.)
============================================================ */
html.wct-auth a{
  color: var(--client-primary) !important;
  font-weight: 500;
  transition: color var(--client-transition) ease;
}

html.wct-auth a:hover{
  color: var(--client-button-hover) !important;
  text-decoration: none !important;
}

/* Center forgot password link */
html.wct-auth .login-form > a,
html.wct-auth .panel-body > a{
  display: block;
  text-align: center;
  font-size: 13px !important;
  margin-top: 4px;
}

/* ============================================================
   HEADING TEXTS (Tailwind classes used by Perfex)
============================================================ */
html.wct-auth h1,
html.wct-auth h2,
html.wct-auth h3,
html.wct-auth .tw-text-neutral-800{
  color: var(--client-text) !important;
}

html.wct-auth .tw-text-neutral-600{
  color: rgba(15,23,42,.65) !important;
}

/* ============================================================
   FOOTER
============================================================ */
html.wct-auth footer,
html.wct-auth #footer{
  background: transparent !important;
  border-top: none !important;
  position: relative;
  z-index: 1;
  padding: 16px 0;
  text-align: center;
}

html.wct-auth footer *{
  color: rgba(15,23,42,.45) !important;
  font-family: var(--client-font-family) !important;
  font-size: 12px !important;
}

/* ============================================================
   LOGO (company-logo above form)
============================================================ */
html.wct-auth .company-logo img{
  max-width: 200px;
  width: auto;
  height: auto;
}

/* ============================================================
   DIVIDER
============================================================ */
html.wct-auth .wct-auth-divider{
  height: 1px;
  background: rgba(226,232,240,.9);
  margin: 16px 0;
}

/* ============================================================
   MOTION OFF
============================================================ */
html.wct-auth.wct-no-motion *,
html.wct-auth.wct-no-motion *::before,
html.wct-auth.wct-no-motion *::after{
  transition: none !important;
  animation: none !important;
}

/* ============================================================
   RTL TWEAKS
============================================================ */
html[dir="rtl"].wct-auth .login-form,
html[dir="rtl"].wct-auth .panel_s{
  direction: rtl;
}

/* ============================================================
   ENTRANCE ANIMATION
============================================================ */
@keyframes wctAuthIn{
  from{ opacity:0; transform: translateY(14px); }
  to{ opacity:1; transform: translateY(0); }
}

html.wct-auth:not(.wct-no-motion) .panel_s{
  animation: wctAuthIn 450ms ease both;
}

html.wct-auth:not(.wct-no-motion) .login-heading{
  animation: wctAuthIn 450ms ease 80ms both;
}

/* ============================================================
   DARK MODE
============================================================ */
html.wct-auth.wct-dark body{
  background: #0f172a !important;
  color: #e2e8f0 !important;
}

html.wct-auth.wct-dark body::before,
html.wct-auth.wct-dark body::after{
  opacity: .35;
}

html.wct-auth.wct-dark nav.navbar.header{
  background: rgba(15,23,42,.8) !important;
  border-bottom-color: rgba(51,65,85,.5) !important;
}

html.wct-auth.wct-dark nav.navbar.header .navbar-nav > li > a{
  color: #cbd5e1 !important;
}

html.wct-auth.wct-dark .panel_s{
  background: rgba(30,41,59,.85) !important;
  border-color: rgba(51,65,85,.6) !important;
}

html.wct-auth.wct-dark .login-heading,
html.wct-auth.wct-dark h1,
html.wct-auth.wct-dark h2,
html.wct-auth.wct-dark h3,
html.wct-auth.wct-dark .tw-text-neutral-800{
  color: #e2e8f0 !important;
}

html.wct-auth.wct-dark .tw-text-neutral-600{
  color: rgba(226,232,240,.65) !important;
}

html.wct-auth.wct-dark label,
html.wct-auth.wct-dark .control-label{
  color: #cbd5e1 !important;
}

html.wct-auth.wct-dark .form-control,
html.wct-auth.wct-dark input[type="text"],
html.wct-auth.wct-dark input[type="email"],
html.wct-auth.wct-dark input[type="password"],
html.wct-auth.wct-dark input[type="number"],
html.wct-auth.wct-dark select,
html.wct-auth.wct-dark textarea{
  background: rgba(15,23,42,.85) !important;
  color: #e2e8f0 !important;
  border-color: rgba(51,65,85,.9) !important;
}

html.wct-auth.wct-dark .btn-default{
  background: rgba(30,41,59,.9) !important;
  border-color: rgba(51,65,85,.9) !important;
  color: #cbd5e1 !important;
}

html.wct-auth.wct-dark .btn-default:hover{
  border-color: var(--client-primary) !important;
  color: var(--client-primary) !important;
}

html.wct-auth.wct-dark a{
  color: #60a5fa !important;
}

html.wct-auth.wct-dark a:hover{
  color: #93c5fd !important;
}

html.wct-auth.wct-dark .checkbox label{
  color: rgba(203,213,225,.7) !important;
}

html.wct-auth.wct-dark footer *{
  color: rgba(226,232,240,.35) !important;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 767px){
  html.wct-auth .panel-body{
    padding: 24px 20px !important;
  }
  html.wct-auth .login-heading{
    font-size: 19px !important;
  }
  html.wct-auth #content{
    padding: 20px 12px 30px;
  }
}

/* Tablet (iPad portrait/landscape 768-1199px) — Phase 6 (2026-05-14)
   The form card was sized for desktop (max-width ~480-520px). On iPad,
   the rest of the viewport was empty. Properly center and constrain
   the panel for tablet viewports. */
@media (min-width: 768px) and (max-width: 1199px){
  html.wct-auth .panel_s{
    max-width: 520px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  html.wct-auth .panel-body{
    padding: 32px 28px !important;
  }
  html.wct-auth #content{
    padding: 40px 20px 40px;
  }
  html.wct-auth .login-heading{
    font-size: 22px !important;
  }
}
