:root {
  --brand: #2d6a4f;
  --brand-dark: #1b4332;
  --brand-soft: #d8f3dc;
  --danger: #c1121f;
  --bg: #f4f7f5;
  --card: #ffffff;
  --text: #1f2a24;
  --muted: #6c757d;
  --radius: 16px;
  --navbar-h: 56px;
  --tabbar-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Bootstrap 主色对齐品牌绿：弹窗/表单选中与焦点不再出现默认蓝 */
  --bs-primary: #2d6a4f;
  --bs-primary-rgb: 45, 106, 79;
  --bs-link-color: #2d6a4f;
  --bs-link-hover-color: #1b4332;
  --bs-focus-ring-color: rgba(45, 106, 79, 0.25);
  --bs-form-valid-color: #2d6a4f;
  --bs-form-valid-border-color: #86b7a0;
  --bs-dropdown-link-hover-bg: #eaf6ef;
  --bs-dropdown-link-hover-color: #1b4332;
  --bs-dropdown-link-active-bg: #2d6a4f;
  --bs-dropdown-link-active-color: #fff;
}

html {
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

body {
  margin: 0;
  /* 给固定顶栏留位，避免内容被挡住 */
  padding-top: var(--navbar-h, 56px);
}

.app-navbar {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  margin: 0;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  min-height: var(--navbar-h);
  padding-top: 0;
  padding-bottom: 0;
}

.brand-logo-nav {
  height: 32px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}

.navbar-brand {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  margin-right: 0.75rem;
}

.brand-tenant {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.brand-tenant::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin-right: 0.55rem;
  vertical-align: -0.05em;
  background: rgba(255, 255, 255, 0.35);
}

.app-main {
  max-width: 1100px;
}

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

.voice-btn {
  width: 100%;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(180deg, #40916c, var(--brand));
  color: #fff;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(45, 106, 79, 0.28);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.voice-btn i {
  font-size: 28px;
}

.voice-btn span {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.voice-btn small {
  opacity: 0.85;
  margin-top: 2px;
}

.voice-btn.listening {
  background: linear-gradient(180deg, #e76f51, var(--danger));
  animation: pulse 1s infinite;
}

.voice-result {
  background: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  color: var(--muted);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.summary-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.summary-bar .label {
  color: var(--muted);
  font-size: 12px;
}

.summary-bar .value {
  font-size: 22px;
  font-weight: 700;
}

.house-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  border: 2px solid transparent;
}

.house-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}

.house-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.house-card-head h2 {
  font-size: 18px;
  margin: 0;
}

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

.counter-row .name {
  width: 64px;
  font-weight: 600;
}

.counter {
  display: flex;
  align-items: center;
  gap: 6px;
}

.counter input {
  width: 84px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  border-radius: 10px;
}

.counter .btn {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 20px;
  border-radius: 10px;
}

.house-meta {
  color: var(--muted);
  font-size: 13px;
}

.save-footer {
  position: sticky;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
  padding: 8px 0 12px;
  background: linear-gradient(180deg, transparent, var(--bg) 30%);
}

.mobile-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  min-height: var(--tabbar-h);
  height: auto;
  padding-top: 6px;
  padding-bottom: max(6px, var(--safe-bottom));
  background: #fff;
  border-top: 1px solid #e9ecef;
  box-shadow: 0 -4px 16px rgba(27, 67, 50, 0.06);
}

.mobile-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 2px 2px 4px;
  color: #8aa399;
  text-decoration: none;
  font-size: 11px;
  line-height: 1.15;
  gap: 2px;
}

.mobile-tabbar a i {
  font-size: 18px;
  line-height: 1;
}

.mobile-tabbar a.active {
  color: var(--brand);
  font-weight: 700;
}

.kpi-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  min-height: 110px;
}

.kpi-label {
  color: var(--muted);
  font-size: 13px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.2;
}

.kpi-unit {
  color: var(--muted);
  font-size: 12px;
}

.kpi-change {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.kpi-card .kpi-value {
  font-size: clamp(18px, 4.5vw, 28px);
}

.fs-kpi-money {
  font-size: clamp(14px, 3.6vw, 22px) !important;
}

.chg.up { color: #2d6a4f; font-weight: 700; }
.chg.down { color: #c1121f; font-weight: 700; }
.chg.flat { color: #868e96; font-weight: 600; }

.mini-stat {
  background: #f6f9f7;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  height: 100%;
}

.mini-stat .label {
  font-size: 12px;
  color: var(--muted);
}

.mini-stat .value {
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
}

.hatch-dyn-item {
  padding: 10px 0;
  border-bottom: 1px solid #f1f3f2;
}

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

.pending-alert-card {
  border-left: 4px solid #f59f00;
}

.pending-empty {
  color: #2d6a4f;
  background: #f6f9f7;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
}

.pending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f3f2;
}

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

.pending-item:first-child {
  padding-top: 4px;
}

.pending-main {
  min-width: 0;
  flex: 1;
}

.kpi-muted .kpi-value {
  color: #adb5bd;
}

.alert-item {
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

.alert-item p {
  margin: 4px 0 0;
  font-size: 13px;
}

.alert-danger {
  background: #fff0f0;
  color: #7a1218;
}

.alert-warning {
  background: #fff7e8;
  color: #7a5a12;
}

.top5-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f3f2;
}

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

.rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.rate {
  margin-left: auto;
  font-weight: 800;
  color: var(--danger);
}

.empty-state, .empty-hint {
  text-align: center;
  color: var(--muted);
  padding: 24px 8px;
}

body {
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
}

@keyframes pulse {
  50% { transform: scale(0.985); }
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
  .save-footer { bottom: 12px; }
}

.hatch-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  border-left: 5px solid #4dabf7;
  position: relative;
  height: 100%;
}

.hatch-card.completed {
  border-left-color: #2d6a4f;
}

.hatch-card .delete-btn {
  position: static;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: #fff0f0;
  color: #c1121f;
  border-radius: 8px;
}

.hatch-card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}

.hatch-card .edit-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: #eef6f1;
  color: var(--brand);
  border-radius: 8px;
}

.hatch-card .batch-no {
  font-size: 18px;
  font-weight: 800;
  margin-right: 80px;
}

.hatch-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.hatch-stats .item {
  background: #f6f9f7;
  border-radius: 12px;
  padding: 8px;
  text-align: center;
}

.hatch-stats .item .label {
  font-size: 12px;
  color: var(--muted);
}

.hatch-stats .item .value {
  font-size: 18px;
  font-weight: 800;
}

.hatch-rate {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-dark);
}

.sales-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.type-badge {
  font-weight: 600;
}

.type-squab {
  background: #339af0 !important;
}

.type-young {
  background: #2d6a4f !important;
}

.type-breeder {
  background: #f59f00 !important;
  color: #212529 !important;
}

.type-old {
  background: #868e96 !important;
}

.type-middle {
  background: #20c997 !important;
}

.type-second {
  background: #7950f2 !important;
}

.type-disabled {
  background: #e8590c !important;
}

.type-manure {
  background: #8d6e63 !important;
}

