:root {
  --bg: #ffffff;
  --bg-soft: #eef7ff;
  --surface: #ffffff;
  --primary: #d60c13;
  --secondary: #0a4f75;
  --secondary-dark: #043148;
  --text: #111111;
  --muted: #444444;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(214, 12, 19, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #eef7ff 100%);
  color: var(--text);
}

body {
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  color: white;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-logo {
  width: 64px;
  max-height: 56px;
  object-fit: contain;
  display: block;
}

.logo-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(10, 79, 117, 0.18);
  color: white;
  font-weight: 700;
}

.language-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  color: rgba(255,255,255,0.86);
}

.dot-divider {
  color: rgba(255,255,255,0.55);
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(10,79,117,0.12);
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.8rem;
}

.login-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 88px);
  padding: 1rem;
}

.login-card {
  width: min(470px, 100%);
  padding: 2.4rem;
  border-radius: 28px;
  background: rgba(255,255,255,0.98);
  box-shadow: var(--shadow);
  border: 1px solid rgba(10,79,117,0.08);
  backdrop-filter: blur(8px);
}

.login-head h1 {
  margin: 0;
  font-size: 2.5rem;
  line-height: 1.05;
}

.login-head p {
  margin: 0.9rem 0 2rem;
  color: var(--muted);
}

.form-group {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.35rem;
}

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

.label-row label {
  font-weight: 600;
}

.forgot-link {
  color: var(--secondary);
  text-decoration: none;
  font-size: 0.95rem;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid #dfe3f0;
  background: #fbfbff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: rgba(10,79,117,0.55);
  box-shadow: 0 0 0 4px rgba(10,79,117,0.12);
}

.password-field {
  position: relative;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.05rem;
}

.form-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.checkbox input {
  width: 16px;
  height: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  transition: transform 0.22s ease, filter 0.22s ease, box-shadow 0.22s ease;
  box-shadow: 0 18px 40px rgba(10, 79, 117, 0.12);
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: white;
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 18px 34px rgba(10, 79, 117, 0.18);
}

.transfer-route-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.transfer-product-picker {
  padding: 0.85rem;
  border: 1px solid #d8deeb;
  background: #f7f9fc;
  margin-bottom: 0.85rem;
}

.transfer-product-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.transfer-product-button {
  width: auto;
  min-height: 34px;
  padding: 0.45rem 0.7rem;
  border: 1px solid #d8deeb;
  border-radius: 5px;
  background: #fff;
  color: #172033;
  cursor: pointer;
  text-align: left;
}

.transfer-product-button:hover,
.transfer-product-button:focus-visible {
  border-color: #315efb;
  color: #315efb;
}

.transfer-item-row {
  display: flex;
  align-items: end;
  gap: 0.7rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #d8deeb;
}

.transfer-item-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr);
  flex: 1;
  gap: 0.7rem;
}

.social-dashboard {
  margin-top: 1.25rem;
}

.social-periods {
  display: flex;
  gap: 0.4rem;
}

.social-period.active {
  background: #172033;
  color: #fff;
}

.social-account-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.social-account-card {
  border: 1px solid #d8deeb;
  padding: 0.85rem;
  background: #fff;
}

.social-account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.social-account-card p,
.social-sync-status {
  color: #687386;
  font-size: 0.82rem;
}

.social-status {
  color: #9a6400;
  font-size: 0.72rem;
  white-space: nowrap;
}

.social-connect {
  width: auto;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
}

.social-report-empty {
  border: 1px dashed #c7cedc;
  margin-top: 0.9rem;
  padding: 1rem;
  color: #687386;
  text-align: center;
}

@media (max-width: 980px) {
  .social-account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .social-account-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .transfer-route-fields,
  .transfer-item-fields {
    grid-template-columns: 1fr;
  }

  .transfer-item-row {
    align-items: stretch;
    flex-direction: column;
  }
}

.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2rem;
  gap: 1rem;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: white;
}

.shop-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.shop-nav .nav-link {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.shop-nav .nav-link.active,
.shop-nav .nav-link:hover {
  background: rgba(255,255,255,0.12);
  color: white;
}

body.shop-home {
  font-size: 16px;
}

body.shop-home .shop-nav .nav-link,
body.shop-home .cart-link {
  font-size: 1rem;
}

body.shop-home .hero-panel p,
body.shop-home .promo-card p,
body.shop-home .section-heading p,
body.shop-home .sale-banner p {
  font-size: 1.05rem;
  line-height: 1.6;
}

body.shop-home .hero-pill,
body.shop-home .product-summary,
body.shop-home .product-category,
body.shop-home .price-old {
  font-size: 1rem;
}

body.shop-home .product-card-body h3 {
  font-size: 1.15rem;
}

body.shop-home .price-row strong {
  font-size: 1.35rem;
}

body.shop-home .product-actions-row .btn,
body.shop-home .product-actions .btn,
body.shop-home .hero-actions .btn {
  font-size: 1rem;
}

.social-banner {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  padding: 1.5rem 2rem;
  text-align: center;
  margin: 0;
}

.banner-content {
  max-width: 1200px;
  margin: 0 auto;
}

.banner-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.banner-content p {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
}

.social-links-banner {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.social-banner-link:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.social-banner-link.instagram {
  background: linear-gradient(135deg, #f09433, #e6683c);
  border: none;
}

.social-banner-link.tiktok {
  background: #000000;
  border-color: #000;
}

.social-banner-link.facebook {
  background: #1877f2;
  border-color: #1877f2;
}

.social-banner-link.whatsapp {
  background: #25d366;
  border-color: #25d366;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
  align-items: center;
  padding: 2rem;
  margin: 0 auto;
  max-width: 1200px;
  background: linear-gradient(135deg, rgba(10, 79, 117, 0.95), rgba(8, 60, 96, 0.95));
  border-radius: 2.4rem;
  box-shadow: 0 34px 90px rgba(8, 30, 88, 0.18);
}

.hero-panel h1 {
  margin: 0;
  font-size: clamp(2.4rem, 3.3vw, 3.6rem);
  line-height: 1.05;
}

.hero-panel p {
  margin: 1rem 0 1.5rem;
  color: rgba(255,255,255,0.95);
  max-width: 620px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: white;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  color: white;
  text-decoration: none;
  background: var(--secondary);
  border: 1px solid var(--secondary-dark);
  box-shadow: 0 12px 32px rgba(10, 79, 117, 0.18);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.product-summary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.product-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-section {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0;
}

.search-section.hidden {
  display: none;
}

#productSearch {
  width: min(100%, 420px);
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid #dfe3f0;
  background: #fbfbff;
  outline: none;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.2);
}

.hero-media {
  position: relative;
}

.hero-card {
  background: rgba(255,255,255,0.98);
  border-radius: 2rem;
  padding: 2rem;
  min-height: 360px;
  box-shadow: 0 26px 70px rgba(8, 30, 88, 0.18);
  border: 1px solid rgba(10, 79, 117, 0.08);
}

.hero-card h2 {
  margin: 0 0 0.8rem;
}

.hero-card p {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.hero-metrics div {
  background: white;
  border-radius: 1.3rem;
  padding: 1rem;
  box-shadow: 0 16px 40px rgba(18, 40, 94, 0.08);
}

.hero-metrics strong {
  display: block;
  font-size: 1.4rem;
}

.hero-metrics span {
  color: var(--muted);
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem auto;
  max-width: 1200px;
  padding: 0 1.5rem;
}

.promo-card {
  background: rgba(255,255,255,0.98);
  border-radius: 24px;
  padding: 1.6rem;
  box-shadow: 0 26px 56px rgba(18, 40, 94, 0.1);
  border: 1px solid rgba(10, 79, 117, 0.08);
}

.promo-card h3 {
  margin: 0 0 0.75rem;
}

.product-section,
.entertainment-section {
  margin: 2rem auto;
  max-width: 1200px;
  padding: 0 1.5rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.product-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(18, 40, 94, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 35px 90px rgba(18, 40, 94, 0.15);
}

.product-card-image {
  position: relative;
  height: 220px;
  background: linear-gradient(180deg, #eaf0ff 0%, #ffffff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #eaf0ff, #d8f5e8);
  color: #0b4f71;
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(79,108,255,0.95);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
}

.product-card-body {
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
}

.product-card-body h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.product-category {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 0.3rem 0;
}

.price-row strong {
  font-size: 1.2rem;
  color: var(--primary);
}

.price-old {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.95rem;
}

.product-actions-row {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.product-actions-row .btn {
  flex: 1;
  padding: 0.7rem;
  font-size: 0.9rem;
}

.btn-whatsapp {
  background-color: #25d366 !important;
  color: white !important;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex: 0.4;
}

.btn-whatsapp:hover {
  background-color: #1fbd50 !important;
}

.product-share-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
  justify-content: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #ddd;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.share-btn:hover {
  transform: translateY(-2px);
}

.share-btn.facebook {
  color: #1877f2;
}

.share-btn.facebook:hover {
  background-color: rgba(24, 119, 242, 0.1);
  border-color: #1877f2;
}

.share-btn.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: white;
  border: none;
}

.share-btn.instagram:hover {
  opacity: 0.9;
}

.share-btn.tiktok {
  background: #000000;
  color: #fff;
  border-color: #000;
}

.share-btn.tiktok:hover {
  background-color: #1a1a1a;
  border-color: #000;
  opacity: 0.9;
}

.share-btn.whatsapp {
  color: #25d366;
}

.share-btn.whatsapp:hover {
  background-color: rgba(37, 211, 102, 0.1);
  border-color: #25d366;
}

.product-stock {
  color: var(--muted);
  margin: 0;
}

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

.entertainment-card {
  border-radius: 24px;
  overflow: hidden;
  background: white;
  box-shadow: 0 26px 70px rgba(18, 40, 94, 0.08);
  padding: 1.4rem;
}

.video-placeholder {
  min-height: 180px;
  background: linear-gradient(135deg, #e8eeff, #fff);
  border-radius: 1.4rem;
  display: grid;
  place-items: center;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 1rem;
}

.cart-panel {
  position: sticky;
  top: 1.2rem;
  max-width: 380px;
  margin: 2rem auto;
  background: white;
  border-radius: 30px;
  box-shadow: 0 26px 70px rgba(18, 40, 94, 0.08);
  padding: 1.6rem;
}

.cart-header {
  margin-bottom: 1rem;
}

.cart-header h3 {
  margin: 0;
}

.cart-header p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.cart-items {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 20px;
  background: #f5f7ff;
}

.cart-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.icon-button {
  border: none;
  background: rgba(79,108,255,0.12);
  color: var(--text);
  border-radius: 12px;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

.icon-button.danger {
  background: rgba(255, 115, 115, 0.14);
  color: #c02f2f;
}

.cart-footer {
  display: grid;
  gap: 1rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.order-form {
  display: grid;
  gap: 0.9rem;
}

.order-form label {
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}

.order-form input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid #dfe3f0;
  background: #fbfbff;
}

.product-empty,
.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}

@media (max-width: 1100px) {
  .hero-panel,
  .product-grid,
  .promo-grid,
  .entertainment-grid {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: relative;
    max-width: 100%;
    margin: 1rem auto;
  }
}

@media (max-width: 720px) {
  .shop-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .social-banner {
    padding: 1rem 1.5rem;
  }

  .banner-content h3 {
    font-size: 1.1rem;
  }

  .social-links-banner {
    gap: 0.7rem;
  }

  .social-banner-link {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .hero-panel {
    padding: 1.5rem;
  }

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

  .product-card-image {
    min-height: 280px;
  }

  .product-card-body {
    padding: 1rem;
  }

  .product-card-body h3 {
    font-size: 1.05rem;
  }

  .product-actions-row {
    flex-direction: column;
    gap: 0.6rem;
  }

  .product-actions-row .btn {
    width: 100%;
  }

  .btn-whatsapp {
    flex: 1 !important;
  }

  .product-share-buttons {
    margin-top: 0.6rem;
  }

  .share-btn {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .product-card-image {
    min-height: 320px;
  }

  .product-card-body {
    padding: 1rem;
    gap: 0.6rem;
  }

  .product-actions-row {
    flex-direction: column;
  }

  .price-row strong {
    font-size: 1.1rem;
  }

  .product-share-buttons {
    justify-content: space-around;
  }
}

.cart-page-main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.cart-page-main .section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cart-page-main .section-heading h2 {
  margin: 0;
}

.cart-page-main .section-heading p {
  color: var(--muted);
  margin: 0.45rem 0 0;
}

.cart-page-main .btn-secondary {
  min-width: 170px;
}

.form-hint {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: minmax(100vh, auto);
  min-height: 100vh;
  transition: grid-template-columns 0.25s ease;
}

.dashboard-shell.sidebar-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}

.dashboard-shell.sidebar-collapsed .sidebar {
  width: 64px;
  min-width: 64px;
  padding: 1rem 0.5rem;
  overflow: hidden;
  opacity: 1;
  pointer-events: auto;
}

.dashboard-shell.sidebar-collapsed .dashboard-main {
  width: 100%;
}

.dashboard-shell.sidebar-collapsed .sidebar-brand {
  display: flex;
  justify-content: center;
}

.dashboard-shell.sidebar-collapsed .sidebar-brand span,
.dashboard-shell.sidebar-collapsed .sidebar-brand small,
.dashboard-shell.sidebar-collapsed .sidebar-nav {
  display: none;
}

.dashboard-shell.sidebar-collapsed .sidebar-logo {
  margin: 0 auto;
}

.sidebar {
  grid-column: 1;
  grid-row: 1;
  min-height: 100vh;
  background: rgba(9, 32, 91, 0.95);
  color: #f3f5ff;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-toggle {
  min-width: 56px;
}

.dashboard-shell.sidebar-collapsed .sidebar-toggle {
  background: rgba(79,108,255,0.14);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,0.15);
  font-weight: 700;
}

.sidebar-brand span {
  font-size: 0.95rem;
  font-weight: 700;
}

.sidebar-brand small {
  display: block;
  color: rgba(255,255,255,0.67);
}

.sidebar-nav {
  display: grid;
  justify-items: stretch;
  gap: 0.38rem;
}

.nav-link {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  text-align: left;
  color: rgba(255,255,255,0.88);
  border-radius: 16px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
  background: linear-gradient(90deg, rgba(255,255,255,0.16), rgba(255,255,255,0.1));
  color: #ffffff;
  border-color: rgba(255,255,255,0.12);
  transform: translateX(3px);
}

.logout-link {
  margin-top: auto;
  background: rgba(255,255,255,0.08);
}

.nav-group-toggle {
  background: none;
  border: none;
  color: rgba(255,255,255,0.88);
  cursor: pointer;
  padding: 0.9rem 1rem;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
  border: 1px solid transparent;
}

.nav-group-toggle:hover {
  background: linear-gradient(90deg, rgba(255,255,255,0.16), rgba(255,255,255,0.1));
  color: #fff;
  border-color: rgba(255,255,255,0.12);
  transform: translateX(3px);
}

.nav-group-toggle.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255,255,255,0.16), rgba(255,255,255,0.1));
  border-color: rgba(255,255,255,0.12);
}

.nav-group-toggle::after {
  content: "▼";
  font-size: 0.65rem;
  transition: transform 0.3s ease;
  display: inline-block;
}

.nav-group-toggle.active::after {
  transform: rotate(-180deg);
}

.nav-group-items {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(255,255,255,0.15);
  margin-left: 0.5rem;
}

.nav-group-items .nav-link {
  padding: 0.7rem 0.75rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  border-radius: 12px;
  margin-bottom: 0.1rem;
}

.nav-group-items .nav-link:hover {
  color: #fff;
  background: linear-gradient(90deg, rgba(255,255,255,0.12), rgba(255,255,255,0.08));
}

.nav-group-items .nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255,255,255,0.16), rgba(255,255,255,0.1));
  border-left: 3px solid #fff;
  padding-left: 0.45rem;
}

