:root {
  --bg: #f6f8fb;
  --text: #1c2430;
  --card: #ffffff;
  --border: #dbe2ec;
  --top-bar-height: 88px;
}

* {
  box-sizing: border-box;
}

html {
  overscroll-behavior: none;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: linear-gradient(150deg, #f8fafc 0%, #eef3f9 100%);
  min-height: 100vh;
  overscroll-behavior: none;
}

body:not(.login-page):not(.dashboard-page) {
  background:
    linear-gradient(180deg, rgba(42, 123, 202, 0.34) 0, rgba(104, 166, 226, 0.2) 12vh, rgba(238, 243, 249, 0) 28vh),
    linear-gradient(150deg, #f8fafc 0%, #eef3f9 100%);
}

.login-page {
  min-height: 100vh;
  overflow: hidden;
  background: #10141b;
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-video,
.login-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.login-video {
  object-fit: cover;
  z-index: 0;
}

.login-overlay {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(11, 15, 22, 0.78), rgba(11, 15, 22, 0.36)),
    linear-gradient(180deg, rgba(11, 15, 22, 0.28), rgba(11, 15, 22, 0.72));
}

.login-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(13, 18, 25, 0.574);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
  color: #ffffff;
}

.login-logo {
  display: block;
  width: min(260px, 100%);
  height: auto;
  margin: 0 auto 30px;
  filter: brightness(1.08) contrast(1.08);
}

.login-panel h1 {
  margin: 0 0 24px;
  font-size: 1.9rem;
  line-height: 1.1;
}

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

.login-form label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.login-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1rem;
  padding: 0 14px;
  outline: none;
}

.login-form input:focus {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

.password-field {
  position: relative;
  width: 100%;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  opacity: 0.68;
  transform: translateY(-50%);
}

.password-toggle-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.password-toggle-btn:hover,
.password-toggle-btn[aria-pressed="true"] {
  opacity: 1;
}

.password-toggle-btn:focus-visible {
  outline: 3px solid rgba(11, 92, 171, 0.2);
  outline-offset: 1px;
}

.password-toggle-btn:disabled {
  cursor: default;
  opacity: 0.32;
}

.login-form .password-toggle-btn {
  color: rgba(255, 255, 255, 0.82);
}

.settings-form .password-toggle-btn {
  color: #64748b;
}

.login-form .login-stay-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.84);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.login-form .login-stay-row input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  accent-color: #ffffff;
  cursor: pointer;
}

.login-form .login-stay-row input:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

.login-submit {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  margin-top: 12px;
  background: #ffffff;
  color: #10141b;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.login-status {
  min-height: 1.2em;
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  padding: 0 42px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(90deg, rgba(16, 20, 27, 0.98), rgba(35, 42, 52, 0.96));
  box-shadow: 0 10px 28px rgba(28, 36, 48, 0.18);
}

.brand-wrap {
  display: flex;
  align-items: center;
}

.logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.08) contrast(1.08);
}

.header-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 34px;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  min-height: 88px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 0;
  padding: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: color 120ms ease;
}

.nav-menu-trigger {
  gap: 7px;
}

.nav-caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 140ms ease;
}

.nav-btn:hover {
  color: #ffffff;
}

.nav-btn.is-active {
  color: #ffffff;
  box-shadow: inset 0 -2px 0 #ffffff;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% - 12px);
  right: -18px;
  z-index: 30;
  width: 220px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(58, 58, 58, 0.5);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 22px 42px rgba(10, 12, 16, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.nav-dropdown.is-open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown.is-open .nav-caret,
.nav-dropdown:hover .nav-caret,
.nav-dropdown:focus-within .nav-caret {
  transform: translateY(2px) rotate(225deg);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  padding: 0 14px;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 650;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}

.nav-dropdown-item:hover,
.nav-dropdown-item:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  outline: none;
  transform: translateX(2px);
}

.download-main {
  position: relative;
  min-height: calc(100vh - 88px);
  overflow: hidden;
  isolation: isolate;
  padding: 52px max(22px, calc((100vw - 1120px) / 2)) 70px;
}

.download-slideshow {
  position: fixed;
  top: 88px;
  right: 0;
  bottom: 0;
  left: 0;
}

.download-slideshow::after {
  background:
    linear-gradient(90deg, rgba(246, 248, 251, 0.92), rgba(246, 248, 251, 0.76)),
    linear-gradient(180deg, rgba(225, 238, 252, 0.7), rgba(246, 248, 251, 0.9));
}

.download-hero {
  position: relative;
  z-index: 1;
  padding: 28px 0 36px;
}

.download-kicker {
  display: block;
  margin-bottom: 10px;
  color: #d9ecff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.42);
}

.download-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.02;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.38);
}

.download-hero p {
  max-width: 650px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  line-height: 1.6;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
}

.download-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  align-items: start;
  padding-top: 16px;
}

.download-option {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.download-option > .appstore-button,
.download-option > .brutalist-button {
  justify-self: center;
}

.download-option h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 1.55rem;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.44);
}

.download-option p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.5;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.42);
}

.download-note {
  font-size: 0.92rem;
}

.appstore-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 245px);
  padding: 10px 12px;
  border: 3px solid rgb(189, 189, 189);
  background-color: rgb(15, 15, 15);
  border-radius: 15px;
  gap: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 0 100px -30px rgb(255, 255, 255);
}

.appstore-button svg {
  width: 45px;
  flex: 0 0 auto;
}

.appstore-button svg path {
  fill: white;
  transition: all 0.3s;
}

.store-button-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: white;
  transition: all 0.3s;
}

.store-top-text {
  font-size: 13px;
  font-weight: 600;
}

.store-bottom-text {
  font-size: 24px;
  font-weight: 600;
}

.appstore-button:hover {
  background-color: rgb(236, 236, 236);
  border-color: rgb(138, 138, 138);
}

.appstore-button:hover .store-button-text {
  color: black;
}

.appstore-button:hover svg path {
  fill: black;
}

.brutalist-button {
  display: flex;
  align-items: center;
  width: 169px;
  height: 60px;
  background-color: #000;
  color: #fff;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-weight: bold;
  border: 3px solid #fff;
  outline: 3px solid #000;
  box-shadow: 6px 6px 0 #00a4ef;
  transition: all 0.1s ease-out;
  padding: 0 15px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.brutalist-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  z-index: 1;
  opacity: 0;
  transition: none;
}

@keyframes download-shine-slide {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

.brutalist-button:hover::before {
  opacity: 1;
  animation: download-shine-slide 2s infinite;
}

.brutalist-button:hover {
  transform: translate(-4px, -4px);
  box-shadow: 10px 10px 0 #000;
  background-color: #000;
  color: #fff;
}

.brutalist-button:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 #00a4ef;
  background-color: #fff;
  color: #000;
  border-color: #000;
}

.ms-logo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  width: 26px;
  height: 26px;
  margin-right: 8px;
  flex-shrink: 0;
  transition: transform 0.2s ease-out;
  position: relative;
  z-index: 1;
}

.brutalist-button:hover .ms-logo {
  transform: rotate(-10deg) scale(1.1);
}

.brutalist-button:active .ms-logo {
  transform: rotate(10deg) scale(0.9);
}

.ms-logo-square {
  width: 100%;
  height: 100%;
}

.ms-logo-square:nth-child(1) {
  background-color: #f25022;
}

.ms-logo-square:nth-child(2) {
  background-color: #7fba00;
}

.ms-logo-square:nth-child(3) {
  background-color: #00a4ef;
}

.ms-logo-square:nth-child(4) {
  background-color: #ffb900;
}

.brutalist-button-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  transition: transform 0.2s ease-out;
  position: relative;
  z-index: 1;
}

.brutalist-button:hover .brutalist-button-text {
  transform: skew(-5deg);
}

.brutalist-button:active .brutalist-button-text {
  transform: skew(5deg);
}

.brutalist-button-text span:first-child {
  font-size: 11px;
  text-transform: uppercase;
}

.brutalist-button-text span:last-child {
  font-size: 16px;
  text-transform: uppercase;
}

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

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.mobile-menu-toggle span + span {
  margin-top: 5px;
}

