:root {
  --ink: #18221f;
  --ink-soft: #56635e;
  --muted: #7f8c86;
  --line: #e2e7e4;
  --line-strong: #d2dad5;
  --paper: #ffffff;
  --canvas: #f3f5f3;
  --canvas-deep: #e9eeeb;
  --forest: #173f35;
  --forest-dark: #0f3028;
  --forest-soft: #dfeae4;
  --mint: #bce7d4;
  --coral: #f37658;
  --coral-soft: #fff0eb;
  --amber: #c48324;
  --amber-soft: #fff5df;
  --blue: #3c6f98;
  --blue-soft: #eaf3f9;
  --red: #b34942;
  --red-soft: #faedeb;
  --shadow-sm: 0 1px 2px rgba(15, 48, 40, .04), 0 6px 20px rgba(15, 48, 40, .035);
  --shadow-lg: 0 26px 70px rgba(15, 48, 40, .18);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --sidebar-width: 232px;
  --topbar-height: 72px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
}

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

button {
  color: inherit;
}

button,
a,
select,
input[type="date"],
input[type="file"] {
  cursor: pointer;
}

input,
textarea,
select {
  cursor: text;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -.04em;
  font-weight: 700;
}

h2 {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -.02em;
  font-weight: 650;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(243, 118, 88, .24);
  outline-offset: 2px;
}

.eyebrow,
.panel-kicker {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  background: var(--forest);
}

.brand-mark-square {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 4px;
  transform: rotate(12deg);
}

.brand-mark-dot {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
}

.aofitel-brand-tile {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
}

.aofitel-brand-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.aofitel-brand-tile-login {
  width: 58px;
  height: 58px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
}

.brand-mark-light {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
}

.brand-mark-light .brand-mark-square {
  width: 20px;
  height: 20px;
}

.brand-mark-light .brand-mark-dot {
  right: 9px;
  bottom: 9px;
}

.button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1;
  font-weight: 650;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

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

.button:active {
  transform: translateY(0);
}

.button-primary {
  background: var(--forest);
  color: #fff;
  box-shadow: 0 5px 16px rgba(23, 63, 53, .14);
}

.button-primary:hover {
  background: var(--forest-dark);
  box-shadow: 0 8px 20px rgba(23, 63, 53, .2);
}

.button-secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line-strong);
}

.button-secondary:hover {
  border-color: #acb8b2;
  background: #fbfcfb;
}

.button-ghost {
  background: transparent;
  color: var(--ink-soft);
}

.button-danger-ghost {
  background: var(--red-soft);
  color: var(--red);
  border-color: #f3d8d4;
}

.button-danger {
  background: var(--red);
  color: #fff;
}

.button-large {
  min-height: 50px;
  border-radius: 12px;
  padding-inline: 20px;
}

.button-block {
  width: 100%;
}

.button:disabled {
  opacity: .55;
  pointer-events: none;
}

.text-button {
  border: 0;
  padding: 4px;
  background: none;
  color: var(--forest);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 650;
}

.text-button:hover {
  color: var(--coral);
}

.text-button.danger {
  color: var(--red);
}

.drawer-section-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.icon-button:hover {
  background: rgba(23, 63, 53, .07);
}

.status-dot-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.status-dot-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3aa476;
  box-shadow: 0 0 0 4px rgba(58, 164, 118, .12);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea,
.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field textarea,
.modal-form textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.6;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.modal-form input:hover,
.modal-form select:hover,
.modal-form textarea:hover {
  border-color: #b2bdb7;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  outline: 0;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(23, 63, 53, .1);
}

.password-field {
  position: relative;
  display: block;
}

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

.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: 34px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.form-error {
  min-height: 18px;
  color: var(--red);
  font-size: 12px;
}

/* Login */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(460px, 1.15fr) minmax(420px, .85fr);
  background: #f7f8f7;
}

.login-brand {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 54px clamp(42px, 6vw, 92px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 15% 72%, rgba(155, 218, 190, .2), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(243, 118, 88, .14), transparent 26%),
    linear-gradient(135deg, #143a30, #0c2c25 65%, #0b2822);
  color: #fff;
}

.login-brand::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 28px;
  pointer-events: none;
}

.login-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
  margin: auto 0;
  padding: 60px 0;
}

.login-copy .eyebrow {
  color: #9ed0ba;
  margin-bottom: 24px;
}

.login-copy h1 {
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1.08;
  letter-spacing: -.055em;
  font-weight: 650;
}

.login-copy p {
  max-width: 500px;
  margin-top: 28px;
  color: rgba(255, 255, 255, .66);
  font-size: 16px;
  line-height: 1.85;
}

.login-proof {
  position: relative;
  z-index: 2;
  display: flex;
  gap: clamp(30px, 5vw, 72px);
}

.login-proof div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-proof strong {
  font-size: 24px;
  letter-spacing: -.04em;
}

.login-proof span {
  color: rgba(255, 255, 255, .55);
  font-size: 11px;
}

.login-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.orbit-one {
  width: 640px;
  height: 640px;
  right: -300px;
  top: 20%;
}

.orbit-two {
  width: 390px;
  height: 390px;
  right: -170px;
  top: calc(20% + 125px);
  border-color: rgba(243, 118, 88, .16);
}

.login-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px;
}

.login-card {
  width: min(100%, 420px);
}

.login-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 34px;
}

.login-card-head .eyebrow {
  margin-bottom: 10px;
}

.login-card-head h2 {
  font-size: 26px;
}

