:root {
  color-scheme: light;
  font-family: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  color: #092050;
  background: #f7f9fd;
}

button {
  font: inherit;
}

.auth-body {
  color: #102044;
  background: #f5f8fd;
}

.auth-page {
  min-height: 100vh;
  min-height: 100svh;
}

.auth-hero {
  display: none;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #102044;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
}

.auth-brand > span:last-child > span {
  color: #087eea;
}

.auth-brand-mark {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  overflow: hidden;
}

.auth-brand-mark img {
  position: absolute;
  top: -19px;
  left: -20px;
  width: 88px;
  max-width: none;
  height: auto;
}

.auth-brand-light {
  padding: 8px 17px 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: #fff;
  background: rgba(3, 28, 70, 0.7);
  box-shadow: 0 10px 30px rgba(1, 21, 55, 0.2);
  backdrop-filter: blur(12px);
}

.auth-signin {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    max(20px, env(safe-area-inset-top))
    clamp(16px, 5vw, 40px)
    max(18px, env(safe-area-inset-bottom));
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(244, 248, 253, 0.88), rgba(244, 248, 253, 0.94)),
    url("../images/loginbg.png") center / cover no-repeat;
}

.auth-signin-brand {
  display: flex;
  width: fit-content;
  margin: 0 auto 22px;
}

.auth-signin-heading {
  text-align: center;
}

