*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --bg: #0b0c10;
  --surface: #13151c;
  --card: #1a1d27;
  --border: #252836;
  --accent: #f0c040;
  --accent2: #ff6b6b;
  --green: #3ecf8e;
  --text: #f0ede8;
  --muted: #6e7191;
  --light: #a9a6b3;
  --radius: 12px;
}
html,
body {
  height: 100%;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.55;
}
.screen {
  display: none;
  min-height: 100vh;
  animation: fadeIn 0.4s ease;
}
.screen.active {
  display: flex;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══ LOGIN ══ */
#loginScreen {
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(240, 192, 64, 0.12), transparent),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(62, 207, 142, 0.08), transparent);
}
.login-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.login-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.8rem 2.4rem;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 2rem;
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.logo-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--bg);
}
.login-logo span {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}
.login-title {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.login-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
}
.field {
  margin-bottom: 1.2rem;
}
.field label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.inp-wrap {
  position: relative;
}
.inp-wrap > svg:first-of-type {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.8;
  transition: stroke 0.2s;
  pointer-events: none;
  z-index: 1;
}
.inp-wrap > .currency-prefix {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.98rem;
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.88rem;
  line-height: 1.45;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
textarea {
  min-height: 5.5rem;
  resize: vertical;
  padding-left: 1rem;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(240, 192, 64, 0.1);
}
.inp-wrap:focus-within > svg:first-of-type {
  stroke: var(--accent);
}
.inp-wrap:focus-within > .currency-prefix {
  color: var(--accent);
}
select {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
select option {
  background: var(--card);
}
.btn {
  padding: 0.9rem 1.6rem;
  border: none;
  border-radius: 8px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.15s,
    filter 0.2s;
}
.btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  width: 100%;
}
.btn-success {
  background: var(--green);
  color: var(--bg);
}
.login-error {
  display: none;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 7px;
  padding: 0.65rem 0.9rem;
  font-size: 0.8rem;
  color: var(--accent2);
  margin-bottom: 1rem;
  animation: shake 0.3s ease;
}
.login-error.show {
  display: block;
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}
.login-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1.2rem;
}
.login-hint span {
  color: var(--accent);
}

/* ══ DASHBOARD ══ */
#dashScreen {
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.topbar-brand .logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.topbar-brand span {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 800;
  font-size: 1.05rem;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.admin-badge {
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--card);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--border);
}
.store-link {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  transition:
    border-color 0.2s,
    color 0.2s;
}
.store-link:hover {
  border-color: var(--accent);
  color: var(--text);
}
.logout-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.75rem;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.logout-btn:hover {
  color: var(--accent2);
  border-color: var(--accent2);
}

