﻿:root {
  --ink: #1c2f2a;
  --accent: #6edc87;
  --accent-dark: #36b363;
  --bg: #effaf2;
  --surface: #ffffff;
  --mint: #d9f5e2;
  --mint-strong: #bff0cf;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Outfit", sans-serif;
  background: radial-gradient(circle at top, #ffffff 0%, #effaf2 60%, #e3f4e9 100%);
  color: var(--ink);
  margin: 0;
  overflow-x: hidden;
}

html,
body {
  width: 100%;
  max-width: 100%;
}

.hero {
  background: linear-gradient(120deg, #1f6f4a, #2b8a5a 55%, #1b5f3f 100%);
  color: #fff;
  position: relative;
  overflow: visible;
  z-index: 1040;
}

.hero h1 {
  font-size: clamp(1.7rem, 5vw, 3rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
}

.hero p {
  overflow-wrap: anywhere;
}

.hero .text-muted {
  color: #d7f2df !important;
}

.menu-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.menu-scroll::-webkit-scrollbar {
  height: 6px;
}

.menu-scroll::-webkit-scrollbar-thumb {
  background: #c4e8cf;
  border-radius: 999px;
}

.menu-items {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

.menu-items::-webkit-scrollbar {
  height: 6px;
}

.menu-items::-webkit-scrollbar-thumb {
  background: #bfe6cb;
  border-radius: 999px;
}

.menu-navbar .tag-btn,
.menu-horizontal .tag-btn {
  background: #ffffff;
}

.menu-navbar .tag-btn.active,
.menu-horizontal .tag-btn.active {
  background: #9fe5b7;
  border-color: #6edc87;
}

.navbar-brand {
  color: #1f6f4a;
}

.navbar .nav-link {
  color: #1f6f4a;
  font-weight: 600;
}

.navbar .dropdown-menu {
  border-radius: 12px;
  border-color: #d6efe0;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  z-index: 2000;
}

.dropdown-menu {
  margin-top: 8px;
}

.dropdown-menu.show {
  position: absolute;
  inset: 100% auto auto 0;
}

@media (max-width: 991.98px) {
  .dropdown-menu.show {
    position: static;
  }
}

.dropdown {
  position: relative;
}

.menu-navbar {
  flex-wrap: wrap;
  max-width: 420px;
}

.banner-carousel {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.1);
}

.banner-carousel img {
  height: 320px;
  object-fit: cover;
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  .hero .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .banner-carousel img {
    height: 200px;
  }

  .floating-cart {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }
}

.floating-cart {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1055;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  color: #1f6f4a;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  font-weight: 700;
}

.floating-cart .cart-icon {
  font-size: 1.1rem;
}

.floating-cart .cart-badge {
  margin-left: 2px;
}

.floating-cart.is-compact {
  width: 56px;
  height: 56px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

.floating-cart.is-compact .cart-label {
  display: none;
}

.floating-cart.is-compact .cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
}

.tag-btn {
  border-radius: 999px;
  padding: 4px 14px;
  border: 1px solid #bfe6cb;
  background: var(--surface);
  font-size: 0.9rem;
}

.tag-btn.active {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: #0d2a1c;
  font-weight: 600;
}

.product-card {
  border: 1px solid #d6efe0;
  border-radius: 16px;
  background: var(--surface);
  padding: 0;
  height: 100%;
  box-shadow: 0 10px 20px rgba(19, 66, 45, 0.08);
}

.product-image-wrap {
  width: 100%;
  height: 220px;
  border-radius: 16px 16px 0 0;
  background: #f6fff8;
  border-bottom: 1px solid #d6efe0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.product-no-image {
  color: #5f7f71;
}

.product-image-upload-btn {
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 2px 10px;
}

.product-image-admin-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

.product-image-remove-btn {
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 2px 10px;
}

.product-body {
  padding: 16px;
}

.product-title {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.product-meta {
  font-size: 0.85rem;
  color: #5f7f71;
}

.price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #11452d;
}

.badge-stock {
  background: #e1f6e7;
  color: #1f6f4a;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
}

.badge-stock.low {
  background: #f0f8dc;
  color: #6b7d2a;
}

.badge-stock.out {
  background: #ffeaea;
  color: #c62828;
}

.cart-item {
  border: 1px solid #d6efe0;
  border-radius: 12px;
  padding: 12px;
  background: var(--surface);
}

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

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6efe0;
  border-radius: 999px;
  padding: 4px;
  background: #fff;
  gap: 6px;
}

.qty-control .qty-input {
  width: 54px;
  border: none;
  text-align: center;
  font-weight: 600;
}

.qty-control .qty-input:focus {
  outline: none;
  box-shadow: none;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: #e7f7ec;
  color: #1f6f4a;
  font-weight: 700;
}

.btn-add {
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: 600;
}

.qty-input {
  width: 70px;
}

.btn-primary {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-primary:hover,
.btn-primary:focus {
  background: #2f9c57;
  border-color: #2f9c57;
}

.btn-outline-secondary {
  border-color: #9fceae;
  color: #2b5c42;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background: #d9f5e2;
  border-color: #9fceae;
  color: #1c2f2a;
}

.btn-outline-light {
  border-color: #c9f0d6;
  color: #e9fff0;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
  background: #e9fff0;
  color: #1c2f2a;
}

.badge.text-bg-primary {
  background-color: #38b96a !important;
}

.alert-info {
  background: #d9f5e2;
  border-color: #b7e8c8;
  color: #184d33;
}

.alert-warning {
  background: #eef7d6;
  border-color: #dbe9b3;
  color: #4d5c1d;
}
.navbar {
  position: relative;
  z-index: 1030;
}

.profile-dropdown {
  z-index: 2000;
}

.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 28, 21, 0.55);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.custom-modal-card {
  width: 100%;
  max-width: 420px;
  background: #f2fbf5;
  border: 1px solid #b7e8c8;
  border-radius: 14px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
  padding: 16px;
}

.custom-action-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 3100;
  background: #1f6f4a;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  font-size: 0.9rem;
}

.custom-action-toast.error {
  background: #b72f2f;
}

.app-dialog-modal .modal-content {
  border-radius: 14px;
  border: 1px solid #b7e8c8;
  background: #f2fbf5;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
}

.app-dialog-modal .modal-title {
  color: #11452d;
  font-weight: 700;
}

.app-dialog-modal .app-dialog-message {
  color: #1c2f2a;
}

.app-dialog-modal .btn-primary {
  min-width: 86px;
}

#clientSearchResults {
  max-height: 220px;
  overflow: auto;
}

