:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #172b3a;
  background: #eef2f4;
  font-synthesis: none;
  --navy-950: #0b2233;
  --navy-900: #102d3f;
  --navy-800: #173b4d;
  --teal-700: #1c706f;
  --teal-600: #278681;
  --teal-100: #dff1ef;
  --blue-600: #3e75a7;
  --amber-600: #b87927;
  --red-600: #b9534d;
  --ink-900: #172b3a;
  --ink-700: #405563;
  --ink-500: #71818a;
  --ink-400: #92a0a7;
  --line: #dfe6e8;
  --line-strong: #ccd7da;
  --surface: #ffffff;
  --surface-soft: #f6f8f8;
  --canvas: #eef2f3;
  --shadow: 0 10px 30px rgba(20, 44, 57, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
}

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

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

button {
  border: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #54a7a1;
  outline-offset: 2px;
}

svg:not(.leaflet-overlay-pane > svg) {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

.fallback-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  font-size: 13px;
  font-style: normal;
  line-height: 1;
}

/* Login */
.login-shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(480px, 1.08fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 64px clamp(42px, 7vw, 112px);
  color: #f4f8fa;
  background: #0f3041;
}

.brand-panel::before,
.brand-panel::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.brand-panel::before {
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(185, 219, 218, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185, 219, 218, 0.25) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom right, transparent, #000);
}

.brand-panel::after {
  right: 9%;
  bottom: 12%;
  width: 180px;
  height: 120px;
  border-right: 1px solid rgba(190, 222, 222, 0.25);
  border-bottom: 1px solid rgba(190, 222, 222, 0.25);
}

.brand-mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(230, 244, 242, 0.48);
  color: #d8f1ed;
  font-size: 18px;
  font-weight: 700;
}

.brand-copy,
.brand-footer {
  position: relative;
  z-index: 1;
}

.brand-copy {
  max-width: 460px;
  margin-top: auto;
  margin-bottom: auto;
}

.eyebrow,
.form-kicker {
  margin: 0 0 22px;
  color: #82c8c1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}

.brand-copy h1 {
  margin: 0;
  font-size: 58px;
  font-weight: 600;
  line-height: 1.18;
}

.brand-description {
  max-width: 340px;
  margin: 25px 0 0;
  color: #bad0d5;
  font-size: 15px;
  line-height: 1.9;
}

.brand-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9bb8be;
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7fd4c5;
  box-shadow: 0 0 0 4px rgba(127, 212, 197, 0.12);
}

.form-panel {
  display: grid;
  place-items: center;
  padding: 48px 7vw;
  background: #f7f9f9;
}

.form-wrap {
  width: min(100%, 390px);
}

.mobile-brand {
  display: none;
}

.form-panel h2 {
  margin: 0;
  color: #162e3f;
  font-size: 34px;
  font-weight: 600;
}

.form-intro {
  margin: 13px 0 39px;
  color: #84939a;
  font-size: 14px;
}

.field {
  display: block;
  margin-bottom: 22px;
}

.field > span {
  display: block;
  margin-bottom: 9px;
  color: #35505d;
  font-size: 13px;
  font-weight: 700;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #cbd6d9;
  color: #7e969c;
  transition: border-color 160ms ease, color 160ms ease;
}

.input-wrap:focus-within {
  border-bottom-color: #2b8d87;
  color: #2b8d87;
}

.input-wrap > svg {
  width: 17px;
}

.input-wrap input {
  width: 100%;
  height: 43px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #233e4c;
  background: transparent;
  font-size: 14px;
}

input::placeholder,
textarea::placeholder {
  color: #a6b3b7;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: #7e9098;
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--teal-700);
  background: #edf5f4;
}

.field-error {
  display: block;
  min-height: 17px;
  padding-top: 5px;
  color: #bd5b50;
  font-size: 11px;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1px 0 30px;
  font-size: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6e8087;
  cursor: pointer;
}

.checkbox-label input {
  width: 14px;
  height: 14px;
  accent-color: #2b8d87;
}

