:root {
  --sidebar: #210b2f;
  --sidebar-deep: #170720;
  --gold: #8a0f50;
  --gold-dark: #6f0a3f;
  --page: #efeaf6;
  --panel: #ffffff;
  --text: #24152f;
  --muted: #786b84;
  --line: #d9cde4;
  --blue: #8aa6f6;
  --rose: #b61c67;
  --orange: #c86d46;
  --green: #16a07a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--page);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 46px);
  background:
    radial-gradient(circle at 18% 18%, rgba(182, 28, 103, .42), transparent 28%),
    radial-gradient(circle at 78% 78%, rgba(138, 166, 246, .42), transparent 32%),
    linear-gradient(135deg, #170720 0%, #320f3f 45%, #7b2458 100%);
}

.login-shell {
  width: min(980px, 100%);
  min-height: min(620px, calc(100vh - 48px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 28px 80px rgba(7, 5, 14, .42);
  backdrop-filter: blur(18px);
}

.login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  padding: clamp(28px, 5vw, 56px);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(33, 11, 47, .92), rgba(138, 15, 80, .82)),
    radial-gradient(circle at 72% 16%, rgba(255, 255, 255, .22), transparent 24%);
}

.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  pointer-events: none;
}

.brand-mark {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin-bottom: auto;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, rgba(255, 255, 255, .2), rgba(33, 11, 47, .6));
  box-shadow: 0 18px 42px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .24);
  font-size: 24px;
  font-weight: 900;
}

.login-brand-panel h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(46px, 6vw, 74px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 18px 42px rgba(0, 0, 0, .28);
}

.login-brand-panel p {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, .78);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 700;
}

.login-brand-panel p strong {
  color: #fff;
  font-size: 18px;
}

.login-badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.login-badges span {
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, .09);
  color: rgba(255, 255, 255, .86);
  font-size: 12px;
  font-weight: 800;
}

.version-chip {
  position: absolute;
  right: 42px;
  bottom: 38px;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 800;
}

.login-card {
  align-self: center;
  width: min(390px, calc(100% - 38px));
  margin: 0 auto;
  padding: 30px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: 0 24px 60px rgba(26, 11, 34, .24);
}

.login-card-head {
  display: grid;
  place-items: center;
  margin-bottom: 28px;
}

.avatar {
  position: relative;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .28)) padding-box,
    linear-gradient(145deg, #b61c67, #210b2f, #8aa6f6) border-box;
  border: 1px solid transparent;
  box-shadow:
    0 18px 42px rgba(33, 11, 47, .2),
    inset 0 1px 0 rgba(255, 255, 255, .88);
}

.avatar span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .34), transparent 26%),
    linear-gradient(145deg, #8a0f50, #210b2f);
  box-shadow: 0 12px 26px rgba(33, 11, 47, .24);
  font-size: 19px;
  font-weight: 900;
}

.avatar::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #16a07a;
  box-shadow: 0 4px 12px rgba(22, 160, 122, .44);
}

.login-card h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.login-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  outline: none;
}

select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
  outline: none;
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 186, 57, .2);
}

.login-field {
  position: relative;
  margin-bottom: 14px;
}

.login-field span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9c839f;
  font-size: 14px;
  pointer-events: none;
}

.login-card .login-field input {
  height: 48px;
  margin: 0;
  border-radius: 9px;
  padding-left: 42px;
  background: rgba(255, 255, 255, .92);
}

.login-card .login-field input:focus {
  border-color: #b61c67;
  box-shadow: 0 0 0 4px rgba(182, 28, 103, .12);
}

.license-summary {
  min-height: 58px;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(36, 21, 47, .12);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(250, 247, 252, .92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.license-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8f819b;
  box-shadow: 0 0 0 4px rgba(143, 129, 155, .12);
}

.license-summary.active .license-dot {
  background: #16a07a;
  box-shadow: 0 0 0 4px rgba(22, 160, 122, .14);
}

.license-summary.blocked .license-dot {
  background: #b61c67;
  box-shadow: 0 0 0 4px rgba(182, 28, 103, .14);
}

.license-summary strong {
  display: block;
  overflow: hidden;
  color: #24152f;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.license-summary small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #786b84;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 4px;
  padding: 8px 12px;
  font-weight: 800;
}

.primary-button {
  background: var(--gold);
  color: #2b2415;
}

.primary-button:hover {
  background: var(--gold-dark);
}

.ghost-button {
  background: #e4e8e6;
  color: var(--text);
}

.login-card .primary-button {
  width: 100%;
  margin-top: 10px;
}

.login-action {
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #8a0f50, #b61c67 55%, #210b2f);
  box-shadow: 0 16px 34px rgba(138, 15, 80, .34);
  transition: transform .16s ease, box-shadow .16s ease;
}

.login-action::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .24), transparent);
  transform: translateX(-110%);
  transition: transform .45s ease;
}

.login-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(138, 15, 80, .4);
}

.login-action:hover::before {
  transform: translateX(110%);
}

.login-action span,
.login-action b {
  position: relative;
  z-index: 1;
}

.login-action b {
  font-size: 22px;
  line-height: 1;
}

.message {
  min-height: 20px;
  margin-top: 12px;
  color: #9b2d2d;
  text-align: center;
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  transition: grid-template-columns .18s ease;
  overflow: hidden;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}

.sidebar {
  position: relative;
  z-index: 4;
  min-height: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  color: #e6ece9;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06);
  overflow: visible;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sidebar-top {
  min-height: 98px;
  position: relative;
  padding: 18px 12px 10px;
}

.hamburger {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 3px;
  color: #e6ece9;
  background: transparent;
  font-size: 18px;
  line-height: 1;
}

.brand {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-size: 0;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mini {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #fff;
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, .3), transparent 28%),
    linear-gradient(145deg, #b61c67, #210b2f);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .18);
  font-size: 12px;
  font-weight: 900;
}

.brand-text {
  color: #fff;
  font-size: 19px;
  line-height: .96;
  font-weight: 900;
  text-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}

.brand-text::after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), transparent);
}

.sidebar-collapsed .sidebar-top {
  min-height: 64px;
  padding: 14px 8px 8px;
}

.sidebar-collapsed .hamburger {
  position: static;
  width: 100%;
}