.site-footer {
  background: #0f5f3d;
  color: #e8f7ee;
}

.site-footer h6 {
  color: #ffffff;
  font-weight: 700;
}

.site-footer a {
  color: #d6ffe5;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.pagination .page-link {
  color: #1f6f4a;
  border-color: #bfe6cb;
  background: #ffffff;
}

.pagination .page-link:hover,
.pagination .page-link:focus {
  color: #11452d;
  border-color: #9fd8b4;
  background: #eaf8ef;
  box-shadow: none;
}

.pagination .page-item.active .page-link {
  color: #0d2a1c;
  background: #6edc87;
  border-color: #36b363;
}

.pagination .page-item.disabled .page-link {
  color: #89aa98;
  background: #f3fbf6;
  border-color: #d6efe0;
}

@media (max-width: 768px) {
  .clients-table-responsive {
    overflow: visible;
  }

  .clients-table thead {
    display: none;
  }

  .clients-table,
  .clients-table tbody,
  .clients-table tr,
  .clients-table td {
    display: block;
    width: 100%;
  }

  .clients-table tr {
    border: 1px solid #d6efe0;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #fff;
  }

  .clients-table td {
    border: 0;
    padding: 4px 0;
    line-height: 1.3;
    word-break: break-word;
  }

  .clients-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.76rem;
    color: #5f7f71;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
  }

  .orders-table-responsive {
    overflow: visible;
  }

  .orders-table thead {
    display: none;
  }

  .orders-table,
  .orders-table tbody,
  .orders-table tr,
  .orders-table td {
    display: block;
  }

  .orders-table tr {
    border: 1px solid #d6efe0;
    border-radius: 12px;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: #fff;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
  }

  .orders-table td {
    border: 0;
    padding: 2px 0;
    line-height: 1.25;
    word-break: break-word;
    min-width: 0;
  }

  .orders-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    color: #5f7f71;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1px;
  }

  .orders-table .order-actions-cell {
    grid-column: 1 / -1;
    text-align: left !important;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 4px;
  }

  .orders-table .order-actions-cell::before {
    width: 100%;
  }

  .orders-table .order-actions-cell .btn {
    padding: 4px 10px;
    font-size: 0.95rem;
  }

  .orders-card {
    border-radius: 12px;
  }

  .ts-wrapper.single .ts-control {
    min-height: 44px;
    border-radius: 10px;
  }
}

