:root {
  --blue: #0b4ba8;
  --blue-2: #0868f2;
  --navy: #073275;
  --ink: #14233b;
  --muted: #7e8ca2;
  --bg: #f6f8fc;
  --card: #ffffff;
  --line: #e9eef6;
  --soft: #edf4ff;
  --success: #159b61;
  --warning: #d98218;
  --danger: #d83b53;
  --shadow: 0 14px 35px rgba(22, 49, 89, .09);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

body {
  display: flex;
  justify-content: center;
}

body.auth-page {
  align-items: center;
  padding: 18px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: var(--blue);
  text-decoration: none;
}

img {
  max-width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100dvh;
  background: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 70px rgba(26, 51, 91, .08);
}

.auth-shell {
  min-height: auto;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.topbar {
  min-height: 68px;
  padding: 13px 18px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.auth-topbar {
  justify-content: center;
  padding-top: 20px;
}

.brand img {
  width: 138px;
  display: block;
}

.auth-topbar .brand img {
  width: 180px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f4f7fb;
  display: grid;
  place-items: center;
  color: var(--navy);
  position: relative;
}

.icon-btn svg {
  width: 21px;
  height: 21px;
}

.logout-form {
  margin: 0;
  display: inline-flex;
}

.logout-form .small-link {
  border: 0;
}

.logout-button {
  background: #fff0f2;
  color: #df2948;
}

.logout-button:hover,
.logout-button:focus-visible {
  background: #ffe1e6;
  color: #bd1734;
  outline: 2px solid rgba(223, 41, 72, .18);
  outline-offset: 2px;
}

.dot,
.badge-dot {
  position: absolute;
  min-width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ff416c;
  right: 8px;
  top: 8px;
  border: 2px solid #fff;
}

.badge-count {
  position: absolute;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff416c;
  color: #fff;
  right: 2px;
  top: 2px;
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
}

.lang-menu-wrap {
  position: relative;
}

.lang-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  width: 178px;
  padding: 7px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 38px rgba(22, 49, 89, .15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition: .18s ease;
  z-index: 80;
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
}

.lang-menu-wrap.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-dropdown::before {
  content: "";
  position: absolute;
  right: 15px;
  top: -6px;
  width: 11px;
  height: 11px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}

.lang-btn {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 11px;
  text-align: left;
}

.lang-btn:hover {
  background: #f4f7fb;
}

.lang-btn.active {
  background: var(--soft);
  color: var(--blue);
  font-weight: 800;
}

.lang-code {
  width: 30px;
  height: 26px;
  border-radius: 8px;
  background: #f2f5f9;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  flex: 0 0 auto;
}

.lang-btn.active .lang-code {
  background: var(--blue);
  color: #fff;
}

.lang-name {
  font-size: 11px;
  font-weight: 700;
}

.app-main {
  padding: 8px 18px 118px;
  background: linear-gradient(#fff 0 290px, var(--bg) 290px 100%);
  min-height: calc(100dvh - 68px);
}

.auth-main {
  padding: 0 18px 22px;
  background: #fff;
  min-height: auto;
}

.install-alert {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #ffd79b;
  border-radius: 14px;
  background: #fff7e8;
  color: #7a4707;
  font-size: 12px;
  line-height: 1.45;
}

.hello {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 6px 0 16px;
}

.hello-user {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.hello h1 {
  font-size: 25px;
  line-height: 1.05;
  margin: 0 0 5px;
  font-weight: 800;
  letter-spacing: 0;
}

.hello p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.user-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex: 0 0 46px;
  overflow: hidden;
  background: #eaf1fb;
  border: 3px solid #fff;
  box-shadow: 0 8px 20px rgba(11, 75, 168, .18);
  position: relative;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-weight: 900;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.user-avatar.initials {
  background: linear-gradient(145deg, #e6effd, #d8e6fb);
}

.date-chip {
  font-size: 12px;
  color: var(--blue);
  background: var(--soft);
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.search-wrap {
  position: relative;
  margin-bottom: 17px;
}

.search {
  height: 48px;
  background: #f5f7fa;
  border: 1px solid #f0f2f6;
  border-radius: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.search svg {
  flex: 0 0 auto;
  color: #66758c;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.search input::placeholder {
  color: #9aa6b7;
}

.dashboard-page .search {
  background: #c5e8fa;
  border-color: #87ceeb;
}

.dashboard-page .search svg,
.dashboard-page .search input::placeholder {
  color: #35627f;
}

.autocomplete {
  position: absolute;
  left: 0;
  right: 0;
  top: 54px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 38px rgba(22, 49, 89, .14);
  display: none;
  z-index: 15;
  overflow: hidden;
}

.autocomplete.open {
  display: block;
}

.autocomplete a,
.autocomplete div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid #f1f4f9;
  color: var(--ink);
}

.autocomplete a:last-child,
.autocomplete div:last-child {
  border-bottom: 0;
}

.autocomplete-thumb {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--soft);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.autocomplete-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.autocomplete b {
  display: block;
  font-size: 12px;
}

.autocomplete span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
}

.vehicle-lookup {
  position: relative;
}

.vehicle-lookup-results {
  top: calc(100% - 1px);
}

.existing-vehicle-option {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid #f1f4f9;
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.existing-vehicle-option:last-child {
  border-bottom: 0;
}

.existing-vehicle-option:is(:hover, :focus-visible) {
  background: #f3f7fd;
  outline: 0;
}

.existing-vehicle-option > span:last-child {
  min-width: 0;
}

.existing-vehicle-summary {
  margin: 14px 0 10px;
  padding: 16px;
  border: 1px solid #cdddf2;
  border-radius: 20px;
  background: linear-gradient(145deg, #f7faff, #edf5ff);
}

.existing-vehicle-summary > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.existing-vehicle-summary h2 {
  margin: 6px 0 3px;
  color: var(--navy);
  font-size: 21px;
}

.existing-vehicle-summary p,
.existing-vehicle-summary small {
  display: block;
  margin: 0;
  color: #60728a;
  font-size: 12px;
}

.existing-vehicle-summary small {
  margin-top: 4px;
}

.existing-action-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.existing-action-links .secondary-btn {
  justify-content: center;
}

.vehicle-exists-copy {
  margin: 18px 0;
  padding: 14px;
  border-radius: 16px;
  background: #f3f7fd;
}

.vehicle-exists-copy strong,
.vehicle-exists-copy span,
.vehicle-exists-copy small {
  display: block;
}

.vehicle-exists-copy strong {
  color: var(--navy);
  font-size: 16px;
}

.vehicle-exists-copy span,
.vehicle-exists-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.welcome {
  background: #fff;
  border: 1.5px solid #2f5a8c;
  border-radius: 18px;
  padding: 16px 15px;
  display: grid;
  grid-template-columns: 1fr 112px;
  align-items: center;
  min-height: 125px;
  box-shadow: 0 6px 18px rgba(25, 66, 116, .04);
  overflow: hidden;
  position: relative;
}

.welcome::before {
  content: "";
  position: absolute;
  width: 135px;
  height: 135px;
  background: #edf4ff;
  border-radius: 40px;
  right: -18px;
  bottom: -54px;
  transform: rotate(12deg);
}

.welcome h2 {
  font-size: 16px;
  margin: 0 0 6px;
}

.welcome p {
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
  color: #6f7f95;
  max-width: 190px;
}

.cta,
.primary-btn,
.secondary-btn,
.danger-btn {
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cta,
.primary-btn {
  background: var(--blue);
  color: #fff;
}

.welcome .cta {
  margin-top: 10px;
  min-height: 36px;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 11px;
}

.secondary-btn {
  background: #f4f7fb;
  color: var(--navy);
}

.danger-btn {
  background: #fff0f2;
  color: var(--danger);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.danger-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.car-illus {
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 6px;
}

.car-illus img {
  width: 104px;
  max-height: 86px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(11, 75, 168, .10));
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 2px 10px;
}

.section-head h2,
.section-head h3 {
  font-size: 15px;
  margin: 0;
}

.section-head a,
.section-head button {
  border: 0;
  background: transparent;
  color: #8a96a8;
  font-size: 11px;
}

.dashboard-info {
  margin-top: 18px;
  background: var(--blue);
  color: #fff;
  border-radius: 22px;
  padding: 16px 14px 14px;
  box-shadow: 0 12px 28px rgba(11, 75, 168, .22);
}

.dashboard-info h2,
.dashboard-info h3 {
  font-size: 19px;
  letter-spacing: 0;
  margin: 0 0 4px;
  color: #fff;
  font-weight: 800;
}

.dashboard-info > p {
  font-size: 11px;
  color: #dceaff;
  margin: 0 0 14px;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, .18);
  padding-top: 13px;
}

.dashboard-kpi {
  min-width: 0;
  color: #fff;
  padding: 2px 8px 0;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.dashboard-kpi:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(255, 255, 255, .18);
}

.dashboard-kpi .kpi-icon {
  display: grid;
  place-items: center;
}

.dashboard-kpi .kpi-icon svg {
  width: 27px;
  height: 27px;
}

.dashboard-kpi strong {
  font-size: 24px;
  line-height: 1;
  margin-top: 9px;
}

.dashboard-kpi span {
  font-size: 10px;
  font-weight: 700;
  color: #dceaff;
  margin-top: 5px;
}

.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.quick-btn {
  border: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 7px 23px rgba(18, 43, 79, .06);
  padding: 11px 5px 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  color: #536178;
  font-size: 9px;
  min-height: 78px;
}

.quick-btn .quick-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #eef4fd;
  display: grid;
  place-items: center;
  color: var(--blue);
}

.quick-btn svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

.activity {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.activity-item {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  gap: 11px;
  align-items: center;
  border: 1px solid #edf0f5;
}

.activity-icon,
.list-icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #edf4ff;
  color: var(--blue);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.activity-icon svg,
.list-icon svg {
  width: 19px;
  height: 19px;
}

.activity-text,
.list-copy {
  min-width: 0;
  flex: 1;
}

.activity-text b,
.list-copy b {
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
}

.activity-text span,
.list-copy span {
  display: block;
  font-size: 10px;
  color: #8f9bb1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-price,
.strong-value {
  font-size: 11px;
  font-weight: 800;
  color: var(--navy);
  white-space: nowrap;
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 86px;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(15px);
  border-top: 1px solid #edf0f5;
  display: grid;
  grid-template-columns: 1fr 1fr 74px 1fr 1fr;
  align-items: center;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 30;
}

.nav-item {
  border: 0;
  background: transparent;
  color: #8e9aad;
  font-size: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 0;
}

.nav-item svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

.nav-item.active {
  color: var(--blue);
  font-weight: 800;
}

.fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(11, 75, 168, .35);
  margin: -26px auto 0;
}

.fab svg {
  width: 24px;
  height: 24px;
}

.page-title {
  font-size: 24px;
  margin: 10px 0 6px;
  letter-spacing: 0;
}

.page-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 18px;
}

.list-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.list-card.photo-card {
  align-items: flex-start;
}

.photo-preview-link {
  position: relative;
  display: block;
  cursor: zoom-in;
}

.photo-preview-link:focus-visible {
  outline: 3px solid var(--blue-2);
  outline-offset: 4px;
}

.photo-preview-hint {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid #ffffff50;
  border-radius: 8px;
  color: #fff;
  background: #071b38b3;
  pointer-events: none;
}

.vehicle-photo .photo-preview-hint svg {
  width: 16px;
  height: 16px;
}

html.photo-viewer-open,
body.photo-viewer-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.photo-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  color: #fff;
  background: #080f1cf5;
  overscroll-behavior: contain;
}

.photo-viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.photo-viewer::backdrop {
  background: #080f1c;
}

.photo-viewer-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid #ffffff1f;
}

.photo-viewer-caption {
  flex: 1;
  min-width: 0;
}

.photo-viewer-caption h2,
.photo-viewer-caption p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-viewer-caption h2 {
  margin: 0;
  font-size: clamp(15px, 1.5vw, 20px);
  line-height: 1.4;
}

.photo-viewer-caption p {
  margin: 4px 0 0;
  color: #c3cfe2;
  font-size: 12px;
  line-height: 1.5;
}

.photo-viewer-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffff40;
  border-radius: 50%;
  color: #fff;
  background: #ffffff14;
}

.photo-viewer-close:hover {
  background: #ffffff2b;
}

.photo-viewer-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.photo-viewer-close svg {
  width: 24px;
  height: 24px;
}

.photo-viewer-stage {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.photo-viewer-image {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.photo-viewer-image[hidden],
.photo-viewer-status[hidden] {
  display: none;
}

.photo-viewer-status {
  max-width: 440px;
  margin: 0;
  color: #d2deef;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.invoice-list-card {
  transition: background .18s ease, border-color .18s ease;
}

.invoice-list-card-overdue {
  background: #fff0f2;
  border-color: #ffc7d0;
}

.invoice-list-card-overdue .list-icon {
  background: #fff;
  color: var(--danger);
}

.invoice-list-card-overdue .activity-price {
  color: #9d1730;
}

.invoice-status-text {
  font-size: inherit;
  font-weight: 900;
}

.invoice-status-issued {
  color: var(--blue);
}

.invoice-status-draft,
.invoice-status-overdue {
  color: var(--danger);
}

.invoice-status-paid {
  color: var(--success);
}

.vehicle-photo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--soft);
  display: grid;
  place-items: center;
  color: var(--blue);
  flex: 0 0 auto;
  overflow: hidden;
}

.vehicle-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-photo img.vehicle-photo-placeholder {
  object-fit: contain;
  padding: 10px;
}

.vehicle-photo svg {
  width: 28px;
  height: 28px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.list-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.center-actions {
  justify-content: center;
}

.small-link {
  min-height: 34px;
  border-radius: 10px;
  background: #f4f7fb;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
}

.small-link.danger {
  background: #fff0f2;
  color: var(--danger);
}

button.small-link {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.work-action-form {
  margin: 0;
}

.small-link.work-assembly {
  background: #e9f8f1;
  color: #087449;
}

.small-link.work-disassembly {
  background: #fff5e8;
  color: #a55600;
}

.work-status {
  font-weight: 800;
}

.work-status-assembly {
  color: #087449 !important;
}

.work-status-disassembly {
  color: #a55600 !important;
}

.list-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.record-photo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--soft);
  flex: 0 0 auto;
  overflow: hidden;
}

.record-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.record-photo img.record-photo-placeholder {
  object-fit: contain;
  padding: 8px;
}

.record-card {
  align-items: flex-start;
}

.record-side {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.record-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.icon-action {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #f4f7fb;
  color: var(--navy);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.icon-action.danger {
  background: #fff0f2;
  color: var(--danger);
}

.icon-action:hover,
.icon-action:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(8, 104, 242, .10);
}

.icon-action.danger:hover,
.icon-action.danger:focus-visible {
  box-shadow: 0 0 0 4px rgba(216, 59, 83, .10);
}

.icon-action svg {
  width: 17px;
  height: 17px;
}

.chev {
  color: #a9b3c1;
}

.profile-card,
.empty-state,
.auth-panel,
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.work-action-choice {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.work-action-choice legend {
  margin-bottom: 5px;
  font-weight: 800;
}

.field-help {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
}

.segmented-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.segmented-options label {
  position: relative;
  cursor: pointer;
}

.segmented-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-options span {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafd;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.segmented-options input:checked + span {
  border-color: var(--blue);
  background: #eaf3ff;
  color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 104, 242, .10);
}

.segmented-options input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.profile-card {
  text-align: center;
  padding: 24px 16px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 11px;
  background: linear-gradient(145deg, #e6effd, #d8e6fb);
  display: grid;
  place-items: center;
  color: var(--blue);
  overflow: hidden;
  font-size: 20px;
  font-weight: 900;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card h2 {
  margin: 0 0 4px;
}

.profile-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.profile-file-preview {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafd;
  display: grid;
  place-items: center;
  padding: 10px;
}

.profile-file-preview img {
  max-height: 72px;
  object-fit: contain;
}

[data-avatar-preview][hidden] {
  display: none;
}

.avatar-camera-control label.secondary-btn {
  margin: 0;
  cursor: pointer;
}

.avatar-camera-control input:focus-visible + label {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.empty-state {
  padding: 22px 16px;
  text-align: center;
}

.empty-state h2,
.empty-state h3 {
  margin: 0 0 7px;
  font-size: 17px;
}

.empty-state p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-panel {
  padding: 20px 16px 18px;
}

.auth-panel h1 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: 0;
}

.auth-panel > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-row {
  display: grid;
  gap: 6px;
}

.form-row label {
  font-size: 12px;
  font-weight: 800;
  color: var(--navy);
}

.form-control {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafd;
  padding: 11px 12px;
  color: var(--ink);
  outline: none;
  font-size: 16px;
}

.form-control:focus {
  border-color: rgba(8, 104, 242, .45);
  box-shadow: 0 0 0 4px rgba(8, 104, 242, .10);
  background: #fff;
}

.form-control[type="file"] {
  min-width: 0;
  max-width: 100%;
  padding: 5px;
  overflow: hidden;
}

input[type="file"]::file-selector-button {
  min-height: 44px;
  max-width: 100%;
  margin-inline-end: 10px;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .15s ease;
}

input[type="file"]:not(:disabled):hover::file-selector-button {
  background: var(--navy);
}

input[type="file"]:disabled::file-selector-button {
  opacity: .55;
  cursor: not-allowed;
}

.vehicle-photo-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--navy);
}

.vehicle-photo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

.vehicle-photo-slot {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 1px dashed #b8c8df;
  border-radius: 12px;
  background: #f4f7fb;
  color: #718198;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background-color .16s ease;
}

.vehicle-photo-slot:hover {
  border-color: var(--blue);
  background: #edf4ff;
  transform: translateY(-1px);
}

.vehicle-photo-slot:focus-visible {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(8, 104, 242, .12);
}

.vehicle-photo-slot.has-photo {
  border-style: solid;
  border-color: #b6c9e5;
  background: #dfe8f4;
}

.vehicle-photo-slot > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-photo-add {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
}

.vehicle-photo-add svg {
  width: clamp(19px, 5.5vw, 25px);
  height: clamp(19px, 5.5vw, 25px);
}

.vehicle-photo-add b {
  font-size: 9px;
  line-height: 1;
}

.vehicle-photo-slot.has-photo .vehicle-photo-add {
  display: none;
}

.photo-picker-dialog-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-top: 16px;
  border-radius: 16px;
  background: #edf2f8;
  object-fit: cover;
}

.photo-picker-dialog-name {
  margin: 9px 2px 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-picker-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.photo-picker-dialog-actions .secondary-btn {
  grid-column: 1 / -1;
}

.photo-picker-dialog-actions > button {
  width: 100%;
}

textarea.form-control {
  resize: vertical;
  min-height: 96px;
}

.password-field {
  position: relative;
  min-width: 0;
}

.password-field .form-control {
  padding-right: 60px;
}

.password-field .form-control::-ms-reveal {
  display: none;
}

.password-toggle {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--blue);
}

.password-toggle:hover {
  background: var(--soft);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--blue-2);
  outline-offset: -3px;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
}

.password-toggle[hidden],
.password-toggle-slash {
  display: none;
}

.password-toggle.is-visible .password-toggle-slash {
  display: inline;
}

.form-actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.export-type-actions {
  grid-template-columns: 1fr;
}

.statistics-export-open svg {
  width: 19px;
  height: 19px;
}

.statistics-export-copy {
  margin: 14px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.statistics-export-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.form-card {
  padding: 16px;
}

.input-with-tool {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
}

.tool-btn {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafd;
  color: var(--blue);
  display: grid;
  place-items: center;
}

.tool-btn svg {
  width: 20px;
  height: 20px;
}

.detail-hero {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 14px;
}

.detail-image {
  min-height: 178px;
  background: var(--soft);
  display: grid;
  place-items: center;
  color: var(--blue);
}

.detail-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.detail-image img.detail-image-placeholder {
  object-fit: contain;
  padding: 34px;
}

.detail-image svg {
  width: 76px;
  height: 76px;
}

.detail-body {
  padding: 16px;
}

.detail-body h1 {
  font-size: 24px;
  margin: 0 0 5px;
  letter-spacing: 0;
}

.detail-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.meta-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px;
  background: #fff;
}

a.meta-item {
  color: inherit;
  display: block;
}

.kpi-link {
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.kpi-link:hover,
.kpi-link:focus-visible {
  border-color: rgba(8, 104, 242, .32);
  box-shadow: 0 10px 24px rgba(11, 75, 168, .10);
  transform: translateY(-1px);
  outline: 0;
}

.meta-item span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 4px;
}

.meta-item b {
  display: block;
  font-size: 13px;
  word-break: break-word;
}

.compact-empty {
  padding: 15px;
  margin-bottom: 14px;
}

.compact-empty p {
  margin: 0;
}

.work-history-item {
  align-items: flex-start;
}

.work-icon-assembly {
  background: #e9f8f1;
  color: #087449;
}

.work-icon-disassembly {
  background: #fff5e8;
  color: #a55600;
}

.charts-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.chart-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
}

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

.chart-head h2 {
  margin: 0;
  font-size: 15px;
}

.chart-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chart-legend span,
.status-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5f6f84;
  font-size: 10px;
  font-weight: 800;
}

.chart-legend i,
.status-list i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.legend-vehicles,
.vehicles-bar {
  background: var(--blue);
}

.legend-errors,
.errors-bar {
  background: var(--danger);
}

.legend-parts,
.parts-bar {
  background: var(--success);
}

.bar-chart {
  height: 178px;
  display: grid;
  grid-template-columns: repeat(var(--chart-columns, 6), minmax(42px, 1fr));
  gap: 8px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-top: 8px;
}

.bar-chart-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
}

.bar-chart-scroll .bar-chart {
  min-width: calc(var(--chart-columns, 6) * 48px);
}

.bar-group {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-items: end;
  text-align: center;
}

.bar-cluster {
  height: 132px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
}

.bar {
  width: 7px;
  height: var(--bar-height);
  min-height: 0;
  border-radius: 8px 8px 0 0;
}

.bar-group > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.horizontal-chart {
  display: grid;
  gap: 10px;
}

.horizontal-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 8px;
}