.auth-signin-heading h2 {
  margin: 0;
  color: #0d1f45;
  font-size: clamp(1.8rem, 7vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.auth-signin-heading p {
  margin: 9px 0 0;
  color: #69758d;
  font-size: 0.94rem;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  width: min(100%, 550px);
  gap: 18px;
  margin-top: 30px;
}

.auth-validation.validation-summary-errors {
  padding: 12px 14px;
  border: 1px solid #f4b6b6;
  border-radius: 8px;
  color: #a52121;
  background: #fff2f2;
  font-size: 0.84rem;
  line-height: 1.45;
}

.auth-validation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-field > span:first-child {
  display: block;
  margin-bottom: 8px;
  color: #172747;
  font-size: 0.83rem;
  font-weight: 700;
}

.auth-input-wrap > svg,
.auth-eye svg,
.auth-footer svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-input-wrap {
  display: flex;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  align-items: center;
  gap: 10px;
  color: #7e8ba1;
  background: #fff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.auth-input-wrap:focus-within {
  border-color: #3682eb;
  box-shadow: 0 0 0 3px rgba(9, 88, 214, 0.1);
}

.auth-input-wrap input {
  min-width: 0;
  width: 100%;
  padding: 12px 0;
  border: 0;
  outline: 0;
  color: #172747;
  background: transparent;
  font: inherit;
}

.auth-input-wrap input::placeholder {
  color: #8c97aa;
}

.auth-field-error {
  display: block;
  margin-top: 6px;
  color: #a52121;
  font-size: 0.78rem;
  line-height: 1.35;
}

.auth-field-error:empty {
  display: none;
}

.auth-eye {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  place-content: center;
  color: #7e8ba1;
  background: transparent;
  cursor: pointer;
}

.auth-eye:hover,
.auth-eye[aria-pressed="true"] {
  color: #075de0;
}

.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #44526d;
  font-size: 0.83rem;
}

.auth-form-options a {
  color: #075de0;
  text-decoration: none;
  font-weight: 650;
}

.auth-form-options a:hover {
  text-decoration: underline;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.auth-remember input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #075de0;
}

.auth-submit,
.auth-google {
  display: flex;
  width: 100%;
  min-height: 49px;
  border-radius: 7px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 750;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.auth-submit {
  border: 0;
  color: #fff;
  background: linear-gradient(100deg, #0873ed, #0754d8);
  box-shadow: 0 9px 20px rgba(7, 84, 216, 0.2);
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(7, 84, 216, 0.28);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #7a8598;
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: #dfe5ed;
  content: "";
}

.auth-google {
  border: 1px solid #c8d1df;
  color: #152442;
  background: #fff;
  font-size: 0.92rem;
}

.auth-google:hover {
  border-color: #9eafc6;
  background: #f8faff;
}

.auth-google-mark {
  margin-right: 11px;
  background: conic-gradient(from -35deg, #4285f4, #34a853, #fbbc05, #ea4335, #4285f4);
  background-clip: text;
  color: transparent;
  font-size: 1.25rem;
  font-weight: 900;
}

.auth-footer {
  display: flex;
  margin-top: 24px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  color: #718097;
  font-size: 0.73rem;
}

.auth-footer span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.auth-footer svg {
  width: 17px;
  height: 17px;
}

@media (min-width: 1100px) {
  .auth-page {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(520px, 0.95fr);
  }

  .auth-hero {
    position: relative;
    display: block;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    color: #fff;
    background: #08316e url("../images/loginbg.png") center bottom / cover no-repeat;
  }

  .auth-hero-overlay {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 90% 45%, rgba(69, 166, 255, 0.18), transparent 42%),
      linear-gradient(90deg, rgba(3, 28, 70, 0.38), rgba(8, 72, 157, 0.08));
  }

  .auth-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(40px, 5vw, 78px);
    flex-direction: column;
  }

  .auth-brand-light {
    font-size: clamp(2rem, 2.7vw, 2.8rem);
  }

  .auth-brand-light .auth-brand-mark {
    width: 58px;
    height: 58px;
  }

  .auth-brand-light .auth-brand-mark img {
    top: -23px;
    left: -24px;
    width: 106px;
  }

  .auth-hero-copy {
    margin-top: clamp(42px, 7vh, 82px);
  }

  .auth-hero-copy h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(2.6rem, 4.1vw, 4.25rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
  }

  .auth-hero-copy h1 span {
    color: #4ca9ff;
  }

  .auth-hero-copy > p {
    max-width: 630px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 1.3vw, 1.22rem);
    line-height: 1.55;
  }

  .auth-features {
    display: grid;
    max-width: 760px;
    margin-top: clamp(30px, 5vh, 54px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
  }

  .auth-feature,
  .auth-stats-message {
    display: flex;
    align-items: center;
    gap: 11px;
  }

  .auth-feature-icon {
    display: grid;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    place-content: center;
    color: #fff;
    background: rgba(40, 133, 255, 0.48);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  }

  .auth-feature-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .auth-feature span:last-child {
    display: grid;
    gap: 4px;
  }

  .auth-feature strong,
  .auth-feature small {
    white-space: nowrap;
  }

  .auth-feature strong {
    font-size: 0.87rem;
  }

  .auth-feature small {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.78rem;
  }

  .auth-stats {
    display: grid;
    max-width: 830px;
    margin-top: auto;
    padding: 17px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 17px;
    grid-template-columns: minmax(220px, 1.8fr) repeat(3, minmax(90px, 0.7fr));
    background: rgba(20, 69, 139, 0.58);
    backdrop-filter: blur(12px);
  }

  .auth-stats-message {
    padding-right: 20px;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .auth-stat {
    display: grid;
    padding: 0 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.22);
    align-content: center;
    gap: 5px;
  }

  .auth-stat strong {
    font-size: clamp(1.45rem, 2vw, 2rem);
  }

  .auth-stat span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.77rem;
  }

  .auth-signin {
    background: #f5f8fd;
  }

}

.main-body {
  min-height: 100vh;
  min-height: 100svh;
  background: #f7f9fd;
}

.main-header {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid #e2e9f4;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 18px rgba(28, 61, 112, 0.06);
}

.main-header-inner {
  position: relative;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1440px);
  margin: 0 auto;
  padding:
    max(8px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    8px
    max(20px, env(safe-area-inset-left));
}

.main-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #08205b;
  text-decoration: none;
}

.main-brand-mark {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  overflow: hidden;
}

.main-brand-mark img {
  position: absolute;
  top: -19px;
  left: -20px;
  width: 88px;
  max-width: none;
  height: auto;
}

.main-brand-name {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
}

.main-brand-name span:last-child {
  color: #0789f7;
}

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

.header-notification,
.header-user-name {
  display: none;
}

