/* JD Lanches & Alimentos - Cozy Kitchen Style */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --cozy-terracotta: #B84A39;
  --cozy-terracotta-hover: #9E3728;
  --cozy-honey: #D97D24;
  --cozy-honey-hover: #BF6715;
  --cozy-cream: #FAF6F0;
  --cozy-card: #FFFFFF;
  --cozy-dark: #2E1B15;
  --cozy-muted: #7E6E65;
  --cozy-border: #EAE3D8;
  --cozy-green: #4A7C59;
  --cozy-green-light: #EBF5EE;
  --cozy-shadow: 0 10px 30px rgba(46, 27, 21, 0.05);
  --cozy-shadow-hover: 0 15px 35px rgba(46, 27, 21, 0.1);
  --font-main: 'Outfit', sans-serif;
  --border-radius: 18px;
  --border-radius-sm: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--cozy-cream);
  color: var(--cozy-dark);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh; /* Adapta-se a navegadores com barras dinâmicas */
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* Evita rolagem horizontal indesejada */
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--cozy-cream);
}
::-webkit-scrollbar-thumb {
  background: var(--cozy-border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cozy-muted);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Layout Utilities */
@keyframes viewFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.view {
  display: none;
  flex: 1;
  flex-direction: column;
  animation: viewFadeIn 0.3s ease-out forwards;
}

.view.active {
  display: flex;
}

/* Header */
.cozy-header {
  background: linear-gradient(135deg, var(--cozy-dark) 0%, #1c0f0c 100%);
  color: #fff;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 4px solid var(--cozy-honey);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--cozy-honey);
  object-fit: cover;
}

.brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, var(--cozy-honey));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-status-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-role-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background-color: var(--cozy-honey);
  color: var(--cozy-dark);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
}

/* Buttons */
.btn {
  font-family: var(--font-main);
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--cozy-terracotta);
  color: white;
}

.btn-primary:hover {
  background-color: var(--cozy-terracotta-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(184, 74, 57, 0.2);
}

.btn-secondary {
  background-color: transparent;
  color: var(--cozy-dark);
  border: 2px solid var(--cozy-border);
}

.btn-secondary:hover {
  background-color: var(--cozy-border);
  color: var(--cozy-dark);
}

.btn-accent {
  background-color: var(--cozy-honey);
  color: var(--cozy-dark);
}

.btn-accent:hover {
  background-color: var(--cozy-honey-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 125, 36, 0.2);
}

.btn-danger {
  background-color: #e63946;
  color: white;
}

.btn-danger:hover {
  background-color: #c72c3b;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* Authentication View */
.auth-container {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--cozy-cream);
}

.auth-banner-side {
  flex: 1.2;
  background: linear-gradient(rgba(46, 27, 21, 0.6), rgba(46, 27, 21, 0.85)), url('logo.jpg') no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4rem;
  color: white;
}

.auth-banner-text h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.auth-banner-text p {
  font-size: 1.2rem;
  color: #f7ede2;
  font-weight: 300;
  max-width: 500px;
}

.auth-form-side {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  background-color: var(--cozy-card);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.03);
}

.auth-form-card {
  width: 100%;
  max-width: 420px;
  animation: fadeIn 0.5s ease-out;
}

.auth-logo-mobile {
  display: none;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin-bottom: 1.5rem;
}

.auth-header-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--cozy-dark);
  margin-bottom: 0.5rem;
}

.auth-header-sub {
  color: var(--cozy-muted);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
  width: 100%;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: var(--cozy-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-main);
  border: 2px solid var(--cozy-border);
  border-radius: var(--border-radius-sm);
  background-color: var(--cozy-cream);
  color: var(--cozy-dark);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--cozy-honey);
  background-color: white;
  box-shadow: 0 0 0 4px rgba(217, 125, 36, 0.15);
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper .form-control {
  padding-right: 2.75rem;
}

.btn-toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.25rem;
  color: var(--cozy-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-toggle-password:hover {
  color: var(--cozy-terracotta);
}

.btn-toggle-password svg {
  width: 20px;
  height: 20px;
}


.auth-switch-text {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--cozy-muted);
}

.auth-switch-text span {
  color: var(--cozy-terracotta);
  font-weight: 700;
  cursor: pointer;
}