.demo-login {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.demo-login > span {
  color: var(--muted);
  font-size: 11px;
}

.demo-login-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.demo-login-grid button {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  padding: 10px 13px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.demo-login-grid button:hover {
  border-color: #afbeb6;
  background: #fbfcfb;
}

.demo-login-grid small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.login-note {
  margin-top: 24px;
  color: #98a19d;
  font-size: 10px;
  line-height: 1.7;
}

/* App shell */
.app-shell {
  min-height: 100vh;
  background: var(--canvas);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  background:
    radial-gradient(circle at 40% 110%, rgba(86, 150, 125, .17), transparent 34%),
    #102f28;
  color: #fff;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 27px;
}

.side-logo {
  display: flex;
  align-items: center;
  gap: 11px;
}

.side-logo > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-logo strong {
  max-width: 138px;
  overflow: hidden;
  font-size: 12px;
  letter-spacing: -.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-logo small {
  color: rgba(255, 255, 255, .42);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .14em;
}

.sidebar .aofitel-brand-tile {
  border: 1px solid rgba(255, 255, 255, .14);
}

.sidebar-close {
  display: none;
  color: #fff;
  font-size: 22px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-label {
  padding: 4px 13px 8px;
  color: rgba(255, 255, 255, .34);
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .14em;
}

.nav-section-spaced {
  margin-top: 19px;
}

.nav-item {
  position: relative;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: transparent;
  color: rgba(255, 255, 255, .62);
  font-size: 13px;
  font-weight: 550;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .055);
  color: #fff;
}

.nav-item.active {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -16px;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--coral);
}

.nav-count {
  margin-left: auto;
  min-width: 22px;
  padding: 3px 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .09);
  color: rgba(255, 255, 255, .72);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

.nav-count.is-accent {
  background: var(--coral);
  color: #fff;
}

.nav-icon {
  position: relative;
  display: inline-block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  opacity: .82;
}

.nav-icon::before,
.nav-icon::after {
  content: "";
  position: absolute;
  border: 1.5px solid currentColor;
}

.nav-icon-grid::before {
  inset: 1px;
  border-radius: 3px;
}

.nav-icon-grid::after {
  left: 8px;
  top: 1px;
  width: 1px;
  height: 15px;
  border-width: 0 0 0 1.5px;
  box-shadow: -7px 0 0 currentColor;
}

.nav-icon-store::before {
  inset: 4px 1px 1px;
  border-radius: 2px;
}

.nav-icon-store::after {
  left: 3px;
  top: 1px;
  width: 9px;
  height: 5px;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.nav-icon-task::before {
  inset: 1px 2px;
  border-radius: 3px;
}

.nav-icon-task::after {
  left: 5px;
  top: 5px;
  width: 6px;
  height: 3px;
  border-width: 0 0 1.5px 1.5px;
  transform: rotate(-45deg);
}

.nav-icon-chart::before {
  left: 1px;
  right: 1px;
  bottom: 1px;
  height: 9px;
  border-width: 0 0 1.5px 1.5px;
}

.nav-icon-chart::after {
  left: 4px;
  top: 2px;
  width: 9px;
  height: 8px;
  border-width: 1.5px 1.5px 0 0;
  transform: skewY(-28deg);
}

.nav-icon-people::before {
  left: 6px;
  top: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.nav-icon-people::after {
  left: 2px;
  bottom: 1px;
  width: 13px;
  height: 8px;
  border-radius: 8px 8px 2px 2px;
}

.nav-icon-library::before {
  inset: 1px 2px;
  border-radius: 2px 4px 4px 2px;
}

.nav-icon-library::after {
  left: 5px;
  top: 4px;
  width: 7px;
  height: 6px;
  border-width: 1.5px 0;
}

.nav-icon-setting::before {
  inset: 2px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #102f28;
}

.nav-icon-setting::after {
  inset: 7px;
  border-radius: 50%;
  background: currentColor;
}

.sidebar-insight {
  margin-top: auto;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 12px;
  background: rgba(255, 255, 255, .045);
}

.sidebar-insight-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, .7);
  font-size: 10px;
}

.sidebar-insight-head strong {
  color: #fff;
  font-size: 11px;
}

.progress-track {
  height: 4px;
  margin: 11px 0 9px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, .1);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
  transition: width .35s ease;
}

.sidebar-insight p {
  color: rgba(255, 255, 255, .38);
  font-size: 9px;
  line-height: 1.55;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-user-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-user-copy strong {
  font-size: 12px;
}

.sidebar-user-copy span {
  color: rgba(255, 255, 255, .37);
  font-size: 9px;
}

.sidebar-user .icon-button {
  width: 30px;
  height: 30px;
  color: rgba(255, 255, 255, .45);
}

.sidebar-user .icon-button:hover {
  background: rgba(255, 255, 255, .07);
  color: #fff;
}

.logout-icon {
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-right: 0;
  border-radius: 3px 0 0 3px;
}

.logout-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 1.5px;
  margin: 5px 0 0 4px;
  background: currentColor;
}

.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #d7e9df, #badccb);
  color: var(--forest);
  font-weight: 750;
}

.avatar-small {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: 12px;
}

.sidebar .avatar {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.avatar-large {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  font-size: 22px;
}

.sidebar-backdrop {
  display: none;
}

.app-main {
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-height);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid rgba(220, 227, 223, .88);
  background: rgba(243, 245, 243, .88);
  backdrop-filter: blur(16px);
}

.mobile-menu-button {
  display: none;
}

.hamburger {
  width: 17px;
  height: 12px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}

.hamburger::after {
  content: "";
  display: block;
  margin-top: 4px;
  border-top: 1.5px solid currentColor;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 175px;
  color: var(--muted);
  font-size: 11px;
}

.topbar-breadcrumb i {
  color: #c3cbc7;
  font-style: normal;
}

.topbar-breadcrumb strong {
  color: var(--ink);
  font-weight: 650;
}

.global-search {
  position: relative;
  width: min(32vw, 370px);
  margin-left: auto;
}

.global-search input,
.compact-search input {
  width: 100%;
  height: 38px;
  padding: 0 54px 0 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
  font-size: 11px;
}

.global-search input:focus,
.compact-search input:focus {
  outline: 0;
  border-color: #afbeb6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 63, 53, .07);
}

.search-icon {
  position: absolute;
  z-index: 1;
  left: 13px;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  transform: translateY(-55%);
  pointer-events: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 1.5px;
  left: 8px;
  top: 9px;
  border-radius: 2px;
  background: var(--muted);
  transform: rotate(45deg);
}

.global-search kbd {
  position: absolute;
  right: 10px;
  top: 9px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #a0aaa5;
  font-family: var(--font);
  font-size: 8px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.today-label {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.notification-wrap,
.topbar-user {
  position: relative;
}

.notification-button {
  width: 36px;
  height: 36px;
}

.bell-icon {
  position: relative;
  width: 14px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 8px 8px 5px 5px;
}

.bell-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 13px;
  width: 6px;
  height: 3px;
  border: 1.5px solid currentColor;
  border-top: 0;
  border-radius: 0 0 5px 5px;
}

.bell-icon::after {
  content: "";
  position: absolute;
  left: 5px;
  top: -3px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
}

.notification-dot {
  position: absolute;
  right: 7px;
  top: 5px;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--canvas);
  border-radius: 50%;
  background: var(--coral);
}