.header-notification {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  place-content: center;
  color: #314b78;
  background: transparent;
  cursor: pointer;
}

.header-notification:hover {
  color: #073a9d;
  background: #edf5ff;
}

.header-notification svg,
.profile-avatar svg,
.profile-action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #0789f7;
}

.header-user-name {
  color: #253a60;
  font-weight: 650;
}

.profile-menu {
  position: relative;
}

.profile-menu-toggle {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 3px;
  border: 1px solid #d6e1f0;
  border-radius: 50%;
  place-content: center;
  color: #24518f;
  background: #f3f7fd;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.profile-menu-toggle:hover,
.profile-menu-toggle[aria-expanded="true"] {
  border-color: #8cb8ee;
  box-shadow: 0 0 0 4px rgba(8, 126, 234, 0.1);
}

.profile-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  place-content: center;
  background: linear-gradient(145deg, #e8f2ff, #cbdff8);
}

.profile-dropdown {
  position: absolute;
  z-index: 40;
  top: calc(100% + 12px);
  right: 0;
  display: none;
  width: min(290px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid #dce6f3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(25, 54, 105, 0.18);
}

.profile-dropdown.is-open {
  display: flex;
}

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

.profile-action {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  min-height: 66px;
  padding: 8px 5px;
  border: 0;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #425474;
  text-decoration: none;
  background: transparent;
  font-size: 0.7rem;
  font-weight: 650;
  cursor: pointer;
}

.profile-action:hover {
  color: #073a9d;
  background: #edf5ff;
}

.profile-action svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
}

.menu-toggle {
  display: inline-grid;
  width: 46px;
  height: 46px;
  padding: 11px;
  border: 1px solid #dbe5f3;
  border-radius: 12px;
  place-content: center;
  gap: 5px;
  color: #092b75;
  background: #fff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.main-navigation {
  position: fixed;
  z-index: 20;
  top: max(73px, calc(54px + env(safe-area-inset-top)));
  right: auto;
  bottom: 0;
  left: 0;
  display: block;
  width: min(280px, 84vw);
  padding: 16px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-right: 1px solid #dce6f3;
  border-radius: 0;
  visibility: hidden;
  background: #fff;
  box-shadow: 8px 0 30px rgba(25, 54, 105, 0.16);
  transform: translateX(-105%);
  transition:
    transform 200ms ease,
    visibility 200ms ease;
}

.main-navigation.is-open {
  visibility: visible;
  transform: translateX(0);
}

.navigation-backdrop {
  position: fixed;
  z-index: 15;
  top: max(73px, calc(54px + env(safe-area-inset-top)));
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  padding: 0;
  border: 0;
  visibility: hidden;
  background: rgba(13, 35, 72, 0.28);
  opacity: 0;
  cursor: pointer;
  transition:
    opacity 200ms ease,
    visibility 200ms ease;
}

.navigation-backdrop.is-visible {
  visibility: visible;
  opacity: 1;
}

.sidebar-toggle {
  display: none;
}

.main-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.main-tab {
  position: relative;
  display: flex;
  min-height: 46px;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  align-items: center;
  gap: 12px;
  color: #5e6d88;
  text-align: left;
  background: transparent;
  font-weight: 650;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.tab-icon {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-label {
  white-space: nowrap;
}

.main-tab:hover,
.main-tab.is-active {
  color: #073a9d;
  background: #edf5ff;
}

.main-tab:focus-visible,
.menu-toggle:focus-visible,
.sidebar-toggle:focus-visible,
.header-notification:focus-visible,
.profile-menu-toggle:focus-visible,
.profile-action:focus-visible,
.main-brand:focus-visible,
.auth-submit:focus-visible,
.auth-google:focus-visible,
.auth-eye:focus-visible {
  outline: 3px solid rgba(9, 88, 214, 0.3);
  outline-offset: 3px;
}

.main-page {
  width: min(100%, 1440px);
  min-height: calc(100vh - 73px);
  min-height: calc(100svh - 73px);
  margin: 0 auto;
}

.tab-panel {
  min-height: inherit;
  outline: none;
}

.tab-panel[hidden] {
  display: none;
}

.dashboard-content {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px);
}

.dashboard-heading {
  margin-bottom: clamp(22px, 3vw, 36px);
}

.dashboard-heading p {
  margin: 0 0 5px;
  color: #6980a3;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-heading h1 {
  margin: 0;
  color: #102956;
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 2vw, 22px);
}

.dashboard-card {
  --card-color: #087eea;
  --card-soft-color: #eaf4ff;
  position: relative;
  display: flex;
  min-height: 142px;
  padding: clamp(20px, 3vw, 28px);
  overflow: hidden;
  border: 1px solid #e1e9f5;
  border-radius: 20px;
  align-items: center;
  gap: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(36, 65, 112, 0.07);
}

.dashboard-card::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 76px;
  height: 76px;
  border-radius: 0 0 0 76px;
  background: var(--card-soft-color);
  content: "";
  opacity: 0.7;
}