.mobile-tabbar a span {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.chart-wrap {
  position: relative;
  height: 240px;
}

.chart-wrap-sm {
  height: 180px;
}

.home-hero {
  padding: 12px 14px 10px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(216, 243, 220, 0.9), transparent 48%),
    linear-gradient(135deg, #ffffff 0%, #eef6f1 100%);
  border: 1px solid #e4efe8;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.home-hero-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.home-logo {
  height: 36px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.home-hero-copy {
  flex: 1;
  min-width: 0;
}

.home-greet {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.25;
}

.home-sub {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.3;
}

.home-date {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(45, 106, 79, 0.08);
  font-size: 0.78rem;
  color: #8aa399;
  line-height: 1.3;
}

a.home-kpi-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.home-kpi-link:active {
  transform: scale(0.98);
}

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

@media (min-width: 768px) {
  .home-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

.home-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 118px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(31, 42, 36, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.home-kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
  background: currentColor;
  opacity: 0.55;
}

.home-kpi:hover {
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(31, 42, 36, 0.08);
}

.home-kpi:active {
  transform: scale(0.985);
}

.home-kpi-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.home-kpi-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.home-kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-kpi-value {
  margin-top: 2px;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--brand-dark);
}

.home-kpi-foot {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-kpi.tone-eggs {
  color: #2d6a4f;
  background:
    radial-gradient(circle at 100% 0%, rgba(216, 243, 220, 0.95), transparent 55%),
    linear-gradient(160deg, #ffffff 0%, #f3faf5 100%);
  border-color: #d8ebe0;
}
.home-kpi.tone-eggs .home-kpi-icon {
  background: #d8f3dc;
  color: #1b4332;
}
.home-kpi.tone-eggs .home-kpi-value { color: #1b4332; }

.home-kpi.tone-bad {
  color: #c1121f;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 227, 227, 0.9), transparent 55%),
    linear-gradient(160deg, #ffffff 0%, #fff7f7 100%);
  border-color: #f0d6d8;
}
.home-kpi.tone-bad .home-kpi-icon {
  background: #ffe3e3;
  color: #c1121f;
}
.home-kpi.tone-bad .home-kpi-value { color: #a4161a; }

.home-kpi.tone-hatch {
  color: #e67700;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 243, 191, 0.95), transparent 55%),
    linear-gradient(160deg, #ffffff 0%, #fffaf0 100%);
  border-color: #f0e2c0;
}
.home-kpi.tone-hatch .home-kpi-icon {
  background: #fff3bf;
  color: #e67700;
}
.home-kpi.tone-hatch .home-kpi-value { color: #d9480f; }

.home-kpi.tone-sales {
  color: #1864ab;
  background:
    radial-gradient(circle at 100% 0%, rgba(231, 245, 255, 0.95), transparent 55%),
    linear-gradient(160deg, #ffffff 0%, #f3f9ff 100%);
  border-color: #d4e6f5;
}
.home-kpi.tone-sales .home-kpi-icon {
  background: #e7f5ff;
  color: #1864ab;
}
.home-kpi.tone-sales .home-kpi-value { color: #1864ab; }

.home-kpi.tone-rate {
  color: #4338ca;
  background:
    radial-gradient(circle at 100% 0%, rgba(238, 242, 255, 0.95), transparent 55%),
    linear-gradient(160deg, #ffffff 0%, #f8f7ff 100%);
  border-color: #e0e7ff;
}
.home-kpi.tone-rate .home-kpi-icon {
  background: #eef2ff;
  color: #4338ca;
}
.home-kpi.tone-rate .home-kpi-value { color: #4338ca; }

@media (max-width: 575.98px) {
  .home-kpi {
    min-height: 108px;
    padding: 12px;
  }
  .home-kpi-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 13px;
  }
  .home-kpi-label { font-size: 12px; }
}

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

@media (min-width: 768px) {
  .home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

.home-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 12px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: inherit;
  min-height: 92px;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.home-tile:hover {
  border-color: #b7e4c7;
  color: inherit;
}

.home-tile:active {
  transform: scale(0.98);
}

.home-tile i {
  font-size: 1.35rem;
  color: var(--brand);
  margin-bottom: 4px;
}

.home-tile .title {
  font-weight: 700;
  font-size: 0.95rem;
}

.home-tile .desc {
  font-size: 0.75rem;
  color: var(--muted);
}

.home-panel {
  border-radius: 14px;
  padding: 12px 14px;
}

.home-panel .pm-panel-head {
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.home-panel-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

.home-panel-link:hover {
  color: var(--brand-dark);
}

.home-empty-hint {
  text-align: center;
  color: #8aa399;
  font-size: 0.88rem;
  padding: 18px 8px 10px;
}

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

.home-alert {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #eee;
  background: #fff;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.home-alert-warning {
  border-color: #ffe8a1;
  background: #fffbeb;
}

.home-alert-danger {
  border-color: #f5c2c7;
  background: #fff5f5;
}

.home-alert:hover {
  color: inherit;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(31, 42, 36, 0.06);
}

.home-alert-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-dark);
  line-height: 1.35;
}

.home-alert-msg {
  margin-top: 3px;
  font-size: 0.78rem;
  color: #868e96;
  line-height: 1.4;
}

.home-trend-chart {
  height: 200px;
  padding: 4px 2px 0;
  background:
    radial-gradient(circle at 0% 100%, rgba(216, 243, 220, 0.45), transparent 55%),
    linear-gradient(180deg, #fbfefc 0%, #ffffff 100%);
  border-radius: 12px;
}

.report-table th,
.report-table td {
  white-space: nowrap;
  padding: 0.65rem 0.85rem;
}

.report-table thead th {
  background: #f6f9f7;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.login-page {
  min-height: 100vh;
  padding-top: 0 !important;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 12% 18%, rgba(216, 243, 220, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 88% 82%, rgba(64, 145, 108, 0.28), transparent 50%),
    linear-gradient(155deg, #0f2e22 0%, #1b4332 38%, #2d6a4f 72%, #40916c 100%);
  color: #1f2a24;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

.login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  animation: login-float 12s ease-in-out infinite;
}

.login-orb-a {
  width: min(42vw, 360px);
  height: min(42vw, 360px);
  left: -8%;
  top: -6%;
  background: radial-gradient(circle, rgba(216, 243, 220, 0.55) 0%, transparent 70%);
}

.login-orb-b {
  width: min(48vw, 420px);
  height: min(48vw, 420px);
  right: -10%;
  bottom: -12%;
  background: radial-gradient(circle, rgba(82, 183, 136, 0.4) 0%, transparent 70%);
  animation-delay: -4s;
}

.login-grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}

@keyframes login-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(12px, -16px, 0) scale(1.04); }
}

.login-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
  animation: login-rise 0.55s ease-out both;
}

@keyframes login-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.login-logo {
  display: block;
  height: clamp(56px, 10vw, 72px);
  width: auto;
  max-width: min(100%, 280px);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.22));
  background: transparent;
}

.login-tagline {
  margin: 0;
  color: rgba(232, 245, 233, 0.92);
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.login-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-radius: 22px;
  padding: 28px 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 20px 48px rgba(8, 28, 20, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.login-alert {
  margin-bottom: 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-label {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 650;
  color: #3d4a43;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-ico {
  position: absolute;
  left: 14px;
  color: #8aa399;
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 1;
}

.login-input {
  height: 50px;
  padding-left: 42px !important;
  border-radius: 14px !important;
  border: 1px solid #dce8e1 !important;
  background: #f7faf8 !important;
  font-size: 1rem !important;
  box-shadow: none !important;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.login-input.has-toggle {
  padding-right: 46px !important;
}

.login-input:focus {
  background: #fff !important;
  border-color: #2d6a4f !important;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.16) !important;
}

.login-pass-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #8aa399;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

.login-pass-toggle:hover {
  color: #2d6a4f;
  background: #eef6f1;
}

.login-pass-toggle-img {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}

.login-submit {
  margin-top: 0.35rem;
  height: 52px;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #40916c, #2d6a4f);
  box-shadow: 0 10px 22px rgba(45, 106, 79, 0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.login-submit:hover {
  color: #fff;
  filter: brightness(1.04);
  box-shadow: 0 12px 26px rgba(45, 106, 79, 0.38);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit .bi {
  font-size: 1.45rem;
  line-height: 1;
}

.login-foot {
  margin: 0;
  text-align: center;
  color: rgba(232, 245, 233, 0.72);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

@media (max-width: 480px) {
  .login-page { padding: 28px 16px; }
  .login-card { padding: 24px 18px 22px; }
  .login-logo { height: 56px; }
}

.exception-item { background: #fff; }
.cage-card { background: #fff; }
.mobile-tabbar a { flex: 1; min-width: 0; }

.guide-flow-item {
  display: flex;
  gap: 12px;
  position: relative;
  padding-bottom: 16px;
}

.guide-flow-item:last-child {
  padding-bottom: 0;
}

.guide-flow-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: #d8f3dc;
}

.guide-step {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.guide-flow-body {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.guide-flow-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.guide-flow-links a {
  font-size: 12px;
  text-decoration: none;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.guide-flow-links a:hover {
  color: var(--brand-dark);
}

#guideAccordion .accordion-button {
  font-weight: 600;
  font-size: 0.95rem;
}

#guideAccordion .accordion-button:not(.collapsed) {
  background: #eef6f1;
  color: var(--brand-dark);
  box-shadow: none;
}

#guideAccordion .accordion-button:focus {
  box-shadow: none;
  border-color: #dee2e6;
}

/* ???? ? ???? */
.egg-month-panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border: 1px solid #e8f0eb;
}

.egg-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 55%, #40916c 100%);
  color: #fff;
}

.egg-month-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.egg-month-range {
  margin-top: 2px;
  font-size: 0.75rem;
  opacity: 0.85;
}

.egg-month-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

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

@media (min-width: 768px) {
  .egg-month-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.egg-month-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: #f6f9f7;
  min-height: 0;
}

.egg-month-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.egg-month-label {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.2;
}

.egg-month-value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 2px;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.egg-month-item.tone-eggs .egg-month-icon {
  background: #d8f3dc;
  color: #1b4332;
}

.egg-month-item.tone-bad {
  background: #fff5f5;
}

.egg-month-item.tone-bad .egg-month-icon {
  background: #ffe3e3;
  color: #c1121f;
}

.egg-month-item.tone-bad .egg-month-value {
  color: #c1121f;
}

.egg-month-item.tone-records .egg-month-icon {
  background: #e7f5ff;
  color: #1864ab;
}

.egg-month-item.tone-days .egg-month-icon {
  background: #fff3bf;
  color: #e67700;
}

/* ???? ? ?? */
.egg-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(216, 243, 220, 0.9), transparent 45%),
    linear-gradient(135deg, #ffffff 0%, #f3faf5 100%);
  border: 1px solid #e4efe8;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.egg-hero-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.egg-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(160deg, #2d6a4f, #1b4332);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(45, 106, 79, 0.25);
}

.egg-hero-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.25;
}

.egg-hero-desc {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}
.egg-hero-hint::before {
  content: " · ";
}

.egg-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: linear-gradient(180deg, #40916c, var(--brand));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(45, 106, 79, 0.28);
  white-space: nowrap;
}

.egg-hero-btn:hover,
.egg-hero-btn:focus {
  color: #fff;
  background: linear-gradient(180deg, #52b788, #2d6a4f);
}

.egg-filter-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid #e8f0eb;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.egg-filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 8px;
}

.egg-filter-label i {
  color: var(--brand);
  margin-right: 2px;
}

.egg-filter-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 768px) {
  .egg-filter-row {
    flex-direction: row;
    align-items: stretch;
  }

  .egg-filter-input {
    flex: 1;
    min-width: 0;
  }

  .egg-filter-actions {
    display: flex;
    gap: 8px;
  }

  .egg-filter-actions .btn {
    min-width: 88px;
  }
}

.egg-filter-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}

.egg-filter-panel .input-group-text {
  background: #f6f9f7;
  border-color: #dce8e1;
  color: var(--brand);
}

.egg-filter-panel .form-control {
  border-color: #dce8e1;
}

.egg-filter-panel .input-group .btn-outline-secondary {
  background: #fff;
  border-color: #dce8e1;
  color: #495057;
}

.egg-filter-panel .input-group .btn-outline-secondary:hover,
.egg-filter-panel .input-group .btn-outline-secondary:focus {
  background: #f6f9f7;
  border-color: #dce8e1;
  color: var(--brand-dark);
  box-shadow: none;
}

.egg-filter-panel .input-group .form-control:focus {
  border-color: #86b7a0;
  box-shadow: 0 0 0 0.2rem rgba(45, 106, 79, 0.15);
  z-index: 3;
}

.egg-list-panel {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #e8f0eb;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  padding: 14px;
}

.egg-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef3f0;
}

.egg-list-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.egg-list-hint {
  font-size: 0.75rem;
  color: var(--muted);
  background: #f6f9f7;
  border-radius: 999px;
  padding: 3px 10px;
}

.egg-day-group + .egg-day-group {
  margin-top: 16px;
}

.egg-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.egg-day-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--brand-dark);
  font-size: 0.9rem;
}

.egg-day-date i {
  color: var(--brand);
}

.egg-day-sum {
  font-size: 0.75rem;
  color: var(--muted);
}

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

.egg-rec-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #f7faf8;
  border: 1px solid #e8f0eb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.egg-rec-card:hover {
  border-color: #b7e4c7;
  box-shadow: 0 2px 10px rgba(45, 106, 79, 0.08);
}

.egg-rec-card.has-bad {
  background: linear-gradient(90deg, #fff8f8 0%, #f7faf8 28%);
  border-color: #f5c2c7;
}

.egg-rec-main {
  min-width: 0;
  flex: 1;
}

.egg-rec-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.egg-rec-house {
  font-weight: 700;
  color: var(--text);
}

.egg-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 8px;
}

.egg-status.is-normal {
  background: #d8f3dc;
  color: #1b4332;
}

.egg-status.is-bad {
  background: #ffe3e3;
  color: #c1121f;
}

.egg-status.is-none {
  background: #e9ecef;
  color: #495057;
}

.egg-status.is-infertile {
  background: #fff3bf;
  color: #e67700;
}

.egg-rec-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.egg-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  background: #fff;
  border-radius: 10px;
  padding: 4px 8px;
  border: 1px solid #e8f0eb;
  font-size: 0.75rem;
}

.egg-metric em {
  font-style: normal;
  color: var(--muted);
}

.egg-metric strong {
  font-weight: 800;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.egg-metric.bad strong {
  color: #c1121f;
}

.egg-metric.total {
  background: #eef6f1;
  border-color: #d8f3dc;
}

.egg-rec-metrics-lg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}

.egg-rec-metrics-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.egg-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f4f7f5;
  border: 1px solid #e5eee8;
  font-size: 0.72rem;
  line-height: 1.2;
}

.egg-chip em {
  font-style: normal;
  color: var(--muted);
}

.egg-chip b {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--brand-dark);
  font-size: 0.92rem;
}

.egg-chip.good {
  background: #eef8f1;
  border-color: #d4edda;
}

.egg-chip.good b {
  color: #1b7a45;
}

.egg-chip.bad {
  background: #fff5f5;
  border-color: #ffd6d6;
}

.egg-chip.bad b {
  color: #c1121f;
}

.egg-chip.total {
  background: #eef2ff;
  border-color: #dbe4ff;
}

.egg-chip.total b {
  color: #364fc7;
}

.egg-chip.rate {
  background: #fff9db;
  border-color: #ffe8a3;
}

.egg-chip.rate b {
  color: #e67700;
}

.egg-chip.rate.is-hot {
  background: #ffe3e3;
  border-color: #ffc9c9;
}

.egg-chip.rate.is-hot b {
  color: #c1121f;
}

.egg-metric-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 6px 4px;
  border-radius: 12px;
  background: #f7faf8;
  border: 1px solid #e5eee8;
  text-align: center;
}

.egg-metric-label {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.2;
}

.egg-metric-value {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.egg-metric-value small {
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 1px;
}

.egg-metric-card.good {
  background: #eef8f1;
  border-color: #d4edda;
}

.egg-metric-card.good .egg-metric-value {
  color: #1b7a45;
}

.egg-metric-card.bad {
  background: #fff5f5;
  border-color: #ffd6d6;
}

.egg-metric-card.bad .egg-metric-value {
  color: #c1121f;
}

.egg-metric-card.total {
  background: #eef2ff;
  border-color: #dbe4ff;
}

.egg-metric-card.total .egg-metric-value {
  color: #364fc7;
}

.egg-metric-card.rate {
  background: #fff9db;
  border-color: #ffe8a3;
}

.egg-metric-card.rate .egg-metric-value {
  color: #e67700;
}

.egg-metric-card.rate.is-hot {
  background: #ffe3e3;
  border-color: #ffc9c9;
}

.egg-metric-card.rate.is-hot .egg-metric-value {
  color: #c1121f;
}

@media (max-width: 399.98px) {
  .egg-rec-metrics-lg {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.egg-month-item.tone-good .egg-month-icon {
  background: #d8f3dc;
  color: #2d6a4f;
}

.egg-month-head-text {
  min-width: 0;
  flex: 1;
}

.egg-month-meta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.egg-month-foot {
  display: none;
}

.egg-rec-remark {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-word;
}

.egg-rec-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.egg-icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--brand);
  box-shadow: inset 0 0 0 1px #dce8e1;
}

.egg-icon-btn.edit:hover {
  background: #eef6f1;
}

.egg-icon-btn.del {
  color: #c1121f;
  box-shadow: inset 0 0 0 1px #f5c2c7;
}

.egg-icon-btn.del:hover {
  background: #fff0f0;
}

.egg-empty {
  text-align: center;
  padding: 36px 16px 28px;
  color: var(--muted);
}

.egg-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: #f6f9f7;
  color: #8aa399;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.egg-empty-title {
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 4px;
}

.egg-empty-desc {
  font-size: 0.82rem;
  max-width: 260px;
  margin: 0 auto;
  line-height: 1.5;
}

.egg-modal {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
}

.egg-modal-header {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: #fff;
  border-bottom: 0;
}

.egg-modal-header .modal-title {
  font-weight: 700;
}

.egg-modal .form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--brand-dark);
}

.egg-modal .modal-footer {
  border-top: 1px solid #eef3f0;
}

/* ????? */
.egg-hero-aside {
  text-align: right;
  flex-shrink: 0;
}

.egg-confirm-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.egg-confirm-badge.is-empty {
  background: #eef2f0;
  color: #6b7c74;
}

.egg-confirm-badge.is-done {
  background: #d8f3dc;
  color: #1b4332;
}

.egg-hero .save-status {
  font-size: 0.75rem;
  color: var(--muted);
  max-width: 180px;
  margin-left: auto;
}

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

@media (min-width: 768px) {
  .cage-sum-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.egg-month-item.tone-rate .egg-month-icon {
  background: #eef2ff;
  color: #4338ca;
}

.egg-tip {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 14px;
  border-radius: 14px;
  background: #f6faf7;
  border: 1px solid #e3eee7;
  color: #4d6358;
  font-size: 0.82rem;
  line-height: 1.5;
}

.egg-tip i {
  color: var(--brand);
  margin-top: 2px;
}

.egg-input-panel {
  background: var(--card);
  border-radius: 18px;
  border: 1px solid #e7eee9;
  box-shadow: 0 8px 24px rgba(27, 67, 50, 0.05);
  overflow: hidden;
}

.egg-input-panel .egg-list-head {
  margin: 0;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #eef3f0;
}

.egg-input-body {
  padding: 14px 16px 16px;
}

.egg-input-body .form-label {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--brand-dark);
}

.egg-input-panel .input-group-text {
  background: #fff;
  border-color: #ced4da;
  color: var(--brand);
}

.egg-input-panel .form-control,
.egg-input-panel .form-select {
  background: #fff;
  border-color: #ced4da;
}

.egg-input-panel .input-group .btn-outline-secondary {
  background: #fff;
  border-color: #ced4da;
  color: #495057;
}

.egg-input-panel .input-group .btn-outline-secondary:hover {
  background: #f8f9fa;
  border-color: #ced4da;
  color: var(--brand-dark);
}

.egg-input-panel .form-control:focus {
  background: #fff;
  border-color: #86b7a0;
  box-shadow: 0 0 0 0.2rem rgba(45, 106, 79, 0.15);
}

.egg-input-panel .form-control:-webkit-autofill,
.egg-input-panel .form-control:-webkit-autofill:hover,
.egg-input-panel .form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--text);
  transition: background-color 99999s ease-out;
}