.topbar-user {
  min-height: 42px;
  padding: 4px 7px;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
}

.topbar-user:hover {
  background: rgba(23, 63, 53, .05);
}

.topbar-user-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.topbar-user-copy strong {
  font-size: 11px;
}

.topbar-user-copy small {
  color: var(--muted);
  font-size: 8px;
}

.chevron-down {
  width: 5px;
  height: 5px;
  margin-left: 3px;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
}

.popover {
  position: absolute;
  z-index: 60;
  top: calc(100% + 10px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.notification-panel {
  right: -54px;
  width: 310px;
  overflow: hidden;
}

.popover-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.popover-head strong {
  font-size: 12px;
}

.popover-head span {
  color: var(--muted);
  font-size: 9px;
}

.notification-item {
  display: flex;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

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

.notification-item-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--coral);
}

.notification-item strong {
  display: block;
  font-size: 10px;
  line-height: 1.45;
}

.notification-item p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.notification-empty {
  padding: 26px 18px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.user-menu {
  right: 0;
  width: 142px;
  padding: 6px;
}

.user-menu button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  font-size: 11px;
}

.user-menu button:hover {
  background: var(--canvas);
}

.main-content {
  max-width: 1560px;
  margin: 0 auto;
  padding: 28px 30px 56px;
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
  animation: page-enter .28s ease both;
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.page-heading .eyebrow {
  margin-bottom: 8px;
}

.page-heading p {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.page-heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.dashboard-date-control {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.dashboard-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-date-control span {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.dashboard-date-control .compact-select {
  min-width: 126px;
  border: 0;
  padding-left: 0;
  font-weight: 650;
  background-color: transparent;
}

.upload-icon {
  position: relative;
  width: 13px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.upload-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: -8px;
  width: 1.5px;
  height: 10px;
  background: currentColor;
}

.upload-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  top: -6px;
  width: 4px;
  height: 4px;
  border-left: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -48px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--metric-halo, rgba(23, 63, 53, .045));
}

.metric-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.metric-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--metric-bg, var(--forest-soft));
  color: var(--metric-color, var(--forest));
  font-size: 11px;
  font-weight: 750;
}

.metric-value-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 17px;
}

.metric-value {
  font-size: 28px;
  line-height: 1;
  font-weight: 720;
  letter-spacing: -.045em;
}

.metric-unit {
  color: var(--muted);
  font-size: 10px;
}

.metric-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
}

.metric-delta {
  padding: 2px 5px;
  border-radius: 4px;
  background: #e9f6ef;
  color: #25805c;
  font-weight: 700;
}

.metric-delta.down {
  background: var(--red-soft);
  color: var(--red);
}

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

.dashboard-grid-primary {
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, .8fr);
}

