/* ===== MOBILE-FIRST RESPONSIVE DESIGN ===== */

/* Reset e configurações base */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto Mono', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.4;
  background: #0a0a0a;
  color: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Safe area para iPhone X+ */
@supports (padding-top: env(safe-area-inset-top)) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  .modal-content {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  .modal-header {
    padding-top: calc(env(safe-area-inset-top) + 10px);
  }
}

/* Container principal mobile-first */
.container {
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 12px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Header removido - sem painel de voltar */
header {
  display: none;
}

/* PWA iOS - eliminar espaço preto */
@media (display-mode: standalone) {
  body {
    height: 100vh;
    height: 100dvh;
    position: fixed;
    width: 100%;
    overflow: hidden;
  }
  
  .container {
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Date filter mobile - compacto */
.date-filter {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid #333;
}

.date-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.date-input {
  flex: 1;
  padding: 16px 20px;
  border: 2px solid #444;
  border-radius: 16px;
  font-size: 16px;
  background: #2a2a2a;
  color: #ffffff;
  font-family: inherit;
  transition: all 0.3s;
}

.date-input:focus {
  border-color: #2196F3;
  outline: none;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.date-nav {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 16px;
  background: #2196F3;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 20px;
}

.date-nav:hover {
  background: #1976D2;
  transform: scale(1.05);
}

.filter-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
}

.filter-btn {
  padding: 6px 4px;
  border: none;
  border-radius: 6px;
  background: #2a2a2a;
  color: #ccc;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 1px solid transparent;
  min-height: 28px;
}

.filter-btn i {
  font-size: 10px;
}

.filter-btn.selected {
  background: #2196F3;
  color: white;
  border-color: #1976D2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.filter-btn:hover {
  transform: translateY(-2px);
  background: #333;
}

.filter-btn.selected:hover {
  background: #1976D2;
}

/* Cards container mobile */
.cards-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.card {
  background: #1a1a1a;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s;
  border: 1px solid #333;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2196F3, #1976D2);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.card-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: inherit;
  opacity: 0.1;
}

.card-icon.shirt {
  background: linear-gradient(135deg, #4CAF50, #45a049);
}

.card-icon.money {
  background: linear-gradient(135deg, #FF9800, #F57C00);
}

.card-icon.profit {
  background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

.card-icon i {
  font-size: 28px;
  color: white;
  z-index: 1;
  position: relative;
}

.card-content {
  flex: 1;
  min-width: 0;
}

.card-content h3 {
  font-size: 12px;
  font-weight: 700;
  color: #888;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-content .number {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
  line-height: 1;
  font-family: 'Roboto Mono', monospace;
}

.card-content .subtitle {
  font-size: 13px;
  color: #999;
  margin: 0;
}

/* Payment section mobile */
.payment-section {
  margin-bottom: 28px;
}

.payment-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 20px 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.payment-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.payment-card {
  background: #1a1a1a;
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
  border: 1px solid #333;
  position: relative;
  overflow: hidden;
}

.payment-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--payment-color, #2196F3);
  opacity: 0;
  transition: opacity 0.3s;
}

.payment-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.payment-card:hover::before {
  opacity: 1;
}

.payment-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.payment-icon.pix {
  background: linear-gradient(135deg, #00D4AA, #00B894);
  --payment-color: #00D4AA;
}

.payment-icon.money {
  background: linear-gradient(135deg, #00B894, #00A085);
  --payment-color: #00B894;
}

.payment-icon.debit {
  background: linear-gradient(135deg, #6C5CE7, #5F3DC4);
  --payment-color: #6C5CE7;
}

.payment-icon.credit {
  background: linear-gradient(135deg, #FD79A8, #E84393);
  --payment-color: #FD79A8;
}

.payment-card:nth-child(1) { --payment-color: #00D4AA; }
.payment-card:nth-child(2) { --payment-color: #00B894; }
.payment-card:nth-child(3) { --payment-color: #6C5CE7; }
.payment-card:nth-child(4) { --payment-color: #FD79A8; }

.payment-icon i {
  font-size: 22px;
  color: white;
}

.payment-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.payment-card .amount {
  font-size: 20px;
  font-weight: 700;
  color: #2196F3;
  margin: 0 0 8px 0;
  font-family: 'Roboto Mono', monospace;
}

.payment-card .details {
  font-size: 12px;
  color: #888;
  margin: 0 0 6px 0;
}

.payment-card .tax {
  font-size: 11px;
  color: #666;
  margin: 2px 0;
}

/* Hourly sales mobile */
.hourly-sales-section {
  background: #1a1a1a;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid #333;
}

.hourly-sales-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 24px 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hours-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 8px;
  height: 300px;
  align-items: end;
  position: relative;
  margin-bottom: 20px;
}

.hour-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.hour-column span {
  font-size: 11px;
  color: #888;
  margin-top: 12px;
  font-weight: 600;
  transform: rotate(-45deg);
  white-space: nowrap;
}

.bar-container {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: end;
  position: relative;
}

.bar {
  width: 100%;
  background: linear-gradient(to top, #2196F3, #64B5F6);
  border-radius: 6px 6px 0 0;
  min-height: 8px;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.bar-label {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: #2a2a2a;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid #444;
}

/* Stats section mobile */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: #1a1a1a;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid #333;
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.stat-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 20px 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Sales table mobile */
.sales-table-section {
  background: #1a1a1a;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid #333;
}

.sales-table-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 20px 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sales-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 800px;
}

.sales-table th,
.sales-table td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid #333;
}

.sales-table th {
  background: #2a2a2a;
  font-weight: 700;
  color: #ccc;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
}

.sales-table td {
  color: #ffffff;
}

/* FAB mobile */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  border: none;
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: all 0.3s;
  z-index: 1000;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(76, 175, 80, 0.5);
}

.fab.fab-left {
  right: auto;
  left: 24px;
  background: linear-gradient(135deg, #2196F3, #1976D2);
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.fab.fab-left:hover {
  box-shadow: 0 8px 24px rgba(33, 150, 243, 0.5);
}

/* Modal mobile completamente redesenhado */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 0;
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.modal-content {
  background: #1a1a1a;
  border-radius: 0;
  width: 100vw;
  height: 100vh;
  position: relative;
  border: none;
  box-shadow: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 0;
  border-bottom: none;
  margin-bottom: 0;
  position: relative;
  background: linear-gradient(135deg, #2196F3, #1976D2);
  color: white;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 20px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.sound-test-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  transition: all 0.3s;
  flex-shrink: 0;
  margin-right: 8px;
}

.sound-test-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.close-button {
  position: relative;
  top: auto;
  right: auto;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  transition: all 0.3s;
  flex-shrink: 0;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Form elements mobile redesenhado */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #2196F3;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group select,
.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #333;
  border-radius: 12px;
  font-size: 16px;
  background: #2a2a2a;
  color: #ffffff;
  font-family: inherit;
  transition: all 0.3s;
  box-sizing: border-box;
}

.form-group select:focus,
.form-group input:focus {
  border-color: #2196F3;
  outline: none;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
  background: #333;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Quantity selector mobile redesenhado */
.quantity-selector {
  margin-top: 8px;
}

.quantity-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.quantity-btn {
  padding: 12px 8px;
  border: 2px solid #333;
  border-radius: 10px;
  background: #2a2a2a;
  color: #ccc;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  border-color: #2196F3;
  background: #333;
  color: white;
}

.quantity-btn.selected {
  background: linear-gradient(135deg, #2196F3, #1976D2);
  border-color: #2196F3;
  color: white;
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

/* Price buttons mobile redesenhado */
.price-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.price-btn {
  padding: 10px 12px;
  border: 2px solid #333;
  border-radius: 10px;
  background: #2a2a2a;
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.price-btn:hover {
  border-color: #2196F3;
  background: #333;
  color: white;
}

.price-input-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.currency-symbol {
  position: absolute;
  left: 16px;
  color: #2196F3;
  font-weight: 700;
  z-index: 1;
  font-size: 14px;
}

.price-input-container input {
  padding-left: 45px;
}

/* Action buttons mobile redesenhado */
.action-buttons {
  margin: 20px 0;
}

.add-btn {
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Sale items mobile redesenhado */
.sale-items {
  background: #0f0f0f;
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
  border: 1px solid #333;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sale-items h3 {
  font-size: 14px;
  font-weight: 700;
  color: #2196F3;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sale-items h3::before {
  content: '🛒';
  font-size: 16px;
}

#saleItemsList {
  margin-bottom: 16px;
  max-height: 180px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sale-item {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #333;
  transition: all 0.3s;
}

.sale-item:hover {
  background: #222;
  border-color: #2196F3;
}

.item-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.item-name {
  display: block;
  font-weight: 600;
  color: #ffffff;
  font-size: 13px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-details {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-payment {
  display: block;
  font-size: 11px;
  color: #2196F3;
  font-weight: 600;
  text-transform: uppercase;
}

.remove-item-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f44336;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
  font-size: 16px;
}

.remove-item-btn:hover {
  background: #d32f2f;
  transform: scale(1.05);
}

/* Sale summary mobile redesenhado */
.sale-summary {
  border-top: 2px solid #333;
  padding-top: 16px;
  margin-top: 16px;
}

.payment-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.payment-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #1a1a1a;
  border-radius: 6px;
  border: 1px solid #333;
  font-size: 11px;
}

.payment-total span:first-child {
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
}

.payment-total span:last-child {
  color: #ffffff;
  font-weight: 700;
  font-family: 'Roboto Mono', monospace;
}

.subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #2196F3, #1976D2);
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 700;
  color: white;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.finalize-btn {
  width: 100%;
  padding: 18px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.finalize-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(76, 175, 80, 0.5);
}

/* ===== TABLET RESPONSIVE (768px+) ===== */
@media (min-width: 768px) {
  .container {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .cards-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  
  .payment-cards {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .filter-buttons {
    display: flex;
    gap: 6px;
  }
  
  .filter-btn {
    flex: 1;
    padding: 8px;
    font-size: 10px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .hours-grid {
    height: 320px;
    gap: 12px;
  }
  
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
  
  .quantity-buttons {
    grid-template-columns: repeat(10, 1fr);
  }
  
  .price-buttons {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .payment-totals {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== DESKTOP RESPONSIVE (1024px+) ===== */
@media (min-width: 1024px) {
  .container {
    padding: 40px;
  }
  
  header h1 {
    font-size: 12px;
  }
  
  .card-content .number {
    font-size: 32px;
  }
  
  .hours-grid {
    height: 350px;
    gap: 16px;
  }
  
  .hour-column span {
    font-size: 12px;
    transform: none;
  }
  
  .modal {
    padding: 40px;
  }
  
  .modal-content {
    max-width: 600px;
    height: auto;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }
  
  .modal-header {
    border-radius: 20px 20px 0 0;
    min-height: 70px;
  }
  
  .modal-body {
    padding: 30px;
  }
  
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
  
  .quantity-buttons {
    grid-template-columns: repeat(10, 1fr);
  }
  
  .price-buttons {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .payment-totals {
    grid-template-columns: repeat(4, 1fr);
  }
  
  #saleItemsList {
    max-height: 250px;
  }
}

/* ===== IPHONE LARGE SCREENS (iPhone 12+, 14+) ===== */
@media (min-width: 390px) and (max-width: 767px) and (-webkit-device-pixel-ratio: 3) {
  .container {
    padding: 16px;
  }
  
  header {
    padding: 3px 8px;
  }
  
  header h1 {
    font-size: 11px;
  }
  
  .card {
    padding: 28px;
  }
  
  .card-content .number {
    font-size: 32px;
  }
  
  .payment-cards {
    gap: 20px;
  }
  
  .payment-card {
    padding: 24px;
  }
  
  .fab {
    bottom: 32px;
    right: 32px;
    width: 72px;
    height: 72px;
    font-size: 32px;
  }
  
  .fab.fab-left {
    left: 32px;
  }
  
  .modal-content {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
  
  .modal-header {
    min-height: 65px;
    padding: 0 24px;
  }
  
  .modal-body {
    padding: 24px;
  }
  
  .quantity-buttons {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }
  
  .price-buttons {
    grid-template-columns: repeat(4, 1fr);
  }
  
  #saleItemsList {
    max-height: 200px;
  }
}

/* ===== IPHONE PRO MAX (428px+) ===== */
@media (min-width: 428px) and (max-width: 767px) {
  .filter-buttons {
    gap: 6px;
  }
  
  .filter-btn {
    padding: 8px 6px;
    font-size: 10px;
  }
  
  .quantity-buttons {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }
  
  .price-buttons {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== LANDSCAPE MODE ===== */
@media (orientation: landscape) and (max-height: 500px) {
  .modal-content {
    max-height: 85vh;
  }
  
  .hours-grid {
    height: 200px;
  }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  /* Já está em dark mode por padrão */
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== MOBILE NOTIFICATIONS ===== */
.mobile-notification {
  position: fixed;
  top: 20px;
  left: 16px;
  right: 16px;
  background: #1a1a1a;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 3000;
  transform: translateY(-100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #333;
  backdrop-filter: blur(10px);
}

.mobile-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.mobile-notification.success {
  border-left: 4px solid #4CAF50;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
}

.mobile-notification.error {
  border-left: 4px solid #f44336;
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(244, 67, 54, 0.05));
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.notification-content i {
  font-size: 20px;
  flex-shrink: 0;
}

.mobile-notification.success .notification-content i {
  color: #4CAF50;
}

.mobile-notification.error .notification-content i {
  color: #f44336;
}

.notification-content span {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

/* Safe area para notificações */
@supports (padding-top: env(safe-area-inset-top)) {
  .mobile-notification {
    top: calc(20px + env(safe-area-inset-top));
  }
}

/* ===== HIGH CONTRAST ===== */
@media (prefers-contrast: high) {
  .card,
  .payment-card,
  .modal-content {
    border: 2px solid #fff;
  }
  
  .btn,
  .filter-btn,
  .quantity-btn {
    border: 2px solid currentColor;
  }
}

/* ===== iOS PWA - ELIMINAR ESPAÇO PRETO ===== */

/* iOS Safari PWA - forçar tela completa */
@supports (-webkit-touch-callout: none) {
  @media (display-mode: standalone) {
    body {
      height: 100vh !important;
      height: 100dvh !important;
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      right: 0 !important;
      bottom: 0 !important;
      overflow: hidden !important;
    }
    
    .container {
      height: 100vh !important;
      height: 100dvh !important;
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch !important;
      position: relative !important;
    }
  }
}

/* Scroll otimizado para PWA */
@media (display-mode: standalone) {
  html, body {
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
  }
}
