:root {
  --bg: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  --card: rgba(255, 255, 255, 0.85);
  --accent: #3B82F6;
  --accent-2: #1E40AF;
  --muted: #64748B;
  --text: #0F172A;
  --success: #10B981;
  --border: rgba(226, 232, 240, 0.8);
  --radius: 12px;
  --radius-lg: 16px;
  --glass: rgba(255, 255, 255, 0.6);
  --transition: 280ms cubic-bezier(0.2, 0.9, 0.3, 1);
  --button-gradient: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Reset & base */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px;
}

/* Header */
.header {
  padding: 44px 0 18px;
  text-align: center;
}

.logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.logo-wrap img {
  height: 86px;
  border-radius: 10px;
}

/* Hero */
h1 {
  font-size: 36px;
  margin: 12px 0 6px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: Manrope, sans-serif;
}

.subtitle {
  color: var(--muted);
  font-size: 16px;
  margin: 0 auto;
  max-width: 720px;
  font-weight: 400;
  text-align:left;
}

/* Card */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 30px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-top: 24px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Form */
.form-row {
  display: flex;
  gap: 16px;
  align-items: end;
}

.form-group {
  margin-bottom: 18px;
  position: relative;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text);
}

/* Inputs redesenhados */
.input-strong {
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--glass);
  font-size: 16px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
  transition: all var(--transition);
  font-family: Inter, sans-serif;
}

.input-strong:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  border-color: var(--accent);
}

/* Select styles */
.select-strong {
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--glass);
  font-size: 16px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
  transition: all var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  cursor: pointer;
  font-family: Inter, sans-serif;
}

.select-strong:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  border-color: var(--accent);
}

/* Date Picker - SOLUÇÃO DEFINITIVA MELHORADA */
.date-picker-container {
  position: relative;
}

.date-picker-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 20px;
  padding-right: 50px;
}

/* Date Picker Modal MELHORADO */
.date-picker-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.date-picker-content {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  animation: slideUp 0.3s ease;
  backdrop-filter: blur(10px);
}

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

.date-picker-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  background: var(--glass);
}

.date-picker-title {
  font-weight: 600;
  font-size: 18px;
  margin: 0;
  font-family: Manrope, sans-serif;
}

.date-picker-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.date-picker-close:hover {
  background: rgba(0,0,0,0.05);
}

.date-picker-body {
  padding: 20px;
}