.dashboard-grid-secondary {
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.chart-panel,
.data-health-panel,
.store-performance-panel,
.task-glance-panel,
.data-ledger-panel,
.staff-panel,
.store-directory-panel {
  padding: 20px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.panel-heading .panel-kicker {
  margin-bottom: 5px;
}

.legend-row {
  display: flex;
  gap: 15px;
  padding-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.legend-row span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.legend-order {
  background: var(--forest);
}

.legend-ad {
  background: var(--coral);
}

.trend-chart {
  min-height: 232px;
}

.trend-chart svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.chart-grid-line {
  stroke: #edf0ee;
  stroke-width: 1;
}

.chart-axis-label {
  fill: #8c9892;
  font-family: var(--font);
  font-size: 9px;
}

.chart-value-label {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 650;
}

.trend-chart-scroll {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

.trend-chart-scroll svg {
  height: auto;
}

.chart-order-line {
  fill: none;
  stroke: #319c71;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-order-dot {
  fill: #fff;
  stroke: #319c71;
  stroke-width: 2;
}

.chart-point-value {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 700;
}

.store-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.store-ranking-row {
  width: 100%;
  min-height: 34px;
  padding: 4px 3px;
  border: 0;
  border-bottom: 1px solid #eef1ef;
  display: grid;
  grid-template-columns: 24px minmax(100px, 1fr) minmax(100px, 1.65fr) 62px;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.store-ranking-row:hover {
  background: #f8faf9;
}

.store-ranking-row:last-child {
  border-bottom: 0;
}

.store-ranking-index {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf1ef;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.store-ranking-index.top {
  background: var(--forest);
  color: #fff;
}

.store-ranking-name {
  overflow: hidden;
  font-size: 9px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-ranking-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 10px;
  background: #edf2ef;
}

.store-ranking-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9cc9b6, #2f936d);
}

.store-ranking-row > strong {
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.store-ranking-row > strong small {
  margin-left: 2px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 500;
}

.chart-bar {
  fill: var(--forest);
  rx: 4;
}

.chart-bar:hover {
  fill: #255c4e;
}

.chart-ad-line {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-ad-area {
  fill: url(#adGradient);
}

.chart-ad-dot {
  fill: #fff;
  stroke: var(--coral);
  stroke-width: 2;
}

.chart-focus {
  fill: rgba(23, 63, 53, .04);
}

.completion-hero {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 5px 0 19px;
}

.completion-ring {
  --value: 0%;
  position: relative;
  width: 90px;
  height: 90px;
  flex: 0 0 90px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--forest) var(--value), #edf1ef 0);
}

.completion-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

.completion-ring div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.completion-ring strong {
  font-size: 20px;
  letter-spacing: -.04em;
}

.completion-ring span {
  color: var(--muted);
  font-size: 8px;
}

.completion-copy strong {
  font-size: 13px;
}

.completion-copy p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.completion-store-list {
  display: flex;
  flex-direction: column;
}

.completion-store {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.completion-store-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38a171;
}

.completion-store.missing .completion-store-dot {
  background: #e6a03e;
  box-shadow: 0 0 0 3px rgba(230, 160, 62, .11);
}

.completion-store strong {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.completion-store span {
  color: var(--muted);
  font-size: 9px;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 10px;
}

.data-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 550;
  text-align: left;
  white-space: nowrap;
}

.sortable-header {
  width: 100%;
  padding: 0;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-align: inherit;
}

.data-table th.number-cell .sortable-header {
  justify-content: flex-end;
}

.sortable-header:hover {
  color: var(--forest);
}

.sort-indicator {
  color: #a3aea8;
  font-size: 9px;
  line-height: 1;
}

th[aria-sort="ascending"] .sort-indicator,
th[aria-sort="descending"] .sort-indicator {
  color: var(--forest);
}

.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf0ee;
  vertical-align: middle;
}

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

.data-table tbody tr {
  transition: background .15s ease;
}

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

.data-table .number-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.store-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}

.store-thumb {
  position: relative;
  overflow: hidden;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--thumb-color, #b6d8c8) 72%, white), var(--thumb-color, #b6d8c8));
  color: rgba(15, 48, 40, .72);
  font-size: 14px;
}

.store-thumb::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
}

.store-cell-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.store-cell-copy strong {
  overflow: hidden;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 650;
}

.store-cell-copy span {
  color: var(--muted);
  font-size: 8px;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.person-mini {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef2f0;
  color: var(--forest);
  font-size: 8px;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 20px;
  font-size: 8px;
  font-weight: 650;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-good {
  background: #eaf7f0;
  color: #27815d;
}

.status-warning {
  background: var(--amber-soft);
  color: #a66b16;
}

.status-neutral {
  background: #f0f2f1;
  color: #6f7b75;
}

.status-danger {
  background: var(--red-soft);
  color: var(--red);
}

.status-info {
  background: var(--blue-soft);
  color: var(--blue);
}

.task-glance-panel {
  display: flex;
  flex-direction: column;
}

.task-glance-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 14px;
}

.task-glance-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}

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

.task-check {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
}

.task-check.in_progress {
  border-color: var(--blue);
  background: linear-gradient(90deg, var(--blue) 50%, #fff 50%);
}

.task-check.submitted {
  border-color: var(--coral);
  background: var(--coral);
}

.task-check.approved {
  border-color: #37a273;
  background: #37a273;
  box-shadow: inset 0 0 0 3px #fff;
}

.task-glance-copy {
  min-width: 0;
  flex: 1;
}

.task-glance-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 650;
}

.task-glance-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.task-priority-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  margin-top: 5px;
  border-radius: 50%;
  background: #b4c0ba;
}

.task-priority-dot.high {
  background: var(--coral);
}

.task-priority-dot.medium {
  background: #e4a33e;
}

/* Stores */
.summary-strip,
.task-summary-grid,
.data-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary-item {
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.summary-item strong {
  display: block;
  margin-top: 10px;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.04em;
}

.summary-item small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.store-directory-panel {
  padding-top: 16px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmented-control {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f9f8;
}

.segmented-control button {
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.segmented-control button:hover {
  color: var(--ink);
}

.segmented-control button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(15, 48, 40, .1);
}

.compact-search {
  position: relative;
  display: block;
  width: 220px;
}

.compact-search input {
  height: 36px;
}

.compact-select,
.compact-date {
  height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background-color: #fff;
  color: var(--ink-soft);
  font-size: 9px;
}

.compact-date {
  padding-right: 8px;
}

.stores-table {
  min-width: 820px;
}

.stores-table td {
  height: 61px;
}

.subject-cell {
  max-width: 190px;
}

.subject-cell strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 600;
}

.subject-cell span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.row-action {
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--muted);
}

.row-action:hover {
  border-color: #b8c4be;
  color: var(--forest);
}

.row-action::after {
  content: "›";
  font-size: 17px;
  line-height: 1;
}

.empty-state {
  padding: 52px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--canvas);
  color: var(--muted);
  font-size: 20px;
}

.empty-state strong {
  display: block;
  font-size: 12px;
}

.empty-state p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

/* Tasks */
.task-summary-grid .summary-item {
  position: relative;
  overflow: hidden;
}

.task-summary-grid .summary-item::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -28px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--summary-color, rgba(23, 63, 53, .05));
}

.task-summary-grid .summary-item strong {
  color: var(--summary-ink, var(--ink));
}

.task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.task-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 12px;
  align-items: start;
}

.task-column {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f9f8;
}

.task-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 11px;
}

.task-column-head span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.task-column-head i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--column-color, #abb7b0);
}

.task-column-head strong {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 12px;
  background: #e9edeb;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.task-column-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-card {
  padding: 13px;
  border: 1px solid #e5e9e7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 48, 40, .025);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: #cbd4cf;
  box-shadow: 0 7px 20px rgba(15, 48, 40, .07);
}

.task-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.task-store-tag {
  max-width: 150px;
  overflow: hidden;
  color: var(--forest);
  font-size: 8px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-label {
  padding: 3px 6px;
  border-radius: 4px;
  background: #f1f4f2;
  color: var(--muted);
  font-size: 7px;
  font-weight: 650;
}

.priority-label.high {
  background: var(--coral-soft);
  color: #c15d46;
}

.priority-label.medium {
  background: var(--amber-soft);
  color: #a56c17;
}

.task-card h3 {
  font-size: 11px;
  line-height: 1.45;
  font-weight: 650;
}

.task-card p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eef1ef;
}

.task-assignee {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 8px;
}

.task-due {
  color: var(--muted);
  font-size: 8px;
}

.task-due.overdue {
  color: var(--red);
}

.task-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.task-card-actions button {
  flex: 1;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 620;
}

.task-card-actions button.primary {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}

.task-column-empty {
  padding: 24px 8px;
  color: #a0aba5;
  font-size: 9px;
  text-align: center;
}

/* Data */
.data-callout {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #d4e5dd;
  border-radius: 12px;
  background: #f4faf7;
}

.data-callout-icon,
.integration-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--forest);
  color: #fff;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .04em;
}

.data-callout > div:nth-child(2) {
  flex: 1;
}

.data-callout strong {
  font-size: 11px;
}

.data-callout p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.data-summary-grid .summary-item {
  border-color: transparent;
  background: var(--forest);
  color: #fff;
}