a {
  color: #378b88;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.submit-button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.submit-button {
  width: 100%;
  height: 50px;
  justify-content: space-between;
  padding: 0 19px 0 22px;
  color: #fff;
  background: #1f7474;
  font-size: 14px;
}

.submit-button:hover,
.primary-button:hover {
  background: #185e62;
}

.submit-button:active,
.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.form-message {
  min-height: 20px;
  margin: 14px 0 0;
  color: #2d817a;
  font-size: 12px;
  text-align: center;
}

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 74px 0 15px;
  color: #9aa8ac;
  font-size: 11px;
}

.security-note svg {
  width: 14px;
  color: #6ba8a1;
}

.copyright {
  margin: 0;
  color: #b2bdc0;
  font-size: 10px;
  text-align: center;
}

/* Application shell */
.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--canvas);
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  width: 232px;
  height: 100vh;
  flex-direction: column;
  overflow: hidden;
  color: #c9d6da;
  background: var(--navy-950);
  transition: width 180ms ease, transform 180ms ease;
}

.sidebar-brand {
  display: flex;
  height: 68px;
  flex: 0 0 68px;
  align-items: center;
  gap: 11px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid rgba(213, 231, 232, 0.1);
}

.brand-symbol {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid rgba(217, 241, 237, 0.4);
  color: #d9f1ed;
  font-size: 12px;
  font-weight: 700;
}

.brand-name {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
}

.brand-name strong {
  color: #f2f7f8;
  font-size: 14px;
}

.brand-name span {
  margin-top: 3px;
  color: #75919c;
  font-size: 8px;
  letter-spacing: 1.2px;
}

.sidebar .sidebar-toggle {
  width: 28px;
  color: #8198a1;
}

.sidebar .sidebar-toggle:hover,
.sidebar .icon-button:hover {
  color: #dff1ef;
  background: rgba(222, 242, 239, 0.08);
}

.sidebar-nav {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 10px 20px;
  scrollbar-width: thin;
  scrollbar-color: #2b4655 transparent;
}

.nav-group + .nav-group {
  margin-top: 14px;
}

.nav-group-label {
  height: 28px;
  margin: 0;
  padding: 6px 10px;
  overflow: hidden;
  color: #667f8b;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  height: 38px;
  align-items: center;
  gap: 11px;
  padding: 0 10px;
  overflow: hidden;
  color: #aebec4;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

.nav-item svg {
  width: 17px;
  color: #879ca5;
}

.nav-item:hover {
  color: #f0f7f7;
  background: rgba(222, 242, 239, 0.07);
}

.nav-item.active {
  color: #f7fbfb;
  background: rgba(70, 169, 159, 0.18);
}

.nav-item.active::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  background: #62b9b0;
  content: "";
}

.nav-item.active svg {
  color: #78c8bf;
}

.nav-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 10px;
  color: #d8efed;
  background: rgba(92, 171, 163, 0.24);
  font-size: 10px;
  font-style: normal;
}

.sidebar-bottom {
  flex: 0 0 auto;
  padding: 8px 10px 12px;
  border-top: 1px solid rgba(213, 231, 232, 0.1);
}

.sidebar-user {
  display: flex;
  height: 54px;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 6px 7px;
}

.avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 50%;
  color: #e6f4f2;
  background: #367b79;
  font-size: 12px;
  font-weight: 700;
}

.user-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
}

.user-copy strong {
  color: #e8f0f2;
  font-size: 12px;
}

.user-copy span {
  margin-top: 3px;
  color: #758d98;
  font-size: 9px;
}

.app-shell.sidebar-collapsed .sidebar {
  width: 72px;
}

.app-shell.sidebar-collapsed .brand-name,
.app-shell.sidebar-collapsed .nav-group-label,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .nav-badge,
.app-shell.sidebar-collapsed .user-copy,
.app-shell.sidebar-collapsed .sidebar-user .icon-button {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding: 0;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  right: -12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-500);
  box-shadow: 0 3px 10px rgba(12, 33, 45, 0.1);
}

.app-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0;
}