.dashboard-main {
  grid-column: 2;
  grid-row: 1;
  background: linear-gradient(180deg, #eef4ff 0%, #f6f9ff 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem 1.8rem;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 16px 44px rgba(17, 51, 113, 0.08);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
}

.sidebar-toggle {
  border: none;
  background: rgba(79,108,255,0.12);
  color: var(--text);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  cursor: pointer;
}

.topbar-left {
  display: flex;
  align-items: center;
}

.topbar-status {
  margin-left: 1rem;
  font-weight: 600;
  color: #2f3a5a;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.action-btn,
.action-link,
.filter-btn {
  border: none;
  background: white;
  border-radius: 16px;
  padding: 0.85rem 1rem;
  color: #3a4b7c;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 16px 40px rgba(17, 51, 113, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-btn:hover,
.action-link:hover,
.filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(17, 51, 113, 0.09);
}

.user-chip {
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(79,108,255,0.14);
  font-weight: 700;
}

.dashboard-modal[hidden] {
  display: none;
}

.dashboard-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow-y: auto;
}

.dashboard-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 28, 58, 0.42);
}

.dashboard-modal-content {
  position: relative;
  width: min(100%, 34rem);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.25rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 51, 113, 0.2);
}

.dashboard-modal-content .form-actions {
  justify-content: flex-end;
  margin-top: 1rem;
}

.dashboard-performance-chart {
  overflow: hidden;
}

.performance-chart-wrap {
  width: 100%;
  overflow-x: auto;
  padding: 0.5rem 0 0;
}

.performance-chart-svg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.performance-grid-line {
  stroke: #e7ebf1;
  stroke-width: 1;
}

.performance-axis {
  stroke: #c7ccd4;
  stroke-width: 1;
}

.performance-revenue-bar {
  fill: #78acd2;
  opacity: 0.9;
}

.performance-margin-line {
  fill: none;
  stroke: #d18b2d;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.performance-margin-dot {
  fill: #d18b2d;
}

.performance-axis-label,
.performance-month-label,
.performance-axis-title {
  fill: #38404d;
  font-size: 12px;
  font-family: inherit;
}

.revenue-axis-label,
.revenue-title {
  fill: #4d8dbb;
}

.margin-axis-label,
.margin-title {
  fill: #d18b2d;
}

.performance-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.25rem 0 0.75rem;
  color: #4c5564;
  font-size: 0.82rem;
}

.performance-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.performance-legend i {
  display: inline-block;
  width: 1rem;
  height: 0.55rem;
}

.legend-revenue {
  background: #78acd2;
}

.legend-margin {
  height: 0.18rem !important;
  background: #d18b2d;
}

.dashboard-content {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.8rem;
  background: linear-gradient(135deg, rgba(79,108,255,0.16), rgba(32, 73, 255, 0.08));
  border-radius: 2rem;
  align-items: center;
}

.dashboard-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 2.5vw, 2.6rem);
}

.dashboard-hero p {
  margin: 0.7rem 0 0;
  color: var(--muted);
}

.hero-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  width: min(100%, 27rem);
}

.hero-filters .filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  padding: 0.65rem 0.75rem;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

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

