@import url("ios-animations.css");
/* ============================================================
   OFFIT DO-D - New Login UI Styles
   Matches Modern Design Mockup
   ============================================================ */

:root {
  --login-primary: #0066eb;
  --login-primary-hover: #0052be;
  --login-primary-gradient: linear-gradient(180deg, #2f80ed 0%, #0066eb 100%);
  --login-primary-shadow: 0 4px 14px rgba(0, 102, 235, 0.35);
  --login-border: #dbe2ea;
  --login-text-dark: #1e293b;
  --login-text-muted: #64748b;
  --login-bg-soft: #f8fafc;
}

html,
body.login-page {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body.login-page {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f0f7ff;
  background-image: url('../../../pic/login/bg.webp');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  color: var(--login-text-dark);
  position: relative;
}

/* 1. TOPBAR HEADER (Matches .offit-home-topbar) */
.login-header-wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px 0;
  position: relative;
  z-index: 1050;
}

.login-topbar {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 4px 18px rgba(18, 78, 161, 0.05);
  border: 1.5px solid #dbe8f7;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  transition: all 0.25s ease;
}

.login-brand-logo {
  height: 38px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.login-topbar-search-wrap {
  flex: 1 1 auto;
  max-width: 500px;
  min-width: 180px;
  margin: 0 12px;
}

.login-topbar-search {
  background-color: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 50px;
  padding: 8px 18px 8px 40px;
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-topbar-search:focus-within {
  background-color: #ffffff;
  border-color: var(--login-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 235, 0.12);
}

.login-topbar-search .search-icon {
  position: absolute;
  left: 14px;
  color: var(--login-primary);
  font-size: 15px;
  pointer-events: none;
}

.login-topbar-search input {
  border: none;
  background: transparent;
  width: 100%;
  outline: none;
  font-size: 13.5px;
  color: #334155;
  font-family: inherit;
}

.login-topbar-search input::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

.login-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-topbar-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 50px;
  background: #f0f7ff;
  border: 1.5px solid #d0e3fc;
  color: var(--login-primary);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-topbar-contact:hover {
  background: #e1effe;
  color: var(--login-primary-hover);
  border-color: #b9d8fc;
}

.btn-topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 4px 6px;
  border-radius: 50px;
  background: #f0f7ff;
  border: 1.5px solid #d0e3fc;
  color: #1e3a8a;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-topbar-user:hover {
  background: #e1effe;
  border-color: #b9d8fc;
}

.btn-topbar-user .user-avatar-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--login-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow: hidden;
}

.btn-topbar-register {
  padding: 7px 22px;
  border-radius: 50px;
  background: var(--login-primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 102, 235, 0.25);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-topbar-register:hover {
  background: var(--login-primary-hover);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 102, 235, 0.35);
  transform: translateY(-1px);
}

.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #f0f7ff;
  border: 1.5px solid #d0e3fc;
  font-size: 1.35rem;
  color: #1868d4;
  cursor: pointer;
  padding: 0;
  border-radius: 12px;
  transition: transform 0.15s, background-color 0.15s, border-color 0.15s;
}

.sidebar-toggle-btn:hover {
  background-color: #e1effe;
  border-color: #b9d8fc;
}

.sidebar-toggle-btn:active {
  transform: scale(0.92);
}