body.mobile-menu-open {
  overflow: hidden;
}

body.mobile-menu-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 18;
  background: rgba(12, 16, 22, 0.46);
}

body.mobile-menu-animating .header-nav {
  transition: transform 180ms ease;
}

@media (max-width: 1100px) {
  .top-bar {
    --top-bar-height: 82px;
    height: 82px;
    gap: 18px;
    padding: 0 18px;
  }

  .logo {
    height: 48px;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 25;
    width: min(82vw, 320px);
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 92px 28px 28px;
    background: linear-gradient(180deg, rgba(16, 20, 27, 0.98), rgba(35, 42, 52, 0.98));
    box-shadow: -20px 0 46px rgba(12, 16, 22, 0.28);
    transform: translateX(100%);
    transition: none;
  }

  .header-nav.is-open {
    transform: translateX(0);
  }

  .nav-btn {
    min-height: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.78rem;
    padding: 0;
  }

  .nav-btn.is-active {
    box-shadow: none;
  }

  .nav-dropdown {
    display: block;
  }

  .nav-menu-trigger {
    width: 100%;
    justify-content: space-between;
  }

  .nav-dropdown-menu {
    position: static;
    width: 100%;
    margin: 0 0 12px;
    padding: 8px;
    border-radius: 1px;
    background: rgba(69, 69, 69, 0.241);
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nav-dropdown:not(.is-open) .nav-dropdown-menu {
    display: none;
  }

  .nav-dropdown-item {
    min-height: 42px;
    font-size: 0.9rem;
  }

  .mobile-menu-toggle {
    position: relative;
    z-index: 26;
    display: inline-flex;
    margin-left: auto;
  }

  .download-main {
    padding-top: 30px;
  }

  .download-slideshow {
    top: 82px;
  }

  .download-grid {
    grid-template-columns: 1fr;
    gap: 42px;
  }
}

@media (max-width: 560px) {
  .login-shell {
    align-items: end;
    padding: 18px;
  }

  .login-panel {
    padding: 26px;
  }

  .login-logo {
    width: min(230px, 100%);
    margin-bottom: 24px;
  }

  .download-hero {
    padding-top: 16px;
  }

}

.home-main {
  max-width: 900px;
  margin: 48px auto;
  padding: 0 20px;
}

.home-main h1 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.home-main p {
  margin: 0;
  font-size: 1.05rem;
}

.dashboard-main {
  max-width: none;
  min-height: calc(100vh - 184px);
  margin: 48px;
  padding: 0;
}

.dashboard-calendar-shell {
  position: relative;
  min-height: calc(100vh - 184px);
  display: grid;
  grid-template-columns: minmax(340px, 520px) minmax(520px, 700px);
  align-items: start;
  justify-content: center;
  gap: 46px;
  overflow: hidden;
  border-radius: 8px;
  padding: 64px;
  box-shadow: 0 24px 60px rgba(54, 54, 54, 0.18);
  isolation: isolate;
}

.dashboard-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #10141b;
}

.dashboard-slideshow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  opacity: 0.42;
  transform: translateX(-8%);
  transition: opacity 700ms ease, transform 900ms ease;
}

.dashboard-slideshow.is-ready::before {
  opacity: 0;
  transform: translateX(8%);
}

.dashboard-slideshow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(10, 14, 20, 0.72), rgba(10, 14, 20, 0.28)),
    linear-gradient(180deg, rgba(10, 14, 20, 0.16), rgba(10, 14, 20, 0.52));
}

.dashboard-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: blur(16px);
  transform: scale(1.055);
  transition:
    opacity 1100ms ease,
    filter 1300ms ease,
    transform 5200ms ease;
}

.dashboard-slide.is-active {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

.gmail-widget,
.attached-docs-widget,
.calendar-widget {
  position: relative;
  z-index: 1;
}

.gmail-widget {
  position: absolute;
  left: 64px;
  bottom: 64px;
  width: min(360px, calc(100% - 128px));
  display: grid;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 8px;
  background: rgba(66, 66, 66, 0.318);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 22px;
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  cursor: pointer;
}

.gmail-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gmail-widget-header span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.gmail-widget-header h2 {
  margin: 3px 0 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.gmail-connect-btn {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  padding: 0 14px;
}

.gmail-connect-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.gmail-message-list {
  display: grid;
  gap: 10px;
}

.gmail-status {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.45;
}

.gmail-message-item {
  display: grid;
  gap: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 10px;
}

.gmail-message-item strong,
.gmail-message-item span,
.gmail-message-item p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmail-message-item strong {
  font-size: 0.92rem;
}

.gmail-message-item span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 800;
}

.gmail-message-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
}

.attached-docs-widget {
  width: min(100%, 520px);
  min-width: 0;
  min-height: 596px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 8px;
  background: rgba(66, 66, 66, 0.318);
  box-shadow: 0 28px 54px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #ffffff;
  padding: 34px 32px 36px;
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.attached-docs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.attached-docs-header span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.attached-docs-header h2 {
  margin: 6px 0 0;
  font-size: 2.2rem;
  line-height: 1.1;
}

.attached-docs-header strong {
  min-width: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 244, 223, 0.95);
  color: #7c4700;
  font-size: 1.05rem;
  font-weight: 950;
}

.attached-docs-list {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.attached-docs-status {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.45;
}

.attached-doc-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 14px;
}

.attached-doc-item strong,
.attached-doc-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attached-doc-item strong {
  font-size: 1.08rem;
}

.attached-doc-item span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 800;
}

.attached-doc-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.attached-doc-mark-sent,
.attached-doc-open,
.attached-docs-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  padding: 0 12px;
}

.attached-doc-mark-sent:hover,
.attached-doc-open:hover,
.attached-docs-link:hover {
  background: rgba(255, 255, 255, 0.26);
}

.attached-doc-mark-sent:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.attached-docs-link {
  justify-self: start;
}

.calendar-widget {
  width: min(100%, 700px);
  min-width: 0;
  min-height: 596px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 8px;
  background: rgba(66, 66, 66, 0.318);
  box-shadow: 0 28px 54px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #ffffffb7;
  padding: 34px 32px 36px;
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.calendar-widget button,
.calendar-widget input,
.calendar-widget textarea,
.calendar-widget select {
  user-select: auto;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.calendar-header h2 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.calendar-controls {
  display: inline-grid;
  grid-template-columns: 48px minmax(98px, auto) 48px;
  align-items: center;
  gap: 12px;
}

.calendar-nav-btn,
.calendar-today-btn {
  border: 0;
  background: rgba(88, 88, 88, 0.124);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  color: #ffffffda;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 140ms ease, transform 140ms ease;
}

.calendar-nav-btn {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 1.85rem;
  line-height: 1;
}

.calendar-today-btn {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 26px;
  font-size: 1.08rem;
}

.calendar-nav-btn:hover,
.calendar-today-btn:hover {
  background: rgba(118, 118, 118, 0.107);
  transform: translateY(-1px);
}

.calendar-nav-btn:focus-visible,
.calendar-today-btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.136);
  outline-offset: 3px;
}

.calendar-divider {
  height: 1px;
  margin: 30px 0 22px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 1px 0 rgba(94, 94, 94, 0.244);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

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

.calendar-weekdays span {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  font-weight: 900;
  text-align: center;
}

.calendar-days {
  grid-auto-rows: 64px;
  row-gap: 4px;
}

.calendar-day {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 750;
  line-height: 1;
  position: relative;
}

.calendar-day-button {
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.calendar-day-button:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.calendar-day-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.34);
  outline-offset: 2px;
}

.calendar-day.is-muted {
  color: rgba(255, 255, 255, 0.32);
}

.calendar-day.is-today {
  width: 52px;
  height: 52px;
  place-self: center;
  background: rgba(255, 255, 255, 0.9);
  color: #32323298;
  box-shadow: 0 12px 26px rgba(30, 72, 104, 0.16);
}

.calendar-event-dots {
  position: absolute;
  bottom: 7px;
  left: 50%;
  display: flex;
  max-width: 54px;
  gap: 3px;
  transform: translateX(-50%);
}