.horizontal-row span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.horizontal-row div {
  height: 10px;
  border-radius: 999px;
  background: #edf0f5;
  overflow: hidden;
}

.horizontal-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--success));
}

.horizontal-row b {
  color: var(--navy);
  font-size: 10px;
  text-align: right;
  white-space: nowrap;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
}

.donut {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}

.donut::after {
  content: "";
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
}

.donut span {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

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

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

.status-list b {
  color: var(--navy);
  font-size: 12px;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.invoice-items {
  display: grid;
  gap: 12px;
}

.invoice-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.invoice-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.invoice-item-head b {
  font-size: 13px;
}

.invoice-item-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.invoice-summary {
  background: var(--blue);
  color: #fff;
  border-radius: 20px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.invoice-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.invoice-summary-row.total {
  border-top: 1px solid rgba(255, 255, 255, .18);
  padding-top: 10px;
  font-size: 18px;
  font-weight: 900;
}

.invoice-paper {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.invoice-document {
  color: #13243c;
  font-variant-numeric: tabular-nums;
}

.invoice-hero {
  background: linear-gradient(135deg, #073275 0%, #0868f2 68%, #14a36f 135%);
  color: #fff;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.invoice-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.invoice-logo-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 8px;
  flex: 0 0 auto;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .16);
}

.invoice-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.invoice-brand-lockup b,
.invoice-title-box strong {
  display: block;
  letter-spacing: 0;
}

.invoice-brand-lockup b {
  font-size: 22px;
  line-height: 1;
}

.invoice-brand-lockup small,
.invoice-title-box span,
.invoice-title-box em {
  display: block;
  color: rgba(255, 255, 255, .78);
}

.invoice-brand-lockup small {
  margin-top: 4px;
  font-size: 11px;
}

.invoice-title-box {
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 16px;
  background: rgba(255, 255, 255, .13);
  padding: 13px;
  backdrop-filter: blur(10px);
}

.invoice-title-box span {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-title-box strong {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.05;
  word-break: break-word;
}

.invoice-title-box em {
  margin-top: 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.invoice-meta-strip {
  margin: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f2f7ff;
  border-bottom: 1px solid var(--line);
}

.invoice-meta-strip div {
  min-width: 0;
  border: 1px solid #e3ebf7;
  border-radius: 13px;
  background: #fff;
  padding: 10px;
}

.invoice-meta-strip dt,
.invoice-meta-strip dd {
  margin: 0;
}

.invoice-meta-strip dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-meta-strip dd {
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  word-break: break-word;
}

.invoice-paper-head {
  background: var(--blue);
  color: #fff;
  padding: 18px;
}

.invoice-paper-head h1 {
  margin: 0 0 5px;
  font-size: 24px;
  letter-spacing: 0;
}

.invoice-paper-head p {
  margin: 0;
  color: #dceaff;
  font-size: 13px;
}

.invoice-paper-body {
  padding: 16px;
}

.invoice-parties {
  display: grid;
  gap: 12px;
}

.invoice-parties-modern {
  margin-bottom: 14px;
}

.invoice-party {
  position: relative;
  border: 1px solid #e4ebf5;
  border-radius: 18px;
  background: #fff;
  padding: 15px;
  overflow: hidden;
}

.invoice-party::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--blue);
}

.invoice-party-client::before {
  background: var(--success);
}

.invoice-party-label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.invoice-party-label span,
.invoice-note-box span,
.invoice-subject span,
.invoice-bank-box span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-party-label small {
  color: #a1adbd;
  font-size: 10px;
  text-align: right;
}

.invoice-party h2 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.18;
  letter-spacing: 0;
  word-break: break-word;
}

.invoice-party-details {
  display: grid;
  gap: 4px;
  color: #5f6f84;
  font-size: 12px;
  line-height: 1.38;
}

.invoice-party-details span,
.invoice-bank-box b,
.invoice-bank-box small {
  word-break: break-word;
}

.invoice-bank-box {
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid #d9e8ff;
  background: #f4f9ff;
  padding: 11px;
  display: grid;
  gap: 4px;
}

.invoice-bank-box b {
  color: var(--blue);
  font-size: 13px;
}

.invoice-bank-box small {
  color: #64758c;
  font-size: 11px;
}

.invoice-subject {
  margin: 0 0 14px;
  border: 1px solid #e4ebf5;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  padding: 12px;
}

.invoice-subject b {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.25;
}

.invoice-subject small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.party-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}

.party-card span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.party-card b {
  display: block;
  margin-bottom: 4px;
}

.party-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 12px;
}

.invoice-table-wrap {
  border: 1px solid #e4ebf5;
  border-radius: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.invoice-lines-table {
  min-width: 640px;
  margin-top: 0;
}

.invoice-table th,
.invoice-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 4px;
  text-align: left;
  vertical-align: top;
}

.invoice-table th {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.invoice-document .invoice-table th {
  border-bottom: 0;
  background: #0b4ba8;
  color: #fff;
  padding: 10px 8px;
  font-size: 9px;
}

.invoice-document .invoice-table td {
  padding: 11px 8px;
}

.invoice-document .invoice-table tbody tr:nth-child(even) {
  background: #f8fbff;
}

.invoice-table .num {
  text-align: right;
  white-space: nowrap;
}

.invoice-line-total {
  color: var(--blue);
  font-weight: 900;
}

.invoice-bottom {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.invoice-note-box {
  border: 1px solid #e4ebf5;
  border-radius: 16px;
  background: #fff;
  padding: 13px;
  min-height: 94px;
}

.invoice-note-box p {
  margin: 8px 0 0;
  color: #5f6f84;
  font-size: 12px;
  line-height: 1.5;
}

.invoice-total-card {
  border-radius: 18px;
  background: var(--blue);
  color: #fff;
  padding: 14px;
  display: grid;
  gap: 9px;
  box-shadow: 0 14px 28px rgba(11, 75, 168, .22);
}

.invoice-total-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 12px;
}

.invoice-total-card span {
  color: #dceaff;
}

.invoice-total-card b {
  white-space: nowrap;
}

.invoice-total-card .grand-total {
  border-top: 1px solid rgba(255, 255, 255, .22);
  padding-top: 10px;
  font-size: 18px;
  font-weight: 900;
}

.invoice-approval {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.invoice-approval-box {
  min-height: 118px;
  border: 1px solid #e4ebf5;
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
}

.invoice-approval-box span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-approval-box img {
  max-height: 78px;
  width: 100%;
  object-fit: contain;
}

.invoice-document-footer {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 11px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.mt-14 {
  margin-top: 14px;
}

@media screen and (max-width: 559px) {
  .invoice-paper {
    border-radius: 18px;
  }

  .invoice-hero {
    padding: 14px;
  }

  .invoice-brand-lockup {
    align-items: flex-start;
  }

  .invoice-brand-lockup b {
    font-size: 20px;
  }

  .invoice-title-box {
    padding: 12px;
  }

  .invoice-title-box strong {
    font-size: 21px;
    overflow-wrap: anywhere;
  }

  .invoice-meta-strip {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .invoice-paper-body {
    padding: 12px;
  }

  .invoice-party {
    border-radius: 16px;
    padding: 14px 12px 12px;
  }

  .invoice-party-label {
    display: grid;
    gap: 3px;
  }

  .invoice-party-label small {
    text-align: left;
  }

  .invoice-table-wrap {
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .invoice-lines-table {
    min-width: 0;
    display: block;
    border-collapse: separate;
    border-spacing: 0;
  }

  .invoice-lines-table thead {
    display: none;
  }

  .invoice-lines-table tbody {
    display: grid;
    gap: 10px;
  }

  .invoice-lines-table tr,
  .invoice-lines-table td {
    display: block;
    width: 100%;
  }

  .invoice-document .invoice-table tbody tr,
  .invoice-document .invoice-table tbody tr:nth-child(even) {
    overflow: hidden;
    border: 1px solid #e4ebf5;
    border-radius: 16px;
    background: #fff;
  }

  .invoice-document .invoice-table td {
    min-height: 42px;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
  }

  .invoice-document .invoice-table td:not(:first-child) {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    text-align: right;
  }

  .invoice-document .invoice-table td:last-child {
    border-bottom: 0;
  }

  .invoice-document .invoice-table td::before {
    content: attr(data-label);
    color: var(--muted);
    flex: 0 0 min(47%, 150px);
    font-size: 10px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
    white-space: normal;
  }

  .invoice-document .invoice-table td:first-child {
    background: #f8fbff;
  }

  .invoice-document .invoice-table td:first-child::before {
    display: block;
    margin-bottom: 5px;
  }

  .invoice-table .num {
    white-space: normal;
  }

  .invoice-line-total {
    font-size: 14px;
  }

  .invoice-total-card div {
    align-items: flex-start;
  }

  .invoice-total-card b {
    white-space: normal;
    text-align: right;
  }

  .invoice-approval {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 560px) {
  .invoice-hero {
    grid-template-columns: minmax(0, 1fr) minmax(175px, .58fr);
    align-items: center;
  }

  .invoice-title-box {
    text-align: right;
  }

  .invoice-meta-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .invoice-parties {
    grid-template-columns: 1fr 1fr;
  }

  .invoice-bottom {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
    align-items: stretch;
  }
}

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  body {
    display: block;
    padding: 0;
    background: #fff;
  }

  .app-shell {
    width: 100%;
    min-height: auto;
    box-shadow: none;
    border-radius: 0;
  }

  .topbar,
  .bottom-nav,
  .toast-stack,
  .modal-wrap,
  .no-print {
    display: none !important;
  }

  .app-main {
    padding: 0;
    background: #fff;
  }

  .invoice-paper {
    border: 1px solid #dfe6f2;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }

  .invoice-hero,
  .invoice-total-card,
  .invoice-document .invoice-table th {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .invoice-hero {
    grid-template-columns: 1fr 240px;
    padding: 16px;
  }

  .invoice-title-box {
    text-align: right;
  }

  .invoice-meta-strip {
    grid-template-columns: repeat(4, 1fr);
    padding: 10px;
  }

  .invoice-paper-body {
    padding: 14px;
  }

  .invoice-parties-modern {
    grid-template-columns: 1fr 1fr;
  }

  .invoice-party {
    border-radius: 8px;
    padding: 12px;
  }

  .invoice-table-wrap {
    overflow: visible;
    border-radius: 8px;
  }

  .invoice-lines-table {
    min-width: 0;
    font-size: 10.5px;
  }

  .invoice-bottom {
    grid-template-columns: 1fr 235px;
  }

  .invoice-note-box,
  .invoice-total-card,
  .invoice-subject {
    border-radius: 8px;
  }

  .statistics-page .performance-card,
  .statistics-page .meta-item,
  .statistics-page .chart-card,
  .statistics-page .bar,
  .statistics-page .horizontal-row i,
  .statistics-page .donut {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .statistics-page .performance-card,
  .statistics-page .chart-card,
  .statistics-page .meta-item {
    box-shadow: none;
    break-inside: avoid;
  }

  .statistics-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .statistics-page .charts-grid {
    grid-template-columns: 1fr 1fr;
  }

  .statistics-page .chart-card:last-child {
    grid-column: 1 / -1;
  }
}

.auth-switch {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.pwa-install {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pwa-install[hidden] {
  display: none;
}

.pwa-install h2 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
  text-align: center;
}

.pwa-install > p {
  margin: 5px auto 12px;
  max-width: 330px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

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

.pwa-install-btn {
  min-width: 0;
  min-height: 46px;
  border: 1px solid #d9e5f5;
  border-radius: 13px;
  padding: 9px 10px;
  background: #f7faff;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease;
}

.pwa-install-btn svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.pwa-install-btn:is(:hover, :focus-visible),
.pwa-install-btn.is-ready,
.pwa-install[data-platform="android"] .pwa-install-btn-android,
.pwa-install[data-platform="ios"] .pwa-install-btn-ios {
  border-color: rgba(8, 104, 242, .38);
  background: var(--soft);
  color: var(--blue);
  outline: 0;
}

.pwa-install-btn:active {
  transform: translateY(1px);
}

.pwa-install > .pwa-install-status {
  margin: 11px 0 0;
  padding: 10px 11px;
  border-radius: 11px;
  background: #eef5ff;
  color: #31567f;
  font-size: 11px;
  text-align: left;
}

@media (max-width: 360px) {
  .pwa-install-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 760px) {
  body.auth-page {
    align-items: flex-start;
  }
}

.inline-link {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
  padding: 0;
}

.alert {
  border-radius: 14px;
  padding: 11px 12px;
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
}

.alert.success {
  background: #eafaf2;
  color: #08683d;
  border: 1px solid #c9f1db;
}

.alert.error {
  background: #fff0f2;
  color: #9d1730;
  border: 1px solid #ffd6dd;
}

.alert.warning {
  background: #fff7e8;
  color: #7a4707;
  border: 1px solid #ffd79b;
}

.modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(4, 20, 43, .42);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  padding: 0;
}

.modal-wrap.open {
  display: flex;
}

.sheet {
  width: min(100%, 480px);
  background: #fff;
  border-radius: 26px 26px 0 0;
  padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .18);
  animation: up .22s ease;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: #dde2ea;
  margin: 0 auto 14px;
}

.sheet h2,
.sheet h3 {
  margin: 0 0 4px;
}

.sheet p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action:first-child {
  grid-column: 1 / -1;
}

.action {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 118px;
  color: var(--ink);
}

.action b {
  display: block;
  margin-top: 9px;
  font-size: 12px;
  text-align: center;
}

.action span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  line-height: 1.35;
  margin-top: 3px;
}

.action svg {
  width: 24px;
  height: 24px;
  color: var(--blue);
  display: block;
  margin: 0 auto;
}

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  width: min(440px, calc(100% - 28px));
  transform: translateX(-50%);
  z-index: 120;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(22, 49, 89, .16);
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  pointer-events: auto;
}

.toast.success {
  border-color: #bdeccd;
}

.toast.error {
  border-color: #ffd1dc;
}

.toast.warning {
  border-color: #ffd79b;
}

@keyframes up {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@media (max-width: 360px) {
  .app-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .record-card {
    flex-wrap: wrap;
  }

  .record-side {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-left: 56px;
  }

  .quick {
    gap: 6px;
  }

  .quick-btn {
    font-size: 9px;
  }

  .welcome {
    grid-template-columns: 1fr 92px;
  }

  .brand img {
    width: 128px;
  }
}

@media (min-width: 700px) {
  body {
    padding: 26px;
    background: #eef2f8;
  }

  body.auth-page {
    padding: 26px;
  }

  .app-shell {
    min-height: calc(100dvh - 52px);
    border-radius: 28px;
  }

  .auth-shell {
    width: min(100%, 440px);
    min-height: auto;
  }

  .bottom-nav {
    border-radius: 0 0 28px 28px;
  }

  .modal-wrap {
    align-items: center;
    padding: 20px;
  }

  .sheet {
    border-radius: 26px;
    max-width: 440px;
  }
}

/* Dashboard timeline */
.activity-timeline {
  display: grid;
  gap: 0;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 58px 30px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 78px;
  position: relative;
}

.timeline-entry:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 30px;
  bottom: 0;
  left: 80px;
  width: 2px;
  background: linear-gradient(180deg, #97b9e8, #dce8f8);
}

.timeline-time {
  padding-top: 3px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.timeline-time strong,
.timeline-time span {
  display: block;
}

.timeline-time strong {
  color: var(--navy);
  font-size: 12px;
}

.timeline-time span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.timeline-node {
  width: 30px;
  height: 30px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px #a9c5eb, 0 5px 14px rgba(11, 75, 168, .18);
  color: #fff;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

.timeline-node svg {
  width: 14px;
  height: 14px;
}

.timeline-card {
  min-width: 0;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid #e7edf6;
  border-radius: 4px 15px 15px 15px;
  background: linear-gradient(145deg, #fff, #f8fbff);
  box-shadow: 0 8px 22px rgba(16, 53, 99, .06);
}

.timeline-card b,
.timeline-card span {
  display: block;
}

.timeline-card b {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.timeline-card span,
.timeline-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.timeline-error_created .timeline-node,
.timeline-error_updated .timeline-node {
  background: var(--danger);
}

.timeline-part_replaced .timeline-node,
.timeline-part_updated .timeline-node {
  background: var(--success);
}

/* Statistics controls and performance chart */
.statistics-controls {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.statistics-period-switcher {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid #dce7f5;
  border-radius: 16px;
  background: #f2f6fb;
}

.statistics-period-btn {
  min-width: 0;
  padding: 9px 4px;
  border-radius: 11px;
  color: #607188;
  font-size: 9px;
  font-weight: 850;
  text-align: center;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.statistics-period-btn:is(:hover, :focus-visible) {
  color: var(--blue);
  outline: 0;
}

.statistics-period-btn.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 6px 16px rgba(11, 75, 168, .12);
}

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

.statistics-actions form {
  display: flex;
}

.statistics-action-btn {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #d5e3f5;
  border-radius: 13px;
  background: #fff;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 850;
  box-shadow: 0 7px 18px rgba(11, 75, 168, .07);
}

.statistics-action-btn:is(:hover, :focus-visible) {
  border-color: rgba(8, 104, 242, .42);
  outline: 0;
}

.statistics-action-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.statistics-action-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.performance-card {
  margin: 14px 0;
  padding: 16px 14px 11px;
  border: 1px solid #dae7f8;
  border-radius: 24px;
  background: linear-gradient(180deg, #edf5ff 0%, #f8fbff 100%);
  box-shadow: 0 16px 34px rgba(11, 75, 168, .08);
  overflow: hidden;
}

.performance-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.performance-head h2,
.performance-head p {
  margin: 0;
}

.performance-head h2 {
  color: var(--navy);
  font-size: 17px;
}

.performance-head p {
  margin-top: 4px;
  color: #6e7f96;
  font-size: 10px;
  line-height: 1.45;
}

.performance-period {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.performance-summary {
  width: max-content;
  max-width: 100%;
  margin: 14px auto -5px;
  padding: 9px 15px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 65, 126, .11);
  text-align: center;
  position: relative;
  z-index: 2;
}

.performance-summary::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.performance-summary > span,
.performance-summary strong {
  display: block;
  position: relative;
  z-index: 1;
}

.performance-summary > span {
  color: #7a899e;
  font-size: 9px;
  font-weight: 700;
}

.performance-summary strong {
  margin-top: 2px;
  color: var(--navy);
  font-size: 19px;
}

.performance-summary small {
  color: #7a899e;
  font-size: 9px;
}

.performance-chart-wrap {
  margin: 0 -10px;
  overflow: hidden;
}

.performance-chart {
  width: 100%;
  height: auto;
  min-height: 170px;
  display: block;
  overflow: visible;
}

.performance-grid-line {
  fill: none;
  stroke: #dce8f7;
  stroke-width: 1;
  stroke-dasharray: 4 7;
}

.performance-area {
  fill: url(#performanceArea);
}

.performance-line {
  fill: none;
  stroke: #0b4f96;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 5px 5px rgba(11, 75, 168, .15));
}

.performance-day-point {
  cursor: pointer;
  outline: none;
}

.performance-hit {
  fill: transparent;
}

.performance-point-ring {
  fill: #fff;
  stroke: #0b4f96;
  stroke-width: 4;
  transition: r .18s ease, stroke .18s ease;
}

.performance-point-core {
  fill: #ff365d;
}

.performance-day-point text {
  fill: #73849b;
  font-size: 20px;
  font-weight: 800;
  transition: fill .18s ease;
}

.performance-day-point:is(:hover, :focus, .active) .performance-point-ring {
  r: 11px;
  stroke: #ff365d;
}

.performance-day-point:is(:hover, :focus, .active) text {
  fill: var(--navy);
}

.performance-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.performance-dialog {
  width: min(calc(100% - 28px), 400px);
  padding: 18px;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(5, 31, 70, .28);
  color: var(--ink);
}

.performance-dialog::backdrop {
  background: rgba(7, 28, 59, .52);
  backdrop-filter: blur(3px);
}

.performance-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.performance-dialog-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.performance-dialog-head h2 {
  margin: 3px 0 0;
  color: var(--navy);
  font-size: 21px;
}

.dialog-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 11px;
  background: #eef4fc;
  color: var(--navy);
  font-size: 23px;
  line-height: 1;
}

.performance-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.performance-detail-grid div {
  min-width: 0;
  padding: 12px 8px;
  border-radius: 15px;
  background: #f3f7fd;
  text-align: center;
}

.performance-detail-grid span,
.performance-detail-grid strong {
  display: block;
}

.performance-detail-grid span {
  min-height: 28px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.performance-detail-grid strong {
  margin-top: 5px;
  color: var(--navy);
  font-size: 22px;
}

.full-btn {
  width: 100%;
}

@media (min-width: 560px) {
  .statistics-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .statistics-actions {
    grid-template-columns: repeat(2, auto);
  }

  .statistics-action-btn {
    width: auto;
    min-width: 146px;
  }

  .statistics-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Work calendar */
.work-calendar {
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(10, 52, 112, .12);
  overflow: hidden;
}

.work-calendar-head {
  min-height: 105px;
  padding: 17px 16px;
  background: linear-gradient(135deg, #0a3d91, #1f5bd8);
  color: #fff;
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  text-align: center;
}

.work-calendar-head h2 {
  margin: 0;
  font-size: 23px;
  text-transform: capitalize;
}

.work-calendar-head span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, .76);
  font-size: 11px;
  font-weight: 800;
}

.calendar-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 25px;
  line-height: 1;
}

.calendar-body {
  padding: 15px 13px 14px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px 4px;
}

.calendar-weekdays {
  margin-bottom: 9px;
}

.calendar-weekdays span {
  color: #8895a8;
  font-size: 9px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.calendar-blank,
.calendar-day {
  aspect-ratio: 1;
}

.calendar-day {
  width: min(100%, 36px);
  margin: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.calendar-day.worked {
  background: #0b45a5;
  color: #fff;
  box-shadow: 0 6px 13px rgba(11, 69, 165, .24);
}

.calendar-day.not-worked {
  background: #e4efff;
  color: #4871a7;
}

.calendar-day.today {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #ff416c;
}

.calendar-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.calendar-legend span {
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 800;
}

.calendar-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-worked {
  background: #0b45a5;
}

.legend-not-worked {
  background: #d9e9ff;
}

.calendar-detail-head {
  margin-top: 20px;
}

/* Admin and user notifications */
.notification-dot {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ff294f;
  box-shadow: 0 0 0 2px rgba(255, 41, 79, .13);
}

.admin-title-row,
.notification-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.admin-shield {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--navy), var(--blue-2));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 24px rgba(11, 75, 168, .2);
}

.admin-shield svg {
  width: 24px;
  height: 24px;
}

.admin-title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.admin-menu-toggle {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #d8e4f3;
  border-radius: 16px;
  background: #fff;
  color: var(--blue);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px rgba(11, 75, 168, .09);
}

.admin-menu-toggle:is(:hover, :focus-visible) {
  border-color: rgba(8, 104, 242, .42);
  outline: 0;
}

.admin-menu-toggle svg {
  width: 23px;
  height: 23px;
}

.admin-menu-dialog {
  inset: 0 0 0 auto;
  width: min(calc(100% - 34px), 350px);
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 28px 0 0 28px;
  background: #f7faff;
  color: var(--ink);
  box-shadow: -24px 0 60px rgba(5, 31, 70, .2);
}

.admin-menu-dialog::backdrop {
  background: rgba(7, 28, 59, .5);
  backdrop-filter: blur(3px);
}

.admin-menu-panel {
  min-height: 100%;
  padding: 22px 17px;
}

.admin-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 0 2px 17px;
  border-bottom: 1px solid #dce6f3;
}

.admin-menu-head span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.admin-menu-head h2 {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: 22px;
}

.admin-menu-links {
  display: grid;
  gap: 9px;
  margin-top: 17px;
}

.admin-menu-links > a,
.admin-menu-future {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce6f3;
  border-radius: 16px;
  background: #fff;
  color: #5e7087;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
}

.admin-menu-links > a.active {
  border-color: transparent;
  background: linear-gradient(135deg, #0b4ba8, #0868f2);
  color: #fff;
  box-shadow: 0 12px 24px rgba(11, 75, 168, .2);
}

.admin-menu-links svg,
.admin-menu-future svg {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 12px;
  background: #edf4fd;
  color: var(--blue);
}

.admin-menu-links > a.active svg {
  background: rgba(255, 255, 255, .15);
  color: #fff;
}

.admin-menu-links b,
.admin-menu-links small,
.admin-menu-future b,
.admin-menu-future small {
  display: block;
}

.admin-menu-links b,
.admin-menu-future b {
  font-size: 12px;
}

.admin-menu-links small,
.admin-menu-future small {
  margin-top: 3px;
  color: #8391a3;
  font-size: 9px;
  line-height: 1.4;
}

.admin-menu-links > a.active small {
  color: rgba(255, 255, 255, .73);
}

.admin-menu-future {
  margin-top: 22px;
  border-style: dashed;
  background: transparent;
}

.admin-menu-future svg {
  background: #eef2f7;
  color: #8a98aa;
}

.admin-overview-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 15px;
}

.admin-overview-kpi {
  min-width: 0;
  min-height: 96px;
  padding: 13px;
  border: 1px solid #dce6f3;
  border-radius: 18px;
  background: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  box-shadow: 0 10px 24px rgba(11, 75, 168, .06);
}

.admin-overview-kpi span,
.admin-overview-kpi strong {
  display: block;
}

.admin-overview-kpi span {
  min-height: 27px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.admin-overview-kpi strong {
  margin-top: 6px;
  color: var(--navy);
  font-size: 22px;
}

.admin-overview-kpi > svg {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 8px;
  border-radius: 11px;
  background: #eaf2fd;
  color: var(--blue);
}

.admin-overview-kpi.green > svg { background: #e9f8f0; color: #159b61; }
.admin-overview-kpi.violet > svg { background: #f0edff; color: #684bd1; }
.admin-overview-kpi.orange > svg { background: #fff3e4; color: #ca7411; }
.admin-overview-kpi.red > svg { background: #fff0f3; color: #d83b53; }

.admin-overview-charts,
.admin-overview-tables {
  display: grid;
  gap: 11px;
  margin-top: 12px;
}

.admin-overview-card {
  min-width: 0;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(11, 75, 168, .05);
}

.admin-overview-charts .admin-overview-card,
.admin-overview-tables .admin-overview-card {
  margin-top: 0;
}

.admin-overview-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-overview-card-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--blue);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-overview-card-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}

.admin-overview-card-head > b {
  min-width: 34px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #edf4fd;
  color: var(--blue);
  font-size: 12px;
  text-align: center;
}

.admin-column-chart {
  height: 180px;
  margin-top: 13px;
  padding: 8px 3px 0;
  border-bottom: 1px solid #dce5f0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  align-items: end;
  background-image: linear-gradient(to bottom, transparent 32%, #edf2f8 33%, transparent 34%, transparent 65%, #edf2f8 66%, transparent 67%);
}

.admin-column-chart.activity {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.admin-column-chart > div {
  min-width: 0;
  height: 171px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 31px;
  align-items: end;
  justify-items: center;
}

.admin-column-chart > div > span {
  width: min(25px, 64%);
  height: var(--height);
  align-self: end;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #3485f5, #0b4ba8);
  box-shadow: 0 6px 12px rgba(11, 75, 168, .16);
}

.admin-column-chart.activity > div > span {
  background: linear-gradient(180deg, #27b474, #0b7f51);
  box-shadow: 0 6px 12px rgba(11, 127, 81, .15);
}

.admin-column-chart small {
  min-width: 0;
  padding-top: 7px;
  color: #6f8096;
  font-size: 8px;
  font-weight: 850;
  text-align: center;
}

.admin-column-chart small i {
  display: block;
  margin-top: 1px;
  color: #a0abba;
  font-size: 7px;
  font-style: normal;
}

.admin-user-ranking,
.admin-compact-list,
.admin-activity-feed {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.admin-user-rank-row {
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  background: #f7f9fc;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.admin-rank-number,
.admin-user-initials {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  background: #e7f0fd;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
}

.admin-user-copy,
.admin-user-copy b,
.admin-user-copy small {
  min-width: 0;
  display: block;
}

.admin-user-copy b {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-copy small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-rank-row > strong {
  color: var(--blue);
  font-size: 17px;
  text-align: right;
}

.admin-user-rank-row > strong small {
  display: block;
  color: var(--muted);
  font-size: 7px;
  font-weight: 750;
}

.admin-user-work {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-user-work span {
  padding: 4px 6px;
  border-radius: 8px;
  background: #fff;
  color: #77869a;
  font-size: 7px;
}

.admin-user-work b {
  color: var(--navy);
}

.admin-compact-list > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f6;
}

.admin-compact-list > div:last-child {
  border-bottom: 0;
}

.admin-user-initials.new {
  background: #e9f8f0;
  color: #118153;
}

.admin-compact-list p,
.admin-compact-list b,
.admin-compact-list small {
  min-width: 0;
  display: block;
  margin: 0;
}

.admin-compact-list b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-compact-list small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-compact-list time,
.admin-activity-feed time {
  color: #7f8da0;
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}

.admin-activity-feed article {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid #edf1f6;
}

.admin-activity-feed article:last-child {
  border-bottom: 0;
}

.admin-activity-feed article > i {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue-2);
  box-shadow: 0 0 0 2px #cfe0f8;
}

.admin-activity-feed b,
.admin-activity-feed span,
.admin-activity-feed small {
  display: block;
}

.admin-activity-feed b {
  color: var(--ink);
  font-size: 10px;
}

.admin-activity-feed span {
  margin-top: 2px;
  color: #63748a;
  font-size: 8px;
}

.admin-activity-feed small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.admin-empty-state {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 13px;
  background: #f5f8fc;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

@media (min-width: 700px) {
  .admin-overview-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-overview-charts,
  .admin-overview-tables {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-rank-row {
    grid-template-columns: 31px minmax(135px, 1fr) minmax(210px, auto) 58px;
  }

  .admin-user-work {
    grid-column: auto;
    justify-content: flex-end;
  }
}

.admin-notification-form {
  margin-top: 14px;
}

.push-admin-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.push-admin-status span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f1f5fa;
  color: #65758b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 800;
}

.push-admin-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d83b53;
}

.push-admin-status .ready {
  background: #e8f8f0;
  color: #087343;
}

.push-admin-status .ready i {
  background: #159b61;
}

.admin-form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-form-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}

.admin-form-heading a {
  color: var(--danger);
  font-size: 10px;
  font-weight: 800;
}

.edit-recipient-summary {
  padding: 10px 12px;
  border-radius: 13px;
  background: #f2f6fc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.edit-recipient-summary span {
  color: var(--muted);
  font-size: 10px;
}

.edit-recipient-summary b {
  color: var(--navy);
  font-size: 11px;
}

.notification-edit-image {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  padding: 9px;
  border-radius: 13px;
  background: #f3f7fc;
}

.notification-edit-image img {
  width: 72px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
}

.notification-edit-image label {
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 800;
}

.field-help {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.admin-message-history,
.notification-list {
  display: grid;
  gap: 10px;
}

.admin-message-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.admin-message-card.has-image {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.admin-message-card > img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.admin-message-card b,
.admin-message-card span {
  display: block;
}

.admin-message-card b {
  color: var(--ink);
  font-size: 12px;
}

.admin-message-card p {
  margin: 4px 0;
  color: #596a81;
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-message-card span {
  color: var(--muted);
  font-size: 9px;
}

.admin-message-actions {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.admin-message-actions form {
  margin: 0;
}

.admin-message-action {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.admin-message-action svg {
  width: 16px;
  height: 16px;
}

.admin-message-action.edit {
  background: #eaf2fd;
  color: var(--blue);
}

.admin-message-action.delete {
  background: #fff0f2;
  color: var(--danger);
}

.admin-message-action:is(:hover, :focus-visible) {
  filter: brightness(.96);
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.notification-page-head form {
  flex: 0 0 auto;
}

.notification-page-head .small-link {
  max-width: 130px;
  line-height: 1.25;
}

.push-prompt {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  margin: 14px 0;
  padding: 13px;
  border-radius: 18px;
  background: linear-gradient(135deg, #e8f2ff, #f5f9ff);
}

.push-prompt-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff;
  color: var(--blue);
  display: grid;
  place-items: center;
}

.push-prompt-icon svg {
  width: 21px;
  height: 21px;
}

.push-prompt h2,
.push-prompt p {
  margin: 0;
}

.push-prompt h2 {
  color: var(--navy);
  font-size: 13px;
}

.push-prompt p {
  margin-top: 3px;
  color: #66778e;
  font-size: 9px;
  line-height: 1.45;
}

.push-enable-button,
.push-unavailable {
  grid-column: 1 / -1;
}

.push-enable-button {
  width: 100%;
}

.push-enable-button.enabled {
  border-color: #b9e8d2;
  background: #e8f8f0;
  color: #087343;
}

.push-unavailable {
  color: #7d899a;
  font-size: 9px;
  text-align: center;
}

.notification-card {
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
  overflow: hidden;
  position: relative;
}

.notification-card.unread {
  border-color: #bdd5f5;
  box-shadow: 0 10px 26px rgba(11, 75, 168, .08);
}

.notification-card-dot {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ff294f;
}

.notification-image {
  width: 100%;
  max-height: 260px;
  display: block;
  object-fit: cover;
}

.notification-copy {
  padding: 13px;
}

.notification-meta {
  padding-right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.notification-copy h2 {
  margin: 6px 0 0;
  color: var(--navy);
  font-size: 15px;
}

.notification-copy p {
  margin: 7px 0 0;
  color: #52647b;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.notification-read-btn {
  margin-top: 10px;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  background: #eaf2fd;
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
}

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

.notification-actions form {
  margin: 0;
  flex: 0 0 auto;
}

@media (max-width: 360px) {
  .topbar-actions {
    gap: 4px;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  .performance-head {
    display: block;
  }

  .performance-period {
    display: inline-block;
    margin-top: 7px;
  }

  .timeline-entry {
    grid-template-columns: 51px 26px minmax(0, 1fr);
    gap: 6px;
  }

  .timeline-entry:not(:last-child)::after {
    left: 69px;
  }

  .timeline-node {
    width: 26px;
    height: 26px;
  }

  .calendar-weekdays,
  .calendar-grid {
    column-gap: 2px;
  }
}

/* Project context and management */
.project-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;background:#edf4ff;border:1px solid #d7e5fa;border-radius:16px;padding:12px;margin:0 0 22px}
.project-switcher{display:flex;align-items:center;gap:10px;flex:1;min-width:0}.project-switcher label{font-size:12px;font-weight:700;color:#31537a}.project-switcher .form-control{min-width:0;flex:1;width:auto}
.project-switcher button{border:0;background:transparent;cursor:pointer}.project-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}.project-card h2{font-size:20px;margin:10px 0;overflow-wrap:anywhere}.project-card h2 a{color:#073275;text-decoration:none}.project-card p{color:#697c94;font-size:13px}.project-status{display:inline-block;padding:5px 10px;border-radius:20px;background:#eaf3ff;color:#0b4ba8;font-size:12px;font-weight:700}.project-links,.project-periods{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}.project-periods a{padding:7px 12px;border-radius:14px;background:#f0f5fc}.project-periods .active{background:#0b4ba8;color:white}.project-import-row{display:flex;gap:12px;align-items:flex-start;padding:14px 0;border-bottom:1px solid #e6edf7}.project-import-row input{margin-top:4px}.project-import-row span{display:block;color:#64748b;font-size:13px}
.project-delete-btn {
  background: #d32f45;
  color: #fff;
  transition: background-color .18s ease, box-shadow .18s ease;
}

.project-delete-btn:hover,
.project-delete-btn:focus-visible {
  background: #b52236;
  color: #fff;
  box-shadow: 0 4px 12px rgba(181, 34, 54, .2);
}

.project-delete-btn:focus-visible {
  outline: 2px solid #b52236;
  outline-offset: 3px;
}

.project-links .primary-btn,
.project-links .secondary-btn {
  transition: background-color .18s ease, box-shadow .18s ease;
}

.project-links .secondary-btn {
  background: #e3efff;
}

.project-links .secondary-btn:hover,
.project-links .secondary-btn:focus-visible {
  background: #cfe2ff;
}

.project-links .primary-btn:hover,
.project-links .primary-btn:focus-visible {
  background: var(--navy);
}

.project-links .primary-btn:hover,
.project-links .primary-btn:focus-visible,
.project-links .secondary-btn:hover,
.project-links .secondary-btn:focus-visible {
  box-shadow: 0 4px 12px rgba(11, 75, 168, .16);
}

.project-links .primary-btn:focus-visible,
.project-links .secondary-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .project-delete-btn,
  .project-links .primary-btn,
  .project-links .secondary-btn {
    transition: none;
  }
}

@media(max-width:540px){.project-toolbar{flex-wrap:wrap}.project-switcher{width:100%;flex-wrap:wrap}.project-switcher label{width:100%}.project-switcher .form-control{font-size:13px}.project-grid{grid-template-columns:1fr}}