/* 2. MAIN CONTENT - CENTER LOGIN CARD */
.login-main-wrapper {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 24px;
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.login-card-container {
  background: #ffffff;
  border-radius: 36px;
  box-shadow: 0 20px 50px rgba(10, 50, 120, 0.08), 0 4px 16px rgba(10, 50, 120, 0.03);
  border: 1px solid rgba(225, 235, 245, 0.8);
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  animation: loginCardFadeIn 0.42s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes loginCardFadeIn {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.login-card-left {
  flex: 0 0 48%;
  max-width: 48%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 24px 28px;
  background: transparent;
}

.login-card-img {
  width: 100%;
  max-width: 380px;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 20px;
}

.login-card-right {
  flex: 1 1 auto;
  min-width: 0;
  padding: 40px 48px 40px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-field-label {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  display: block;
}

.login-input-group {
  position: relative;
  margin-bottom: 18px;
}

.login-input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 18px;
  pointer-events: none;
  transition: color 0.2s;
}

.login-form-control {
  width: 100%;
  height: 48px;
  padding: 10px 18px 10px 48px;
  border-radius: 50px;
  border: 1.5px solid #dbe2ea;
  font-size: 15px;
  color: #1e293b;
  font-family: inherit;
  background-color: #ffffff !important;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-form-control:-webkit-autofill,
.login-form-control:-webkit-autofill:hover, 
.login-form-control:-webkit-autofill:focus, 
.login-form-control:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 40px #ffffff inset !important;
  -webkit-text-fill-color: #1e293b !important;
  transition: background-color 5000s ease-in-out 0s;
}

.login-form-control:focus {
  border-color: var(--login-primary);
  box-shadow: 0 0 0 3.5px rgba(0, 102, 235, 0.15) !important;
}

.login-input-group:focus-within .login-input-icon {
  color: var(--login-primary);
}

.login-form-control::placeholder {
  color: #94a3b8;
}

.login-forgot-wrap {
  text-align: right;
  margin-top: -6px;
  margin-bottom: 22px;
}

.login-forgot-link {
  color: var(--login-primary);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}

.login-forgot-link:hover {
  color: var(--login-primary-hover);
  text-decoration: underline;
}

.btn-login-submit {
  width: 100%;
  height: 48px;
  border-radius: 50px;
  background: var(--login-primary-gradient);
  border: none;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: var(--login-primary-shadow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-login-submit:hover {
  box-shadow: 0 6px 18px rgba(0, 102, 235, 0.45);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-login-submit:active {
  transform: translateY(0);
}

.login-divider-row {
  display: flex;
  align-items: center;
  margin: 16px 0;
}

.login-divider-line {
  flex: 1;
  height: 1px;
  background-color: #e2e8f0;
}

.login-divider-text {
  padding: 0 14px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
}

.btn-login-register-outline {
  width: 100%;
  height: 48px;
  border-radius: 50px;
  background: #ffffff;
  border: 1.5px solid var(--login-primary);
  color: var(--login-primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-login-register-outline:hover {
  background: #f0f7ff;
  border-color: var(--login-primary-hover);
  color: var(--login-primary-hover);
  transform: translateY(-1px);
}

.btn-login-register-outline:active {
  transform: translateY(0);
}

/* 3. FOOTER */
.login-footer {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  padding: 16px 20px 24px;
  text-align: center;
  position: relative;
  z-index: 10;
  margin-top: auto;
}

.login-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
}

.login-footer-links a {
  color: #475569;
  text-decoration: none;
  transition: color 0.15s;
}

.login-footer-links a:hover {
  color: var(--login-primary);
}

.login-footer-links .divider-dot {
  color: #94a3b8;
}

.login-footer-logo {
  margin-bottom: 8px;
}

.login-footer-logo img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.login-footer-copy {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

/* 3.5 MOBILE BLUE SIDEBAR DRAWER (Matches index.php & register.php) */
.sidebar-overlay {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1075;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease;
  cursor: pointer;
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

.login-mobile-sidebar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 285px !important;
  max-width: 85vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 1080 !important;
  transform: translateX(-100%) !important;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border-radius: 0 20px 20px 0 !important;
  background: linear-gradient(180deg, #175bb8 0%, #124da0 60%, #0d3d82 100%) !important;
  padding: 14px 12px !important;
  box-shadow: 4px 0 28px rgba(0, 0, 0, 0.3) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  overflow-y: auto !important;
}

.login-mobile-sidebar.show {
  transform: translateX(0) !important;
}

.offit-sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.offit-sidebar-nav li {
  margin: 0;
}

.offit-sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #ffffff !important;
  text-decoration: none !important;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.25;
  transition: all 0.2s ease;
  white-space: nowrap !important;
}

.offit-sidebar-nav li a i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.offit-sidebar-nav li a.active {
  background: #2b77e5 !important;
  box-shadow: 0 4px 14px rgba(14, 58, 122, 0.3) !important;
  font-weight: 600;
}

.offit-sidebar-nav li a:hover:not(.active) {
  background: rgba(255, 255, 255, 0.12) !important;
  transform: translateX(3px);
}

.offit-sidebar-admin-nav {
  margin-top: auto !important;
  margin-bottom: 8px !important;
}

.offit-sidebar-admin-nav ~ .offit-sidebar-health-pill {
  margin-top: 0 !important;
}

.offit-sidebar-health-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: auto;
}

.health-pill-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  color: #1868d4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.health-pill-text {
  font-size: 0.875rem;
  line-height: 1.25;
}

/* 4. RESPONSIVE BREAKPOINTS */
@media (max-width: 991.98px) {
  .login-header-wrap {
    padding: 10px 12px 0;
  }

  .login-topbar {
    padding: 6px 10px;
    border-radius: 20px;
  }
  
  .login-topbar-search-wrap {
    display: none;
  }
  
  .sidebar-toggle-btn {
    display: inline-flex;
  }
  
  .btn-topbar-register {
    display: none;
  }

  .login-card-container {
    flex-direction: column;
    max-width: 440px;
    border-radius: 28px;
  }
  
  .login-card-left {
    flex: none;
    max-width: 100%;
    width: 100%;
    padding: 24px 20px 0;
  }
  
  .login-card-img {
    max-width: 260px;
    margin: 0 auto;
  }
  
  .login-card-right {
    padding: 20px 24px 28px;
  }
}

@media (max-width: 575.98px) {
  html,
  body.login-page {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .login-header-wrap {
    padding: 8px 8px 0;
    flex-shrink: 0;
  }

  .login-topbar {
    padding: 5px 7px;
    border-radius: 18px;
  }

  .login-brand-logo {
    height: 28px;
  }
  
  .btn-topbar-contact span {
    display: none;
  }
  
  .btn-topbar-contact {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .btn-topbar-user .user-name-text {
    display: none;
  }

  .btn-topbar-user {
    padding: 4px 10px 4px 6px;
    background: #f6f9fc;
    border: 1px solid #e1ebf6;
  }

  .login-main-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    align-items: flex-start;
    padding: 10px 14px 6px;
  }

  .login-card-container {
    border-radius: 22px;
    max-height: 100%;
  }

  .login-card-left {
    padding: 4px 8px 0;
  }

  .login-card-img {
    max-width: clamp(160px, 28dvh, 250px);
    border-radius: 14px;
  }

  .login-card-right {
    padding: 6px 18px 16px;
  }

  .login-field-label {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .login-input-group {
    margin-bottom: 10px;
  }

  .login-input-icon {
    left: 15px;
    font-size: 16px;
  }

  .login-form-control {
    height: 40px;
    font-size: 14px;
    padding: 8px 14px 8px 42px;
  }

  .login-forgot-wrap {
    margin-top: -2px;
    margin-bottom: 12px;
  }

  .login-forgot-link {
    font-size: 12.5px;
  }

  .btn-login-submit {
    height: 42px;
    font-size: 15px;
  }

  .login-divider-row {
    margin: 10px 0;
  }

  .btn-login-register-outline {
    height: 42px;
    font-size: 14px;
  }

  .login-footer {
    flex-shrink: 0;
    padding: 6px 14px 12px;
  }

  .login-footer-links {
    font-size: 12px;
    gap: 4px 10px;
    margin-bottom: 4px;
  }

  .login-footer-logo {
    margin-bottom: 4px;
  }

  .login-footer-logo img {
    height: 22px;
  }

  .login-footer-copy {
    font-size: 11px;
  }
}