.sidebar-collapsed .brand,
.sidebar-collapsed .nav-item span:not(.nav-icon),
.sidebar-collapsed .nav-plus {
  display: none;
}

.side-nav {
  display: grid;
  gap: 7px;
  padding: 18px 8px 0;
  flex: 1;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.side-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.nav-item {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: 24px 1fr 16px;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 3px;
  padding: 7px 7px;
  color: #d5ddda;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}

.sidebar-collapsed .side-nav {
  padding: 0 8px;
}

.sidebar-collapsed .nav-item {
  min-height: 44px;
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 8px;
}

.sidebar-footer {
  flex: 0 0 auto;
  padding: 12px 12px 22px;
}

.theme-toggle {
  position: relative;
  width: 54px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0;
  margin: 0 auto;
  color: #8f758f;
  background: rgba(255, 255, 255, .78);
  box-shadow:
    inset 2px 2px 6px rgba(80, 72, 98, .16),
    inset -2px -2px 6px rgba(255, 255, 255, .8),
    0 8px 18px rgba(0, 0, 0, .12);
  overflow: hidden;
}

.theme-knob {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #a5abb7;
  background: #fff;
  box-shadow: 0 5px 12px rgba(36, 21, 47, .22);
  transition: left .22s ease, background .22s ease, color .22s ease;
}

.sun-symbol,
.moon-symbol {
  position: absolute;
  font-size: 11px;
  line-height: 1;
  transition: opacity .18s ease;
}

.moon-symbol {
  opacity: 0;
}

.theme-text {
  display: none;
}

.dark-text {
  display: none;
}

.sidebar-collapsed .sidebar-footer {
  padding: 10px 8px 14px;
}

.sidebar-collapsed .theme-toggle {
  width: 30px;
  height: 24px;
  padding: 0;
}

.sidebar-collapsed .theme-text {
  display: none;
}

.sidebar-collapsed .theme-knob {
  left: 6px;
  top: 3px;
}

body.dark-mode .theme-toggle {
  padding: 0;
  justify-content: center;
  color: #e8ecf7;
  background: #242b3a;
  box-shadow:
    inset 2px 2px 7px rgba(0, 0, 0, .45),
    inset -2px -2px 6px rgba(255, 255, 255, .05),
    0 8px 18px rgba(0, 0, 0, .22);
}

body.dark-mode .theme-knob {
  left: calc(100% - 21px);
  color: #e8ecf7;
  background: linear-gradient(145deg, #6f7790, #454b61);
}

body.dark-mode .sun-symbol {
  opacity: 0;
}

body.dark-mode .moon-symbol {
  opacity: 1;
}

body.dark-mode .light-text {
  display: none;
}

body.dark-mode .dark-text {
  display: inline;
}


.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 3px 0 0 var(--rose);
}

.nav-icon {
  text-align: center;
  color: currentColor;
  font-size: 15px;
}

.menu-box-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 6px;
  color: #f6d9ea;
  background: linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  font-size: 12px;
  font-weight: 900;
}

.nav-item:hover .menu-box-icon,
.nav-item.active .menu-box-icon,
.report-root.active .menu-box-icon {
  color: #fff;
  border-color: rgba(182, 28, 103, .65);
  background: linear-gradient(145deg, #b61c67, #6f0a3f);
}

.nav-plus {
  margin-left: auto;
  color: currentColor;
}

.nav-flyout-wrap {
  position: relative;
}

.report-menu-list {
  display: grid;
  gap: 2px;
}

.report-flyout {
  position: static;
  width: 100%;
  max-width: none;
  display: none;
  margin: 2px 0 5px 34px;
  padding: 3px 0 3px 9px;
  color: #e6ece9;
  background: transparent;
  border-left: 1px solid rgba(182, 28, 103, .34);
  box-shadow: none;
}

.report-flyout.single {
  width: auto;
}

.report-flyout.open {
  display: block;
}

.report-root {
  color: #d5ddda;
}

.flyout-group h3 {
  display: none;
}

.flyout-group button {
  width: 100%;
  min-height: 26px;
  border: 0;
  border-radius: 6px;
  padding: 4px 8px;
  text-align: left;
  color: #d5ddda;
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flyout-group button:hover {
  color: #fff;
  background: rgba(182, 28, 103, .14);
}

.submenu-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(246, 217, 234, .75);
  box-shadow: 0 0 0 3px rgba(182, 28, 103, .12);
}

.main-area {
  min-width: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 78%, rgba(138, 166, 246, .34), transparent 34%),
    linear-gradient(145deg, #efeaf6, #f7f3fb 48%, #e3d9ef);
}

.main-area.dashboard-mode {
  overflow: hidden;
}

.topbar {
  position: relative;
  z-index: 120;
  min-height: 32px;
  display: grid;
  grid-template-columns: 1fr minmax(220px, 360px) 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .08);
}

.main-area.dashboard-mode .topbar {
  display: none;
}

.topbar-search {
  position: relative;
  width: 100%;
}

.topbar-search input {
  height: 24px;
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  color: #24152f;
  background: rgba(255, 255, 255, .92);
  font-size: 12px;
  box-shadow: inset 0 1px 2px rgba(36, 21, 47, .18);
}

.topbar-search .search-results {
  top: calc(100% + 7px);
}

.user-chip {
  position: relative;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.top-user-initials {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, .32), transparent 30%),
    linear-gradient(145deg, #b61c67, #261136);
  box-shadow: 0 8px 18px rgba(36, 21, 47, .18), inset 0 1px 0 rgba(255, 255, 255, .18);
  font-size: 10px;
  font-weight: 900;
}

.lock-icon {
  width: 10px;
  height: 10px;
  display: inline-block;
  color: #2f312d;
  font-size: 8px;
}

.date-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
}

.date-entry input[type="text"] {
  padding-right: 8px;
}

.date-picker-button {
  height: 28px;
  width: 28px;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, var(--rose), #4b1c59);
  box-shadow: 0 8px 17px rgba(157, 15, 88, .2);
  font-size: 13px;
  font-weight: 900;
}

.date-picker-button:hover {
  filter: brightness(1.06);
}