.auth-switch-text span:hover {
  text-decoration: underline;
}

.alert {
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}

.alert-danger {
  background-color: #fde8e8;
  color: #c81e1e;
  border: 1px solid #f8b4b4;
}

.alert-success {
  background-color: var(--cozy-green-light);
  color: var(--cozy-green);
  border: 1px solid #c2e7d0;
}

.alert-info {
  background-color: #e1f5fe;
  color: #0288d1;
  border: 1px solid #b3e5fc;
}

/* Client Dashboard layout */
.client-container {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
}

.menu-section {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  height: calc(100vh - 84px);
}

.menu-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  background-color: var(--cozy-card);
  padding: 1.25rem 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--cozy-shadow);
  border: 1px solid var(--cozy-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.date-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.date-selector-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cozy-muted);
}

.date-select-input {
  font-family: var(--font-main);
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--cozy-honey);
  border-radius: 30px;
  background-color: white;
  color: var(--cozy-dark);
  cursor: pointer;
  outline: none;
}

.date-select-input:focus {
  box-shadow: 0 0 0 3px rgba(217, 125, 36, 0.2);
}

.catalog-closed-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #fcd34d;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 600;
}

/* Product Cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background-color: var(--cozy-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--cozy-border);
  box-shadow: var(--cozy-shadow);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--cozy-shadow-hover);
}

.product-image-container {
  height: 180px;
  position: relative;
  background-color: #f5efe6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.product-cat-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cozy-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.product-stock-tag {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background-color: var(--cozy-dark);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-stock-tag.out-of-stock {
  background-color: #e63946;
}

.product-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cozy-dark);
  margin-bottom: 0.4rem;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--cozy-muted);
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--cozy-terracotta);
}

/* Floating Cart (Sidebar right) */
.cart-sidebar {
  width: 380px;
  background-color: var(--cozy-card);
  border-left: 1px solid var(--cozy-border);
  box-shadow: -5px 0 25px rgba(46, 27, 21, 0.05);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 84px);
  position: relative;
  z-index: 10;
}

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--cozy-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--cozy-cream);
}

.cart-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-count {
  background-color: var(--cozy-terracotta);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--cozy-cream);
  padding: 0.85rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--cozy-border);
  animation: fadeIn 0.2s ease-out;
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.cart-item-price {
  color: var(--cozy-terracotta);
  font-weight: 600;
  font-size: 0.85rem;
}

.cart-item-qty-control {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cart-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--cozy-border);
  background-color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.cart-qty-btn:hover {
  background-color: var(--cozy-honey);
  border-color: var(--cozy-honey);
}

.cart-item-qty {
  font-weight: 700;
  font-size: 0.9rem;
}

.cart-remove-btn {
  background: none;
  border: none;
  color: #e63946;
  cursor: pointer;
  margin-left: 0.5rem;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--cozy-muted);
  gap: 1rem;
}

.cart-empty-icon {
  font-size: 3rem;
  opacity: 0.3;
}

.cart-summary {
  padding: 1.5rem;
  border-top: 1px solid var(--cozy-border);
  background-color: var(--cozy-cream);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.summary-row.total {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--cozy-dark);
  border-top: 2px dashed var(--cozy-border);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

.payment-options-box {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.payment-options-box label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cozy-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.payment-select {
  width: 100%;
  padding: 0.65rem;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--cozy-border);
  font-family: var(--font-main);
  font-weight: 600;
  margin-bottom: 0.5rem;
  outline: none;
}

.fifth-day-notice {
  font-size: 0.8rem;
  color: #92400e;
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  display: none;
}

.fifth-day-notice.visible {
  display: block;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 27, 21, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: var(--cozy-card);
  padding: 2rem;
  border-radius: var(--border-radius);
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  animation: fadeIn 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 3px solid var(--cozy-honey);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cozy-dark);
}

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

/* Pix Modal Specific */
.pix-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.pix-qr-wrapper {
  background: white;
  padding: 1rem;
  border: 1px solid var(--cozy-border);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--cozy-shadow);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 200px;
  height: 200px;
}

.pix-qr-img {
  width: 180px;
  height: 180px;
}

.pix-instructions {
  font-size: 0.9rem;
  color: var(--cozy-muted);
  line-height: 1.4;
}

