/* ============================================================
   LanaPharm Admin — Brand Design Layer (brand.css)
   Colors sampled from the official logo: blue #2C3B91, green #11954D
   Loaded AFTER the HS theme so it wins. RTL-first.
   ============================================================ */

:root {
  /* Brand */
  --lp-blue: #2C3B91;
  --lp-blue-2: #3D4EBE;
  --lp-blue-deep: #1E2A6E;
  --lp-blue-soft: #EEF0FA;
  --lp-green: #11954D;
  --lp-green-2: #17B45F;
  --lp-green-deep: #0C7A3E;
  --lp-green-soft: #E7F6EE;
  --lp-gradient: linear-gradient(135deg, #2C3B91 0%, #24608E 55%, #11954D 100%);
  --lp-gradient-soft: linear-gradient(135deg, #eef0fa 0%, #e7f6ee 100%);

  /* Neutrals */
  --lp-bg: #F5F7FB;
  --lp-surface: #FFFFFF;
  --lp-border: #E6EAF2;
  --lp-text: #1A2233;
  --lp-text-2: #454F63;
  --lp-muted: #8A94A6;

  /* Semantic */
  --lp-success: #11954D;
  --lp-warning: #F5A524;
  --lp-danger: #E5484D;

  /* Tokens */
  --lp-r-sm: 8px;
  --lp-r-md: 12px;
  --lp-r-lg: 18px;
  --lp-r-pill: 999px;
  --lp-sh-sm: 0 1px 2px rgba(16,24,40,.06);
  --lp-sh-md: 0 6px 18px rgba(16,24,40,.08);
  --lp-sh-lg: 0 18px 40px rgba(28,42,110,.16);
  --lp-ease: cubic-bezier(.4,0,.2,1);
}

/* ---------- Typography ---------- */
body,
.font-size-1, .navbar, .card, .btn, .form-control, input, select, textarea, button, table {
  font-family: 'Cairo', 'Segoe UI', 'Helvetica Neue', system-ui, -apple-system, sans-serif;
}

/* ============================================================
   AUTH / LOGIN  (self-contained, .lp-auth namespace)
   ============================================================ */
.lp-auth {
  min-height: 100vh;
  display: flex;
  background: var(--lp-bg);
  color: var(--lp-text);
  direction: rtl;
}
.lp-auth * { box-sizing: border-box; }

/* Brand panel (gradient side) */
.lp-auth__panel {
  flex: 1 1 46%;
  position: relative;
  overflow: hidden;
  background: var(--lp-gradient);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px;
  text-align: center;
}
/* decorative soft blobs + leaf motif */
.lp-auth__panel::before,
.lp-auth__panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  filter: blur(2px);
}
.lp-auth__panel::before { width: 420px; height: 420px; top: -140px; left: -120px; }
.lp-auth__panel::after  { width: 300px; height: 300px; bottom: -110px; right: -90px; background: rgba(23,180,95,.18); }

.lp-auth__brand { position: relative; z-index: 2; max-width: 420px; }
.lp-auth__logo { width: 260px; max-width: 78%; margin-bottom: 28px; filter: drop-shadow(0 8px 20px rgba(0,0,0,.18)); }
.lp-auth__title { font-size: 30px; font-weight: 700; margin: 0 0 12px; line-height: 1.3; }
.lp-auth__subtitle { font-size: 16px; font-weight: 400; opacity: .9; line-height: 1.9; margin: 0; }
.lp-auth__badges { margin-top: 34px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.lp-auth__badge {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--lp-r-pill);
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(6px);
}

/* Form side */
.lp-auth__form {
  flex: 1 1 54%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.lp-auth__card {
  width: 100%;
  max-width: 440px;
  background: var(--lp-surface);
  border-radius: var(--lp-r-lg);
  box-shadow: var(--lp-sh-lg);
  padding: 44px 40px;
  animation: lp-rise .5s var(--lp-ease) both;
}
@keyframes lp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.lp-auth__mobile-logo { display: none; text-align: center; margin-bottom: 20px; }
.lp-auth__mobile-logo img { width: 190px; }

.lp-auth__heading { font-size: 26px; font-weight: 700; color: var(--lp-text); margin: 0 0 6px; }
.lp-auth__hint { font-size: 15px; color: var(--lp-muted); margin: 0 0 30px; }

/* Fields */
.lp-field { margin-bottom: 20px; }
.lp-label { display: block; font-size: 14px; font-weight: 600; color: var(--lp-text-2); margin-bottom: 8px; }
.lp-input-wrap { position: relative; }
.lp-input-wrap > .lp-icon {
  position: absolute; top: 50%; transform: translateY(-50%); right: 16px;
  color: var(--lp-muted); font-size: 19px; pointer-events: none; transition: color .2s var(--lp-ease);
}
.lp-input {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--lp-border);
  border-radius: var(--lp-r-md);
  background: #fff;
  padding: 0 48px 0 16px;
  font-size: 15px; color: var(--lp-text);
  transition: border-color .2s var(--lp-ease), box-shadow .2s var(--lp-ease), background .2s;
  outline: none;
}
.lp-input::placeholder { color: #B4BCCB; }
.lp-input:focus {
  border-color: var(--lp-blue);
  box-shadow: 0 0 0 4px rgba(44,59,145,.12);
  background: #fff;
}
.lp-input:focus ~ .lp-icon { color: var(--lp-blue); }
/* password toggle button */
.lp-toggle {
  position: absolute; top: 50%; transform: translateY(-50%); left: 12px;
  background: none; border: 0; color: var(--lp-muted); cursor: pointer; font-size: 19px; padding: 6px;
  transition: color .2s var(--lp-ease);
}
.lp-toggle:hover { color: var(--lp-blue); }

/* invalid state */
.lp-input.is-invalid { border-color: var(--lp-danger); }
.lp-input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(229,72,77,.12); }
.lp-input.is-invalid ~ .lp-icon { color: var(--lp-danger); }
.lp-error {
  display: none;
  color: var(--lp-danger);
  font-size: 13px; font-weight: 600;
  margin-top: 7px;
  animation: lp-shake .3s var(--lp-ease);
}
.lp-field.has-error .lp-error { display: block; }
@keyframes lp-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }

/* remember + row */
.lp-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.lp-check { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 14px; color: var(--lp-text-2); }
.lp-check input { width: 18px; height: 18px; accent-color: var(--lp-blue); cursor: pointer; }

/* button */
.lp-btn {
  width: 100%; height: 52px; border: 0; border-radius: var(--lp-r-md);
  background: var(--lp-gradient); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 24px rgba(44,59,145,.28);
  transition: transform .15s var(--lp-ease), box-shadow .2s var(--lp-ease), opacity .2s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.lp-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(44,59,145,.34); }
.lp-btn:active { transform: translateY(0); }
.lp-btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.lp-btn .lp-spin {
  width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: lp-spin .7s linear infinite; display: none;
}
.lp-btn.is-loading .lp-spin { display: inline-block; }
.lp-btn.is-loading .lp-btn-text { opacity: .85; }
@keyframes lp-spin { to { transform: rotate(360deg); } }

/* general alert (credentials error) */
.lp-alert {
  display: none;
  background: #FDECEC; color: #B42318;
  border: 1px solid #F6C9C9; border-radius: var(--lp-r-md);
  padding: 12px 14px; font-size: 14px; font-weight: 600; margin-bottom: 22px;
  align-items: center; gap: 9px;
}
.lp-alert.show { display: flex; }

.lp-auth__footer { text-align: center; margin-top: 26px; font-size: 13px; color: var(--lp-muted); }
.lp-demo { margin-top: 20px; padding: 14px; background: var(--lp-blue-soft); border-radius: var(--lp-r-md); font-size: 13px; color: var(--lp-text-2); }
.lp-demo b { color: var(--lp-blue); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .lp-auth__panel { display: none; }
  .lp-auth__form { flex-basis: 100%; }
  .lp-auth__mobile-logo { display: block; }
}
@media (max-width: 480px) {
  .lp-auth__card { padding: 32px 22px; box-shadow: var(--lp-sh-md); }
  .lp-auth__heading { font-size: 23px; }
}

/* ============================================================
   SHELL — Sidebar + Topbar + Content (brand overlay on HS theme)
   ============================================================ */
body { background: var(--lp-bg) !important; color: var(--lp-text); }
.main { background: var(--lp-bg); }