.data-summary-grid .summary-item:nth-child(2),
.data-summary-grid .summary-item:nth-child(3),
.data-summary-grid .summary-item:nth-child(4) {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.data-summary-grid .summary-item span,
.data-summary-grid .summary-item small {
  color: rgba(255, 255, 255, .5);
}

.data-summary-grid .summary-item:nth-child(n+2) span,
.data-summary-grid .summary-item:nth-child(n+2) small {
  color: var(--muted);
}

.data-ledger-panel {
  padding-bottom: 10px;
}

.style-catalog-panel {
  margin-top: 16px;
  padding: 20px;
}

.style-catalog-panel .panel-heading {
  align-items: center;
}

.catalog-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 15px;
}

.catalog-stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafbfa;
}

.catalog-stat.primary {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}

.catalog-stat span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.catalog-stat.primary span {
  color: rgba(255, 255, 255, .56);
}

.catalog-stat strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.catalog-stat small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.catalog-stat.primary small {
  color: rgba(255, 255, 255, .5);
}

.catalog-table {
  min-width: 860px;
}

.catalog-style-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 180px;
}

.catalog-style-identity > span {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--forest-soft);
  color: var(--forest);
  font-size: 8px;
  font-weight: 750;
}

.catalog-style-identity div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.catalog-style-identity strong {
  font-size: 9px;
}

.catalog-style-identity small {
  color: var(--muted);
  font-size: 8px;
}

.screenshot-button {
  min-width: 54px;
  min-height: 28px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 8px;
}

.screenshot-button:hover {
  border-color: #b7c2bc;
}

/* Staff */
.staff-panel {
  padding-top: 18px;
}

.staff-panel .toolbar h2 {
  margin-top: 4px;
}

.staff-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.staff-identity strong {
  display: block;
  font-size: 10px;
}

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

.store-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 230px;
}

.store-chip {
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--canvas);
  color: var(--ink-soft);
  font-size: 7px;
  white-space: nowrap;
}

.store-chip.more {
  color: var(--muted);
}

.table-actions {
  display: flex;
  gap: 5px;
}

.small-text-button {
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 8px;
}

.small-text-button:hover {
  border-color: #aebdb5;
  color: var(--forest);
}

.small-text-button.danger {
  border-color: #efd8d4;
  color: var(--red);
}