.pix-code-box {
  width: 100%;
  background-color: var(--cozy-cream);
  padding: 0.85rem;
  border-radius: var(--border-radius-sm);
  border: 1px dashed var(--cozy-honey);
  font-family: monospace;
  font-size: 0.8rem;
  word-break: break-all;
  user-select: all;
  max-height: 80px;
  overflow-y: auto;
}

/* Admin Dashboard layout */
.admin-container {
  display: flex;
  flex: 1;
  height: calc(100vh - 84px);
  overflow: hidden;
}

.admin-sidebar {
  width: 240px;
  background-color: var(--cozy-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  border-right: 4px solid var(--cozy-honey);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  flex: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.5rem;
  color: #e6ded9;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  border-left: 4px solid transparent;
}

.admin-nav-item:hover, .admin-nav-item.active {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-left-color: var(--cozy-honey);
}

.admin-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  background-color: var(--cozy-cream);
}

.admin-pane {
  display: none;
  animation: fadeIn 0.3s ease-out forwards;
}

.admin-pane.active {
  display: block;
}

.admin-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--cozy-border);
  padding-bottom: 1rem;
}

.admin-pane-title {
  font-size: 1.75rem;
  font-weight: 800;
}

/* Order Board (Admin Monitor) */
.order-monitor-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  height: calc(100vh - 240px);
  overflow-y: auto;
  align-items: start;
}

.order-column {
  background-color: rgba(234, 227, 216, 0.4);
  border-radius: var(--border-radius);
  border: 1px solid var(--cozy-border);
  padding: 1rem;
  min-height: 400px;
  max-height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.order-column-header {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--cozy-dark);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--cozy-border);
  padding-bottom: 0.5rem;
}

.order-column-badge {
  background-color: var(--cozy-dark);
  color: white;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-weight: 700;
}

.order-ticket {
  background-color: var(--cozy-card);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--cozy-border);
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
  border-left: 5px solid var(--cozy-honey);
  animation: fadeIn 0.2s ease-out;
}

.order-ticket.pending { border-left-color: var(--cozy-honey); }
.order-ticket.preparing { border-left-color: var(--cozy-terracotta); }
.order-ticket.ready { border-left-color: var(--cozy-green); }
.order-ticket.delivered { border-left-color: var(--cozy-muted); }

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--cozy-border);
  padding-bottom: 0.4rem;
}

.ticket-id {
  font-weight: 800;
  font-size: 0.9rem;
}

.ticket-date {
  font-size: 0.75rem;
  color: var(--cozy-muted);
}

.ticket-customer {
  font-weight: 700;
  font-size: 0.95rem;
}

.ticket-items {
  font-size: 0.85rem;
  color: var(--cozy-dark);
  padding-left: 1rem;
}

.ticket-notes {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--cozy-muted);
  background-color: var(--cozy-cream);
  padding: 0.4rem;
  border-radius: 4px;
}

.ticket-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--cozy-border);
  padding-top: 0.5rem;
  margin-top: 0.25rem;
}

.ticket-total {
  font-weight: 800;
  color: var(--cozy-terracotta);
}