.calendar-event-dot {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: var(--event-dot-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.calendar-expiration-dot {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: #e11d48;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(120, 16, 38, 0.34);
}

.calendar-event-modal[hidden]:not(.is-closing) {
  display: none;
}

.calendar-event-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.calendar-event-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.calendar-event-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 18, 0.54);
}

.calendar-event-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(88vh, 720px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(48, 56, 68, 0.58);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 22px;
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.calendar-event-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.calendar-event-header span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-event-header h2 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

.calendar-event-view {
  min-height: 390px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
}

.calendar-event-view[hidden],
.calendar-event-form[hidden] {
  display: none;
}

.calendar-event-form {
  min-height: 390px;
  display: grid;
  gap: 14px;
}

.calendar-event-form label {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  font-weight: 800;
}

.calendar-event-form input,
.calendar-event-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font: inherit;
  padding: 11px 12px;
  outline: none;
}

.calendar-event-form textarea {
  resize: vertical;
}

.calendar-event-form input:focus,
.calendar-event-form textarea:focus {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.calendar-color-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  border: 0;
  padding: 0;
}

.calendar-color-fieldset legend {
  width: 100%;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  font-weight: 800;
}

.calendar-color-fieldset label {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: var(--event-color);
  cursor: pointer;
}

.calendar-color-fieldset input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.calendar-color-fieldset span {
  width: 1px;
  height: 1px;
  overflow: hidden;
  position: absolute;
}

.calendar-color-fieldset label:has(input:checked) {
  border-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16);
}

.calendar-event-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.calendar-event-list[hidden] {
  display: none;
}

.calendar-event-empty {
  align-self: center;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  font-weight: 850;
  text-align: center;
}

.calendar-event-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 9px 10px;
}

.calendar-event-item::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--event-dot-color);
}

.calendar-expiration-item {
  grid-template-columns: 26px 1fr;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(225, 29, 72, 0.17);
}

.calendar-expiration-item::before {
  content: "!";
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  background: #e11d48;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
}

.calendar-event-item strong {
  display: block;
  font-size: 0.92rem;
}

.calendar-event-item span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 800;
}

.calendar-event-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0;
  cursor: pointer;
}

.calendar-event-delete svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.calendar-add-event-btn {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 30px rgba(0, 0, 0, 0.18);
  transition: background 140ms ease, transform 140ms ease;
}

.calendar-add-event-btn span {
  font-size: 2.15rem;
  font-weight: 650;
  line-height: 0.8;
  transform: translateY(-1px);
}

.calendar-add-event-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.calendar-add-event-btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.28);
  outline-offset: 3px;
}

.calendar-event-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.calendar-event-close,
.calendar-event-submit {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  padding: 9px 12px;
  cursor: pointer;
}

.calendar-event-close {
  background: rgba(255, 255, 255, 0.1);
}

.calendar-event-submit {
  background: rgba(255, 255, 255, 0.24);
}

.settings-main {
  max-width: 1040px;
  margin: 48px auto;
  padding: 0 20px 48px;
}

.settings-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.settings-page-header h1 {
  margin: 0 0 8px;
  font-size: 2.1rem;
}

.settings-page-header p {
  margin: 0;
  color: #64748b;
  font-weight: 650;
}

.settings-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 22px 54px rgba(54, 54, 54, 0.12);
  overflow: hidden;
}

.settings-panel + .settings-panel {
  margin-top: 22px;
}

.settings-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(248, 250, 252, 0.84);
  padding: 12px;
}

.settings-tab {
  min-height: 40px;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  color: #3b4653;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  padding: 0 14px;
}

.settings-tab.is-active {
  border-color: #0b5cab;
  background: #0b5cab;
  color: #ffffff;
}

.settings-form {
  display: grid;
  gap: 22px;
  padding: 24px;
}

.settings-section {
  display: grid;
  gap: 22px;
  padding: 24px;
}

.settings-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settings-panel-header h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.settings-panel-header p {
  margin: 0;
  color: #64748b;
  font-weight: 650;
}

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

.settings-users-table-wrap {
  overflow-x: auto;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
}

.settings-users-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  background: #ffffff;
}

.settings-users-table th,
.settings-users-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5edf5;
  text-align: left;
  vertical-align: middle;
}

.settings-users-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-users-table tbody tr:last-child td {
  border-bottom: 0;
}

.settings-users-table strong {
  display: block;
  margin-bottom: 3px;
  color: #172033;
}

.settings-users-table span {
  color: #64748b;
  font-weight: 700;
}

.settings-role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #eaf4ff;
  color: #0b5cab !important;
  padding: 0 10px;
  font-size: 0.82rem;
}

.account-main {
  max-width: 1060px;
  margin-top: 54px;
}

.account-panel {
  position: relative;
  min-height: 520px;
  overflow: visible;
}

.account-panel .settings-tabs {
  min-height: 64px;
  padding-right: 230px;
}

.account-panel .settings-form {
  padding: 26px 26px 36px;
}

.account-panel .settings-panel-header {
  padding-right: 190px;
}

.account-avatar-wrap {
  position: absolute;
  top: -96px;
  right: 48px;
  z-index: 2;
  width: 190px;
  height: 190px;
  pointer-events: none;
}

.account-avatar {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #7fb2df, #4b82cf);
}

.account-avatar-head {
  position: absolute;
  top: 36px;
  left: 50%;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #d8dee7);
  transform: translateX(-50%);
}

.account-avatar-body {
  position: absolute;
  right: 30px;
  bottom: -8px;
  left: 30px;
  height: 88px;
  border-radius: 52% 52% 42% 42%;
  background: linear-gradient(145deg, #ffffff, #d8dee7);
}

.account-avatar-edit {
  position: absolute;
  top: 48px;
  right: 188px;
  z-index: 3;
  box-shadow: 0 10px 20px rgba(31, 64, 104, 0.18);
}

.settings-form label {
  display: grid;
  gap: 7px;
  color: #3b4653;
  font-size: 0.9rem;
  font-weight: 800;
}

.settings-form .account-password-field[hidden] {
  display: none;
}

.settings-form input,
.settings-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  color: #1c2430;
  font: inherit;
  padding: 10px 12px;
}

.settings-form input[readonly],
.settings-form input:disabled,
.settings-form select:disabled {
  background: #f8fafc;
  color: #64748b;
  cursor: default;
}

.settings-form input:focus,
.settings-form select:focus {
  border-color: #0b5cab;
  outline: 3px solid rgba(11, 92, 171, 0.16);
}

.account-edit-btn,
.edit-icon-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  color: #0b5cab;
  cursor: pointer;
}

.account-edit-btn svg,
.edit-icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.account-edit-btn:hover,
.account-edit-btn[aria-pressed="true"],
.edit-icon-btn:hover {
  border-color: #0b5cab;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(31, 64, 104, 0.18), inset 0 0 0 999px rgba(11, 92, 171, 0.08);
}

.account-edit-btn:disabled {
  background: #ffffff;
  opacity: 1;
  cursor: not-allowed;
}

.account-edit-btn:focus-visible,
.edit-icon-btn:focus-visible {
  outline: 3px solid rgba(11, 92, 171, 0.2);
  outline-offset: 2px;
}

.primary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.primary-btn[hidden] {
  display: none;
}

.settings-submit-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

.account-submit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-submit-actions [hidden],
.account-avatar-edit[hidden] {
  display: none;
}

.settings-status {
  min-height: 1.2em;
  margin: 0;
  color: #64748b;
  font-weight: 700;
}

.settings-status.is-error {
  color: #c2410c;
}

.pdf-tool-main {
  max-width: 1320px;
  margin: 48px auto;
  padding: 0 24px 56px;
}

.pdf-form {
  margin: 0 auto;
  display: grid;
  gap: 24px;
  justify-items: center;
}

.pdf-upload-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 360px));
  justify-content: center;
  gap: 24px;
}