.summary-card {
  background: white;
  padding: 1.4rem;
  border-radius: 22px;
  box-shadow: 0 14px 30px rgba(50, 70, 148, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(50, 70, 148, 0.12);
}

.summary-card p {
  margin: 0 0 0.6rem;
  color: var(--muted);
}

.summary-card strong {
  font-size: 1.45rem;
}

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

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

.panel,
.chart-panel,
.table-panel {
  background: white;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 16px 40px rgba(50, 70, 148, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.panel:hover,
.chart-panel:hover,
.table-panel:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 44px rgba(50, 70, 148, 0.11);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.report-import-group,
.report-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.report-import-group label,
.report-filter-group label {
  font-size: 0.95rem;
  color: var(--muted);
}

.report-import-group input[type="date"],
.report-filter-group select {
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  background: white;
  color: #11171f;
}

.report-import-group button {
  min-width: 120px;
}

.demand-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.demand-filter-bar .report-filter-group {
  flex-direction: column;
  align-items: stretch;
  min-width: 10rem;
}

.demand-filter-bar .demand-search-group {
  flex: 1 1 14rem;
}

.demand-filter-bar input[type="search"] {
  min-height: 2.8rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  color: #11171f;
}

.demand-summary-grid {
  margin-bottom: 1rem;
}

.demand-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.demand-view-tabs .filter-btn[aria-selected="true"] {
  background: var(--primary);
  color: #fff;
}

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

.demand-table-scroll table {
  min-width: 1380px;
}

.demand-table-scroll .demand-sales-table {
  min-width: 2100px;
}

.demand-table-scroll td:last-child {
  white-space: nowrap;
}

.demand-sync-status {
  margin: 0.25rem 0 1rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: #f2f7fb;
}

.demand-table-note {
  margin-top: 0.8rem;
}

.demand-product-name {
  min-width: 14rem;
  font-weight: 600;
}

.demand-minimum-cell {
  min-width: 9rem;
}

.demand-minimum-input {
  width: 6rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #cbd5df;
  border-radius: 8px;
}

.demand-save-target {
  display: block;
  margin-top: 0.35rem;
  padding: 0.35rem 0.65rem;
}

.demand-stock-status {
  display: inline-block;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.demand-stock-status-restock {
  background: #fff0e5;
  color: #9a3d00;
}

.demand-stock-status-set-minimum {
  background: #fff7db;
  color: #755400;
}

.demand-stock-status-healthy {
  background: #e7f6ec;
  color: #17653a;
}

tr[data-status="restock"] {
  background: #fffaf5;
}

.demand-store-cell {
  min-width: 18rem;
  line-height: 1.6;
}

.demand-store-cell small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.panel-subtitle {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.panel-actions-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.expense-date-filter .report-filter-group {
  align-items: flex-start;
  flex-direction: column;
}

.expense-date-filter input[type="date"] {
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  background: white;
  color: #11171f;
}

.expense-filter-info {
  margin-top: 0.75rem;
}

.report-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  align-items: stretch;
  justify-content: start;
  justify-items: start;
  text-align: left;
}

.report-menu-panel {
  width: min(320px, 100%);
  flex: 0 0 320px;
  transition: width 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.report-menu-panel.collapsed {
  width: 0;
  min-width: 0;
  padding: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
}

.report-menu-panel.collapsed .report-cards-grid,
.report-menu-panel.collapsed .report-menu-header {
  display: none;
}

.report-menu-header {
  align-items: flex-start;
}

.report-menu-header .filter-btn {
  margin-left: auto;
}

.report-layout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: stretch;
  flex-wrap: wrap;
}

.report-detail-panel {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 980px) {
  .report-layout {
    flex-direction: column;
  }

  .report-menu-panel {
    width: 100%;
    flex: none;
  }
}

.report-cards-panel {
  text-align: left;
}

.report-card {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  margin-right: auto;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(79, 108, 255, 0.12);
  background: #f7f9ff;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.report-card:hover,
.report-card.active {
  transform: translateY(-2px);
  background: #eef3ff;
  box-shadow: 0 12px 28px rgba(79, 108, 255, 0.08);
}

.report-detail-panel {
  margin-top: 1rem;
}

.report-detail-panel .panel-header {
  margin-bottom: 1rem;
}

.invoice-preview-panel,
.receipt-preview-panel {
  background: #fff;
  padding: 1.5rem;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(50, 70, 148, 0.08);
}

.invoice-preview-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.invoice-logo-box {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 1.75rem;
  font-weight: 700;
}

.invoice-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.invoice-company-details h3 {
  margin: 0;
}

.invoice-company-details p {
  margin: 0.2rem 0;
  color: var(--muted);
}

.invoice-details-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}

.invoice-details-grid strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.invoice-items-table table {
  width: 100%;
}

.invoice-summary {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
}

.invoice-summary span {
  color: var(--muted);
}

.invoice-summary strong {
  font-size: 1.55rem;
}

.receipt-footer {
  margin-top: 1rem;
  border-top: 1px dashed rgba(50, 70, 148, 0.25);
  padding-top: 0.75rem;
}

.receipt-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.hidden {
  display: none !important;
}

.daily-balance-page .daily-balance-actions {
  align-items: end;
}

.daily-balance-add-account {
  display: flex;
  align-items: end;
  gap: 0.6rem;
}

.daily-balance-add-account .field {
  margin: 0;
}

.daily-balance-actions .field {
  min-width: 10rem;
  margin: 0;
}

.daily-balance-page .table-shell {
  overflow-x: auto;
}

.daily-balance-page table {
  min-width: 1050px;
}

.daily-balance-amount {
  width: 7rem;
  min-width: 6rem;
}

.daily-balance-note {
  margin: 1rem 0;
}

.balance-match {
  color: #16733d;
  font-weight: 700;
}

.balance-mismatch {
  color: #b42318;
  font-weight: 700;
}

.daily-balance-page .message-error {
  color: #b42318;
}

@media print {
  body * {
    visibility: hidden;
  }

  .daily-balance-page,
  .daily-balance-page * {
    visibility: visible;
  }

  .invoice-preview-panel,
  .invoice-preview-panel *,
  .receipt-preview-panel,
  .receipt-preview-panel * {
    visibility: visible;
  }

  .invoice-preview-panel,
  .receipt-preview-panel {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
  }

  body[data-page="daily-balance"] .daily-balance-page {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0;
    background: #fff;
  }

  body[data-page="daily-balance"] .daily-balance-actions,
  body[data-page="daily-balance"] #saveDailyClosing,
  body[data-page="daily-balance"] .daily-balance-add-account,
  body[data-page="daily-balance"] .daily-balance-lower > section:first-child {
    display: none !important;
  }

  body[data-page="daily-balance"] .daily-balance-lower > section:last-child {
    display: block;
  }

  body[data-page="daily-balance"] .daily-balance-page .table-shell {
    overflow: visible;
  }

  body[data-page="daily-balance"] .daily-balance-page table {
    min-width: 0;
    font-size: 8pt;
  }

  body[data-page="daily-balance"] .daily-balance-amount {
    border: 0;
    padding: 0;
    width: 5rem;
  }
}

.panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.panel-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.panel-body {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.panel-chart {
  background: #f6f9ff;
  border-radius: 20px;
}

.small-panel {
  padding: 1.2rem;
}

.small-body {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--text);
}

.nav-group {
  display: grid;
  gap: 0.35rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem 0;
  margin-bottom: 0.4rem;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 2.2vw, 2.3rem);
}

.page-header p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.module-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.05fr 1.35fr;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

#expenseModuleGrid {
  grid-template-columns: minmax(0, 1fr);
}

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

.expense-sheet-sync {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid #dfe6f4;
  border-left: 4px solid #5265c8;
  border-radius: 12px;
  background: #fff;
}

.expense-sheet-sync[hidden] {
  display: none;
}

.expense-sheet-sync strong {
  color: #1d2a45;
}

.expense-sheet-sync p {
  margin: 0.25rem 0 0;
  color: #64718a;
  font-size: 0.9rem;
}

.expense-sheet-sync[data-state="connected"] {
  border-left-color: #25805a;
}

.expense-sheet-sync[data-state="error"],
.expense-sheet-sync[data-state="disconnected"] {
  border-left-color: #c14949;
}

.expense-sheet-sync[data-state="running"] {
  border-left-color: #c28a19;
}

.expense-sync-conflicts {
  flex-basis: 100%;
  min-width: 0;
  padding-top: 0.25rem;
  color: #34415a;
}

.expense-sync-conflicts summary {
  cursor: pointer;
  font-weight: 700;
}

.expense-sync-conflicts .table-shell {
  margin-top: 0.75rem;
}

.expense-sync-conflicts table {
  min-width: 680px;
}

#expenseForm .form-actions,
#expenseForm #expenseMonthHint,
#expenseForm #expenseMessage {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 15px;
  border: 1px solid #dfe3f0;
  background: #fbfbff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(79,108,255,0.45);
  box-shadow: 0 0 0 4px rgba(79,108,255,0.1);
  outline: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.form-actions .btn {
  width: auto;
  min-width: 140px;
}

.pos-payment {
  background: #f7fbff;
  border-radius: 24px;
  padding: 1.4rem;
  margin-top: 1rem;
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: flex-end;
}

.payment-allocation-field {
  grid-column: 1 / -1;
}

.pos-payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.6rem;
}

.pos-payment-row .btn {
  min-width: auto;
  white-space: nowrap;
}

#addPosPayment {
  margin-top: 0.25rem;
}

.pos-payment-balance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.pos-payment-balance div {
  background: white;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid #e8efff;
}

.pos-payment-balance span {
  display: block;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.pos-payment-balance strong {
  font-size: 1.2rem;
}

@media (max-width: 980px) {
  .payment-grid,
  .pos-payment-balance {
    grid-template-columns: 1fr;
  }

  .pos-payment-row {
    grid-template-columns: 1fr;
  }
}

  .product-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
  }

  .product-thumb.placeholder {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(79, 108, 255, 0.08);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    text-align: center;
  }

  .preview-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem;
    border-radius: 18px;
    background: rgba(79, 108, 255, 0.06);
    max-width: 200px;
  }

  .preview-card img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    border-radius: 14px;
  }
