/* =====================================================================
   Pay2India – dark-navy sidebar theme (loaded last, overrides the
   horizontal Skote layout). Sidebar left, translucent header on top,
   rounded content canvas on the right.
   ===================================================================== */
:root {
  --p2i-navy-900: #062f2c;
  --p2i-navy-800: #0b4744;
  --p2i-navy-700: #0d5c56;
  --p2i-blue: #0d5f59;
  --p2i-blue-dark: #0b4744;
  --p2i-shadow: rgba(13, 95, 89, .28);
  --p2i-blue-soft: #e2f1f0;
  --p2i-canvas: #f2f5f9;
  --p2i-card: #ffffff;
  --p2i-line: #e3ebec;
  --p2i-text: #0f2147;
  --p2i-muted: #6b7a99;
  --p2i-green: #19b36b;
  --p2i-orange: #f5a524;
  --p2i-red: #ee4b4b;
  --p2i-purple: #8b5cf6;
  --p2i-sidebar-w: 250px;
  --p2i-header-h: 64px;
}

html body,
body[data-layout-size=boxed] {
  background: linear-gradient(180deg, var(--p2i-navy-700) 0%, var(--p2i-navy-800) 35%, var(--p2i-navy-900) 100%) fixed;
  color: var(--p2i-text);
}

/* ---------- canvas ---------- */
body[data-layout-size=boxed] #layout-wrapper,
body[data-layout=horizontal][data-layout-size=boxed] #layout-wrapper {
  max-width: none;
  margin: var(--p2i-header-h) 0 0 var(--p2i-sidebar-w);
  min-height: calc(100vh - var(--p2i-header-h) - 40px);
  background: var(--p2i-canvas);
  border-radius: 28px 0 0 0;
  box-shadow: none;
  transition: margin-left .25s ease;
}
body.p2i-sidebar-hidden #layout-wrapper { margin-left: 0 !important; border-radius: 0; }

body #layout-wrapper .page-content,
body[data-layout=horizontal] #layout-wrapper .page-content {
  margin-top: 0;
  padding: 20px 20px 24px;
}
body #layout-wrapper .Dashboard-page-content { padding-top: 0; }
body #layout-wrapper .container-fluid { max-width: 100%; }

/* ---------- sidebar (re-skinned .topnav) ---------- */
body #layout-wrapper .topnav {
  position: fixed;
  top: 0; left: 0; bottom: 0; right: auto;
  width: var(--p2i-sidebar-w);
  margin: 0;
  padding: 0 14px 20px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  z-index: 1001;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform .25s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) transparent;
}
body.p2i-sidebar-hidden #layout-wrapper .topnav { transform: translateX(-100%); }
.topnav .container-fluid { padding: 0; }
.topnav .navbar { padding: 0; display: block; }
.topnav #topnav-menu-content { display: block !important; }

.p2i-sidebar-brand { display: flex; align-items: center; height: var(--p2i-header-h); padding: 0 6px; margin-bottom: 8px; }
.p2i-sidebar-brand img { height: 38px; width: auto; }

.menufront ul.navbar-nav { display: block; background: transparent; border-radius: 0; }
.menufront ul li { display: block; width: 100%; }

.menufront ul.navbar-nav > li { margin-bottom: 4px; }
.menufront ul.navbar-nav > li > a.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 12px;
  color: #d7ece9; font-size: 14px; font-weight: 500;
  transition: background .2s, color .2s;
}
.menufront ul.navbar-nav > li > a.menu-item i:first-child { width: 20px; text-align: center; font-size: 15px; margin: 0 !important; }
.menufront ul.navbar-nav > li > a.menu-item i.fa-chevron-down { margin-left: auto !important; font-size: 10px; opacity: .7; }
.menufront ul.navbar-nav > li > a.menu-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.menufront ul.navbar-nav > li.p2i-open > a.menu-item,
.menufront ul.navbar-nav > li:has(> ul .nuxt-link-exact-active) > a.menu-item {
  background: #e2f1f0; color: #0b4744; box-shadow: 0 8px 20px rgba(0,0,0,.22);
}

