:root,
html[data-theme="light"] {
  --dh-bg: #f6f8fb;
  --dh-panel: #ffffff;
  --dh-panel-muted: #f6f8fb;
  --dh-sidebar: #ffffff;
  --dh-sidebar-muted: #7b8495;
  --dh-sidebar-hover: #eaf4ff;
  --dh-ink: #2f384f;
  --dh-muted: #7d8799;
  --dh-line: #e9edf2;
  --dh-gold: #108dff;
  --dh-gold-soft: #e8f4ff;
  --dh-green: #287f71;
  --dh-blue: #108dff;
  --dh-orange: #e77636;
  --dh-shadow: 0 2px 8px rgba(31, 43, 61, .055);
  --primary: #108dff;
  --secondary: #2f384f;
  --accent: #e8f4ff;
  --header-bg: #ffffff;
  --header-color: #242832;
  --header-link-color: #4e5561;
  --breadcrumbs-bg: transparent;
  --breadcrumbs-fg: #7e8490;
  --breadcrumbs-link-fg: #5f6672;
  --body-bg: var(--dh-bg);
  --body-fg: var(--dh-ink);
  --body-quiet-color: var(--dh-muted);
  --body-loud-color: var(--dh-ink);
  --link-fg: #108dff;
  --link-hover-color: #0874d4;
  --hairline-color: var(--dh-line);
  --border-color: #dfe3e8;
  --darkened-bg: #f6f7f9;
  --selected-bg: #e8f4ff;
  --selected-row: #eff7ff;
  --button-bg: #108dff;
  --button-hover-bg: #0874d4;
  --default-button-bg: #2f384f;
  --default-button-hover-bg: #20283a;
}

