:root {
  --ink: #152b2b;
  --ink-soft: #2f4949;
  --green: #176c58;
  --green-dark: #105343;
  --mint: #dff3ec;
  --cream: #f6f4ee;
  --surface: #ffffff;
  --orange: #f3a83b;
  --orange-soft: #fff1dc;
  --blue-soft: #e7f0fa;
  --red: #b42318;
  --red-soft: #fee4e2;
  --text: #172322;
  --muted: #667472;
  --line: #dde5e2;
  --shadow: 0 16px 45px rgba(20, 56, 49, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.auth-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: max(28px, env(safe-area-inset-top)) 20px
    max(28px, env(safe-area-inset-bottom));
  color: white;
  background:
    radial-gradient(circle at 10% 0%, rgba(85, 172, 144, 0.38), transparent 35%),
    linear-gradient(155deg, #173f3d 0%, #0e2929 74%);
}

.auth-decoration {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.18;
  background: #91d8c2;
}

.decoration-one {
  width: 240px;
  height: 240px;
  right: -110px;
  top: 14%;
}

.decoration-two {
  width: 160px;
  height: 160px;
  left: -80px;
  bottom: 18%;
}

.auth-container {
  position: relative;
  z-index: 2;
  width: min(100%, 460px);
  margin: 0 auto;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo,
.mini-logo {
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #bcebdc;
  font-weight: 900;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  font-size: 22px;
}

.brand-name {
  margin: 0 0 2px;
  font-size: 19px;
  font-weight: 850;
}

.brand-tagline {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.auth-copy {
  padding: 54px 3px 30px;
}

.auth-badge {
  display: inline-flex;
  padding: 7px 10px;
  color: #c7f2e5;
  background: rgba(199, 242, 229, 0.11);
  border: 1px solid rgba(199, 242, 229, 0.2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.09em;
}

.auth-copy h1 {
  max-width: 400px;
  margin: 17px 0 14px;
  font-size: clamp(39px, 10vw, 57px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.auth-copy p {
  max-width: 400px;
  margin: 0;
  color: rgba(255, 255, 255, 0.73);
  line-height: 1.6;
}

.auth-card {
  padding: 17px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 25px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-bottom: 20px;
  background: #eef2f0;
  border-radius: 14px;
}

.auth-tab {
  min-height: 44px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 11px;
  font-weight: 800;
}

.auth-tab.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 5px 15px rgba(20, 56, 49, 0.1);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}

.field label {
  font-size: 13px;
  font-weight: 800;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-button {
  padding: 0;
  color: var(--green);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  color: var(--text);
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
}

input:focus,
select:focus {
  border-color: #64a992;
  box-shadow: 0 0 0 4px rgba(100, 169, 146, 0.15);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 65px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 7px;
  transform: translateY(-50%);
  color: var(--green);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 850;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.remember-row input {
  width: 18px;
  min-height: auto;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 51px;
  padding: 13px 17px;
  border: 0;
  border-radius: 14px;
  font-weight: 850;
}

.primary-button {
  color: white;
  background: var(--green);
  box-shadow: 0 10px 25px rgba(23, 108, 88, 0.2);
}

.primary-button:hover {
  background: var(--green-dark);
}

.secondary-button {
  color: var(--ink);
  background: #e9efed;
}

.light-button {
  color: var(--ink);
  background: white;
}

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

.full-width {
  width: 100%;
}

.auth-helper {
  margin: 13px 4px 1px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
}

.legal-copy {
  margin: 18px 25px 0;
  color: rgba(255, 255, 255, 0.48);
  text-align: center;
  font-size: 10px;
  line-height: 1.5;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 102px;
}

.app-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(15px, env(safe-area-inset-top)) 18px 13px;
  background: rgba(246, 244, 238, 0.92);
  border-bottom: 1px solid rgba(221, 229, 226, 0.8);
  backdrop-filter: blur(18px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.mini-logo {
  width: 41px;
  height: 41px;
  border-radius: 13px;
}

.header-label,
.section-kicker,
.card-kicker {
  margin: 0;
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.app-header h1 {
  margin: 2px 0 0;
  font-size: 20px;
}

.profile-button {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  color: white;
  background: var(--ink);
  border: 0;
  border-radius: 50%;
  font-weight: 850;
}

.main-content {
  padding: 18px;
}

.screen {
  display: none;
  animation: fadeIn 0.22s ease;
}

.screen.active {
  display: block;
}

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

.welcome-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 7px 2px 19px;
}

.welcome-row h2,
.page-heading h2 {
  margin: 5px 0 3px;
  color: var(--ink);
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.muted-text,
.page-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  color: var(--green);
  background: var(--mint);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.status-badge span {
  width: 7px;
  height: 7px;
  background: #19a477;
  border-radius: 50%;
}

.start-card {
  padding: 22px;
  color: white;
  background:
    radial-gradient(circle at 100% 0%, rgba(118, 205, 174, 0.28), transparent 35%),
    linear-gradient(145deg, #176c58, #114b42);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.start-card-icon {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  margin-bottom: 18px;
  color: var(--ink);
  background: #c4f0e2;
  border-radius: 13px;
  font-size: 20px;
  font-weight: 900;
}

.start-card .card-kicker {
  color: #bfeadb;
}

.start-card h3 {
  margin: 8px 0 8px;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.start-card p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.5;
}

.start-card .light-button {
  justify-content: space-between;
}

.content-section {
  margin-top: 28px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 13px;
}

.section-title-row h3 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 21px;
  letter-spacing: -0.025em;
}

.date-chip {
  display: inline-flex;
  padding: 7px 9px;
  color: var(--muted);
  background: #e9efed;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
}

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

.metric-card {
  min-height: 165px;
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 9px 25px rgba(20, 56, 49, 0.055);
}

.metric-icon,
.action-icon {
  display: grid;
  place-items: center;
  font-weight: 900;
}

.metric-icon {
  width: 37px;
  height: 37px;
  margin-bottom: 21px;
  border-radius: 12px;
}

.products-icon {
  color: var(--green);
  background: var(--mint);
}

.value-icon {
  color: #336899;
  background: var(--blue-soft);
}

.warning-icon {
  color: #a76608;
  background: var(--orange-soft);
}

.history-icon {
  color: #665399;
  background: #eee9fa;
}

.metric-card span,
.metric-card small {
  display: block;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  display: block;
  margin: 5px 0;
  color: var(--ink);
  font-size: 23px;
}

.metric-card small {
  color: #8a9593;
  font-size: 10px;
}

.warning-card {
  background: #fffdf9;
}

.action-list,
.list-stack,
.instruction-stack {
  display: grid;
  gap: 10px;
}

.action-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 13px;
  align-items: center;
  width: 100%;
  padding: 14px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.action-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.action-green {
  color: var(--green);
  background: var(--mint);
}

.action-blue {
  color: #336899;
  background: var(--blue-soft);
}

.action-orange {
  color: #9e630d;
  background: var(--orange-soft);
}

.action-row strong,
.action-row span {
  display: block;
}

.action-row strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 14px;
}

.action-row span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.action-row b {
  color: #9aa5a2;
  font-size: 24px;
}

.back-link {
  margin: 2px 0 22px;
  padding: 0;
  color: var(--green);
  background: transparent;
  border: 0;
  font-weight: 850;
}

.page-heading {
  margin-bottom: 22px;
}

.panel,
.product-row,
.area-row,
.history-row,
.review-row,
.instruction-card,
.profile-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.panel {
  padding: 17px;
  margin: 13px 0;
}

.panel h3 {
  margin: 0 0 17px;
}

.form-grid,
.form-buttons {
  display: grid;
  gap: 10px;
}

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

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

.search-field {
  margin: 14px 0 0;
}

.product-row,
.history-row,
.review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  padding: 15px;
}

.row-copy {
  min-width: 0;
}

.row-copy strong,
.row-copy span {
  display: block;
}

.row-copy strong {
  margin-bottom: 4px;
  color: var(--ink);
}

.row-copy span {
  color: var(--muted);
  font-size: 11px;
}

.row-buttons {
  display: flex;
  gap: 7px;
}

.small-button {
  width: 39px;
  height: 39px;
  padding: 0;
  background: #edf2f0;
  border: 0;
  border-radius: 11px;
}

.area-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 17px;
  text-align: left;
}

.area-row strong,
.area-row span {
  display: block;
}

.area-row strong {
  margin-bottom: 3px;
  color: var(--ink);
}

.area-row span {
  color: var(--muted);
  font-size: 11px;
}

.area-presence {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 10px;
  font-weight: 600;
}

.area-row b {
  color: var(--green);
  font-size: 24px;
}

.count-progress-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.count-progress-header h2 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 29px;
}

.progress-track {
  height: 8px;
  margin: 14px 0 20px;
  overflow: hidden;
  background: #dfe7e4;
  border-radius: 999px;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  transition: width 0.22s ease;
}

.count-product-card {
  padding: 25px 18px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 23px;
  box-shadow: var(--shadow);
}

.product-placeholder {
  display: grid;
  place-items: center;
  width: 67px;
  height: 67px;
  margin: 0 auto 17px;
  color: var(--green);
  background: var(--mint);
  border-radius: 21px;
  font-size: 27px;
}

.count-product-card h3 {
  margin: 9px 0 6px;
  color: var(--ink);
  font-size: 32px;
  letter-spacing: -0.035em;
}

.count-product-card > p:last-of-type {
  color: var(--muted);
}

.quantity-section {
  padding-top: 23px;
  margin-top: 23px;
  border-top: 1px solid var(--line);
}

.quantity-section > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.quantity-controls {
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  gap: 10px;
  margin: 12px 0;
}

.quantity-controls button,
.quantity-controls input {
  height: 62px;
  border-radius: 16px;
}

.quantity-controls button {
  color: var(--ink);
  background: #e9efed;
  border: 0;
  font-size: 30px;
}

.quantity-controls input {
  min-height: auto;
  padding: 5px;
  text-align: center;
  border: 2px solid var(--ink);
  font-size: 28px;
  font-weight: 900;
}

.quantity-section strong {
  font-size: 13px;
}

.count-footer {
  display: grid;
  grid-template-columns:1fr 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.review-summary {
  padding: 22px;
  margin-bottom: 13px;
  color: white;
  background: linear-gradient(145deg, var(--green), var(--green-dark));
  border-radius: 20px;
}

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

.review-summary span,
.review-summary small {
  color: rgba(255, 255, 255, 0.7);
}

.review-summary strong {
  margin: 8px 0;
  font-size: 34px;
}

.empty-state {
  padding: 28px 17px;
  color: var(--muted);
  text-align: center;
  background: white;
  border: 1px dashed #b9c8c3;
  border-radius: 16px;
  line-height: 1.5;
}

.instruction-card {
  display: grid;
  grid-template-columns: 43px 1fr;
  gap: 14px;
  padding: 17px;
}

.instruction-card > span {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  color: white;
  background: var(--green);
  border-radius: 13px;
  font-weight: 900;
}

.instruction-card h3 {
  margin: 1px 0 5px;
}

.instruction-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.profile-card {
  padding: 27px;
  margin-bottom: 14px;
  text-align: center;
}

.large-profile-avatar {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto 15px;
  color: white;
  background: var(--ink);
  border-radius: 50%;
  font-size: 29px;
  font-weight: 900;
}

.profile-card h3 {
  margin: 0 0 4px;
  font-size: 23px;
}

.profile-card p {
  margin: 0 0 11px;
  color: var(--muted);
}

.profile-card span {
  display: inline-flex;
  padding: 7px 10px;
  color: var(--green);
  background: var(--mint);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.bottom-navigation {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 64px 1fr 1fr;
  align-items: end;
  width: min(100%, 760px);
  padding: 8px 9px max(8px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-item {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 57px;
  padding: 4px;
  color: #87928f;
  background: transparent;
  border: 0;
  border-radius: 13px;
  font-size: 9px;
  font-weight: 850;
}

.nav-item span {
  font-size: 20px;
}

.nav-item.active {
  color: var(--green);
  background: var(--mint);
}

.nav-count-button {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: -25px auto 4px;
  color: white;
  background: var(--green);
  border: 5px solid white;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(23, 108, 88, 0.32);
  font-size: 29px;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 104px;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  color: white;
  background: var(--ink);
  border-radius: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 410px) {
  .form-grid,
  .form-buttons {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 155px;
  }
}
.activity-section{
  margin-top:32px;
}

.activity-feed{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.activity-card{
  background:#fff;
  border-radius:18px;
  padding:18px;
  box-shadow:0 8px 24px rgba(0,0,0,.05);
}

.activity-title{
  font-weight:700;
  color:#1f2937;
}

.activity-subtitle{
  margin-top:4px;
  color:#6b7280;
  font-size:14px;
}

.activity-time{
  margin-top:10px;
  font-size:12px;
  color:#9ca3af;
}
.invoice-progress-track {
  width: 100%;
  height: 10px;
  margin: 18px 0 12px;
  overflow: hidden;
  background: #e7ece9;
  border-radius: 999px;
}

.invoice-progress-bar {
  width: 5%;
  height: 100%;
  background: #0f766e;
  border-radius: inherit;
  transition: width 0.7s ease;
}

.invoice-results-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  text-align: left;
}

.invoice-results-heading div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.invoice-results-heading span {
  color: #0f766e;
  font-size: 0.85rem;
  font-weight: 700;
}

.invoice-product-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.invoice-product-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-align: left;
  background: white;
  border: 1px solid #e4e8e6;
  border-radius: 14px;
}

.invoice-product-check {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: white;
  background: #0f766e;
  border-radius: 50%;
  font-weight: 700;
}

.invoice-product-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.invoice-product-details span {
  color: #6b7280;
  font-size: 0.85rem;
}
.success-state{
  text-align:center;
  padding:32px 20px;
}

.success-icon{

  width:72px;
  height:72px;

  border-radius:50%;

  background:#16a34a;

  color:white;

  display:grid;
  place-items:center;

  font-size:34px;

  font-weight:700;

  margin:0 auto 20px;
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-top: 6px;
}
.invoice-history-list {
  display: grid;
  gap: 14px;
}

.invoice-history-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.invoice-history-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 14px;
  background: #eef8f4;
  font-size: 21px;
}

.invoice-history-copy {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.invoice-history-copy strong {
  color: #16342f;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-history-copy span {
  color: #64748b;
  font-size: 13px;
}

.invoice-history-copy small {
  color: #94a3b8;
  font-size: 12px;
}

.invoice-view-button {
  border: 0;
  border-radius: 10px;
  padding: 9px 13px;
  background: #e1f4ed;
  color: #08745d;
  font-weight: 700;
  cursor: pointer;
}

.invoice-view-button:hover {
  background: #ccecdf;
}

.invoice-empty-icon {
  margin-bottom: 10px;
  font-size: 30px;
}

.section-label {
  color: #08745d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.excel-preview-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.excel-preview-row {
  padding: 14px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}

.excel-preview-row div {
  display: grid;
  gap: 4px;
}

.excel-preview-row strong {
  color: #16342f;
}

.excel-preview-row span {
  color: #64748b;
  font-size: 13px;
}

.excel-preview-row small {
  color: #94a3b8;
  font-size: 12px;
}
.quick-quantity-buttons{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:24px;
}

.quick-add-button{
  height:58px;
  border:none;
  border-radius:16px;
  background:#eef6f2;
  color:#105343;
  font-weight:700;
  font-size:20px;
  transition:.2s;
}

.quick-add-button:hover{
  background:#176c58;
  color:white;
  transform:scale(1.03);
}
.previous-quantity {
  display: inline-block;
  margin: 10px 0 0;
  padding: 8px 12px;
  color: #176c58;
  background: #dff3ec;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.count-search-wrap {
  position: relative;
  margin-bottom: 16px;
}

.count-search-wrap input {
  padding-left: 16px;
  background: #ffffff;
  box-shadow: 0 7px 20px rgba(20, 56, 49, 0.05);
}

.count-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: 310px;
  overflow-y: auto;
  padding: 7px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(20, 56, 49, 0.16);
}

.count-search-result {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 11px;
}

.count-search-result:hover {
  background: var(--mint);
}

.count-search-result strong {
  color: var(--ink);
  font-size: 14px;
}

.count-search-result span,
.count-search-empty {
  color: var(--muted);
  font-size: 11px;
}

.count-search-empty {
  padding: 13px;
  text-align: center;
}
/* COMPANY WORKBOOK IMPORT WIZARD */
.workbook-recognition-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
  padding: 17px;
  margin-bottom: 14px;
  text-align: left;
  color: var(--ink);
  background: var(--mint);
  border: 1px solid #b9e3d5;
  border-radius: 18px;
}

.recognition-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: white;
  background: var(--green);
  border-radius: 17px;
  font-size: 24px;
  font-weight: 900;
}

.workbook-recognition-card small {
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.workbook-recognition-card h3,
.workbook-recognition-card p {
  margin: 4px 0 0;
}

.workbook-recognition-card p {
  color: var(--muted);
  font-size: 12px;
}

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

.workbook-metric-grid article {
  padding: 14px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.workbook-metric-grid span,
.workbook-metric-grid strong {
  display: block;
}

.workbook-metric-grid span {
  color: var(--muted);
  font-size: 11px;
}

.workbook-metric-grid strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 22px;
}

.workbook-category-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.workbook-category-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.workbook-category-row span {
  color: var(--muted);
  font-size: 12px;
}

.import-warning-box {
  padding: 13px 14px;
  margin: 14px 0;
  text-align: left;
  color: #8a4b08;
  background: var(--orange-soft);
  border-radius: 14px;
}

.import-warning-box summary {
  cursor: pointer;
  font-weight: 850;
}

.import-warning-box p {
  margin: 8px 0 0;
  font-size: 12px;
}

.import-privacy-note {
  margin: 10px 5px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.history-export-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

/* REAL-WORLD TESTING POLISH */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  background: #e9efed;
  color: var(--muted);
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.connection-status.online {
  color: var(--green);
  background: var(--mint);
}

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

.count-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.autosave-status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.autosave-status[data-status="saving"] { color: #9e630d; }
.autosave-status[data-status="saved"] { color: var(--green); }
.autosave-status[data-status="error"] { color: var(--red); }

.validation-panel {
  padding: 17px;
  margin: 0 0 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
}

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

.validation-heading h3 {
  margin: 5px 0 0;
}

#validationIssueCount {
  color: var(--green);
  font-size: 12px;
}

#validationIssueCount.has-issues { color: #9e630d; }

.validation-success,
.validation-item {
  padding: 12px;
  margin-bottom: 9px;
  border-radius: 13px;
}

.validation-success {
  color: var(--green-dark);
  background: var(--mint);
  font-weight: 800;
}

.validation-item.warning {
  color: #8a4b08;
  background: var(--orange-soft);
}

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

.validation-item span {
  margin-top: 3px;
  font-size: 11px;
}

.review-warning-row {
  border-color: #f2c98d;
  background: #fffaf2;
}

.completion-card {
  padding: 28px 20px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 25px;
  box-shadow: var(--shadow);
}

.completion-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  color: white;
  background: var(--green);
  border-radius: 50%;
  font-size: 34px;
  font-weight: 900;
}

.completion-card h2 {
  margin: 8px 0;
  color: var(--ink);
  font-size: 34px;
}

.completion-card > p:not(.section-kicker) {
  color: var(--muted);
}

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

.completion-metrics article {
  padding: 15px;
  text-align: left;
  background: var(--cream);
  border-radius: 15px;
}

.completion-metrics span,
.completion-metrics strong {
  display: block;
}

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

.completion-metrics strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 21px;
}

.completion-card .button + .button {
  margin-top: 10px;
}

@media (max-width: 410px) {
  .connection-status {
    padding: 6px;
    font-size: 0;
  }

  .connection-dot {
    width: 9px;
    height: 9px;
  }

  .count-footer {
    grid-template-columns: 1fr;
  }
}


/* v3 validation, profile and legal polish */
.validation-action { width:100%; text-align:left; border:0; cursor:pointer; }
.validation-action:hover { transform:translateY(-1px); box-shadow:0 8px 18px rgba(20,56,49,.08); }
.issue-product-list { display:grid; gap:10px; }
.issue-product-row { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; padding:15px; text-align:left; background:#fff; border:1px solid var(--line); border-radius:16px; }
.issue-product-row strong,.issue-product-row span { display:block; }
.issue-product-row span { margin-top:4px; color:var(--muted); font-size:12px; }
.issue-product-row b { color:var(--green); }
.review-product-button { width:100%; border:1px solid var(--line); text-align:left; }
.review-product-button b { color:var(--green); font-size:22px; }
.profile-access-row { display:flex; justify-content:space-between; padding:13px 0 17px; color:var(--muted); }
.profile-access-row strong { color:var(--green); text-transform:capitalize; }
.compact-action { grid-template-columns:1fr auto; margin-bottom:10px; }
.legal-note { margin:12px 2px 0; color:var(--muted); font-size:11px; line-height:1.55; }
.legal-document { padding:22px; background:#fff; border:1px solid var(--line); border-radius:20px; }
.legal-document h3 { margin:22px 0 7px; color:var(--ink); }
.legal-document h3:first-child { margin-top:0; }
.legal-document p { margin:0; color:var(--muted); line-height:1.65; }
#completionScreen .button { margin-top:10px; }


/* Sign-up legal acceptance and public legal dialogs */
.signup-legal { margin: 14px 0; }
.legal-acceptance-row { align-items: flex-start; }
.inline-legal-button { border: 0; padding: 0; background: transparent; color: var(--green); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
.field-hint { margin: 6px 0 0 28px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.legal-dialog { width: min(560px, calc(100% - 32px)); border: 0; border-radius: 22px; padding: 0; box-shadow: 0 24px 80px rgba(16,42,42,.28); }
.legal-dialog::backdrop { background: rgba(7, 24, 22, .6); }
.legal-dialog-content { padding: 24px; color: var(--ink); background: #fff; }
.legal-dialog-content p { color: var(--muted); line-height: 1.6; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { margin: 0; }
.dialog-heading button { border: 0; background: var(--mint); width: 38px; height: 38px; border-radius: 50%; font-size: 24px; cursor: pointer; }

/* Permission-controlled actions are removed from navigation for unauthorised users.
   Firestore Rules still provide the real security boundary. */
.permission-hidden {
  display: none !important;
}

/* v15 */
#wastageHistoryList{margin-top:14px}.metric-card[role="button"]{cursor:pointer}.button:focus-visible,.action-row:focus-visible{outline:3px solid #64a992;outline-offset:3px}

/* StockPilot 1.0 RC1 — team and subscription presentation */
.team-member-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(115px, 155px) auto;
  gap: 12px;
  align-items: center;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.team-member-copy { min-width: 0; }
.team-member-copy strong,
.team-member-copy span,
.team-member-copy small { display: block; }
.team-member-copy span { margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.team-member-copy small { margin-top: 5px; color: var(--green); font-size: 10px; text-transform: capitalize; }
.team-role-select { min-height: 42px; padding: 8px 10px; }
.pricing-grid { display: grid; gap: 13px; margin-bottom: 18px; }
.pricing-card { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.pricing-card.featured { border: 2px solid var(--green); box-shadow: var(--shadow); }
.pricing-card h3 { margin: 8px 0; color: var(--ink); font-size: 29px; }
.pricing-card h3 span { color: var(--muted); font-size: 12px; font-weight: 700; }
.pricing-card p { color: var(--muted); line-height: 1.5; }
.pricing-card ul { padding-left: 19px; margin-bottom: 0; color: var(--ink-soft); line-height: 1.75; }
#profileScreen #exportMyDataButton { margin-top: 10px; }
@media (max-width: 560px) {
  .team-member-card { grid-template-columns: 1fr auto; }
  .team-role-select { grid-column: 1 / -1; }
}
