:root {
  color-scheme: light;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f7fb;
  color: #172033;
}

* {
  box-sizing: border-box;
}

button,
textarea {
  font-family: inherit;
}

html,
body {
  margin: 0;
  min-height: 100%;
  padding: 0;
}

body:not(.login-page):not(.home-page) {
  height: 100vh;
  overflow: hidden;
  padding-top: 64px;
}

body.home-page {
  padding-top: 64px;
}

html.home-document,
body.home-page {
  scrollbar-color: #64748b #eef3f8;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

html.home-document::-webkit-scrollbar,
body.home-page::-webkit-scrollbar {
  width: 12px;
}

html.home-document::-webkit-scrollbar-track,
body.home-page::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #eef3f8, #f8fafc);
}

html.home-document::-webkit-scrollbar-thumb,
body.home-page::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #94a3b8, #475569);
  border: 3px solid #eef3f8;
  border-radius: 999px;
}

html.home-document::-webkit-scrollbar-thumb:hover,
body.home-page::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #64748b, #334155);
}

.app-navbar {
  align-items: center;
  background: #34214CDE;
  border-bottom: 0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 64px;
  margin: 0;
  padding: 0 24px;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 20;
}

.app-brand {
  align-items: stretch;
  align-self: stretch;
  display: flex;
  flex: 0 0 auto;
  min-width: 150px;
}

.app-brand-mark {
  align-items: center;
  background: #ffffff;
  border-radius: 0;
  box-shadow: none;
  clip-path: polygon(0 0, 100% 0, calc(100% - 64px) 100%, 0 100%);
  color: #34214CDE;
  display: inline-flex;
  filter: drop-shadow(4px 0 10px rgba(2, 6, 23, 0.22));
  height: auto;
  justify-content: center;
  margin-left: -24px;
  padding: 0 74px 0 26px;
  text-decoration: none;
  transition: none;
  width: auto;
}

.app-brand-mark:hover {
  filter: drop-shadow(6px 0 14px rgba(2, 6, 23, 0.28));
  transform: none;
}

.app-brand-logo {
  display: block;
  height: 64px;
  object-fit: contain;
  width: auto;
}

.app-brand-title,
.brand-title {
  font-weight: 900;
  letter-spacing: .02em;
}