html[data-theme="dark"] {
  --dh-bg: #0d1722;
  --dh-panel: #152231;
  --dh-panel-muted: #1a2a3a;
  --dh-sidebar: #001b2f;
  --dh-sidebar-hover: #0b304a;
  --dh-ink: #ecedf0;
  --dh-muted: #9aa1ad;
  --dh-line: #27394a;
  --dh-gold-soft: #0b3557;
  --dh-shadow: 0 14px 38px rgba(0, 0, 0, .22);
  --body-bg: var(--dh-bg);
  --body-fg: var(--dh-ink);
  --body-quiet-color: var(--dh-muted);
  --body-loud-color: #fff;
  --header-bg: #122131;
  --header-color: var(--dh-ink);
  --header-link-color: #c3c7ce;
  --breadcrumbs-bg: transparent;
  --breadcrumbs-fg: var(--dh-muted);
  --breadcrumbs-link-fg: #c0c5cd;
  --hairline-color: var(--dh-line);
  --border-color: #2a3c4d;
  --darkened-bg: var(--dh-panel-muted);
  --selected-bg: #0b3557;
  --selected-row: #12324a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--dh-bg); }
body { min-width: 0; font-family: Inter, "Segoe UI", Arial, sans-serif; background: var(--dh-bg); color: var(--dh-ink); }
a:link, a:visited { transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease; }

#container { min-height: 100vh; }
#header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 74px;
  padding: 0 28px;
  border-bottom: 1px solid var(--dh-line);
  background: color-mix(in srgb, var(--dh-panel) 94%, transparent);
  box-shadow: 0 3px 15px rgba(30, 34, 42, .03);
  backdrop-filter: blur(18px);
}
#branding { display: flex; align-items: center; min-width: 250px; }
.dh-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--dh-ink) !important; }
.dh-brand__mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: linear-gradient(145deg, #c7aa70, #8c6b31); color: #fff; font-size: 18px; font-weight: 800; box-shadow: 0 7px 18px rgba(157, 123, 62, .25); }
.dh-brand__text { display: grid; line-height: 1.15; }
.dh-brand__text strong { font-size: 14px; letter-spacing: .01em; }
.dh-brand__text small { margin-top: 4px; color: var(--dh-muted); font-size: 10px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
#user-tools { display: flex; align-items: center; gap: 9px; color: var(--dh-muted); font-size: 12px; letter-spacing: 0; text-transform: none; }
#user-tools strong { color: var(--dh-ink); font-size: 13px; }
#user-tools a, #user-tools button { padding: 8px 10px; border-radius: 8px; color: var(--dh-muted); }
#user-tools a:hover, #user-tools button:hover { background: var(--dh-panel-muted); color: var(--dh-ink); }
#user-tools form { display: inline-flex; }
.dh-user-label { color: var(--dh-muted); }
.theme-toggle { border-radius: 10px; }

.main { align-items: stretch; min-height: calc(100vh - 74px); }
.main > #nav-sidebar + .content, .main.shifted > #nav-sidebar + .content { max-width: none; }
.toggle-nav-sidebar {
  position: fixed;
  top: 88px;
  left: 246px;
  z-index: 45;
  width: 28px;
  height: 38px;
  flex: 0 0 28px;
  border: 1px solid #2f343d;
  border-radius: 0 9px 9px 0;
  background: var(--dh-sidebar);
  color: #c8cdd5;
}
.toggle-nav-sidebar::before { content: "‹"; font-size: 24px; line-height: 1; }
.main:not(.shifted) .toggle-nav-sidebar { left: 0; }
.main:not(.shifted) .toggle-nav-sidebar::before { content: "›"; }

#nav-sidebar {
  position: sticky;
  top: 74px;
  z-index: 30;
  left: 0;
  visibility: visible;
  width: 260px;
  max-height: calc(100vh - 74px);
  flex: 0 0 260px;
  margin-left: 0;
  padding: 25px 16px 18px;
  border: 0;
  background: var(--dh-sidebar);
  color: #fff;
  overflow-x: hidden;
  transition: margin .22s ease, visibility .22s ease;
}
.main:not(.shifted) > #nav-sidebar { visibility: hidden; margin-left: -260px; }
.dh-sidebar__heading { padding: 0 12px 10px; color: #69717f; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.dh-dashboard-link, .dh-sidebar__footer a { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px; border-radius: 10px; color: #bbc1cb !important; font-size: 13px; font-weight: 600; }
.dh-dashboard-link span, .dh-sidebar__footer span { width: 19px; color: var(--dh-gold); font-size: 17px; text-align: center; }
.dh-dashboard-link:hover, .dh-dashboard-link.is-active, .dh-sidebar__footer a:hover { background: var(--dh-sidebar-hover); color: #fff !important; }
.dh-nav-search { position: relative; display: block; margin: 16px 0 22px; }
.dh-nav-search > span { position: absolute; top: 8px; left: 12px; z-index: 1; color: #717987; font-size: 18px; }
#nav-filter { width: 100%; height: 39px; margin: 0; padding: 0 12px 0 37px; border: 1px solid #2d323b; border-radius: 10px; background: #20242a; color: #f1f2f4; font-size: 12px; }
#nav-filter::placeholder { color: #777e8a; }
#nav-filter:focus { border-color: #7e6840; outline: none; box-shadow: 0 0 0 3px rgba(181, 148, 87, .12); }
#nav-sidebar .module { margin: 0 0 18px; border: 0; background: transparent; }
#nav-sidebar .module table { border: 0; }
#nav-sidebar .module caption { padding: 0 12px 8px; background: transparent; }
#nav-sidebar .module caption a { color: #69717f; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
#nav-sidebar .module tr { border: 0; background: transparent; }
#nav-sidebar .module th { padding: 0; border: 0; }
#nav-sidebar .module th a { position: relative; display: flex; align-items: center; min-height: 40px; padding: 0 12px 0 38px; border-radius: 9px; color: #aeb5c0; font-size: 13px; font-weight: 500; }
#nav-sidebar .module th a::before { content: ""; position: absolute; left: 17px; width: 7px; height: 7px; border: 1.5px solid #6d7480; border-radius: 50%; }
#nav-sidebar .module tr:hover th a, #nav-sidebar .module .current-model th a { background: var(--dh-sidebar-hover); color: #fff; }
#nav-sidebar .module .current-model th a::before { border-color: var(--dh-gold); background: var(--dh-gold); box-shadow: 0 0 0 4px rgba(181, 148, 87, .12); }
#nav-sidebar .module td { display: none; }
.dh-sidebar__footer { margin-top: 28px; padding-top: 16px; border-top: 1px solid #292e36; }

.content { flex: 1; min-width: 0; padding: 0; }
.dashboard #content { width: auto; }
nav[aria-label="Breadcrumbs"] { padding: 19px 34px 0; background: transparent; }
.breadcrumbs { padding: 0; background: transparent; color: var(--dh-muted); font-size: 12px; }
#content { padding: 24px 34px 50px; }
#content > h1 { margin: 0 0 22px; color: var(--dh-ink); font-size: 24px; font-weight: 700; }
#content > h2 { color: var(--dh-muted); font-size: 15px; }

.dh-dashboard { max-width: 1500px; margin: 0 auto; }
.dh-dashboard__welcome { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.dh-dashboard__welcome h1 { margin: 2px 0 7px; color: var(--dh-ink); font-size: clamp(24px, 3vw, 34px); font-weight: 750; letter-spacing: -.025em; }
.dh-dashboard__welcome > div > p:last-child { margin: 0; color: var(--dh-muted); font-size: 14px; }
.dh-kicker { margin: 0 0 5px; color: var(--dh-gold); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.dh-button { display: inline-flex; align-items: center; gap: 10px; min-height: 43px; padding: 0 17px; border-radius: 10px; background: var(--dh-ink); color: var(--dh-panel) !important; font-size: 12px; font-weight: 700; box-shadow: var(--dh-shadow); }
.dh-button:hover { transform: translateY(-2px); background: var(--dh-gold); color: #fff !important; }

.dh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.dh-stat { position: relative; display: grid; grid-template-columns: 50px 1fr; gap: 14px; min-height: 134px; padding: 22px; overflow: hidden; border: 1px solid var(--dh-line); border-radius: 15px; background: var(--dh-panel); color: var(--dh-ink) !important; box-shadow: var(--dh-shadow); }
.dh-stat:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--dh-gold) 45%, var(--dh-line)); }
.dh-stat__icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 13px; background: var(--dh-gold-soft); color: var(--dh-gold); font-size: 22px; }
.dh-stat--counterparties .dh-stat__icon { background: #e9f2ee; color: var(--dh-green); }
.dh-stat--sales .dh-stat__icon { background: #edf0fa; color: var(--dh-blue); }
.dh-stat--cash .dh-stat__icon { background: #f8eee8; color: var(--dh-orange); }
.dh-stat__copy { display: grid; align-content: start; }
.dh-stat__copy small { color: var(--dh-muted); font-size: 11px; font-weight: 600; }
.dh-stat__copy strong { margin: 4px 0 1px; font-size: 27px; line-height: 1; }
.dh-stat__copy em { color: var(--dh-muted); font-size: 10px; font-style: normal; }
.dh-stat__arrow { position: absolute; top: 17px; right: 17px; color: #afb4bd; }

.dh-dashboard__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 20px; margin-bottom: 20px; }
.dh-panel { border: 1px solid var(--dh-line); border-radius: 15px; background: var(--dh-panel); box-shadow: var(--dh-shadow); }
.dh-panel__head { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 21px; border-bottom: 1px solid var(--dh-line); }
.dh-panel__head h2 { margin: 0; color: var(--dh-ink); font-size: 15px; font-weight: 750; }
.dh-panel__head > span { color: var(--dh-muted); font-size: 11px; }
.dh-panel__head > a { padding: 7px 10px; border-radius: 8px; background: var(--dh-panel-muted); color: var(--dh-muted); font-size: 11px; font-weight: 700; }

.dh-app-list { padding: 10px 20px 20px; }
.dh-app-list .module { margin: 10px 0 0; border: 0; background: transparent; }
.dh-app-list caption { padding: 15px 7px 8px; border-bottom: 1px solid var(--dh-line); background: transparent; }
.dh-app-list caption a { color: var(--dh-muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.dh-app-list table { width: 100%; border: 0; }
.dh-app-list tr { background: transparent; }
.dh-app-list tr + tr { border-top: 1px solid var(--dh-line); }
.dh-app-list th, .dh-app-list td { padding: 13px 8px; border: 0; }
.dh-app-list th a { color: var(--dh-ink); font-size: 13px; font-weight: 650; }
.dh-app-list td { width: 88px; }
.dh-app-list td a { display: inline-flex; padding: 6px 9px; border-radius: 7px; background: var(--dh-panel-muted); color: var(--dh-muted); font-size: 10px; font-weight: 700; }
.dh-app-list td a:hover { background: var(--dh-gold-soft); color: var(--dh-gold); }

.dh-request-list, .dh-activity-list { margin: 0; padding: 7px 20px 14px; list-style: none; }
.dh-request-list li + li, .dh-activity-list li + li { border-top: 1px solid var(--dh-line); }
.dh-request-list a { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 14px 0; color: var(--dh-ink); }
.dh-request-avatar { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 50%; background: var(--dh-gold-soft); color: var(--dh-gold); font-size: 12px; font-weight: 800; }
.dh-request-copy { display: grid; min-width: 0; }
.dh-request-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dh-request-copy small { margin-top: 3px; overflow: hidden; color: var(--dh-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dh-status { padding: 4px 7px; border-radius: 20px; background: #edf0f4; color: #737a85; font-size: 9px; font-weight: 800; white-space: nowrap; }
.dh-status--new { background: #f6ead8; color: #956e2c; }
.dh-status--in_progress { background: #e8eefb; color: #5270b5; }
.dh-status--completed { background: #e5f1eb; color: #3f7d69; }
.dh-empty { display: grid; min-height: 180px; place-items: center; align-content: center; color: var(--dh-muted); text-align: center; }
.dh-empty span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: #e7f1eb; color: var(--dh-green); font-size: 20px; }
.dh-empty p { margin: 9px 0 0; }

.dh-panel--activity { margin-bottom: 20px; }
.dh-panel--funnel { margin-bottom: 20px; }
.dh-funnel { display: grid; grid-template-columns: minmax(380px, 1.15fr) minmax(300px, .85fr); gap: 22px; align-items: center; padding: 20px; }
.dh-funnel__canvas { min-width: 0; min-height: 260px; }
.dh-funnel__canvas canvas { display: block; max-width: 100%; }
.dh-funnel__legend { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.dh-funnel__legend li { display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 9px; border-radius: 9px; }
.dh-funnel__legend li:hover { background: var(--dh-panel-muted); }
.dh-funnel__legend li > span { width: 8px; height: 26px; border-radius: 5px; background: var(--funnel-color); }
.dh-funnel__legend div { display: grid; }
.dh-funnel__legend strong { color: var(--dh-ink); font-size: 10px; }
.dh-funnel__legend small { margin-top: 2px; color: var(--dh-muted); font-size: 9px; }
.dh-activity-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 8px 20px 18px; }
.dh-activity-list li { display: grid; grid-template-columns: 10px 1fr; gap: 10px; min-width: 0; padding: 13px 12px 10px 0; border-top: 0 !important; }
.dh-activity-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--dh-blue); box-shadow: 0 0 0 4px #edf0fa; }
.dh-activity-dot--add { background: var(--dh-green); box-shadow: 0 0 0 4px #e9f2ee; }
.dh-activity-dot--delete { background: #bc6259; box-shadow: 0 0 0 4px #f7e9e7; }
.dh-activity-list strong { display: block; overflow: hidden; color: var(--dh-ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dh-activity-list small { display: block; margin-top: 3px; color: var(--dh-muted); font-size: 9px; }

/* Standard Django pages, restyled as Hando cards. */
.module, .inline-group, #changelist-filter, #changelist .results, .submit-row { border: 1px solid var(--dh-line); border-radius: 13px; background: var(--dh-panel); box-shadow: var(--dh-shadow); }
.module h2, .module caption, .inline-group h2 { border-radius: 12px 12px 0 0; background: var(--dh-panel-muted); color: var(--dh-ink); }
.module caption a.section { color: var(--dh-ink); }
div.breadcrumbs { background: transparent; }
.object-tools a:link, .object-tools a:visited { border-radius: 9px; background: var(--dh-ink); }
.object-tools a:hover { background: var(--dh-gold); }
.button, input[type=submit], input[type=button], .submit-row input, a.button { border-radius: 8px; }
.submit-row { padding: 13px; }
#changelist-filter { overflow: hidden; }
#changelist-filter h2 { border-radius: 12px 12px 0 0; }
#changelist .actions { padding: 12px; border-radius: 12px 12px 0 0; background: var(--dh-panel); }
#changelist table { border-radius: 0 0 12px 12px; overflow: hidden; }
thead th { background: var(--dh-panel-muted); color: var(--dh-muted); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
tbody tr { background: var(--dh-panel); }
tbody tr:hover { background: var(--dh-panel-muted); }
.form-row { padding: 14px; }
.aligned label { color: var(--dh-muted); font-weight: 600; }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], input[type=tel], textarea, select, .vTextField { min-height: 39px; border-radius: 8px; border-color: var(--dh-line); background: var(--dh-panel); color: var(--dh-ink); }
input:focus, textarea:focus, select:focus { border-color: var(--dh-gold) !important; outline: none; box-shadow: 0 0 0 3px rgba(181, 148, 87, .13); }
.selector { max-width: 100%; }
.paginator { border: 0; }

.finance-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 22px; }
.finance-summary article { display: grid; min-height: 118px; align-content: center; padding: 20px; border: 1px solid var(--dh-line); border-radius: 14px; background: var(--dh-panel); box-shadow: var(--dh-shadow); }
.finance-summary small { color: var(--dh-muted); font-size: 10px; font-weight: 700; }
.finance-summary strong { margin: 7px 0 3px; color: var(--dh-ink); font-size: 22px; }
.finance-summary span { color: var(--dh-muted); font-size: 9px; }

body.login { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(circle at 20% 10%, rgba(181, 148, 87, .13), transparent 32%), var(--dh-bg); }
body.login #container { width: min(430px, 100%); height: auto; min-height: 0; flex: none; margin: 0; border: 1px solid var(--dh-line); border-radius: 18px; background: var(--dh-panel); box-shadow: 0 24px 70px rgba(25, 29, 36, .13); overflow: hidden; }
body.login #container > .main { flex: 0 0 auto; }
body.login .main { min-height: 0; }
body.login #header { position: static; justify-content: center; min-height: 112px; padding: 20px; border: 0; background: var(--dh-sidebar); }
body.login .dh-brand { color: #fff !important; }
body.login .dh-brand__text small { color: #9da4af; }
body.login #content { padding: 30px; }
body.login .form-row { padding: 8px 0; }
body.login .submit-row { padding: 16px 0 0; border: 0; box-shadow: none; }
body.login .submit-row input { width: 100%; min-height: 44px; }

@media (max-width: 1100px) {
  .dh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dh-dashboard__grid { grid-template-columns: 1fr; }
  .dh-funnel { grid-template-columns: 1fr; }
  .dh-activity-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  #header { min-height: 66px; padding: 0 16px; }
  #branding { min-width: 0; }
  .dh-brand__text small, .dh-user-label, #user-tools > strong, #user-tools > a:not(:last-of-type) { display: none; }
  #user-tools { margin: 0; padding: 0; }
  .main { min-height: calc(100vh - 66px); }
  #nav-sidebar { display: block; position: fixed; top: 66px; bottom: 0; left: 0; z-index: 42; max-height: none; box-shadow: 20px 0 45px rgba(0,0,0,.23); }
  .main:not(.shifted) > #nav-sidebar { display: block; }
  .toggle-nav-sidebar { display: flex; position: fixed; top: 78px; left: 246px; }
  .main:not(.shifted) .toggle-nav-sidebar { left: 0; }
  nav[aria-label="Breadcrumbs"] { padding: 16px 18px 0; }
  #content { padding: 20px 18px 40px; }
  .dh-dashboard__welcome { align-items: flex-start; flex-direction: column; }
  .dh-stats { grid-template-columns: 1fr; }
  .finance-summary { grid-template-columns: 1fr; }
  .dh-stat { min-height: 116px; }
  .dh-activity-list { grid-template-columns: 1fr; }
  .dh-panel__head { min-height: 68px; }
  .dh-funnel { padding: 12px; }
  .dh-funnel__canvas { min-height: 250px; overflow-x: auto; }
  .dh-app-list { padding-inline: 12px; overflow-x: auto; }
  .dh-request-list { padding-inline: 14px; }
  .change-list .filtered .results, .change-list .filtered .paginator, .filtered #toolbar, .filtered div.xfull, .filtered .actions { margin-right: 0; }
  #changelist-filter { position: static; width: 100%; margin-top: 18px; }
}

@media (max-width: 480px) {
  .dh-brand__text strong { font-size: 12px; }
  .dh-brand__mark { width: 35px; height: 35px; border-radius: 10px; }
  .dh-dashboard__welcome h1 { font-size: 25px; }
  .dh-button { width: 100%; justify-content: center; }
  .dh-request-list a { grid-template-columns: 36px minmax(0, 1fr); }
  .dh-status { display: none; }
}

/* Hando admin adaptation -------------------------------------------------- */
.hando-admin {
  --hando-primary: #108dff;
  --hando-primary-soft: rgba(16, 141, 255, .10);
  --hando-danger: #e7366b;
  --hando-warning: #e77636;
  --hando-success: #287f71;
  --hando-sidebar-width: 260px;
  font-size: 14px;
}

.hando-admin #header {
  min-height: 70px;
  padding: 0 22px 0 0;
  border-bottom: 0;
  background: var(--dh-panel);
  box-shadow: 0 1px 5px rgba(26, 39, 56, .08);
  backdrop-filter: none;
}
.hando-admin #branding {
  align-self: stretch;
  width: var(--hando-sidebar-width);
  min-width: var(--hando-sidebar-width);
  padding: 0 22px;
  border-right: 1px solid var(--dh-line);
}
.hando-admin .dh-brand { width: 100%; gap: 11px; color: var(--dh-ink) !important; }
.hando-admin .dh-brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: var(--hando-primary);
  box-shadow: 0 5px 14px rgba(16, 141, 255, .22);
  font-size: 22px;
}
.hando-admin .dh-brand__text strong { color: var(--dh-ink); font-size: 14px; font-weight: 700; }
.hando-admin .dh-brand__text small { margin-top: 3px; color: var(--dh-muted); font-size: 9px; letter-spacing: .11em; }
.hando-admin #user-tools { margin-left: auto; gap: 4px; }
.hando-admin #user-tools .dh-user-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  margin-left: 10px;
  place-items: center;
  border-radius: 50%;
  background: var(--hando-primary-soft);
  color: var(--hando-primary);
  font-size: 12px;
  font-weight: 800;
}
.hando-admin .dh-user-copy { display: grid; min-width: 82px; margin: 0 10px 0 5px; line-height: 1.1; text-align: left; }
.hando-admin .dh-user-copy small { color: var(--dh-muted); font-size: 9px; font-weight: 500; }
.hando-admin .dh-user-copy strong { margin-top: 3px; color: var(--dh-ink); font-size: 12px; }
.hando-admin #user-tools .dh-top-action,
.hando-admin #user-tools button.dh-top-action,
.hando-admin #user-tools .theme-toggle {
  display: inline-flex;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--dh-muted);
}
.hando-admin #user-tools .dh-top-action i { font-size: 19px; }
.hando-admin #user-tools .dh-top-action:hover,
.hando-admin #user-tools .theme-toggle:hover { background: var(--dh-panel-muted); color: var(--hando-primary); }
.hando-admin #user-tools .theme-toggle svg { width: 18px; height: 18px; }

.hando-admin .main { min-height: calc(100vh - 70px); }
.hando-admin #nav-sidebar {
  top: 70px;
  width: var(--hando-sidebar-width);
  max-height: calc(100vh - 70px);
  flex-basis: var(--hando-sidebar-width);
  padding: 22px 10px 18px;
  border-right: 1px solid var(--dh-line);
  background: var(--dh-sidebar);
  color: var(--dh-ink);
  box-shadow: 2px 8px 12px rgba(31, 43, 61, .025);
}
.hando-admin .main:not(.shifted) > #nav-sidebar { margin-left: calc(var(--hando-sidebar-width) * -1); }
.hando-admin .toggle-nav-sidebar {
  top: 84px;
  left: 246px;
  width: 27px;
  height: 36px;
  border: 0;
  border-radius: 0 7px 7px 0;
  background: var(--hando-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 141, 255, .24);
}
.hando-admin .dh-sidebar__heading,
.hando-admin #nav-sidebar .module caption { padding: 8px 12px; }
.hando-admin .dh-sidebar__heading,
.hando-admin #nav-sidebar .module caption a {
  color: #9aa3b2;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .07em;
}
.hando-admin .dh-dashboard-link,
.hando-admin .dh-sidebar__footer a {
  min-height: 42px;
  gap: 11px;
  padding: 0 13px;
  border-radius: 7px;
  color: #2f384f !important;
  font-size: 13px;
  font-weight: 500;
}
.hando-admin .dh-dashboard-link i,
.hando-admin .dh-sidebar__footer i { width: 19px; color: inherit; font-size: 18px; text-align: center; }
.hando-admin .dh-dashboard-link:hover,
.hando-admin .dh-dashboard-link.is-active,
.hando-admin .dh-sidebar__footer a:hover {
  background: var(--hando-primary-soft);
  color: var(--hando-primary) !important;
}
.hando-admin .dh-nav-search { margin: 13px 0 20px; }
.hando-admin .dh-nav-search > i { position: absolute; top: 10px; left: 14px; z-index: 1; color: #929cad; font-size: 17px; }
.hando-admin #nav-filter {
  height: 40px;
  padding-left: 40px;
  border: 1px solid var(--dh-line);
  border-radius: 6px;
  background: var(--dh-panel-muted);
  color: var(--dh-ink);
}
.hando-admin #nav-filter:focus { border-color: var(--hando-primary); box-shadow: 0 0 0 3px rgba(16, 141, 255, .12); }
.hando-admin #nav-sidebar .module { margin-bottom: 13px; }
.hando-admin #nav-sidebar .module th a {
  min-height: 41px;
  gap: 11px;
  padding: 0 13px;
  border-radius: 7px;
  color: #4d586c;
  font-size: 13px;
  font-weight: 500;
}
.hando-admin #nav-sidebar .module th a::before { display: none; }
.hando-admin #nav-sidebar .module th a i { width: 19px; color: #7c8799; font-size: 18px; text-align: center; }
.hando-admin #nav-sidebar .module tr:hover th a,
.hando-admin #nav-sidebar .module .current-model th a {
  background: var(--hando-primary-soft);
  color: var(--hando-primary);
}
.hando-admin #nav-sidebar .module tr:hover th a i,
.hando-admin #nav-sidebar .module .current-model th a i { color: var(--hando-primary); }
.hando-admin .dh-sidebar__footer { border-color: var(--dh-line); }

html[data-theme="dark"] .hando-admin #nav-sidebar { border-right-color: #12364e; }
html[data-theme="dark"] .hando-admin .dh-dashboard-link,
html[data-theme="dark"] .hando-admin .dh-sidebar__footer a,
html[data-theme="dark"] .hando-admin #nav-sidebar .module th a { color: #8da2b4 !important; }
html[data-theme="dark"] .hando-admin .dh-dashboard-link:hover,
html[data-theme="dark"] .hando-admin .dh-dashboard-link.is-active,
html[data-theme="dark"] .hando-admin #nav-sidebar .module tr:hover th a,
html[data-theme="dark"] .hando-admin #nav-sidebar .module .current-model th a { color: #fff !important; }
html[data-theme="dark"] .hando-admin #nav-sidebar .module th a i { color: #71899d; }
html[data-theme="dark"] .hando-admin .dh-nav-search > i { color: #71899d; }

.hando-admin nav[aria-label="Breadcrumbs"] { padding: 17px 28px 0; }
.hando-admin .breadcrumbs { font-size: 11px; }
.hando-admin #content { padding: 22px 28px 46px; }
.hando-admin #content > h1 { margin-bottom: 20px; color: var(--dh-ink); font-size: 20px; font-weight: 650; }
.hando-admin .dh-dashboard { max-width: 1600px; }
.hando-admin .dh-dashboard__welcome { margin-bottom: 20px; }
.hando-admin .dh-dashboard__welcome h1 { font-size: clamp(23px, 2.7vw, 30px); font-weight: 650; }
.hando-admin .dh-kicker { color: var(--hando-primary); letter-spacing: .08em; }
.hando-admin .dh-button { min-height: 40px; border-radius: 6px; background: var(--hando-primary); color: #fff !important; box-shadow: 0 4px 12px rgba(16, 141, 255, .16); }
.hando-admin .dh-button:hover { background: #0874d4; }
.hando-admin .dh-stats { gap: 18px; }
.hando-admin .dh-stat {
  min-height: 126px;
  padding: 20px;
  border: 0;
  border-radius: 7px;
  box-shadow: var(--dh-shadow);
}
.hando-admin .dh-stat:hover { border-color: transparent; box-shadow: 0 8px 22px rgba(31, 43, 61, .09); }
.hando-admin .dh-stat__icon { width: 46px; height: 46px; border-radius: 6px; background: rgba(16, 141, 255, .12); color: var(--hando-primary); }
.hando-admin .dh-stat--counterparties .dh-stat__icon { background: rgba(40, 127, 113, .12); color: var(--hando-success); }
.hando-admin .dh-stat--sales .dh-stat__icon { background: rgba(82, 44, 143, .10); color: #6f55a0; }
.hando-admin .dh-stat--cash .dh-stat__icon { background: rgba(231, 118, 54, .13); color: var(--hando-warning); }
.hando-admin .dh-stat__copy strong { font-size: 25px; font-weight: 650; }
.hando-admin .dh-panel,
.hando-admin .module,
.hando-admin .inline-group,
.hando-admin #changelist-filter,
.hando-admin #changelist .results,
.hando-admin .submit-row {
  border-color: transparent;
  border-radius: 7px;
  box-shadow: var(--dh-shadow);
}
.hando-admin .dh-panel__head { min-height: 68px; padding: 15px 19px; }
.hando-admin .dh-panel__head h2 { font-size: 14px; font-weight: 650; }
.hando-admin .dh-panel__head > a { border-radius: 5px; }
.hando-admin .dh-app-list th a { display: inline-flex; align-items: center; gap: 9px; }
.hando-admin .dh-app-list th a i { color: var(--hando-primary); font-size: 17px; }
.hando-admin .module h2,
.hando-admin .module caption,
.hando-admin .inline-group h2 { border-radius: 7px 7px 0 0; }
.hando-admin .object-tools a:link,
.hando-admin .object-tools a:visited { border-radius: 6px; background: var(--hando-primary); }
.hando-admin .object-tools a:hover { background: #0874d4; }
.hando-admin .button,
.hando-admin input[type=submit],
.hando-admin input[type=button],
.hando-admin .submit-row input,
.hando-admin a.button { border-radius: 5px; }
.hando-admin #changelist .actions { border-radius: 7px 7px 0 0; }
.hando-admin #changelist table { border-radius: 0 0 7px 7px; }
.hando-admin thead th { font-size: 9px; letter-spacing: .045em; }
.hando-admin tbody tr:hover { background: rgba(16, 141, 255, .035); }
.hando-admin input[type=text],
.hando-admin input[type=password],
.hando-admin input[type=email],
.hando-admin input[type=url],
.hando-admin input[type=number],
.hando-admin input[type=tel],
.hando-admin textarea,
.hando-admin select,
.hando-admin .vTextField { border-radius: 5px; }
.hando-admin input:focus,
.hando-admin textarea:focus,
.hando-admin select:focus { border-color: var(--hando-primary) !important; box-shadow: 0 0 0 3px rgba(16, 141, 255, .11); }
.hando-admin .finance-summary article { border: 0; border-radius: 7px; }

.hando-admin.login { background: radial-gradient(circle at 15% 12%, rgba(16, 141, 255, .12), transparent 32%), var(--dh-bg); }
.hando-admin.login #container { border: 0; border-radius: 10px; box-shadow: 0 20px 55px rgba(31, 43, 61, .15); }
.hando-admin.login #header { min-height: 104px; background: #001b2f; }
.hando-admin.login #branding { width: auto; min-width: 0; padding: 0; border: 0; }
.hando-admin.login .dh-brand { color: #fff !important; }
.hando-admin.login .dh-brand__text strong { color: #fff; }

@media (max-width: 900px) {
  .hando-admin #user-tools .dh-top-action span,
  .hando-admin .dh-user-copy small { display: none; }
  .hando-admin .dh-user-copy { min-width: 0; }
}

@media (max-width: 767px) {
  .hando-admin #header { min-height: 64px; padding-right: 10px; }
  .hando-admin #branding { width: auto; min-width: 0; padding: 0 14px; border: 0; }
  .hando-admin .dh-brand__text small { display: none; }
  .hando-admin .dh-user-copy { display: none; }
  .hando-admin #user-tools .dh-user-avatar { margin-left: 2px; }
  .hando-admin #nav-sidebar { top: 64px; max-height: none; }
  .hando-admin .toggle-nav-sidebar { display: flex !important; top: 76px; align-items: center; justify-content: center; }
  .hando-admin nav[aria-label="Breadcrumbs"] { padding: 14px 16px 0; }
  .hando-admin #content { padding: 18px 16px 38px; }
}

@media (max-width: 480px) {
  .hando-admin .dh-brand__mark { width: 34px; height: 34px; }
  .hando-admin #user-tools .dh-top-action { padding-inline: 7px; }
  .hando-admin #user-tools .dh-user-avatar { display: none; }
}