.app-shell.sidebar-collapsed .sidebar-user {
  justify-content: center;
  padding: 6px 0;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.topbar-left,
.topbar-actions,
.breadcrumb,
.top-user {
  display: flex;
  align-items: center;
}

.topbar-left {
  min-width: 0;
}

.mobile-menu {
  display: none;
  margin-right: 8px;
}

.breadcrumb {
  gap: 6px;
  color: var(--ink-500);
  font-size: 12px;
}

.breadcrumb svg {
  width: 13px;
  color: #a8b3b8;
}

.breadcrumb strong {
  color: var(--ink-900);
  font-weight: 700;
}

.topbar-actions {
  gap: 9px;
}

.global-search {
  display: flex;
  width: 286px;
  height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: #f8fafa;
  color: var(--ink-400);
}

.global-search:focus-within {
  border-color: #79aaa7;
  background: #fff;
}

.global-search svg {
  width: 16px;
}

.global-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-900);
  font-size: 12px;
}

kbd {
  padding: 2px 5px;
  border: 1px solid #d7dfe1;
  color: #8e9ba1;
  background: #fff;
  font: 9px Arial, sans-serif;
}

.primary-button {
  color: #fff;
  background: var(--teal-700);
}

.primary-button svg:last-child:first-child {
  margin-left: 0;
}

.primary-button svg:last-child {
  width: 14px;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--ink-700);
  background: #fff;
}

.secondary-button:hover {
  border-color: #8eaaa9;
  color: var(--teal-700);
  background: #f6fbfa;
}

.top-icon-button {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: #60747e;
  background: transparent;
  cursor: pointer;
}

.top-icon-button:hover {
  background: #f1f5f5;
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 6px;
  height: 6px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #ca5d55;
}