.ticket-pm {
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--cozy-border);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.ticket-pm.pix { background-color: #e1f5fe; color: #0288d1; }
.ticket-pm.fifth { background-color: #fffbeb; color: #92400e; }

.ticket-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

/* POS Cashier (Caixa/PDV) Layout */
.pos-container {
  display: flex;
  gap: 1.5rem;
  height: calc(100vh - 200px);
}

.pos-products {
  flex: 1.3;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pos-search-bar {
  display: flex;
  gap: 1rem;
}

.pos-products-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  padding-right: 0.5rem;
}

.pos-product-card {
  background-color: var(--cozy-card);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--cozy-border);
  padding: 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 150px;
  box-shadow: var(--cozy-shadow);
  transition: all 0.2s ease;
}

.pos-product-card:hover {
  transform: translateY(-2px);
  border-color: var(--cozy-honey);
  box-shadow: var(--cozy-shadow-hover);
}

.pos-product-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.pos-product-price {
  font-weight: 800;
  color: var(--cozy-terracotta);
}

.pos-product-stock {
  font-size: 0.75rem;
  color: var(--cozy-muted);
}

.pos-checkout {
  flex: 0.7;
  background-color: var(--cozy-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--cozy-border);
  box-shadow: var(--cozy-shadow);
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.pos-customer-input {
  margin-bottom: 1rem;
}

.pos-cart-list {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--cozy-border);
  padding-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Management Tables (Users, Stock, etc.) */
.cozy-table-wrapper {
  background-color: var(--cozy-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--cozy-border);
  box-shadow: var(--cozy-shadow);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
}

.cozy-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.cozy-table th {
  background-color: var(--cozy-dark);
  color: white;
  padding: 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.cozy-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--cozy-border);
  font-size: 0.95rem;
}

.cozy-table tr:last-child td {
  border-bottom: none;
}

.cozy-table tr:hover td {
  background-color: var(--cozy-cream);
}

/* Stock management */
.stock-mgr-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge.active { background-color: var(--cozy-green-light); color: var(--cozy-green); }
.status-badge.inactive { background-color: #fde8e8; color: #c81e1e; }
.status-badge.pending { background-color: #fef3c7; color: #92400e; }

/* Responsive adjustments */
@media(max-width: 1024px) {
  .client-container {
    flex-direction: column;
  }
  
  /* Lógica de Alternância Menu vs Carrinho em telas menores (Tab Dedicated) */
  #client-pane-menu:not(.show-cart) .menu-section {
    display: block !important;
    width: 100% !important;
    height: calc(100vh - 128px) !important;
    height: calc(100dvh - 128px) !important;
    overflow-y: auto !important;
  }
  #client-pane-menu:not(.show-cart) .cart-sidebar {
    display: none !important;
  }

  #client-pane-menu.show-cart .menu-section {
    display: none !important;
  }
  #client-pane-menu.show-cart .cart-sidebar {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100vh - 128px) !important;
    height: calc(100dvh - 128px) !important;
    overflow-y: auto !important;
    position: relative !important;
    border-left: none !important;
    border-top: none !important;
    box-shadow: none !important;
    z-index: 10 !important;
    background-color: var(--cozy-card) !important;
  }

  .btn-close-cart {
    display: flex !important;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cozy-dark);
    padding: 4px;
    transition: color 0.2s ease;
  }
  .btn-close-cart:hover {
    color: var(--cozy-terracotta);
  }
  .btn-close-cart i {
    width: 24px;
    height: 24px;
  }

  .order-monitor-container {
    grid-template-columns: repeat(2, 1fr);
    height: auto;
  }
  .pos-container {
    flex-direction: column;
    height: auto;
  }
  .pos-checkout {
    height: 400px;
  }
}

@media(max-width: 768px) {
  .auth-container {
    flex-direction: column;
  }
  .auth-banner-side {
    display: none;
  }
  .auth-form-side {
    flex: 1;
    width: 100%;
    padding: 2rem 1.5rem;
  }
  .auth-logo-mobile {
    display: block;
    align-self: center;
  }
  .order-monitor-container {
    grid-template-columns: 1fr;
  }
}

/* Client sub-navigation bar */
.client-nav-bar {
  display: flex;
  background-color: var(--cozy-cream);
  border-bottom: 2px solid var(--cozy-border);
  padding: 0 2rem;
  gap: 1.5rem;
  align-items: center;
}

.client-nav-item {
  background: none;
  border: none;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 1rem 0.5rem;
  color: var(--cozy-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 4px solid transparent;
  transition: all 0.2s ease;
  outline: none;
}

.client-nav-item:hover {
  color: var(--cozy-terracotta);
}

.client-nav-item.active {
  color: var(--cozy-terracotta);
  border-bottom-color: var(--cozy-terracotta);
}

/* History Order Cards */
.history-month-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-month-header {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--cozy-muted);
  display: flex;
  justify-content: space-between;
  border-bottom: 2px dashed var(--cozy-border);
  padding-bottom: 0.5rem;
  margin-top: 1rem;
}

.history-month-total {
  color: var(--cozy-terracotta);
}

.history-order-card {
  background-color: var(--cozy-card);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--cozy-border);
  padding: 1.25rem;
  box-shadow: var(--cozy-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--cozy-border);
  padding-bottom: 0.5rem;
}

.history-order-id {
  font-weight: 800;
  color: var(--cozy-dark);
}

