:root{
  color-scheme:dark;
  --theme-surface:#071d49;
  --theme-surface-2:#0a2558;
  --theme-input:#041633;
  --theme-text:#f6f8ff;
  --theme-muted:#b8c5dc;
  --theme-border:rgba(32,164,255,.24);
}
.theme-switch{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  width:max-content;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.theme-option{
  flex:0 0 43px;
  width:43px;
  height:36px;
  min-width:43px;
  min-height:36px;
  padding:0;
  border:1px solid rgba(151,218,255,.3);
  border-radius:10px;
  background:rgba(3,18,44,.34);
  color:var(--muted,#b8c5dc);
  cursor:pointer;
  font-weight:800;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  transition:.2s ease;
}
.theme-option svg{
  width:20px;
  height:20px;
  display:block;
  margin:auto;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.theme-option:hover{color:#fff;border-color:rgba(151,218,255,.58);background:rgba(32,164,255,.09);transform:translateY(-1px)}
.theme-option.active{
  color:#fff;
  border-color:rgba(91,194,255,.55);
  background:linear-gradient(135deg,#0b5bd3,#20a4ff);
  box-shadow:0 7px 18px rgba(11,91,211,.23);
}
.sidebar-theme-switch{margin:-17px auto 22px}
.login-theme-switch{
  position:absolute;
  z-index:8;
  top:62px;
  inset-inline-start:auto;
  inset-inline-end:18px;
  display:flex!important;
  width:max-content!important;
  min-width:0!important;
  max-width:none!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.login-theme-switch .theme-option{
  flex:0 0 43px!important;
  width:43px!important;
  min-width:43px!important;
  max-width:43px!important;
  height:36px!important;
  min-height:36px!important;
  padding:0!important;
}

html[data-theme="light"]{
  color-scheme:light;
  --bg:#eef5ff;
  --panel:#ffffff;
  --panel2:#eaf3ff;
  --line:#b8d4f1;
  --text:#102342;
  --muted:#5d708c;
  --shadow:0 22px 55px rgba(42,86,138,.14);
  --theme-surface:#ffffff;
  --theme-surface-2:#edf5ff;
  --theme-input:#f8fbff;
  --theme-text:#102342;
  --theme-muted:#5d708c;
  --theme-border:rgba(27,112,190,.22);
}
html[data-theme="light"] body{
  background:radial-gradient(circle at 18% 0%,#dceeff 0,#f3f8ff 36%,#e8f1fb 100%)!important;
  color:var(--theme-text)!important;
}
html[data-theme="light"] .sidebar{
  background:rgba(247,251,255,.94)!important;
  border-color:rgba(37,119,193,.2)!important;
  box-shadow:10px 0 35px rgba(43,86,135,.08)!important;
}
html[data-theme="light"] .brand h1,
html[data-theme="light"] .topbar h2,
html[data-theme="light"] .section-title,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] b,
html[data-theme="light"] strong{color:#102342}
html[data-theme="light"] .brand p,
html[data-theme="light"] .muted,
html[data-theme="light"] .topbar p,
html[data-theme="light"] small,
html[data-theme="light"] .account-card-hint{color:#667b98!important}
html[data-theme="light"] .nav button{color:#506984!important}
html[data-theme="light"] .nav button:hover,
html[data-theme="light"] .nav button.active{
  color:#0b4d91!important;
  background:linear-gradient(135deg,#e3f1ff,#d8ebff)!important;
  border-color:#8fc8f2!important;
  box-shadow:0 9px 22px rgba(34,112,183,.1)!important;
}
html[data-theme="light"] .nav-icon{
  color:#176cb7!important;
  background:#e6f3ff!important;
  border-color:#bdddf5!important;
}
html[data-theme="light"] .nav button:hover .nav-icon,
html[data-theme="light"] .nav button.active .nav-icon{
  color:#fff!important;
  background:linear-gradient(135deg,#0b72cf,#20a4ff)!important;
}
html[data-theme="light"] .panel,
html[data-theme="light"] .week-card,
html[data-theme="light"] .summary,
html[data-theme="light"] .field,
html[data-theme="light"] .overview-card,
html[data-theme="light"] .compact-panel,
html[data-theme="light"] .exec-card,
html[data-theme="light"] .exec-hero-main,
html[data-theme="light"] .exec-health-card,
html[data-theme="light"] .exec-insight-card,
html[data-theme="light"] .exec-chart-card,
html[data-theme="light"] .exec-kpi,
html[data-theme="light"] .pwd-chart-card,
html[data-theme="light"] .pwd-side-card,
html[data-theme="light"] .pwd-table-card,
html[data-theme="light"] .archive-chart-card,
html[data-theme="light"] .archive-donut-card,
html[data-theme="light"] .archive-table-card,
html[data-theme="light"] .archive-analysis-panel,
html[data-theme="light"] .person-withdrawal-card,
html[data-theme="light"] .company-daily-card,
html[data-theme="light"] .revenue-single-card,
html[data-theme="light"] .my-account-card,
html[data-theme="light"] .summary-week-card,
html[data-theme="light"] .exec-preview-toolbar,
html[data-theme="light"] .exec-alerts-card{
  color:#102342!important;
  border-color:rgba(31,116,192,.2)!important;
  background:linear-gradient(145deg,rgba(255,255,255,.97),rgba(238,246,255,.96))!important;
  box-shadow:0 18px 42px rgba(43,86,135,.12)!important;
}
html[data-theme="light"] .summary-line,
html[data-theme="light"] .exec-submetric,
html[data-theme="light"] .exec-rank-row,
html[data-theme="light"] .exec-alert{
  color:#102342!important;
  border-color:rgba(31,116,192,.16)!important;
  background:rgba(222,237,251,.66)!important;
}
html[data-theme="light"] .summary-week-card h3,
html[data-theme="light"] .summary-line b,
html[data-theme="light"] .exec-preview-toolbar b,
html[data-theme="light"] .exec-section-head h3,
html[data-theme="light"] .exec-rank-row b,
html[data-theme="light"] .exec-alert b{
  color:#102342!important;
}
html[data-theme="light"] .exec-preview-toolbar .preview-note,
html[data-theme="light"] .exec-eyebrow,
html[data-theme="light"] .exec-kpi small,
html[data-theme="light"] .exec-submetric small,
html[data-theme="light"] .exec-status-row,
html[data-theme="light"] .exec-week-col small,
html[data-theme="light"] .exec-rank-row small,
html[data-theme="light"] .exec-alert small,
html[data-theme="light"] .exec-kpi em{
  color:#4f6b87!important;
}
html[data-theme="light"] .exec-badge,
html[data-theme="light"] .exec-approved-label{
  color:#08704d!important;
}
html[data-theme="light"] .exec-badge{
  border-color:rgba(8,112,77,.24)!important;
  background:rgba(36,223,145,.1)!important;
}
html[data-theme="light"] .exec-kpi-trend.up{color:#08704d!important}
html[data-theme="light"] .exec-kpi-trend.down{color:#c8274b!important}
html[data-theme="light"] .exec-kpi-trend.neutral{color:#4f6b87!important}
html[data-theme="light"] .company-filter-chip,
html[data-theme="light"] .withdrawal-filter-chip{
  color:#123759!important;
  background:linear-gradient(145deg,rgba(255,255,255,.82),rgba(221,239,253,.72))!important;
  border-color:rgba(31,116,192,.36)!important;
  box-shadow:0 9px 24px rgba(43,86,135,.1),inset 0 1px 0 rgba(255,255,255,.82)!important;
}
html[data-theme="light"] .company-filter-chip span,
html[data-theme="light"] .withdrawal-filter-chip span{
  color:#123759!important;
  opacity:1!important;
  font-weight:800!important;
}
html[data-theme="light"] .company-filter-chip button,
html[data-theme="light"] .withdrawal-filter-chip button{
  color:#fff!important;
  background:linear-gradient(135deg,#0b5bd3,#178fe8)!important;
  border-color:rgba(38,144,224,.52)!important;
}
html[data-theme="light"] .withdrawal-person-row{
  color:#102342!important;
  background:rgba(232,243,253,.72)!important;
  border-color:rgba(137,92,220,.22)!important;
}
html[data-theme="light"] .withdrawal-person-name{
  color:#123759!important;
  opacity:1!important;
  font-weight:800!important;
}
html[data-theme="light"] .withdrawal-person-row label,
html[data-theme="light"] .withdrawal-person-row label span{
  color:#46637f!important;
  opacity:1!important;
}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .revenue-single-label input{
  color:#102342!important;
  background:#f8fbff!important;
  border-color:#a9cce9!important;
  box-shadow:inset 0 1px 2px rgba(30,79,128,.06)!important;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{color:#8a9db4!important}
html[data-theme="light"] label,
html[data-theme="light"] th,
html[data-theme="light"] .company-table th,
html[data-theme="light"] .revenue-single-label span{color:#46637f!important}
html[data-theme="light"] .company-table td,
html[data-theme="light"] .mini-table td,
html[data-theme="light"] .archive-item,
html[data-theme="light"] .month-archive-row,
html[data-theme="light"] .withdrawal-detail-table td,
html[data-theme="light"] .company-daily-row{
  color:#102342!important;
  background:rgba(220,236,251,.58)!important;
  border-color:rgba(31,116,192,.15)!important;
}
html[data-theme="light"] .save-btn.secondary,
html[data-theme="light"] .archive-btn.secondary,
html[data-theme="light"] .manage-2fa{
  color:#174d7f!important;
  background:#edf6ff!important;
  border-color:#a9cce9!important;
}
html[data-theme="light"] .user-card{
  background:#edf6ff!important;
  border-color:#bdd8ef!important;
}
html[data-theme="light"] .account-card-title{color:#173a5f!important}
html[data-theme="light"] .sidebar-logout{
  color:#ad2645!important;
  background:#fff2f5!important;
  border-color:#efabc0!important;
}
html[data-theme="light"] .theme-switch{background:transparent;border-color:transparent}
html[data-theme="light"] .theme-option{color:#526d88}
html[data-theme="light"] .theme-option.active{color:#fff}
html[data-theme="light"] .welcome-hero{
  border-color:rgba(32,126,199,.24)!important;
  background:#d9eafa!important;
  box-shadow:0 25px 60px rgba(43,86,135,.16)!important;
}
html[data-theme="light"] .command-center-art{filter:brightness(1.32) saturate(.72) opacity(.78)!important}
html[data-theme="light"] .welcome-copy{
  background:linear-gradient(145deg,rgba(248,252,255,.66),rgba(205,232,250,.5) 54%,rgba(231,245,255,.58))!important;
  border-color:rgba(83,181,234,.76)!important;
  box-shadow:0 26px 62px rgba(15,52,94,.24),-12px 0 34px rgba(32,164,255,.13),12px 0 34px rgba(11,91,211,.11),0 0 38px rgba(32,164,255,.14),inset 0 1px 0 rgba(255,255,255,.94)!important;
  backdrop-filter:blur(24px) saturate(112%) brightness(1.1)!important;
  -webkit-backdrop-filter:blur(24px) saturate(112%) brightness(1.1)!important;
}
html[data-theme="light"] .welcome-copy:before{
  background:linear-gradient(118deg,rgba(255,255,255,.6),transparent 27%,transparent 69%,rgba(79,190,246,.13))!important;
  opacity:.76!important;
}
html[data-theme="light"] .welcome-copy:after{
  background:linear-gradient(135deg,rgba(220,248,255,.94),rgba(74,191,248,.65) 19%,rgba(32,164,255,.08) 42%,rgba(11,91,211,.09) 62%,rgba(100,202,251,.62) 84%,rgba(224,249,255,.9))!important;
  filter:drop-shadow(0 0 7px rgba(32,164,255,.34)) drop-shadow(0 0 15px rgba(11,91,211,.15))!important;
}
html[data-theme="light"] .welcome-copy h1,
html[data-theme="light"] .welcome-copy h1 span,
html[data-theme="light"] .welcome-copy h1 strong{color:#061b38!important}
html[data-theme="light"] .welcome-copy h1 span{
  font-weight:600!important;
  text-shadow:0 1px 0 rgba(255,255,255,.72)!important;
}
html[data-theme="light"] .welcome-copy h1 strong{
  font-size:clamp(30px,2.8vw,43px)!important;
  text-shadow:0 1px 0 rgba(255,255,255,.8),0 0 20px rgba(32,164,255,.16)!important;
}
html[data-theme="light"] .home-welcome-subtext{
  color:#183e64!important;
  font-weight:600!important;
  text-shadow:0 1px 0 rgba(255,255,255,.68)!important;
}

html[data-theme="light"] body[data-ui-version]{
  background-color:#dceafa!important;
  background-image:linear-gradient(rgba(229,242,255,.28),rgba(206,231,255,.24)),url("/uptrend-login-v11.webp")!important;
  background-position:center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  background-attachment:fixed!important;
  background-blend-mode:normal!important;
}
html[data-theme="light"] body[data-ui-version]:before{
  background:linear-gradient(180deg,rgba(239,248,255,.12),rgba(222,239,255,.08))!important;
}
html[data-theme="light"] .card,
html[data-theme="light"] html[dir="rtl"] .card{
  color:#102342!important;
  border-color:rgba(77,157,214,.54)!important;
  background:linear-gradient(145deg,rgba(255,255,255,.74),rgba(224,240,255,.57))!important;
  box-shadow:0 34px 90px rgba(38,80,124,.2),inset 0 1px 0 rgba(255,255,255,.9)!important;
}
html[data-theme="light"] .card h1{color:#102342!important}
html[data-theme="light"] .card .sub,
html[data-theme="light"] .forgot,
html[data-theme="light"] .loading{color:#4f6b87!important}
html[data-theme="light"] .card label{color:#294f72!important}
html[data-theme="light"] .card input{
  color:#102342!important;
  background:rgba(255,255,255,.76)!important;
  border-color:#9fc8e7!important;
}
html[data-theme="light"] .card>.langs button{
  color:#315a7c!important;
  background:rgba(255,255,255,.62)!important;
  border-color:#a9cce6!important;
}
html[data-theme="light"] .card>.langs button.active{color:#fff!important;background:linear-gradient(135deg,#0b5bd3,#20a4ff)!important}

@media(max-width:900px){
  html[data-theme="light"] .sidebar{background:rgba(247,251,255,.985)!important}
  .sidebar-theme-switch{margin:-10px auto 16px}
}
@media(max-width:520px){
  .login-theme-switch{top:57px;inset-inline-start:auto;inset-inline-end:15px}
}

/* V33 compact quick controls + collapsible desktop sidebar */
.sidebar-quick-controls{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  width:max-content;
  max-width:100%;
  margin:-6px auto 22px;
  padding:6px;
  border:1px solid rgba(116,207,255,.2);
  border-radius:17px;
  background:linear-gradient(145deg,rgba(255,255,255,.065),rgba(32,164,255,.035));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 10px 28px rgba(0,0,0,.13);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.sidebar-quick-controls .langs{
  display:flex!important;
  grid-template-columns:none!important;
  gap:6px!important;
  margin:0!important;
}
.sidebar-quick-controls .lang,
.sidebar-quick-controls .theme-option{
  display:grid!important;
  place-items:center!important;
  flex:0 0 42px!important;
  width:42px!important;
  min-width:42px!important;
  max-width:42px!important;
  height:36px!important;
  min-height:36px!important;
  padding:0!important;
  border:1px solid rgba(151,218,255,.24)!important;
  border-radius:11px!important;
  background:rgba(3,18,44,.35)!important;
  color:#bcd1ec!important;
  font-size:12px!important;
  font-weight:800!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06)!important;
  transition:transform .2s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease!important;
}
.sidebar-quick-controls .lang:hover,
.sidebar-quick-controls .theme-option:hover{
  transform:translateY(-2px);
  color:#fff!important;
  border-color:rgba(151,218,255,.55)!important;
}
.sidebar-quick-controls .lang.active,
.sidebar-quick-controls .theme-option.active{
  color:#fff!important;
  border-color:rgba(101,196,255,.72)!important;
  background:linear-gradient(135deg,#0b5bd3,#20a4ff)!important;
  box-shadow:0 8px 20px rgba(11,91,211,.27),inset 0 1px 0 rgba(255,255,255,.18)!important;
}
.sidebar-quick-controls .sidebar-theme-switch{
  margin:0!important;
}
.sidebar-collapse-btn{
  position:absolute;
  z-index:12;
  top:14px;
  inset-inline-end:14px;
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  padding:0;
  border:1px solid rgba(116,207,255,.28);
  border-radius:11px;
  background:rgba(4,22,51,.68);
  color:#9fcfff;
  cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 8px 22px rgba(0,0,0,.18);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  transition:.22s ease;
}
.sidebar-collapse-btn:hover{
  color:#fff;
  border-color:rgba(116,207,255,.62);
  background:rgba(11,91,211,.72);
  transform:translateY(-1px);
}
.sidebar-collapse-btn svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition:transform .25s ease;
}
.app{
  transition:grid-template-columns .28s cubic-bezier(.2,.7,.2,1);
}
.app.sidebar-collapsed{
  grid-template-columns:92px minmax(0,1fr)!important;
}
html[dir="ltr"] .app.sidebar-collapsed{
  grid-template-columns:92px minmax(0,1fr)!important;
}
.sidebar{
  transition:padding .28s ease,background .28s ease;
}
.app.sidebar-collapsed .sidebar{
  padding:58px 12px 18px!important;
}
.app.sidebar-collapsed .sidebar-collapse-btn{
  position:absolute;
  top:14px;
  left:50%;
  right:auto;
  transform:translateX(-50%);
}
.app.sidebar-collapsed .sidebar-collapse-btn:hover{
  transform:translateX(-50%) translateY(-1px);
}
.app.sidebar-collapsed .sidebar-collapse-btn svg{
  transform:rotate(180deg);
}
.app.sidebar-collapsed .brand{
  margin:0 0 20px!important;
}
.app.sidebar-collapsed .brand .mark{
  width:54px!important;
  height:54px!important;
  margin:0 auto!important;
  border-radius:17px!important;
}
.app.sidebar-collapsed .brand h1,
.app.sidebar-collapsed .brand p,
.app.sidebar-collapsed .sidebar-quick-controls,
.app.sidebar-collapsed .company-subnav,
.app.sidebar-collapsed .account-card-copy,
.app.sidebar-collapsed .sidebar-logout,
.app.sidebar-collapsed .version{
  display:none!important;
}
.app.sidebar-collapsed .nav{
  gap:9px!important;
}
.app.sidebar-collapsed .nav button{
  display:grid!important;
  place-items:center!important;
  width:58px!important;
  height:54px!important;
  margin:0 auto!important;
  padding:0!important;
  border-radius:17px!important;
}
.app.sidebar-collapsed .nav button>span:last-child{
  display:none!important;
}
.app.sidebar-collapsed .nav button .nav-icon{
  width:40px!important;
  height:40px!important;
  margin:0!important;
}
.app.sidebar-collapsed .sidebar-footer{
  padding-top:14px!important;
  border-color:rgba(116,207,255,.12)!important;
}
.app.sidebar-collapsed .user-card{
  display:grid!important;
  place-items:center!important;
  width:58px!important;
  min-height:58px!important;
  margin:0 auto!important;
  padding:0!important;
  border-radius:17px!important;
}
.app.sidebar-collapsed .user-card .avatar{
  width:42px!important;
  height:42px!important;
  flex-basis:42px!important;
  border-radius:13px!important;
}
html[data-theme="light"] .sidebar-quick-controls{
  border-color:rgba(31,116,192,.2);
  background:linear-gradient(145deg,rgba(255,255,255,.78),rgba(222,240,255,.56));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.88),0 10px 26px rgba(43,86,135,.1);
}
html[data-theme="light"] .sidebar-quick-controls .lang,
html[data-theme="light"] .sidebar-quick-controls .theme-option{
  color:#496985!important;
  border-color:#b8d5eb!important;
  background:rgba(244,250,255,.82)!important;
}
html[data-theme="light"] .sidebar-quick-controls .lang.active,
html[data-theme="light"] .sidebar-quick-controls .theme-option.active{
  color:#fff!important;
  border-color:#65c4ff!important;
  background:linear-gradient(135deg,#0b5bd3,#20a4ff)!important;
}
html[data-theme="light"] .sidebar-collapse-btn{
  color:#315d84;
  border-color:#b8d5eb;
  background:rgba(245,250,255,.86);
}
@media(max-width:900px){
  .sidebar-collapse-btn{display:none!important}
  .sidebar-quick-controls{margin:0 auto 18px}
  .app.sidebar-collapsed{display:block!important}
  .app.sidebar-collapsed .sidebar{padding:calc(env(safe-area-inset-top) + 24px) 18px calc(env(safe-area-inset-bottom) + 18px)!important}
  .app.sidebar-collapsed .brand h1,
  .app.sidebar-collapsed .brand p,
  .app.sidebar-collapsed .sidebar-quick-controls,
  .app.sidebar-collapsed .account-card-copy,
  .app.sidebar-collapsed .sidebar-logout,
  .app.sidebar-collapsed .version{display:initial!important}
}

/* V34: bottom controls and a clean compact sidebar/home layout */
.sidebar-footer .sidebar-quick-controls{
  order:-1;
  margin:0 auto 2px;
}
.app.sidebar-collapsed .nav button{
  width:52px!important;
  height:52px!important;
  min-height:52px!important;
}
.app.sidebar-collapsed .nav button.active{
  border-color:transparent!important;
  background:transparent!important;
  box-shadow:none!important;
}
.app.sidebar-collapsed .nav button .nav-icon{
  width:46px!important;
  height:46px!important;
  flex-basis:46px!important;
  border-radius:15px!important;
}
.app.sidebar-collapsed .main{
  min-width:0;
  padding:24px!important;
}
.app.sidebar-collapsed #home,
.app.sidebar-collapsed .finance-home,
.app.sidebar-collapsed .welcome-hero{
  width:100%;
  max-width:none;
}
.app.sidebar-collapsed .welcome-hero{
  min-height:calc(100vh - 48px);
}
.app.sidebar-collapsed .welcome-copy{
  width:min(900px,66vw);
  max-width:calc(100% - 64px);
}

/* Login: theme controls sit directly below the language controls */
.card>.login-theme-switch{
  top:62px!important;
  inset-inline-end:18px!important;
  inset-inline-start:auto!important;
}
@media(max-width:900px){
  .sidebar-footer .sidebar-quick-controls{margin:0 auto 2px}
}
@media(max-width:520px){
  .card>.login-theme-switch{
    top:57px!important;
    inset-inline-end:15px!important;
  }
}