.permission-guide {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-top: 16px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.permission-guide-visual {
  position: relative;
  width: 210px;
  height: 94px;
  flex: 0 0 210px;
}

.permission-node {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 650;
}

.permission-node-owner {
  left: 0;
  top: 33px;
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}

.permission-node-a {
  right: 0;
  top: 5px;
}

.permission-node-b {
  right: 0;
  bottom: 5px;
}

.permission-line {
  position: absolute;
  left: 72px;
  width: 86px;
  height: 1px;
  background: var(--line-strong);
  transform-origin: left center;
}

.permission-line-a {
  top: 47px;
  transform: rotate(-20deg);
}

.permission-line-b {
  top: 47px;
  transform: rotate(20deg);
}

.permission-guide h2 {
  margin: 5px 0 7px;
}

.permission-guide p {
  max-width: 610px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

/* Pattern library */
.library-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.library-summary-card {
  min-height: 82px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.library-summary-card:hover,
.library-summary-card.active {
  border-color: var(--forest);
}

.library-summary-card.active {
  background: var(--forest);
  color: #fff;
}

.library-summary-card.is-muted {
  background: #f7f8f7;
}

.library-summary-card.is-muted.active {
  background: var(--forest);
}

.library-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.library-summary-card.active span,
.library-summary-card.active small {
  color: rgba(255, 255, 255, .55);
}

.library-summary-card strong {
  display: inline-block;
  margin-top: 9px;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -.04em;
}

.library-summary-card small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 8px;
}

.library-panel {
  padding: 18px;
}

.library-note {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f5f8f6;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

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

.library-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.library-card:hover {
  transform: translateY(-2px);
  border-color: #bdc9c2;
  box-shadow: 0 10px 24px rgba(15, 48, 40, .08);
}

.library-card-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.35;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 78% 24%, rgba(255, 255, 255, .34), transparent 27%), linear-gradient(145deg, #dcebe3, #c7dbd0);
}

.library-card:nth-child(5n + 2) .library-card-visual { background: linear-gradient(145deg, #ece3d5, #dfcdbd); }
.library-card:nth-child(5n + 3) .library-card-visual { background: linear-gradient(145deg, #dce6ed, #c7d8e3); }
.library-card:nth-child(5n + 4) .library-card-visual { background: linear-gradient(145deg, #eadfe2, #d9c3c9); }
.library-card:nth-child(5n) .library-card-visual { background: linear-gradient(145deg, #ebead9, #d9d8b9); }

.library-card-visual.has-image {
  background: var(--canvas);
}

.library-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-card-placeholder-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 63, 53, .18);
  border-radius: 50%;
  color: var(--forest);
  font-size: 20px;
  font-weight: 700;
}

.library-card-visual > strong {
  margin-top: 10px;
  color: var(--forest);
  font-size: 11px;
}

.library-card-visual > small {
  margin-top: 4px;
  color: rgba(23, 63, 53, .5);
  font-size: 7px;
}

.library-category-badge {
  display: inline-flex;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 5px;
  background: #f0f3f1;
  color: var(--ink-soft);
  font-size: 7px;
  font-weight: 650;
  white-space: nowrap;
}

.library-card-visual > .library-category-badge {
  position: absolute;
  right: 9px;
  top: 9px;
  background: rgba(255, 255, 255, .84);
  backdrop-filter: blur(8px);
}

.library-category-badge.men { background: #e5eef5; color: #356e94; }
.library-category-badge.women { background: #f5e7eb; color: #9a5369; }
.library-category-badge.boys { background: #e7f1e6; color: #4c7b48; }
.library-category-badge.girls { background: #fae9ee; color: #a95f70; }
.library-category-badge.baby { background: #fff3d9; color: #9c701e; }
.library-category-badge.unclassified { background: #f0f2f1; color: #707b75; }

.library-card-body {
  padding: 12px;
}

.library-card-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.library-card-title strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-card-title span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-size-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 20px;
  margin-top: 10px;
}

.library-size-chips span {
  min-width: 24px;
  padding: 3px 5px;
  border-radius: 4px;
  background: var(--canvas);
  color: var(--ink-soft);
  font-size: 7px;
  text-align: center;
}

.library-size-chips .empty-size {
  background: var(--amber-soft);
  color: #9e6d1d;
}

.library-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 7px;
}

.library-detail-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
}

.library-detail-image,
.library-detail-placeholder {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(145deg, #dcebe3, #c7dbd0);
}

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

.library-detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--forest);
}

.library-detail-placeholder > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 63, 53, .2);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
}

.library-detail-placeholder strong {
  font-size: 11px;
}

.library-detail-placeholder small {
  color: rgba(23, 63, 53, .52);
  font-size: 8px;
}

.library-detail-copy h3 {
  margin: 9px 0 14px;
  font-size: 18px;
}

.library-detail-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.library-size-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.library-size-table {
  min-width: 700px;
}

.library-size-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.library-size-table td:first-child {
  text-align: left;
}

.library-size-empty {
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.library-form-top {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 16px;
}

.library-upload {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px dashed #bfcac4;
  border-radius: 12px;
  background: #f7faf8;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}

.library-upload.is-dragging {
  border-color: var(--coral);
  background: var(--coral-soft);
}

.library-upload > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}

.library-upload > div > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest-soft);
  color: var(--forest);
  font-size: 17px;
  font-weight: 700;
}

.library-upload strong {
  margin-top: 10px;
  color: var(--ink);
  font-size: 9px;
}

.library-upload small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.library-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-field {
  margin-top: 7px;
  padding: 7px;
  font-size: 9px;
}

.library-size-editor {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.library-size-editor .drawer-section-head {
  align-items: flex-start;
}

.library-size-editor .drawer-section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.size-editor-table {
  min-width: 790px;
}

.size-editor-table input {
  width: 100%;
  min-width: 62px;
  height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 9px;
}

.size-editor-table td {
  padding: 7px 6px;
}

.size-row-remove {
  width: 27px;
  height: 27px;
  border: 1px solid #efd8d4;
  border-radius: 6px;
  background: var(--red-soft);
  color: var(--red);
}

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

.settings-profile {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.settings-profile > div:nth-child(2) {
  flex: 1;
}

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

.settings-profile p {
  color: var(--muted);
  font-size: 10px;
}

.settings-group {
  padding: 20px;
}

.settings-group-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.settings-group-head h2 {
  margin-top: 5px;
}

.soft-badge {
  height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  background: var(--canvas);
  color: var(--muted);
  font-size: 8px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.settings-row strong {
  font-size: 10px;
}

.settings-row p {
  max-width: 460px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.integration-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px;
  border: 1px dashed #cdd7d1;
  border-radius: 10px;
  background: #fafbfa;
}

.integration-card strong {
  font-size: 10px;
}

.integration-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.mobile-guide {
  display: flex;
  gap: 8px;
}

.mobile-guide div {
  flex: 1;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.mobile-guide span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
}

.mobile-guide p {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.55;
}

/* Modal and forms */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 28, 23, .52);
  backdrop-filter: blur(4px);
}

.modal-root {
  width: min(100%, 650px);
  max-height: min(90vh, 860px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: modal-enter .2s ease both;
}

.modal-root.modal-wide {
  width: min(100%, 860px);
}

.modal-root.modal-narrow {
  width: min(100%, 470px);
}

@keyframes modal-enter {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
}

.modal-head .panel-kicker {
  margin-bottom: 5px;
}

.modal-head h2 {
  font-size: 19px;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 18px;
}

.modal-close:hover {
  background: var(--canvas);
}

.modal-body {
  padding: 20px 22px;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field small,
.field-hint {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
  font-weight: 500;
}

.form-section {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.form-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  font-size: 11px;
  font-weight: 700;
}

.form-section-title span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--forest-soft);
  color: var(--forest);
  font-size: 8px;
}

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

.permission-store-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.permission-store-toolbar .compact-search {
  width: min(100%, 360px);
}

.permission-store-toolbar .small-text-button {
  min-height: 36px;
  white-space: nowrap;
}

.permission-selected-count {
  margin-left: auto;
  color: var(--forest);
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
}

.check-card {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.check-card:hover {
  border-color: #b6c3bc;
  background: #fcfdfc;
}

.check-card input {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin: 1px 0 0;
  accent-color: var(--forest);
}

.check-card strong {
  display: block;
  color: var(--ink);
  font-size: 9px;
  font-weight: 650;
}

.check-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
}

.task-create-hint {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 9px;
  background: var(--blue-soft);
  color: #436b87;
  font-size: 9px;
  line-height: 1.55;
}

.task-create-hint strong {
  color: var(--blue);
}

.record-screenshot-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: #fafbfa;
}

.store-combobox {
  position: relative;
  display: block;
}

.store-search-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.store-search-results {
  position: absolute;
  z-index: 80;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 236px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 48, 40, .18);
}

.store-search-option {
  width: 100%;
  min-height: 45px;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.store-search-option:hover,
.store-search-option:focus-visible {
  background: var(--forest-soft);
}

.store-search-option-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.store-search-option-copy strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-search-option-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-search-empty {
  padding: 20px 12px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.record-screenshot-preview img {
  width: 58px;
  height: 58px;
  border-radius: 7px;
  object-fit: cover;
}

.record-screenshot-preview div {
  flex: 1;
}

.record-screenshot-preview strong {
  display: block;
  font-size: 9px;
}

.record-screenshot-preview p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.image-upload-box {
  position: relative;
  min-height: 90px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: #fafbfa;
  text-align: center;
}

.image-upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-upload-box strong {
  display: block;
  color: var(--ink-soft);
  font-size: 9px;
}

.image-upload-box span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.image-upload-box img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.credential-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafbfa;
}

.credential-box strong {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.credential-box span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.credential-actions {
  display: flex;
  gap: 5px;
}

.credential-actions button {
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 8px;
}

.task-detail-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 18px;
}

.task-detail-main {
  min-width: 0;
}

.task-detail-main h3 {
  font-size: 17px;
  line-height: 1.45;
}

.task-detail-description {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.task-detail-meta {
  display: grid;
  gap: 10px;
  padding: 13px;
  border-radius: 10px;
  background: #f8faf9;
}

.task-detail-meta div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 9px;
}

.task-detail-meta span {
  color: var(--muted);
}

.task-detail-meta strong {
  text-align: right;
}

.submission-box {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #d4e5dd;
  border-radius: 10px;
  background: #f5faf7;
}

.submission-box .panel-kicker {
  color: #4d816c;
  margin-bottom: 7px;
}

.submission-box p {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
}

.task-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 16px;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 10px;
  min-height: 34px;
  padding-left: 4px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 14px;
  bottom: -3px;
  width: 1px;
  background: var(--line);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  margin-top: 3px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 1px var(--forest);
}

.timeline-copy strong {
  display: block;
  font-size: 9px;
}

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

.empty-modal {
  padding: 40px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

/* Store drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(9, 28, 23, .4);
  backdrop-filter: blur(2px);
}

.store-drawer {
  position: fixed;
  z-index: 81;
  inset: 0 0 0 auto;
  width: min(580px, 100%);
  overflow-y: auto;
  background: var(--canvas);
  box-shadow: -30px 0 70px rgba(9, 28, 23, .24);
  animation: drawer-enter .24s ease both;
}

@keyframes drawer-enter {
  from { transform: translateX(24px); opacity: .7; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.drawer-head .store-thumb {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-radius: 11px;
  font-size: 18px;
}

.drawer-head-copy {
  min-width: 0;
  flex: 1;
}

.drawer-head-copy h2 {
  font-size: 16px;
}

.drawer-head-copy p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.drawer-tabs {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.drawer-tab {
  position: relative;
  min-height: 43px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.drawer-tab.active {
  color: var(--ink);
}

.drawer-tab.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  background: var(--forest);
}

.drawer-content {
  padding: 18px;
}

.drawer-section {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.drawer-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.drawer-section h3 {
  font-size: 11px;
}

.drawer-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.drawer-metric {
  padding: 11px;
  border-radius: 8px;
  background: #f7f9f8;
}

.drawer-metric span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.drawer-metric strong {
  display: block;
  margin-top: 7px;
  font-size: 16px;
  letter-spacing: -.03em;
}

.detail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-field span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.detail-field strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.45;
  word-break: break-all;
}

.detail-field.full {
  grid-column: 1 / -1;
}

.drawer-record-list {
  display: flex;
  flex-direction: column;
}

.drawer-record {
  display: grid;
  grid-template-columns: 64px repeat(3, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 8px;
}

.drawer-record:first-child {
  border-top: 0;
}

.drawer-record span {
  color: var(--muted);
}

.drawer-record strong {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.order-visual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.order-range-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.order-range-row > span {
  color: var(--muted);
  font-size: 8px;
}

.order-range-control button {
  min-height: 27px;
  padding-inline: 9px;
}

.order-visual-grid.range-7 {
  grid-template-columns: repeat(4, 1fr);
}

.order-visual-grid.range-30 {
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.order-visual-grid.range-30 .order-visual {
  min-height: 74px;
  padding: 8px;
}

.order-visual-grid.range-30 .order-visual strong {
  font-size: 14px;
}

.order-visual-grid.range-30 .order-visual span {
  font-size: 6px;
}

.drawer-order-chart {
  width: 100%;
  min-height: 200px;
}

.drawer-order-chart svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.drawer-chart-grid {
  stroke: #edf1ef;
  stroke-width: 1;
}

.drawer-chart-label {
  fill: var(--muted);
  font-family: var(--font);
  font-size: 9px;
}

.drawer-chart-line {
  fill: none;
  stroke: #319c71;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drawer-chart-dot {
  fill: #fff;
  stroke: #319c71;
  stroke-width: 2;
}

.drawer-chart-value {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 650;
}

.order-trend-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.order-trend-summary > div {
  padding: 9px;
  border-radius: 7px;
  background: #f5f8f6;
}

.order-trend-summary span {
  display: block;
  color: var(--muted);
  font-size: 7px;
}

.order-trend-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.order-trend-summary small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 500;
}

.order-visual {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 11px;
  border-radius: 9px;
  background:
    linear-gradient(0deg, rgba(14, 37, 31, .62), rgba(14, 37, 31, .02)),
    linear-gradient(145deg, var(--visual-color, #b8d9c9), #eef3f0);
  color: #fff;
}

.order-visual::before {
  content: "";
  position: absolute;
  right: -24px;
  top: -25px;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
}

.order-visual strong {
  position: relative;
  z-index: 1;
  font-size: 17px;
}

.order-visual span {
  position: relative;
  z-index: 1;
  margin-top: 3px;
  color: rgba(255, 255, 255, .74);
  font-size: 7px;
}

.order-screenshot {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.store-credential-warning {
  display: flex;
  gap: 9px;
  padding: 11px;
  border-radius: 8px;
  background: var(--amber-soft);
  color: #8c641f;
  font-size: 8px;
  line-height: 1.55;
}

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

.style-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
}

.style-card > img {
  display: block;
  width: 100%;
  height: 122px;
  object-fit: cover;
  background: var(--canvas);
}

.style-card-body {
  padding: 11px;
}

.style-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.style-code-row strong {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.style-code-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.style-cost-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 10px;
}

.style-cost-grid div {
  min-width: 0;
  padding: 7px;
  border-radius: 6px;
  background: #f0f4f2;
}

.style-cost-grid span {
  display: block;
  color: var(--muted);
  font-size: 7px;
}

.style-cost-grid strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.style-cost-grid strong.low-margin {
  color: var(--red);
}

.style-card-actions {
  display: flex;
  gap: 5px;
  margin-top: 9px;
}

.style-card-actions button {
  flex: 1;
  min-height: 27px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 8px;
}

.style-card-actions button:last-child {
  color: var(--red);
}

.style-breakdown {
  margin-top: 8px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.55;
}

.text-destructive {
  color: var(--red) !important;
}

/* Toast */
.toast-region {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: rgba(16, 47, 40, .96);
  color: #fff;
  box-shadow: 0 12px 30px rgba(9, 28, 23, .22);
  font-size: 10px;
  line-height: 1.5;
  animation: toast-in .22s ease both;
}

.toast.error {
  background: #8e3935;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-bottom-nav {
  display: none;
}

/* Responsive */
@media (max-width: 1240px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-board {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-profile {
    grid-column: auto;
  }

  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .library-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .dashboard-grid-primary,
  .dashboard-grid-secondary {
    grid-template-columns: 1fr;
  }

  .completion-store-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
  }

  .topbar-breadcrumb {
    display: none;
  }

  .global-search {
    margin-left: 0;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .today-label {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --topbar-height: 62px;
  }

  .sidebar {
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform .24s ease;
  }

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

  .sidebar-close,
  .mobile-menu-button {
    display: grid;
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 39;
    inset: 0;
    background: rgba(9, 28, 23, .38);
    backdrop-filter: blur(2px);
  }

  .sidebar-backdrop.show {
    display: block;
  }

  .app-main {
    margin-left: 0;
  }

  .topbar {
    padding: 0 15px;
    gap: 8px;
  }

  .global-search {
    width: min(42vw, 340px);
  }

  .topbar-user-copy,
  .chevron-down {
    display: none;
  }

  .main-content {
    padding: 22px 18px 94px;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 35;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    height: 62px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px;
    border: 1px solid rgba(218, 226, 222, .9);
    border-radius: 16px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 14px 38px rgba(15, 48, 40, .16);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav button {
    border: 0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    color: var(--muted);
  }

  .mobile-bottom-nav button.active {
    background: var(--forest-soft);
    color: var(--forest);
  }

  .mobile-bottom-nav small {
    font-size: 8px;
    font-weight: 650;
  }

  .mobile-bottom-nav .nav-icon {
    width: 15px;
    height: 15px;
  }

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

  .permission-guide {
    align-items: flex-start;
  }

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

@media (max-width: 720px) {
  .login-shell {
    grid-template-columns: 1fr;
    background: #f7f8f7;
  }

  .login-brand {
    min-height: 310px;
    padding: 30px 25px 34px;
    border-radius: 0 0 26px 26px;
  }

  .login-brand::before,
  .login-proof {
    display: none;
  }

  .login-copy {
    padding: 30px 0 0;
  }

  .login-copy h1 {
    font-size: 33px;
  }

  .login-copy p {
    margin-top: 16px;
    font-size: 12px;
    line-height: 1.7;
  }

  .login-panel {
    min-height: auto;
    padding: 27px 20px 44px;
  }

  .login-card-head {
    margin-bottom: 24px;
  }

  .global-search {
    display: none;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .page-heading-actions {
    width: 100%;
  }

  .page-heading-actions .button {
    flex: 1;
  }

  .dashboard-date-control {
    flex: 1;
  }

  .dashboard-filter-group {
    width: 100%;
  }

  .dashboard-date-control .compact-select {
    flex: 1;
  }

  h1 {
    font-size: 25px;
  }

  .metric-grid {
    gap: 9px;
  }

  .metric-card {
    min-height: 121px;
    padding: 14px;
  }

  .metric-value {
    font-size: 24px;
  }

  .chart-panel,
  .data-health-panel,
  .store-performance-panel,
  .task-glance-panel,
  .data-ledger-panel,
  .staff-panel,
  .store-directory-panel {
    padding: 15px;
  }

  .panel-heading {
    margin-bottom: 14px;
  }

  .legend-row {
    flex-direction: column;
    gap: 5px;
  }

  .store-ranking-row {
    grid-template-columns: 22px minmax(90px, 1fr) minmax(55px, .8fr) 55px;
    gap: 5px;
  }

  .completion-store-list {
    grid-template-columns: 1fr;
  }

  .summary-strip,
  .task-summary-grid,
  .data-summary-grid {
    gap: 8px;
  }

  .summary-item {
    min-height: 76px;
    padding: 12px;
  }

  .summary-item strong {
    font-size: 19px;
  }

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

  .toolbar-right {
    flex-wrap: wrap;
  }

  .compact-search {
    width: 100%;
  }

  .segmented-control {
    width: 100%;
    overflow-x: auto;
  }

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

  .task-board {
    grid-template-columns: 1fr;
  }

  .task-column {
    padding: 10px;
  }

  .task-column-list:empty::after {
    content: "暂无任务";
    display: block;
    padding: 19px;
    color: var(--muted);
    font-size: 9px;
    text-align: center;
  }

  .data-callout {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .data-callout > div:nth-child(2) {
    min-width: calc(100% - 56px);
  }

  .data-callout .text-button {
    margin-left: 53px;
  }

  .style-catalog-panel {
    padding: 15px;
  }

  .style-catalog-panel .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .permission-guide {
    flex-direction: column;
    gap: 14px;
  }

  .permission-guide-visual {
    width: 100%;
    max-width: 240px;
  }

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

  .library-panel {
    padding: 14px;
  }

  .library-grid {
    gap: 8px;
  }

  .library-detail-layout,
  .library-form-top {
    grid-template-columns: 1fr;
  }

  .library-detail-image,
  .library-detail-placeholder,
  .library-upload {
    max-width: 240px;
  }

  .settings-profile {
    flex-wrap: wrap;
  }

  .settings-profile .button {
    width: 100%;
  }

  .settings-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-row .button {
    width: 100%;
  }

  .modal-backdrop {
    padding: 0;
    align-items: end;
  }

  .modal-root,
  .modal-root.modal-wide,
  .modal-root.modal-narrow {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }

  .modal-head,
  .modal-body,
  .modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .permission-store-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .permission-store-toolbar .compact-search {
    width: 100%;
  }

  .permission-selected-count {
    margin-left: 0;
  }

  .task-detail-grid {
    grid-template-columns: 1fr;
  }

  .store-drawer {
    width: 100%;
  }

  .drawer-content {
    padding: 12px;
  }

  .drawer-tabs {
    padding: 0 10px;
    overflow-x: auto;
  }

  .drawer-tab {
    flex: 0 0 auto;
  }

  .order-visual-grid {
    grid-template-columns: 1fr 1fr;
  }

  .order-range-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-visual-grid.range-7,
  .order-visual-grid.range-30 {
    grid-template-columns: repeat(2, 1fr);
  }

  .style-library {
    grid-template-columns: 1fr;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .detail-field.full {
    grid-column: auto;
  }

  .drawer-record {
    grid-template-columns: 52px repeat(3, 1fr);
  }

  .toast-region {
    left: 12px;
    right: 12px;
    bottom: 84px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 390px) {
  .main-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar {
    padding: 0 10px;
  }

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

  .metric-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading-actions {
    flex-direction: column;
  }

  .page-heading-actions .button {
    width: 100%;
  }

  .mobile-guide {
    flex-direction: column;
  }

  .order-visual-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