.pdf-upload-card {
  position: relative;
  aspect-ratio: 0.72 / 1;
  min-height: 430px;
  max-height: 520px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  gap: 22px;
  border: 1px solid #c9d6e6;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  padding: 28px 22px 20px;
  overflow: hidden;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.pdf-upload-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(237, 243, 249, 0.36)),
    linear-gradient(330deg, transparent 0 48%, rgba(255, 255, 255, 0.22) 48% 55%, transparent 55% 100%);
  pointer-events: none;
  z-index: 1;
}

.pdf-upload-card:hover {
  border-color: #0b5cab;
  background: rgba(255, 255, 255, 0.48);
  transform: translateY(-2px);
}

.pdf-upload-card:has(+ .pdf-file-input:focus-visible) {
  outline: 3px solid rgba(11, 92, 171, 0.28);
  outline-offset: 4px;
}

.pdf-upload-card.has-file {
  border-color: #0b5cab;
}

.pdf-upload-card.has-file .pdf-file-name {
  border-color: #9fbfe0;
  color: #0b5cab;
}

.pdf-upload-title,
.pdf-upload-icon,
.pdf-file-name {
  position: relative;
  z-index: 2;
}

.pdf-card-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.pdf-upload-card.has-file::before {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(255, 255, 255, 0.38) 22%,
    rgba(255, 255, 255, 0.12) 60%,
    rgba(255, 255, 255, 0.9) 100%
  );
}

.pdf-upload-card.has-file .pdf-card-preview {
  opacity: 1;
}

.pdf-upload-card.has-file .pdf-upload-icon {
  opacity: 0;
}

.pdf-upload-title {
  color: #2f3640;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.pdf-upload-icon {
  width: 180px;
  height: auto;
  opacity: 0.34;
}

.pdf-file-name {
  width: min(100%, 460px);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfdae8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: #4b5a6b;
  font-size: 0.94rem;
  font-weight: 600;
  padding: 9px 12px;
  text-align: center;
  overflow-wrap: anywhere;
}

.pdf-file-input {
  display: none;
}

.pdf-invoice-picker-panel {
  max-width: 720px;
}

.pdf-invoice-picker-list {
  max-height: min(52vh, 520px);
  display: grid;
  gap: 10px;
  margin-top: 16px;
  overflow: auto;
}

.pdf-invoice-picker-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid #d5e0ec;
  border-radius: 8px;
  background: #ffffff;
  color: #202936;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}

.pdf-invoice-picker-item:hover {
  border-color: #0b5cab;
  background: #f4f8fc;
}

.pdf-invoice-picker-title {
  display: block;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.pdf-invoice-picker-meta {
  display: block;
  margin-top: 4px;
  color: #5d6b7b;
  font-size: 0.9rem;
}

.pdf-invoice-picker-amount {
  color: #0b5cab;
  font-weight: 700;
  white-space: nowrap;
}

.pdf-invoice-picker-status {
  min-height: 22px;
  margin: 12px 0 0;
  text-align: left;
}

.merge-btn {
  width: min(100%, 420px);
  min-height: 48px;
  margin-top: 0;
  border: 1px solid #0b5cab;
  border-radius: 8px;
  background: #0b5cab;
  color: #ffffff;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
}

.merge-btn:hover {
  background: #0a4f94;
}

.merge-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.pdf-sort-actions .pdf-sort-download {
  min-height: 38px;
  margin-top: 0;
  font-size: 0.92rem;
  padding: 8px 12px;
}

.pdf-result {
  margin-top: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.pdf-result-bar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.pdf-result-bar h2 {
  margin: 0;
  font-size: 1rem;
}

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

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #0b5cab;
  border-radius: 8px;
  background: #ffffff;
  color: #0b5cab;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 12px;
  text-decoration: none;
}

.download-btn[hidden] {
  display: none;
}

.download-btn:hover {
  background: #f1f6fb;
}

.download-btn.warning-btn {
  border-color: #d97706;
  background: #fffbeb;
  color: #92400e;
}

.download-btn.warning-btn:hover {
  background: #fef3c7;
}

.download-btn:disabled {
  opacity: 1;
}

.download-btn.is-saving {
  cursor: progress;
}

.download-btn.is-saved {
  border-color: #176534;
  background: #e7f7ed;
  color: #176534;
  cursor: default;
}

.download-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  color: #0b5cab;
  text-decoration: none;
}

.download-icon-btn[hidden] {
  display: none;
}

.download-icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.download-icon-btn:hover {
  border-color: #0b5cab;
  background: rgba(11, 92, 171, 0.08);
}

.download-icon-btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.58;
}

.pdf-sort-new-file-btn svg {
  width: 23px;
  height: 23px;
}

.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #c2410c;
  border-radius: 8px;
  background: #c2410c;
  color: #ffffff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
}

.danger-btn:hover {
  background: #9a3412;
}

.danger-btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.danger-icon-btn {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
}

.danger-icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.pdf-preview {
  display: block;
  width: 100%;
  height: min(72vh, 760px);
  min-height: 520px;
  border: 0;
}

.pdf-status {
  margin: 14px auto 0;
  max-width: 900px;
  color: #4b5a6b;
  text-align: center;
  overflow-wrap: anywhere;
}

.pdf-status.is-error {
  color: #c2410c;
  font-weight: 700;
}

.pdf-sort-main {
  max-width: 1320px;
  margin: 42px auto;
  padding: 0 24px 56px;
}

.pdf-sort-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.pdf-sort-header h1 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.pdf-sort-header p {
  margin: 0;
  color: #4b5a6b;
}

.pdf-sort-workspace {
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #ffffff;
}

.pdf-sort-toolbar {
  position: sticky;
  top: var(--top-bar-height);
  z-index: 12;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #d8e2ee;
  border-radius: 8px 8px 0 0;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(28, 36, 48, 0.08);
  padding: 12px 14px;
}

.pdf-sort-toolbar strong,
.pdf-sort-toolbar span {
  display: block;
  overflow-wrap: anywhere;
}

.pdf-sort-toolbar span {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 700;
}

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

.pdf-sort-zoom-btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.58;
}

.pdf-sort-download {
  width: auto;
  min-width: 190px;
}

.pdf-sort-empty {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  background: #ffffff;
  color: #64748b;
  font-weight: 700;
  text-align: center;
  padding: 36px 18px;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.pdf-sort-empty[hidden] {
  display: none;
}

.pdf-sort-empty::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 2px dashed #9fb2c8;
  border-radius: 8px;
  pointer-events: none;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.pdf-sort-empty:hover,
.pdf-sort-empty.is-drag-over {
  background: #f5f9fd;
  color: #0b5cab;
}

.pdf-sort-empty:hover::before,
.pdf-sort-empty.is-drag-over::before {
  border-color: #0b5cab;
  background: rgba(11, 92, 171, 0.05);
}

.pdf-sort-empty img {
  position: relative;
  z-index: 1;
  width: 150px;
  max-width: 44vw;
  opacity: 0.3;
}

.pdf-sort-empty span {
  position: relative;
  z-index: 1;
}

.pdf-sort-grid {
  --pdf-sort-card-min: 178px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--pdf-sort-card-min), 1fr));
  gap: 14px;
  padding: 14px;
}

.pdf-sort-grid:empty {
  display: none;
}

.pdf-page-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: calc(var(--pdf-sort-card-min) * 1.7);
  border: 1px solid #ccd9e8;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
  cursor: grab;
}

.pdf-page-card:hover {
  border-color: #0b5cab;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.pdf-page-card:active {
  cursor: grabbing;
}

.pdf-page-card:focus-visible {
  outline: 3px solid rgba(11, 92, 171, 0.28);
  outline-offset: 3px;
}

.pdf-page-card.is-dragging {
  opacity: 0.5;
}

.pdf-page-card.is-drop-target {
  border-color: #0b5cab;
  box-shadow: 0 0 0 3px rgba(11, 92, 171, 0.15);
}

.pdf-page-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
}

.pdf-page-card-header strong {
  font-size: 0.92rem;
}