.egg-input-note {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--muted);
}

.egg-qty-input {
  font-weight: 700;
  text-align: center;
}

.egg-qty-input.is-bad {
  color: var(--danger);
}

.egg-save-btn {
  border: 0;
  border-radius: 16px;
  min-height: 52px;
  font-weight: 700;
  background: linear-gradient(135deg, #2d6a4f, #40916c);
  color: #fff;
  box-shadow: 0 10px 22px rgba(45, 106, 79, 0.28);
}

.egg-save-btn:hover,
.egg-save-btn:focus {
  color: #fff;
  filter: brightness(1.05);
}

.egg-list-head-wrap {
  flex-wrap: wrap;
  gap: 10px;
}

.egg-list-date {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
}

.egg-list-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.egg-list-tools .form-select,
.egg-list-tools .form-control {
  width: auto;
  min-width: 7.5rem;
}

.egg-recorded-meta {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0 4px 10px;
}

.cage-suggest {
  top: 100%;
  margin-top: 4px !important;
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .cage-egg-page .egg-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 8px 10px;
  }

  .cage-egg-page .egg-hero.mb-3 {
    margin-bottom: 0.55rem !important;
  }

  .cage-egg-page .egg-hero-main {
    width: 100%;
    gap: 8px;
  }

  .cage-egg-page .egg-hero-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    border-radius: 9px;
    box-shadow: 0 3px 8px rgba(45, 106, 79, 0.2);
  }

  .cage-egg-page .egg-hero-copy {
    min-width: 0;
    flex: 1;
  }

  .cage-egg-page .egg-hero-title {
    font-size: 0.98rem;
    line-height: 1.2;
  }

  .cage-egg-page .egg-hero-desc {
    margin-top: 1px;
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .cage-egg-page .egg-hero-hint {
    display: inline;
    margin-top: 0;
  }

  .cage-egg-page .egg-hero-hint::before {
    content: " · ";
  }

  .cage-egg-page .egg-hero-aside {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 8px;
    padding-top: 5px;
    border-top: 1px solid #e4efe8;
    text-align: left;
  }

  .cage-egg-page .egg-hero .save-status {
    margin-left: 0;
    max-width: none;
    flex: 1 1 auto;
    text-align: right;
    font-size: 0.66rem;
    line-height: 1.25;
    word-break: break-word;
  }

  .cage-egg-page .egg-confirm-badge {
    flex-shrink: 0;
    margin-bottom: 0;
    padding: 2px 8px;
    font-size: 0.66rem;
  }
}

@media (max-width: 575.98px) {
  .egg-hero {
    flex-direction: row;
    align-items: center;
    padding: 12px;
    gap: 8px;
  }

  .egg-hero-icon {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
    border-radius: 12px;
  }

  .egg-hero-title {
    font-size: 1.05rem;
  }

  .egg-hero-desc {
    font-size: 0.72rem;
  }

  .egg-hero > .egg-hero-btn {
    flex-shrink: 0;
    align-self: center;
    width: auto;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
  }

  .egg-hero-aside {
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .egg-hero .save-status {
    margin-left: 0;
    max-width: none;
    text-align: right;
  }

  .cage-egg-page .egg-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 10px;
    gap: 6px;
  }

  .cage-egg-page .egg-hero-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    border-radius: 9px;
  }
}

/* ??????? */
.mat-subnav {
  margin-left: -0.25rem;
  margin-right: -0.25rem;
}

.mat-subnav-list {
  list-style: none;
  margin: 0;
  padding: 2px 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mat-subnav-list a {
  display: inline-block;
  white-space: nowrap;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid #e4efe8;
}

.mat-subnav-list a.active {
  color: #fff;
  background: linear-gradient(180deg, #40916c, var(--brand));
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(45, 106, 79, 0.22);
}

.mat-subnav-list a:hover:not(.active) {
  background: #f6faf7;
  border-color: #cfe3d6;
}

@media (max-width: 767.98px) {
  .mat-subnav {
    margin-left: 0;
    margin-right: 0;
  }

  .mat-subnav-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 0 2px 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mat-subnav-list::-webkit-scrollbar {
    display: none;
  }

  .mat-subnav-list li {
    flex: 0 0 auto;
    grid-column: auto;
  }

  .mat-subnav-list li:nth-child(4),
  .mat-subnav-list li:nth-child(5) {
    grid-column: auto;
  }

  .mat-subnav-list a {
    display: inline-block;
    width: auto;
    padding: 0.28rem 0.55rem;
    font-size: 0.72rem;
    border-radius: 8px;
    line-height: 1.2;
  }

  .mat-hero,
  .pm-hero {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 12px;
  }

  .mat-hero-icon,
  .pm-hero-icon {
    display: none;
  }

  .mat-hero-desc,
  .pm-hero-desc {
    display: block;
    margin-top: 2px;
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .mat-hero-title,
  .pm-hero-title {
    font-size: 1rem;
    font-weight: 800;
  }

  .mat-hero-btn {
    padding: 0.32rem 0.7rem;
    font-size: 0.8rem;
    gap: 4px;
  }

  .mat-filter {
    padding: 8px;
    margin-bottom: 0.5rem !important;
  }
}


/* ?????? */
.mat-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(216, 243, 220, 0.9), transparent 45%),
    linear-gradient(135deg, #ffffff 0%, #f3faf5 100%);
  border: 1px solid #e4efe8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.mat-hero-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mat-hero-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(160deg, #2d6a4f, #1b4332);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(45, 106, 79, 0.22);
}

.mat-hero-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.25;
}

.mat-hero-desc {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}

.mat-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: linear-gradient(180deg, #40916c, var(--brand));
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: 0 3px 8px rgba(45, 106, 79, 0.22);
  white-space: nowrap;
}

.mat-hero-btn:hover,
.mat-hero-btn:focus {
  color: #fff;
  background: linear-gradient(180deg, #52b788, #2d6a4f);
}

.mat-filter {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
  border: 1px solid #e8f0eb;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.mat-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mat-filter-search {
  grid-column: 1 / -1;
}

.mat-filter .form-select,
.mat-filter .form-control,
.mat-filter .input-group-text {
  border-color: #dce8e1;
}

.mat-filter .input-group-text {
  background: #f6f9f7;
  color: var(--brand);
}

@media (min-width: 768px) {
  .mat-filter-grid {
    grid-template-columns: 160px 140px minmax(0, 1fr);
    align-items: center;
  }

  .mat-filter-search {
    grid-column: auto;
  }
}

.mat-list-panel {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #e8f0eb;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  padding: 14px;
}

.mat-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef3f0;
}

.mat-list-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.mat-list-hint {
  font-size: 0.75rem;
  color: var(--muted);
  background: #f6f9f7;
  border-radius: 999px;
  padding: 3px 10px;
}

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

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

@media (min-width: 1100px) {
  .mat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.mat-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 14px;
  background: #f7faf8;
  border: 1px solid #e8f0eb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 88px;
}

.mat-card:hover {
  border-color: #b7e4c7;
  box-shadow: 0 2px 10px rgba(45, 106, 79, 0.08);
}

.mat-card.is-off {
  opacity: 0.72;
  background: #f8f9fa;
}

.mat-card-body {
  min-width: 0;
  flex: 1;
}

.mat-card-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 8px;
}

.mat-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.mat-status {
  font-size: 0.68rem;
  font-weight: 500;
  color: #6c757d;
  padding: 1px 0;
}

.mat-status.is-on {
  color: #2d6a4f;
}

.mat-status.is-off {
  color: #868e96;
}

.mat-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.mat-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--muted);
  background: #fff;
  border: 1px solid #e8f0eb;
  border-radius: 8px;
  padding: 2px 7px;
}

.mat-cat {
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 2px 7px;
}

.mat-cat.tone-feed {
  background: #d8f3dc;
  color: #1b4332;
}

.mat-cat.tone-med {
  background: #e7f5ff;
  color: #1864ab;
}

.mat-cat.tone-eq {
  background: #fff3bf;
  color: #e67700;
}

.mat-cat.tone-other {
  background: #e9ecef;
  color: #495057;
}

.mat-unit {
  font-size: 0.72rem;
  color: var(--muted);
}

.mat-card-actions {
  display: flex;
  flex-direction: row;
  gap: 4px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .mat-card-actions {
    flex-direction: column;
  }
}

.mat-icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--brand);
  box-shadow: inset 0 0 0 1px #dce8e1;
}