.table-shell {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-shell table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.table-shell thead {
  background: #f7faff;
}

.table-shell th,
.table-shell td {
  padding: 0.95rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid #ecf2ff;
}

.table-shell th {
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-action {
  border: none;
  background: rgba(79,108,255,0.12);
  color: var(--primary);
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  margin-right: 0.35rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease;
}

.table-action:hover {
  transform: translateY(-1px);
  background: rgba(79,108,255,0.18);
}

.table-action.danger {
  background: rgba(215, 58, 58, 0.12);
  color: #b22f2f;
}

.table-action.danger:hover {
  background: rgba(215, 58, 58, 0.2);
  color: #8b1818;
}

.export-mark-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
  border-radius: 3px;
  transition: all 0.2s ease;
}

.export-mark-checkbox:hover {
  transform: scale(1.1);
}

.export-mark-checkbox:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.empty-row {
  text-align: center;
  color: var(--muted);
  padding: 1.4rem 0;
}

.activity-list,
.alert-list {
  display: grid;
  gap: 0.7rem;
  padding-left: 1.1rem;
  color: var(--muted);
  margin: 0;
}

.table-panel table {
  width: 100%;
  border-collapse: collapse;
}

.table-panel th,
.table-panel td {
  padding: 0.8rem 0.7rem;
  border-bottom: 1px solid #ecf2ff;
  text-align: left;
}

.table-panel th {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.message.success {
  color: #178151;
}

.pos-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ecf2ff;
}

.chart-body {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.line-chart-svg {
  width: 100%;
  height: 220px;
  display: block;
}

.line-chart-path {
  vector-effect: non-scaling-stroke;
}

.line-chart-point {
  fill: var(--primary);
  stroke: #ffffff;
  stroke-width: 1.25px;
}

.chart-labels {
  display: grid;
  grid-template-columns: repeat(var(--chart-count, 6), minmax(44px, 1fr));
  gap: 0.7rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.6rem;
}

@media (max-width: 1080px) {
  .dashboard-shell {
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-rows: minmax(100vh, auto);
  }

  .sidebar {
    flex-direction: column;
    overflow-y: auto;
    padding: 1rem;
  }

  .sidebar-nav {
    grid-auto-flow: row;
  }

  .dashboard-shell.sidebar-collapsed {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .dashboard-topbar,
  .dashboard-hero {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .table-shell table {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .summary-grid,
  .chart-grid,
  .data-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  #expenseForm .form-actions,
  #expenseForm #expenseMonthHint,
  #expenseForm #expenseMessage {
    grid-column: 1 / -1;
  }

  .expense-sheet-sync {
    align-items: stretch;
    flex-direction: column;
  }

  .chart-row,
  .chart-labels {
    min-width: 320px;
  }

  .chart-bar {
    min-width: 0;
  }

  .table-shell table {
    width: 100%;
    min-width: 560px;
  }

  .table-shell th,
  .table-shell td {
    white-space: normal;
  }

  .topbar-actions,
  .hero-filters,
  .page-header {
    justify-content: stretch;
    width: 100%;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(290px, 86vw);
    min-height: 100dvh;
    z-index: 20;
    overflow-y: auto;
    box-shadow: 18px 0 40px rgba(9, 32, 91, 0.24);
    transform: translateX(0);
    transition: transform 0.25s ease;
  }

  .dashboard-shell.sidebar-collapsed .sidebar {
    width: min(290px, 86vw);
    min-width: 0;
    padding: 2rem 1.5rem;
    transform: translateX(-105%);
  }

  .dashboard-shell:not(.sidebar-collapsed) .sidebar-brand span,
  .dashboard-shell:not(.sidebar-collapsed) .sidebar-brand small,
  .dashboard-shell:not(.sidebar-collapsed) .sidebar-nav {
    display: block;
  }

  .dashboard-content {
    padding: 1rem;
    gap: 1rem;
  }

  .dashboard-topbar {
    padding: 0.85rem 1rem;
  }

  .topbar-status {
    max-width: 45vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    gap: 0.5rem;
  }

  .panel,
  .chart-panel,
  .table-panel {
    padding: 1rem;
    border-radius: 18px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .pos-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .pos-summary strong {
    grid-column: 1 / -1;
  }

  .pos-summary .btn {
    width: 100%;
  }

  .form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  #expenseForm {
    grid-template-columns: 1fr;
  }

  #expenseForm .form-actions,
  #expenseForm #expenseMonthHint,
  #expenseForm #expenseMessage {
    grid-column: 1;
  }
}

@media (max-width: 420px) {
  .topbar-actions .user-chip {
    display: none;
  }

  .pos-summary {
    grid-template-columns: 1fr;
  }

  .pos-summary strong {
    grid-column: auto;
  }
}

/* Modal Styles for Order Details */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 20px;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
}

.modal-body {
  padding: 20px;
}

/* Badge Styles */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-info {
  background: #dbeafe;
  color: #0c4a6e;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-primary {
  background: #ddd6fe;
  color: #4c1d95;
}

.badge-danger {
  background: #fee2e2;
  color: #7f1d1d;
}

.badge-secondary {
  background: #e5e7eb;
  color: #4b5563;
}

/* Button Sizes */
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-info {
  background: #0284c7;
  color: white;
  border: none;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
}

.btn-info:hover {
  background: #0369a1;
}

/* Order Item Styles */
.order-item {
  padding: 12px;
  border-bottom: 1px solid #e5e5e5;
  background: #fafafa;
  margin-bottom: 10px;
  border-radius: 6px;
}

.stock-status {
  font-weight: 600;
  margin-top: 5px;
}

/* Public storefront cart page */
.shop-home + body,
body[data-page="cart"] {
  background: #fff;
  color: #111827;
  font-family: Arial, Helvetica, sans-serif;
}

body[data-page="cart"] .shop-header {
  min-height: 64px;
  padding: 0.55rem max(2rem, calc((100% - 1120px) / 2));
  background: #fff;
  color: #111827;
  border-bottom: 1px solid #e5e7eb;
}

body[data-page="cart"] .brand { gap: 0.45rem; }
body[data-page="cart"] .brand-logo { display: block; width: 48px; height: 42px; }
body[data-page="cart"] .brand strong { color: #111827; font-size: 0.72rem; }
body[data-page="cart"] .brand strong span { color: #ef233c; font-size: 0.62rem; }
body[data-page="cart"] .brand p { display: none; }
body[data-page="cart"] .shop-nav { gap: 0.5rem; }
body[data-page="cart"] .shop-nav .nav-link { color: #374151; padding: 0.4rem 0.65rem; border-radius: 4px; font-size: 0.68rem; }
body[data-page="cart"] .shop-nav .nav-link:hover { background: #f3f4f6; color: #111827; }
body[data-page="cart"] .cart-page-main { max-width: 900px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
body[data-page="cart"] .cart-page-main > .section-heading { margin-bottom: 1.5rem; }
body[data-page="cart"] .cart-page-main h2 { font-size: 1.35rem; }
body[data-page="cart"] .cart-page-main .btn-secondary { min-width: 0; padding: 0.55rem 0.85rem; border-radius: 5px; font-size: 0.68rem; }
body[data-page="cart"] .cart-panel { max-width: none; margin: 0; padding: 1.4rem; border: 1px solid #e5e7eb; border-radius: 7px; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08); }
body[data-page="cart"] .cart-item { border-radius: 5px; background: #f8fafc; }
body[data-page="cart"] .order-form input { border-radius: 4px; background: #fff; }
body[data-page="cart"] .order-form .btn { border-radius: 5px; }

.shop-home.cart-modal-open { overflow: hidden; }
.shop-home .shop-cart-modal[hidden] { display: none; }
.shop-home .shop-cart-modal { position: fixed; inset: 0; z-index: 1000; padding: 0; }
.shop-home .shop-cart-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.48); backdrop-filter: blur(8px); }
.shop-home .shop-cart-dialog { position: absolute; top: 0; right: 0; display: flex; flex-direction: column; width: min(480px, 100%); height: 100%; overflow-y: auto; padding: 0 1.5rem 1.5rem; background: #fff; box-shadow: -12px 0 35px rgba(15, 23, 42, 0.12); }
.shop-home .shop-cart-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; padding: 0 0.25rem; border-bottom: 1px solid #eef0f3; }
.shop-home .shop-cart-dialog-header h2 { margin: 0; font-size: 1rem; }
.shop-home .shop-cart-close { width: 30px; height: 30px; min-height: 30px; padding: 0; border: 0; border-radius: 50%; background: #f3f4f6; color: #374151; cursor: pointer; font-size: 1.25rem; line-height: 1; }
.shop-home .shop-cart-dialog .cart-items { display: flex; flex: 1; align-items: center; justify-content: center; margin: 0; padding: 1rem 0; }
.shop-home .shop-cart-empty { display: grid; justify-items: center; gap: 0.35rem; text-align: center; }
.shop-home .shop-cart-empty-icon { display: grid; place-items: center; width: 96px; height: 96px; margin-bottom: 0.7rem; border-radius: 50%; background: #f8fafc; color: #d1d5db; font-size: 2.4rem; filter: grayscale(1); }
.shop-home .shop-cart-empty h3 { margin: 0; font-size: 0.95rem; }
.shop-home .shop-cart-empty p { margin: 0 0 0.5rem; color: #6b7280; font-size: 0.72rem; }
.shop-home .shop-cart-modal.is-empty .cart-footer { display: none; }
.shop-home .shop-cart-empty .btn { width: auto; min-width: 170px; margin-top: 0.8rem; border-radius: 20px; background: #ed1c24; }
.shop-home .shop-cart-dialog .cart-footer { gap: 0.75rem; padding-top: 0.8rem; border-top: 1px solid #eef0f3; }
.shop-home .shop-cart-dialog .cart-total { font-size: 0.78rem; }
.shop-home .shop-cart-dialog .btn { min-height: 34px; padding: 0.45rem 0.8rem; border-radius: 5px; font-size: 0.65rem; text-decoration: none; }

@media (max-width: 600px) {
  body[data-page="cart"] .shop-header { padding: 0.5rem 0.8rem; }
  body[data-page="cart"] .shop-nav .nav-link { display: none; }
  body[data-page="cart"] .cart-page-main { padding: 1.5rem 0.8rem 3rem; }
  body[data-page="cart"] .cart-page-main > .section-heading { align-items: flex-start; flex-direction: column; }
}

/* Responsive */
@media (max-width: 640px) {
  .modal-content {
    max-width: 95vw;
    margin: 10px;
  }
  
  .order-actions {
    flex-direction: column !important;
  }
  
  .btn-sm {
    width: 100%;
    text-align: center;
  }
}

/* Public storefront home page */
.shop-home {
  background: #fff;
  color: #111827;
  font-family: Arial, Helvetica, sans-serif;
}

.shop-home .shop-header {
  min-height: 64px;
  padding: 0.55rem max(2rem, calc((100% - 1120px) / 2));
  background: #fff;
  color: #111827;
  border-bottom: 1px solid #e5e7eb;
}

.shop-home .brand { gap: 0.45rem; }
.shop-home .brand-logo { width: 48px; height: 42px; }
.shop-home .brand strong { color: #111827; font-size: 0.72rem; line-height: 0.9; }
.shop-home .brand strong span { color: #ef233c; font-size: 0.62rem; }
.shop-home .brand p { display: none; }
.message-integration-notice {
  margin: 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid #3d7770;
  background: #edf5f2;
  color: #284d49;
}

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

.message-field-wide {
  grid-column: 1 / -1;
}

.message-field-wide textarea {
  resize: vertical;
  min-height: 5rem;
}

.message-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.message-breakdown-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.message-breakdown-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #e8ebef;
}

.message-inbox-header {
  align-items: flex-end;
}

.message-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(140px, 1fr));
  align-items: end;
  gap: 0.7rem;
}

.message-filters .field {
  min-width: 0;
}

.message-filters .field input,
.message-filters .field select,
.message-row-select,
.message-row-notes {
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border: 1px solid #d9dfe2;
  border-radius: 5px;
  background: #fff;
}

.customer-message-table {
  min-width: 1280px;
}

.customer-message-table td strong,
.customer-message-table td small {
  display: block;
}

.customer-message-table td small {
  margin-top: 0.2rem;
  color: var(--muted);
}

.customer-message-text {
  max-width: 320px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.message-row-select {
  width: 100%;
}

.message-row-notes {
  width: 190px;
}

.message-save-button {
  min-width: 58px;
}

.message-form-feedback {
  align-self: center;
  margin: 0;
}

.message-form-feedback.error {
  color: #b42318;
}

@media (max-width: 900px) {
  .message-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .message-inbox-header {
    align-items: stretch;
  }

  .message-filters {
    grid-template-columns: 1fr 1fr;
  }

  .message-filters .field:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .message-entry-grid,
  .message-insights-grid,
  .message-filters {
    grid-template-columns: 1fr;
  }

  .message-field-wide,
  .message-filters .field:first-child {
    grid-column: auto;
  }
}

.shop-home .shop-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(360px, 34vw);
  padding: 0.42rem 0.7rem;
  color: #9ca3af;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 0.66rem;
}
.shop-home .shop-nav { align-items: center; gap: 0.35rem; }
.shop-home .shop-nav .nav-link { display: none; }
.shop-home .cart-link {
  color: #fff;
  background: #ed1c24;
  border-radius: 12px;
  padding: 0.38rem 0.72rem;
  font-size: 0.68rem;
  text-decoration: none;
}
.shop-home #cartCount { margin-left: 0.2rem; }

.shop-home .shop-main { background: #fff; }
.shop-home .hero-panel {
  max-width: none;
  min-height: 250px;
  padding: 3.1rem max(2rem, calc((100% - 1120px) / 2));
  border-radius: 0;
  background: #111a38;
  box-shadow: none;
}
.shop-home .hero-panel h1 { font-size: clamp(2rem, 4vw, 3rem); color: #fff; }
.shop-home .hero-panel h1 strong { color: #5872ff; }
.shop-home .hero-panel p { max-width: 430px; margin: 0.8rem 0 1.15rem; font-size: 0.72rem; line-height: 1.55; color: #dbe4ff; }
.shop-home .hero-pill { margin-bottom: 0.65rem; padding: 0; color: #8294ff; background: none; font-size: 0.52rem; }
.shop-home .hero-actions { gap: 0.55rem; }
.shop-home .hero-actions .btn { width: auto; min-height: 32px; padding: 0.45rem 0.8rem; border-radius: 14px; font-size: 0.62rem; box-shadow: none; }
.shop-home .hero-actions .btn-secondary { background: #4f35f5; border: 0; }
.shop-home .hero-outline { border: 1px solid #77809b; color: #fff; background: transparent; }
.shop-home .hero-light { border: 0; color: #111827; background: #fff; }

.shop-home .promo-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.55rem 1.5rem;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  border-bottom: 1px solid #f1f3f5;
}
.shop-home .promo-card { display: grid; grid-template-columns: auto 1fr; column-gap: 0.45rem; align-items: center; padding: 0.45rem 0; border: 0; border-radius: 0; box-shadow: none; }
.shop-home .promo-card > strong { grid-row: span 2; font-size: 0.8rem; }
.shop-home .promo-card h3 { margin: 0; font-size: 0.63rem; }
.shop-home .promo-card p { margin: 0.15rem 0 0; color: #6b7280; font-size: 0.52rem; }

.shop-home .product-section { max-width: 1120px; margin: 0 auto; padding: 1.8rem 1.5rem 2.4rem; }
.shop-home .section-heading { align-items: center; margin-bottom: 1.2rem; }
.shop-home .section-heading h2 { font-size: 0.95rem; }
.shop-home .section-heading p { margin: 0.15rem 0 0; color: #9ca3af; font-size: 0.58rem; }
.shop-home .product-summary-actions { gap: 0.55rem; }
.shop-home .product-summary { color: #9ca3af; font-size: 0.58rem; }
.shop-home .product-actions { gap: 0.35rem; }
.shop-home .product-actions .btn { width: auto; min-height: 28px; padding: 0.35rem 0.6rem; border-radius: 12px; font-size: 0.58rem; box-shadow: none; }
.shop-home .product-grid { grid-template-columns: repeat(4, 1fr); gap: 0.8rem; }
.shop-home .product-card { border: 1px solid #eef0f3; border-radius: 5px; box-shadow: none; }
.shop-home .product-card-image { min-height: 130px; background: #fafafa; }
.shop-home .product-card-body { padding: 0.7rem; gap: 0.4rem; }
.shop-home .product-card-body h3 { font-size: 0.65rem; }
.shop-home .product-category, .shop-home .product-stock { font-size: 0.55rem; }
.shop-home .price-row strong { font-size: 0.7rem; }
.shop-home .price-old { font-size: 0.55rem; }
.shop-home .product-actions-row .btn { min-height: 25px; padding: 0.3rem; font-size: 0.55rem; }
.shop-home .product-share-buttons { display: none; }
.shop-home .search-panel { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1rem; padding: 0.6rem; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 5px; font-size: 0.65rem; }
.shop-home .search-panel.hidden { display: none; }
.shop-home .search-controls { display: flex; flex: 1; gap: 0.4rem; }
.shop-home #productSearch { width: 100%; min-height: 30px; padding: 0.4rem 0.6rem; border-radius: 4px; font-size: 0.65rem; }
.shop-home .search-controls .btn { width: auto; min-height: 30px; padding: 0.35rem 0.6rem; font-size: 0.6rem; }

.shop-home .sale-banner {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1120px; margin: 0 auto 2rem; padding: 1.15rem 1.5rem;
  border-radius: 7px; color: #fff; background: #4934f4;
}
.shop-home .sale-banner span { font-size: 0.48rem; }
.shop-home .sale-banner h2 { margin: 0.2rem 0; font-size: 1.05rem; line-height: 1.05; }
.shop-home .sale-banner p { margin: 0; font-size: 0.55rem; }
.shop-home .sale-banner .btn { width: auto; min-height: 28px; font-size: 0.58rem; }

.shop-home .shop-footer { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; padding: 1.4rem max(2rem, calc((100% - 1120px) / 2)); background: #101827; color: #fff; }
.shop-home .shop-footer img { width: 52px; height: 36px; object-fit: contain; filter: brightness(0) invert(1); }
.shop-home .shop-footer p, .shop-home .shop-footer a { display: block; color: #aab4c6; font-size: 0.55rem; line-height: 1.7; text-decoration: none; }
.shop-home .shop-footer h3 { margin: 0 0 0.35rem; font-size: 0.62rem; color: #fff; }

@media (max-width: 700px) {
  .shop-home .shop-header { padding: 0.5rem 0.8rem; }
  .shop-home .shop-search { width: 38vw; }
  .shop-home .shop-nav .nav-link { display: none; }
  .shop-home .hero-panel { min-height: 250px; padding: 2.5rem 1.3rem; }
  .shop-home .promo-grid { gap: 0.6rem; padding: 0.55rem 0.8rem; }
  .shop-home .promo-card h3 { font-size: 0.55rem; }
  .shop-home .promo-card p { font-size: 0.45rem; }
  .shop-home .product-section { padding: 1.4rem 0.8rem 2rem; }
  .shop-home .section-heading { align-items: flex-start; flex-direction: column; }
  .shop-home .product-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-home .sale-banner { margin: 0 0.8rem 1.5rem; padding: 1rem; }
  .shop-home .shop-footer { grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.3rem 1rem; }
}

body[data-page="daily-balance"] {
  background: #f3f6fa;
}

body[data-page="daily-balance"] .dashboard-main {
  min-width: 0;
  background: #f3f6fa;
}

body[data-page="daily-balance"] .daily-balance-page {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  gap: 1.15rem;
  padding: clamp(1rem, 2.2vw, 2rem);
}

body[data-page="daily-balance"] .daily-balance-toolbar {
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: clamp(1.35rem, 3vw, 2.2rem);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 10%, rgba(89, 200, 194, 0.22), transparent 30%),
    linear-gradient(120deg, #073451, #0c5272 68%, #116d82);
  box-shadow: 0 18px 42px rgba(7, 52, 81, 0.16);
}

body[data-page="daily-balance"] .daily-balance-heading {
  min-width: 0;
}

body[data-page="daily-balance"] .daily-balance-eyebrow {
  display: inline-block;
  margin-bottom: 0.55rem;
  color: #a9e5dc;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

body[data-page="daily-balance"] .daily-balance-toolbar h1 {
  color: #fff;
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  line-height: 1.15;
}

body[data-page="daily-balance"] .daily-balance-toolbar p {
  max-width: 43rem;
  margin-top: 0.55rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.55;
}

body[data-page="daily-balance"] .daily-balance-actions {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) repeat(3, auto);
  align-items: end;
  gap: 0.55rem;
  flex: 0 0 auto;
}

body[data-page="daily-balance"] .daily-balance-actions .field {
  min-width: 10rem;
  gap: 0.35rem;
  color: #fff;
  font-size: 0.8rem;
}

body[data-page="daily-balance"] .daily-balance-actions .field input {
  min-height: 2.8rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 11px;
  color: #172b3b;
  background: #fff;
}

body[data-page="daily-balance"] .daily-balance-action {
  width: auto;
  min-height: 2.8rem;
  gap: 0.4rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  white-space: nowrap;
}

body[data-page="daily-balance"] .daily-balance-action:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

body[data-page="daily-balance"] #dailyBalanceMessage:empty {
  display: none;
}

body[data-page="daily-balance"] #dailyBalanceMessage {
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  color: #176044;
  background: #e9f7ef;
}

body[data-page="daily-balance"] #dailyBalanceMessage.message-error {
  color: #9f2d27;
  background: #fff0ed;
}

body[data-page="daily-balance"] .daily-balance-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

body[data-page="daily-balance"] .balance-summary-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.8rem;
  row-gap: 0.35rem;
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid #e8edf2;
  border-radius: 17px;
  box-shadow: 0 5px 18px rgba(15, 40, 65, 0.035);
}

body[data-page="daily-balance"] .balance-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 40, 65, 0.08);
}

body[data-page="daily-balance"] .balance-summary-icon {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border-radius: 13px;
  color: #08706f;
  background: #e4f6f2;
  font-size: 1.25rem;
  font-weight: 800;
}

body[data-page="daily-balance"] .balance-expenses .balance-summary-icon {
  color: #b66328;
  background: #fff1e5;
}

body[data-page="daily-balance"] .balance-expected .balance-summary-icon {
  color: #315cc7;
  background: #eaf0ff;
}

body[data-page="daily-balance"] .balance-actual .balance-summary-icon {
  color: #478344;
  background: #edf7e9;
}

body[data-page="daily-balance"] .balance-summary-card p {
  margin: 0 0 0.25rem;
  color: #687888;
  font-size: 0.78rem;
  font-weight: 650;
}

body[data-page="daily-balance"] .balance-summary-card strong {
  display: block;
  overflow-wrap: anywhere;
  color: #152e42;
  font-size: clamp(1.05rem, 1.55vw, 1.4rem);
  line-height: 1.2;
}

body[data-page="daily-balance"] .balance-summary-card > small {
  grid-column: 1 / -1;
  color: #8a98a6;
  font-size: 0.72rem;
}

body[data-page="daily-balance"] .daily-balance-page .panel {
  min-width: 0;
  padding: clamp(1rem, 1.8vw, 1.5rem);
  border: 1px solid #e7edf2;
  border-radius: 19px;
  box-shadow: 0 8px 24px rgba(15, 40, 65, 0.045);
}

body[data-page="daily-balance"] .daily-balance-panel-header {
  align-items: center;
}

body[data-page="daily-balance"] .daily-balance-panel-header h3,
body[data-page="daily-balance"] .daily-balance-lower h3 {
  color: #18364b;
  font-size: 1.05rem;
}

body[data-page="daily-balance"] .daily-balance-page .panel-subtitle {
  color: #748393;
  font-size: 0.83rem;
  line-height: 1.5;
}

body[data-page="daily-balance"] .daily-balance-add-account {
  align-items: end;
  gap: 0.5rem;
}

body[data-page="daily-balance"] .daily-balance-add-account .field {
  min-width: 12rem;
  margin: 0;
  gap: 0.3rem;
  font-size: 0.77rem;
}

body[data-page="daily-balance"] .daily-balance-add-account .field input,
body[data-page="daily-balance"] .daily-balance-transaction-form .field input,
body[data-page="daily-balance"] .daily-balance-transaction-form .field select {
  min-height: 2.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #fbfcfd;
}

body[data-page="daily-balance"] .daily-balance-page .btn {
  width: auto;
  min-height: 2.7rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-size: 0.85rem;
  box-shadow: none;
}

body[data-page="daily-balance"] .daily-balance-page .btn-secondary {
  border: 1px solid #dce5eb;
  color: #315064;
  background: #fff;
}

body[data-page="daily-balance"] .daily-balance-page .btn-secondary:hover {
  border-color: #a9c1cb;
  background: #f7fbfc;
  transform: translateY(-1px);
}

body[data-page="daily-balance"] .daily-balance-page .btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #08766e, #0b625f);
}

body[data-page="daily-balance"] .daily-balance-page .btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

body[data-page="daily-balance"] .daily-balance-page .table-shell {
  overflow-x: auto;
  border: 1px solid #e8edf1;
  border-radius: 13px;
}

body[data-page="daily-balance"] .daily-balance-page .table-shell table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
}

body[data-page="daily-balance"] .daily-balance-page .table-shell thead {
  background: #f4f8fa;
}

body[data-page="daily-balance"] .daily-balance-page .table-shell th,
body[data-page="daily-balance"] .daily-balance-page .table-shell td {
  padding: 0.8rem 0.7rem;
  border-bottom: 1px solid #edf1f4;
  color: #425463;
  font-size: 0.79rem;
  white-space: nowrap;
}

body[data-page="daily-balance"] .daily-balance-page .table-shell th {
  color: #647686;
  font-size: 0.69rem;
  letter-spacing: 0.035em;
}

body[data-page="daily-balance"] .daily-balance-page .table-shell tbody tr:last-child th,
body[data-page="daily-balance"] .daily-balance-page .table-shell tbody tr:last-child td {
  border-bottom: 0;
}

body[data-page="daily-balance"] .daily-balance-page .table-shell tbody th {
  color: #18364b;
  font-size: 0.83rem;
  text-transform: none;
}

body[data-page="daily-balance"] .daily-balance-amount {
  width: 7.5rem;
  min-width: 6.5rem;
  min-height: 2.35rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid #dce5e9;
  border-radius: 8px;
  color: #173a4c;
  background: #fff;
}

body[data-page="daily-balance"] .daily-balance-amount:focus {
  border-color: #12847c;
  outline: 3px solid rgba(18, 132, 124, 0.13);
}

body[data-page="daily-balance"] .daily-balance-note {
  max-width: 70rem;
  margin: 0;
}

body[data-page="daily-balance"] .daily-balance-note strong {
  color: #315064;
}

body[data-page="daily-balance"] .daily-balance-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

body[data-page="daily-balance"] .daily-balance-save {
  flex: 0 0 auto;
  min-width: 11rem;
  font-weight: 750;
}

body[data-page="daily-balance"] .daily-balance-lower {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
}

body[data-page="daily-balance"] .daily-balance-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

body[data-page="daily-balance"] .daily-balance-section-title .panel-subtitle {
  margin-top: 0.2rem;
}

body[data-page="daily-balance"] .daily-balance-section-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #08706f;
  background: #e4f6f2;
  font-size: 1.15rem;
  font-weight: 800;
}

body[data-page="daily-balance"] #dailyBalanceTransactionForm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

body[data-page="daily-balance"] #dailyBalanceTransactionForm .field {
  min-width: 0;
  gap: 0.35rem;
  color: #647686;
  font-size: 0.79rem;
}

body[data-page="daily-balance"] #dailyBalanceTransactionForm .form-actions {
  grid-column: 1 / -1;
}

body[data-page="daily-balance"] #dailyBalanceAccountField[hidden] {
  display: none;
}

body[data-page="daily-balance"] .daily-balance-account-cards,
body[data-page="daily-balance"] .daily-balance-transaction-cards {
  display: none;
}

body[data-page="daily-balance"] .balance-match {
  color: #18734c !important;
  font-weight: 750;
}

body[data-page="daily-balance"] .balance-mismatch {
  color: #bd3b35 !important;
  font-weight: 750;
}

body[data-page="daily-balance"] .daily-balance-page .empty-row,
body[data-page="daily-balance"] .daily-balance-empty {
  color: #8593a0;
  text-align: center;
  padding: 1.3rem;
}

@media (max-width: 1180px) {
  body[data-page="daily-balance"] .daily-balance-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  body[data-page="daily-balance"] .daily-balance-actions {
    width: 100%;
    grid-template-columns: minmax(11rem, 1fr) repeat(3, auto);
  }

  body[data-page="daily-balance"] .daily-balance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body[data-page="daily-balance"] .daily-balance-panel .table-shell,
  body[data-page="daily-balance"] .daily-balance-lower .table-shell {
    display: none;
  }

  body[data-page="daily-balance"] .daily-balance-account-cards,
  body[data-page="daily-balance"] .daily-balance-transaction-cards {
    display: grid;
    gap: 0.75rem;
  }

  body[data-page="daily-balance"] .daily-balance-lower {
    grid-template-columns: 1fr;
  }

  body[data-page="daily-balance"] .daily-balance-account-card,
  body[data-page="daily-balance"] .daily-balance-transaction-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid #e7edf1;
    border-radius: 14px;
    background: #fff;
  }

  body[data-page="daily-balance"] .daily-balance-account-card-head,
  body[data-page="daily-balance"] .daily-balance-transaction-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
  }

  body[data-page="daily-balance"] .daily-balance-card-label {
    color: #7a8996;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.11em;
  }

  body[data-page="daily-balance"] .daily-balance-account-card h4 {
    margin: 0.15rem 0 0;
    color: #17364a;
    font-size: 1rem;
  }

  body[data-page="daily-balance"] .daily-balance-account-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: #17a596;
    box-shadow: 0 0 0 5px #e3f5f2;
  }

  body[data-page="daily-balance"] .daily-balance-card-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 0.95rem 0;
  }

  body[data-page="daily-balance"] .daily-balance-card-fields .field {
    min-width: 0;
    gap: 0.3rem;
    color: #71808c;
    font-size: 0.72rem;
  }

  body[data-page="daily-balance"] .daily-balance-card-fields .daily-balance-amount {
    width: 100%;
    min-width: 0;
    min-height: 2.65rem;
    font-size: 1rem;
    font-weight: 700;
  }

  body[data-page="daily-balance"] .daily-balance-account-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem 0.5rem;
    padding: 0.8rem 0;
    border-top: 1px solid #edf1f3;
    border-bottom: 1px solid #edf1f3;
  }

  body[data-page="daily-balance"] .daily-balance-account-stats div,
  body[data-page="daily-balance"] .daily-balance-account-total div {
    display: grid;
    min-width: 0;
    gap: 0.2rem;
  }

  body[data-page="daily-balance"] .daily-balance-account-stats span,
  body[data-page="daily-balance"] .daily-balance-account-total span {
    color: #7c8994;
    font-size: 0.68rem;
  }

  body[data-page="daily-balance"] .daily-balance-account-stats strong {
    overflow-wrap: anywhere;
    color: #30495b;
    font-size: 0.78rem;
  }

  body[data-page="daily-balance"] .daily-balance-account-total {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.8rem;
  }

  body[data-page="daily-balance"] .daily-balance-account-total strong {
    color: #17364a;
    font-size: 0.95rem;
  }

  body[data-page="daily-balance"] .daily-balance-transaction-top strong {
    color: #17364a;
    font-size: 1rem;
  }

  body[data-page="daily-balance"] .daily-balance-transaction-type {
    padding: 0.35rem 0.55rem;
    border-radius: 99px;
    color: #08706f;
    background: #e4f6f2;
    font-size: 0.72rem;
    font-weight: 750;
  }

  body[data-page="daily-balance"] .daily-balance-transaction-account {
    margin-top: 0.75rem;
    color: #24465a;
    font-size: 0.83rem;
    font-weight: 700;
  }

  body[data-page="daily-balance"] .daily-balance-transaction-card p {
    margin: 0.35rem 0;
    color: #647686;
    font-size: 0.82rem;
    overflow-wrap: anywhere;
  }

  body[data-page="daily-balance"] .daily-balance-transaction-card small {
    color: #8a98a6;
  }
}

@media (max-width: 760px) {
  body[data-page="daily-balance"] .daily-balance-page {
    padding: 0.8rem;
    gap: 0.8rem;
  }

  body[data-page="daily-balance"] .daily-balance-toolbar {
    gap: 1rem;
    padding: 1.2rem;
    border-radius: 18px;
  }

  body[data-page="daily-balance"] .daily-balance-toolbar p {
    font-size: 0.87rem;
  }

  body[data-page="daily-balance"] .daily-balance-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  body[data-page="daily-balance"] .daily-balance-actions .field {
    grid-column: 1 / -1;
  }

  body[data-page="daily-balance"] .daily-balance-action {
    width: 100%;
    justify-content: center;
    min-width: 0;
    padding: 0.6rem 0.4rem;
    font-size: 0.77rem;
  }

  body[data-page="daily-balance"] .daily-balance-summary {
    gap: 0.55rem;
  }

  body[data-page="daily-balance"] .balance-summary-card {
    column-gap: 0.55rem;
    padding: 0.75rem;
    border-radius: 13px;
  }

  body[data-page="daily-balance"] .balance-summary-icon {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 10px;
    font-size: 1rem;
  }

  body[data-page="daily-balance"] .balance-summary-card p {
    font-size: 0.69rem;
  }

  body[data-page="daily-balance"] .balance-summary-card strong {
    font-size: clamp(0.88rem, 4vw, 1.1rem);
  }

  body[data-page="daily-balance"] .balance-summary-card > small {
    font-size: 0.63rem;
    line-height: 1.35;
  }

  body[data-page="daily-balance"] .daily-balance-page .panel {
    padding: 0.9rem;
    border-radius: 15px;
  }

  body[data-page="daily-balance"] .daily-balance-panel-header {
    gap: 0.9rem;
  }

  body[data-page="daily-balance"] .daily-balance-add-account {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  body[data-page="daily-balance"] .daily-balance-add-account .field {
    min-width: 0;
  }

  body[data-page="daily-balance"] .daily-balance-page .btn {
    min-height: 2.6rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.79rem;
  }

  body[data-page="daily-balance"] .daily-balance-panel-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 0.8rem;
  }

  body[data-page="daily-balance"] .daily-balance-save {
    width: 100% !important;
    min-width: 0;
    min-height: 2.9rem !important;
  }

  body[data-page="daily-balance"] #dailyBalanceTransactionForm {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  body[data-page="daily-balance"] #dailyBalanceTransactionForm .form-actions {
    grid-column: auto;
  }

  body[data-page="daily-balance"] #dailyBalanceTransactionForm .form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 380px) {
  body[data-page="daily-balance"] .daily-balance-page {
    padding: 0.6rem;
  }

  body[data-page="daily-balance"] .daily-balance-summary {
    grid-template-columns: 1fr;
  }

  body[data-page="daily-balance"] .balance-summary-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  body[data-page="daily-balance"] .balance-summary-card > small {
    grid-column: 2;
  }

  body[data-page="daily-balance"] .daily-balance-account-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body[data-page="daily-balance"] .daily-report-page {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  gap: 1rem;
  background: #f3f6fa;
}

body[data-page="daily-balance"] .daily-report-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(120deg, #073451, #0c6274);
  box-shadow: 0 14px 34px rgba(7, 52, 81, 0.14);
}

body[data-page="daily-balance"] .daily-report-header h1 {
  margin: 0.2rem 0 0;
  color: #fff;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
}

body[data-page="daily-balance"] .daily-report-header p {
  margin: 0.4rem 0 0;
  color: rgba(255, 255, 255, 0.76);
}

body[data-page="daily-balance"] .daily-report-eyebrow {
  color: #a9e5dc;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

body[data-page="daily-balance"] .daily-report-date {
  width: min(100%, 13rem);
  flex: 0 0 auto;
  gap: 0.35rem;
  color: #fff;
  font-size: 0.8rem;
}

body[data-page="daily-balance"] .daily-report-date input {
  min-height: 2.8rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  color: #18364b;
  background: #fff;
}

body[data-page="daily-balance"] .daily-report-message:empty {
  display: none;
}

body[data-page="daily-balance"] .daily-report-message {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  color: #176044;
  background: #e9f7ef;
}

body[data-page="daily-balance"] .daily-report-message.message-error {
  color: #9f2d27;
  background: #fff0ed;
}

body[data-page="daily-balance"] .daily-report-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(19rem, 0.8fr);
  align-items: start;
  gap: 1rem;
}

body[data-page="daily-balance"] .daily-report-form {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
}

body[data-page="daily-balance"] .daily-report-section {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  padding: 1rem 1.1rem !important;
  border: 1px solid #e5edf0 !important;
  border-radius: 15px !important;
  box-shadow: 0 5px 18px rgba(15, 40, 65, 0.035) !important;
}

body[data-page="daily-balance"] .daily-report-section-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

body[data-page="daily-balance"] .daily-report-section-heading h2,
body[data-page="daily-balance"] .daily-report-preview-title h2 {
  margin: 0;
  color: #18364b;
  font-size: 1rem;
}

body[data-page="daily-balance"] .daily-report-section-heading p {
  margin: 0.15rem 0 0;
  color: #748393;
  font-size: 0.76rem;
}

body[data-page="daily-balance"] .daily-report-number {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: #08706f;
  background: #e4f6f2;
  font-size: 0.7rem;
  font-weight: 800;
}

body[data-page="daily-balance"] .daily-report-rows-head,
body[data-page="daily-balance"] .daily-report-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) minmax(7rem, 0.9fr) minmax(7rem, 0.9fr) 2rem;
  align-items: center;
  gap: 0.55rem;
}

body[data-page="daily-balance"] .daily-report-rows-head {
  padding: 0 0.15rem;
  color: #788896;
  font-size: 0.68rem;
  font-weight: 700;
}

body[data-page="daily-balance"] .daily-report-rows {
  display: grid;
  gap: 0.45rem;
}

body[data-page="daily-balance"] .daily-report-row {
  min-width: 0;
}

body[data-page="daily-balance"] .daily-report-row .field,
body[data-page="daily-balance"] .daily-report-expense-field {
  min-width: 0;
  gap: 0;
  color: #647686;
}

body[data-page="daily-balance"] .daily-report-row input,
body[data-page="daily-balance"] .daily-report-expense-field input {
  width: 100%;
  min-width: 0;
  min-height: 2.55rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #dce5e9;
  border-radius: 9px;
  color: #173a4c;
  background: #fbfcfd;
  font-size: 0.85rem;
}

body[data-page="daily-balance"] .daily-report-row input:focus,
body[data-page="daily-balance"] .daily-report-expense-field input:focus {
  border-color: #12847c;
  outline: 3px solid rgba(18, 132, 124, 0.13);
}

body[data-page="daily-balance"] .daily-report-mobile-label {
  display: none;
}

body[data-page="daily-balance"] .daily-report-row-spacer {
  display: block;
}

body[data-page="daily-balance"] .daily-report-remove {
  display: grid;
  width: 2rem;
  height: 2.3rem;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #8a98a6;
  background: #f4f6f8;
  font-size: 1.2rem;
  cursor: pointer;
}

body[data-page="daily-balance"] .daily-report-remove:hover {
  color: #aa3c35;
  background: #fff0ed;
}

body[data-page="daily-balance"] .daily-report-add {
  justify-self: start;
  padding: 0.35rem 0.1rem;
  border: 0;
  color: #08766e;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

body[data-page="daily-balance"] .daily-report-expense-field {
  width: min(100%, 18rem);
  gap: 0.35rem;
  font-size: 0.78rem;
}

body[data-page="daily-balance"] .daily-report-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

body[data-page="daily-balance"] .daily-report-form-actions .btn {
  width: auto;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.84rem;
  box-shadow: none;
}

body[data-page="daily-balance"] .daily-report-form-actions .btn-primary {
  background: linear-gradient(135deg, #08766e, #0b625f);
}

body[data-page="daily-balance"] .daily-report-form-actions .btn-secondary {
  border: 1px solid #dce5eb;
  color: #315064;
  background: #fff;
}

body[data-page="daily-balance"] .daily-report-preview-wrap {
  position: sticky;
  top: 6rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid #e2eaf0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 40, 65, 0.05);
}

body[data-page="daily-balance"] .daily-report-preview-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

body[data-page="daily-balance"] .daily-report-preview-title > div > span {
  color: #168377;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

body[data-page="daily-balance"] .daily-report-preview-title h2 {
  margin-top: 0.12rem;
}

body[data-page="daily-balance"] .daily-report-live-dot {
  color: #198267;
  font-size: 0.7rem;
  font-weight: 700;
}

body[data-page="daily-balance"] .daily-report-preview {
  padding: 1rem;
  border: 1px solid #f0ece7;
  border-radius: 11px;
  color: #1b1b1b;
  background-color: #fffdfa;
  background-image: radial-gradient(#eadfce 0.55px, transparent 0.55px);
  background-size: 9px 9px;
  font-family: Arial, sans-serif;
  font-size: 0.86rem;
  line-height: 1.42;
}

body[data-page="daily-balance"] .daily-report-preview-date {
  margin-bottom: 0.95rem;
  color: #18364b;
  font-weight: 700;
}

body[data-page="daily-balance"] .daily-report-output-section {
  margin-top: 1rem;
}

body[data-page="daily-balance"] .daily-report-output-section:first-of-type {
  margin-top: 0;
}

body[data-page="daily-balance"] .daily-report-output-section h3 {
  margin: 0 0 0.3rem;
  color: #18364b;
  font-size: 0.84rem;
}

body[data-page="daily-balance"] .daily-report-output-line,
body[data-page="daily-balance"] .daily-report-output-total {
  margin: 0.13rem 0;
  overflow-wrap: anywhere;
}

body[data-page="daily-balance"] .daily-report-output-total {
  font-weight: 700;
}

@media (max-width: 1050px) {
  body[data-page="daily-balance"] .daily-report-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="daily-balance"] .daily-report-preview-wrap {
    position: static;
  }
}

@media (max-width: 600px) {
  body[data-page="daily-balance"] .daily-report-page {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  body[data-page="daily-balance"] .daily-report-header {
    align-items: stretch;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.1rem;
    border-radius: 15px;
  }

  body[data-page="daily-balance"] .daily-report-header p {
    max-width: 25rem;
    font-size: 0.82rem;
  }

  body[data-page="daily-balance"] .daily-report-date {
    width: 100%;
  }

  body[data-page="daily-balance"] .daily-report-section {
    gap: 0.6rem;
    padding: 0.85rem !important;
  }

  body[data-page="daily-balance"] .daily-report-rows-head {
    display: none;
  }

  body[data-page="daily-balance"] .daily-report-row {
    grid-template-columns: minmax(0, 1fr) 2rem;
    gap: 0.4rem 0.5rem;
    padding: 0.65rem;
    border: 1px solid #edf1f3;
    border-radius: 10px;
    background: #fcfdfd;
  }

  body[data-page="daily-balance"] .daily-report-row .field:first-child {
    grid-column: 1;
  }

  body[data-page="daily-balance"] .daily-report-row .field:nth-child(2),
  body[data-page="daily-balance"] .daily-report-row .field:nth-child(3) {
    grid-column: 1;
  }

  body[data-page="daily-balance"] .daily-report-row .field:nth-child(2) {
    grid-row: 2;
  }

  body[data-page="daily-balance"] .daily-report-row .field:nth-child(3) {
    grid-row: 3;
  }

  body[data-page="daily-balance"] .daily-report-row .daily-report-remove {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }

  body[data-page="daily-balance"] .daily-report-mobile-label {
    display: block;
    margin-bottom: 0.22rem;
    color: #71808c;
    font-size: 0.68rem;
  }

  body[data-page="daily-balance"] .daily-report-row input {
    min-height: 2.7rem;
  }

  body[data-page="daily-balance"] .daily-report-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  body[data-page="daily-balance"] .daily-report-form-actions .btn-primary {
    grid-column: 1 / -1;
  }

  body[data-page="daily-balance"] .daily-report-form-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.6rem;
    font-size: 0.78rem;
  }

  body[data-page="daily-balance"] .daily-report-preview-wrap {
    padding: 0.85rem;
  }

  body[data-page="daily-balance"] .daily-report-preview {
    padding: 0.85rem;
    font-size: 0.82rem;
  }
}

.daily-report-print-root {
  display: none;
}

body[data-page="audit-logs"] .audit-logs-page {
  gap: 1.25rem;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

body[data-page="audit-logs"] .audit-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

body[data-page="audit-logs"] .audit-eyebrow {
  color: #5265c8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

body[data-page="audit-logs"] .audit-page-heading h1 {
  margin: 0.3rem 0;
  color: #17233f;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
}

body[data-page="audit-logs"] .audit-page-heading p {
  margin: 0;
  color: var(--muted);
}

body[data-page="audit-logs"] .audit-export-button,
body[data-page="audit-logs"] .audit-apply-button {
  color: #fff;
  background: #334ab7;
  box-shadow: none;
}

body[data-page="audit-logs"] .audit-export-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

body[data-page="audit-logs"] .audit-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

body[data-page="audit-logs"] .audit-summary-card {
  display: grid;
  gap: 0.3rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid #e5eaf5;
  border-left: 4px solid #5265c8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 48, 95, 0.05);
}

body[data-page="audit-logs"] .audit-summary-card > span {
  color: #596780;
  font-size: 0.88rem;
  font-weight: 650;
}

body[data-page="audit-logs"] .audit-summary-card strong {
  color: #17233f;
  font-size: 1.8rem;
  line-height: 1.15;
}

body[data-page="audit-logs"] .audit-summary-card small {
  color: #77839a;
}

body[data-page="audit-logs"] .audit-summary-card--success {
  border-left-color: #25805a;
}

body[data-page="audit-logs"] .audit-summary-card--failed {
  border-left-color: #c14949;
}

body[data-page="audit-logs"] .audit-filter-panel,
body[data-page="audit-logs"] .audit-results-panel {
  padding: 1.35rem;
  border: 1px solid #e6ebf5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 48, 95, 0.05);
}

body[data-page="audit-logs"] .audit-filter-panel .panel-header,
body[data-page="audit-logs"] .audit-results-panel .panel-header {
  align-items: center;
  margin-bottom: 1rem;
}

body[data-page="audit-logs"] .audit-filter-panel h2,
body[data-page="audit-logs"] .audit-results-panel h2 {
  margin: 0;
  color: #1d2a45;
  font-size: 1.1rem;
}

body[data-page="audit-logs"] .audit-filter-grid {
  display: grid;
  grid-template-columns: minmax(210px, 1.5fr) repeat(2, minmax(150px, 1fr)) minmax(135px, 0.8fr) auto;
  align-items: end;
  gap: 0.9rem;
}

body[data-page="audit-logs"] .audit-filter-field {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

body[data-page="audit-logs"] .audit-filter-field label {
  color: #526078;
  font-size: 0.82rem;
  font-weight: 700;
}

body[data-page="audit-logs"] .audit-filter-field input,
body[data-page="audit-logs"] .audit-filter-field select {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d7deeb;
  border-radius: 9px;
  background: #fff;
  color: #17233f;
  font: inherit;
}

body[data-page="audit-logs"] .audit-filter-field input:focus,
body[data-page="audit-logs"] .audit-filter-field select:focus {
  border-color: #5265c8;
  outline: 3px solid rgba(82, 101, 200, 0.14);
}

body[data-page="audit-logs"] .audit-filter-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

body[data-page="audit-logs"] .audit-filter-actions .filter-btn {
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border-radius: 9px;
  white-space: nowrap;
}

body[data-page="audit-logs"] .audit-clear-button {
  min-height: 44px;
  padding: 0.65rem 0.8rem;
  border: 1px solid #d7deeb;
  border-radius: 9px;
  background: #fff;
  color: #526078;
  cursor: pointer;
  font: inherit;
}

body[data-page="audit-logs"] .audit-clear-button:hover {
  background: #f5f7fb;
}

body[data-page="audit-logs"] .audit-results-header {
  flex-direction: row;
}

body[data-page="audit-logs"] .audit-results-count {
  flex: 0 0 auto;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: #f0f3ff;
  color: #334ab7;
  font-size: 0.82rem;
  font-weight: 700;
}

body[data-page="audit-logs"] .audit-location-note {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e2e8f5;
  border-radius: 10px;
  background: #f8faff;
  color: #586780;
  font-size: 0.84rem;
}

body[data-page="audit-logs"] .audit-location-note p {
  margin: 0;
}

body[data-page="audit-logs"] .audit-location-mark {
  display: grid;
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e4eaff;
  color: #334ab7;
  font-size: 0.75rem;
  font-weight: 800;
}

body[data-page="audit-logs"] .audit-table-shell {
  border: 1px solid #e9edf5;
  border-radius: 10px;
}

body[data-page="audit-logs"] .audit-table {
  min-width: 680px;
}

body[data-page="audit-logs"] .audit-table thead {
  background: #f6f8fc;
}

body[data-page="audit-logs"] .audit-table th {
  padding: 0.85rem 1rem;
  color: #65718a;
  font-size: 0.75rem;
  white-space: nowrap;
}

body[data-page="audit-logs"] .audit-table td {
  padding: 0.9rem 1rem;
  color: #35415a;
  vertical-align: middle;
}

body[data-page="audit-logs"] .audit-table tbody tr:hover {
  background: #f9faff;
}

body[data-page="audit-logs"] .audit-username {
  color: #1d2a45;
}

body[data-page="audit-logs"] .audit-event-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

body[data-page="audit-logs"] .audit-event-badge--success {
  background: #e7f5ed;
  color: #1d704a;
}

body[data-page="audit-logs"] .audit-event-badge--failed {
  background: #fff0ef;
  color: #a33434;
}

body[data-page="audit-logs"] .audit-event-badge--neutral {
  background: #edf1f7;
  color: #56647a;
}

body[data-page="audit-logs"] .audit-ip-address {
  padding: 0.25rem 0.4rem;
  border-radius: 5px;
  background: #f2f4f8;
  color: #2c3a55;
  font-size: 0.84rem;
}

body[data-page="audit-logs"] .audit-location-unavailable {
  color: #8791a3;
  font-size: 0.85rem;
}

@media (max-width: 1080px) {
  body[data-page="audit-logs"] .audit-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-page="audit-logs"] .audit-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  body[data-page="audit-logs"] .audit-summary-grid {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  body[data-page="audit-logs"] .audit-summary-card {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.15rem 0.75rem;
    padding: 0.85rem 1rem;
  }

  body[data-page="audit-logs"] .audit-summary-card > span,
  body[data-page="audit-logs"] .audit-summary-card small {
    grid-column: 1;
  }

  body[data-page="audit-logs"] .audit-summary-card strong {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  body[data-page="audit-logs"] .audit-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  body[data-page="audit-logs"] .audit-filter-user,
  body[data-page="audit-logs"] .audit-filter-actions {
    grid-column: 1 / -1;
  }

  body[data-page="audit-logs"] .audit-filter-actions > * {
    flex: 1;
  }

  body[data-page="audit-logs"] .audit-results-header {
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  body[data-page="audit-logs"] .audit-filter-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="audit-logs"] .audit-filter-user,
  body[data-page="audit-logs"] .audit-filter-actions {
    grid-column: auto;
  }

  body[data-page="audit-logs"] .audit-results-header {
    flex-direction: column;
  }

  body[data-page="audit-logs"] .audit-filter-panel,
  body[data-page="audit-logs"] .audit-results-panel {
    padding: 1rem;
  }
}

@media print {
  @page {
    margin: 12mm;
  }

  body[data-page="daily-balance"].daily-report-printing {
    min-height: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }

  body[data-page="daily-balance"].daily-report-printing > .dashboard-shell {
    display: none !important;
  }

  body[data-page="daily-balance"] #dailyBalancePrintRoot {
    display: block !important;
    width: 100%;
    color: #111;
    visibility: visible !important;
  }

  body[data-page="daily-balance"] #dailyBalancePrintRoot * {
    color: #111 !important;
    visibility: visible !important;
  }

  body[data-page="daily-balance"] #dailyBalancePrintRoot .daily-report-preview {
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff !important;
    background-image: none !important;
    box-shadow: none;
    font-size: 12pt;
  }

  body[data-page="daily-balance"] #dailyBalancePrintRoot .daily-report-preview-date {
    margin-bottom: 1.2rem;
  }

  body[data-page="daily-balance"] #dailyBalancePrintRoot .daily-report-output-section {
    break-inside: avoid;
    margin-top: 1.15rem;
  }

  body[data-page="daily-balance"] * {
    visibility: hidden !important;
  }

  body[data-page="daily-balance"] .daily-report-preview-wrap,
  body[data-page="daily-balance"] .daily-report-preview-wrap * {
    visibility: visible !important;
  }

  body[data-page="daily-balance"] .daily-report-preview-wrap {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  body[data-page="daily-balance"] .daily-report-preview-title {
    display: none;
  }

  body[data-page="daily-balance"] .daily-report-preview {
    width: 100%;
    border: 0;
    background: #fff;
    font-size: 12pt;
  }
}