/* ---------- Sidebar : deep-blue gradient ---------- */
.navbar-vertical-aside {
  background: linear-gradient(190deg, #1B2A6B 0%, #2C3B91 62%, #26377F 100%) !important;
  border: 0 !important;
  box-shadow: 4px 0 26px rgba(27,42,107,.14);
}
.navbar-vertical-aside .navbar-brand-wrapper {
  background: transparent !important;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-top: 6px; padding-bottom: 6px;
}
.navbar-vertical-aside .navbar-brand-logo { max-height: 44px; width: auto; }
.navbar-vertical-aside .navbar-brand-logo-mini { max-height: 34px; width: auto; }

.navbar-vertical .nav-link {
  color: rgba(255,255,255,.74) !important;
  font-weight: 500;
  border-radius: 10px;
  margin: 2px 12px;
  padding: 10px 14px;
  transition: background .18s var(--lp-ease), color .18s var(--lp-ease);
}
.navbar-vertical .nav-link .nav-icon { color: rgba(255,255,255,.62); font-size: 1.15rem; transition: color .18s; }
.navbar-vertical .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.10); }
.navbar-vertical .nav-link:hover .nav-icon { color: #fff; }

/* active item */
.navbar-vertical-aside .active > .nav-link,
.navbar-vertical-aside .nav-link.active,
.navbar-vertical-aside .show > .nav-link {
  color: #fff !important;
  background: rgba(255,255,255,.15) !important;
  position: relative;
}
.navbar-vertical-aside .active > .nav-link .nav-icon,
.navbar-vertical-aside .nav-link.active .nav-icon { color: var(--lp-green-2) !important; }
.navbar-vertical-aside .active > .nav-link::before,
.navbar-vertical-aside .nav-link.active::before {
  content: ""; position: absolute; top: 20%; bottom: 20%;
  inset-inline-start: 0; width: 4px; border-radius: 4px; background: var(--lp-green-2);
}

/* section subtitles */
.navbar-vertical .nav-subtitle {
  color: rgba(255,255,255,.40) !important;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.navbar-vertical .nav-subtitle-replacer { color: rgba(255,255,255,.4) !important; }

/* submenu */
.navbar-vertical .nav-sub .nav-link { color: rgba(255,255,255,.62) !important; font-size: 13.5px; padding: 8px 14px; margin: 1px 12px; }
.navbar-vertical .nav-sub .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.08); }
.navbar-vertical .nav-sub .active > .nav-link,
.navbar-vertical .nav-sub .nav-link.active { color: #fff !important; }
.navbar-vertical .nav-indicator-icon { color: rgba(255,255,255,.38) !important; }
.navbar-vertical .nav-sub .active > .nav-link .nav-indicator-icon,
.navbar-vertical .nav-sub .nav-link.active .nav-indicator-icon { color: var(--lp-green-2) !important; }

.navbar-vertical-aside .navbar-vertical-aside-toggle i { color: rgba(255,255,255,.82); }
.navbar-vertical .badge { border-radius: var(--lp-r-pill); font-weight: 600; }

/* ---------- Topbar ---------- */
#header.navbar {
  background: #fff !important;
  box-shadow: 0 2px 14px rgba(16,24,40,.06) !important;
  border: 0 !important;
}
#header .btn-ghost-secondary, #header .btn-icon { color: var(--lp-text-2); border-radius: 12px; transition: all .18s var(--lp-ease); }
#header .btn-ghost-secondary:hover, #header .btn-icon:hover { color: var(--lp-blue); background: var(--lp-blue-soft); }
#header .navbar-dropdown-account-wrapper .avatar-img { border: 2px solid var(--lp-blue-soft); }
.avatar-status.avatar-status-success { background-color: var(--lp-green) !important; }

/* dropdowns */
.dropdown-menu, .navbar-dropdown-menu {
  border: 1px solid var(--lp-border) !important;
  border-radius: var(--lp-r-md) !important;
  box-shadow: var(--lp-sh-md) !important;
  padding: 8px !important;
}
.dropdown-item { border-radius: 8px; font-weight: 500; }
.dropdown-item:hover { background: var(--lp-blue-soft); color: var(--lp-blue); }

/* ---------- Content components ---------- */
.card { border: 0 !important; border-radius: var(--lp-r-lg) !important; box-shadow: var(--lp-sh-md) !important; }
.card-header { border-bottom: 1px solid var(--lp-border); background: transparent; }

.btn { border-radius: 10px; font-weight: 600; }
.btn-primary { background: var(--lp-blue) !important; border-color: var(--lp-blue) !important; }
.btn-primary:hover { background: var(--lp-blue-deep) !important; border-color: var(--lp-blue-deep) !important; }
.btn-success { background: var(--lp-green) !important; border-color: var(--lp-green) !important; }
.btn-success:hover { background: var(--lp-green-deep) !important; border-color: var(--lp-green-deep) !important; }

.form-control, .custom-select {
  border-radius: 10px; border: 1.5px solid var(--lp-border);
}
.form-control:focus, .custom-select:focus {
  border-color: var(--lp-blue); box-shadow: 0 0 0 3px rgba(44,59,145,.10);
}
.form-control.is-invalid { border-color: var(--lp-danger); }

.page-header .page-header-title, .page-title, .page-header-title { color: var(--lp-text); font-weight: 700; }

/* footer */
.footer { background: transparent; border-top: 1px solid var(--lp-border); color: var(--lp-muted); }