.history-order-date {
  font-size: 0.8rem;
  color: var(--cozy-muted);
}

.history-order-items {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--cozy-dark);
}

.history-order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--cozy-border);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

.history-order-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cozy-terracotta);
}

.history-order-pm {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background-color: var(--cozy-border);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.history-order-pm.pix {
  background-color: var(--cozy-green-light);
  color: var(--cozy-green);
}

.history-order-pm.fifth {
  background-color: #fffbeb;
  color: #92400e;
}

/* Announcements Grid & Cards */
.announcements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.announcement-card {
  background-color: var(--cozy-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--cozy-border);
  box-shadow: var(--cozy-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.announcement-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--cozy-shadow-hover);
}

.announcement-image-container {
  height: 200px;
  background-color: #f5efe6;
  overflow: hidden;
}

.announcement-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.announcement-card:hover .announcement-img {
  transform: scale(1.06);
}

.announcement-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.announcement-date {
  font-size: 0.75rem;
  color: var(--cozy-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.announcement-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--cozy-dark);
  line-height: 1.3;
}

.announcement-text {
  font-size: 0.9rem;
  color: var(--cozy-muted);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Custom adjustment for textareas */
textarea.form-control {
  line-height: 1.4;
}

/* Estilos da Área Financeira */
.admin-sub-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid var(--cozy-border);
  margin-bottom: 1.5rem;
  padding-bottom: 0.25rem;
}

.admin-sub-tab {
  background: none;
  border: none;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  color: var(--cozy-muted);
  cursor: pointer;
  border-bottom: 4px solid transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  outline: none;
  border-radius: 6px 6px 0 0;
}

.admin-sub-tab:hover {
  color: var(--cozy-terracotta);
  background-color: rgba(184, 74, 57, 0.04);
}

.admin-sub-tab.active {
  color: var(--cozy-terracotta);
  border-bottom-color: var(--cozy-terracotta);
  background-color: rgba(184, 74, 57, 0.06);
}

.finance-sub-pane {
  display: none;
  animation: fadeIn 0.3s ease-out forwards;
}

.finance-sub-pane.active-sub-pane {
  display: block !important;
}

/* Caixa de Envio de Comprovantes pelo Cliente */
.receipt-upload-box {
  background-color: var(--cozy-cream);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px dashed var(--cozy-border);
}

.receipt-file-input {
  border: 1px solid var(--cozy-border);
  padding: 0.25rem;
  background-color: white;
  border-radius: 4px;
}

/* Responsive adjustments for Admin Dashboard on Mobile */
@media(max-width: 900px) {
  .admin-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 4px solid var(--cozy-honey);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  
  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  
  .admin-nav::-webkit-scrollbar {
    display: none;
  }
  
  .admin-nav-item {
    padding: 1rem 1.25rem;
    border-left: none;
    border-bottom: 4px solid transparent;
    white-space: nowrap;
    justify-content: center;
  }
  
  .admin-nav-item:hover, .admin-nav-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--cozy-honey);
    background-color: rgba(255, 255, 255, 0.08);
  }
  
  .admin-content {
    padding: 1.25rem 1rem;
    height: auto;
    overflow-y: visible;
  }
  
  .admin-sub-tabs {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  
  .admin-sub-tab {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 0.5rem 0.25rem !important;
    font-size: 0.85rem !important;
  }
}

/* Cart Drawer Overlay */
.cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 27, 21, 0.4);
  z-index: 1000; /* Logo abaixo da gaveta do carrinho */
  display: none;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cart-drawer-overlay.active {
  display: block;
  opacity: 1;
}

@keyframes buttonPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); box-shadow: 0 0 20px rgba(184, 74, 57, 0.6); }
  100% { transform: scale(1); }
}