.pdf-page-card-header span {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.pdf-page-canvas-wrap {
  display: grid;
  place-items: center;
  min-height: calc(var(--pdf-sort-card-min) * 1.25);
  background: #e9eef5;
  padding: 10px;
}

.pdf-page-canvas-wrap canvas,
.pdf-page-canvas-wrap img,
.pdf-page-canvas-wrap iframe {
  width: 100%;
  height: auto;
  max-height: calc(var(--pdf-sort-card-min) * 1.35);
  object-fit: contain;
  border: 1px solid #d1dbe8;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.pdf-page-canvas-wrap iframe {
  height: calc(var(--pdf-sort-card-min) * 1.35);
  pointer-events: none;
}

.pdf-sort-preview-panel {
  width: calc(100vw - 36px);
  max-width: none;
  height: calc(100vh - 36px);
  max-height: none;
  overflow: hidden;
  padding: 18px;
}

.pdf-sort-preview-body {
  display: grid;
  place-items: center;
  height: calc(100vh - 128px);
  max-height: none;
  margin-top: 14px;
  overflow: auto;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #e9eef5;
  padding: 16px;
}

.pdf-sort-preview-body img {
  width: auto;
  max-width: 100%;
  height: auto;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.18);
}

.invoice-main {
  max-width: 1120px;
  margin: 42px auto;
  padding: 0 20px 56px;
}

.invoice-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.invoice-page-header h1 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.invoice-page-header p {
  margin: 0;
  color: #4b5a6b;
}

.archive-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.archive-btn,
.primary-btn {
  border: 2px solid rgba(188, 215, 239, 0.9);
  background-color: #dceaf6;
  box-shadow: inset 4px 4px 10px #a9c4dc, inset -4px -4px 10px #ffffff;
  color: #0f579f;
  font-size: 0.94rem;
  padding: 12px 24px;
  transition: all 160ms ease-in-out;
}

.archive-btn:hover,
.primary-btn:hover,
.archive-btn:focus-visible,
.primary-btn:focus-visible {
  outline: none;
  box-shadow:
    inset 2px 2px 5px #a9c4dc,
    inset -2px -2px 5px #ffffff,
    2px 2px 5px rgba(77, 132, 184, 0.38),
    -2px -2px 5px #ffffff;
}

.archive-btn:active,
.primary-btn:active {
  box-shadow: inset 4px 4px 10px #a9c4dc, inset -4px -4px 10px #ffffff;
}

.invoice-form-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 22px;
}

.invoice-import-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
  margin-bottom: 22px;
}

.invoice-import-panel-body {
  transition:
    opacity 160ms ease,
    filter 160ms ease;
}

.invoice-import-panel.is-importing .invoice-import-panel-body {
  opacity: 0.72;
  filter: blur(4px);
  pointer-events: none;
}

.invoice-import-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(5px);
}

.invoice-import-overlay[hidden] {
  display: none;
}

.invoice-import-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.invoice-import-header h2 {
  margin: 0;
  color: #172234;
  font-size: 1.25rem;
}

.invoice-import-header p {
  margin: 5px 0 0;
  color: #4b5a6b;
}

.invoice-import-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.6fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.invoice-import-driver,
.invoice-import-drop {
  display: grid;
  gap: 7px;
  color: #3b4653;
  font-size: 0.9rem;
  font-weight: 700;
}

.invoice-import-driver select {
  width: 100%;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  color: #1c2430;
  font: inherit;
  padding: 12px;
}

.invoice-import-drop input {
  width: 100%;
  border: 1px dashed #9eb6cf;
  border-radius: 8px;
  background: #f8fbff;
  color: #1c2430;
  font: inherit;
  padding: 12px;
}

.invoice-import-drop small {
  color: #4b5a6b;
  font-weight: 600;
}

.loader-con {
  position: relative;
  width: min(78%, 560px);
  height: 100px;
  overflow: hidden;
}

.invoice-import-loader {
  margin: 0;
}

.pfile {
  position: absolute;
  bottom: 25px;
  width: 40px;
  height: 50px;
  border-radius: 4px;
  background: linear-gradient(90deg, #0f579f, #7fb2df);
  opacity: 0;
  transform-origin: center;
  animation: flyRight 3s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.6s);
}

.pfile::before,
.pfile::after {
  content: "";
  position: absolute;
  left: 6px;
  height: 4px;
  border-radius: 2px;
  background-color: #ffffff;
}

.pfile::before {
  top: 6px;
  width: 28px;
}

.pfile::after {
  top: 13px;
  width: 18px;
}

@keyframes flyRight {
  0% {
    left: -10%;
    opacity: 0;
    transform: scale(0);
  }

  50% {
    left: 45%;
    opacity: 1;
    transform: scale(1.2);
  }

  100% {
    left: 100%;
    opacity: 0;
    transform: scale(0);
  }
}

.invoice-import-progress {
  display: grid;
  gap: 8px;
  width: min(78%, 560px);
  margin: 0;
}

.invoice-import-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #3b4653;
  font-size: 0.86rem;
  font-weight: 800;
}

.invoice-import-progress-track {
  height: 10px;
  overflow: hidden;
  border: 1px solid #c8d4e2;
  border-radius: 999px;
  background: #eef5fb;
}

.invoice-import-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f579f, #7fb2df);
  transition: width 220ms ease;
}

.invoice-import-results {
  overflow-x: auto;
  margin-top: 12px;
}

.invoice-import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

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

.invoice-import-table th {
  color: #3b4653;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.invoice-import-badge {
  display: inline-flex;
  max-width: 260px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.invoice-import-badge.is-created {
  background: #dcfce7;
  color: #166534;
}

.invoice-import-badge.is-skipped {
  background: #ffedd5;
  color: #9a3412;
}

.invoice-company-block {
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
  text-align: center;
}

.invoice-company-block h2 {
  margin: 0 0 10px;
  font-size: 1.55rem;
  letter-spacing: 0;
}

.invoice-company-block div {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 8px;
  color: #1c2430;
  font-weight: 800;
}

.invoice-company-block p {
  margin: 5px 0 0;
  color: #3b4653;
  font-weight: 700;
}

.invoice-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.invoice-form-panel label,
.invoice-notes {
  display: grid;
  gap: 7px;
  color: #3b4653;
  font-size: 0.9rem;
  font-weight: 700;
}

.invoice-form-panel input,
.invoice-form-panel select,
.invoice-form-panel textarea {
  width: 100%;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  color: #1c2430;
  font: inherit;
  padding: 10px 11px;
}

.invoice-form-panel input:focus,
.invoice-form-panel select:focus,
.invoice-form-panel textarea:focus {
  border-color: #0b5cab;
  outline: 3px solid rgba(11, 92, 171, 0.16);
}

.invoice-driver-picker {
  position: relative;
}

.invoice-driver-picker input[readonly] {
  cursor: pointer;
}

.invoice-driver-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 8;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(28, 36, 48, 0.16);
  padding: 6px;
}

.invoice-driver-menu[hidden] {
  display: none;
}

.invoice-driver-menu button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1c2430;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  padding: 9px 10px;
  text-align: left;
}

.invoice-driver-menu button:hover,
.invoice-driver-menu button:focus-visible {
  background: #eaf4ff;
  outline: none;
}

.invoice-driver-menu button:disabled {
  color: #64748b;
  cursor: default;
}

.invoice-notes {
  margin-top: 22px;
}

.invoice-submit-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}

.invoice-status {
  margin: 0;
  color: #4b5a6b;
}

.invoice-status.is-error {
  color: #c2410c;
  font-weight: 800;
}

.invoice-total-box {
  min-width: 170px;
  display: grid;
  gap: 2px;
  text-align: right;
}

.invoice-total-box span {
  color: #4b5a6b;
  font-size: 0.86rem;
  font-weight: 700;
}

.invoice-total-box strong {
  font-size: 1.45rem;
}

.pay-main {
  max-width: 1240px;
  margin: 42px auto;
  padding: 0 20px 56px;
}

.pay-statement-form {
  display: grid;
  gap: 24px;
}

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

.pay-section {
  display: grid;
  gap: 14px;
}

.pay-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.pay-section-header h2 {
  margin: 0 0 5px;
  font-size: 1.18rem;
}