.native-date-picker {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.workspace {
  padding: clamp(10px, 1.2vw, 18px) clamp(10px, 1.2vw, 18px) 24px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 1920px;
  margin: 0 auto;
  overflow: auto;
}

#reportView.workspace:not(.hidden) {
  height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 20px;
}

#sysView.workspace:not(.hidden),
#dashboardView.workspace:not(.hidden) {
  height: calc(100vh - 32px);
}

.main-area.dashboard-mode #dashboardView.workspace:not(.hidden) {
  height: 100vh;
  max-width: none;
  padding: 0;
  overflow: hidden;
}

.dashboard-home {
  position: relative;
  min-height: 100%;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(8px, .8vw, 12px);
  padding: clamp(10px, 1.4vw, 20px);
  background:
    radial-gradient(circle at 82% 82%, rgba(138, 166, 246, .26), transparent 34%),
    linear-gradient(145deg, #efeaf6, #f7f3fb 48%, #e3d9ef);
  border: 0;
  overflow: auto;
}

.dashboard-actions {
  width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-tool-button {
  width: 42px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(145deg, var(--rose), #5f0b39);
  box-shadow: 0 10px 22px rgba(157, 15, 88, .2);
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.privacy-toggle.visible,
.refresh-toggle {
  background: linear-gradient(145deg, var(--rose), #5f0b39);
}

.refresh-toggle {
  width: auto;
  min-width: 152px;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0;
}

.privacy-toggle:not(.visible) {
  background: linear-gradient(145deg, #9c98a1, #6f6a75);
}

.dashboard-tool-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(157, 15, 88, .28);
}

.privacy-eye {
  position: relative;
  width: 20px;
  height: 14px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 50% / 62%;
}

.privacy-eye::before {
  content: "";
  position: absolute;
  inset: 3px 6px;
  border-radius: 50%;
  background: currentColor;
}

.privacy-eye::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 5px;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(42deg);
  opacity: 0;
}

.privacy-toggle:not(.visible) .privacy-eye::after {
  opacity: 1;
}

.refresh-icon {
  position: relative;
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 16px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.refresh-icon::before {
  content: "";
  position: absolute;
  right: -2px;
  top: 1px;
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(18deg);
}

.refresh-label {
  white-space: nowrap;
  line-height: 1;
}

.refresh-toggle.loading .refresh-icon {
  animation: refreshSpin .7s linear infinite;
}

@keyframes refreshSpin {
  to {
    transform: rotate(360deg);
  }
}

.pilot-button-grid {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 300px));
  justify-content: center;
  column-gap: clamp(54px, 8vw, 132px);
  row-gap: 26px;
  align-items: center;
}

.pilot-button-grid button {
  min-height: 66px;
  border: 1px solid rgba(255, 255, 255, .84);
  border-right-color: rgba(64, 74, 83, .5);
  border-bottom-color: rgba(64, 74, 83, .58);
  padding: 12px 18px;
  color: #243242;
  background: linear-gradient(180deg, #a9c7df, #94b5d0);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .72),
    2px 2px 0 rgba(64, 74, 83, .28);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

.pilot-button-grid button:hover {
  background: linear-gradient(180deg, #b6d2e8, #9fc2dc);
}

.pilot-button-grid button:active {
  transform: translate(1px, 1px);
  box-shadow: inset 1px 1px 4px rgba(64, 74, 83, .25);
}

.dashboard-cards {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, .8vw, 14px);
}

.metric-card {
  min-height: 128px;
  display: flex;
  align-items: center;
  gap: clamp(7px, .65vw, 13px);
  padding: clamp(10px, .8vw, 16px);
  background: var(--panel);
  border-bottom: 5px solid var(--blue);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(36, 21, 47, .08);
  min-width: 0;
  transition: transform .16s ease, box-shadow .16s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(36, 21, 47, .13);
}

.metric-card.rose { border-bottom-color: var(--rose); }
.metric-card.orange { border-bottom-color: var(--orange); }
.metric-card.green { border-bottom-color: var(--green); }

.metric-icon {
  width: clamp(36px, 2.8vw, 54px);
  height: clamp(36px, 2.8vw, 54px);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e7eefb;
  color: var(--blue);
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}

.metric-card.rose .metric-icon {
  background: #fde9ef;
  color: var(--rose);
}

.metric-card.orange .metric-icon {
  background: #fff0e8;
  color: var(--orange);
}

.metric-card.green .metric-icon {
  background: #e6f6ef;
  color: var(--green);
}

.metric-icon::before,
.metric-icon::after {
  content: "";
  position: absolute;
  display: block;
  box-sizing: border-box;
}

.icon-cash::before {
  width: 50%;
  height: 36%;
  border: 2px solid currentColor;
  border-radius: 5px;
  transform: translateY(2px);
}

.icon-cash::after {
  width: 17%;
  height: 17%;
  right: 25%;
  top: 43%;
  border-radius: 50%;
  background: currentColor;
}

.icon-bank::before {
  width: 58%;
  height: 38%;
  bottom: 28%;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background:
    linear-gradient(90deg, currentColor 0 2px, transparent 2px 28%, currentColor 28% calc(28% + 2px), transparent calc(28% + 2px) 58%, currentColor 58% calc(58% + 2px), transparent calc(58% + 2px) 86%, currentColor 86% calc(86% + 2px), transparent calc(86% + 2px));
}

.icon-bank::after {
  width: 56%;
  height: 18%;
  top: 25%;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: currentColor;
}

.icon-checks::before {
  width: 44%;
  height: 54%;
  border: 2px solid currentColor;
  border-radius: 4px;
  background:
    linear-gradient(currentColor 0 0) 50% 34% / 58% 2px no-repeat,
    linear-gradient(currentColor 0 0) 50% 54% / 58% 2px no-repeat,
    rgba(255, 255, 255, .2);
  transform: rotate(-3deg);
}

.icon-checks::after {
  width: 31%;
  height: 20%;
  right: 21%;
  bottom: 29%;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
  border-radius: 1px;
}

.icon-collection::before {
  content: "TL";
  width: 46%;
  height: 30%;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: currentColor;
  color: #fff;
  font-size: clamp(7px, .6vw, 10px);
  font-weight: 900;
  letter-spacing: 0;
  top: 28%;
}

.icon-collection::after {
  width: 30%;
  height: 18%;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
  bottom: 26%;
  border-radius: 1px;
}

.metric-card strong {
  display: grid;
  grid-template-columns: clamp(32px, 2.6vw, 44px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(5px, .55vw, 8px);
  color: #3a214a;
  font-size: clamp(11px, .9vw, 16px);
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}

.metric-card small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(30px, 2.4vw, 40px);
  height: 18px;
  border-radius: 3px;
  color: #fff;
  background: #4b3c58;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
}

.metric-card strong > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.metric-title {
  display: block;
  margin-bottom: 10px;
  color: #6f6676;
  font-size: clamp(11px, .8vw, 14px);
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-body {
  min-width: 0;
  flex: 1;
  display: grid;
  align-content: center;
}

.currency-lines {
  display: grid;
  gap: 9px;
}

.dashboard-insights {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, .9vw, 16px);
  margin-top: clamp(42px, 7vh, 82px);
}

.insight-panel {
  min-width: 0;
  min-height: 190px;
  padding: clamp(12px, .9vw, 16px);
  border: 1px solid rgba(113, 88, 128, .12);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .86));
  box-shadow: 0 16px 38px rgba(36, 21, 47, .08);
}

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

.insight-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, var(--rose), #461f58);
  box-shadow: 0 10px 22px rgba(157, 15, 88, .2);
  font-size: 14px;
  font-weight: 900;
}

.insight-heading h3 {
  margin: 0;
  color: #170925;
  font-size: clamp(15px, 1vw, 18px);
  line-height: 1.1;
}

.insight-heading p {
  margin: 4px 0 0;
  color: #7b6d85;
  font-size: 12px;
  font-weight: 600;
}

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

.flow-grid div,
.payment-list div {
  min-width: 0;
  padding: 9px;
  border-radius: 11px;
  background: #f5f0f8;
}

.flow-grid span,
.payment-list span {
  display: block;
  color: #7b6d85;
  font-size: 11px;
  font-weight: 800;
}

.flow-grid strong,
.payment-list strong {
  display: block;
  margin-top: 6px;
  color: #251337;
  font-size: clamp(11px, .78vw, 14px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: pre-line;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.flow-grid strong.amount-breakdown,
.payment-list strong.amount-breakdown {
  display: grid;
  gap: 4px;
  white-space: normal;
}

.amount-breakdown span {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.amount-breakdown em {
  min-width: 34px;
  padding: 2px 6px;
  border-radius: 6px;
  color: #8a0e54;
  background: #f8e8f1;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.amount-breakdown b {
  min-width: 0;
  color: #251337;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
}

.period-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #f1e9f5;
}

.period-tabs button {
  height: 26px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  color: #6f6676;
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.period-tabs button.active {
  color: #fff;
  background: var(--rose);
  box-shadow: 0 8px 18px rgba(157, 15, 88, .24);
}

.payment-list {
  display: grid;
  gap: 7px;
}

.payment-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.payment-list strong {
  margin-top: 0;
  text-align: right;
}

.client-bars {
  display: grid;
  gap: 10px;
}

.client-bars div {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding-bottom: 9px;
  color: #251337;
  font-size: 12px;
  font-weight: 800;
}

.client-bars div::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--rose) var(--bar), #efe7f5 var(--bar));
}

.client-bars span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-bars strong {
  color: #6f6676;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.project-cost-panel {
  width: 100%;
  min-width: 0;
  padding: clamp(10px, .9vw, 14px);
  border: 1px solid rgba(113, 88, 128, .12);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .86));
  box-shadow: 0 16px 38px rgba(36, 21, 47, .08);
}

.project-cost-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.project-cost-head .insight-heading {
  margin-bottom: 0;
}

.project-cost-icon {
  background: linear-gradient(145deg, #0d9488, #461f58);
}

.project-select-button {
  height: 34px;
  min-width: 110px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.project-cost-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-cost-group {
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: #f5f0f8;
}

.project-cost-group > strong {
  display: block;
  margin-bottom: 8px;
  color: #251337;
  font-size: 14px;
  font-weight: 900;
}

.project-cost-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.project-cost-items div {
  min-width: 0;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
}

.project-cost-items span {
  display: block;
  color: #7b6d85;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-cost-items b {
  display: block;
  margin-top: 6px;
  color: #251337;
  font-size: clamp(13px, .92vw, 16px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-statusline {
  width: 100%;
  margin-top: auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 14px;
  border: 1px solid rgba(113, 88, 128, .12);
  border-radius: 999px;
  color: #75697f;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 12px 26px rgba(36, 21, 47, .06);
  font-size: 12px;
  font-weight: 800;
}

.status-separator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #b7a8c2;
}

.sql-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8c2f2f;
}

.sql-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.sql-state.active {
  color: var(--green);
}

.quick-search {
  position: relative;
  width: min(340px, 100%);
}

.quick-search input {
  height: 30px;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(36, 21, 47, .08);
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 6;
  display: grid;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(36, 21, 47, .16);
}

.search-results button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid #edf0ee;
  padding: 7px 10px;
  color: var(--text);
  background: #fff;
  text-align: left;
}

.search-results button:hover {
  background: #f7eef5;
}

.search-results strong {
  font-size: 13px;
}

.search-results span,
.empty-search {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.empty-search {
  padding: 10px;
}

.report-heading {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
  min-height: 38px;
  flex: 0 0 auto;
}

.filters,
.table-panel,
.status-bar {
  width: 100%;
  max-width: none;
}

.app-shell.sidebar-collapsed .workspace {
  padding-left: 10px;
  padding-right: 10px;
}

.filters {
  padding: 4px 7px;
  display: grid;
  grid-template-columns: minmax(104px, 120px) minmax(104px, 120px) minmax(170px, 1fr) auto auto auto;
  gap: 6px;
  align-items: end;
  background: #fff;
  border: 1px solid var(--line);
  min-width: 0;
  flex: 0 0 auto;
}

.filters label {
  margin-bottom: 3px;
  font-size: 11px;
}

.filters input {
  height: 28px;
  padding: 5px 9px;
  font-size: 13px;
}

.filters .primary-button,
.filters .ghost-button {
  min-height: 28px;
  padding: 5px 11px;
  font-size: 13px;
}

.report-button {
  background: #168052;
}

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

.export-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.turnover-button {
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  padding: 0 14px;
  color: #fff;
  background: linear-gradient(135deg, #168052, #0f6f47);
  box-shadow: 0 8px 18px rgba(22, 128, 82, .22);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.turnover-button:hover {
  filter: brightness(1.05);
}

.file-icon {
  position: relative;
  width: 30px;
  height: 34px;
  border: 1px solid #b8b8b8;
  border-radius: 2px;
  background: #fff;
  padding: 0;
  box-shadow: 0 1px 2px rgba(36, 21, 47, .12);
}

.file-fold {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #f4f4f4 50%, #d9d9d9 50%);
  border-left: 1px solid #aaa;
  border-bottom: 1px solid #aaa;
}

.file-lines,
.file-lines::before,
.file-lines::after {
  position: absolute;
  left: 6px;
  right: 7px;
  height: 1px;
  background: #b7b7b7;
}

.file-lines {
  top: 10px;
}

.file-lines::before,
.file-lines::after {
  content: "";
  left: 0;
  right: 0;
}

.file-lines::before {
  top: 6px;
}

.file-lines::after {
  top: 12px;
}

.file-band {
  position: absolute;
  left: -3px;
  right: -3px;
  bottom: 6px;
  display: grid;
  place-items: center;
  height: 15px;
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.excel-file .file-band {
  background: #168052;
}

.pdf-file .file-band {
  background: #e50914;
}

.csv-file .file-band {
  background: var(--gold);
}

.file-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: none;
  white-space: nowrap;
  padding: 6px 8px;
  border-radius: 4px;
  color: #fff;
  background: #24152f;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(36, 21, 47, .22);
  z-index: 2;
}

.file-icon:hover::after {
  display: block;
}

.ciro-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(36, 21, 47, .46);
}

.ciro-card {
  position: relative;
  width: min(520px, 100%);
  border: 1px solid rgba(113, 88, 128, .16);
  border-radius: 8px;
  padding: 24px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 24px 60px rgba(36, 21, 47, .24);
}

.ciro-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.2;
}

.ciro-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #6f0f4d;
  background: #f5edf3;
  font-size: 24px;
  line-height: 1;
}

.ciro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ciro-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfafc;
}

.ciro-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ciro-grid strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
}