.currency-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
}
.currency-switcher label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.currency-switcher select {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.82rem;
  padding: 0.1rem 0.3rem;
  cursor: pointer;
  outline: none;
  width: fit-content;
  max-width: 12rem;
  min-width: 3.25rem;
}
.currency-rate-badge {
  font-size: 0.68rem;
  color: var(--green);
  background: rgba(62, 207, 142, 0.1);
  border: 1px solid rgba(62, 207, 142, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-item {
  background: var(--surface);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-value {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
}
.stat-value.gold {
  color: var(--accent);
}
.stat-value.green {
  color: var(--green);
}
.stat-value.red {
  color: var(--accent2);
}

.dash-body {
  display: grid;
  grid-template-columns: 420px 1fr;
  flex: 1;
  min-height: 0;
}

.add-panel {
  padding: 1.5rem;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  background: var(--surface);
}
.add-panel.read-only input,
.add-panel.read-only select,
.add-panel.read-only textarea {
  opacity: 1;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  pointer-events: none;
}
.add-panel.read-only .img-upload,
.add-panel.read-only .btn-success {
  opacity: 0.92;
  pointer-events: none;
}
.panel-title {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.panel-title .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.f {
  margin-bottom: 0.9rem;
}
.f label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.f input,
.f select,
.f textarea {
  padding: 0.72rem 1rem 0.72rem 2.4rem;
}
.f textarea {
  padding: 0.72rem 1rem;
  resize: vertical;
}
.no-icon input,
.no-icon select {
  padding-left: 1rem;
}

.img-upload {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  background: var(--card);
  transition:
    border-color 0.2s,
    background 0.2s;
  position: relative;
  margin-bottom: 0.8rem;
}
.img-upload:hover {
  border-color: var(--accent);
  background: rgba(240, 192, 64, 0.04);
}
.img-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.upload-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  margin: 0 auto 0.4rem;
}
.img-upload p {
  font-size: 0.8rem;
  color: var(--muted);
}
.img-upload p strong {
  color: var(--accent);
}
.img-upload small {
  font-size: 0.68rem;
  color: #4a4a6a;
}
.img-preview {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}
.img-thumb {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  border: 1.5px solid var(--border);
}

.discount-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem;
  margin-bottom: 0.9rem;
}
.discount-title {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.6rem;
  align-items: end;
}
.final-badge {
  background: rgba(62, 207, 142, 0.12);
  border: 1px solid rgba(62, 207, 142, 0.25);
  border-radius: 7px;
  padding: 0.6rem 0.8rem;
  text-align: center;
}
.final-badge small {
  display: block;
  font-size: 0.62rem;
  color: var(--muted);
  margin-bottom: 0.1rem;
}
.final-badge .fval {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
}
.savings-tag {
  display: none;
  background: rgba(255, 107, 107, 0.15);
  color: var(--accent2);
  font-size: 0.68rem;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  margin-top: 0.25rem;
}
.savings-tag.show {
  display: inline-block;
}

.add-btn-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.8rem;
}

.products-panel {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  background: var(--bg);
}
.products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.filter-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.72rem;
  transition: all 0.2s;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
}
.prod-count {
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--card);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition:
    border-color 0.2s,
    transform 0.2s;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.product-card:hover {
  border-color: rgba(240, 192, 64, 0.3);
  transform: translateY(-2px);
}
.prod-img-wrap {
  width: 100%;
  height: 140px;
  background: var(--card);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.prod-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prod-img-wrap svg {
  width: 32px;
  height: 32px;
  stroke: var(--border);
  fill: none;
  stroke-width: 1.2;
}
.disc-ribbon {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--accent2);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}
.prod-body {
  padding: 0.8rem;
}
.prod-cat {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--card);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: inline-block;
  margin-bottom: 0.4rem;
}
.prod-name {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}
.prod-desc {
  font-size: 0.73rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}
.price-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.p-orig {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: line-through;
}
.p-final {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
}
.p-badge {
  background: rgba(255, 107, 107, 0.15);
  color: var(--accent2);
  font-size: 0.65rem;
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  font-weight: 600;
}
.prod-meta {
  font-size: 0.68rem;
  color: var(--muted);
}
.del-btn {
  width: 100%;
  background: none;
  border: 1px solid rgba(255, 107, 107, 0.2);
  color: var(--accent2);
  padding: 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.72rem;
  margin-top: 0.5rem;
  transition: background 0.2s;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}
.del-btn:hover {
  background: rgba(255, 107, 107, 0.1);
}
.del-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}
.empty-state svg {
  width: 44px;
  height: 44px;
  stroke: var(--border);
  fill: none;
  stroke-width: 1.2;
  margin: 0 auto 1rem;
}
.empty-state p {
  font-size: 0.82rem;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: auto;
  z-index: 999;
  max-width: min(36rem, calc(100vw - 2rem));
  background: var(--green);
  color: var(--bg);
  padding: 0.7rem 1.3rem;
  border-radius: 8px;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 0.82rem;
  font-weight: 700;
  display: none;
  animation: toastIn 0.3s ease;
  box-shadow: 0 8px 24px rgba(62, 207, 142, 0.3);
  white-space: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}
.toast.show {
  display: block;
}
.toast.err {
  background: var(--accent2);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 107, 107, 0.25);
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

/* Topbar notification dropdown */
.topbar-notif-row {
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.topbar-notif-row:last-of-type {
  border-bottom: none;
}
.topbar-notif-meta {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.topbar-notif-chip {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(240, 192, 64, 0.12);
  border: 1px solid rgba(240, 192, 64, 0.28);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
}
.topbar-notif-msg {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text);
}
#topbarNotifBadge {
  min-width: 1.15rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(240, 192, 64, 0.2);
  color: var(--accent);
}

.topbar-notif-sound-label {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  user-select: none;
}
.topbar-notif-sound-label input {
  accent-color: var(--accent);
}