.pay-section-header p {
  margin: 0;
  color: #4b5a6b;
  font-size: 0.92rem;
}

.pay-table-wrap {
  overflow-x: auto;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
}

.pay-entry-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.pay-entry-table th {
  background: #0b5cab;
  color: #ffffff;
  font-size: 0.78rem;
  text-align: left;
  text-transform: uppercase;
}

.pay-entry-table th,
.pay-entry-table td {
  border-bottom: 1px solid #dbe2ec;
  padding: 8px;
  vertical-align: top;
}

.pay-entry-table tbody tr:last-child td {
  border-bottom: 0;
}

.pay-entry-table input,
.pay-entry-table select {
  min-height: 38px;
  border: 1px solid #c8d4e2;
  border-radius: 6px;
  font: inherit;
  padding: 8px;
}

.pay-entry-table input[type="date"] {
  min-width: 132px;
}

.pay-entry-table input[name="origin"],
.pay-entry-table input[name="destination"] {
  min-width: 160px;
}

.pay-row-remove {
  width: 38px;
  height: 38px;
}

.pay-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: start;
}

.pay-deduction-list {
  display: grid;
  gap: 10px;
}

.pay-deduction-empty {
  margin: 0;
  border: 1px dashed #c8d4e2;
  border-radius: 8px;
  color: #4b5a6b;
  padding: 14px;
}

.pay-deduction-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.pay-deduction-item input {
  width: 18px;
  height: 18px;
}

.pay-deduction-item strong {
  display: block;
  color: #1c2430;
}

.pay-deduction-item span {
  color: #4b5a6b;
  font-size: 0.86rem;
  font-weight: 750;
}

.pay-deduction-amount {
  color: #c2410c;
  font-weight: 900;
}

.pay-summary {
  position: sticky;
  top: 106px;
  display: grid;
  gap: 12px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px;
}

.pay-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pay-summary span {
  color: #4b5a6b;
  font-size: 0.86rem;
  font-weight: 800;
}

.pay-summary strong {
  color: #1c2430;
  font-size: 1.08rem;
}

.pay-summary-net {
  border-top: 1px solid #dbe2ec;
  padding-top: 12px;
}

.pay-summary-net strong {
  color: #0b5cab;
  font-size: 1.38rem;
}

.deduction-preset-panel {
  max-width: 720px;
  overflow-x: hidden;
}

.deduction-preset-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr) minmax(160px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
}

.deduction-preset-form label:not(.switch) {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #3b4653;
  font-size: 0.9rem;
  font-weight: 800;
}

.deduction-preset-form input:not([type="checkbox"]),
.deduction-preset-form select {
  width: 100%;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  font: inherit;
  padding: 10px 11px;
}

.deduction-type-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.deduction-type-field > span {
  color: #3b4653;
  font-size: 0.9rem;
  font-weight: 800;
}

.switch {
  --_switch-bg-clr: #dbe7f5;
  --_switch-padding: 4px;
  --_slider-bg-clr: #0b5cab;
  --_slider-bg-clr-on: #0b5cab;
  --_label-padding: 0.78rem 1.15rem;
  --_switch-easing: cubic-bezier(0.47, 1.64, 0.41, 0.8);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  border: 1px solid #c8d4e2;
  border-radius: 9999px;
  color: #3b4653;
  cursor: pointer;
}

.switch input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.switch > span {
  display: grid;
  place-content: center;
  min-height: 42px;
  padding: var(--_label-padding);
  font-size: 0.86rem;
  font-weight: 900;
  transition: opacity 300ms ease-in-out 150ms;
}

.switch::before,
.switch::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  transition: inset 150ms ease-in-out;
}

.switch::before {
  z-index: -1;
  inset: var(--_switch-padding) 50% var(--_switch-padding) var(--_switch-padding);
  background-color: var(--_slider-bg-clr);
  box-shadow: 0 6px 14px rgba(11, 92, 171, 0.2);
  transition:
    inset 500ms var(--_switch-easing),
    background-color 500ms ease-in-out;
}

.switch::after {
  z-index: -2;
  inset: 0;
  background-color: var(--_switch-bg-clr);
}

.switch:focus-within::after {
  inset: -0.25rem;
  background-color: rgba(11, 92, 171, 0.14);
}

.switch:has(input:checked):hover > span:first-of-type,
.switch:has(input:not(:checked)):hover > span:last-of-type {
  opacity: 1;
  transition-delay: 0ms;
  transition-duration: 100ms;
}

.switch:has(input:checked):hover::before {
  inset: var(--_switch-padding) var(--_switch-padding) var(--_switch-padding) 45%;
}

.switch:has(input:not(:checked)):hover::before {
  inset: var(--_switch-padding) 45% var(--_switch-padding) var(--_switch-padding);
}

.switch:has(input:checked)::before {
  inset: var(--_switch-padding) var(--_switch-padding) var(--_switch-padding) 50%;
  background-color: var(--_slider-bg-clr-on);
}

.switch > span:last-of-type,
.switch > input:checked + span:first-of-type {
  opacity: 0.72;
}

.switch > span:first-of-type {
  color: #ffffff;
}

.switch:has(input:checked) > span:first-of-type {
  color: #3b4653;
}

.switch > input:checked ~ span:last-of-type {
  color: #ffffff;
  opacity: 1;
}

.deduction-value-input {
  position: relative;
  display: block;
  min-width: 0;
}

.deduction-value-input > span {
  position: absolute;
  top: 50%;
  color: #4b5a6b;
  font-weight: 900;
  pointer-events: none;
  transform: translateY(-50%);
}

.deduction-value-input > span.is-prefix {
  left: 12px;
}

.deduction-value-input > span.is-suffix {
  right: 12px;
}

.deduction-preset-form .deduction-value-input:has(.is-prefix) input {
  padding-left: 30px;
}

.deduction-preset-form .deduction-value-input:has(.is-suffix) input {
  padding-right: 30px;
}

.deduction-preset-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.deduction-preset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.deduction-preset-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.deduction-preset-row span {
  color: #4b5a6b;
  font-weight: 800;
}

.pay-archive-detail-section {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.pay-archive-detail-section h3 {
  margin: 0;
  color: #1c2430;
  font-size: 1rem;
}

.pay-archive-detail-table-wrap {
  overflow-x: auto;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
}

.pay-archive-detail-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.pay-archive-detail-table th {
  background: #0b5cab;
  color: #ffffff;
  font-size: 0.76rem;
  text-align: left;
  text-transform: uppercase;
}

.pay-archive-detail-table th,
.pay-archive-detail-table td {
  border-bottom: 1px solid #dbe2ec;
  padding: 9px;
}

.pay-archive-detail-table tr:last-child td {
  border-bottom: 0;
}

.pay-archive-deduction-list {
  display: grid;
  gap: 8px;
}

.pay-archive-deduction-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.pay-archive-deduction-row span {
  display: block;
  color: #4b5a6b;
  font-size: 0.86rem;
  font-weight: 750;
}

.archive-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 24px;
}

.archive-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.archive-header h1 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.archive-header p {
  margin: 0;
  color: #4b5a6b;
}