.search-filter-row .form-control,
.search-filter-row .btn {
  min-height: 44px;
}

.group-filters-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.group-filters-wrap::-webkit-scrollbar {
  height: 6px;
}

.group-filters-wrap::-webkit-scrollbar-thumb {
  background: #bfe6cb;
  border-radius: 999px;
}

.group-filters-wrap .form-check {
  margin-right: 0;
  white-space: nowrap;
}

.product-title,
.product-meta,
.price {
  overflow-wrap: anywhere;
}

.product-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.product-actions .btn-add {
  min-height: 40px;
}

.offcanvas.offcanvas-end {
  width: min(100vw, 430px);
}

.custom-modal-card,
.card {
  max-width: 100%;
}

.users-table td,
.users-table th {
  vertical-align: middle;
}

.users-table .btn {
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .hero .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 768px) {
  .hero .container {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start !important;
  }

  .header-actions > * {
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-actions .btn,
  .header-actions .dropdown {
    min-height: 42px;
  }

  .header-actions .dropdown .btn {
    width: 100%;
  }

  .search-filter-row {
    flex-direction: column;
    align-items: stretch !important;
  }

  .search-filter-row .btn {
    width: 100%;
  }

  .banner-carousel {
    border-radius: 14px;
  }

  .banner-carousel img {
    height: 170px;
  }

  .product-image-wrap {
    height: 180px;
  }

  .product-body {
    padding: 12px;
  }

  .price {
    font-size: 1.05rem;
  }

  .qty-control {
    width: 100%;
    justify-content: center;
  }

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

  .floating-cart {
    right: 10px;
    left: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 20px);
    padding: 10px 14px;
  }

  .floating-cart.is-compact {
    width: 52px;
    height: 52px;
  }

  .custom-modal-backdrop {
    padding: 10px;
  }

  .custom-modal-card {
    padding: 12px;
  }

  #clientsCard,
  #ordersCard,
  #templatesCard,
  #importForm,
  #clientsImportForm,
  #profileCard,
  #commonActions,
  #adminActions,
  #userForm,
  #lista,
  #bannerPanel {
    padding: 12px !important;
  }

  .orders-table tr {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .orders-table .order-actions-cell {
    gap: 6px;
    padding-top: 2px;
  }

  .orders-table .order-actions-cell .btn {
    font-size: 0.9rem;
    padding: 4px 8px;
  }

  .users-table-responsive {
    overflow: visible;
  }

  .users-table thead {
    display: none;
  }

  .users-table,
  .users-table tbody,
  .users-table tr,
  .users-table td {
    display: block;
    width: 100%;
  }

  .users-table tr {
    border: 1px solid #d6efe0;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
  }

  .users-table td {
    border: 0;
    padding: 4px 0;
  }

  .users-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    color: #5f7f71;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
  }

  .users-table .actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .users-table .actions-cell::before {
    width: 100%;
  }
}