.ciro-total {
  grid-column: 1 / -1;
  color: #fff;
  background: linear-gradient(135deg, #b01768, #4d0f4f) !important;
}

.ciro-total span {
  color: rgba(255, 255, 255, .78);
}

.ciro-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.table-panel {
  margin-top: 8px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

.table-wrap {
  flex: 1 1 auto;
  overflow: auto;
  max-height: none;
  min-height: 160px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: max(1280px, 100%);
  table-layout: fixed;
}

th,
td {
  padding: 5px 8px;
  border-bottom: 1px solid #edf0ee;
  text-align: left;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 44px;
  min-height: 44px;
  padding-top: 7px;
  padding-bottom: 7px;
  user-select: none;
  color: #2c3532;
  background: #f7f7f7;
  vertical-align: middle;
}

tbody tr:nth-child(odd) {
  background: #ffffff;
}

tbody tr:nth-child(even) {
  background: #f3f3f3;
}

tbody tr:hover {
  background: #f7eef5;
}

tbody tr.clickable-row {
  cursor: pointer;
}

tbody tr.clickable-row:hover {
  background: #f3e9f4;
}

tbody tr.special-code-b-row,
tbody tr.special-code-b-row:nth-child(odd),
tbody tr.special-code-b-row:nth-child(even),
tbody tr.special-code-b-row:hover,
tbody tr.special-code-b-row.clickable-row:hover {
  background: #d92d2d;
  color: #fff;
}

.th-label {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  padding-right: 24px;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.column-filter-button {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 3;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 0;
  color: #75647f;
  background: transparent;
  font-size: 10px;
  line-height: 1;
}

.column-filter-button:hover,
th.filtered .column-filter-button {
  color: #fff;
  background: var(--gold);
}

.column-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  bottom: 0;
  z-index: 2;
  width: 7px;
  cursor: col-resize;
}

.column-resizer::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 3px;
  width: 1px;
  background: rgba(138, 15, 80, .32);
}

.column-resizer:hover::after,
body.resizing-column .column-resizer::after {
  background: var(--gold);
}

body.resizing-column {
  cursor: col-resize;
  user-select: none;
}

.column-filter-panel {
  position: fixed;
  z-index: 30;
  width: 240px;
  display: grid;
  gap: 8px;
  padding: 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(36, 21, 47, .18);
}

.column-filter-panel strong {
  font-size: 13px;
}

.column-filter-panel input {
  height: 30px;
  padding: 6px 9px;
  font-size: 13px;
}

.column-filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.column-filter-actions button {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
}

td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pagination-bar {
  min-height: 36px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 9px;
  color: var(--muted);
  background: #fafafa;
  border-top: 1px solid #edf0ee;
  font-size: 12px;
  font-weight: 700;
}

.pagination-actions {
  display: none;
  gap: 8px;
}

.pagination-actions button {
  padding: 6px 10px;
  font-size: 12px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.status-bar {
  margin-top: 8px;
  flex: 0 0 auto;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  padding: 7px 10px;
  font-size: 12px;
}

.sys-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
}

.sys-layout {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.sys-menu,
.sys-detail {
  background: #fff;
  border: 1px solid var(--line);
}

.sys-menu {
  display: grid;
  align-content: start;
  padding: 8px;
}

.sys-menu-item {
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid #edf0ee;
  padding: 9px 10px;
  color: var(--text);
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.sys-menu-item:hover,
.sys-menu-item.active {
  background: #f7eef5;
  box-shadow: inset 3px 0 0 var(--gold);
}

.sys-detail {
  min-height: 430px;
}

.sys-section {
  display: none;
  padding: 14px;
}

.sys-section.active {
  display: block;
}

.sys-card {
  min-height: 220px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(36, 21, 47, .08);
}

.sys-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #edf0ee;
  padding-bottom: 10px;
}

.sys-card h2 {
  margin: 0;
  font-size: 17px;
}

.small-action {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.danger-action {
  color: #fff;
  background: #9b2d2d;
}

.danger-action:hover {
  background: #7d2020;
}

.sys-form {
  display: grid;
  gap: 10px;
}

.sys-form.two-col {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.sql-form label:last-child {
  grid-column: 1 / -1;
}

.sys-form label {
  margin: 0;
}

.sys-form input,
.sys-form select {
  margin-top: 4px;
  height: 34px;
  padding: 7px 9px;
  font-size: 13px;
}

.permission-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf0ee;
}

.permission-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
}

.permission-list input {
  width: auto;
}

.user-permission-panel {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(180px, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.user-list,
.user-permissions {
  min-height: 178px;
  border: 1px solid #edf0ee;
  background: #fbfafc;
}

.user-list.table-like {
  min-height: 0;
  margin-bottom: 12px;
}

.user-list {
  display: grid;
  align-content: start;
}

.user-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #edf0ee;
  padding: 8px 10px;
  color: var(--text);
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.user-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.user-row:hover,
.user-row.active {
  background: #f7eef5;
  box-shadow: inset 3px 0 0 var(--gold);
}

.user-permissions {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
}

.permission-matrix {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  min-height: 0;
}

.permission-group {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}

.permission-module {
  font-weight: 800;
}

.permission-reports {
  display: grid;
  gap: 6px;
  padding-left: 22px;
}

.permission-report {
  font-size: 13px;
}

.sys-permission {
  align-content: center;
}

.user-permissions strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.user-permissions label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
}

.user-permissions input {
  width: auto;
}

.inline-permissions {
  margin-top: 10px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.form-actions .sys-note {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.active {
  background: #168052;
}

.sys-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.job-list {
  display: grid;
  gap: 8px;
}

.job-row {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  text-align: left;
  color: var(--text);
  background: #fbfafc;
  font-weight: 700;
}

.job-row:hover {
  border-color: var(--gold);
  background: #f7eef5;
}

@media (min-width: 1600px) {
  .workspace {
    max-width: none;
  }

  .dashboard-cards {
    grid-template-columns: repeat(4, minmax(260px, 1fr));
  }

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

@media (max-width: 1400px) {
  .dashboard-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .pilot-button-grid {
    grid-template-columns: repeat(3, minmax(180px, 260px));
    column-gap: clamp(28px, 5vw, 62px);
  }

  .dashboard-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: clamp(8px, 3vh, 34px);
  }

  .client-panel {
    grid-column: 1 / -1;
  }

  .filters {
    grid-template-columns: minmax(104px, 120px) minmax(104px, 120px) minmax(210px, 1fr);
  }

  .filters button {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .pilot-button-grid {
    grid-template-columns: repeat(2, minmax(210px, 300px));
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-brand-panel {
    min-height: 230px;
  }

  .brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    font-size: 21px;
  }

  .login-card {
    width: min(430px, calc(100% - 28px));
    margin: 18px auto;
  }

  .app-shell {
    grid-template-columns: 172px minmax(0, 1fr);
  }

  .dashboard-insights {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .project-cost-grid,
  .project-cost-items {
    grid-template-columns: 1fr;
  }

  .client-panel {
    grid-column: auto;
  }

  .report-flyout {
    position: static;
    width: auto;
    max-width: none;
  }

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

  .sys-layout {
    grid-template-columns: 1fr;
  }

  .sys-menu {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .user-permission-panel {
    grid-template-columns: 1fr;
  }

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

  .home-search-panel {
    display: grid;
    align-items: stretch;
  }
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: minmax(110px, 1fr) minmax(180px, 260px) auto;
    gap: 8px;
  }

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

  .filters .search-field {
    grid-column: 1 / -1;
  }

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

@media (max-width: 560px) {
  .pilot-button-page {
    padding: 18px;
  }

  .pilot-button-grid {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }

  .pilot-button-grid button {
    min-height: 54px;
    font-size: 15px;
  }

  .dashboard-home {
    padding: 12px;
  }

  .dashboard-cards {
    grid-template-columns: 1fr;
  }

  .login-screen {
    padding: 12px;
  }

  .login-brand-panel {
    display: none;
  }

  .login-shell {
    display: block;
    border-radius: 14px;
  }

  .login-card {
    width: 100%;
    min-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    border-radius: 14px;
    padding: 26px;
  }

  .login-card-head {
    place-items: center;
  }
}

body.dark-mode {
  color: #e9eaf2;
  background: #242b3a;
}

body.dark-mode .main-area {
  background:
    radial-gradient(circle at 86% 78%, rgba(86, 94, 128, .34), transparent 34%),
    linear-gradient(145deg, #252b39, #30364a 58%, #202636);
}

body.dark-mode .topbar {
  background: #5f0b39;
  color: #fff;
}

body.dark-mode .metric-card,
body.dark-mode .insight-panel,
body.dark-mode .project-cost-panel,
body.dark-mode .dashboard-statusline,
body.dark-mode .home-search-panel,
body.dark-mode .filters,
body.dark-mode .table-panel,
body.dark-mode .status-bar,
body.dark-mode .sys-menu,
body.dark-mode .sys-detail,
body.dark-mode .sys-card,
body.dark-mode .login-card,
body.dark-mode .search-results,
body.dark-mode .column-filter-panel {
  color: #e9eaf2;
  background: #2f3547;
  border-color: rgba(255, 255, 255, .09);
}

body.dark-mode .login-shell {
  background: rgba(18, 20, 30, .34);
}

body.dark-mode .login-field span {
  color: #aeb5c8;
}

body.dark-mode .login-card .login-field input {
  background: #252b3a;
  border-color: rgba(255, 255, 255, .12);
  color: #e9eaf2;
}

body.dark-mode .metric-title,
body.dark-mode .insight-heading p,
body.dark-mode .flow-grid span,
body.dark-mode .payment-list span,
body.dark-mode .project-cost-items span,
body.dark-mode .client-bars strong,
body.dark-mode .dashboard-statusline,
body.dark-mode .metric-card small,
body.dark-mode label,
body.dark-mode .status-bar,
body.dark-mode .sys-note,
body.dark-mode .search-results span,
body.dark-mode .empty-search,
body.dark-mode .user-row span {
  color: #aeb5c8;
}

body.dark-mode .metric-card strong,
body.dark-mode .insight-heading h3,
body.dark-mode .flow-grid strong,
body.dark-mode .payment-list strong,
body.dark-mode .project-cost-group > strong,
body.dark-mode .project-cost-items b,
body.dark-mode .client-bars div,
body.dark-mode .sys-card h2,
body.dark-mode .report-heading,
body.dark-mode .sys-menu-item,
body.dark-mode .user-row,
body.dark-mode .job-row,
body.dark-mode th,
body.dark-mode td {
  color: #f2f3f8;
}

body.dark-mode input,
body.dark-mode select {
  color: #f2f3f8;
  background: #232838;
  border-color: rgba(255, 255, 255, .12);
}

body.dark-mode .topbar-search input {
  color: #f2f3f8;
  background: rgba(35, 40, 56, .9);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4);
}

body.dark-mode input::placeholder {
  color: #8f98ae;
}

body.dark-mode .project-cost-group,
body.dark-mode .project-cost-items div {
  background: rgba(255, 255, 255, .06);
}

body.dark-mode .search-results button,
body.dark-mode .job-row,
body.dark-mode .user-row,
body.dark-mode .sys-menu-item,
body.dark-mode .flow-grid div,
body.dark-mode .payment-list div,
body.dark-mode .period-tabs,
body.dark-mode .user-list,
body.dark-mode .user-permissions {
  color: #f2f3f8;
  background: #2b3142;
  border-color: rgba(255, 255, 255, .08);
}

body.dark-mode .amount-breakdown em {
  color: #f7d9eb;
  background: rgba(184, 35, 113, .22);
}

body.dark-mode .amount-breakdown b {
  color: #f2f3f8;
}

body.dark-mode .client-bars div::after {
  background:
    linear-gradient(90deg, var(--rose) var(--bar), rgba(255, 255, 255, .11) var(--bar));
}

body.dark-mode .dashboard-tool-button {
  background: linear-gradient(145deg, #c21d70, #4d0d34);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .26);
}

body.dark-mode .privacy-toggle:not(.visible) {
  background: linear-gradient(145deg, #777a86, #4d5060);
}

body.dark-mode .search-results button:hover,
body.dark-mode .job-row:hover,
body.dark-mode .user-row:hover,
body.dark-mode .user-row.active,
body.dark-mode .sys-menu-item:hover,
body.dark-mode .sys-menu-item.active {
  background: #3b253d;
}

body.dark-mode th {
  background: #252b3a;
}

body.dark-mode tbody tr:nth-child(odd) {
  background: #2f3547;
}

body.dark-mode tbody tr:nth-child(even) {
  background: #293041;
}

body.dark-mode tbody tr:hover {
  background: #3b253d;
}

body.dark-mode tbody tr.clickable-row:hover {
  background: #34203f;
}

body.dark-mode tbody tr.special-code-b-row,
body.dark-mode tbody tr.special-code-b-row:nth-child(odd),
body.dark-mode tbody tr.special-code-b-row:nth-child(even),
body.dark-mode tbody tr.special-code-b-row:hover,
body.dark-mode tbody tr.special-code-b-row.clickable-row:hover {
  background: #d92d2d;
  color: #fff;
}

body.dark-mode th,
body.dark-mode td {
  border-bottom-color: rgba(255, 255, 255, .07);
}

body.dark-mode .pagination-bar {
  color: #aeb5c8;
  background: #292f40;
  border-top-color: rgba(255, 255, 255, .08);
}

body.dark-mode .ghost-button {
  color: #f2f3f8;
  background: #444b5e;
}

body.dark-mode .file-icon {
  background: #f4f4f6;
}

@media (max-width: 700px) {
  html,
  body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .topbar {
    grid-template-columns: 1fr;
    padding: 6px 10px;
  }

  .user-chip {
    justify-content: flex-start;
  }

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

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

  .sidebar {
    min-height: auto;
    height: auto;
    max-height: 45vh;
  }

  .workspace,
  .main-area,
  .report-view,
  .sys-view {
    width: 100%;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  .top-search,
  .top-search input,
  .user-chip,
  .filters > *,
  .sys-menu,
  .sys-card {
    width: 100%;
    min-width: 0;
  }

  .sidebar-top {
    min-height: 72px;
  }

  .brand {
    margin-top: 0;
  }

  .side-nav {
    grid-template-columns: 1fr 1fr;
    padding-bottom: 10px;
    overflow-y: auto;
  }

  .sidebar-footer {
    align-items: flex-start;
    padding: 8px 10px 12px;
  }

  .report-flyout {
    position: static;
    max-width: none;
    width: 100%;
  }

  .dashboard-cards {
    grid-template-columns: 1fr;
  }

  .dashboard-statusline {
    flex-wrap: wrap;
    justify-content: flex-start;
    border-radius: 14px;
  }

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

  .filters .search-field {
    grid-column: auto;
  }

  .pagination-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .sys-form.two-col {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 720px;
  }
}

@media print {
  .sidebar,
  .topbar,
  .filters,
  .export-actions,
  .pagination-bar,
  .status-bar {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .workspace {
    padding: 0;
  }

  .main-area {
    background: #fff;
  }

  .table-panel {
    border: 0;
  }

  .table-wrap {
    max-height: none;
    overflow: visible;
  }
}

.chat-fab {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 35;
  min-width: 128px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #b01768, #4d0f4f);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 18px 38px rgba(79, 15, 79, 0.22);
  cursor: pointer;
}

.chat-fab.hidden,
.chat-panel.hidden,
.announcement-toast.hidden {
  display: none;
}

.chat-fab strong {
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: #a0125c;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.chat-panel {
  position: fixed;
  right: 16px;
  bottom: 78px;
  z-index: 36;
  width: min(420px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(105, 86, 118, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(38, 16, 48, 0.22);
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, #9f145f, #3c123f);
  color: #fff;
}

.chat-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.chat-head p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 700;
}

.chat-head button,
.announcement-toast button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.chat-target-row {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(105, 86, 118, 0.14);
}

.chat-target-row label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chat-target-row select {
  min-height: 40px;
  border: 1px solid rgba(105, 86, 118, 0.22);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  font-weight: 800;
}

.chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 16px;
  background: linear-gradient(180deg, rgba(245, 238, 248, 0.75), rgba(255, 255, 255, 0.96));
}

.chat-empty {
  margin: auto;
  max-width: 260px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.chat-message {
  max-width: 86%;
  align-self: flex-start;
  padding: 10px 12px;
  border: 1px solid rgba(105, 86, 118, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(38, 16, 48, 0.08);
}

.chat-message.mine {
  align-self: flex-end;
  background: #9f145f;
  color: #fff;
}

.chat-message.announcement {
  border-color: rgba(176, 23, 104, 0.28);
  background: #fff7fb;
}

.chat-message.mine.announcement {
  background: #74134f;
}

.chat-message header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
}

.chat-message.mine header {
  color: rgba(255, 255, 255, 0.76);
}

.chat-message p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 750;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(105, 86, 118, 0.14);
  background: #fff;
}

.chat-compose textarea {
  min-height: 46px;
  max-height: 110px;
  resize: vertical;
  border: 1px solid rgba(105, 86, 118, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.announcement-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  z-index: 45;
  width: min(640px, calc(100vw - 48px));
  min-height: 260px;
  padding: 34px 36px 34px;
  border: 1px solid rgba(176, 23, 104, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(176, 23, 104, 0.07), rgba(47, 82, 110, 0.03) 42%, rgba(255, 255, 255, 0.98) 72%),
    #fff;
  box-shadow: 0 34px 90px rgba(38, 16, 48, 0.3);
}

.announcement-toast::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #b01768, #6f0f4d, #2f526e);
}

.announcement-toast::after {
  content: "MK";
  position: absolute;
  right: 34px;
  top: 78px;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(176, 23, 104, 0.16);
  border-radius: 8px;
  color: rgba(176, 23, 104, 0.14);
  font-size: 28px;
  font-weight: 950;
}

.announcement-toast button {
  position: absolute;
  top: 22px;
  right: 22px;
  background: #f1e8f1;
  color: #4b234d;
}

.announcement-toast span {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f7eaf2;
  color: #9f145f;
  font-size: 12px;
  font-weight: 900;
}

.announcement-toast strong {
  display: none;
}

.announcement-toast p {
  min-height: 92px;
  margin: 16px 104px 54px 0;
  padding: 20px 22px;
  border-left: 5px solid #b01768;
  border-radius: 8px;
  background: rgba(245, 238, 248, 0.72);
  color: var(--text);
  font-size: 20px;
  line-height: 1.5;
  font-weight: 800;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.announcement-toast em {
  position: absolute;
  right: 28px;
  bottom: 20px;
  max-width: 52%;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .chat-fab {
    right: 16px;
    bottom: 16px;
  }

  .chat-panel {
    right: 16px;
    bottom: 76px;
  }

  .announcement-toast {
    width: calc(100vw - 32px);
    min-height: 220px;
    padding: 26px 22px 24px;
  }

  .announcement-toast strong {
    font-size: 21px;
  }

  .announcement-toast p {
    margin-right: 0;
    font-size: 17px;
  }
}

/* MK Vision 1.0.90 - gerçek mobil yerleşim */
@media (max-width: 700px) {
  html,
  body {
    height: auto !important;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell,
  .app-shell.sidebar-collapsed {
    min-height: 100dvh;
    height: auto !important;
    display: block;
    overflow: visible !important;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1000;
    width: min(88vw, 340px);
    height: 100dvh !important;
    max-height: none !important;
    overflow: hidden;
    box-shadow: 18px 0 44px rgba(20, 5, 28, .34);
    transition: width .18s ease;
  }

  .app-shell.sidebar-collapsed .sidebar {
    width: 54px;
    height: 54px !important;
    min-height: 54px;
    border-radius: 0 0 14px 0;
    box-shadow: 0 8px 24px rgba(20, 5, 28, .26);
  }

  .app-shell.sidebar-collapsed .sidebar-top {
    min-height: 54px;
    padding: 10px 8px;
  }

  .app-shell.sidebar-collapsed .hamburger {
    display: block;
    width: 38px;
    height: 34px;
  }

  .app-shell.sidebar-collapsed .side-nav,
  .app-shell.sidebar-collapsed .sidebar-footer,
  .app-shell.sidebar-collapsed .brand {
    display: none !important;
  }

  .sidebar-top {
    min-height: 76px;
  }

  .side-nav {
    display: block;
    height: calc(100dvh - 132px);
    padding: 8px 10px 18px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .nav-item,
  .report-menu-list,
  .nav-flyout-wrap {
    width: 100%;
  }

  .nav-item {
    margin-bottom: 5px;
  }

  .report-flyout {
    margin-left: 18px;
    width: calc(100% - 18px);
  }

  .main-area,
  .main-area.dashboard-mode {
    min-height: 100dvh;
    height: auto !important;
    overflow: visible !important;
  }

  #dashboardView.workspace:not(.hidden),
  #sysView.workspace:not(.hidden),
  #reportView.workspace:not(.hidden),
  .main-area.dashboard-mode #dashboardView.workspace:not(.hidden) {
    height: auto !important;
    min-height: 100dvh;
    overflow: visible !important;
  }

  .main-area.dashboard-mode #dashboardView.workspace:not(.hidden) {
    padding: 0;
  }

  .topbar {
    min-height: 126px;
    padding: 14px 14px 12px 66px;
  }

  .topbar-search input {
    width: 100%;
  }

  .dashboard-home {
    min-height: 100dvh;
    height: auto;
    overflow: visible;
    padding: 70px 12px 92px;
  }

  .dashboard-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .dashboard-tool-button {
    max-width: 100%;
  }

  .report-header,
  .export-actions {
    flex-wrap: wrap;
  }

  .table-panel,
  .table-wrap {
    flex: none;
    min-height: 0;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
  }

  .chat-panel {
    inset: 64px 8px 8px 8px;
    width: auto;
    height: auto;
    max-height: none;
  }

  .chat-fab {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }
}


.company-login-field select {
  width: 100%;
  height: 48px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 38px 0 42px;
  outline: 0;
  background-color: rgba(255, 255, 255, .92);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.company-login-field select:focus {
  border-color: #b61c67;
  box-shadow: 0 0 0 4px rgba(182, 28, 103, .12);
}

.company-login-field select:disabled {
  cursor: wait;
  opacity: .7;
}