.archive-search-row {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(220px, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.archive-search,
.archive-search-mode {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  color: #1c2430;
  font: inherit;
  padding: 10px 12px;
}

.archive-search:focus,
.archive-search-mode:focus,
.archive-filter-grid select:focus {
  border-color: #0b5cab;
  outline: 3px solid rgba(11, 92, 171, 0.16);
}

.archive-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.archive-filter-grid label {
  display: grid;
  gap: 7px;
  color: #3b4653;
  font-size: 0.9rem;
  font-weight: 700;
}

.archive-filter-grid select {
  min-height: 42px;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  color: #1c2430;
  font: inherit;
  padding: 8px 10px;
}

.archive-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.invoice-archive-table th,
.driver-table th {
  background: #eef2f6;
  color: #4b5a6b;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-archive-table tbody tr:nth-child(even) td,
.driver-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.invoice-archive-table tbody tr:nth-child(odd) td,
.driver-table tbody tr:nth-child(odd) td {
  background: #ffffff;
}

.invoice-archive-table {
  width: 100%;
  min-width: 360px;
  border-collapse: collapse;
}

.invoice-archive-table th,
.invoice-archive-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 13px 12px;
  text-align: left;
}

.invoice-archive-table td {
  color: #1c2430;
  font-weight: 600;
}

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

.invoice-archive-table .archive-action-column {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.archive-detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #0b5cab;
  font: inherit;
  padding: 0;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.archive-detail-link:hover {
  text-decoration: underline;
}

.invoice-attachment-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.invoice-attachment-badge.is-attached-sent {
  background: #e7f7ed;
  color: #176534;
}

.invoice-attachment-badge.is-attached-not-sent {
  background: #fff4df;
  color: #8a4d00;
}

.invoice-attachment-badge.is-not-attached {
  background: #fee2e2;
  color: #991b1b;
}

.invoice-detail-grid {
  margin-top: 20px;
}

.invoice-detail-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 22px;
}

.invoice-detail-view {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.invoice-detail-field {
  display: grid;
  gap: 7px;
  color: #3b4653;
  font-size: 0.9rem;
  font-weight: 700;
}

.invoice-detail-field strong {
  min-height: 44px;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  color: #1c2430;
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  padding: 10px 11px;
}

.invoice-detail-field span {
  color: #3b4653;
}

.invoice-detail-notes {
  display: grid;
  margin-top: 22px;
}

.invoice-detail-notes strong {
  min-height: 104px;
  white-space: pre-wrap;
}

.invoice-edit-form {
  display: grid;
  gap: 22px;
}

.invoice-edit-form .invoice-company-block {
  margin-bottom: 0;
}

.invoice-edit-form .invoice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}

.invoice-edit-form label {
  display: grid;
  gap: 7px;
  color: #3b4653;
  font-size: 0.9rem;
  font-weight: 700;
}

.invoice-edit-form input,
.invoice-edit-form select,
.invoice-edit-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  color: #1c2430;
  font: inherit;
  padding: 10px 11px;
}

.invoice-edit-form textarea {
  min-height: 92px;
  resize: vertical;
}

.invoice-edit-form input:focus,
.invoice-edit-form select:focus,
.invoice-edit-form textarea:focus {
  border-color: #0b5cab;
  outline: 3px solid rgba(11, 92, 171, 0.16);
}

.invoice-edit-form .invoice-notes {
  margin-top: 0;
}

.invoice-edit-form .invoice-total-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #3b4653;
  font-size: 1rem;
  font-weight: 800;
}

.invoice-edit-form .invoice-total-row strong {
  color: #172033;
  font-size: 1.1rem;
}

.invoice-detail-submit-row {
  grid-template-columns: 1fr repeat(4, auto);
}

.driver-main {
  max-width: 1180px;
  margin: 42px auto;
  padding: 0 20px 56px;
}

.driver-page-header {
  margin-bottom: 24px;
}

.driver-page-header h1 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.driver-page-header p {
  margin: 0;
  color: #4b5a6b;
}

.driver-table-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 22px;
}

.driver-table-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.driver-form {
  margin-top: 18px;
}

.driver-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

#owner-operator-truck-driver-field[hidden],
[data-owner-operator-truck-driver][hidden] {
  display: grid !important;
  visibility: hidden;
}

#truck-document-upload-grid[hidden] {
  display: none !important;
}

.driver-form label {
  display: grid;
  gap: 7px;
  color: #3b4653;
  font-size: 0.9rem;
  font-weight: 700;
}

.driver-form input,
.driver-form select,
.driver-search {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  color: #1c2430;
  font: inherit;
  padding: 9px 11px;
}

.driver-type-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 20px 0 0;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  padding: 14px;
}

.driver-type-fieldset legend {
  color: #3b4653;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0 6px;
}

.truck-type-fieldset {
  display: grid;
  grid-template-columns: max-content max-content minmax(220px, 300px);
  align-items: start;
  column-gap: 26px;
  row-gap: 10px;
  margin-bottom: 22px;
}

.truck-type-heading {
  display: block;
  grid-column: 1 / -1;
  border-bottom: 1px solid #dbe2ec;
  color: #3b4653;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  padding-bottom: 8px;
}

.driver-type-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1c2430;
  font-weight: 700;
}

.driver-type-option input {
  width: auto;
  min-height: auto;
}

.truck-owner-driver-option {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.truck-owner-driver-option select {
  width: 100%;
  min-height: 42px;
}

.driver-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.driver-upload-grid label {
  display: grid;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #3b4653;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.driver-upload-grid label.has-selected-file {
  border-color: #22c55e;
  background: #ecfdf3;
  color: #137333;
}

.driver-upload-grid label.has-selected-file input[type="file"] {
  border-color: #22c55e;
  background: #f6fff9;
}

.driver-upload-grid label[hidden],
.driver-upload-grid .owner-operator-upload[hidden] {
  display: none;
}

.driver-doc-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 2px 6px 2px 0;
  border: 1px solid #0b5cab;
  border-radius: 8px;
  background: #ffffff;
  color: #0b5cab;
  padding: 5px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.driver-doc-link:hover {
  background: #f1f6fb;
}

.driver-current-docs {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.driver-current-docs span {
  color: #4b5a6b;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.driver-current-docs strong {
  color: #1c2430;
  font-weight: 700;
}

.driver-form input:focus,
.driver-form select:focus,
.driver-search:focus {
  border-color: #0b5cab;
  outline: 3px solid rgba(11, 92, 171, 0.16);
}

.driver-submit-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.driver-submit-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.driver-status,
.driver-table-header p {
  margin: 0;
  color: #4b5a6b;
}

.driver-table-header {
  display: grid;
  grid-template-columns: 1fr minmax(360px, 520px);
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.driver-table-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.driver-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.driver-table {
  width: 100%;
  min-width: 360px;
  border-collapse: collapse;
}

.driver-table th,
.driver-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 13px 12px;
  text-align: left;
}

.driver-table td {
  color: #1c2430;
  font-weight: 600;
}

.driver-table tr:last-child td {
  border-bottom: 0;
}

.driver-name-btn {
  border: 0;
  background: transparent;
  color: #0b5cab;
  font: inherit;
  font-weight: 800;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.driver-name-btn:hover {
  text-decoration: underline;
}

.driver-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
}

.driver-status-pill.is-active {
  background: #e8f7ee;
  color: #137333;
}

.driver-status-pill.is-inactive {
  background: #fff0e8;
  color: #c2410c;
}

.driver-status-pill.is-maintenance {
  background: #fff8db;
  color: #9a6a00;
}

.driver-status-pill.is-missing {
  background: #fff8db;
  color: #8a5b00;
  cursor: pointer;
}

.driver-status-pill.is-missing:hover {
  background: #ffeaa3;
}

.missing-info-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0 0 0 20px;
  color: #1c2430;
  font-weight: 750;
}

.driver-modal[hidden]:not(.is-closing) {
  display: none;
}

.driver-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.driver-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.driver-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 36, 48, 0.42);
}

.driver-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  max-height: min(86vh, 760px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(28, 36, 48, 0.24);
  padding: 22px;
}

#pdf-sort-preview-modal {
  align-items: stretch;
  justify-items: stretch;
  padding: 12px;
}

#pdf-sort-preview-modal .driver-modal-panel.pdf-sort-preview-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  height: calc(100vh - 24px);
  max-height: none;
  overflow: hidden;
  padding: 18px;
}

#pdf-sort-preview-modal .pdf-sort-preview-body {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

#pdf-sort-preview-modal .pdf-sort-preview-body img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.driver-modal-panel.deduction-preset-panel {
  width: min(100%, 720px);
  max-width: 720px;
  overflow-x: hidden;
}

.confirm-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(28, 36, 48, 0.24);
  padding: 22px;
}

.confirm-modal-text {
  margin: 18px 0 0;
  color: #3b4653;
  font-weight: 700;
  line-height: 1.45;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.confirm-password-field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: #3b4653;
  font-size: 0.9rem;
  font-weight: 800;
}