.top-user {
  gap: 8px;
  height: 40px;
  padding: 0 5px;
  color: var(--ink-700);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.top-user svg {
  width: 14px;
}

.dropdown-wrap {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 200px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.quick-create-menu {
  padding: 6px;
}

.quick-create-menu button {
  display: flex;
  width: 100%;
  height: 39px;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  color: var(--ink-700);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

.quick-create-menu button:hover {
  color: var(--teal-700);
  background: #eef7f6;
}

.quick-create-menu svg {
  width: 16px;
}

.notification-menu {
  width: 326px;
}

.dropdown-title {
  display: flex;
  height: 46px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.dropdown-title button {
  color: var(--teal-700);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.notice-item {
  display: flex;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid #edf1f2;
}

.notice-item:last-child {
  border-bottom: 0;
}

.notice-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
}

.notice-icon.warning {
  color: var(--amber-600);
  background: #fff4df;
}

.notice-icon.info {
  color: var(--blue-600);
  background: #eaf2f9;
}

.notice-icon svg {
  width: 15px;
}

.notice-item strong,
.notice-item p {
  margin: 0;
}

.user-menu {
  width: 210px;
  padding: 6px;
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -6px -6px 6px;
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
}

.user-menu-header div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.user-menu-header strong {
  color: var(--ink-900);
  font-size: 12px;
}

.user-menu-header small {
  margin-top: 3px;
  color: var(--ink-500);
  font-size: 9px;
}

.user-menu > button {
  display: flex;
  width: 100%;
  height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  color: var(--ink-700);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  text-align: left;
}

.user-menu > button:hover {
  color: var(--teal-700);
  background: #eef7f6;
}

.user-menu > button svg {
  width: 15px;
}

.user-menu .user-menu-logout {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  color: var(--red-600);
}

.notice-item strong {
  color: var(--ink-900);
  font-size: 12px;
}

.notice-item p {
  margin-top: 4px;
  color: var(--ink-500);
  font-size: 10px;
}

.page-content {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 24px;
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-heading h1,
.page-heading p {
  margin: 0;
}

.page-heading h1 {
  color: var(--ink-900);
  font-size: 24px;
  font-weight: 650;
}

.page-heading > div > p:last-child {
  margin-top: 7px;
  color: var(--ink-500);
  font-size: 12px;
}

.page-heading .date-line {
  margin-bottom: 6px;
  color: var(--teal-700);
  font-size: 10px;
  font-weight: 700;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.metric-item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 102px;
  align-items: center;
  gap: 13px;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.metric-item:last-child {
  border-right: 0;
}

.metric-item:hover {
  background: #f8fbfb;
}

.metric-item.active::after {
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 2px;
  background: var(--teal-600);
  content: "";
}

.metric-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
}

.metric-icon.teal {
  color: var(--teal-700);
  background: #e4f2f0;
}

.metric-icon.blue {
  color: var(--blue-600);
  background: #e9f1f8;
}

.metric-icon.amber {
  color: var(--amber-600);
  background: #fff3dd;
}

.metric-icon.red {
  color: var(--red-600);
  background: #fbe9e7;
}

.metric-item > span:last-child {
  display: grid;
  min-width: 0;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 9px;
}

.metric-item small {
  grid-column: 1 / -1;
  color: var(--ink-500);
  font-size: 11px;
}

.metric-item strong {
  margin-top: 3px;
  color: var(--ink-900);
  font-size: 25px;
  line-height: 1.1;
}

.metric-item em {
  color: var(--ink-400);
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.primary-grid {
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.75fr);
}

.secondary-grid {
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.75fr);
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.panel-header {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2,
.panel-header p {
  margin: 0;
}

.panel-header h2 {
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 700;
}

.panel-header p {
  margin-top: 4px;
  color: var(--ink-400);
  font-size: 10px;
}

.text-button,
.link-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  color: var(--teal-700);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.text-button svg {
  width: 13px;
}

.segment-control {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 4px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.segment-control button {
  display: inline-flex;
  height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  color: var(--ink-500);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.segment-control button:hover {
  color: var(--teal-700);
}

.segment-control button.active {
  color: #fff;
  background: var(--teal-700);
}

.segment-control span {
  color: inherit;
  opacity: 0.75;
  font-size: 9px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink-700);
  font-size: 11px;
  white-space: nowrap;
}

.data-table th {
  height: 37px;
  padding: 0 12px;
  color: var(--ink-500);
  background: #f7f9f9;
  font-size: 10px;
  font-weight: 600;
  text-align: left;
}

.data-table td {
  height: 47px;
  padding: 0 12px;
  border-top: 1px solid #edf1f2;
}

.data-table tbody tr:hover {
  background: #f8fbfb;
}

.task-title {
  display: flex;
  max-width: 250px;
  align-items: center;
  gap: 8px;
}

.task-title > span:first-child {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #6da9a4;
}

.task-title > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-deadline.urgent {
  color: var(--red-600);
}

.task-deadline.warning {
  color: var(--amber-600);
}

.status {
  display: inline-flex;
  height: 22px;
  align-items: center;
  padding: 0 8px;
  font-size: 9px;
}

.status.normal {
  color: #256e69;
  background: #e5f2f0;
}

.status.warning {
  color: #97621f;
  background: #fff1d8;
}

.status.rejected {
  color: #ad4d47;
  background: #fae8e6;
}

.status.draft {
  color: #687780;
  background: #edf1f2;
}

.table-action {
  color: var(--teal-700);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
}

.calendar-day {
  display: grid;
  min-width: 0;
  height: 44px;
  place-items: center;
  color: var(--ink-500);
  background: transparent;
  font-size: 10px;
}

.calendar-day strong {
  color: var(--ink-700);
  font-size: 12px;
}

.calendar-day.today {
  color: #fff;
  background: var(--teal-700);
}

.calendar-day.today strong {
  color: #fff;
}

.schedule-list {
  padding: 4px 14px 9px;
}

.schedule-list button {
  display: grid;
  width: 100%;
  min-height: 54px;
  grid-template-columns: 36px 6px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f2;
  color: var(--ink-700);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.schedule-list button:last-child {
  border-bottom: 0;
}

.schedule-list time {
  color: var(--ink-500);
  font-size: 9px;
}

.schedule-mark {
  width: 3px;
  height: 30px;
}

.schedule-mark.teal {
  background: var(--teal-600);
}

.schedule-mark.amber {
  background: #d19a45;
}

.schedule-mark.blue {
  background: #5c8db9;
}

.schedule-list strong,
.schedule-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-list strong {
  color: var(--ink-700);
  font-size: 11px;
}

.schedule-list small {
  margin-top: 4px;
  color: var(--ink-400);
  font-size: 9px;
}

.order-table td:nth-child(2) {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress {
  display: inline-block;
  width: 72px;
  height: 5px;
  margin-right: 6px;
  overflow: hidden;
  background: #e5ebed;
  vertical-align: middle;
}

.progress i {
  display: block;
  height: 100%;
  background: var(--teal-600);
}

.progress-value {
  color: var(--ink-500);
  font-size: 9px;
}

.count-badge {
  display: grid;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  place-items: center;
  border-radius: 12px;
  color: #a94742;
  background: #fbe9e7;
  font-size: 10px;
  font-weight: 700;
}

.risk-list {
  padding: 5px 14px 8px;
}

.risk-list button {
  display: grid;
  width: 100%;
  min-height: 55px;
  grid-template-columns: 5px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f2;
  color: var(--ink-700);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.risk-list button:last-child {
  border-bottom: 0;
}

.risk-list button:hover strong {
  color: var(--teal-700);
}

.risk-list button > svg {
  width: 14px;
  color: var(--ink-400);
}

.risk-level {
  width: 4px;
  height: 31px;
}

.risk-level.high {
  background: var(--red-600);
}

.risk-level.medium {
  background: #d3983f;
}

.risk-level.low {
  background: #668aaa;
}

.risk-list strong,
.risk-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-list strong {
  font-size: 11px;
}

.risk-list small {
  margin-top: 4px;
  color: var(--ink-400);
  font-size: 9px;
}

/* General module pages */
.module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.module-filters {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.filter-input,
.filter-select {
  height: 36px;
  border: 1px solid var(--line-strong);
  color: var(--ink-700);
  background: #fff;
  font-size: 11px;
}

.filter-input {
  width: 240px;
  padding: 0 11px;
}

.filter-select {
  min-width: 116px;
  padding: 0 28px 0 10px;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.summary-item {
  min-height: 76px;
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}

.summary-item:last-child {
  border-right: 0;
}

.summary-item small,
.summary-item strong,
.summary-item span {
  display: block;
}

.summary-item small {
  color: var(--ink-500);
  font-size: 10px;
}

.summary-item strong {
  margin-top: 5px;
  color: var(--ink-900);
  font-size: 20px;
}

.summary-item span {
  margin-top: 3px;
  color: var(--ink-400);
  font-size: 9px;
}

.module-panel .data-table td {
  height: 50px;
}

.empty-state {
  display: grid;
  min-height: 300px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--ink-500);
  background: #fff;
  font-size: 12px;
  text-align: center;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  color: #9badaf;
}

.pagination {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-500);
  font-size: 10px;
}

.pagination button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--ink-500);
  background: #fff;
  cursor: pointer;
}

.pagination button.active {
  color: #fff;
  background: var(--teal-700);
}

/* Modal and feedback */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 26, 36, 0.52);
}

.modal {
  width: min(100%, 560px);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 24px 70px rgba(7, 30, 43, 0.22);
}

.modal-header {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header p,
.modal-header h2 {
  margin: 0;
}

.modal-header p {
  margin-bottom: 4px;
  color: var(--teal-700);
  font-size: 9px;
  font-weight: 700;
}

.modal-header h2 {
  font-size: 17px;
}

.modal form {
  padding: 18px;
}

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

.form-grid label {
  display: block;
  min-width: 0;
}

.form-grid label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-700);
  font-size: 11px;
  font-weight: 600;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  color: var(--ink-900);
  background: #fff;
  outline: 0;
  font-size: 12px;
}

.form-grid input,
.form-grid select {
  height: 38px;
  padding: 0 10px;
}

.form-grid textarea {
  resize: vertical;
  padding: 10px;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: var(--teal-600);
}

.full-width {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  display: flex;
  min-width: 250px;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  color: #e9f7f5;
  background: #174b4b;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 180ms ease, transform 180ms ease;
  font-size: 12px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast svg {
  color: #83d2c8;
}

.sidebar-mask {
  display: none;
}

@media (max-width: 1280px) {
  .page-content {
    padding: 20px;
  }

  .global-search {
    width: 230px;
  }

  .metric-item {
    padding: 16px;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .app-shell .sidebar {
    width: 72px;
  }

  .app-shell .brand-name,
  .app-shell .nav-group-label,
  .app-shell .nav-label,
  .app-shell .nav-badge,
  .app-shell .user-copy,
  .app-shell .sidebar-user .icon-button {
    display: none;
  }

  .app-shell .sidebar-brand {
    justify-content: center;
    padding: 0;
  }

  .app-shell .sidebar-toggle {
    display: none;
  }

  .app-shell .nav-item {
    justify-content: center;
    padding: 0;
  }

  .app-shell .sidebar-user {
    justify-content: center;
    padding: 6px 0;
  }

  .primary-grid,
  .secondary-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.7fr);
  }

  .global-search {
    width: 200px;
  }
}

@media (max-width: 860px) {
  .login-shell {
    display: block;
  }

  .brand-panel {
    display: none;
  }

  .form-panel {
    min-height: 100vh;
    padding: 34px 25px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 70px;
    color: #244454;
    font-size: 14px;
    font-weight: 700;
  }

  .mobile-brand .brand-mark {
    width: 40px;
    height: 40px;
    border-color: #679d9a;
    color: #2b7777;
    font-size: 14px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    width: 232px !important;
    transform: translateX(-100%);
    box-shadow: 16px 0 40px rgba(7, 27, 39, 0.2);
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .app-shell .brand-name,
  .app-shell .nav-group-label,
  .app-shell .nav-label,
  .app-shell .nav-badge,
  .app-shell .user-copy,
  .app-shell .sidebar-user .icon-button {
    display: flex;
  }

  .app-shell .nav-group-label {
    display: block;
  }

  .app-shell .sidebar-brand,
  .app-shell .sidebar-user,
  .app-shell .nav-item {
    justify-content: flex-start;
  }

  .app-shell .sidebar-brand {
    padding: 0 14px 0 16px;
  }

  .app-shell .nav-item {
    padding: 0 10px;
  }

  .app-shell .sidebar-user {
    padding: 6px 7px;
  }

  .sidebar-mask {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    background: rgba(9, 28, 39, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .app-shell.sidebar-open .sidebar-mask {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu {
    display: inline-grid;
  }

  .topbar {
    padding: 0 14px;
  }

  .global-search {
    display: none;
  }

  .primary-grid,
  .secondary-grid {
    grid-template-columns: 1fr;
  }

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

  .metric-item:nth-child(2) {
    border-right: 0;
  }

  .metric-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .page-content {
    padding: 16px 12px;
  }

  .top-user-name,
  .top-user > svg,
  .breadcrumb > span,
  .breadcrumb > svg {
    display: none;
  }

  .topbar-actions {
    gap: 3px;
  }

  .primary-button {
    padding: 0 10px;
  }

  .primary-button > svg:last-child {
    display: none;
  }

  .page-heading {
    align-items: flex-start;
  }

  .page-heading h1 {
    font-size: 20px;
  }

  .page-heading .secondary-button {
    width: 36px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    gap: 0;
  }

  .page-heading .secondary-button svg {
    color: var(--ink-700);
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .metric-item {
    min-height: 78px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-item:last-child {
    border-bottom: 0;
  }

  .segment-control {
    overflow-x: auto;
  }

  .segment-control button {
    flex: 0 0 auto;
  }

  .module-toolbar,
  .module-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-input,
  .filter-select {
    width: 100%;
  }

  .summary-band {
    grid-template-columns: 1fr;
  }

  .summary-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-item:last-child {
    border-bottom: 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: auto;
  }

  .notification-menu {
    position: fixed;
    top: 58px;
    right: 8px;
    left: 8px;
    width: auto;
  }
}