.topbar-notif-btn--alert {
  animation: topbarNotifPulse 1.4s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(240, 192, 64, 0.45);
}
.topbar-notif-btn--alert #topbarNotifBadge {
  animation: topbarBadgeGlow 1.1s ease-in-out infinite;
}

@keyframes topbarNotifPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(240, 192, 64, 0.35);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(240, 192, 64, 0.12);
  }
}

@keyframes topbarBadgeGlow {
  0%,
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.15);
    transform: scale(1.06);
  }
}

.topbar-notif-replies {
  margin: 0.35rem 0 0;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(240, 192, 64, 0.25);
}
.topbar-notif-reply-line {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}
.topbar-notif-reply-who {
  color: var(--accent);
  font-weight: 600;
}
.topbar-notif-reply-details {
  margin-top: 0.5rem;
  font-size: 0.75rem;
}
.topbar-notif-reply-details summary {
  cursor: pointer;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.topbar-notif-reply-ta {
  width: 100%;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  padding: 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  resize: vertical;
}

.platform-sidebar .nav-item.nav-item--pulse {
  animation: navTeamChatPulse 1.2s ease-in-out infinite;
  color: var(--accent);
  font-weight: 600;
}

@keyframes navTeamChatPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.team-chat-scroll {
  max-height: min(420px, 55vh);
  overflow: auto;
  padding: 0.5rem 0.35rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.team-chat-tools {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}
.team-chat-tools input {
  flex: 1;
  min-width: 14rem;
  font-size: 0.82rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}
.team-chat-unread-meta {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.team-chat-match-count {
  font-size: 0.72rem;
  color: #3730a3;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 999px;
  padding: 0.08rem 0.45rem;
  white-space: nowrap;
}
.team-chat-match-nav-meta {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.team-chat-match-nav-meta-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.team-chat-match-nav-meta-btn:hover {
  text-decoration: underline;
}
.team-chat-msg.team-chat-msg--search-active {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 1px;
}
.team-chat-tools .btn-pf.sm {
  padding: 0.28rem 0.5rem;
  font-size: 0.7rem;
}
.team-chat-tools .btn-pf.sm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.team-chat-shortcuts-hint {
  margin: -0.2rem 0 0.5rem;
  font-size: 0.7rem;
  color: var(--muted);
}
.team-chat-shortcuts-hint kbd {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.68rem;
  padding: 0.08rem 0.35rem;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
}
.team-chat-unread-divider {
  margin: 0.45rem 0 0.7rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  color: #7a1f1f;
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid rgba(255, 107, 107, 0.35);
  display: inline-block;
}
.team-chat-msg {
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.team-chat-msg--mine {
  border-color: rgba(240, 192, 64, 0.35);
  background: rgba(240, 192, 64, 0.12);
}
.team-chat-msg-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.team-chat-avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(12, 61, 107, 0.2);
  border: 1px solid rgba(12, 61, 107, 0.35);
  color: var(--accent);
  flex: 0 0 auto;
}
.team-chat-head {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}
.team-chat-name {
  color: var(--text);
  font-weight: 700;
}
.team-chat-email {
  font-size: 0.68rem;
  color: var(--muted);
}
.team-chat-msg-body {
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.team-chat-role {
  font-weight: 600;
  color: var(--accent);
}
.team-chat-time {
  color: var(--muted);
}
.team-chat-hit {
  background: rgba(240, 192, 64, 0.38);
  color: inherit;
  padding: 0 0.1rem;
  border-radius: 3px;
}
.team-chat-compose textarea {
  width: 100%;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  padding: 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

.notif-thread-col {
  min-width: 12rem;
  max-width: 22rem;
  vertical-align: top;
}
.notif-reply-list {
  margin: 0 0 0.35rem;
  padding-left: 1rem;
  font-size: 0.78rem;
  line-height: 1.4;
  max-height: 140px;
  overflow: auto;
}
.notif-reply-when {
  color: var(--muted);
  font-size: 0.72rem;
}
.notif-reply-ta {
  width: 100%;
  font-size: 0.78rem;
  padding: 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

@media (max-width: 1000px) {
  .dash-body {
    grid-template-columns: 1fr;
  }
  .add-panel {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: none;
  }
  .products-panel {
    max-height: none;
  }
  .stats-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .stats-bar {
    grid-template-columns: 1fr 1fr;
  }
  .form-row,
  .calc-row {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }
}