.mat-icon-btn.edit:hover {
  background: #eef6f1;
}

.mat-icon-btn.del {
  color: #c1121f;
  box-shadow: inset 0 0 0 1px #f5c2c7;
}

.mat-icon-btn.del:hover {
  background: #fff0f0;
}

.mat-empty {
  text-align: center;
  padding: 40px 16px 32px;
  color: var(--muted);
}

.mat-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: #f6f9f7;
  color: #8aa399;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.mat-empty-title {
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 4px;
}

.mat-empty-desc {
  font-size: 0.82rem;
}

.mat-modal {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
}

.mat-modal-header {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: #fff;
  border-bottom: 0;
}

.mat-modal-header .modal-title {
  font-weight: 700;
}

.mat-modal .form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--brand-dark);
}

.mat-modal .modal-footer {
  border-top: 1px solid #eef3f0;
}

/* ?????????????? */
.hatch-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(216, 243, 220, 0.9), transparent 45%),
    linear-gradient(135deg, #ffffff 0%, #f3faf5 100%);
  border: 1px solid #e4efe8;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.hatch-hero-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hatch-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(160deg, #2d6a4f, #1b4332);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(45, 106, 79, 0.25);
}

.hatch-hero-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.25;
}

.hatch-hero-desc {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

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

.hatch-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: linear-gradient(180deg, #40916c, var(--brand));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(45, 106, 79, 0.28);
  white-space: nowrap;
}

.hatch-hero-btn.alt {
  background: linear-gradient(180deg, #4dabf7, #1971c2);
  box-shadow: 0 6px 14px rgba(25, 113, 194, 0.28);
}

.hatch-hero-btn:hover,
.hatch-hero-btn:focus {
  color: #fff;
  filter: brightness(1.05);
}

.hatch-month-panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border: 1px solid #e8f0eb;
}

.hatch-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 55%, #40916c 100%);
  color: #fff;
}

.hatch-month-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.hatch-month-range {
  margin-top: 2px;
  font-size: 0.75rem;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hatch-month-head-text {
  min-width: 0;
  flex: 1;
}

.hatch-month-meta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.hatch-month-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.hatch-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

.hatch-month-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: #f6f9f7;
  min-height: 78px;
}

.hatch-month-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.hatch-month-label {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.2;
}

.hatch-month-value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 2px;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.hatch-month-unit {
  font-size: 0.7rem;
  color: var(--muted);
}

.hatch-month-item.tone-in .hatch-month-icon {
  background: #d8f3dc;
  color: #1b4332;
}

.hatch-month-item.tone-out .hatch-month-icon {
  background: #e7f5ff;
  color: #1864ab;
}

.hatch-month-item.tone-rate .hatch-month-icon {
  background: #fff3bf;
  color: #e67700;
}

.hatch-filter-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid #e8f0eb;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.hatch-filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 8px;
}

.hatch-filter-label i {
  color: var(--brand);
}

.hatch-filter-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hatch-filter-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}

.hatch-filter-panel .input-group-text {
  background: #f6f9f7;
  border-color: #dce8e1;
  color: var(--brand);
}

.hatch-filter-panel .form-control {
  border-color: #dce8e1;
}

@media (min-width: 768px) {
  .hatch-filter-row {
    flex-direction: row;
    align-items: stretch;
  }

  .hatch-filter-input {
    flex: 1;
    min-width: 0;
  }

  .hatch-filter-actions {
    display: flex;
  }

  .hatch-filter-actions .btn {
    min-width: 88px;
  }
}

.hatch-list-panel {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #e8f0eb;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  padding: 14px;
}

.hatch-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  background: #f6f9f7;
  border-radius: 12px;
}

.hatch-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
}

.hatch-tab.active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.hatch-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef3f0;
}

.hatch-list-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.hatch-list-hint {
  font-size: 0.75rem;
  color: var(--muted);
  background: #f6f9f7;
  border-radius: 999px;
  padding: 3px 10px;
}

.hatch-rec-card {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e8f0eb;
  margin-bottom: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(27, 67, 50, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hatch-rec-card:last-child {
  margin-bottom: 0;
}

.hatch-rec-card:hover {
  border-color: #b7e4c7;
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.1);
}

.hatch-rec-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #40916c, #2d6a4f);
}

.hatch-rec-card.tone-chick {
  background: linear-gradient(100deg, #f7fbff 0%, #fff 55%);
}

.hatch-rec-card.tone-chick .hatch-rec-accent {
  background: linear-gradient(180deg, #74c0fc, #1c7ed6);
}

.hatch-rec-card.tone-egg .hatch-rec-qty strong {
  color: #1b4332;
}

.hatch-rec-card.tone-chick .hatch-rec-qty strong {
  color: #1864ab;
}

.hatch-rec-main {
  min-width: 0;
  flex: 1;
}

.hatch-rec-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hatch-rec-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.hatch-rec-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.hatch-rec-date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.hatch-rec-date i {
  color: var(--brand);
  font-size: 0.9rem;
}

.hatch-rec-tag {
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 9px;
  background: #d8f3dc;
  color: #1b4332;
  letter-spacing: 0.02em;
}

.hatch-rec-tag.chick {
  background: #e7f5ff;
  color: #1864ab;
}

.hatch-rec-qty {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 12px;
  background: #f3faf5;
  border: 1px solid #e0efe6;
}

.hatch-rec-card.tone-chick .hatch-rec-qty {
  background: #f1f7ff;
  border-color: #d6e6f7;
}

.hatch-rec-qty strong {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.hatch-rec-qty small {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.hatch-rec-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hatch-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  border: 1px solid #e8f0eb;
  font-size: 0.8rem;
}

.hatch-metric em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.75rem;
}

.hatch-metric strong {
  font-weight: 800;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
  font-size: 1.65rem;
  line-height: 1;
}

.hatch-metric small {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.hatch-rec-remark {
  margin-top: 8px;
  font-size: 0.78rem;
  color: #5c6b63;
  word-break: break-word;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f6f9f7;
}

.hatch-rec-card.tone-chick .hatch-rec-remark {
  background: #f3f8ff;
}

.hatch-rec-audit {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  font-size: 0.72rem;
  color: #8aa399;
  line-height: 1.35;
}

.hatch-rec-audit-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hatch-rec-audit-item em {
  font-style: normal;
  font-weight: 700;
  color: #6c7a72;
}

.hatch-rec-audit-item time {
  color: #a3b0a8;
  font-variant-numeric: tabular-nums;
}

.hatch-rec-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  justify-content: center;
}

.hatch-icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--brand);
  box-shadow: inset 0 0 0 1px #dce8e1;
}

.hatch-icon-btn.edit:hover {
  background: #eef6f1;
}

.hatch-icon-btn.del {
  color: #c1121f;
  box-shadow: inset 0 0 0 1px #f5c2c7;
}

.hatch-icon-btn.del:hover {
  background: #fff0f0;
}

.hatch-empty {
  text-align: center;
  padding: 36px 16px 28px;
  color: var(--muted);
}

.hatch-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: #f6f9f7;
  color: #8aa399;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.hatch-empty-title {
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 4px;
}

.hatch-empty-desc {
  font-size: 0.82rem;
}

.hatch-modal {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
}

.hatch-modal-header {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  color: #fff;
  border-bottom: 0;
}

.hatch-modal-header.alt {
  background: linear-gradient(135deg, #1864ab, #1971c2);
}

.hatch-modal-header .modal-title {
  font-weight: 700;
}

.hatch-modal .form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--brand-dark);
}

.hatch-modal .modal-footer {
  border-top: 1px solid #eef3f0;
}

@media (max-width: 575.98px) {
  .hatch-hero {
    flex-direction: row;
    align-items: center;
    padding: 12px;
    gap: 8px;
  }

  .hatch-hero-icon {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
    border-radius: 12px;
  }

  .hatch-hero-title {
    font-size: 1.05rem;
  }

  .hatch-hero-desc {
    font-size: 0.72rem;
  }

  .hatch-hero-actions {
    flex-shrink: 0;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
  }

  .hatch-hero-btn {
    flex: 0 0 auto;
    padding: 0.38rem 0.7rem;
    font-size: 0.82rem;
    gap: 4px;
  }

  .hatch-month-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 8px;
    min-height: 0;
  }

  .hatch-month-icon {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    border-radius: 8px;
  }

  .hatch-month-value {
    font-size: 1.1rem;
  }

  .hatch-month-label {
    font-size: 0.68rem;
  }

  .hatch-month-unit {
    font-size: 0.65rem;
  }
}