.app-brand-subtitle,
.brand-subtitle {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.app-nav-links {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 8px;
  justify-content: center;
  min-width: 0;
  overflow: visible;
}

.nav-item {
  align-items: center;
  color: rgba(255, 255, 255, 0.62);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  gap: 6px;
  min-height: 38px;
  padding: 0 10px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown:focus-within .nav-dropdown-trigger {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-dropdown-trigger {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  font-family: inherit;
  list-style: none;
}

.nav-dropdown-trigger::after {
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  content: "";
  height: 6px;
  margin-left: 4px;
  transform: rotate(45deg);
  width: 6px;
}

.nav-dropdown:hover .nav-dropdown-trigger::after,
.nav-dropdown:focus-within .nav-dropdown-trigger::after {
  transform: rotate(-135deg);
}

.nav-dropdown-menu {
  background: #34214C;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.35);
  display: none;
  gap: 4px;
  left: 0;
  min-width: 260px;
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 50;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: grid;
}

.nav-dropdown-item {
  align-items: center;
  color: rgba(255, 255, 255, 0.62);
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-dropdown-item:hover,
.nav-dropdown-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-item:hover,
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown:focus-within .nav-dropdown-trigger,
.nav-dropdown-item:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.nav-icon {
  display: inline-flex;
  height: 16px;
  width: 16px;
}

.nav-icon svg,
.btn-logout svg,
.home-card-icon svg,
.refresh-icon svg {
  fill: none;
  height: 100%;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 100%;
}

.app-user {
  align-items: center;
  display: flex;
  gap: 14px;
  flex: 0 0 auto;
  justify-content: flex-end;
  min-width: 150px;
}

.user-menu {
  position: relative;
}

.user-avatar {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-radius: 50%;
  color: #34214CDE;
  cursor: pointer;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  transition: transform .12s ease;
  width: 42px;
}

.user-avatar:hover,
.user-menu.is-open .user-avatar {
  transform: scale(1.06);
}

.user-avatar svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 22px;
}

.user-dropdown {
  background: #34214CDE;
  border: 0;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.35);
  display: none;
  flex-direction: column;
  gap: 8px;
  min-width: 250px;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 60;
}

.user-menu.is-open .user-dropdown {
  display: flex;
}

.user-dropdown__row {
  align-items: center;
  border: 0;
  color: #ffffff;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 10px;
  padding: 10px 12px;
}

.user-dropdown__row svg {
  fill: none;
  flex: 0 0 auto;
  height: 18px;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

.user-dropdown .logout-form {
  margin: 0;
}

.user-dropdown__logout {
  align-items: center;
  background: transparent;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  gap: 10px;
  padding: 10px 12px;
  width: 100%;
}

.user-dropdown__logout:hover {
  background: #e74c3c;
  color: #ffffff;
}

.user-dropdown__logout svg {
  fill: none;
  flex: 0 0 auto;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

.user-meta {
  display: grid;
  gap: 2px;
  text-align: right;
}

.user-role {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.user-name {
  color: #ffffff;
  font-size: 13px;
}

.logout-form {
  margin: 0;
}

.btn-logout {
  align-items: center;
  background: #dc2626;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  text-decoration: none;
  width: 38px;
}

.btn-logout:hover {
  background: #b91c1c;
}

.nav-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 46px;
}

.nav-toggle-bar {
  background: #ffffff;
  border-radius: 2px;
  display: block;
  height: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  width: 22px;
}

.app-navbar.nav-open .nav-toggle-bar:nth-child(1),
body.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.app-navbar.nav-open .nav-toggle-bar:nth-child(2),
body.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.app-navbar.nav-open .nav-toggle-bar:nth-child(3),
body.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer-header {
  display: none;
}

.nav-backdrop {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.home-only-shell {
  display: block;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid #e1e6ef;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.brand-badge {
  align-items: center;
  background: #0f766e;
  color: #ffffff;
  display: flex;
  font-size: 20px;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.side-link {
  align-items: center;
  border: 1px solid #e1e6ef;
  color: #172033;
  display: flex;
  font-weight: 800;
  justify-content: space-between;
  padding: 12px;
  text-decoration: none;
}

.side-link:hover,
.side-link.active {
  background: #e8f5f1;
  border-color: #a7d8c8;
  color: #0f513c;
}

.side-link small {
  color: #64748b;
}

.sidebar-card {
  background: #f8fafc;
  border: 1px solid #e1e6ef;
  margin-top: 8px;
  padding: 16px;
}

.sidebar-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-value {
  font-size: 34px;
  font-weight: 900;
  margin-top: 4px;
}

.sidebar-hint {
  color: #64748b;
  font-size: 13px;
}

.main {
  min-width: 0;
  padding: 22px;
}

.page {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 64px);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0 1px 2px;
  width: 100%;
}

.topbar {
  align-items: center;
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 2px;
  min-height: 0;
  padding: 0;
  position: relative;
}

.eyebrow {
  color: #172033;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  margin: 0 0 2px;
  text-transform: uppercase;
}

h1 {
  color: #1b73a6;
  font-family: Cambria, Georgia, "Palatino Linotype", "Book Antiqua", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

.top-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: static;
}

.export {
  background: #4caf50;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  padding: 8px 12px;
  text-decoration: none;
}

.export:hover {
  background: #43a047;
}

.filters button,
.pager button {
  background: #34214CDE;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  padding: 8px 12px;
  text-decoration: none;
}

.filters button:hover,
.pager button:hover {
  background: #1b73a6;
}

.nav-link {
  background: #ffffff;
  border: 1px solid #cdd5e0;
  color: #172033;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  padding: 8px 12px;
  text-decoration: none;
}

.nav-link:hover {
  border-color: #34214CDE;
  color: #34214CDE;
}

.home-shell {
  min-height: calc(100vh - 120px);
}

.home-panel {
  background:
    radial-gradient(circle at top left, rgba(52, 33, 76, 0.08), transparent 34%),
    radial-gradient(circle at 78% 18%, rgba(16, 185, 129, 0.08), transparent 28%),
    rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.75);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  min-height: calc(100vh - 142px);
  padding: 32px;
}

.home-head {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.home-kicker {
  color: #ef4444;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  margin-bottom: 10px;
}

.home-title {
  color: #172033;
  font-size: 44px;
  line-height: 1.05;
  margin: 0;
}

.highlight {
  background: linear-gradient(90deg, #34214CDE, #6cc3e6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-subtitle {
  color: #64748b;
  font-size: 15px;
  line-height: 1.6;
  margin: 12px 0 0;
  max-width: 720px;
}

.home-refresh {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e1e6ef;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  display: flex;
  gap: 12px;
  min-width: 260px;
  padding: 14px;
}

.refresh-icon {
  align-items: center;
  background: #d7f9eb;
  color: #10b981;
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.refresh-details {
  display: grid;
  gap: 3px;
}

.refresh-details span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.refresh-details strong {
  font-size: 13px;
}

.home-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.home-card {
  --card-accent: #60a5fa;
  --card-rgb: 96, 165, 250;
  --card-start: #1d4ed8;
  --card-end: #38bdf8;
  --card-accent-soft: rgba(var(--card-rgb), 0.2);
  background:
    linear-gradient(145deg, var(--card-start), var(--card-end)),
    radial-gradient(circle at 92% 10%, rgba(var(--card-rgb), 0.34), transparent 34%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  min-height: 218px;
  overflow: hidden;
  padding: 24px 24px 22px 28px;
  position: relative;
  text-decoration: none;
}

.home-card::before {
  background: var(--card-accent);
  content: "";
  left: 0;
  opacity: 1;
  position: absolute;
  top: 0;
  height: 100%;
  width: 4px;
}

.demand-card {
  --card-accent: #facc15;
  --card-rgb: 250, 204, 21;
  --card-start: #d97706;
  --card-end: #facc15;
  --card-accent-soft: rgba(var(--card-rgb), 0.2);
}

.outstanding-card {
  --card-accent: #22c55e;
  --card-rgb: 34, 197, 94;
  --card-start: #047857;
  --card-end: #22c55e;
  --card-accent-soft: rgba(var(--card-rgb), 0.2);
}

.npa-card {
  --card-accent: #ef4444;
  --card-rgb: 239, 68, 68;
  --card-start: #991b1b;
  --card-end: #ef4444;
  --card-accent-soft: rgba(var(--card-rgb), 0.2);
}

.closer-card {
  --card-accent: #06b6d4;
  --card-rgb: 6, 182, 212;
  --card-start: #0e7490;
  --card-end: #06b6d4;
  --card-accent-soft: rgba(var(--card-rgb), 0.2);
}

.disbursed-card {
  --card-accent: #a855f7;
  --card-rgb: 168, 85, 247;
  --card-start: #6d28d9;
  --card-end: #a855f7;
  --card-accent-soft: rgba(var(--card-rgb), 0.2);
}

.portfolio-card {
  --card-accent: #14b8a6;
  --card-rgb: 20, 184, 166;
  --card-start: #0f766e;
  --card-end: #38bdf8;
  --card-accent-soft: rgba(var(--card-rgb), 0.2);
}

.recovery-card {
  --card-accent: #84cc16;
  --card-rgb: 132, 204, 22;
  --card-start: #3f6212;
  --card-end: #84cc16;
  --card-accent-soft: rgba(var(--card-rgb), 0.2);
}

.installment-card {
  --card-accent: #f97316;
  --card-rgb: 249, 115, 22;
  --card-start: #9a3412;
  --card-end: #f97316;
  --card-accent-soft: rgba(var(--card-rgb), 0.2);
}

.home-card:hover {
  border-color: rgba(var(--card-rgb), 0.56);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(var(--card-rgb), 0.24);
  transform: translateY(-2px);
}

.home-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: flex-start;
}

.home-card-label {
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.home-card h2 {
  color: #ffffff;
  font-size: 23px;
  line-height: 1.12;
  margin: 0;
  max-width: 230px;
}

.home-card p {
  color: rgba(226, 232, 240, 0.82);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  max-width: 290px;
}

.home-card-data {
  border-top: 1px dashed rgba(255, 255, 255, 0.28);
  display: none;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 18px;
}

.data-item {
  background: transparent;
  border: 0;
  padding: 0;
}

.data-item span {
  color: rgba(255, 255, 255, 0.66);
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.data-item strong {
  color: #ffffff;
  display: block;
  margin-top: 6px;
}

.home-card-icon {
  align-items: center;
  align-self: start;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  font-size: 26px;
  font-weight: 900;
  height: 50px;
  justify-content: center;
  width: 50px;
}

.is-hidden {
  display: none;
}

.filters {
  align-items: end;
  background: transparent;
  border: none;
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(130px, 1fr)) auto;
  margin-bottom: 6px;
  padding: 8px 10px;
}

.filters.filters-8 {
  grid-template-columns: repeat(8, minmax(115px, 1fr)) auto;
}

.filters.filters-centered {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  grid-template-columns: none;
  justify-content: center;
}

.filters.filters-centered label {
  flex: 0 0 auto;
  width: 170px;
}

.filters.filters-centered button {
  flex: 0 0 auto;
}

.filters label {
  text-align: center;
}

label {
  color: #516070;
  display: grid;
  font-size: 11px;
  font-weight: 700;
  gap: 4px;
}

input,
select {
  border: 1px solid #cdd5e0;
  color: #172033;
  font: 13px "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 34px;
  padding: 6px 9px;
  width: 100%;
}

.summary {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  font-size: 13px;
  gap: 10px;
  justify-content: space-between;
  margin: 0 0 6px;
}

.summary-meta {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 14px;
  min-width: 0;
}

#pageStatus {
  font-weight: 700;
}

.error {
  background: #fff1f0;
  border: 1px solid #ffccc7;
  color: #8a1f11;
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px;
}

.report-panel {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding-bottom: 8px;
  position: relative;
  width: 100%;
}

.portfolio-page {
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.88), rgba(248, 250, 252, 0.95)),
    radial-gradient(circle at 18% 8%, rgba(52, 33, 76, 0.14), transparent 26%),
    radial-gradient(circle at 88% 20%, rgba(20, 184, 166, 0.14), transparent 24%);
  height: auto;
  min-height: calc(100dvh - 64px);
  overflow: visible;
}

body.portfolio-cuts-page:not(.login-page):not(.home-page) {
  height: auto;
  min-height: 100vh;
  overflow: auto;
}

.portfolio-page .table-wrap {
  max-height: none;
}

.portfolio-page .report-panel {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
}

.portfolio-page .table-wrap {
  flex: 0 0 auto;
  margin-top: 18px;
  min-height: auto;
  overflow-x: auto;
  overflow-y: hidden;
}

.portfolio-filters {
  border-radius: 0;
  box-shadow: none;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
}

.portfolio-dashboard {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  position: relative;
}

.portfolio-loader {
  align-items: center;
  background: rgba(248, 250, 252, 0.72);
  bottom: 0;
  display: none;
  justify-content: center;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 20;
}

.portfolio-kpis {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 16px;
}

.portfolio-kpi {
  background: #34214CDE;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
  color: #ffffff;
  min-height: 94px;
  padding: 18px;
}

.portfolio-kpi span {
  color: rgba(219, 234, 254, 0.82);
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.portfolio-kpi strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.portfolio-chart-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
}

.portfolio-chart-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 0;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  padding: 18px;
}

.portfolio-chart-card header {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.portfolio-chart-card header span {
  color: #34214CDE;
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.portfolio-chart-card h2 {
  color: #0f172a;
  font-size: 20px;
  line-height: 1.15;
  margin: 6px 0 0;
}

.chart-total {
  color: #0f766e;
  font-size: 18px;
  white-space: nowrap;
}

.portfolio-chart-body {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 260px minmax(0, 1fr);
}

.portfolio-chart-body canvas {
  height: 260px;
  width: 260px;
}

.portfolio-legend {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.legend-row {
  align-items: center;
  color: #334155;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  grid-template-columns: 10px minmax(0, 1fr) auto;
}

.legend-row i {
  border-radius: 999px;
  display: block;
  height: 10px;
  width: 10px;
}

.legend-color-0 { background: #2563eb; }
.legend-color-1 { background: #16a34a; }
.legend-color-2 { background: #f59e0b; }
.legend-color-3 { background: #dc2626; }
.legend-color-4 { background: #7c3aed; }
.legend-color-5 { background: #0891b2; }
.legend-color-6 { background: #db2777; }
.legend-color-7 { background: #65a30d; }
.legend-color-8 { background: #ea580c; }
.legend-color-9 { background: #475569; }

.legend-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-row strong {
  color: #0f172a;
}

.legend-empty {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.portfolio-table-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 14px;
}

.table-wrap {
  background: #fff;
  border: 1px solid #e1e6ef;
  flex: 1 1 0;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  overflow-x: scroll;
  overflow-y: auto;
  position: relative;
  scrollbar-color: #8aa0bd #eef3f8;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  width: 100%;
}

.table-wrap::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.table-wrap::-webkit-scrollbar-track {
  background: #e3f0fa;
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #9fb0c8, #64748b);
  border: 2px solid #e3f0fa;
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7890ad, #475569);
}

.table-wrap::-webkit-scrollbar-corner {
  background: #e3f0fa;
}

table {
  border-collapse: collapse;
  min-width: 100%;
  width: max-content;
}

th,
td {
  border-bottom: 1px solid #edf1f6;
  font-size: 11px;
  padding: 6px 9px;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #1b73a6;
  border-bottom: 2px solid #155a82;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:hover td {
  background: #e8f3fa;
}

.empty {
  color: #64748b;
  padding: 28px;
  text-align: center;
}

.table-empty {
  align-items: center;
  display: none;
  flex-direction: column;
  gap: 10px;
  inset: 48px 0 12px;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  position: absolute;
  text-align: center;
  z-index: 0;
}

.table-wrap:has(tbody:empty) .table-empty,
.table-wrap:has(td.empty) .table-empty {
  display: flex;
}

.table-wrap:has(td.empty) td.empty {
  visibility: hidden;
}

.table-wrap:has(td:not(.empty)) .table-empty {
  display: none;
}

.table-empty svg {
  fill: none;
  height: 46px;
  stroke: #a9bdd4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 46px;
}

.table-empty strong {
  color: #334155;
  font-size: 16px;
  font-weight: 800;
}

.table-empty span {
  color: #7c8aa0;
  font-size: 13px;
  font-weight: 600;
}

.pager-actions #prepareDownloadBtn {
  display: none;
}

.page:has(td:not(.empty)) .pager-actions #prepareDownloadBtn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.my-downloads-page .table-wrap {
  -ms-overflow-style: none;
  overflow-x: auto;
  scrollbar-gutter: auto;
  scrollbar-width: none;
}

.my-downloads-page .table-wrap::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}

.my-downloads-page table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.my-downloads-page th,
.my-downloads-page td {
  font-size: 12px;
  padding: 11px 12px;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.my-downloads-page th {
  background: #1b73a6;
  border-bottom: 2px solid #155a82;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.my-downloads-page tbody tr:hover td {
  background: #e8f3fa;
}

.my-downloads-page .dl-error {
  color: #c62828;
  font-weight: 600;
}

.my-downloads-page .dl-failed {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.my-downloads-page .dl-retry {
  align-items: center;
  background: #fef08a;
  border: 1px solid #eab308;
  border-radius: 6px;
  color: #713f12;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  padding: 4px 7px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.my-downloads-page .dl-retry:hover {
  background: #fde047;
  border-color: #ca8a04;
}

.my-downloads-page .dl-retry:active {
  background: #facc15;
}

.my-downloads-page .dl-retry:disabled {
  cursor: default;
  opacity: 0.6;
}

.my-downloads-page th:nth-child(1),
.my-downloads-page td:nth-child(1) {
  width: 14%;
}

.my-downloads-page th:nth-child(2),
.my-downloads-page td:nth-child(2) {
  white-space: nowrap;
  width: 8%;
}

.my-downloads-page th:nth-child(3),
.my-downloads-page td:nth-child(3) {
  white-space: nowrap;
  width: 10%;
}

.my-downloads-page th:nth-child(4),
.my-downloads-page td:nth-child(4) {
  width: 16%;
}

.my-downloads-page th:nth-child(5),
.my-downloads-page td:nth-child(5) {
  width: 16%;
}

.my-downloads-page th:nth-child(6),
.my-downloads-page td:nth-child(6) {
  white-space: nowrap;
  width: 13%;
}

.my-downloads-page th:nth-child(7),
.my-downloads-page td:nth-child(7) {
  white-space: nowrap;
  width: 13%;
}

.my-downloads-page th:nth-child(8),
.my-downloads-page td:nth-child(8) {
  width: 10%;
}

.my-downloads-page td:nth-child(4) div {
  line-height: 1.5;
}

.my-downloads-page .dl-progress {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.my-downloads-page .dl-progress-track {
  background: #e8f5e9;
  border-radius: 999px;
  flex: 1 1 auto;
  min-width: 0;
  height: 8px;
  overflow: hidden;
}

.my-downloads-page .dl-progress-fill {
  background: #4caf50;
  border-radius: 999px;
  height: 100%;
  transition: width 0.45s ease;
  width: 0%;
}

.my-downloads-page .dl-progress-label {
  color: #2e7d32;
  font-size: 11.5px;
  font-weight: 700;
  flex: 0 0 36px;
  min-width: 36px;
  text-align: right;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.my-downloads-page .dl-filters {
  display: grid;
  gap: 4px;
  line-height: 1.5;
}

.pager {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin: 0 5px 6px;
  order: -1;
}

.pager-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.pager-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.pager-badge {
  background: transparent;
  color: #172033;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 0;
  white-space: nowrap;
}

.pager-badge strong {
  color: #34214CDE;
}

.pager button:disabled {
  background: #dde4ee;
  border: 0;
  color: #748094;
  cursor: not-allowed;
  font-weight: 700;
  padding: 10px 14px;
}

.pbi-loader-overlay {
  position: absolute;
  inset: 34px 0 0;
  display: none;
  min-height: 360px;
  place-items: center;
  background: rgba(248, 250, 252, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5;
}

.pbi-loader-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-top: 4px solid #34214CDE;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
  min-width: 320px;
  padding: 30px;
  text-align: center;
}

.pbi-loader-card strong {
  color: #0f172a;
  display: block;
  font-size: 18px;
  font-weight: 800;
  margin-top: 18px;
}

.pbi-loader-card span {
  color: #64748b;
  display: block;
  font-size: 14px;
  margin-top: 8px;
}

.pbi-progress-wrap {
  background: #e2e8f0;
  height: 8px;
  margin-top: 22px;
  overflow: hidden;
}

.pbi-progress-bar {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(90deg, #34214CDE, #6cc3e6, #34214CDE);
  background-size: 200% 100%;
  height: 100%;
  transition: width 0.3s ease-out;
  width: 0%;
}

.pbi-progress-fill {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(90deg, #34214CDE, #6cc3e6, #34214CDE);
  background-size: 200% 100%;
  height: 100%;
  transition: width 0.3s ease-out;
  width: 0%;
}

.pbi-progress-text {
  color: #34214CDE;
  font-size: 18px;
  font-weight: 800;
  margin-top: 12px;
}

.pbi-progress-meta {
  color: #1b73a6;
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

.pbi-loader-dots::after {
  animation: pbi-dots 1.2s steps(1, end) infinite;
  content: "";
  display: inline-block;
  text-align: left;
  width: 22px;
}

@keyframes pbi-dots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75% {
    content: "...";
  }
}

.pbi-loader-emblem {
  height: 100px;
  margin: 0 auto 18px;
  position: relative;
  width: 100px;
}

.pbi-ring {
  border: 4px solid transparent;
  border-radius: 50%;
  inset: 0;
  position: absolute;
}

.pbi-ring-outer {
  animation: pbi-spin 1.1s linear infinite;
  border-top-color: #34214CDE;
}

.pbi-ring-inner {
  animation: pbi-spin-rev 0.85s linear infinite;
  border-bottom-color: #6cc3e6;
  inset: 8px;
}

.pbi-loader-logo {
  animation: pbi-pulse 1.6s ease-in-out infinite;
  height: auto;
  left: 50%;
  max-width: 80px;
  object-fit: contain;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
}

.pbi-loader-card .pbi-progress-meta span {
  color: inherit;
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  margin-top: 0;
}

.pbi-loader-card .pbi-loader-dots {
  display: inline-block;
  vertical-align: bottom;
}

@keyframes pbi-spin-rev {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes pbi-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

body.login-page {
  background: #030d4b;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
}

.login-shell {
  align-items: stretch;
  background: url("images/login_bg.jpg") center center / cover no-repeat;
  background-color: #030d4b;
  display: flex;
  justify-content: flex-end;
  min-height: 100vh;
}

.login-right {
  align-items: center;
  background: transparent;
  display: flex;
  flex: 0 0 min(46vw, 620px);
  justify-content: center;
  overflow: hidden;
  padding: 48px 56px;
  position: relative;
}

.login-card {
  backdrop-filter: blur(2px);
  background: rgba(6, 16, 92, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  color: #ffffff;
  margin: 0;
  padding: 40px 34px 38px;
  position: relative;
  width: min(100%, 440px);
  z-index: 1;
}

.login-brand {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: -12px 0 22px;
}

.login-brand img {
  background: #ffffff;
  border-radius: 12px;
  display: block;
  height: 58px;
  max-width: 220px;
  object-fit: contain;
  padding: 6px 14px;
  width: auto;
}

.login-error {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 130, 130, 0.35);
  border-radius: 10px;
  color: #ffd1d1;
  margin: 0 0 14px;
  padding: 12px 14px;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.login-field input {
  background: rgba(240, 245, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  color: #0f172a;
  font-size: 0.98rem;
  height: 50px;
  outline: none;
  padding: 0 16px;
  width: 100%;
}

.password-control {
  display: block;
  position: relative;
}

.password-control input {
  padding-right: 52px;
}

.password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #334155;
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 6px;
  top: 5px;
  width: 40px;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(15, 23, 42, 0.08);
  outline: none;
}

.password-eye {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 22px;
}

.password-eye-closed,
.password-toggle.is-visible .password-eye-open {
  display: none;
}

.password-toggle.is-visible .password-eye-closed {
  display: block;
}

.login-field input:focus {
  border-color: #34214CDE;
  box-shadow: 0 0 0 3px rgba(52, 33, 76, 0.24);
}

.login-links {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-top: 4px;
}

.login-links a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  text-decoration: underline;
}

.login-submit {
  background: #34214CDE;
  border: none;
  border-radius: 3px;
  color: #ffffff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  height: 50px;
  margin-top: 10px;
}

.login-submit:hover {
  background: #1b73a6;
}

.login-powered {
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 34px;
}

.login-powered strong {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 6px;
  color: #1f2937;
  padding: 4px 10px;
}

.no-access-panel {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-weight: 700;
  margin-top: 22px;
  padding: 18px;
}

@keyframes pbi-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 1024px) {
  body:not(.login-page):not(.home-page) {
    height: auto;
    overflow: auto;
    padding-top: 0;
  }

  body.home-page {
    padding-top: 0;
  }

  .app-navbar {
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px;
    position: static;
  }

  .nav-toggle {
    display: inline-flex;
    order: 2;
  }

  .app-brand {
    flex: 1;
    order: 1;
  }

  .app-brand-mark {
    border-radius: 0 14px 52px 0;
    margin: 0 0 0 -16px;
    padding: 0 32px 0 18px;
  }

  .app-user {
    order: 3;
  }

  .page {
    height: auto;
    min-height: calc(100dvh - 64px);
    overflow: visible;
  }

  .report-panel {
    flex: 1 1 auto;
    min-height: 200px;
    overflow: visible;
  }

  .table-wrap {
    flex: 1 1 auto;
    max-height: 70vh;
    min-height: 320px;
  }

  .pbi-loader-overlay {
    inset: 0;
    min-height: 0;
    position: fixed;
  }

  .pbi-loader-card {
    min-width: 0;
    padding: 24px 16px;
    width: 80vw;
    max-width: 320px;
  }

  .app-brand,
  .app-user {
    min-width: 0;
  }

  .app-user {
    align-items: flex-end;
    flex-direction: column;
    gap: 1px;
    height: 42px;
    justify-content: center;
    order: 3;
  }

  .user-meta {
    display: block;
    text-align: right;
  }

  .user-role {
    display: none;
  }

  .user-name {
    font-size: 10px;
    line-height: 1;
  }

  .btn-logout {
    height: 22px;
    width: 22px;
  }

  .btn-logout svg {
    height: 12px;
    width: 12px;
  }

  .app-nav-links {
    align-items: stretch;
    background: #34214CDE;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: flex-start;
    left: 0;
    max-width: 320px;
    overflow-y: auto;
    padding: 16px 12px;
    position: fixed;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    width: 80vw;
    z-index: 1001;
  }

  body.nav-open .app-nav-links {
    transform: translateX(0);
  }

  .nav-drawer-header {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
    width: 100%;
  }

  .nav-drawer-logo {
    background: transparent;
    border-radius: 0;
    height: 40px;
    object-fit: contain;
    padding: 0;
  }

  .nav-drawer-actions {
    align-items: center;
    display: flex;
    gap: 8px;
  }

  .nav-drawer-close {
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 36px;
  }

  .nav-drawer-close svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 18px;
  }

  .nav-drawer-close:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .nav-backdrop {
    background: rgba(0, 0, 0, 0.5);
    bottom: 0;
    display: none;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
  }

  body.nav-open .nav-backdrop {
    display: block;
  }

  .nav-item,
  .nav-dropdown-trigger {
    font-size: 13px;
    justify-content: flex-start;
    min-height: 44px;
    padding: 12px 10px;
    text-align: left;
    width: 100%;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown:hover .nav-dropdown-trigger,
  .nav-dropdown:focus-within .nav-dropdown-trigger {
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
  }

  .nav-dropdown.open .nav-dropdown-trigger {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu {
    display: none;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: grid;
  }

  .nav-dropdown-trigger::after {
    margin-left: auto;
  }

  .nav-dropdown.open .nav-dropdown-trigger::after {
    transform: rotate(-135deg);
  }

  .nav-dropdown-menu {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    box-shadow: none;
    left: auto;
    min-width: 0;
    padding: 4px;
    position: static;
    top: auto;
    width: 100%;
  }

  .nav-dropdown-item {
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    min-height: 42px;
    padding-left: 30px;
    text-transform: none;
  }

  .nav-dropdown-item:hover,
  .nav-dropdown-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-bottom: 1px solid #e1e6ef;
    border-right: 0;
  }

  .home-head {
    flex-direction: column;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .filters,
  .filters.filters-8 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters label:first-child {
    grid-column: span 2;
  }

  .filters button {
    grid-column: span 1;
    justify-self: stretch;
  }

  .portfolio-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-chart-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-chart-body {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .portfolio-legend {
    width: 100%;
  }

  .login-shell {
    justify-content: center;
  }

  .login-right {
    flex-basis: 100%;
    padding: 32px 20px;
  }
}

@media (max-width: 768px) {
  .app-navbar {
    padding: 8px 12px;
  }

  .app-brand-mark {
    border-radius: 0 10px 40px 0;
    height: auto;
    margin: 0 0 0 -12px;
    padding: 0 26px 0 14px;
  }

  .app-brand-logo {
    height: 32px;
  }

  .btn-logout {
    height: 22px;
    width: 22px;
  }

  .app-user {
    height: 38px;
  }

  .nav-toggle {
    height: 38px;
    width: 42px;
  }

  .filters,
  .filters.filters-8 {
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
  }

  .filters label {
    font-size: 10px;
  }

  .filters label:first-child {
    grid-column: span 2;
  }

  .filters button {
    grid-column: span 1;
    justify-self: stretch;
  }

  .filters input,
  .filters select {
    font-size: 11px;
    min-height: 32px;
    padding: 5px 7px;
  }

  .filters button,
  .export {
    font-size: 11px;
    min-height: 28px;
    padding: 5px 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .top-actions {
    justify-content: flex-start;
    position: static;
    transform: none;
    width: 100%;
  }

  .summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  th,
  td {
    font-size: 10px;
    padding: 5px 6px;
  }

  .pager {
    gap: 6px 12px;
    justify-content: space-between;
    padding: 8px 0;
  }

  .pager-meta {
    flex: 1 1 auto;
    gap: 4px 12px;
  }

  .pager-badge {
    font-size: 11.5px;
  }

  .pager-actions {
    flex: 0 0 auto;
  }

  .pager button {
    font-size: 11px;
    min-height: 30px;
    padding: 6px 10px;
  }

  .table-wrap {
    border-radius: 6px;
    margin-top: 6px;
  }

  .my-downloads-page table {
    min-width: 700px;
    table-layout: auto;
    width: max-content;
  }

  .my-downloads-page th,
  .my-downloads-page td {
    white-space: nowrap;
    word-break: normal;
  }

  .my-downloads-page th:nth-child(1),
  .my-downloads-page td:nth-child(1),
  .my-downloads-page th:nth-child(2),
  .my-downloads-page td:nth-child(2),
  .my-downloads-page th:nth-child(3),
  .my-downloads-page td:nth-child(3),
  .my-downloads-page th:nth-child(4),
  .my-downloads-page td:nth-child(4),
  .my-downloads-page th:nth-child(5),
  .my-downloads-page td:nth-child(5),
  .my-downloads-page th:nth-child(6),
  .my-downloads-page td:nth-child(6),
  .my-downloads-page th:nth-child(7),
  .my-downloads-page td:nth-child(7),
  .my-downloads-page th:nth-child(8),
  .my-downloads-page td:nth-child(8) {
    width: auto;
  }

  .home-panel {
    padding: 22px;
  }

  .home-head {
    gap: 12px;
  }

  .page {
    padding: 4px 8px 16px;
  }

  .report-panel {
    padding: 10px;
  }
}

@media (max-width: 520px) {
  .app-navbar {
    padding: 6px 10px;
  }

  .app-brand-mark {
    height: auto;
    padding: 0 20px 0 10px;
  }

  .app-brand-logo {
    height: 28px;
  }

  .btn-logout {
    height: 20px;
    width: 20px;
  }

  .app-user {
    height: 36px;
  }

  .nav-toggle {
    height: 36px;
    width: 40px;
  }

  .nav-toggle-bar {
    width: 20px;
  }

  .page {
    padding: 4px 6px 12px;
  }

  .report-panel {
    padding: 8px;
  }

  .summary {
    font-size: 12px;
  }

  h1 {
    font-size: 20px;
  }

  .home-panel {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .filters,
  .filters.filters-8 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-kpis {
    gap: 10px;
    margin-bottom: 12px;
  }

  .portfolio-kpi {
    min-height: 78px;
    padding: 12px;
  }

  .portfolio-kpi strong {
    font-size: 18px;
  }

  .filters label:first-child {
    grid-column: span 2;
  }

  .filters button {
    grid-column: span 1;
    justify-self: stretch;
  }

  th,
  td {
    font-size: 9px;
    padding: 4px 5px;
  }

  .pager {
    flex-wrap: wrap;
    gap: 6px;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .export,
  .top-actions .nav-link {
    font-size: 11px;
    min-height: 26px;
    padding: 4px 10px;
  }
}


.export-job-notification-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(2, 6, 23, 0.45);
  opacity: 0;
  visibility: hidden;
}

.export-job-notification-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.export-job-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  z-index: 99999;
  width: min(500px, calc(100vw - 32px));
  max-width: min(500px, calc(100vw - 32px));
  background: #ffffff;
  border: 1px solid #e3e8ef;
  border-radius: 0;
  padding: 24px 26px 26px 26px;
  box-shadow: 0 30px 80px -20px rgba(2, 6, 23, 0.55);
  display: grid;
  gap: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.export-job-notification::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: #34214CDE;
}

.export-job-notification.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.export-job-notification.is-hiding {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.export-job-notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eef2f6;
  padding-bottom: 14px;
}

.export-job-notification strong {
  color: #34214CDE;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.export-job-notification-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.export-job-notification-badge {
  align-items: center;
  background: #34214CDE;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(52, 33, 76, 0.35);
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 auto;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.export-job-notification-badge svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  width: 20px;
}

.export-job-notification-badge.is-alert {
  background: #e74c3c;
  box-shadow: 0 6px 16px rgba(231, 76, 60, 0.35);
}

.export-job-notification-close {
  align-items: center;
  background: #f1f5f3;
  border: none;
  cursor: pointer;
  color: #64756d;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 20px;
  height: 32px;
  justify-content: center;
  line-height: 1;
  margin: -4px -6px 0 0;
  border-radius: 0;
  width: 32px;
}

.export-job-notification-close:hover {
  color: #ffffff;
  background-color: #34214CDE;
}

.export-job-notification span {
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.export-job-notification-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.export-job-notification a {
  background: #34214CDE;
  border-radius: 0;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  flex: 1 1 auto;
  justify-content: center;
  margin-top: 0;
  padding: 12px 16px;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(52, 33, 76, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.export-job-notification a:hover {
  background: #1b73a6;
  box-shadow: 0 4px 12px rgba(52, 33, 76, 0.3);
}

#exportJobNotificationDownload {
  background: #4caf50;
  box-shadow: 0 3px 8px rgba(76, 175, 80, 0.22);
}

#exportJobNotificationDownload:hover {
  background: #43a047;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.export-job-notification a.is-hidden {
  display: none;
}

.export-job-notification-progress {
  display: none;
}

.export-job-notification-progress.is-running {
  animation: none;
}

.dupe-overlay {
  align-items: center;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 16px;
  position: fixed;
  z-index: 1200;
}

.dupe-card {
  background: #ffffff;
  border-top: 4px solid #34214CDE;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
  max-width: 620px;
  padding: 22px 24px;
  width: 100%;
}

.dupe-head {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.dupe-badge {
  align-items: center;
  background: #34214CDE;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(52, 33, 76, 0.35);
  display: inline-flex;
  flex: 0 0 auto;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.dupe-badge svg {
  fill: none;
  height: 22px;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 22px;
}

.dupe-title {
  color: #111827;
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 4px;
}

.dupe-text {
  color: #475569;
  font-size: 13px;
  margin: 0;
}

.dupe-file {
  background: #f1f6fb;
  border: 1px solid #cbe1f4;
  color: #1b73a6;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  word-break: break-all;
}

.dupe-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
}

.dupe-meta-line {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.dupe-hint {
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
  margin: 10px 0 0;
}

.dupe-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}

.dupe-btn {
  align-items: center;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  gap: 6px;
  padding: 8px 14px;
  white-space: nowrap;
}

.dupe-btn svg {
  fill: none;
  flex: 0 0 auto;
  height: 14px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 14px;
}

.dupe-btn--danger {
  background: #e74c3c;
  color: #ffffff;
}

.dupe-btn--danger:hover {
  background: #c0392b;
}

.dupe-btn--ghost {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}

.dupe-btn--ghost:hover {
  background: #f1f5f9;
}

.dupe-btn--outline {
  background: #ffffff;
  border-color: #34214CDE;
  color: #34214CDE;
}

.dupe-btn--outline:hover {
  background: #e3f0fa;
}

.dupe-btn--primary {
  background: #34214CDE;
  color: #ffffff;
}

.dupe-btn--primary:hover {
  background: #1b73a6;
}

@media (max-width: 640px) {
  .dupe-actions {
    flex-wrap: wrap;
  }

  .dupe-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