.dashboard-card-icon {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 17px;
  place-content: center;
  color: var(--card-color);
  background: var(--card-soft-color);
}

.dashboard-card-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-card-copy {
  position: relative;
  z-index: 1;
}

.dashboard-card-copy p {
  margin: 0 0 5px;
  color: #667792;
  font-size: 0.95rem;
  font-weight: 650;
}

.dashboard-card-copy strong {
  display: block;
  color: #102956;
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.dashboard-card-online {
  --card-color: #0d9d68;
  --card-soft-color: #e4f8f0;
}

.dashboard-card-active {
  --card-color: #087eea;
  --card-soft-color: #e7f3ff;
}

.dashboard-card-completed {
  --card-color: #6658d3;
  --card-soft-color: #eeebff;
}

.dashboard-card-canceled {
  --card-color: #d64d57;
  --card-soft-color: #ffebed;
}

.profile-content {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px);
}

.profile-heading {
  margin-bottom: clamp(20px, 3vw, 32px);
}

.profile-heading p {
  margin: 0 0 5px;
  color: #6980a3;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-heading h1 {
  margin: 0;
  color: #102956;
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.profile-empty,
.operator-profile-card {
  border: 1px solid #dfe7f2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(36, 65, 112, 0.07);
}

.profile-empty {
  padding: 22px;
  color: #60718c;
}

.operator-profile-card {
  overflow: hidden;
}

.operator-profile-hero {
  display: flex;
  padding: clamp(20px, 4vw, 34px);
  align-items: center;
  gap: clamp(14px, 3vw, 24px);
  background:
    radial-gradient(circle at 92% 12%, rgba(8, 126, 234, 0.16), transparent 35%),
    linear-gradient(135deg, #f8fbff, #edf6ff);
}

.operator-profile-avatar {
  display: grid;
  flex: 0 0 auto;
  width: clamp(72px, 12vw, 108px);
  height: clamp(72px, 12vw, 108px);
  overflow: hidden;
  border: 1px solid #cfe0f5;
  border-radius: 28px;
  place-content: center;
  color: #0769da;
  background: linear-gradient(145deg, #e8f2ff, #cbdff8);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.58);
  font-size: clamp(1.55rem, 4vw, 2.45rem);
  font-weight: 900;
  letter-spacing: -0.05em;
}

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

.operator-profile-copy {
  min-width: 0;
}

.operator-profile-copy p {
  margin: 0 0 6px;
  color: #6980a3;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.operator-profile-copy h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: #061d49;
  font-size: clamp(1.65rem, 5vw, 2.7rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.operator-profile-meta {
  display: flex;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #63738f;
  font-weight: 750;
}

.operator-status-pill {
  display: inline-flex;
  min-height: 24px;
  padding: 5px 10px;
  border-radius: 999px;
  align-items: center;
  color: #7b8799;
  background: #eef2f7;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
}

.operator-status-pill.is-active {
  color: #0bae63;
  background: #dff8e7;
}

.operator-status-pill.is-inactive {
  color: #b04754;
  background: #ffecef;
}

.operator-profile-grid {
  display: grid;
  padding: clamp(18px, 3vw, 28px);
  grid-template-columns: 1fr;
  gap: 12px;
}

.operator-profile-field {
  display: grid;
  min-width: 0;
  padding: 15px;
  border: 1px solid #e1e9f5;
  border-radius: 14px;
  gap: 6px;
  background: #f8fbff;
}

.operator-profile-field span {
  color: #7485a0;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.operator-profile-field strong {
  overflow-wrap: anywhere;
  color: #102956;
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  line-height: 1.3;
}

.agents-content {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px);
}

.agents-heading {
  display: grid;
  margin-bottom: clamp(20px, 3vw, 32px);
  gap: 16px;
}

.agents-heading p,
.agents-ratio span {
  margin: 0 0 5px;
  color: #6980a3;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.agents-heading h1 {
  margin: 0;
  color: #102956;
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.agents-ratio {
  width: fit-content;
  padding: 16px 20px;
  border: 1px solid #d7e5f5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(36, 65, 112, 0.07);
}

.agents-ratio strong {
  display: block;
  color: #0d9d68;
  font-size: clamp(1.9rem, 6vw, 2.55rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.agents-empty {
  padding: 22px;
  border: 1px dashed #cdd9e8;
  border-radius: 18px;
  color: #60718c;
  background: #fff;
}

.agents-list {
  display: grid;
  gap: 12px;
}

.agent-row {
  display: grid;
  min-height: 88px;
  padding: clamp(12px, 1.6vw, 18px);
  border: 1px solid #dfe7f2;
  border-radius: 14px;
  align-items: center;
  gap: clamp(10px, 1.6vw, 18px);
  background: #fff;
  box-shadow: 0 8px 20px rgba(37, 65, 106, 0.08);
}

.agent-card-profile {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: clamp(10px, 1.6vw, 15px);
}

.agent-avatar {
  display: grid;
  flex: 0 0 auto;
  width: clamp(44px, 5.5vw, 60px);
  height: clamp(44px, 5.5vw, 60px);
  border: 1px solid #dce5f1;
  border-radius: 50%;
  place-content: center;
  color: #0cbd6b;
  background: radial-gradient(circle at 50% 42%, #dff8e8 0 52%, #f7fbff 53% 100%);
  box-shadow: inset 0 0 0 4px #f8fbff;
}

.agent-avatar svg {
  width: clamp(24px, 3.4vw, 34px);
  height: clamp(24px, 3.4vw, 34px);
  fill: currentColor;
}

.agent-card-copy {
  min-width: 0;
}

.agent-card-copy h2 {
  margin: 0;
  overflow: hidden;
  color: #061d49;
  font-size: clamp(1rem, 1.9vw, 1rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-card-status-line {
  display: flex;
  margin-top: 5px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.agent-card-username {
  overflow: hidden;
  color: #8a99b5;
  font-size: clamp(0.70rem, 1.3vw, 0.90rem);
  font-weight: 750;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-session-pill {
  display: inline-flex;
  min-height: 20px;
  padding: 3px 8px;
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  color: #7b8799;
  background: #eef2f7;
  font-size: clamp(0.7rem, 1.1vw, 0.82rem);
  font-weight: 750;
  line-height: 1;
}

.agent-session-pill.is-online {
  color: #0bae63;
  background: #dff8e7;
}

.agent-online-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.agent-card-actions {
  display: grid;
  gap: 8px;
}

.agent-action {
  display: inline-flex;
  min-height: 36px;
  padding: 0 clamp(12px, 1.4vw, 18px);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: clamp(0.78rem, 1.1vw, 0.9rem);
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.agent-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agent-action-location {
  border: 2px solid #086eff;
  color: #086eff;
  background: #fff;
}

.agent-action:hover {
  transform: translateY(-1px);
}

.agent-action:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.agent-action:focus-visible {
  outline: 3px solid rgba(9, 88, 214, 0.3);
  outline-offset: 3px;
}

.location-dialog-open {
  overflow: hidden;
}

.location-dialog[hidden] {
  display: none;
}

.location-dialog {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  padding:
    max(18px, env(safe-area-inset-top))
    clamp(14px, 4vw, 32px)
    max(18px, env(safe-area-inset-bottom));
  place-items: center;
}

.location-dialog-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 14, 31, 0.58);
  cursor: pointer;
}

.location-dialog-panel {
  position: relative;
  display: grid;
  width: min(100%, 920px);
  max-height: min(760px, calc(100vh - 36px));
  max-height: min(760px, calc(100svh - 36px));
  overflow: hidden;
  border: 1px solid #d7e5f5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 25, 54, 0.28);
}

.location-dialog-header {
  display: flex;
  min-width: 0;
  padding: 18px 18px 14px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.location-dialog-header h2 {
  margin: 0;
  color: #061d49;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  line-height: 1.15;
}

.location-dialog-header p {
  margin: 5px 0 0;
  color: #6980a3;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.3;
}

.location-dialog-close {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #d7e5f5;
  border-radius: 8px;
  place-content: center;
  color: #39516f;
  background: #f7faff;
  cursor: pointer;
}

.location-dialog-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.location-dialog-close:hover,
.location-dialog-close:focus-visible {
  color: #086eff;
  border-color: #9fc6ff;
  outline: 0;
}

.agent-location-map {
  width: 100%;
  min-height: 340px;
  aspect-ratio: 16 / 10;
  border-top: 1px solid #d7e5f5;
}

.agent-location-map .leaflet-control-attribution {
  font-size: 0.68rem;
}

@media (min-width: 560px) {
  .dashboard-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (min-width: 768px) {
  .agents-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

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

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

  .agent-card-actions {
    grid-template-columns: minmax(136px, 180px);
    justify-content: end;
  }

  .main-header-inner {
    min-height: 82px;
    max-width: none;
    padding-right: clamp(28px, 4vw, 60px);
    padding-left: 18px;
  }

  .main-brand-mark {
    margin-left: 40px;
    width: 54px;
    height: 54px;
  }

  .main-brand-mark img {
    top: -21px;
    left: -22px;
    width: 98px;
  }

  .main-brand-name {
    font-size: 1.8rem;
  }

  .menu-toggle {
    display: none;
  }

  .header-notification {
    display: grid;
  }

  .header-user-name {
    display: block;
  }

  .navigation-backdrop {
    display: none;
  }

  .main-navigation {
    position: fixed;
    z-index: 9;
    top: 83px;
    right: auto;
    bottom: 0;
    left: 0;
    display: block;
    width: 78px;
    padding: 16px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-right: 1px solid #e2e9f4;
    border-radius: 0;
    visibility: visible;
    background: #fff;
    box-shadow: 4px 0 18px rgba(28, 61, 112, 0.05);
    transform: none;
    transition: width 200ms ease;
  }

  .main-navigation.is-expanded {
    width: 238px;
  }

  .sidebar-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    margin: 0 auto 18px;
    padding: 10px;
    border: 1px solid #dce6f3;
    border-radius: 12px;
    place-content: center;
    color: #29528e;
    background: #f8fbff;
    cursor: pointer;
    transition:
      margin 200ms ease,
      color 160ms ease,
      background-color 160ms ease;
  }

  .main-navigation.is-expanded .sidebar-toggle {
    margin-right: 2px;
  }

  .sidebar-toggle:hover {
    color: #073a9d;
    background: #edf5ff;
  }

  .sidebar-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 200ms ease;
  }

  .main-navigation.is-expanded .sidebar-toggle svg {
    transform: rotate(180deg);
  }

  .main-tabs {
    flex-direction: column;
    gap: 8px;
  }

  .main-tab {
    width: 100%;
    min-height: 52px;
    padding: 12px 17px;
    overflow: hidden;
    border-radius: 12px;
    text-align: left;
    background: transparent;
    font-size: 1rem;
  }

  .main-tab::after {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: -10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #087eea;
    content: "";
    opacity: 0;
    transform: scaleY(0.4);
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  .main-tab:hover {
    color: #073a9d;
    background: #f4f8ff;
  }

  .main-tab.is-active {
    color: #073a9d;
    background: #edf5ff;
  }

  .main-tab.is-active::after {
    opacity: 1;
    transform: scaleY(1);
  }

  .tab-label {
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition:
      width 200ms ease,
      opacity 140ms ease;
  }

  .main-navigation.is-expanded .tab-label {
    width: 130px;
    opacity: 1;
  }

  .main-page {
    width: auto;
    min-height: calc(100vh - 83px);
    min-height: calc(100svh - 83px);
    margin-left: 78px;
    transition: margin-left 200ms ease;
  }

  .main-body.sidebar-expanded .main-page {
    margin-left: 238px;
  }
}

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

  .dashboard-card {
    min-height: 166px;
    align-items: flex-start;
  }

  .dashboard-card-copy strong {
    margin-top: 12px;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

:root[data-theme="dark"] body {
  color: #e8eefc;
  background: #07111f;
}

:root[data-theme="dark"] .main-body {
  color: #e8eefc;
  background:
    radial-gradient(circle at 20% 10%, rgba(8, 126, 234, 0.16), transparent 30%),
    radial-gradient(circle at 92% 28%, rgba(13, 157, 104, 0.12), transparent 34%),
    #07111f;
}

:root[data-theme="dark"] .main-header {
  border-color: #1c2c46;
  background: rgba(9, 18, 33, 0.96);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .main-brand,
:root[data-theme="dark"] .dashboard-heading h1,
:root[data-theme="dark"] .profile-heading h1,
:root[data-theme="dark"] .operator-profile-copy h2,
:root[data-theme="dark"] .operator-profile-field strong,
:root[data-theme="dark"] .agents-heading h1,
:root[data-theme="dark"] .dashboard-card-copy strong,
:root[data-theme="dark"] .agent-card-copy h2 {
  color: #f4f7ff;
}

:root[data-theme="dark"] .header-user-name,
:root[data-theme="dark"] .dashboard-card-copy p,
:root[data-theme="dark"] .profile-heading p,
:root[data-theme="dark"] .operator-profile-copy p,
:root[data-theme="dark"] .operator-profile-meta,
:root[data-theme="dark"] .operator-profile-field span,
:root[data-theme="dark"] .agents-heading p,
:root[data-theme="dark"] .agents-ratio span,
:root[data-theme="dark"] .agent-card-username {
  color: #a9b7d0;
}

:root[data-theme="dark"] .header-notification,
:root[data-theme="dark"] .profile-menu-toggle,
:root[data-theme="dark"] .menu-toggle,
:root[data-theme="dark"] .sidebar-toggle,
:root[data-theme="dark"] .main-tab {
  color: #c6d6f2;
  background: #101b2d;
  border-color: #263852;
}

:root[data-theme="dark"] .header-notification:hover,
:root[data-theme="dark"] .profile-menu-toggle:hover,
:root[data-theme="dark"] .profile-menu-toggle[aria-expanded="true"],
:root[data-theme="dark"] .sidebar-toggle:hover,
:root[data-theme="dark"] .main-tab:hover,
:root[data-theme="dark"] .main-tab.is-active {
  color: #8bc4ff;
  background: #132d4c;
}

:root[data-theme="dark"] .profile-avatar {
  background: linear-gradient(145deg, #17365a, #0f243d);
}

:root[data-theme="dark"] .profile-dropdown {
  border-color: #263852;
  background: #0d1728;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

:root[data-theme="dark"] .profile-action {
  color: #d5def0;
}

:root[data-theme="dark"] .profile-action:hover,
:root[data-theme="dark"] .profile-theme-toggle[aria-pressed="true"] {
  color: #8bc4ff;
  background: #132d4c;
}

:root[data-theme="dark"] .main-navigation {
  border-color: #1c2c46;
  background: #091221;
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.32);
}

:root[data-theme="dark"] .navigation-backdrop {
  background: rgba(0, 0, 0, 0.54);
}

:root[data-theme="dark"] .dashboard-card,
:root[data-theme="dark"] .profile-empty,
:root[data-theme="dark"] .operator-profile-card,
:root[data-theme="dark"] .agents-ratio,
:root[data-theme="dark"] .agent-row,
:root[data-theme="dark"] .agents-empty {
  border-color: #22344f;
  background: rgba(13, 25, 43, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
}

:root[data-theme="dark"] .operator-profile-hero {
  background:
    radial-gradient(circle at 92% 12%, rgba(8, 126, 234, 0.22), transparent 35%),
    linear-gradient(135deg, #101b2d, #0d243f);
}

:root[data-theme="dark"] .operator-profile-avatar {
  border-color: #284061;
  color: #8bc4ff;
  background: linear-gradient(145deg, #17365a, #0f243d);
  box-shadow: inset 0 0 0 5px rgba(7, 17, 31, 0.58);
}

:root[data-theme="dark"] .operator-profile-field {
  border-color: #22344f;
  background: #101b2d;
}

:root[data-theme="dark"] .profile-empty {
  color: #b7c4d9;
}

:root[data-theme="dark"] .operator-status-pill {
  color: #b8c4d7;
  background: #1b2739;
}

:root[data-theme="dark"] .operator-status-pill.is-active {
  color: #24df88;
  background: rgba(18, 112, 68, 0.36);
}

:root[data-theme="dark"] .operator-status-pill.is-inactive {
  color: #ff8d9a;
  background: rgba(150, 42, 55, 0.34);
}

:root[data-theme="dark"] .dashboard-card::after {
  opacity: 0.22;
}

:root[data-theme="dark"] .dashboard-card-online {
  --card-soft-color: rgba(13, 157, 104, 0.2);
}

:root[data-theme="dark"] .dashboard-card-active {
  --card-soft-color: rgba(8, 126, 234, 0.22);
}

:root[data-theme="dark"] .dashboard-card-completed {
  --card-soft-color: rgba(102, 88, 211, 0.22);
}

:root[data-theme="dark"] .dashboard-card-canceled {
  --card-soft-color: rgba(214, 77, 87, 0.2);
}

:root[data-theme="dark"] .agents-ratio strong {
  color: #2be08e;
}

:root[data-theme="dark"] .agents-empty {
  color: #b7c4d9;
}

:root[data-theme="dark"] .agent-avatar {
  border-color: #284061;
  color: #20d884;
  background: radial-gradient(circle at 50% 42%, #123c2d 0 52%, #0e192a 53% 100%);
  box-shadow: inset 0 0 0 4px #0c1626;
}

:root[data-theme="dark"] .agent-session-pill {
  color: #b8c4d7;
  background: #1b2739;
}

:root[data-theme="dark"] .agent-session-pill.is-online {
  color: #24df88;
  background: rgba(18, 112, 68, 0.36);
}

:root[data-theme="dark"] .agent-action-location {
  color: #8bc4ff;
  border-color: #2d8dff;
  background: #101b2d;
}

:root[data-theme="dark"] .location-dialog-backdrop {
  background: rgba(0, 0, 0, 0.68);
}

:root[data-theme="dark"] .location-dialog-panel {
  border-color: #22344f;
  background: #0d192b;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

:root[data-theme="dark"] .location-dialog-header h2 {
  color: #f4f7ff;
}

:root[data-theme="dark"] .location-dialog-header p {
  color: #a9b7d0;
}

:root[data-theme="dark"] .location-dialog-close {
  color: #c6d6f2;
  border-color: #263852;
  background: #101b2d;
}

:root[data-theme="dark"] .location-dialog-close:hover,
:root[data-theme="dark"] .location-dialog-close:focus-visible {
  color: #8bc4ff;
  border-color: #2d8dff;
}

:root[data-theme="dark"] .agent-location-map {
  border-color: #22344f;
}

@media (prefers-reduced-motion: reduce) {
  .auth-input-wrap,
  .auth-submit,
  .auth-google,
  .menu-toggle span,
  .profile-menu-toggle,
  .sidebar-toggle,
  .sidebar-toggle svg,
  .main-tab,
  .main-tab::after,
  .tab-label,
  .main-navigation,
  .navigation-backdrop,
  .main-page {
    transition: none;
  }
}