/* ========== ????????????????????? ========== */
.pm-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(216, 243, 220, 0.9), transparent 45%),
    linear-gradient(135deg, #ffffff 0%, #f3faf5 100%);
  border: 1px solid #e4efe8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  margin-bottom: 0.5rem;
}
.pm-hero-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pm-hero-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(160deg, #2d6a4f, #1b4332); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; box-shadow: 0 3px 8px rgba(45, 106, 79, 0.22);
}
.pm-hero-title { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--brand-dark); line-height: 1.25; }
.pm-hero-desc { margin: 2px 0 0; font-size: 0.72rem; color: var(--muted); line-height: 1.3; }
.pm-hero-btn {
  display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 999px;
  padding: 0.35rem 0.75rem; background: linear-gradient(180deg, #40916c, var(--brand));
  color: #fff; font-weight: 700; font-size: 0.82rem; box-shadow: 0 3px 8px rgba(45, 106, 79, 0.22); white-space: nowrap;
}
.pm-hero-btn:hover, .pm-hero-btn:focus { color: #fff; filter: brightness(1.05); }
.pm-hero-btn.warn { background: linear-gradient(180deg, #fcc419, #f59f00); box-shadow: 0 6px 14px rgba(245, 159, 0, 0.28); color: #212529; }

.pm-panel {
  background: #fff; border-radius: 12px; border: 1px solid #e8f0eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); padding: 10px; margin-bottom: 0.65rem;
}
.pm-panel-title { margin: 0 0 8px; font-size: 0.9rem; font-weight: 700; color: var(--brand-dark); }
.pm-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #eef3f0;
}
.pm-panel-head .pm-panel-title { margin: 0; }
.pm-panel-hint {
  font-size: 0.75rem; color: var(--muted); background: #f6f9f7;
  border-radius: 999px; padding: 3px 10px;
}

.pm-month {
  background: #fff; border-radius: 12px; overflow: hidden;
  border: 1px solid #e8f0eb; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); margin-bottom: 0.5rem;
}
.pm-month-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; color: #fff;
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 55%, #40916c 100%);
}
.pm-month-title { font-size: 0.88rem; font-weight: 700; }
.pm-month-range { margin-top: 0; font-size: 0.7rem; opacity: 0.85; }
.pm-month-badge {
  width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,0.16);
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0;
}
.pm-month-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px;
}
@media (min-width: 768px) {
  .pm-month-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pm-month-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pm-month-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pm-month-item {
  display: flex; align-items: center; gap: 8px; padding: 8px;
  border-radius: 10px; background: #f6f9f7; min-height: 0;
}
.pm-month-icon {
  width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 0.85rem; flex-shrink: 0; background: #d8f3dc; color: #1b4332;
}
.pm-month-item.tone-money .pm-month-icon { background: #fff3bf; color: #e67700; }
.pm-month-item.tone-rate .pm-month-icon { background: #e3fafc; color: #0c8599; }
.pm-month-item.tone-warn .pm-month-icon { background: #ffe3e3; color: #c1121f; }
.pm-month-item.tone-info .pm-month-icon { background: #e7f5ff; color: #1864ab; }
.pm-month-label { font-size: 0.66rem; color: var(--muted); }
.pm-month-value {
  font-size: 1.05rem; font-weight: 800; color: var(--brand-dark);
  font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 0;
}
.pm-month-sub {
  font-size: 0.62rem; color: var(--muted); line-height: 1.25; margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 767.98px) {
  .pm-month-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pm-month-grid.cols-3 .pm-month-value { font-size: 0.92rem; }
  .pm-month-grid.cols-3 .pm-month-sub { font-size: 0.58rem; }
}
.pm-month-item.tone-warn .pm-month-value { color: #c1121f; }

.pm-filter-label { font-size: 0.8rem; font-weight: 600; color: var(--brand-dark); margin-bottom: 8px; }
.pm-filter-label i { color: var(--brand); }
.pm-filter-row { display: flex; flex-direction: column; gap: 10px; }
.pm-filter-actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; }
.pm-panel .input-group-text { background: #f6f9f7; border-color: #dce8e1; color: var(--brand); }
.pm-panel .form-control, .pm-panel .form-select { border-color: #dce8e1; }
.pm-panel .input-group .btn-outline-secondary {
  background: #fff;
  border-color: #dce8e1;
  color: #495057;
}
.pm-panel .input-group .btn-outline-secondary:hover,
.pm-panel .input-group .btn-outline-secondary:focus {
  background: #f6f9f7;
  border-color: #dce8e1;
  color: var(--brand-dark);
  box-shadow: none;
}
.pm-panel .input-group .form-control:focus {
  border-color: #86b7a0;
  box-shadow: 0 0 0 0.2rem rgba(45, 106, 79, 0.15);
  z-index: 3;
}

/* ????????????? */
.pm-form .pm-panel-title { margin-bottom: 6px; }
.pm-form .form-label {
  margin-bottom: 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}
.pm-form .form-control,
.pm-form .form-select {
  padding: 0.28rem 0.55rem;
  font-size: 0.875rem;
  min-height: calc(1.5em + 0.56rem + 2px);
}
.pm-form .form-text {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  line-height: 1.25;
}
.pm-form .btn {
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
}
.pm-form .row > [class*="col-"] {
  margin-bottom: 0;
}
@media (min-width: 768px) {
  .pm-filter-row { flex-direction: row; align-items: stretch; }
  .pm-filter-input { flex: 1; min-width: 0; }
  .pm-filter-actions { display: flex; }
  .pm-filter-actions .btn { min-width: 88px; }
}

.pm-rec {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: 8px; border-radius: 12px; background: #fff; border: 1px solid #e8f0eb;
  margin-bottom: 6px; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pm-rec:last-child { margin-bottom: 0; }
.pm-rec:hover { border-color: #b7e4c7; box-shadow: 0 1px 6px rgba(45, 106, 79, 0.06); }
.pm-rec-main { min-width: 0; flex: 1; }
.pm-rec-title { font-weight: 700; font-size: 0.82rem; color: var(--text); line-height: 1.3; }
.pm-rec-meta { font-size: 0.78rem; margin-top: 4px; }
.pm-rec-sub { font-size: 0.7rem; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.pm-rec .pm-icon-btn { width: 28px; height: 28px; border-radius: 8px; font-size: 0.85rem; }

/* ?????????? / ?? / ?? */
.stk-metrics {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.1fr;
  gap: 4px;
  margin-top: 6px;
}
.stk-metrics.cols-2 { grid-template-columns: 1.5fr 1fr; }
.stk-metrics.cols-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) {
  .stk-metrics.cols-4 {
    grid-template-columns: 1.2fr 1.2fr 0.9fr 1fr;
  }
}
.stk-metric {
  display: flex; flex-direction: column; gap: 0;
  padding: 5px 6px; border-radius: 8px;
  background: #f6f9f7; border: 1px solid #e8f0eb; min-width: 0;
}
.stk-metric em {
  font-style: normal; font-size: 0.6rem; color: var(--muted); line-height: 1.15;
}
.stk-metric b {
  font-size: 0.86rem; font-weight: 700; color: var(--text);
  line-height: 1.2; word-break: break-word;
}
.stk-metric.is-name { background: #fff; }
.stk-metric.is-qty b { color: #1864ab; }
.stk-metric.is-amount {
  background: #edf7f1; border-color: #cfe8d8;
}
.stk-metric.is-amount b { color: var(--brand-dark, #2d6a4f); }
.stk-metric.is-down b { color: #c1121f; }
.stk-metric.is-up b { color: #2b8a3e; }
/* ??????? */
.sale-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
}
.sale-metric {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 5px 4px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e8f0eb;
  text-align: center;
  min-width: 0;
}
.sale-metric em {
  font-style: normal;
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1.15;
}
.sale-metric b {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  word-break: break-all;
}
.sale-metric b small {
  margin-left: 1px;
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--muted);
}
.sale-metric.is-amount {
  background: #edf7f1;
  border-color: #cfe8d8;
}
.sale-metric.is-amount b {
  color: var(--brand-dark, #2d6a4f);
}

/* ???????? */
.sale-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
@media (min-width: 768px) {
  .sale-type-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.sale-type-card {
  background: #fff;
  border: 1px solid #e8f0eb;
  border-radius: 10px;
  padding: 6px 8px;
  box-shadow: none;
}
.sale-type-name {
  margin-bottom: 4px;
}
.sale-type-name .badge {
  font-size: 0.7rem;
  padding: 0.18em 0.45em;
}
.sale-type-stats {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4px;
}
.sale-type-stat {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.sale-type-stat em {
  font-style: normal;
  font-size: 0.6rem;
  color: var(--muted);
  line-height: 1.15;
}
.sale-type-stat b {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  word-break: break-all;
}
.sale-type-stat b small {
  margin-left: 1px;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted);
}
.sale-type-stat.is-money b {
  color: var(--brand-dark, #2d6a4f);
}

/* ???PC ??? */
.sale-panel .table-responsive {
  border-radius: 0 0 14px 14px;
}
.sale-table {
  --bs-table-bg: transparent;
  margin: 0;
}
.sale-table thead th {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: #f6f9f7;
  border-bottom: 1px solid #e0ebe4;
  white-space: nowrap;
  padding: 10px 14px;
}
.sale-table tbody td {
  padding: 12px 14px;
  border-color: #eef3f0;
  vertical-align: middle;
}
.sale-table tbody tr:hover {
  background: #f7faf8;
}
.sale-td-date {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #495057;
}
.sale-td-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
.sale-td-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--brand-dark, #2d6a4f);
  white-space: nowrap;
}
.sale-td-remark {
  max-width: 180px;
  color: var(--muted);
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sale-td-audit {
  min-width: 120px;
}
.sale-audit-who {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.sale-audit-when {
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ???????? */
.sale-card-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sale-card {
  background: #fff;
  border: 1px solid #e8f0eb;
  border-radius: 12px;
  padding: 8px;
  box-shadow: none;
}
.sale-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 0;
}
.sale-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}
.sale-card-head .badge {
  font-size: 0.7rem;
  padding: 0.18em 0.45em;
}
.sale-card-date {
  font-size: 0.74rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sale-card .sale-metrics {
  margin-top: 6px;
}
.sale-card .pm-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.85rem;
}
.sale-card-foot {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e0ebe4;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sale-card-foot > div {
  display: flex;
  gap: 6px;
  font-size: 0.72rem;
  line-height: 1.3;
  min-width: 0;
}
.sale-card-foot span {
  flex: 0 0 2.2em;
  color: var(--muted);
}
.sale-card-foot b {
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  word-break: break-word;
}

/* ????????? / ??????? */
.sale-hero {
  padding: 8px 10px;
  gap: 8px;
  margin-bottom: 0.5rem !important;
}
.sale-hero .pm-hero-main { gap: 8px; }
.sale-hero .pm-hero-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1rem;
  box-shadow: 0 3px 8px rgba(45, 106, 79, 0.22);
}
.sale-hero .pm-hero-title {
  font-size: 1.05rem;
}
.sale-hero .pm-hero-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  box-shadow: 0 3px 8px rgba(45, 106, 79, 0.22);
}
.sale-month {
  margin-bottom: 0.5rem;
}
.sale-month .pm-month-head {
  padding: 8px 12px;
  gap: 8px;
}
.sale-month .pm-month-title {
  font-size: 0.88rem;
}
.sale-month .pm-month-range {
  margin-top: 0;
  font-size: 0.7rem;
}
.sale-month .pm-month-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 0.9rem;
}
.sale-month .pm-month-grid {
  gap: 6px;
  padding: 8px;
}
.sale-month .pm-month-item {
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  min-height: 0;
}
.sale-month .pm-month-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.85rem;
}
.sale-month .pm-month-label {
  font-size: 0.66rem;
}
.sale-month .pm-month-value {
  font-size: 1.05rem;
  margin-top: 0;
  word-break: break-all;
}
/* 手机：只数+合格率并排，总金额整行展示，避免金额被挤掉 */
@media (max-width: 767.98px) {
  .sale-month .pm-month-grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sale-month .pm-month-grid.cols-3 .pm-month-item:nth-child(1) {
    order: 1;
  }
  .sale-month .pm-month-grid.cols-3 .pm-month-item.tone-rate {
    order: 2;
  }
  .sale-month .pm-month-grid.cols-3 .pm-month-item.tone-money {
    order: 3;
    grid-column: 1 / -1;
  }
  .sale-month .pm-month-grid.cols-3 .tone-money .pm-month-value {
    font-size: 1.2rem;
    letter-spacing: 0.01em;
  }
}
@media (min-width: 768px) {
  .sale-month .pm-month-grid.cols-3 .pm-month-item {
    order: initial;
    grid-column: auto;
  }
}

.sale-page .pm-hero-desc {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.sale-main-panel {
  background: #fff;
  border: 1px solid #e4eee8;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(45, 106, 79, 0.05);
}

.sale-tabs {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: linear-gradient(180deg, #f4faf6 0%, #eef6f1 100%);
  border-bottom: 1px solid #e4eee8;
}

.sale-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: #5c6b63;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sale-tab i { font-size: 0.95rem; }

.sale-tab.active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.12);
}

.sale-pane {
  padding: 12px;
}

.sale-pane-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.sale-pane-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0;
}

.sale-pane-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sale-search-group {
  max-width: 14rem;
}

.sale-search-group .input-group-text {
  background: #f6f9f7;
  border-color: #dce8e1;
  color: var(--brand);
}

.sale-search-group .form-control {
  border-color: #dce8e1;
}

.sale-pane-hint {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.sale-empty {
  text-align: center;
  padding: 2.2rem 1rem;
  color: var(--muted);
}

.sale-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 14px;
  background: #eef6f1;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.sale-empty-title {
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 4px;
}

.sale-empty-desc {
  font-size: 0.8rem;
}

.sale-buyer-filter {
  background: #f6f9f7;
  border: 1px solid #e4eee8;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.sale-buyer-filter-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #5c6b63;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sale-buyer-filter-label i { color: var(--brand); }

.sale-buyer-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.sale-buyer-filter-input {
  flex: 1 1 220px;
  min-width: 0;
}

.sale-buyer-filter-input .input-group-text {
  background: #fff;
  border-color: #dce8e1;
  color: var(--brand);
}

.sale-buyer-filter-input .form-control {
  border-color: #dce8e1;
  background: #fff;
}

.sale-buyer-filter-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

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

.sale-buyer-kpi-item {
  background: #f6f9f7;
  border: 1px solid #e4eee8;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
}

.sale-buyer-kpi-item em {
  display: block;
  font-style: normal;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.sale-buyer-kpi-item b {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.2;
}

.sale-buyer-kpi-item.tone-money b {
  color: #e67700;
}

.sale-buyer-range-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin: -4px 0 10px;
}

.sale-buyer-list {
  display: grid;
  gap: 10px;
}

.sale-buyer-card {
  border: 1px solid #e4eee8;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.sale-buyer-card:hover {
  border-color: #c9ddd2;
  box-shadow: 0 6px 18px rgba(45, 106, 79, 0.08);
}

.sale-buyer-card.is-top {
  border-color: #ffd8a8;
  background: linear-gradient(180deg, #fff9f0 0%, #fff 55%);
}

.sale-buyer-card.is-hot {
  border-color: #d6ebe0;
}

.sale-buyer-card-main {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px;
  color: inherit;
}

.sale-buyer-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sale-buyer-rank {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #eef6f1;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sale-buyer-card.is-top .sale-buyer-rank {
  background: #ffe8cc;
  color: #e67700;
}

.sale-buyer-name {
  flex: 1;
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--brand-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-buyer-amount {
  font-size: 1.05rem;
  font-weight: 800;
  color: #e67700;
  white-space: nowrap;
}

.sale-buyer-bar {
  height: 6px;
  border-radius: 999px;
  background: #eef2ef;
  overflow: hidden;
  margin-bottom: 8px;
}

.sale-buyer-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #52b788, #2d6a4f);
}

.sale-buyer-card.is-top .sale-buyer-bar span {
  background: linear-gradient(90deg, #ffc078, #e67700);
}

.sale-buyer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.sale-buyer-go {
  color: var(--brand);
  font-weight: 600;
}

.sale-buyer-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sale-buyer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f6f9f7;
  border: 1px solid #e4eee8;
  border-radius: 999px;
  padding: 3px 8px 3px 4px;
  font-size: 0.75rem;
}

.sale-buyer-chip .badge {
  font-size: 0.68rem;
  padding: 0.2em 0.45em;
}

.sale-buyer-chip b {
  font-weight: 700;
  color: var(--brand-dark);
}

.sale-buyer-chip b small {
  margin-left: 2px;
  font-weight: 500;
  color: var(--muted);
}

.sale-buyer-chip.muted {
  color: var(--muted);
  padding: 3px 10px;
}

@media (max-width: 575.98px) {
  .sale-buyer-kpi {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .sale-buyer-kpi-item {
    padding: 8px 6px;
  }
  .sale-buyer-kpi-item b {
    font-size: 0.95rem;
  }
  .sale-buyer-filter-actions {
    width: 100%;
  }
  .sale-buyer-filter-actions .btn {
    flex: 1;
  }
  .sale-pane-tools {
    width: 100%;
    margin-left: 0;
  }
  .sale-search-group {
    flex: 1;
    max-width: none;
  }
}

.pm-icon-btn {
  width: 34px; height: 34px; border: 0; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #c1121f; box-shadow: inset 0 0 0 1px #f5c2c7;
}
.pm-icon-btn:hover { background: #fff0f0; }
.pm-icon-btn.edit { color: var(--brand); box-shadow: inset 0 0 0 1px #dce8e1; }
.pm-icon-btn.edit:hover { background: #eef6f1; }

.pm-modal { border: 0; border-radius: 18px; overflow: hidden; }
.pm-modal-header {
  background: linear-gradient(135deg, #1b4332, #2d6a4f); color: #fff; border-bottom: 0;
}
.pm-modal-header .modal-title { font-weight: 700; }
.pm-modal .form-label { font-weight: 600; font-size: 0.85rem; color: var(--brand-dark); }
.pm-modal .modal-footer { border-top: 1px solid #eef3f0; }

/* ========== 表单选中/焦点/日期组件：统一绿色系 ========== */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="checkbox"],
input[type="radio"],
.form-control,
.form-select,
.form-check-input {
  accent-color: var(--brand);
}

.form-control:focus,
.form-select:focus {
  border-color: #86b7a0;
  box-shadow: 0 0 0 0.25rem rgba(45, 106, 79, 0.18);
}

.form-check-input:focus {
  border-color: #86b7a0;
  box-shadow: 0 0 0 0.25rem rgba(45, 106, 79, 0.18);
}

.form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

.form-check-input:checked:focus {
  background-color: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 0 0.25rem rgba(45, 106, 79, 0.18);
}

.btn-check:focus + .btn,
.btn-check:focus-visible + .btn,
.btn-check:active + .btn-outline-primary,
.btn-check:checked + .btn-outline-primary {
  box-shadow: 0 0 0 0.2rem rgba(45, 106, 79, 0.2);
}

.btn-check:checked + .btn-outline-primary {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-disabled-color: var(--brand);
  --bs-btn-disabled-border-color: var(--brand);
}

/* Bootstrap 下拉菜单：悬停/激活改为绿色 */
.dropdown-item:hover,
.dropdown-item:focus {
  background-color: #eaf6ef;
  color: var(--brand-dark);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--brand);
  color: #fff;
}

.list-group-item.active {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/*
 * PC 自定义下拉（pm_select.js）：对齐小程序 select-dropdown，选中填充为绿色。
 * 原生 select 仅保留取值，系统蓝高亮不再露出。
 */
.pm-select {
  position: relative;
  display: block;
  width: 100%;
  z-index: 1;
}

.pm-select.w-100 {
  width: 100%;
}

.pm-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.pm-select-trigger {
  width: 100%;
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 2.1rem 0.375rem 0.75rem;
  background: #fff;
  border: 1px solid #dce8e1;
  border-radius: 0.375rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  color: var(--text);
  text-align: left;
  line-height: 1.5;
  cursor: pointer;
  appearance: none;
}

.pm-select.is-sm .pm-select-trigger {
  min-height: calc(1.5em + 0.5rem + 2px);
  padding: 0.25rem 1.9rem 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
}

.pm-select.is-open .pm-select-trigger,
.pm-select-trigger:focus {
  border-color: #86b7a0;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(45, 106, 79, 0.18);
}

.pm-select.is-open .pm-select-trigger {
  border-color: var(--brand);
}

.pm-select.is-disabled .pm-select-trigger {
  background: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.85;
}

.pm-select-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-select-text.is-ph {
  color: #a0ada6;
}

.pm-select-arrow {
  position: absolute;
  right: 0.85rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #5c6b63;
  border-bottom: 2px solid #5c6b63;
  transform: rotate(45deg);
  margin-top: -0.2rem;
  pointer-events: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.pm-select-trigger {
  position: relative;
}

.pm-select.is-open .pm-select-arrow {
  transform: rotate(225deg);
  margin-top: 0.15rem;
  border-color: var(--brand);
}

.pm-select-menu {
  position: fixed;
  z-index: 2000;
  display: none;
  box-sizing: border-box;
  min-width: 96px;
  background: #fff;
  color: #1f2a24;
  border: 1px solid var(--brand);
  border-top: 1px solid #e8f0eb;
  border-radius: 0 0 10px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(27, 67, 50, 0.16);
  padding: 4px;
}

.pm-select-menu.is-visible,
.pm-select-menu[data-open="1"] {
  display: block;
}

.pm-select-menu.is-up {
  border-radius: 10px 10px 0 0;
  border-top: 1px solid var(--brand);
  border-bottom: 1px solid #e8f0eb;
  box-shadow: 0 -8px 24px rgba(27, 67, 50, 0.16);
}

.pm-select-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: #1f2a24;
  font-size: 0.95rem;
  line-height: 1.35;
  cursor: pointer;
}

.pm-select-item:hover,
.pm-select-item:focus {
  background: #eaf6ef;
  color: var(--brand-dark);
  outline: 0;
}

/* 选中项：绿色填充（对齐小程序 .sd-item.on） */
.pm-select-item.on {
  background: #eef6f1;
  color: #1b4332;
  font-weight: 700;
}

.pm-select-item.on:hover,
.pm-select-item.on:focus {
  background: #d8f3dc;
  color: #1b4332;
}

.pm-select-item.is-disabled,
.pm-select-item:disabled {
  color: #8aa399;
  cursor: not-allowed;
  opacity: 0.7;
}

.pm-select-empty {
  padding: 0.75rem;
  font-size: 0.875rem;
  color: #8aa399;
  text-align: center;
}

/* Flatpickr：选中日/区间/今日边框改为品牌绿 */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

.flatpickr-day.inRange,
.flatpickr-day.prevMonthDay.inRange,
.flatpickr-day.nextMonthDay.inRange,
.flatpickr-day.today.inRange,
.flatpickr-day.prevMonthDay.today.inRange,
.flatpickr-day.nextMonthDay.today.inRange {
  background: #d8f3dc !important;
  border-color: #d8f3dc !important;
  box-shadow: -5px 0 0 #d8f3dc, 5px 0 0 #d8f3dc !important;
  color: var(--brand-dark) !important;
}

.flatpickr-day.today {
  border-color: var(--brand) !important;
}

.flatpickr-day.today:hover,
.flatpickr-day.today:focus {
  background: #eaf6ef !important;
  border-color: var(--brand) !important;
  color: var(--brand-dark) !important;
}

.flatpickr-day:hover,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
  background: #eaf6ef;
  border-color: #eaf6ef;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--brand);
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover,
.flatpickr-current-month input.cur-year:hover,
.flatpickr-current-month input.cur-year:focus {
  background: #eaf6ef;
}

.pm-section-title {
  font-size: 0.95rem; font-weight: 700; color: var(--brand-dark);
  margin: 0 0 10px; display: flex; align-items: center; gap: 8px;
}
.pm-section-title::before {
  content: ""; width: 4px; height: 1em; border-radius: 2px; background: var(--brand);
}

.kpi-card {
  border: 1px solid #e8f0eb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.kpi-card:hover { border-color: #b7e4c7; box-shadow: 0 2px 10px rgba(45, 106, 79, 0.08); }

/* home-hero / greet 样式见上文统一定义 */

@media (max-width: 575.98px) {
  .pm-hero { flex-direction: row; align-items: center; }
  .pm-hero-btn { justify-content: center; width: auto; }
}


/* ========== ???? ========== */
.cage-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 768px) {
  .cage-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.cage-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.12);
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}
.cage-act:active { transform: scale(0.98); }
.cage-act:disabled,
.cage-act[disabled] {
  opacity: 0.45;
  box-shadow: none;
  pointer-events: none;
}
.cage-act i { font-size: 1rem; }
.cage-act-primary {
  background: linear-gradient(180deg, #40916c, var(--brand, #2d6a4f));
  color: #fff;
}
.cage-act-success {
  background: linear-gradient(180deg, #52b788, #2d6a4f);
  color: #fff;
}
.cage-act-danger {
  background: #fff;
  color: #c1121f;
  box-shadow: inset 0 0 0 1px #f5c2c7;
}
.cage-act-outline {
  background: #fff;
  color: var(--brand-dark, #1b4332);
  box-shadow: inset 0 0 0 1px #cfe8d8;
}
.cage-act-outline:hover { color: var(--brand-dark, #1b4332); }
.cage-filter .input-group-text {
  background: #f6f9f7;
  border-color: #dce8e1;
  color: var(--brand);
}
.cage-preview {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6f9f7;
  border: 1px solid #e8f0eb;
  font-size: 0.86rem;
}
.cage-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 8px 4px;
  margin-bottom: 12px;
}
.cage-pager-text {
  font-size: 0.82rem;
  color: var(--muted);
  min-width: 5.5rem;
  text-align: center;
}

.cage-group {
  margin-bottom: 0.75rem;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e8f0eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
.cage-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef3f0;
}
.cage-group-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-dark, #1b4332);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}
.cage-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 6px;
  border-radius: 999px;
  background: #edf7f1;
  color: var(--brand-dark, #1b4332);
  font-size: 0.72rem;
  font-weight: 700;
}
.cage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 768px) {
  .cage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .cage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.cage-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  background: #f7faf8;
  border: 1px solid #e8f0eb;
  min-height: 118px;
}
.cage-item.is-off {
  opacity: 0.72;
  background: #f8f9fa;
}
.cage-item-top {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.cage-check-wrap {
  margin: 0;
  padding-top: 2px;
  flex-shrink: 0;
}
.cage-item-main { min-width: 0; flex: 1; }
.cage-item-code {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.25;
  word-break: break-all;
}
.cage-item-name {
  margin-top: 2px;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.3;
}
.cage-status {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 0;
}
.cage-status.is-on { color: #2d6a4f; }
.cage-status.is-off { color: #868e96; }
.cage-item-meta {
  font-size: 0.72rem;
  color: #495057;
  line-height: 1.35;
}
.cage-item-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
}
.cage-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
  padding: 0.28rem 0.5rem;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark, #1b4332);
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #dce8e1;
}
.cage-mini-btn.is-del {
  color: #c1121f;
  box-shadow: inset 0 0 0 1px #f5c2c7;
}
.cage-mini-btn.is-fill {
  color: #2d6a4f;
  white-space: nowrap;
}

/* ?????? */
.guide-page { max-width: 920px; }
.guide-rhythm {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.875rem;
  color: #343a40;
}
.guide-rhythm li { margin-bottom: 0.45rem; line-height: 1.45; }
.guide-rhythm li:last-child { margin-bottom: 0; }
.guide-notes {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.875rem;
  color: #495057;
}
.guide-notes li { margin-bottom: 0.4rem; line-height: 1.45; }
.guide-notes li:last-child { margin-bottom: 0; }
.guide-acc.accordion {
  --bs-accordion-border-color: #e4efe8;
  --bs-accordion-btn-bg: #fff;
  --bs-accordion-bg: #fff;
  border-radius: var(--radius, 12px);
  overflow: hidden;
  border: 1px solid #e4efe8;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}
.guide-acc .accordion-item { border-color: #e8f0eb; }
.guide-acc .accordion-button {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--brand-dark, #1b4332);
}
.guide-acc .accordion-button:not(.collapsed) {
  background: #eef6f1;
  color: var(--brand-dark, #1b4332);
  box-shadow: none;
}
.guide-acc .accordion-button:focus {
  box-shadow: none;
  border-color: #dee2e6;
}
.guide-acc .accordion-body { background: #fbfdfc; }

/* ???? */
.rbac-perm-tree {
  max-height: 280px; overflow: auto; border: 1px solid #e4efe8; border-radius: 10px; padding: 8px;
  background: #fbfdfc;
}
.rbac-perm-group { margin-bottom: 10px; }
.rbac-perm-group:last-child { margin-bottom: 0; }
.rbac-perm-group-title {
  font-size: 0.78rem; font-weight: 700; color: var(--brand-dark); margin-bottom: 6px;
}
.rbac-perm-group-items { display: grid; grid-template-columns: 1fr; gap: 4px; }
@media (min-width: 576px) {
  .rbac-perm-group-items { grid-template-columns: 1fr 1fr; }
}
.rbac-perm-item, .rbac-role-item {
  display: flex; align-items: center; gap: 8px; font-size: 0.8rem; margin: 0;
  padding: 4px 6px; border-radius: 6px;
}
.rbac-perm-item:hover, .rbac-role-item:hover { background: #f1f8f4; }
.rbac-role-checks {
  display: grid; gap: 4px; max-height: 160px; overflow: auto;
  border: 1px solid #e4efe8; border-radius: 8px; padding: 8px; background: #fbfdfc;
}
.rbac-tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rbac-tag {
  font-size: 0.65rem; padding: 2px 8px; border-radius: 999px;
  background: #eef6f1; color: var(--brand-dark);
}
.rbac-tag.is-more { background: #e9ecef; color: #495057; }
.rbac-sys-badge {
  font-size: 0.62rem; padding: 1px 6px; border-radius: 999px;
  background: #fff3bf; color: #e67700; font-weight: 600; vertical-align: middle;
}
body.pm-readonly-page .pm-write-section,
body.pm-readonly-page .pm-write-only {
  display: none !important;
}
body:not(.pm-is-admin) .pm-admin-only {
  display: none !important;
}

/* 种鸽带仔 */
.nest-page .hatch-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.nest-page .nest-filter-row {
  --nest-ctrl-h: 2.125rem;
}
.nest-page .nest-filter-field .form-label {
  display: block;
  min-height: 1.1rem;
  line-height: 1.1rem;
  margin-bottom: 0.25rem;
}
.nest-page .nest-filter-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--nest-ctrl-h);
}
.nest-page .nest-filter-field .form-control,
.nest-page .nest-filter-field .form-select,
.nest-page .nest-filter-field .btn {
  height: var(--nest-ctrl-h);
  min-height: var(--nest-ctrl-h);
  padding-top: 0;
  padding-bottom: 0;
  font-size: 0.875rem;
  line-height: 1.25;
  box-sizing: border-box;
}
.nest-page .nest-filter-field .form-control {
  display: block;
}
.nest-page .nest-filter-field .form-select {
  display: inline-flex;
  align-items: center;
}
.nest-page .nest-filter-field .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}
.nest-page .nest-filter-hint-count {
  white-space: nowrap;
  line-height: var(--nest-ctrl-h);
}
.nest-page .egg-input-panel .form-control,
.nest-page .egg-input-panel .form-select,
.nest-page .egg-input-panel .input-group-text,
.nest-page .egg-input-panel .btn {
  height: var(--nest-ctrl-h, 2.125rem);
  min-height: var(--nest-ctrl-h, 2.125rem);
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
  font-size: 0.875rem;
}
.nest-page .egg-input-panel .input-group-text,
.nest-page .egg-input-panel .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nest-list { display: grid; gap: 8px; }
.nest-hint {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 8px 10px; border-radius: 10px;
  background: #f1f8f4; border: 1px solid #d8ebe0;
  color: var(--brand-dark); font-size: 0.78rem; line-height: 1.35;
}
.nest-hint i { margin-top: 1px; color: var(--brand); }

.nest-auto-settle-lead {
  margin: 0;
  font-size: 0.88rem;
  color: var(--brand-dark);
  line-height: 1.45;
  font-weight: 600;
}
.nest-auto-settle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.nest-auto-settle-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6faf7;
  border: 1px solid #e4efe8;
}
.nest-auto-settle-item em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  color: #6c757d;
  margin-bottom: 2px;
}
.nest-auto-settle-item b {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.2;
}
.nest-auto-settle-item-accent {
  background: #eaf6ef;
  border-color: #cfe8d8;
  grid-column: 1 / -1;
}
.nest-auto-settle-item-accent b { color: #2d6a4f; }
.nest-auto-settle-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff9db;
  border: 1px solid #ffe066;
  color: #5c4b00;
  font-size: 0.78rem;
  line-height: 1.4;
}
.nest-auto-settle-note i {
  margin-top: 2px;
  flex-shrink: 0;
  color: #e67700;
}

.nest-card {
  background: #fff;
  border: 1px solid #e4efe8;
  border-radius: 12px;
  padding: 7px 9px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.nest-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; margin-bottom: 5px;
}
.nest-card-id { min-width: 0; flex: 1; }
.nest-card-code {
  font-size: 0.98rem; font-weight: 800; color: var(--brand-dark);
  letter-spacing: 0.01em; line-height: 1.15;
}
.nest-card-loc {
  margin-top: 1px; font-size: 0.7rem; color: #6c757d;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nest-status {
  flex-shrink: 0; font-size: 0.66rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; line-height: 1.2;
  background: #e9ecef; color: #495057;
}
.nest-status.tone-info { background: #e7f5ff; color: #1864ab; }
.nest-status.tone-warn { background: #fff3bf; color: #e67700; }
.hatch-house-summary {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  border: 1px solid rgba(232, 240, 235, 0.95);
}

.hatch-house-summary-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #2d6a4f;
  margin-bottom: 8px;
}

.hatch-house-summary-head i {
  font-size: 0.9rem;
}

.hatch-house-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 576px) {
  .hatch-house-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .hatch-house-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hatch-house-card {
  background: #fff;
  border: 1px solid #e4eee8;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.04);
}

.hatch-house-card.is-unset {
  background: linear-gradient(180deg, #fff9f0 0%, #fff 70%);
  border-color: #ffe0b2;
}

.hatch-house-card.is-house {
  background: linear-gradient(180deg, #f4faf6 0%, #fff 70%);
}

.hatch-house-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.hatch-house-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.hatch-house-card.is-house .hatch-house-card-icon {
  background: #d8f3dc;
  color: #2b8a3e;
}

.hatch-house-card.is-unset .hatch-house-card-icon {
  background: #ffe8cc;
  color: #e67700;
}

.hatch-house-card-title {
  min-width: 0;
  flex: 1;
}

.hatch-house-card-title strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.2;
}

.hatch-house-card.is-unset .hatch-house-card-title strong {
  color: #c77c02;
}

.hatch-house-card-title span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 1px;
}

.hatch-house-card-rate {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0c8599;
  white-space: nowrap;
}

.hatch-house-card.is-unset .hatch-house-card-rate {
  color: #e67700;
}

.hatch-house-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.hatch-house-card-metrics > div {
  background: #f6f9f7;
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
}

.hatch-house-card.is-unset .hatch-house-card-metrics > div {
  background: #fff4e6;
}

.hatch-house-card-metrics em {
  display: block;
  font-style: normal;
  font-size: 0.62rem;
  color: var(--muted);
  margin-bottom: 1px;
}

.hatch-house-card-metrics b {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.15;
}

.hatch-house-card-metrics b small {
  margin-left: 1px;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted);
}

.hatch-rec-house {
  font-size: 0.72rem;
  font-weight: 700;
  color: #2b8a3e;
  background: #e6f4ea;
  border-radius: 999px;
  padding: 2px 9px;
}

.hatch-rec-house.is-unset {
  color: #c77c02;
  background: #fff3bf;
}

.hatch-house-chip {
  background: #f6f9f7;
  border: 1px solid #e8f0eb;
  border-radius: 10px;
  padding: 8px 10px;
}
.nest-status.tone-muted { background: #e9ecef; color: #495057; }

.nest-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 5px;
}
.nest-metric {
  background: #f6f9f7;
  border: 1px solid #e8f0eb;
  border-radius: 8px;
  padding: 4px 3px;
  text-align: center;
  min-width: 0;
}
.nest-metric em {
  display: block; font-style: normal; font-size: 0.62rem;
  color: #6c757d; margin-bottom: 1px;
}
.nest-metric b {
  display: block; font-size: 0.92rem; font-weight: 800;
  color: var(--brand-dark); line-height: 1.1;
}
.nest-metric b small {
  font-size: 0.58rem; font-weight: 600; margin-left: 1px; color: #868e96;
}
.nest-metric.is-days b { color: #1864ab; }
.nest-metric.is-chicks b { color: var(--brand); }
.nest-metric.is-rate b { color: #e67700; }

.nest-card-foot {
  font-size: 0.66rem; color: #868e96; line-height: 1.3;
  margin-bottom: 5px;
}

.nest-card-actions {
  display: flex; flex-wrap: nowrap; gap: 4px;
  padding-top: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nest-act {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  min-height: 28px; padding: 0 7px; border-radius: 7px;
  font-size: 0.7rem; font-weight: 650;
  flex: 1 1 0;
  white-space: nowrap;
}
.nest-act i { font-size: 0.72rem; }
.nest-act-primary {
  background: linear-gradient(180deg, #40916c, var(--brand));
  color: #fff; box-shadow: 0 2px 6px rgba(45, 106, 79, 0.18);
  flex: 1.2 1 0;
}
.nest-act-ghost {
  background: #fff; color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px #cfe8d8;
}
.nest-act-dark {
  background: #fff; color: #343a40;
  box-shadow: inset 0 0 0 1px #ced4da;
}
.nest-act-danger {
  background: #fff; color: #c92a2a;
  box-shadow: inset 0 0 0 1px #ffc9c9;
  flex: 0 0 auto;
  padding: 0 6px;
  min-width: 28px;
}
.nest-act-danger span { display: none; }

@media (min-width: 768px) {
  .nest-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .nest-card-actions { flex-wrap: wrap; overflow: visible; }
  .nest-act { flex: 0 1 auto; min-width: 4rem; }
  .nest-act-primary { flex: 0 1 auto; }
  .nest-act-danger span { display: inline; }
  .nest-act-danger { padding: 0 8px; }
}

/* 操作日志 */
.audit-log-table th {
  white-space: nowrap;
  font-size: 0.8rem;
  color: #5c6b63;
}
.audit-detail-pre {
  background: #f4f7f5;
  border: 1px solid #dce8e0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  max-height: 22rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}


/* 现场作业台 */
.field-summary {
  background: linear-gradient(135deg, #eef7f1 0%, #f7faf8 100%);
  border: 1px solid #d5e6db;
  border-radius: 14px;
  padding: 0.9rem 1rem;
}
.field-summary-code {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}
.field-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.55rem;
}
.field-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #cfe0d5;
  font-size: 0.78rem;
  color: #355245;
}
.field-chip.tone-nest {
  background: #e8f4ec;
  border-color: #b7d7c2;
  color: #1f6b43;
}
.field-links a { text-decoration: none; }

.field-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 0.15rem;
}
.field-quick-btn {
  border: 1px solid #d5e6db;
  background: #fff;
  color: #2d6a4f;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}
.field-quick-btn:hover {
  background: #eef6f1;
  border-color: #b7d7c2;
}

.field-egg-list,
.field-nest-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0.55rem 0.7rem 0.75rem;
}
.field-egg-card,
.field-nest-card {
  background: #f8fbf9;
  border: 1px solid #e8f0eb;
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
}
.field-egg-top,
.field-nest-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0.35rem;
}
.field-egg-code,
.field-nest-id {
  min-width: 0;
  flex: 1;
}
.field-egg-code-main,
.field-nest-code {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1b4332;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.field-egg-code-name,
.field-nest-name {
  margin-top: 1px;
  font-size: 0.72rem;
  color: #8aa399;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.field-egg-status,
.field-nest-status {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #eef6f1;
  color: #2d6a4f;
  line-height: 1.4;
}
.field-nest-status.tone-info {
  background: #e7f5ff;
  color: #1864ab;
}
.field-nest-status.tone-warn {
  background: #fff3bf;
  color: #e67700;
}
.field-nest-status.tone-ok {
  background: #d3f9d8;
  color: #2b8a3e;
}
.field-nest-status.tone-muted {
  background: #e9ecef;
  color: #495057;
}
.field-egg-metrics,
.field-nest-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.field-egg-m,
.field-nest-m {
  background: #fff;
  border: 1px solid #e8f0eb;
  border-radius: 8px;
  padding: 0.28rem 0.2rem;
  text-align: center;
  min-width: 0;
}
.field-egg-m em,
.field-nest-m em {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  color: #8aa399;
}
.field-egg-m b,
.field-nest-m b {
  display: block;
  margin-top: 1px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #1b4332;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.field-egg-m.is-bad b {
  color: #c1121f;
}
.field-egg-m.is-total,
.field-nest-m.is-act {
  background: #eef6f1;
  border-color: #d8f3dc;
}
.field-nest-m b.act {
  font-size: 0.72rem;
  font-weight: 700;
  color: #2d6a4f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.field-egg-audit,
.field-nest-foot {
  margin-top: 0.28rem;
  font-size: 0.72rem;
  color: #8aa399;
  line-height: 1.3;
}
.field-page .egg-rec-item {
  border: 1px solid #e2ebe5;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  background: #fff;
}

/* ========== Dashboard ========== */
.dash-hero-date {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(45, 106, 79, 0.08);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dash-kpi-grid .home-kpi {
  cursor: default;
}

.dash-panel .pm-panel-head {
  margin-bottom: 12px;
}

.dash-chart {
  min-height: 260px;
}

.dash-rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6f9f7;
  border: 1px solid #e8f0eb;
}

.dash-rank-item.is-top {
  background: linear-gradient(135deg, #fff8eb 0%, #fff 70%);
  border-color: #f5dfb8;
}

.dash-rank-no {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #2d6a4f;
  background: #d8f3dc;
}

.dash-rank-item.is-top .dash-rank-no {
  color: #fff;
  background: linear-gradient(180deg, #e9a23b, #d97706);
}

.dash-rank-body {
  flex: 1;
  min-width: 0;
}

.dash-rank-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.dash-rank-row strong {
  font-size: 14px;
  color: #1f2a24;
}

.dash-rank-count {
  font-size: 12px;
  color: #8aa399;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dash-rank-bar {
  height: 6px;
  border-radius: 999px;
  background: #e8f0eb;
  overflow: hidden;
}

.dash-rank-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #52b788, #2d6a4f);
}

.dash-rank-item.is-top .dash-rank-bar span {
  background: linear-gradient(90deg, #f0c14b, #d97706);
}

.dash-alert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-alert-item,
.dash-alert-ok {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
}

.dash-alert-item i,
.dash-alert-ok i {
  font-size: 1.15rem;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 1px;
}

.dash-alert-item strong,
.dash-alert-ok strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.dash-alert-item p,
.dash-alert-ok p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.dash-alert-ok {
  background: #f3faf5;
  border-color: #d8ebe0;
  color: #1b4332;
}

.dash-alert-ok i { color: #2d6a4f; }

.dash-alert-item.alert-warning {
  background: #fffaf0;
  border-color: #f0e2c0;
  color: #e67700;
}

.dash-alert-item.alert-danger {
  background: #fff5f5;
  border-color: #f0d6d8;
  color: #c1121f;
}

/* ========== Analytics ========== */
.an-hero-status {
  flex-shrink: 0;
  max-width: 52%;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.an-filter-panel .form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.an-date-group .input-group-text {
  background: #f3faf5;
  border-color: #dce8e1;
  color: #0f766e;
}

.an-query-btn {
  background: linear-gradient(180deg, #40916c, #2d6a4f);
  border: 0;
  color: #fff;
  font-weight: 700;
  min-height: 38px;
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.22);
}

.an-query-btn:hover,
.an-query-btn:focus {
  color: #fff;
  filter: brightness(1.05);
}

.an-query-btn:disabled {
  opacity: 0.65;
}

.an-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.an-chip {
  border: 1px solid #dce8e1;
  background: #fff;
  color: #4a5d54;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.an-chip:hover {
  border-color: #0f766e;
  color: #0f766e;
}

.an-chip.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.an-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  margin-bottom: 1rem;
  background: #fff;
  border: 1px solid #e8f0eb;
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(31, 42, 36, 0.04);
}

.an-tab {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #5c6f66;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.an-tab.active {
  background: #0f766e;
  color: #fff;
}

.an-tab-badge {
  min-width: 1.25rem;
  padding: 0 6px;
  height: 1.25rem;
  line-height: 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.72rem;
  text-align: center;
}

.an-tab:not(.active) .an-tab-badge {
  background: #e8f0eb;
  color: #5c6f66;
}

.an-kpi-grid .home-kpi {
  cursor: default;
}

.an-mini-kpi {
  height: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e8f0eb;
  box-shadow: 0 1px 6px rgba(31, 42, 36, 0.04);
}

.an-mini-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.an-mini-value {
  margin-top: 6px;
  font-size: clamp(1.15rem, 2.8vw, 1.55rem);
  font-weight: 800;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.an-panel .pm-panel-head {
  margin-bottom: 12px;
}

.an-type-grid,
.an-house-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 768px) {
  .an-type-grid,
  .an-house-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .an-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .an-house-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.an-type-card,
.an-house-card {
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e8f0eb;
  box-shadow: 0 1px 4px rgba(31, 42, 36, 0.03);
}

.an-type-name,
.an-house-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1f2a24;
  margin-bottom: 10px;
}

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

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

.an-tm,
.an-hm {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f6f9f7;
  border: 1px solid #e8f0eb;
  min-width: 0;
}

.an-hm-wide {
  grid-column: 1 / -1;
}

.an-tm em,
.an-hm em {
  font-style: normal;
  font-size: 0.72rem;
  color: #8aa399;
}

.an-tm b,
.an-hm b {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1f2a24;
  font-variant-numeric: tabular-nums;
}

.an-funnel-hint {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: #8aa399;
}

.an-funnel-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 992px) {
  .an-funnel-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.an-funnel-card {
  text-align: center;
  padding: 14px 8px;
  border-radius: 12px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
}

.an-funnel-card.tone-1 {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.an-funnel-card.tone-1 em { color: #1d4ed8; }
.an-funnel-card.tone-1 b { color: #1e3a8a; }

.an-funnel-card.tone-2 {
  background: #fff7ed;
  border-color: #fed7aa;
}

.an-funnel-card.tone-2 em { color: #c2410c; }
.an-funnel-card.tone-2 b { color: #9a3412; }

.an-funnel-card em {
  display: block;
  font-style: normal;
  font-size: 0.75rem;
  color: #0f766e;
}

.an-funnel-card b {
  display: block;
  margin-top: 4px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #134e4a;
  font-variant-numeric: tabular-nums;
}

.an-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

@media (min-width: 768px) {
  .an-extra-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.an-extra {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f6f9f7;
  border: 1px solid #e8f0eb;
}

.an-extra span {
  font-size: 0.78rem;
  color: #8aa399;
}

.an-extra strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1f2a24;
  font-variant-numeric: tabular-nums;
}

.an-chart {
  min-height: 280px;
}

.an-table thead th {
  font-size: 0.78rem;
  color: #8aa399;
  font-weight: 700;
  border-bottom-color: #e8f0eb;
  white-space: nowrap;
}

.an-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.an-cage-link {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

.an-cage-link:hover {
  text-decoration: underline;
}

.an-alert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.an-alert-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  border-left-width: 4px;
  background: #fff;
}

.an-alert-card i {
  font-size: 1.1rem;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 1px;
}

.an-alert-card.level-danger {
  background: #fff5f5;
  border-color: #f0d6d8;
  border-left-color: #dc2626;
  color: #c1121f;
}

.an-alert-card.level-warning {
  background: #fffaf0;
  border-color: #f0e2c0;
  border-left-color: #d97706;
  color: #e67700;
}

.an-alert-card.level-info {
  background: #f0f9ff;
  border-color: #bae6fd;
  border-left-color: #0284c7;
  color: #0369a1;
}

.an-alert-title {
  font-weight: 800;
  color: #1f2a24;
  margin-bottom: 2px;
}

.an-alert-msg,
.an-alert-extra {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.4;
}

.an-alert-extra {
  margin-top: 6px;
}

.an-alert-ok {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: #f3faf5;
  border: 1px solid #d8ebe0;
  color: #1b4332;
}

.an-alert-ok i {
  color: #2d6a4f;
  font-size: 1.15rem;
}

.an-alert-ok p {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: #8aa399;
}

@media (max-width: 575.98px) {
  .an-hero-status {
    max-width: 42%;
    font-size: 11px;
    padding: 6px 10px;
  }
  .an-tabs {
    gap: 4px;
    padding: 4px;
  }
  .an-tab {
    font-size: 0.78rem;
    padding: 0.45rem 0.25rem;
  }
}

/* ========== Production report ========== */
.pr-hero-status {
  flex-shrink: 0;
  max-width: 52%;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pr-filter-panel .form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.pr-date-group .input-group-text {
  background: #f3faf5;
  border-color: #dce8e1;
  color: #0f766e;
}

.pr-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pr-query-btn {
  background: linear-gradient(180deg, #40916c, #2d6a4f);
  border: 0;
  color: #fff;
  font-weight: 700;
  min-height: 38px;
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.22);
}

.pr-query-btn:hover,
.pr-query-btn:focus {
  color: #fff;
  filter: brightness(1.05);
}

.pr-export-btn {
  background: #fff;
  border: 1px solid #dce8e1;
  color: #2d6a4f;
  font-weight: 700;
  min-height: 38px;
}

.pr-export-btn:hover,
.pr-export-btn:focus {
  background: #f3faf5;
  border-color: #0f766e;
  color: #0f766e;
}

.pr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pr-chip {
  border: 1px solid #dce8e1;
  background: #fff;
  color: #4a5d54;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pr-chip:hover {
  border-color: #0f766e;
  color: #0f766e;
}

.pr-chip.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.pr-kpi-grid .home-kpi {
  cursor: default;
}

.pr-panel .pm-panel-head {
  margin-bottom: 12px;
}

.pr-chart {
  min-height: 280px;
}

.pr-table thead th {
  font-size: 0.78rem;
  color: #8aa399;
  font-weight: 700;
  border-bottom-color: #e8f0eb;
  white-space: nowrap;
}

.pr-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.pr-num-egg { color: #1b4332; }
.pr-num-in { color: #1864ab; }
.pr-num-out { color: #d9480f; font-weight: 700; }

@media (max-width: 575.98px) {
  .pr-hero-status {
    max-width: 42%;
    font-size: 11px;
    padding: 6px 10px;
  }
}