@media(max-width: 768px) {
  .cozy-header {
    padding: 0.75rem 1rem !important;
    flex-direction: row !important; /* Mantém logo e status bar lado a lado */
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
  
  .brand-wrapper {
    justify-content: flex-start !important;
    gap: 0.5rem !important;
  }
  
  .brand-logo-img {
    width: 38px !important;
    height: 38px !important;
  }
  
  .brand-title {
    font-size: 1.15rem !important;
    text-align: left !important;
    white-space: nowrap !important;
  }
  
  .user-status-bar {
    justify-content: flex-end !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
  }
  
  #client-user-name {
    display: none !important; /* Oculta nome do usuário no celular para ganhar espaço */
  }

  .user-role-badge {
    display: none !important;
  }
  
  .user-status-bar .btn {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    min-width: unset !important;
    border-radius: 50% !important; /* Botão circular */
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
  }

  .btn-text {
    display: none !important; /* Oculta texto dos botões no celular */
  }

  .user-status-bar .btn i {
    margin: 0 !important;
    width: 18px;
    height: 18px;
  }

  /* Oculta navegação do topo e exibe no rodapé */
  .client-nav-bar {
    display: none !important;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: var(--cozy-card);
    border-top: 1px solid var(--cozy-border);
    justify-content: space-around;
    align-items: center;
    z-index: 999;
    box-shadow: 0 -4px 15px rgba(46, 27, 21, 0.06);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-nav-item {
    flex: 1;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--cozy-muted);
    font-family: var(--font-main);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px 0;
  }

  .mobile-nav-item i {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
  }

  .mobile-nav-item:active i {
    transform: scale(0.9);
  }

  .mobile-nav-item.active {
    color: var(--cozy-terracotta);
  }

  .mobile-nav-item.active i {
    color: var(--cozy-terracotta);
  }

  /* Badge do carrinho na aba inferior */
  .mobile-bottom-nav .cart-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--cozy-honey);
    color: var(--cozy-dark);
    font-weight: 800;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 4px;
    border: 2px solid var(--cozy-card);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  }

  /* Ajusta a altura dos painéis do cliente descontando topo e rodapé */
  .menu-section {
    height: calc(100vh - 128px) !important;
    height: calc(100dvh - 128px) !important;
    padding: 1rem !important;
  }

  .client-pane {
    height: calc(100vh - 128px) !important;
    height: calc(100dvh - 128px) !important;
  }

  #client-pane-history, #client-pane-announcements {
    padding: 1.25rem 1rem !important;
  }

  .products-grid {
    gap: 1.25rem !important;
    padding-bottom: 30px !important;
  }

  .menu-filter-bar {
    padding: 0.75rem 1rem !important;
    margin-bottom: 1.25rem !important;
    gap: 0.75rem !important;
    border-radius: var(--border-radius-sm) !important;
  }

  .date-select-input {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.85rem !important;
  }

  /* Ajustes dos Modais no celular para centralizar e caber perfeitamente */
  .modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px !important;
    box-sizing: border-box !important;
  }

  .modal-content {
    width: 95% !important;
    max-width: 380px !important;
    padding: 1.25rem !important;
    margin: auto !important;
    box-sizing: border-box !important;
    border-radius: var(--border-radius-sm) !important;
  }

  .pix-container {
    gap: 0.75rem !important;
  }

  .pix-qr-wrapper {
    width: 160px !important;
    height: 160px !important;
    padding: 0.5rem !important;
  }

  .pix-qr-img {
    width: 140px !important;
    height: 140px !important;
  }

  .pix-code-box {
    padding: 0.6rem !important;
    font-size: 0.75rem !important;
    max-height: 70px !important;
  }
}

/* PWA Install Banner Styles */
.pwa-install-banner {
  display: none;
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 480px;
  background-color: var(--cozy-card);
  border: 2px solid var(--cozy-honey);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 10px 25px rgba(46, 27, 21, 0.15);
  z-index: 10002; /* Acima de tudo */
  padding: 0.75rem 1rem;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  animation: pwaSlideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pwaSlideDown {
  from { transform: translate(-50%, -100px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.pwa-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.pwa-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--cozy-honey);
  object-fit: cover;
}

.pwa-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.pwa-text strong {
  font-size: 0.9rem;
  color: var(--cozy-dark);
  font-weight: 700;
}

.pwa-text span {
  font-size: 0.75rem;
  color: var(--cozy-muted);
}

.pwa-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pwa-close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--cozy-muted);
  padding: 0.25rem;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-close-btn:hover {
  color: var(--cozy-terracotta);
}

/* Ocultar banner se o aplicativo já estiver instalado */
@media (display-mode: standalone) {
  .pwa-install-banner {
    display: none !important;
  }
}