/* sub menus: inline accordion */
.menufront ul.submenufront,
.menufront ul.loan-submenufront {
  position: static !important;
  min-width: 0;
  margin: 4px 0 6px;
  padding: 4px 0 4px 10px;
  background: transparent;
  border: 0; border-radius: 0; box-shadow: none;
  border-left: 1px solid rgba(255,255,255,.14);
  margin-left: 22px;
}
.menufront ul.submenufront li a,
.menufront ul.submenufront li a.dropdown-item,
.menufront ul.loan-submenufront li a {
  display: flex; align-items: center;
  color: #bcdcd8; font-size: 13px; padding: 8px 10px; border-radius: 8px;
  white-space: normal; background: transparent;
}
.menufront ul.submenufront li a i,
.menufront ul.loan-submenufront li a i { color: #7fd0c6; width: 18px; font-size: 12px; }
.menufront ul.submenufront li a:hover,
.menufront ul.loan-submenufront li a:hover { background: rgba(255,255,255,.08); color: #fff; }
.menufront ul.submenufront li a.nuxt-link-exact-active,
.menufront ul.submenufront li a.active,
.menufront ul.loan-submenufront li a.nuxt-link-exact-active { background: rgba(255,255,255,.16); color: #fff; }
.menufront ul.submenufront li a.submenu-sec { min-width: 0; color: #bcdcd8; }

.menuoverlay { display: none !important; }

/* ---------- header ---------- */
html body #page-topbar.modern-header {
  left: var(--p2i-sidebar-w); right: 0; top: 0; max-width: none; margin: 0;
  height: var(--p2i-header-h);
  background: transparent; border: 0; box-shadow: none;
  transition: left .25s ease;
}
body.p2i-sidebar-hidden #page-topbar.modern-header { left: 0; }
.modern-header .navbar-header-modern { height: var(--p2i-header-h); padding: 0 22px 0 18px; backdrop-filter: none; gap: 16px; }
.modern-header .header-left-section { flex: 0 0 auto; gap: 0; }
.modern-header .modern-logo-box { display: none; }
.modern-header .header-right-section { flex: 1; justify-content: flex-end; gap: 10px; display: flex; align-items: center; }
.modern-header .quick-actions { flex: 1; justify-content: center; align-items: center; gap: 10px; }

.modern-header .mobile-menu-toggle,
.modern-header .action-btn,
.modern-header .header-icon-btn {
  display: inline-flex !important; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; border-radius: 12px;
  background: rgba(255,255,255,.08) !important; border: 1px solid rgba(255,255,255,.12) !important;
  color: #e6efff !important; box-shadow: none;
}
.modern-header .mobile-menu-toggle:hover,
.modern-header .action-btn:hover,
.modern-header .header-icon-btn:hover { background: rgba(255,255,255,.16) !important; }
.modern-header .mobile-menu-toggle .hamburger-icon-wrapper .line { background-color: #e6efff; }

.modern-header .header-search-box {
  position: relative; display: flex !important; align-items: center;
  width: min(460px, 100%); height: 40px; padding: 0 6px 0 38px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
}
.modern-header .header-search-box .search-icon { position: absolute; left: 14px; color: #bcdcd8; }
.modern-header .search-input { flex: 1; height: 100%; background: transparent; border: 0; box-shadow: none; color: #fff; font-size: 13px; padding: 0; }
.modern-header .search-input::placeholder { color: #a9bbdf; }
.modern-header .search-input:focus { background: transparent; box-shadow: none; }
.modern-header .search-shortcut,
.modern-header .search-shortcut:hover { height: 28px; padding: 0 12px; border-radius: 8px; background: var(--p2i-blue); border-color: var(--p2i-blue); color: #fff; font-size: 12px; }

.modern-header .user-profile-btn {
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 5px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 999px;
}
.modern-header .user-profile-btn:hover { background: rgba(255,255,255,.16); }
.modern-header .user-name, .modern-header .dropdown-arrow { color: #fff; font-size: 13px; }
.modern-header .user-avatar img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* ---------- footer ---------- */
body > .__nuxt, body footer.footer, #__layout footer.footer {
  position: static;
}
body footer.footer {
  position: static !important; left: auto !important; height: auto; margin-left: var(--p2i-sidebar-w);
  padding: 14px 22px; background: transparent; color: #9fb4dc; font-size: 11px;
}
body footer.footer a { color: #cfe0ff; }
body.p2i-sidebar-hidden footer.footer { margin-left: 0; }

/* ---------- global card / table / button skin ---------- */
body #layout-wrapper .card {
  border: 1px solid var(--p2i-line); border-radius: 16px;
  box-shadow: 0 8px 24px rgba(13, 95, 89, .10); background: var(--p2i-card);
}
body #layout-wrapper .table > thead > tr > th,
body #layout-wrapper .table-light th { background: #f6f8fd !important; color: var(--p2i-muted); font-weight: 600; font-size: 12px; border-color: var(--p2i-line); }
body #layout-wrapper .table td { border-color: var(--p2i-line); color: var(--p2i-text); }
body #layout-wrapper .btn-primary { background: var(--p2i-blue); border-color: var(--p2i-blue); border-radius: 10px; }
body #layout-wrapper .btn-primary:hover { background: var(--p2i-blue-dark); border-color: var(--p2i-blue-dark); }
body #layout-wrapper .btn-success { background: var(--p2i-green); border-color: var(--p2i-green); border-radius: 10px; }
body #layout-wrapper .btn-danger { border-radius: 10px; }

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
  body #layout-wrapper,
  body[data-layout-size=boxed] #layout-wrapper,
  body[data-layout=horizontal][data-layout-size=boxed] #layout-wrapper { margin-left: 0; border-radius: 22px 22px 0 0; }
  html body #page-topbar.modern-header { left: 0; }
  body footer.footer { margin-left: 0; }
  body #layout-wrapper .topnav { background: var(--p2i-navy-900); transform: translateX(-100%); box-shadow: 8px 0 30px rgba(0,0,0,.3); }
  body.p2i-sidebar-mobile-open #layout-wrapper .topnav { transform: none; }
  .modern-header .quick-actions { display: none !important; }
}

/* ---------- v2 fixes: solid header on scroll, search, profile, quick actions ---------- */
html body #page-topbar.modern-header {
  background: var(--p2i-navy-700);       /* matches top of body gradient so content scrolls under it cleanly */
  box-shadow: 0 6px 18px rgba(13, 95, 89, .30);
  z-index: 1002;
}
@media (min-width: 992px) {
  html body #page-topbar.modern-header { border-radius: 0; }
}
body #layout-wrapper .topnav { z-index: 1003; }

.modern-header .header-search-box {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  height: 42px;
}
.modern-header .header-search-box:focus-within { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.45); }
.modern-header .search-input { color: #fff !important; font-weight: 500; }
.modern-header .search-input::placeholder { color: #c8d7f3; opacity: 1; }
.modern-header .search-shortcut { height: 30px; margin: 0; font-weight: 600; }

.modern-header .user-dropdown-wrapper { position: relative; }
.modern-header .user-profile-btn {
  height: 44px; padding: 0 14px 0 5px; gap: 10px; cursor: pointer;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
}
.modern-header .user-avatar { position: relative; width: 34px; height: 34px; border: 2px solid rgba(255,255,255,.6); border-radius: 50%; }
.modern-header .user-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.modern-header .user-avatar .status-indicator { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #19b36b; border: 2px solid var(--p2i-navy-700); }
.modern-header .user-info { display: flex; align-items: center; }
.modern-header .user-name { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.modern-header .dropdown-arrow { color: #cfe0ff; font-size: 10px; }

.modern-header .dropdown-menu.modern-dropdown {
  margin-top: 10px; min-width: 240px; padding: 8px;
  background: #fff; border: 1px solid var(--p2i-line); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(13, 95, 89, .30); z-index: 1100;
}
.modern-dropdown .dropdown-header-compact { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.modern-dropdown .user-avatar-compact img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.modern-dropdown .user-info-compact h6 { margin: 0; font-size: 13px; font-weight: 700; color: var(--p2i-text); }
.modern-dropdown .user-info-compact p { margin: 0; font-size: 11px; color: var(--p2i-muted); }
.modern-dropdown .dropdown-item-compact {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  color: var(--p2i-text); font-size: 13px; font-weight: 500; text-decoration: none;
}
.modern-dropdown .dropdown-item-compact i { width: 18px; color: var(--p2i-blue); text-align: center; }
.modern-dropdown .dropdown-item-compact:hover { background: var(--p2i-blue-soft); }
.modern-dropdown .logout-item i, .modern-dropdown .logout-item { color: var(--p2i-red); }
.modern-dropdown .logout-item:hover { background: #fdecec; }

/* notification bell badge (component renders its own button) */
.modern-header .header-item-wrapper button,
.modern-header .header-item-wrapper a { color: #e6efff; }

/* logo sits on a white tile so the dark-green wordmark stays readable on the teal sidebar */
.p2i-sidebar-brand { height: auto; margin: 12px 0 14px; padding: 0; }
.p2i-sidebar-brand a { display: flex; align-items: center; justify-content: center; width: 100%; padding: 6px 10px; background: #fff; border-radius: 14px; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.p2i-sidebar-brand img { height: 52px; max-width: 100%; object-fit: contain; }

/* ---------- v3: clearer search box ---------- */
html body .modern-header .header-search-box {
  background: #ffffff !important;
  border: 1px solid #ffffff !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  height: 42px;
  width: min(480px, 100%);
}
html body .modern-header .header-search-box:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35), 0 6px 16px rgba(0, 0, 0, .18); }
html body .modern-header .header-search-box .search-icon { color: #0d5f59 !important; }
html body .modern-header .header-search-box .search-input {
  color: #0f2147 !important; font-size: 13px; font-weight: 500;
  background: transparent !important; border: 0 !important; box-shadow: none !important;
}
html body .modern-header .header-search-box .search-input::placeholder { color: #7a8c91 !important; opacity: 1 !important; }
html body .modern-header .header-search-box .search-shortcut,
html body .modern-header .header-search-box .search-shortcut:hover,
html body .modern-header .header-search-box .search-shortcut:focus {
  background: #0d5f59 !important; border-color: #0d5f59 !important; color: #fff !important;
  height: 32px; padding: 0 16px; border-radius: 9px; font-size: 12px; font-weight: 600;
}

/* ---------- toast messages ($showNoti → el-message) ---------- */
html body .el-message {
  min-width: 320px;
  padding: 14px 44px 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--p2i-line);
  border-left: 4px solid var(--p2i-blue);
  background: #fff;
  box-shadow: 0 12px 28px rgba(6, 47, 44, .18);
}
html body .el-message .el-message__content { color: var(--p2i-text); font-size: 13px; font-weight: 500; line-height: 1.4; }
html body .el-message .el-message__icon { font-size: 18px; margin-right: 10px; }
html body .el-message .el-message__closeBtn { color: var(--p2i-muted); right: 14px; }
html body .el-message .el-message__closeBtn:hover { color: var(--p2i-text); }
html body .el-message--success { border-left-color: var(--p2i-green); background: #f0fbf6; }
html body .el-message--success .el-message__icon { color: var(--p2i-green); }
html body .el-message--error { border-left-color: var(--p2i-red); background: #fff2f2; }
html body .el-message--error .el-message__icon { color: var(--p2i-red); }
html body .el-message--warning { border-left-color: var(--p2i-orange); background: #fff8ec; }
html body .el-message--warning .el-message__icon { color: var(--p2i-orange); }
html body .el-message--info { border-left-color: var(--p2i-blue); background: var(--p2i-blue-soft); }
html body .el-message--info .el-message__icon { color: var(--p2i-blue); }

/* toast position: top-right, below the header, never clipped by the viewport */
html body .el-message {
  top: calc(var(--p2i-header-h) + 16px) !important;
  left: auto !important;
  right: 24px !important;
  transform: none !important;
  width: auto;
  max-width: min(420px, calc(100vw - 48px));
  min-width: 280px;
  box-sizing: border-box;
  z-index: 99999 !important;
}
html body .el-message-fade-enter,
html body .el-message-fade-enter-from,
html body .el-message-fade-leave-active { opacity: 0; transform: translateX(24px) !important; }

/* ---------- fixed rounded corner + no bottom green strip ---------- */
body[data-layout-size=boxed] #layout-wrapper,
body[data-layout=horizontal][data-layout-size=boxed] #layout-wrapper {
  border-radius: 0;
  min-height: calc(100vh - var(--p2i-header-h));
}
/* the corner stays pinned under the header while the page scrolls
   (admin layout only: pages without the sidebar/header, like login, must not show it) */
body:has(#layout-wrapper)::after {
  content: "";
  position: fixed;
  top: var(--p2i-header-h);
  left: var(--p2i-sidebar-w);
  width: 28px; height: 28px;
  background: linear-gradient(180deg, var(--p2i-navy-700) 0%, var(--p2i-navy-800) 35%, var(--p2i-navy-900) 100%) fixed;
  -webkit-mask: radial-gradient(circle at 100% 100%, transparent 27.5px, #000 28px);
          mask: radial-gradient(circle at 100% 100%, transparent 27.5px, #000 28px);
  pointer-events: none;
  z-index: 5;
  transition: left .25s ease;
}
body.p2i-sidebar-hidden::after { display: none; }
body footer.footer { background: var(--p2i-canvas); color: var(--p2i-muted); }
body footer.footer a { color: var(--p2i-blue); }

/* footer only spans the content side; sidebar stays green to the very bottom */
html body footer.footer {
  position: relative !important;
  left: auto !important; right: auto !important; bottom: auto !important;
  width: auto !important;
  margin-left: var(--p2i-sidebar-w) !important;
  z-index: 1;
}
html body.p2i-sidebar-hidden footer.footer { margin-left: 0 !important; }
@media (max-width: 991.98px) { html body footer.footer { margin-left: 0 !important; } }
html body #layout-wrapper .topnav { z-index: 1001; }

/* ---------- profile pinned to the bottom of the sidebar ---------- */
body #layout-wrapper .topnav,
html body .topnav { display: flex; flex-direction: column; }
.topnav > .container-fluid { flex: 0 0 auto; }
.p2i-sidebar-profile {
  position: sticky; bottom: -20px;
  margin: auto -14px -20px; padding: 12px 14px 16px;
  background: linear-gradient(180deg, var(--p2i-navy-800), var(--p2i-navy-900)) fixed;
  border-top: 1px solid rgba(255,255,255,.12);
}
.p2i-sidebar-profile .user-dropdown-wrapper { display: block; width: 100%; }
.p2i-sidebar-profile .user-profile-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
}
.p2i-sidebar-profile .user-profile-btn:hover { background: rgba(255,255,255,.16); }
.p2i-sidebar-profile .user-info { flex: 1; text-align: left; min-width: 0; }
.p2i-sidebar-profile .user-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p2i-sidebar-profile .dropdown-arrow { transform: rotate(180deg); }
/* menu opens inline above the button so the scrolling sidebar never clips it */
.p2i-sidebar-profile .dropdown-menu {
  position: static !important; transform: none !important; inset: auto !important;
  width: 100%; margin: 0 0 8px; float: none; box-shadow: none;
}
.p2i-sidebar-profile .dropdown-menu.show { display: block; }
.p2i-sidebar-profile .user-dropdown-wrapper { display: flex; flex-direction: column-reverse; }

/* ---------- sidebar sub-menu hover / active (any depth) ---------- */
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a,
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a.dropdown-item,
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a.submenu-sec {
  background: transparent; color: #bcdcd8;
}
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a i { color: #7fd0c6; }
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a:hover,
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a:focus,
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a.dropdown-item:hover,
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a.submenu-sec:hover {
  background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none;
}
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a:hover i,
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a:focus i { color: #fff; }
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a.active,
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a.nuxt-link-exact-active,
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a.nuxt-link-active.dropdown-item {
  background: rgba(255, 255, 255, .18); color: #fff; font-weight: 600;
}
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a.active i,
html body #layout-wrapper .topnav .menufront ul.navbar-nav ul a.nuxt-link-exact-active i { color: #fff; }

/* ---------- page transitions ---------- */
.p2i-page-enter-active { transition: opacity .26s ease, transform .26s cubic-bezier(.22, .61, .36, 1); }
.p2i-page-leave-active { transition: opacity .12s ease; }
.p2i-page-enter,
.p2i-page-enter-from { opacity: 0; transform: translateY(14px); }
.p2i-page-leave-to { opacity: 0; }

/* content blocks rise in one after another once the page is in */
.p2i-page-enter-active .card,
.p2i-page-enter-active .p2i-card { animation: p2i-rise .4s cubic-bezier(.22, .61, .36, 1) both; }
.p2i-page-enter-active .card:nth-child(2) { animation-delay: .04s; }
.p2i-page-enter-active .card:nth-child(3) { animation-delay: .08s; }
@keyframes p2i-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* loading bar glow */
.nuxt-progress { box-shadow: 0 0 10px rgba(25, 179, 107, .7); z-index: 100000 !important; }

/* tables / spinners while data loads */
body #layout-wrapper .el-loading-mask { background-color: rgba(242, 245, 249, .72); backdrop-filter: blur(1px); border-radius: 16px; }
body #layout-wrapper .el-loading-spinner .path { stroke: var(--p2i-blue); }
body #layout-wrapper .el-loading-spinner .el-loading-text { color: var(--p2i-blue); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .p2i-page-enter-active, .p2i-page-leave-active, .p2i-page-enter-active .card { transition: none; animation: none; }
}

/* =====================================================================
   Inner pages (lists / tables / forms) – shared skin
   ===================================================================== */
body #layout-wrapper .page-content .card { overflow: hidden; }
body #layout-wrapper .card-body { padding: 20px 22px; }
body #layout-wrapper .card-title.h4 {
  position: relative; padding-left: 14px; font-size: 18px; font-weight: 700; color: var(--p2i-text);
}
body #layout-wrapper .card-title.h4::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, var(--p2i-green), var(--p2i-blue));
}
body #layout-wrapper .card-title .badge-primary {
  background: var(--p2i-blue-soft); color: var(--p2i-blue) !important; border-radius: 8px; padding: 5px 7px !important;
}

/* inputs / selects / search */
body #layout-wrapper .el-input__inner,
body #layout-wrapper .el-textarea__inner {
  border-radius: 10px; border-color: var(--p2i-line); background: #fbfcfd; color: var(--p2i-text);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
body #layout-wrapper .el-input__inner:hover { border-color: #b9d4d1; }
body #layout-wrapper .el-input__inner:focus,
body #layout-wrapper .el-textarea__inner:focus {
  border-color: var(--p2i-blue); background: #fff; box-shadow: 0 0 0 3px rgba(13, 95, 89, .12);
}
body #layout-wrapper .el-input-group__append {
  border-radius: 0 10px 10px 0; border-color: var(--p2i-line); background: var(--p2i-blue-soft); color: var(--p2i-blue);
}
body #layout-wrapper .el-input-group > .el-input__inner:not(:last-child) { border-radius: 10px 0 0 10px; }
body #layout-wrapper .el-select .el-input .el-select__caret { color: var(--p2i-muted); }
body #layout-wrapper .el-select .el-input.is-focus .el-input__inner { border-color: var(--p2i-blue); }
body #layout-wrapper .el-tag { border-radius: 8px; background: var(--p2i-blue-soft); border-color: transparent; color: var(--p2i-blue); }

/* buttons */
body #layout-wrapper .el-button { border-radius: 10px; font-weight: 600; transition: transform .15s, box-shadow .15s, background .2s; }
body #layout-wrapper .el-button:hover { transform: translateY(-1px); }
body #layout-wrapper .el-button--primary { background: var(--p2i-blue); border-color: var(--p2i-blue); box-shadow: 0 6px 14px var(--p2i-shadow); }
body #layout-wrapper .el-button--primary:hover,
body #layout-wrapper .el-button--primary:focus { background: var(--p2i-blue-dark); border-color: var(--p2i-blue-dark); }
body #layout-wrapper .el-button--success { background: var(--p2i-green); border-color: var(--p2i-green); box-shadow: 0 6px 14px rgba(25, 179, 107, .28); }
body #layout-wrapper .el-button--danger { background: var(--p2i-red); border-color: var(--p2i-red); }
body #layout-wrapper .el-button--default:hover { color: var(--p2i-blue); border-color: #b9d4d1; background: var(--p2i-blue-soft); }

/* table */
body #layout-wrapper .el-table { border-radius: 14px; color: var(--p2i-text); }
body #layout-wrapper .el-table::before { display: none; }
body #layout-wrapper .el-table th.el-table__cell,
body #layout-wrapper .el-table th {
  background: #f3f8f8 !important; color: var(--p2i-muted); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--p2i-line);
}
body #layout-wrapper .el-table td.el-table__cell,
body #layout-wrapper .el-table td { border-bottom: 1px solid #eef3f4; padding: 12px 0; }
body #layout-wrapper .el-table--enable-row-hover .el-table__body tr:hover > td { background: #f2f9f8 !important; }
body #layout-wrapper .el-table .caret-wrapper .sort-caret.ascending { border-bottom-color: #9fb3b6; }
body #layout-wrapper .el-table .ascending .sort-caret.ascending { border-bottom-color: var(--p2i-blue); }
body #layout-wrapper .el-table .descending .sort-caret.descending { border-top-color: var(--p2i-blue); }
body #layout-wrapper .el-table__empty-text { color: var(--p2i-muted); }

/* switches, radio-ish toggles, checkboxes */
body #layout-wrapper .el-switch.is-checked .el-switch__core { background-color: var(--p2i-green) !important; border-color: var(--p2i-green) !important; }
body #layout-wrapper .el-checkbox__input.is-checked .el-checkbox__inner,
body #layout-wrapper .el-checkbox__input.is-indeterminate .el-checkbox__inner { background: var(--p2i-blue); border-color: var(--p2i-blue); }
body #layout-wrapper .el-radio-button__orig-radio:checked + .el-radio-button__inner {
  background: var(--p2i-blue); border-color: var(--p2i-blue); box-shadow: -1px 0 0 0 var(--p2i-blue);
}

/* row action buttons: softer, uniform */
body #layout-wrapper .action_col .action_btn {
  border-radius: 8px; box-shadow: 0 2px 6px rgba(15, 33, 71, .15); transition: transform .15s, box-shadow .15s;
}
body #layout-wrapper .action_col .action_btn:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(15, 33, 71, .2); }

/* pagination */
body #layout-wrapper .el-pagination.is-background .el-pager li,
body #layout-wrapper .el-pagination.is-background .btn-prev,
body #layout-wrapper .el-pagination.is-background .btn-next { border-radius: 8px; background: #f3f8f8; color: var(--p2i-muted); font-weight: 600; }
body #layout-wrapper .el-pagination.is-background .el-pager li:not(.disabled).active {
  background: var(--p2i-blue); color: #fff; box-shadow: 0 6px 12px var(--p2i-shadow);
}
body #layout-wrapper .el-pagination.is-background .el-pager li:not(.disabled):hover { color: var(--p2i-blue); }

/* tabs, dialogs, drawers */
body #layout-wrapper .el-tabs__item.is-active,
body #layout-wrapper .el-tabs__item:hover { color: var(--p2i-blue); }
body #layout-wrapper .el-tabs__active-bar { background: var(--p2i-blue); height: 3px; border-radius: 3px; }
body .el-dialog { border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(6, 47, 44, .3); }
body .el-dialog__header { padding: 18px 22px; background: linear-gradient(90deg, var(--p2i-navy-800), var(--p2i-navy-700)); }
body .el-dialog__title { color: #fff; font-weight: 700; font-size: 16px; }
body .el-dialog__headerbtn .el-dialog__close { color: #fff; }
body .el-dialog__headerbtn:hover .el-dialog__close { color: #c7ebe7; }
body .el-dialog__body { padding: 22px; }
body .el-dialog__footer { border-top: 1px solid var(--p2i-line); padding: 14px 22px; }
body .el-select-dropdown { border-radius: 12px; border-color: var(--p2i-line); box-shadow: 0 12px 28px rgba(6, 47, 44, .16); }
body .el-select-dropdown__item.selected { color: var(--p2i-blue); font-weight: 700; }
body .el-select-dropdown__item.hover, body .el-select-dropdown__item:hover { background: var(--p2i-blue-soft); }

/* form labels */
body #layout-wrapper label { font-weight: 600; color: var(--p2i-text); font-size: 13px; }

/* ---------- row action bar (Web Users etc.) ---------- */
.p2i-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.p2i-act {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px; cursor: pointer;
  font-size: 13px; text-decoration: none !important;
  transition: transform .15s, box-shadow .15s, background .2s, color .2s;
}
.p2i-act:hover { transform: translateY(-2px); }
.p2i-act--teal  { background: #e2f1f0; color: #0d5f59; }
.p2i-act--green { background: #e3f7ee; color: #19b36b; }
.p2i-act--blue  { background: #e6efff; color: #3b82f6; }
.p2i-act--red   { background: #ffeaea; color: #ee4b4b; }
.p2i-act--more  { background: #f1f4f8; color: #6b7a99; }
.p2i-act--teal:hover  { background: #0d5f59; color: #fff; box-shadow: 0 6px 12px rgba(13, 95, 89, .3); }
.p2i-act--green:hover { background: #19b36b; color: #fff; box-shadow: 0 6px 12px rgba(25, 179, 107, .3); }
.p2i-act--blue:hover  { background: #3b82f6; color: #fff; box-shadow: 0 6px 12px rgba(59, 130, 246, .3); }
.p2i-act--red:hover   { background: #ee4b4b; color: #fff; box-shadow: 0 6px 12px rgba(238, 75, 75, .3); }
.p2i-act--more:hover  { background: #0f2147; color: #fff; }

.p2i-act-menu { padding: 6px; border-radius: 14px; min-width: 220px; }
.p2i-act-menu .el-dropdown-menu__item { border-radius: 8px; font-size: 13px; color: #0f2147; line-height: 36px; }
.p2i-act-menu .el-dropdown-menu__item i { width: 18px; margin-right: 8px; text-align: center; color: #0d5f59; }
.p2i-act-menu .el-dropdown-menu__item:hover { background: #e2f1f0; color: #0b4744; }
.p2i-act-menu .el-dropdown-menu__item--divided { margin-top: 6px; }
.p2i-act-menu .el-dropdown-menu__item--divided::before { margin: 0; height: 0; }

/* ---------- filter panel (list pages) ---------- */
body #layout-wrapper .card-header.bg-transparent.border-bottom {
  background: #f7fafa !important; border-bottom: 1px solid var(--p2i-line) !important;
  padding: 16px 20px; text-transform: none;
}
body #layout-wrapper .card-header > .row > .header_btn {
  display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; padding: 0 0 0 8px;
}
body #layout-wrapper .card-header > .row > .header_btn .btn {
  float: none !important; margin: 0 !important; height: 36px; border-radius: 10px; font-size: 13px; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
body #layout-wrapper .card-header > .row > .header_btn .btn-primary { background: var(--p2i-blue); box-shadow: 0 6px 14px var(--p2i-shadow); }
body #layout-wrapper .card-header > .row > .header_btn .btn-danger { background: #ffeaea; color: var(--p2i-red); }
body #layout-wrapper .card-header > .row > .header_btn .btn-danger:hover { background: var(--p2i-red); color: #fff; }

.p2i-filters { display: flex; flex-direction: column; gap: 14px; }
.p2i-filters__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.p2i-f { flex: 1 1 200px; min-width: 180px; max-width: 100%; }
.p2i-f--date { flex: 1.4 1 280px; width: auto !important; }
.p2i-filters__row--chips { gap: 10px; padding-top: 14px; border-top: 1px dashed var(--p2i-line); }

.p2i-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 6px 5px 14px;
  background: #fff; border: 1px solid var(--p2i-line); border-radius: 12px;
  box-shadow: 0 2px 6px rgba(13, 95, 89, .05);
}
.p2i-chip__label { font-size: 12px; font-weight: 700; color: var(--p2i-muted); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.p2i-chip .el-radio-button__inner { padding: 6px 14px; border-radius: 8px !important; border: 0 !important; background: #f1f6f6; margin-left: 3px; box-shadow: none !important; font-weight: 600; }
.p2i-chip .el-radio-button:first-child .el-radio-button__inner { margin-left: 0; }
.p2i-chip .el-radio-button__orig-radio:checked + .el-radio-button__inner { background: var(--p2i-blue); color: #fff; }
.p2i-chip--btn {
  padding: 0 16px; height: 40px; gap: 8px; cursor: pointer; font-size: 12px; font-weight: 700;
  color: #fff; background: var(--p2i-green); border-color: var(--p2i-green);
}
.p2i-chip--btn:hover { filter: brightness(.95); }
@media (max-width: 767.98px) { .p2i-chip { width: 100%; justify-content: space-between; } }

/* chip alignment: label and toggle buttons share one vertical center */
.p2i-chip { height: 40px; box-sizing: border-box; align-items: center; }
.p2i-chip__label { display: inline-flex; align-items: center; line-height: 1; }
.p2i-chip .el-radio-group { display: inline-flex; align-items: center; font-size: 0; line-height: 1; vertical-align: middle; }
.p2i-chip .el-radio-button { display: inline-flex; align-items: center; }
.p2i-chip .el-radio-button__inner {
  display: inline-flex; align-items: center; justify-content: center;
  height: 28px; padding: 0 14px; line-height: 1; font-size: 12px; box-sizing: border-box;
}
.p2i-chip--btn { display: inline-flex; align-items: center; justify-content: center; }
.p2i-chip--btn i, .p2i-chip--btn span { line-height: 1; }

/* bootstrap's label margin-bottom was lifting the toggle buttons above center */
body #layout-wrapper .p2i-chip .el-radio-button,
body #layout-wrapper .p2i-chip label,
body #layout-wrapper .p2i-chip .el-radio-group { margin: 0 !important; }
body #layout-wrapper .p2i-chip .el-radio-button { vertical-align: middle; }

/* apply / reset: small icon buttons beside the date filter */
@media (min-width: 768px) {
  body #layout-wrapper .card-header.bg-transparent.border-bottom > .row { flex-wrap: nowrap; align-items: flex-start; }
  body #layout-wrapper .card-header.bg-transparent.border-bottom > .row > .col-md-11 { flex: 1 1 auto; max-width: none; min-width: 0; }
  body #layout-wrapper .card-header.bg-transparent.border-bottom > .row > .header_btn {
    flex: 0 0 auto; width: auto; max-width: none;
    flex-direction: row-reverse; justify-content: flex-start; align-items: center; gap: 6px; padding: 0 0 0 4px;
  }
}
body #layout-wrapper .card-header > .row > .header_btn .btn {
  width: 32px; height: 32px; padding: 0; border-radius: 9px; font-size: 12px; flex: none;
}

/* ---------- compact page-title toolbar (Download, search, Add) ---------- */
body #layout-wrapper .card > .col-md-12.text-right { padding-top: 4px; }
body #layout-wrapper .card > .col-md-12 .btn-sm,
body #layout-wrapper .card > .col-md-12 .el-dropdown-link {
  height: 30px; padding: 0 12px; font-size: 12px; line-height: 30px; border-radius: 9px; font-weight: 600;
  display: inline-flex; align-items: center; background: var(--p2i-blue); border-color: var(--p2i-blue); color: #fff;
}
body #layout-wrapper .card-header h5 { font-size: 16px; }
body #layout-wrapper .card-header .col-md-9 .header_btn .btn {
  height: 30px; padding: 0 14px; font-size: 12px; line-height: 1; border-radius: 9px; font-weight: 600;
  display: inline-flex; align-items: center;
}
body #layout-wrapper .card-header .col-md-9 .el-input--small .el-input__inner { height: 30px; line-height: 30px; font-size: 12px; }
body #layout-wrapper .card-header .col-md-9 .el-input-group__append .el-button { padding: 0 12px; height: 28px; }

/* larger sidebar logo so the tagline is readable */
.p2i-sidebar-brand a { padding: 4px 8px; }
.p2i-sidebar-brand img { height: 72px; width: auto; max-width: 100%; }

/* keep the original white box size (64px tall); logo fills it with minimal padding */
.p2i-sidebar-brand a { height: 64px; box-sizing: border-box; padding: 2px 8px; }
.p2i-sidebar-brand img { height: 60px; max-height: 100%; width: auto; }

/* confirm dialogs ($confirm) */
.el-message-box { border-radius: 18px; border: 0; padding-bottom: 6px; box-shadow: 0 24px 60px rgba(6, 47, 44, .3); overflow: hidden; }
.el-message-box__header { padding: 18px 22px 6px; }
.el-message-box__title { font-weight: 700; color: var(--p2i-text); }
.el-message-box__message { color: var(--p2i-muted); }
.el-message-box__status.el-icon-warning { color: var(--p2i-orange); }
.el-message-box__btns { padding: 8px 20px 16px; }
.el-message-box__btns .el-button { border-radius: 10px; font-weight: 600; }
.el-message-box__btns .el-button--primary { background: var(--p2i-blue); border-color: var(--p2i-blue); }
