/* LabSpace admin: platform stats, shop and customer tiles, shop reports, and account maintenance. */
.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.admin-stats > div { background: #fffef9; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; min-width: 0; }
.admin-stats > div.highlight { background: var(--green); border-color: var(--green); color: #fffef7; }
.admin-stats span { display: block; font-size: 12px; color: var(--muted); }
.admin-stats strong { display: block; font-family: Manrope, sans-serif; font-size: 28px; letter-spacing: -1px; margin: 8px 0 4px; overflow-wrap: anywhere; }
.admin-stats strong.small-figure { font-size: 20px; }
.admin-stats small { font-size: 11px; color: var(--muted); }
.admin-stats .highlight span, .admin-stats .highlight small { color: #d7e6d9; }
.admin-tabs { margin: 26px 0 22px; }
.admin-search { width: min(340px, 100%); }
.admin-search input { width: 100%; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 45px; }
.admin-tile { display: flex; flex-direction: column; gap: 12px; text-align: left; background: #fffef9; border: 1px solid var(--line); border-radius: 14px; padding: 18px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.admin-tile:hover { border-color: #9bb692; box-shadow: 0 8px 22px #20392d12; transform: translateY(-2px); }
.tile-top { display: flex; align-items: center; gap: 12px; }
.tile-top > span:nth-child(2) { flex: 1; min-width: 0; }
.tile-top strong { display: block; font-family: Manrope, sans-serif; font-size: 16px; overflow-wrap: anywhere; }
.tile-top small { display: block; color: var(--muted); margin-top: 3px; }
.tile-avatar { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #e4ecdc; color: var(--green); font-weight: 800; font-family: Manrope, sans-serif; }
.tile-avatar.person { border-radius: 50%; background: #f6e7d6; color: #a0582a; }
.tile-avatar.admin { background: var(--green); color: white; }
.tile-address { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.tile-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: #f3f5ee; border-radius: 10px; padding: 10px 12px; }
.tile-figures small { display: block; font-size: 10px; color: var(--muted); }
.tile-figures b { display: block; font-size: 14px; margin-top: 3px; overflow-wrap: anywhere; }
.tile-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); }
.tile-foot > span:last-child { color: var(--green); font-weight: 700; white-space: nowrap; }
.tile-foot em { font-style: normal; color: #b23827; font-weight: 700; }

.badge { flex-shrink: 0; border-radius: 20px; padding: 5px 10px; font-size: 10px; font-weight: 700; white-space: nowrap; background: #eceee8; color: #5c665c; }
.badge.off { background: #fbe4df; color: #b23827; }
.badge.on { background: #e4efdf; color: #3c743f; }
.badge.admin { background: var(--green); color: white; }
.badge.vendor { background: #f6ebd4; color: #957030; }

.admin-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0 45px; }
.admin-panel { background: #fffef9; border: 1px solid var(--line); border-radius: 12px; padding: 20px; min-width: 0; }
.admin-panel.wide { grid-column: span 3; }
.admin-panel h2 { font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.admin-panel .count { font-size: 11px; background: #f0f2e8; border-radius: 20px; padding: 3px 8px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.panel-actions button, .row-actions button { font-size: 12px; padding: 9px 13px; }
.admin-line { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.admin-line small { color: var(--muted); }
.admin-order { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.admin-order small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }

/* 7-day sales: one hue, bars anchored to the baseline with rounded data-ends and 2px gaps. */
.week-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; height: 180px; align-items: end; padding-top: 24px; border-bottom: 1px solid #cfd8c8; }
.bar-slot { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar { width: min(34px, 70%); background: #9bb692; border-radius: 4px 4px 0 0; }
.bar-slot:last-child .bar { background: var(--green); }
.bar-slot:hover .bar { background: #3c7a58; }
.bar-day { position: absolute; bottom: -22px; font-size: 10px; color: var(--muted); }
.bar-value { font-size: 11px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; }
.bar-slot[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: var(--dark); color: white; font-size: 11px; padding: 6px 9px; border-radius: 6px; white-space: nowrap; z-index: 2; }
.admin-panel.wide .week-chart { margin-bottom: 26px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.account-list { display: grid; gap: 10px; margin: 16px 0 45px; }
.account-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fffef9; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.account-row.is-disabled { background: #fbf6f4; }
.account-info { flex: 1; min-width: 200px; }
.account-info strong { display: block; }
.account-info small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 8px; }
.nav-outline.danger { color: #b23827; border-color: #dfaaa0; }

@media (max-width: 1000px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-panels { grid-template-columns: 1fr 1fr; }
  .admin-panel.wide { grid-column: span 2; }
}
@media (max-width: 700px) {
  #mobile-navigation { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .admin-stats { gap: 10px; }
  .admin-stats > div { padding: 14px; }
  .admin-stats strong { font-size: 22px; }
  .admin-tabs { overflow-x: auto; }
  .admin-tabs > span { display: none; }
  .admin-grid { grid-template-columns: 1fr; gap: 12px; }
  .admin-panels { grid-template-columns: 1fr; }
  .admin-panel.wide { grid-column: auto; }
  .admin-order { grid-template-columns: 1fr auto; }
  .admin-order .status { grid-row: 2; justify-self: start; }
  .account-row { align-items: flex-start; }
  .account-info { min-width: calc(100% - 60px); }
  .row-actions { width: 100%; }
  .row-actions button { flex: 1; }
  .week-chart { height: 150px; }
}