/* SELECTS MELHORADOS para mês e ano */
.date-picker-selects {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.date-picker-select {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: Inter, sans-serif;
}

.date-picker-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.date-picker-calendar {
  width: 100%;
  border-collapse: collapse;
}

.date-picker-calendar th {
  padding: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

.date-picker-calendar td {
  padding: 8px;
  text-align: center;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.date-picker-calendar td:hover {
  background: var(--accent);
  color: white;
}

.date-picker-calendar td.selected {
  background: var(--accent);
  color: white;
  font-weight: 600;
}

.date-picker-calendar td.other-month {
  color: var(--muted);
  opacity: 0.5;
}

.date-picker-calendar td.disabled {
  color: #ccc;
  cursor: not-allowed;
}

.date-picker-calendar td.disabled:hover {
  background: transparent;
  color: #ccc;
}

.date-picker-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Botões redesenhados */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  margin-bottom: 28px;
  border-radius: var(--radius);
  background: var(--button-gradient);
  color: white;
  border: 0;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  transition: all var(--transition);
  font-family: Inter, sans-serif;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  box-shadow: none;
}

.btn.ghost:hover {
  background: rgba(0,0,0,0.03);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn.secondary {
  background: transparent;
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--accent);
  box-shadow: none;
}

.btn.secondary:hover {
  background: rgba(59, 130, 246, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.btn.small {
  padding: 10px 16px;
  font-size: 14px;
  margin-right: 8px;
}

/* Planos */
.planos-container {
  margin-top: 20px;
}

.plano-option {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--glass);
  position: relative;
}

.plano-option:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(59, 130, 246, 0.2);
}

.plano-title {
  font-weight: 700;
  font-size: 18px;
  font-family: Manrope, sans-serif;
}

.plano-desc {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.plano-price {
  font-weight: 800;
  color: var(--accent);
  font-size: 18px;
}

/* Badges */
.badge {
  background: linear-gradient(135deg, #3B82F6, #1E40AF);
  color: white;
  padding: 6px 12px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 400;
}

.badge-devices {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  margin-left: 0px;
  font-size: 12px;
  padding: 4px 8px;
}

.badge-wifi {
  background: linear-gradient(135deg, #10B981, #059669);
  margin-left: 8px;
  font-size: 12px;
  padding: 4px 8px;
}

.badge-velocidade {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  margin-left: 8px;
  font-size: 12px;
  padding: 4px 8px;
}

/* Info box */
.info-box {
  background: var(--glass);
  border-left: 4px solid var(--accent);
  padding: 16px;
  border-radius: var(--radius);
  color: var(--muted);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

/* Modais */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.45);
  backdrop-filter: blur(6px);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modal-fade .24s ease;
}

@keyframes modal-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal .content {
  background: var(--card);
  border-radius: var(--radius-lg);
  max-width: 920px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  box-shadow: var(--shadow-hover);
  animation: modal-slide .28s cubic-bezier(.2,.9,.3,1);
  backdrop-filter: blur(10px);
}

@keyframes modal-slide {
  from {
    transform: translateY(16px) scale(.995);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.modal-header {
  padding: 26px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  background: var(--glass);
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  padding: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  background: var(--glass);
}

/* grids */
.canais-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
}

.canal-item {
  text-align: center;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform var(--transition);
}

.canal-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.canal-logo {
  width: 90px;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

/* Footer */
.footer {
  padding: 24px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: 18px;
  border-top: 1px solid var(--border);
}

/* Accessibility */
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* CEP Alternative Button */
.cep-alternative-button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  margin-top: 8px;
  text-decoration: underline;
  display: block;
  padding: 0;
  transition: var(--transition);
}

.cep-alternative-button:hover {
  color: var(--accent-2);
}

/* CEP Search Modal */
.cep-search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cep-search-modal .content {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 450px;
  position: relative;
  box-shadow: var(--shadow-hover);
  backdrop-filter: blur(10px);
}

.cep-search-modal .close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.cep-search-modal .close-modal:hover {
  background: rgba(0,0,0,0.05);
}

.cep-search-modal .modal-title {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
  font-family: Manrope, sans-serif;
}

.cep-search-modal .small {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}

/* Loading states */
.cep-loading, .cep-warning, .cep-success {
  font-size: 12px;
  margin-top: 5px;
  display: none;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-weight: 500;
}

.cep-loading {
  background: rgba(255, 193, 7, 0.1);
  color: #856404;
  border: 1px solid rgba(255, 193, 7, 0.2);
}

.cep-warning {
  background: rgba(220, 53, 69, 0.1);
  color: #721c24;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.cep-success {
  background: rgba(40, 167, 69, 0.1);
  color: #155724;
  border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Google Places Autocomplete */
.pac-container {
  z-index: 10000 !important;
  border-radius: var(--radius);
  margin-top: 5px;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  background: var(--card);
}

.pac-item {
  padding: 10px 15px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.pac-item:hover {
  background-color: rgba(0,0,0,0.03);
}

.pac-item-query {
  font-size: 14px;
  color: var(--text);
}

/* Campo número preenchido automaticamente */
.auto-filled {
  background-color: rgba(16, 185, 129, 0.1) !important;
  border-color: var(--success) !important;
  color: var(--text) !important;
}

/* Novos estilos para categorias de planos */
.categoria-planos {
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--glass);
  box-shadow: var(--shadow);
}

.categoria-header {
  padding: 16px 20px;
  background: var(--glass);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.categoria-header:hover {
  background: rgba(0,0,0,0.02);
}

.categoria-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  font-family: Manrope, sans-serif;
}

.categoria-icon {
  font-size: 20px;
  transition: transform 0.3s ease;
  color: var(--muted);
}

.categoria-header.active .categoria-icon {
  transform: rotate(180deg);
}

.categoria-content {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.categoria-content.expanded {
  padding: 20px;
  max-height: 1000px;
}

/* Estilo para o badge de 5 dispositivos */
.plano-badge-container {
  margin: 4px 0 8px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Estilo para os planos com opção de escolha */
.plano-opcao-escolha {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.btn-opcao {
  flex: 1;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

.btn-opcao:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.05);
}

.btn-opcao.selecionado {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.plano-com-opcao .btn-selecionar-plano {
  margin-top: 12px;
}

/* Checkbox personalizado para plano selecionado */
.plano-checkbox {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  transition: all 0.2s ease;
}

.plano-option.selecionado .plano-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}

.plano-option.selecionado .plano-checkbox::after {
  content: "✓";
  color: white;
  font-size: 14px;
  font-weight: bold;
}

/* Modal de Pagamento - ESTILO MELHORADO */
#modal-pagamento .tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

#modal-pagamento .tab {
  flex: 1;
  padding: 12px 0;
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s ease;
  font-family: Inter, sans-serif;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#modal-pagamento .tab:hover {
  background: rgba(59, 130, 246, 0.05);
  border-color: var(--accent);
  transform: translateY(-2px);
}

#modal-pagamento .tab.active {
  background: var(--button-gradient);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

#modal-pagamento .tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

#modal-pagamento .tab-content.active {
  display: block;
}

#modal-pagamento .form-group {
  margin-bottom: 18px;
}

#modal-pagamento .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

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

.pix-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  margin: 20px 0;
}

.pix-qrcode {
  background: white;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.pix-qrcode img {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
}

.pix-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin-top: 16px;
}

.pix-copy input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  font-size: 14px;
  font-family: Inter, sans-serif;
}

.pix-copy button {
  white-space: nowrap;
}

.pix-instrucao {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
}

/* QR Code Placeholder */
.qrcode-placeholder {
  width: 200px;
  height: 200px;
  background: var(--glass);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  margin: 0 auto;
}

/* ====== CORREÇÕES PARA MOBILE ====== */

/* Melhorias gerais para mobile */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }
  
  .header {
    padding: 24px 0 12px;
  }
  
  .card {
    padding: 20px;
    margin-top: 16px;
  }
  
  h1 {
    font-size: 28px;
  }
  
  .subtitle {
    font-size: 14px;
  }
  
  /* Melhorias para formulário em mobile */
  .form-row {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }
  
  .form-row > div {
    width: 100% !important;
    margin-bottom: 16px;
  }
  
  .input-strong, .select-strong {
    padding: 16px;
    font-size: 16px; /* Evita zoom no iOS */
  }
  
  .btn {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 16px;
    min-height: 54px;
  }
  
  /* MELHORIA: Ajuste para os botões dos planos em mobile */
  .plano-option {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .plano-option > div:last-child {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .plano-opcao-escolha {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-opcao {
    width: 100%;
  }
  
  /* MELHORIA: Botões empilhados em mobile */
  .plano-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  
  .plano-buttons .btn {
    width: 100%;
    margin: 0;
  }
  
  /* CORREÇÃO: Melhorias para categorias de planos em mobile */
  .categoria-content.expanded {
    max-height: 5000px; /* Valor alto para permitir expansão completa */
    overflow: visible;
  }
  
  /* Melhorias para modais em mobile */
  .modal .content {
    margin: 10px;
    max-height: 90vh;
    width: calc(100% - 20px);
  }
  
  .modal-header {
    padding: 20px;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  .date-picker-content {
    max-width: 95%;
  }
  
  .date-picker-selects {
    flex-direction: column;
  }
  
  .date-picker-calendar td, 
  .date-picker-calendar th {
    padding: 10px 6px;
    font-size: 14px;
  }
  
  /* Melhorias para grid de canais em mobile */
  .canais-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }
  
  .canal-item {
    padding: 10px;
  }
  
  .canal-logo {
    width: 60px;
    height: 60px;
  }
  
  /* Melhorias para botões de ação */
  #btn-finalizar, #btn-reset {
    width: 100%;
  }
  
  /* Melhorias para footer */
  .footer {
    padding: 20px 0;
    font-size: 12px;
  }
  
  /* Ajustes para modal de pagamento em mobile */
  #modal-pagamento .tabs {
    flex-direction: column;
    gap: 8px;
  }
  
  .pix-copy {
    flex-direction: column;
    gap: 10px;
  }
  
  .pix-copy button {
    width: 100%;
  }
  
  .pix-qrcode img {
    width: 180px;
    height: 180px;
  }
  
  .qrcode-placeholder {
    width: 180px;
    height: 180px;
  }
}

/* Melhorias para telas muito pequenas */
@media (max-width: 480px) {
  .container {
    padding: 12px;
  }
  
  .card {
    padding: 16px;
  }
  
  h1 {
    font-size: 24px;
  }
  
  .logo-wrap img {
    height: 40px;
  }
  
  .canais-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
  
  .canal-logo {
    width: 50px;
    height: 50px;
  }
  
  .date-picker-calendar td, 
  .date-picker-calendar th {
    padding: 8px 4px;
    font-size: 12px;
  }
  
  /* CORREÇÃO: Ajuste adicional para categorias em telas muito pequenas */
  .categoria-content.expanded {
    padding: 16px;
  }
  
  /* Ajustes adicionais para modal de pagamento */
  .pix-qrcode img {
    width: 160px;
    height: 160px;
  }
  
  .qrcode-placeholder {
    width: 160px;
    height: 160px;
  }
}

/* Prevenir zoom em inputs no iOS */
@media screen and (-webkit-min-device-pixel-ratio:0) {
  select:focus,
  textarea:focus,
  input:focus {
    font-size: 16px;
  }
}

/* Melhorias de toque para todos os dispositivos touch */
@media (hover: none) and (pointer: coarse) {
  .btn:active {
    transform: scale(0.98);
  }
  
  .plano-option:active {
    transform: translateY(-2px);
  }
  
  .canal-item:active {
    transform: translateY(-2px);
  }
  
  #modal-pagamento .tab:active {
    transform: scale(0.98);
  }
}

/* Melhorias para orientação paisagem em mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .modal .content {
    max-height: 85vh;
  }
  
  .date-picker-content {
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Melhorias para inputs em dispositivos móveis */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}