.confirm-password-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  color: #1c2430;
  font: inherit;
  padding: 10px 12px;
}

.confirm-password-field input:focus {
  border-color: #0b5cab;
  outline: 3px solid rgba(11, 92, 171, 0.16);
}

.confirm-password-field .password-toggle-btn {
  color: #64748b;
}

.confirm-modal-status {
  min-height: 1.2em;
  margin: 12px 0 0;
  color: #c2410c;
  font-weight: 750;
}

.document-viewer-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1040px);
  max-height: min(90vh, 820px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(28, 36, 48, 0.24);
  padding: 22px;
}

.document-viewer-body {
  min-height: 460px;
  margin-top: 18px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #f8fafc;
  overflow: auto;
}

.document-preview-frame {
  display: block;
  width: 100%;
  height: min(68vh, 640px);
  border: 0;
  background: #ffffff;
}

.document-preview-image {
  display: block;
  max-width: 100%;
  max-height: min(68vh, 640px);
  margin: 0 auto;
}

.document-viewer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.driver-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.driver-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #c8d4e2;
  border-radius: 8px;
  background: #ffffff;
  color: #1c2430;
  font-weight: 700;
  padding: 7px 10px;
  cursor: pointer;
}

.modal-close-btn:hover {
  background: #f1f6fb;
}

.driver-detail-grid {
  margin-top: 20px;
}

.driver-detail-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.driver-detail-item {
  display: grid;
  gap: 6px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.driver-detail-item span {
  color: #4b5a6b;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.driver-detail-item strong {
  color: #1c2430;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.driver-detail-docs {
  grid-column: 1 / -1;
}

.driver-detail-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.driver-detail-form {
  margin-top: 0;
}

@media (max-width: 840px) {
  .top-bar {
    height: 82px;
    align-items: center;
    flex-direction: row;
    gap: 18px;
    padding: 0 18px;
  }

  .logo {
    height: 48px;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 25;
    width: min(82vw, 320px);
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 92px 28px 28px;
    background: linear-gradient(180deg, rgba(16, 20, 27, 0.98), rgba(35, 42, 52, 0.98));
    box-shadow: -20px 0 46px rgba(12, 16, 22, 0.28);
    transform: translateX(100%);
    transition: none;
  }

  .header-nav.is-open {
    transform: translateX(0);
  }

  .nav-btn {
    min-height: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.78rem;
    padding: 0;
  }

  .nav-btn.is-active {
    box-shadow: none;
  }

  .mobile-menu-toggle {
    position: relative;
    z-index: 26;
    display: inline-flex;
    margin-left: auto;
  }

  .dashboard-calendar-shell {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 30px;
  }

  .calendar-widget {
    width: 100%;
    min-height: auto;
  }

  .attached-docs-widget {
    width: 100%;
    min-height: auto;
  }

  .pdf-preview {
    min-height: 420px;
  }

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

  .archive-panel {
    padding: 30px 24px;
  }

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

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

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

  .account-avatar-wrap {
    right: 30px;
    width: 160px;
    height: 160px;
  }

  .account-avatar-edit {
    top: 44px;
    right: 158px;
  }

  .account-panel .settings-tabs,
  .account-panel .settings-panel-header {
    padding-right: 180px;
  }

}

@media (max-width: 760px) {
  .pdf-tool-main {
    margin-top: 28px;
    padding: 0 16px 40px;
  }

  .pdf-upload-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .pdf-upload-card {
    min-height: 420px;
    max-height: none;
    padding: 24px 18px 18px;
  }

  .pdf-upload-title {
    font-size: 1.35rem;
  }

  .pdf-sort-main {
    margin-top: 28px;
    padding: 0 16px 40px;
  }

  .pdf-sort-header,
  .pdf-sort-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pdf-sort-header h1 {
    font-size: 1.7rem;
  }

  .pdf-sort-download,
  .pdf-sort-actions .download-btn {
    width: 100%;
  }

  .pdf-sort-grid {
    gap: 10px;
    padding: 10px;
  }

  .pdf-page-card {
    min-height: 276px;
  }

  .pdf-page-canvas-wrap {
    min-height: 188px;
  }

  .invoice-main {
    margin-top: 28px;
    padding: 0 16px 40px;
  }

  .settings-main {
    margin-top: 28px;
    padding: 0 16px 40px;
  }

  .settings-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-form {
    padding: 16px;
  }

  .account-main {
    margin-top: 28px;
  }

  .account-panel {
    padding-top: 130px;
  }

  .account-panel .settings-tabs,
  .account-panel .settings-panel-header {
    padding-right: 0;
  }

  .account-avatar-wrap {
    top: 18px;
    right: 50%;
    width: 130px;
    height: 130px;
    transform: translateX(50%);
  }

  .account-avatar-head {
    top: 25px;
    width: 48px;
    height: 48px;
  }

  .account-avatar-body {
    right: 22px;
    left: 22px;
    height: 62px;
  }

  .account-avatar-edit {
    top: 92px;
    right: calc(50% + 38px);
  }

  .settings-form-grid,
  .settings-submit-row {
    grid-template-columns: 1fr;
  }

  .settings-submit-row .primary-btn {
    width: 100%;
  }

  .invoice-page-header {
    flex-direction: column;
  }

  .archive-btn,
  .primary-btn {
    width: 100%;
  }

  .invoice-form-panel {
    padding: 16px;
  }

  .invoice-form-grid,
  .invoice-import-form,
  .invoice-submit-row {
    grid-template-columns: 1fr;
  }

  .invoice-import-header {
    flex-direction: column;
    align-items: stretch;
  }

  .pay-layout,
  .deduction-preset-form {
    grid-template-columns: 1fr;
  }

  .pay-summary {
    position: static;
  }

  .pay-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .pay-section-header .archive-btn {
    width: 100%;
  }

  .deduction-preset-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .invoice-total-box {
    text-align: left;
  }

  .archive-panel {
    padding: 16px;
  }

  .archive-header {
    flex-direction: column;
  }

  .archive-search-row {
    grid-template-columns: 1fr;
  }

  .archive-filter-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .driver-main {
    margin-top: 28px;
    padding: 0 16px 40px;
  }

  .dashboard-main {
    min-height: auto;
    margin: 28px 0 0;
    padding: 0 16px 40px;
  }

  .dashboard-calendar-shell {
    padding: 18px;
  }

  .calendar-widget {
    padding: 24px 16px 26px;
  }

  .attached-docs-widget {
    padding: 24px 16px 26px;
  }

  .attached-docs-header {
    align-items: center;
  }

  .attached-doc-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .attached-doc-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .calendar-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-header h2 {
    font-size: 1.65rem;
  }

  .calendar-controls {
    width: 100%;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 10px;
  }

  .calendar-nav-btn {
    width: 44px;
    height: 44px;
  }

  .calendar-today-btn {
    min-height: 44px;
    padding: 0 18px;
  }

  .calendar-weekdays span {
    font-size: 0.82rem;
  }

  .calendar-days {
    grid-auto-rows: 48px;
  }

  .calendar-day {
    font-size: 1.02rem;
  }

  .calendar-day.is-today {
    width: 42px;
    height: 42px;
  }

  .truck-type-fieldset {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .driver-table-panel,
  .driver-modal-panel {
    padding: 16px;
  }

  .driver-form-grid,
  .driver-upload-grid,
  .driver-detail-view,
  .invoice-detail-view,
  .driver-submit-row,
  .driver-table-header,
  .driver-table-actions {
    grid-template-columns: 1fr;
  }

  .driver-submit-row .primary-btn {
    width: 100%;
  }

  .driver-submit-actions {
    width: 100%;
    justify-content: stretch;
  }

  .driver-submit-actions .danger-icon-btn {
    flex: 0 0 42px;
  }

  .driver-submit-actions .primary-btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 1040px) and (min-width: 761px) {
  .pdf-upload-grid {
    grid-template-columns: repeat(3, minmax(0, 280px));
    gap: 18px;
  }

  .pdf-upload-card {
    min-height: 360px;
  }

  .pdf-upload-icon {
    width: 140px;
  }
}
