:root {
  /* Zoom do sistema: no computador tudo aparece a 80% (cabe mais ferramenta na tela sem o cliente mexer no Ctrl -).
     --vh compensa o zoom nas alturas de tela cheia (sem isso, 100vh viraria 80% da tela). */
  --app-zoom: 1;
  --vh: calc(1vh / var(--app-zoom));

  --bg-primary: #F0F2F5;
  --bg-secondary: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --bg-glass-hover: #F5F6F8;
  --bg-input: #FFFFFF;
  
  --accent-primary: #25D366;
  --accent-secondary: #128C7E;
  --accent-hover: #1EBE5D;
  --accent-dark: #075E54;
  --accent-teal: #008069;
  
  --accent-success: #25D366;
  --accent-warning: #D97706;
  --accent-danger: #EF4444;
  --accent-info: #0284C7;
  
  --text-primary: #111B21;
  --text-secondary: #54656F;
  --text-muted: #8696A0;
  
  --border-light: #E9EDEF;
  --border-glass: #E2E8F0;
  --border-strong: #CBD5E1;
  
  --shadow-sm: 0 1px 3px rgba(11, 20, 26, 0.06);
  --shadow-md: 0 4px 14px rgba(11, 20, 26, 0.08);
  --shadow-lg: 0 14px 34px rgba(11, 20, 26, 0.12);
  --shadow-glow: 0 0 18px rgba(37, 211, 102, 0.25);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(37, 211, 102, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(18, 140, 126, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: calc(100 * var(--vh));
}

/* Typography */
h1, h2, h3, h4 { 
  font-weight: 600; 
  letter-spacing: -0.02em; 
  color: var(--text-primary);
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.05rem; }

.text-center { text-align: center; }
.hidden { display: none !important; }

/* Buttons */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.92rem;
  transition: var(--transition);
}

.submit-btn {
  width: 100%;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.28);
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.submit-btn:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent-teal));
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}
.submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.btn-secondary:hover {
  background: var(--bg-primary);
  border-color: #94A3B8;
  color: var(--text-primary);
}

.btn-icon {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.btn-icon:hover {
  background: var(--bg-primary);
  color: var(--accent-teal);
  border-color: var(--accent-primary);
}

.refresh-btn {
  color: var(--text-secondary);
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}
.refresh-btn:hover { 
  background: var(--bg-primary); 
  color: var(--text-primary); 
}

/* Layout */
.app-layout {
  display: flex;
  height: calc(100 * var(--vh));
  overflow: hidden;
}

.sidebar {
  width: 250px;
  background: #FFFFFF;
  border-right: 1px solid var(--border-light);
  box-shadow: 2px 0 10px rgba(11, 20, 26, 0.03);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.15rem;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}
.sidebar-logo h1 {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-item {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-item:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}
.nav-item.active {
  background: rgba(37, 211, 102, 0.12);
  color: var(--accent-teal);
  font-weight: 600;
  border-left: 3.5px solid var(--accent-primary);
}

.app-container {
  flex: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  overflow-y: auto;
  width: 100%;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}
.header-left h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Glass & Surface Panels */
.glass-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.section-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 3fr 1.15fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Calendar Styling */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.calendar-header h2 { 
  margin: 0; 
  font-size: 1.2rem;
  color: var(--text-primary);
}

.calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calendar-grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.calendar-day {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  min-height: 80px;
  padding: 0.6rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.calendar-day:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
}

.calendar-day.empty {
  background: #FAFAFA;
  border-color: transparent;
  cursor: default;
  box-shadow: none;
}
.calendar-day.empty:hover { 
  transform: none; 
  box-shadow: none; 
  border-color: transparent;
}

.calendar-day.today {
  border: 2px solid var(--accent-primary);
  background: rgba(37, 211, 102, 0.06);
}

.day-number {
  font-weight: 600;
  font-size: 1.05rem;
  align-self: flex-end;
  color: var(--text-secondary);
}
.calendar-day.today .day-number { 
  color: var(--accent-teal); 
  font-weight: 700;
}

.day-indicators {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.day-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.day-indicator.pending { background: var(--accent-warning); }
.day-indicator.sent { background: var(--accent-success); }
.day-indicator.failed { background: var(--accent-danger); }

/* Status Indicator */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.95rem;
  background: #FFFFFF;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
}

.status-indicator-badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.state-initializing { background: var(--accent-warning); box-shadow: 0 0 6px var(--accent-warning); animation: pulse 1.5s infinite; }
.state-qr-code { background: var(--accent-primary); box-shadow: 0 0 6px var(--accent-primary); }
.state-connected { background: var(--accent-success); box-shadow: 0 0 6px var(--accent-success); }
.state-disconnected { background: var(--accent-danger); box-shadow: 0 0 6px var(--accent-danger); }

/* QR Section */
.qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 250px;
  margin: 1.5rem 0;
}
#qr-image {
  background: #FFFFFF;
  padding: 1rem;
  border-radius: var(--radius-md);
  width: 250px;
  height: 250px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.25s ease;
}

#modal-login {
  background: #FFFFFF !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#modal-login .modal-content {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  width: 100%;
  max-width: 520px;
  max-height: calc(90 * var(--vh));
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}
.modal-content.large-modal { max-width: 850px; }

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 { 
  margin: 0; 
  font-size: 1.2rem;
  color: var(--text-primary);
}

.close-modal-btn {
  font-size: 1.5rem;
  color: var(--text-secondary);
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 6px;
  transition: all 0.2s;
}
.close-modal-btn:hover { 
  color: var(--accent-danger); 
  background: rgba(239, 68, 68, 0.08);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

/* Forms inside Modals & Global Inputs */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.sub-label {
  margin-top: 0.75rem;
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="tel"], 
input[type="time"], 
input[type="number"], 
textarea, 
select {
  width: 100%;
  background: #FFFFFF !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.65rem 0.95rem !important;
  color: var(--text-primary) !important;
  font-family: inherit;
  font-size: 0.92rem;
  transition: var(--transition);
}
input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}
input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.18) !important;
  background: #FFFFFF !important;
}

/* Type Toggle */
.type-toggle-container {
  display: flex;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 0.25rem;
  border: 1px solid var(--border-light);
}
.type-toggle-container input[type="radio"] { display: none; }
.toggle-btn {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  font-size: 0.9rem;
  margin-bottom: 0 !important;
}
.type-toggle-container input[type="radio"]:checked + .toggle-btn {
  background: #FFFFFF;
  color: var(--accent-teal);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* Dropzone */
.file-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  position: relative;
  transition: var(--transition);
  background: #FAFAFA;
}
.file-dropzone:hover {
  border-color: var(--accent-primary);
  background: rgba(37, 211, 102, 0.05);
}
.file-dropzone input[type="file"] {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.dropzone-text {
  display: block; 
  color: var(--text-secondary); 
  margin-bottom: 0.4rem; 
  font-size: 0.88rem;
}
.file-name-display {
  display: block; 
  color: var(--accent-teal); 
  font-size: 0.85rem; 
  font-weight: 600;
}

/* Queue & Gallery List */
.queue-header, .gallery-header {
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 0.75rem; 
  gap: 0.5rem;
}
.gallery-header h2 {
  font-size: 1.1rem; 
  margin-bottom: 0; 
  line-height: 1.2;
}
.gallery-instructions {
  margin-bottom: 0.85rem; 
  font-size: 0.82rem; 
  color: var(--text-secondary); 
  background: var(--bg-primary); 
  padding: 0.75rem; 
  border-radius: var(--radius-md); 
  border: 1px solid var(--border-light);
}
.gallery-grid {
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: 0.75rem;
  max-height: calc(100 * var(--vh) - 250px);
  min-height: 280px;
  overflow-y: auto;
  padding-right: 5px;
}

/* Custom Scrollbar */
.gallery-grid::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.app-container::-webkit-scrollbar {
  width: 6px;
}
.gallery-grid::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.app-container::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: 10px;
}
.gallery-grid::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.app-container::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 10px;
}
.gallery-grid::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.app-container::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.gallery-item {
  width: 100%; 
  aspect-ratio: 1; 
  border-radius: var(--radius-md); 
  object-fit: cover; 
  cursor: grab; 
  border: 2px solid var(--border-light); 
  transition: var(--transition); 
  background: #E2E8F0;
}
.gallery-item:active { cursor: grabbing; transform: scale(0.96); opacity: 0.85; }
.gallery-item:hover { 
  border-color: var(--accent-primary); 
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2); 
}

.gallery-item-delete {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  transition: transform 0.2s;
}
.gallery-item-delete:hover {
  transform: scale(1.1);
  background: rgb(220, 38, 38);
}

.add-media-btn {
  cursor: pointer; 
  display: inline-block; 
  white-space: nowrap; 
  font-size: 0.82rem; 
  padding: 0.4rem 0.8rem;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 500;
}
.add-media-btn:hover {
  background: var(--bg-primary);
  border-color: var(--accent-primary);
  color: var(--accent-teal);
}

/* Drag and drop effects */
.calendar-day.drag-over {
  background: rgba(37, 211, 102, 0.15) !important;
  border-color: var(--accent-primary) !important;
  transform: scale(1.02);
  z-index: 10;
  box-shadow: var(--shadow-glow);
}
.queue-list {
  display: flex; flex-direction: column; gap: 0.75rem;
}
.empty-state {
  text-align: center; padding: 2rem; color: var(--text-muted); font-size: 0.9rem;
}

.queue-card {
  background: #FAFAFA;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.card-top {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem;
}
.card-top-inner { display: flex; gap: 0.75rem; }
.card-info { display: flex; flex-direction: column; gap: 0.2rem; }

.post-type-tag {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; color: var(--text-secondary);
}
.post-time { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.post-countdown { font-size: 0.8rem; color: var(--accent-warning); margin-top: 2px; }

.badge {
  padding: 0.25rem 0.55rem; 
  border-radius: var(--radius-full); 
  font-size: 0.75rem; 
  font-weight: 600;
}
.badge.pending { background: #FEF3C7; color: #B45309; border: 1px solid #FDE68A; }
.badge.sent { background: #D1FAE5; color: #047857; border: 1px solid #A7F3D0; }
.badge.failed { background: #FEE2E2; color: #B91C1C; border: 1px solid #FECACA; }

.card-img-preview { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-light); }
.post-content-preview { 
  font-size: 0.88rem; 
  color: var(--text-secondary); 
  background: #FFFFFF; 
  padding: 0.75rem; 
  border-radius: 8px; 
  margin-bottom: 0.75rem; 
  border: 1px solid var(--border-light);
}
.card-error-msg { font-size: 0.8rem; color: var(--accent-danger); background: #FEE2E2; padding: 0.5rem; border-radius: 6px; margin-bottom: 0.75rem; }

.card-bottom { display: flex; justify-content: space-between; gap: 0.5rem; }
.delete-btn { font-size: 0.85rem; color: var(--text-muted); }
.delete-btn:hover { color: var(--accent-danger); }
.fire-btn { font-size: 0.85rem; color: var(--accent-teal); font-weight: 600; }
.fire-btn:hover { text-decoration: underline; }

/* Day Actions */
.day-action-bar { margin-bottom: 1.25rem; }

/* Logs View */
.logs-container {
  display: flex; flex-direction: column; gap: 0.5rem;
}
.log-entry {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #FAFAFA;
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--border-strong);
  font-size: 0.85rem;
}
.log-entry.info { border-left-color: var(--accent-info); }
.log-entry.success { border-left-color: var(--accent-success); }
.log-entry.warning { border-left-color: var(--accent-warning); }
.log-entry.error { border-left-color: var(--accent-danger); }
.log-time { color: var(--text-muted); margin-bottom: 0.25rem; font-size: 0.75rem; }
.log-message { color: var(--text-primary); font-weight: 500; }
.log-details { margin-top: 0.5rem; padding: 0.5rem; background: #FFFFFF; border-radius: 4px; font-family: monospace; font-size: 0.75rem; color: var(--text-secondary); border: 1px solid var(--border-light); overflow-x: auto; }

/* Connection Info */
.info-row {
  display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--border-light);
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-secondary); font-size: 0.85rem; }
.info-value { font-weight: 600; color: var(--text-primary); font-size: 0.85rem; }

.spinner {
  width: 36px; height: 36px; border: 3px solid rgba(0, 0, 0, 0.08); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin 0.9s linear infinite; margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* Light Mode Autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
  -webkit-text-fill-color: #111B21 !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Custom Select Dropdown Styling */
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2354656F%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem top 50%;
  background-size: 0.65rem auto;
}

select option {
  background-color: #FFFFFF;
  color: var(--text-primary);
  padding: 0.5rem;
}

/* Custom File Input Styling */
input[type="file"]::file-selector-button {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-right: 1rem;
  transition: var(--transition);
  font-family: inherit;
  font-size: 0.85rem;
}
input[type="file"]::file-selector-button:hover {
  background: #E2E8F0;
  border-color: var(--accent-primary);
}

/* Quadrants UI */
.quadrants-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.variation-quadrant {
  background: #FAFAFA;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: all 0.2s;
}
.variation-quadrant.inactive {
  opacity: 0.5;
  filter: grayscale(1);
}

.quadrant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.quadrant-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #CBD5E1;
  transition: .3s;
  border-radius: 20px;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input:checked + .toggle-slider {
  background-color: var(--accent-primary);
}
input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* ==========================================================
   Menu lateral e selo do topo — paleta do logo
   (verde WhatsApp, verde-petróleo, azul-marinho do nome e dourado do Dono)
   ========================================================== */
.sidebar {
  background: linear-gradient(180deg, #FFFFFF 0%, #F6FCF8 55%, #EAF7F0 100%);
  border-right: 1px solid rgba(18, 140, 126, 0.14);
  box-shadow: 4px 0 24px -12px rgba(7, 94, 84, 0.25);
}
.sidebar-logo {
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(37, 211, 102, 0.55), rgba(18, 140, 126, 0.55), transparent) 1;
}

.nav-item {
  color: #2F3E46;
  border-left: none;
  position: relative;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-item > i.ph {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #FFFFFF;
  background: var(--tile, linear-gradient(135deg, #34E07A, #128C7E));
  box-shadow: 0 6px 14px -6px var(--tile-glow, rgba(18, 140, 126, 0.6)), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#nav-status      { --tile: linear-gradient(135deg, #3BE57F 0%, #25D366 45%, #128C7E 100%); --tile-glow: rgba(18, 140, 126, 0.65); }
#nav-evolution   { --tile: linear-gradient(135deg, #A78BFA 0%, #7C3AED 50%, #5B21B6 100%); --tile-glow: rgba(91, 33, 182, 0.55); }
#nav-financeiro  { --tile: linear-gradient(135deg, #2C6E8F 0%, #164863 50%, #0F2A3D 100%); --tile-glow: rgba(15, 42, 61, 0.55); }
#nav-admin       { --tile: linear-gradient(135deg, #FDE047 0%, #F59E0B 50%, #B45309 100%); --tile-glow: rgba(217, 119, 6, 0.6); }
#nav-clientconns { --tile: linear-gradient(135deg, #38BDF8 0%, #0284C7 50%, #075985 100%); --tile-glow: rgba(3, 105, 161, 0.55); }

.nav-item:hover {
  background: linear-gradient(90deg, rgba(37, 211, 102, 0.12), rgba(37, 211, 102, 0));
  color: #075E54;
  transform: translateX(2px);
}
.nav-item:hover > i.ph { transform: scale(1.06); }

.nav-item.active {
  background: linear-gradient(90deg, rgba(37, 211, 102, 0.22) 0%, rgba(18, 140, 126, 0.08) 70%, rgba(18, 140, 126, 0) 100%);
  color: #075E54;
  font-weight: 700;
  border-left: none;
  box-shadow: inset 4px 0 0 #25D366;
}
.nav-item.active > i.ph {
  box-shadow: 0 0 0 3px #FFFFFF, 0 8px 18px -6px var(--tile-glow, rgba(18, 140, 126, 0.6));
}

/* Painel do Dono: dourado forte, legível no branco */
#nav-admin { color: #A16207; font-weight: 700; }
#nav-admin:hover {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.22), rgba(251, 191, 36, 0));
  color: #854D0E;
}
#nav-admin.active {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.32) 0%, rgba(245, 158, 11, 0.10) 70%, rgba(245, 158, 11, 0) 100%);
  color: #854D0E;
  box-shadow: inset 4px 0 0 #F59E0B;
}

/* Cartão do usuário no rodapé do menu (agora no formato dos itens do menu) */
#sidebar-user-name { color: #0F2A3D !important; }
#sidebar-user-plan { color: #0B7A5A !important; font-weight: 600 !important; }

/* Selo do topo (plano / acesso) */
#header-trial-badge { transition: box-shadow 0.2s ease, transform 0.2s ease; }
#header-trial-badge[data-tone="admin"] {
  background: linear-gradient(135deg, #0F2A3D 0%, #075E54 55%, #128C7E 100%) !important;
  border: 1px solid #F5C542 !important;
  color: #FDE68A !important;
  box-shadow: 0 6px 18px -6px rgba(7, 94, 84, 0.6), 0 0 0 3px rgba(245, 197, 66, 0.18);
  letter-spacing: 0.01em;
}
#header-trial-badge[data-tone="admin"] > i.ph { color: #FBBF24 !important; }
#header-trial-badge[data-tone="active"] {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
  border: 1px solid rgba(7, 94, 84, 0.35) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 18px -6px rgba(18, 140, 126, 0.65);
}
#header-trial-badge[data-tone="active"] > i.ph { color: #FFFFFF !important; }
#header-trial-badge[data-tone="coupon"] {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.16), rgba(18, 140, 126, 0.10)) !important;
  border: 1px solid rgba(18, 140, 126, 0.5) !important;
  color: #075E54 !important;
}
#header-trial-badge[data-tone="coupon"] > i.ph { color: #128C7E !important; }
#header-trial-badge[data-tone="overdue"] {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A) !important;
  border: 1px solid #F59E0B !important;
  color: #92400E !important;
}
#header-trial-badge[data-tone="overdue"] > i.ph { color: #D97706 !important; }
#header-trial-badge[data-tone="pending"] {
  background: linear-gradient(135deg, #FEE2E2, #FECACA) !important;
  border: 1px solid #EF4444 !important;
  color: #991B1B !important;
}
#header-trial-badge[data-tone="pending"] > i.ph { color: #DC2626 !important; }

/* Vídeos na galeria e nos cartões */
.gallery-video-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(15, 42, 61, 0.82);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 600;
  pointer-events: none;
}
video.gallery-item { display: block; }
video.card-img-preview { background: #000; }

/* Zoom de 80% em telas de computador (celular e tablet continuam em 100%) */
@media (min-width: 1024px) {
  :root { --app-zoom: 0.8; }
  html { zoom: var(--app-zoom); }
}

/* Galeria da Área de Trabalho: sempre 3 miniaturas por linha, todas do mesmo tamanho
   (com 1 imagem ela ocupa 1 quadro e deixa 2 vazios; com 9 são 3 linhas de 3) */
.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 0.5rem;
  min-height: 0;
}
.gallery-grid > p {
  grid-column: 1 / -1 !important;
}
.gallery-grid > div {
  min-width: 0;
}
.gallery-video-badge {
  left: 4px;
  bottom: 4px;
  padding: 1px 6px;
  font-size: 0.6rem;
}
.gallery-item-delete {
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  font-size: 12px;
}

/* Agendar em mais dias */
.md-open-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.6rem 1rem; border-radius: var(--radius-md); cursor: pointer;
  background: rgba(37, 211, 102, 0.08); color: var(--accent-teal);
  border: 1px dashed rgba(18, 140, 126, 0.55); font-weight: 600; font-size: 0.88rem;
  transition: var(--transition);
}
.md-open-btn:hover { background: rgba(37, 211, 102, 0.16); border-style: solid; }
.md-summary { margin-top: 0.5rem; font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; text-align: center; }
.md-summary strong { color: var(--accent-teal); }
.md-hint { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.45; margin: 0 0 0.85rem 0; }
.md-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.md-nav span { font-weight: 700; font-size: 0.98rem; color: var(--text-primary); text-transform: capitalize; }
.md-nav button {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: #FFFFFF; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.md-nav button:hover { background: var(--bg-primary); color: var(--text-primary); }
.md-weekdays, .md-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.md-weekdays button {
  border: none; background: none; cursor: pointer; padding: 0.3rem 0;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; color: var(--text-muted); border-radius: 6px;
}
.md-weekdays button:hover { background: rgba(37, 211, 102, 0.12); color: var(--accent-teal); }
.md-grid { margin: 0.25rem 0 0.75rem 0; }
.md-day {
  aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--border-light); background: #FFFFFF;
  font-size: 0.85rem; font-weight: 600; color: var(--text-primary); cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.md-day:hover:not(:disabled) { border-color: var(--accent-primary); background: rgba(37, 211, 102, 0.1); }
.md-day.md-selected { background: linear-gradient(135deg, #25D366, #128C7E); border-color: #128C7E; color: #FFFFFF; box-shadow: 0 3px 8px -2px rgba(18, 140, 126, 0.55); }
.md-day.md-today { box-shadow: inset 0 0 0 2px rgba(18, 140, 126, 0.45); }
.md-day.md-selected.md-today { box-shadow: 0 3px 8px -2px rgba(18, 140, 126, 0.55); }
.md-day:disabled { cursor: not-allowed; background: #F1F5F9; color: #B6C0CC; border-color: transparent; }
.md-day.md-base:disabled { background: rgba(245, 158, 11, 0.14); color: #B45309; border-color: rgba(245, 158, 11, 0.4); cursor: default; }
.md-empty { aspect-ratio: 1; }
.md-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.md-link { background: none; border: none; color: var(--accent-teal); font-weight: 600; cursor: pointer; font-size: 0.8rem; text-decoration: underline; }

/* Cartões de status já postados */
.post-sent-info { margin: 0 0 0.75rem 0; font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }
.post-sent-info > div:first-child { color: #047857; font-weight: 600; display: flex; align-items: center; gap: 0.3rem; }
.sent-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.25rem; }
.sent-chip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.12rem 0.5rem; border-radius: 9999px; background: rgba(37, 211, 102, 0.1); border: 1px solid rgba(18, 140, 126, 0.25); color: #075E54; font-size: 0.72rem; font-weight: 600; }
.sent-chip.muted { background: var(--bg-primary); border-color: var(--border-light); color: var(--text-muted); font-weight: 500; }
.post-view-link { cursor: pointer; border-radius: 8px; transition: var(--transition); }
.post-view-link:hover { background: rgba(37, 211, 102, 0.07); }
.dup-btn { font-size: 0.85rem; color: var(--text-primary); cursor: pointer; }
.dup-btn:hover { color: var(--accent-teal); }
.md-time-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; padding: 0.55rem 0.75rem; background: var(--bg-primary); border-radius: var(--radius-md); }
.md-time-row label { margin: 0; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.md-time-row input { width: auto; padding: 0.35rem 0.5rem; }
/* Janela "ver o que foi postado" */
.pv-media { display: flex; justify-content: center; margin-bottom: 0.75rem; }
.pv-media img, .pv-media video { max-width: 100%; max-height: 52vh; border-radius: var(--radius-md); background: #000; }
.pv-text { width: 100%; min-height: 150px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; border-radius: var(--radius-md); background: linear-gradient(135deg, #075E54, #128C7E); color: #FFFFFF; font-size: 1.15rem; font-weight: 600; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.pv-caption { padding: 0.6rem 0.8rem; margin-bottom: 0.75rem; background: var(--bg-primary); border-radius: var(--radius-md); font-size: 0.9rem; color: var(--text-primary); white-space: pre-wrap; word-break: break-word; }
.pv-details { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.82rem; }
.pv-row { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border-light); }
.pv-row > span:first-child { color: var(--text-secondary); flex-shrink: 0; }
.pv-row > span:last-child { color: var(--text-primary); font-weight: 600; text-align: right; }
.pv-row .sent-chips { justify-content: flex-end; margin-top: 0; }

/* Olhinho de mostrar/esconder a senha */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-eye {
  position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 1.2rem; background: transparent;
}
.pw-eye:hover { color: var(--accent-teal); background: rgba(37, 211, 102, 0.08); }
.pw-eye[aria-pressed="true"] { color: var(--accent-teal); }
.pw-eye:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 1px; }
.pw-wrap input::-ms-reveal, .pw-wrap input::-ms-clear { display: none; }

/* Rodapé do menu lateral: conta, meus dados e sair no mesmo formato dos itens de cima */
.sidebar-bottom {
  margin-top: auto; padding-top: 0.9rem;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(37, 211, 102, 0.45), rgba(18, 140, 126, 0.45), transparent) 1;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.sidebar-bottom .nav-item { width: 100%; text-align: left; font-family: inherit; }
#sidebar-user-card { --tile: linear-gradient(135deg, #34D399 0%, #128C7E 50%, #075E54 100%); --tile-glow: rgba(7, 94, 84, 0.55); cursor: default; }
#sidebar-user-card:hover { background: none; transform: none; }
#sidebar-user-card:hover > i.ph { transform: none; }
.sidebar-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
#sidebar-user-name { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sidebar-user-plan { font-size: 0.74rem; font-weight: 600; color: var(--accent-teal); }
#btn-my-data { --tile: linear-gradient(135deg, #5EEAD4 0%, #14B8A6 50%, #0F766E 100%); --tile-glow: rgba(15, 118, 110, 0.55); }
.nav-item-danger { color: #DC2626; --tile: linear-gradient(135deg, #FCA5A5 0%, #EF4444 50%, #B91C1C 100%); --tile-glow: rgba(185, 28, 28, 0.5); }
.nav-item-danger:hover { background: linear-gradient(90deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0)); color: #B91C1C; }

/* ===== Excluir status que está em vários dias ===== */
.dc-head { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 1rem; }
.dc-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(239, 68, 68, 0.1); color: #DC2626; font-size: 1.35rem; }
.dc-head p { margin: 0; font-size: 0.86rem; line-height: 1.45; color: var(--text-secondary); }
.dc-head p strong { color: var(--text-primary); }
.dc-options { display: flex; flex-direction: column; gap: 0.5rem; }
.dc-option { display: flex; align-items: center; gap: 0.75rem; width: 100%; text-align: left; padding: 0.7rem 0.8rem; border-radius: 12px; border: 1px solid var(--border-strong); background: #FFFFFF; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.dc-option:hover { border-color: var(--accent-primary); background: rgba(37, 211, 102, 0.06); transform: translateY(-1px); }
.dc-opt-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(18, 140, 126, 0.1); color: var(--accent-teal); font-size: 1.15rem; }
.dc-opt-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.dc-opt-text strong { font-size: 0.9rem; color: var(--text-primary); }
.dc-opt-text small { font-size: 0.75rem; color: var(--text-muted); }
.dc-option.dc-danger { border-color: rgba(239, 68, 68, 0.35); }
.dc-option.dc-danger:hover { border-color: #EF4444; background: rgba(239, 68, 68, 0.06); }
.dc-option.dc-danger .dc-opt-icon { background: rgba(239, 68, 68, 0.1); color: #DC2626; }
.dc-option.dc-danger strong { color: #DC2626; }
.dc-cancel { display: block; width: 100%; margin-top: 0.75rem; padding: 0.55rem; background: none; border: none; color: var(--text-secondary); font-weight: 600; font-size: 0.85rem; cursor: pointer; }
.dc-cancel:hover { color: var(--text-primary); }

/* agenda no modo excluir: dias do status com borda vermelha; marcados em vermelho */
.md-del-mode .md-day.md-has { border-color: #F87171; color: #B91C1C; font-weight: 700; }
.md-del-mode .md-day.md-has:hover:not(:disabled) { border-color: #EF4444; background: rgba(239, 68, 68, 0.08); }
.md-del-mode .md-day.md-selected { background: linear-gradient(135deg, #F87171, #DC2626); border-color: #DC2626; color: #FFFFFF; box-shadow: 0 3px 8px -2px rgba(220, 38, 38, 0.55); }
.md-del-mode .md-weekdays button:hover { background: rgba(239, 68, 68, 0.1); color: #DC2626; }
.md-del-mode #md-confirm { background: linear-gradient(135deg, #EF4444, #B91C1C); box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3); }
/* dia marcado continua preenchido mesmo com o mouse/dedo em cima */
.md-day.md-selected:hover:not(:disabled) { background: linear-gradient(135deg, #25D366, #128C7E); border-color: #128C7E; color: #FFFFFF; }
.md-del-mode .md-day.md-has.md-selected:hover:not(:disabled) { background: linear-gradient(135deg, #F87171, #DC2626); border-color: #DC2626; color: #FFFFFF; }

/* ===== Escolher horário (janela própria) ===== */
.tp-field-wrap { position: relative; display: block; }
.tp-field-wrap .tp-field { cursor: pointer; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; padding-right: 2.6rem !important; caret-color: transparent; }
.tp-field-wrap .tp-field:hover { border-color: var(--accent-primary) !important; }
.tp-field-icon { position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--accent-teal); font-size: 1.15rem; pointer-events: none; }
.tp-field-small { display: inline-block; width: 120px; }
.tp-field-small .tp-field { padding: 0.4rem 2.2rem 0.4rem 0.7rem !important; }
.tp-field-small .tp-field-icon { right: 0.6rem; font-size: 1rem; }

.tp-display { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin-bottom: 0.85rem; }
.tp-unit { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.tp-num { min-width: 84px; text-align: center; font-size: 2.6rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; color: #0F5C52; background: linear-gradient(180deg, rgba(37, 211, 102, 0.12), rgba(18, 140, 126, 0.12)); border: 1.5px solid rgba(18, 140, 126, 0.25); border-radius: 16px; padding: 0.3rem 0.6rem; }
.tp-colon { font-size: 2.4rem; font-weight: 800; color: var(--accent-teal); margin-top: -0.2rem; }
.tp-arrow { width: 40px; height: 26px; border-radius: 9999px; border: none; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s; }
.tp-arrow:hover { background: rgba(18, 140, 126, 0.1); color: var(--accent-teal); }
.tp-warn { display: flex; align-items: center; gap: 0.35rem; margin: -0.3rem 0 0.75rem; padding: 0.45rem 0.65rem; border-radius: 10px; background: rgba(239, 68, 68, 0.08); color: #B91C1C; font-size: 0.78rem; font-weight: 600; }
.tp-warn.hidden { display: none; }
.tp-section-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 0.4rem; }
.tp-hours { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.85rem; }
.tp-period { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 0.4rem; }
.tp-period-label { font-size: 0.74rem; font-weight: 600; color: var(--text-secondary); }
.tp-period-hours, .tp-mins { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.3rem; }
.tp-mins { margin-bottom: 1rem; }
.tp-hours button, .tp-mins button { padding: 0.42rem 0; border-radius: 10px; border: 1px solid var(--border-strong); background: #FFFFFF; color: var(--text-primary); font-weight: 600; font-size: 0.86rem; font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.1s; }
.tp-hours button:hover, .tp-mins button:hover { border-color: var(--accent-primary); background: rgba(37, 211, 102, 0.08); }
.tp-hours button:active, .tp-mins button:active { transform: scale(0.95); }
.tp-hours button.tp-on, .tp-mins button.tp-on, .tp-hours button.tp-on:hover, .tp-mins button.tp-on:hover { background: linear-gradient(135deg, #25D366, #128C7E); border-color: #128C7E; color: #FFFFFF; box-shadow: 0 3px 8px -2px rgba(18, 140, 126, 0.55); }
.tp-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 0.5rem; }
.tp-cancel { border: 1px solid var(--border-strong); background: #FFFFFF; border-radius: var(--radius-md); font-weight: 600; color: var(--text-secondary); cursor: pointer; }
.tp-cancel:hover { color: var(--text-primary); border-color: var(--text-muted); }
.tp-confirm { margin: 0 !important; width: 100%; }
.md-time-row .tp-field-small { flex-shrink: 0; }
.md-time-row .tp-field-small .tp-field { width: 100% !important; }

/* ===== Cupom dentro do sistema ===== */
.cp-hero { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 1rem; }
.cp-hero-icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #FEF9C3, #FDE68A); color: #854D0E; font-size: 1.5rem; }
.cp-hero p { margin: 0; font-size: 0.88rem; line-height: 1.45; color: var(--text-secondary); }
.cp-form { display: flex; gap: 0.5rem; }
.cp-form input { flex: 1; min-width: 0; text-transform: uppercase; font-weight: 700; letter-spacing: 0.06em; }
.cp-form input::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; }
.cp-form .submit-btn { width: auto !important; margin: 0 !important; padding: 0 1.2rem; white-space: nowrap; }
.cp-msg { margin: 0.75rem 0 0; padding: 0.55rem 0.75rem; border-radius: 10px; font-size: 0.84rem; font-weight: 600; line-height: 1.4; }
.cp-msg.hidden { display: none; }
.cp-msg.ok { background: rgba(16, 185, 129, 0.1); color: #047857; border: 1px solid rgba(16, 185, 129, 0.3); }
.cp-msg.error { background: rgba(239, 68, 68, 0.08); color: #B91C1C; border: 1px solid rgba(239, 68, 68, 0.25); }
.cp-active { margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--border-light); }
.cp-active.hidden { display: none; }
.cp-active-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.45rem; }
.cp-active-item { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--text-secondary); padding: 0.2rem 0; }
.cp-active-item i { color: #10B981; font-size: 1.1rem; }
.cp-active-item strong { color: var(--text-primary); }
.plan-coupon-line a { font-weight: 700; }

/* ===== Sair da conta (confirmação) ===== */
.lo-box { position: relative; max-width: 400px; width: 92%; padding: 1.9rem 1.6rem 1.5rem !important; text-align: center; border-radius: 20px; background: #FFFFFF; }
.lo-close { position: absolute; top: 0.85rem; right: 0.85rem; }
.lo-icon { width: 60px; height: 60px; margin: 0 auto 0.9rem; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: rgba(239, 68, 68, 0.1); color: #DC2626; font-size: 1.9rem; }
.lo-title { font-size: 1.3rem; margin: 0 0 0.45rem; color: var(--text-primary); }
.lo-text { font-size: 0.88rem; line-height: 1.5; color: var(--text-secondary); margin: 0 0 1.35rem; }
.lo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.lo-cancel, .lo-confirm { padding: 0.75rem 0.5rem; border-radius: var(--radius-md); font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; }
.lo-cancel { background: #FFFFFF; color: var(--text-primary); border: 1px solid var(--border-strong); }
.lo-cancel:hover { border-color: var(--accent-primary); background: rgba(37, 211, 102, 0.06); }
.lo-confirm { background: linear-gradient(135deg, #EF4444, #B91C1C); color: #FFFFFF; border: none; box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3); }
.lo-confirm:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4); }
.lo-confirm:disabled { opacity: 0.75; cursor: default; transform: none; }
@media (max-width: 420px) { .lo-actions { grid-template-columns: 1fr; } .lo-confirm { order: -1; } }

/* ===== Upgrade de plano ===== */
#btn-header-upgrade i { vertical-align: -2px; }
.plan-card.plan-card-lower { opacity: 0.55; background: #FAFBFC; box-shadow: none; }
.plan-card.plan-card-lower .plan-note a { font-weight: 700; color: var(--accent-teal); text-decoration: underline; }
.plan-card.plan-card-current { border: 2px solid #CBD5E1; }
.plan-card .plan-badge.plan-badge-current { background: #64748B; box-shadow: none; }
.plan-card.plan-card-up { border: 2px solid var(--accent-primary); background: linear-gradient(180deg, rgba(37, 211, 102, 0.08), #FFFFFF 42%); box-shadow: 0 12px 32px rgba(18, 140, 126, 0.16); }
.plan-card .plan-gains, .plan-card .plan-bonus { display: flex; align-items: flex-start; gap: 0.35rem; margin-bottom: 0.25rem; }
.plan-card .plan-gains { color: #047857; font-weight: 600; }
.plan-card .plan-bonus { color: #854D0E; }
.plan-card .plan-bonus strong { color: #854D0E !important; }
.plan-card .plan-gains i, .plan-card .plan-bonus i { margin-top: 0.15rem; }
.plan-card .btn-plan-upgrade { width: 100%; padding: 0.78rem; font-size: 0.92rem; font-weight: 700; border-radius: 12px; cursor: pointer; border: none; color: #FFFFFF; background: linear-gradient(135deg, #25D366, #128C7E); box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35); display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; transition: transform 0.15s, filter 0.15s; }
.plan-card .btn-plan-upgrade:hover { transform: translateY(-1px); filter: brightness(1.04); }
.plan-card .btn-plan-upgrade:disabled { opacity: 0.7; cursor: default; transform: none; }

.ux-box { max-width: 540px; width: 94%; max-height: calc(94 * var(--vh, 1vh)); overflow-y: auto; }
.ux-flow { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; color: var(--text-muted); }
.ux-chip { padding: 0.35rem 0.85rem; border-radius: 9999px; background: var(--bg-primary); border: 1px solid var(--border-strong); font-weight: 700; font-size: 0.86rem; color: var(--text-secondary); }
.ux-chip-new { background: linear-gradient(135deg, #25D366, #128C7E); color: #FFFFFF; border-color: transparent; }
.ux-steps { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.ux-steps li { display: flex; gap: 0.7rem; align-items: flex-start; }
.ux-steps li > div { flex: 1; min-width: 0; }
.ux-steps strong { font-size: 0.9rem; color: var(--text-primary); }
.ux-steps p { margin: 0.2rem 0 0; font-size: 0.84rem; line-height: 1.45; color: var(--text-secondary); }
.ux-n { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: rgba(18, 140, 126, 0.12); color: var(--accent-teal); font-weight: 800; font-size: 0.82rem; display: flex; align-items: center; justify-content: center; margin-top: 0.05rem; }
.ux-math { margin-top: 0.35rem; padding: 0.5rem 0.75rem; border-radius: 10px; background: #F8FAFC; border: 1px dashed #CBD5E1; font-size: 0.9rem; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.ux-math b { color: #047857; }
.ux-small { font-size: 0.74rem !important; color: var(--text-muted) !important; }
.ux-total { border-radius: 14px; background: linear-gradient(180deg, rgba(37, 211, 102, 0.08), rgba(37, 211, 102, 0.02)); border: 1px solid rgba(37, 211, 102, 0.3); padding: 0.75rem 0.95rem; margin-bottom: 0.9rem; }
.ux-row { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.88rem; color: var(--text-secondary); padding: 0.25rem 0; font-variant-numeric: tabular-nums; }
.ux-row strong { color: var(--text-primary); }
.ux-plus { color: #047857; font-weight: 700; }
.ux-row-total { border-top: 1px solid rgba(18, 140, 126, 0.25); margin-top: 0.3rem; padding-top: 0.55rem; font-size: 0.95rem; color: var(--text-primary); }
.ux-row-total strong { color: #047857; text-align: right; }
.ux-notes { list-style: none; padding: 0; margin: 0 0 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.45; }
.ux-notes li { display: flex; gap: 0.45rem; align-items: flex-start; }
.ux-notes i { color: #10B981; font-size: 1.05rem; margin-top: 0.05rem; flex-shrink: 0; }
.ux-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 0.6rem; }
.ux-go { padding: 0.75rem 0.6rem; border-radius: var(--radius-md); font-weight: 700; font-size: 0.9rem; cursor: pointer; border: none; color: #FFFFFF; background: linear-gradient(135deg, #25D366, #128C7E); box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35); display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; }
.ux-go:hover { filter: brightness(1.04); }
.ux-go:disabled { opacity: 0.75; cursor: default; }
@media (max-width: 480px) { .ux-actions { grid-template-columns: 1fr; } .ux-go { order: -1; } }
/* botões da conta do upgrade sempre visíveis no rodapé da janela */
.ux-box .modal-body { padding-bottom: 0 !important; }
.ux-actions { position: sticky; bottom: 0; background: #FFFFFF; padding: 0.7rem 0 1rem; margin-top: 0.2rem; border-top: 1px solid var(--border-light); z-index: 2; }
@media (max-height: 760px) {
  .ux-flow { margin-bottom: 0.6rem; }
  .ux-steps { gap: 0.45rem; margin-bottom: 0.7rem; }
  .ux-steps p { font-size: 0.8rem; }
  .ux-math { padding: 0.35rem 0.6rem; font-size: 0.85rem; }
  .ux-total { padding: 0.5rem 0.8rem; margin-bottom: 0.6rem; }
  .ux-row { padding: 0.15rem 0; font-size: 0.84rem; }
  .ux-notes { gap: 0.25rem; margin-bottom: 0.4rem; font-size: 0.78rem; }
}

/* ===== Números extras ===== */
.xp-box { max-width: 480px; width: 94%; max-height: calc(94 * var(--vh, 1vh)); overflow-y: auto; }
.xp-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
.xp-stat { background: var(--bg-primary); border: 1px solid var(--border-light); border-radius: 12px; padding: 0.55rem 0.6rem; text-align: center; display: flex; flex-direction: column; gap: 0.1rem; }
.xp-stat span { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.xp-stat strong { font-size: 1.25rem; color: var(--text-primary); }
.xp-stat-total { background: rgba(37, 211, 102, 0.1); border-color: rgba(37, 211, 102, 0.35); }
.xp-stat-total strong { color: #047857; }
.xp-used { grid-column: 1 / -1; font-size: 0.8rem; color: var(--text-secondary); text-align: center; }
.xp-buy { border: 1.5px solid rgba(37, 211, 102, 0.35); border-radius: 16px; padding: 1rem; background: linear-gradient(180deg, rgba(37, 211, 102, 0.06), #FFFFFF 60%); }
.xp-buy.hidden { display: none; }
.xp-buy-title { font-weight: 700; font-size: 0.92rem; color: var(--text-primary); text-align: center; margin-bottom: 0.6rem; }
.xp-stepper { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 0.6rem; }
.xp-stepper button { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--accent-primary); background: #FFFFFF; color: var(--accent-teal); font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.xp-stepper button:hover:not(:disabled) { background: rgba(37, 211, 102, 0.1); }
.xp-stepper button:disabled { opacity: 0.35; cursor: default; }
.xp-stepper span { min-width: 56px; text-align: center; font-size: 2.2rem; font-weight: 800; color: #0F5C52; font-variant-numeric: tabular-nums; }
.xp-calc { text-align: center; font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.xp-calc strong { color: #047857; }
.xp-after { font-size: 0.8rem; margin-top: 0.2rem; }
.xp-notes { list-style: none; padding: 0; margin: 0 0 0.9rem; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8rem; color: var(--text-secondary); }
.xp-notes li { display: flex; gap: 0.4rem; align-items: flex-start; }
.xp-notes i { color: #10B981; font-size: 1rem; margin-top: 0.05rem; flex-shrink: 0; }
.xp-go { width: 100%; }
.xp-unavailable { font-size: 0.86rem; color: var(--text-secondary); background: var(--bg-primary); border-radius: 12px; padding: 0.8rem; text-align: center; }
.xp-unavailable.hidden, .xp-packs.hidden { display: none; }
.xp-packs { margin-top: 1rem; }
.xp-packs-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.45rem; }
.xp-pack { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.6rem 0.75rem; border: 1px solid var(--border-light); border-radius: 12px; margin-bottom: 0.4rem; font-size: 0.85rem; color: var(--text-secondary); }
.xp-pack strong { color: var(--text-primary); }
.xp-pack-actions { display: flex; gap: 0.4rem; align-items: center; flex-shrink: 0; }
.xp-tag { display: inline-block; margin-top: 0.2rem; font-size: 0.72rem; font-weight: 700; padding: 0.1rem 0.5rem; border-radius: 9999px; }
.xp-tag-ok { background: rgba(16, 185, 129, 0.12); color: #047857; }
.xp-tag-wait { background: rgba(250, 204, 21, 0.2); color: #854D0E; }
.xp-tag-off { background: #F1F5F9; color: #64748B; }
.xp-tag-late { background: rgba(239, 68, 68, 0.1); color: #B91C1C; }
.xp-cancel { background: none; border: none; color: #B91C1C; font-weight: 600; font-size: 0.78rem; cursor: pointer; text-decoration: underline; }
.xp-link { font-weight: 700; font-size: 0.8rem; color: var(--accent-teal); }

/* Conexão pausada por passar do limite */
.conn-paused { display: flex; gap: 0.45rem; align-items: flex-start; margin-top: 0.7rem; padding: 0.55rem 0.7rem; border-radius: 10px; background: rgba(250, 204, 21, 0.16); border: 1px solid rgba(202, 138, 4, 0.4); color: #854D0E; font-size: 0.78rem; line-height: 1.4; }
.conn-paused i { font-size: 1.1rem; flex-shrink: 0; }
.conn-paused a { font-weight: 700; color: #854D0E; text-decoration: underline; }
.conn-paused-tag { font-size: 0.68rem; font-weight: 700; color: #854D0E; background: rgba(250, 204, 21, 0.25); padding: 0.05rem 0.4rem; border-radius: 9999px; }
.manage-extras-info { font-size: 0.78rem; color: var(--text-secondary); background: var(--bg-primary); border-radius: 8px; padding: 0.45rem 0.6rem; margin-bottom: 0.5rem; line-height: 1.5; }

/* ===== Informações do cliente: dados de cobrança e histórico ===== */
.ci-card { background: #FAFAFA; border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1.25rem; }
.ci-card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.85rem; }
.ci-card-title { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); display: flex; align-items: center; gap: 0.4rem; }
.ci-card-title i { font-size: 1.15rem; }
.ci-mini-btn { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.3rem 0.6rem; border-radius: 8px; border: 1px solid var(--border-strong); background: #FFFFFF; color: var(--text-secondary); font-size: 0.74rem; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.ci-mini-btn:hover { border-color: var(--accent-primary); color: var(--accent-teal); }
.ci-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.55rem; }
.ci-field { background: #FFFFFF; border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 0.55rem 0.7rem; min-width: 0; }
.ci-field-wide { grid-column: span 2; }
.ci-field span { display: block; font-size: 0.68rem; text-transform: uppercase; font-weight: 600; color: var(--text-muted); letter-spacing: 0.03em; }
.ci-field strong { display: block; font-size: 0.86rem; color: var(--text-primary); margin-top: 0.15rem; overflow-wrap: anywhere; }
.ci-note { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }
.ci-empty { text-align: center; padding: 1.2rem; color: var(--text-secondary); font-size: 0.82rem; background: #FFFFFF; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); }
.ci-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.5rem; margin-bottom: 0.75rem; }
.ci-summary:empty { display: none; }
.ci-summary div { background: #FFFFFF; border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 0.5rem 0.65rem; text-align: center; }
.ci-summary span { display: block; font-size: 0.66rem; text-transform: uppercase; font-weight: 600; color: var(--text-muted); }
.ci-summary strong { display: block; font-size: 0.98rem; color: var(--text-primary); margin-top: 0.1rem; }
.ci-table-wrap { overflow-x: auto; background: #FFFFFF; border: 1px solid var(--border-light); border-radius: var(--radius-md); }
.ci-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; text-align: left; }
.ci-table th { background: var(--bg-primary); color: var(--text-secondary); font-size: 0.68rem; text-transform: uppercase; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
.ci-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border-light); vertical-align: top; color: var(--text-secondary); }
.ci-table td strong { color: var(--text-primary); }
.ci-table tr:last-child td { border-bottom: none; }
.ci-table tr.ci-open td { background: #FFFBEB; }
.ci-table .ci-empty { border: none; }
.ci-method { display: inline-flex; align-items: center; gap: 0.25rem; font-weight: 700; white-space: nowrap; }
.ci-kind { display: inline-block; padding: 0.12rem 0.5rem; border-radius: 9999px; font-size: 0.7rem; font-weight: 700; background: #F1F5F9; color: #475569; white-space: nowrap; }
.ci-kind-new { background: rgba(16, 185, 129, 0.12); color: #047857; }
.ci-kind-renew { background: rgba(2, 132, 199, 0.12); color: #0369A1; }
.ci-kind-up { background: rgba(124, 58, 237, 0.12); color: #6D28D9; }
.ci-kind-extra { background: rgba(18, 140, 126, 0.12); color: #0F5C52; }
.ci-kind-late { background: rgba(239, 68, 68, 0.12); color: #B91C1C; }
.ci-kind-wait { background: rgba(250, 204, 21, 0.25); color: #854D0E; }
@media (max-width: 600px) { .ci-field-wide { grid-column: span 1; } }
.ci-table td:nth-child(4) strong, .ci-table td:first-child strong { white-space: nowrap; }

/* ===== Menu Cupons (dono) ===== */
.cpn-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.cpn-summary .section-card { padding: 1rem 1.25rem; }
.cpn-summary span { display: block; font-size: 0.72rem; color: var(--text-secondary); text-transform: uppercase; font-weight: 600; }
.cpn-summary strong { display: block; font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.cpn-filters { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cpn-filters select { width: auto; min-width: 210px; }
.cpn-filters input { flex: 1; min-width: 200px; }
.cpn-table-wrap { overflow-x: auto; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: #FFFFFF; }
.cpn-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; text-align: left; }
.cpn-table th { background: var(--bg-primary); color: var(--text-secondary); font-size: 0.7rem; text-transform: uppercase; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
.cpn-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border-light); vertical-align: top; color: var(--text-secondary); }
.cpn-table td strong { color: var(--text-primary); }
.cpn-table td small { color: var(--text-muted); }
.cpn-table tr:last-child td { border-bottom: none; }
.cpn-table a { color: inherit; text-decoration: none; }
.cpn-table a:hover strong { color: var(--accent-teal); text-decoration: underline; }
.cpn-row-arch td { opacity: 0.7; }
.cpn-code { font-family: Consolas, Menlo, monospace; letter-spacing: 0.03em; }
.cpn-empty { text-align: center; padding: 1.5rem !important; color: var(--text-secondary); }
.cpn-actions { text-align: right; white-space: nowrap; }
.cpn-actions .ci-mini-btn { margin-left: 0.25rem; }
.cpn-del:hover { border-color: #EF4444 !important; color: #DC2626 !important; }
.cpn-st { display: inline-block; padding: 0.12rem 0.55rem; border-radius: 9999px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; background: #F1F5F9; color: #475569; }
.cpn-st-on { background: rgba(16, 185, 129, 0.12); color: #047857; }
.cpn-st-off { background: #F1F5F9; color: #64748B; }
.cpn-st-warn { background: rgba(250, 204, 21, 0.22); color: #854D0E; }
.cpn-st-arch { background: rgba(100, 116, 139, 0.15); color: #475569; }
.cpn-help { font-size: 0.76rem; color: var(--text-muted); margin: 0.75rem 0 0; }
.cpn-box { max-width: 600px; width: 94%; max-height: calc(94 * var(--vh, 1vh)); overflow-y: auto; }
.cpn-box-wide { max-width: 860px; }
.cpe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.cpe-wide { grid-column: 1 / -1; }
.cpe-field label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.3rem; }
.cpe-field small { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.25rem; }
.cpe-field textarea { width: 100%; resize: vertical; }
#cpe-code { text-transform: uppercase; font-weight: 700; letter-spacing: 0.04em; font-family: Consolas, Menlo, monospace; }
#cpe-code::placeholder { text-transform: none; font-weight: 400; letter-spacing: normal; font-family: inherit; }
#cpe-code:disabled { background: var(--bg-primary) !important; color: var(--text-secondary) !important; }
.cpe-types { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.cpe-type { position: relative; cursor: pointer; margin: 0 !important; }
.cpe-type input { position: absolute; opacity: 0; }
.cpe-type > span { display: flex; flex-direction: column; gap: 0.15rem; height: 100%; padding: 0.7rem 0.8rem; border: 1.5px solid var(--border-strong); border-radius: 12px; background: #FFFFFF; transition: border-color 0.15s, background 0.15s; }
.cpe-type > span i { font-size: 1.3rem; color: var(--accent-teal); }
.cpe-type > span strong { font-size: 0.86rem; color: var(--text-primary); }
.cpe-type > span small { font-size: 0.72rem; color: var(--text-muted); line-height: 1.35; }
.cpe-type input:checked + span { border-color: var(--accent-primary); background: rgba(37, 211, 102, 0.07); box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15); }
.cpe-type input:disabled + span { opacity: 0.55; cursor: not-allowed; }
.cpe-type input:disabled:checked + span { opacity: 1; }
.cpe-active { display: flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; font-weight: 600; color: var(--text-primary); cursor: pointer; }
.cpe-active input { width: 18px; height: 18px; accent-color: #25D366; }
.cpe-preview { display: flex; gap: 0.45rem; align-items: flex-start; margin: 0.9rem 0 0; padding: 0.6rem 0.75rem; border-radius: 10px; background: rgba(18, 140, 126, 0.07); border: 1px dashed rgba(18, 140, 126, 0.35); font-size: 0.82rem; color: var(--text-secondary); }
.cpe-preview i { color: var(--accent-teal); font-size: 1.1rem; margin-top: 0.05rem; }
@media (max-width: 560px) { .cpe-grid, .cpe-types { grid-template-columns: 1fr; } }
#cpe-valid { width: 100%; background: #FFFFFF; border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 0.65rem 0.95rem; color: var(--text-primary); font-family: inherit; font-size: 0.92rem; }

/* Área de Trabalho guardada no servidor: aviso das 24h, tempo restante e envio */
.ws-keep-note { display: flex; align-items: flex-start; gap: 0.5rem; margin: -0.35rem 0 0.85rem; padding: 0.6rem 0.7rem; border-radius: var(--radius-md); background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; font-size: 0.78rem; line-height: 1.4; }
.ws-keep-note i { font-size: 1.05rem; margin-top: 1px; color: #D97706; flex-shrink: 0; }
.ws-timer { position: absolute; left: 4px; right: 4px; bottom: 4px; justify-content: center; display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border-radius: 9999px; background: rgba(15, 42, 61, 0.78); color: #FFFFFF; font-size: 0.58rem; font-weight: 600; pointer-events: none; white-space: nowrap; overflow: hidden; }
.ws-timer.urgent { background: rgba(220, 38, 38, 0.92); }
.ws-timer i { font-size: 0.7rem; }
.ws-uploading .gallery-item { opacity: 0.55; cursor: progress; }
.ws-upload { position: absolute; left: 5px; right: 5px; bottom: 5px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.ws-upload-label { align-self: flex-start; padding: 1px 6px; border-radius: 9999px; background: rgba(15, 42, 61, 0.82); color: #FFFFFF; font-size: 0.58rem; font-weight: 600; }
.ws-upload-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.75); overflow: hidden; }
.ws-upload-bar i { display: block; height: 100%; width: 0; background: var(--accent-primary); transition: width 0.2s; }
.ws-uploading .gallery-video-badge { display: none; }
.gallery-grid > div .ws-timer ~ .gallery-video-badge { top: 4px; bottom: auto; }
.wsn-icon { background: rgba(245, 158, 11, 0.12) !important; color: #D97706 !important; }
.wsn-check { display: flex; align-items: center; justify-content: center; gap: 0.45rem; margin: -0.4rem 0 1rem; font-size: 0.82rem; color: var(--text-secondary); cursor: pointer; }
.wsn-check input { width: 16px; height: 16px; accent-color: var(--accent-primary); margin: 0; }
.wsn-ok { width: 100%; margin: 0; }

/* ===== Sugestões e problemas ===== */
#feedback-fab { position: fixed; right: 27px; bottom: 160px; z-index: 900; display: block; width: 52px; height: 52px; padding: 0; border: none; background: none; cursor: pointer; }
#coupon-fab[hidden] ~ #feedback-fab { bottom: 96px; }
#feedback-fab .feedback-fab-btn { position: relative; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #A78BFA, #7C3AED); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 1.55rem; box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4); transition: transform 0.2s ease, box-shadow 0.2s ease; }
#feedback-fab .feedback-fab-label { position: absolute; right: calc(100% + 0.6rem); top: 50%; background: #111B21; color: #FFFFFF; font-size: 0.82rem; font-weight: 600; padding: 0.45rem 0.85rem; border-radius: 9999px; white-space: nowrap; box-shadow: var(--shadow-md); opacity: 0; transform: translate(8px, -50%); pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
#feedback-fab:hover .feedback-fab-label, #feedback-fab:focus-visible .feedback-fab-label { opacity: 1; transform: translate(0, -50%); }
#feedback-fab:hover .feedback-fab-btn { transform: scale(1.06); box-shadow: 0 8px 22px rgba(124, 58, 237, 0.5); }
#feedback-fab:focus-visible { outline: none; }
#feedback-fab:focus-visible .feedback-fab-btn { outline: 3px solid #111B21; outline-offset: 3px; }
@media (max-width: 600px) { #feedback-fab { right: 19px; bottom: 148px; } #coupon-fab[hidden] ~ #feedback-fab { bottom: 86px; } }

.fb-box { max-width: 460px; width: 94%; }
.fb-intro { margin: 0 0 0.9rem; font-size: 0.88rem; line-height: 1.45; color: var(--text-secondary); }
.fb-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 0.85rem; }
.fb-kind { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem; border-radius: var(--radius-md); border: 1.5px solid var(--border-light); background: #FFFFFF; cursor: pointer; text-align: left; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.fb-kind strong { display: block; font-size: 0.86rem; color: var(--text-primary); }
.fb-kind small { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
.fb-kind:hover { border-color: #C4B5FD; }
.fb-kind.active { border-color: #7C3AED; background: rgba(124, 58, 237, 0.06); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12); }
.fb-kind-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.fb-kind-icon.idea { background: #FEF3C7; color: #B45309; }
.fb-kind-icon.bug { background: #FEE2E2; color: #DC2626; }
#fb-message { width: 100%; min-height: 120px; resize: vertical; font-family: inherit; font-size: 0.9rem; line-height: 1.45; }
.fb-count { text-align: right; font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem; }
.fb-send { width: 100%; margin-top: 0.75rem; background: linear-gradient(135deg, #8B5CF6, #6D28D9) !important; color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; }
.fb-done { text-align: center; padding: 0.5rem 0 0.25rem; }
.fb-done-icon { width: 58px; height: 58px; margin: 0 auto 0.75rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(16, 185, 129, 0.12); color: #059669; font-size: 1.7rem; }
.fb-done h3 { margin: 0 0 0.35rem; font-size: 1.1rem; color: var(--text-primary); }
.fb-done p { margin: 0 0 1rem; font-size: 0.88rem; line-height: 1.45; color: var(--text-secondary); }
.fb-mine { margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--border-light); }
.fb-mine h4 { margin: 0 0 0.5rem; font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.02em; }
.fb-mine-item { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.45rem 0; font-size: 0.8rem; color: var(--text-secondary); }
.fb-mine-item + .fb-mine-item { border-top: 1px dashed var(--border-light); }
.fb-mine-item p { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.fb-tag { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.12rem 0.5rem; border-radius: 9999px; font-size: 0.68rem; font-weight: 700; white-space: nowrap; }
.fb-tag.sugestao { background: #FEF3C7; color: #92400E; }
.fb-tag.problema { background: #FEE2E2; color: #B91C1C; }
.fb-tag.nova { background: rgba(124, 58, 237, 0.12); color: #6D28D9; }
.fb-tag.vista { background: #E2E8F0; color: #475569; }
.fb-tag.resolvida { background: rgba(16, 185, 129, 0.12); color: #047857; }

.fb-nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 9999px; background: #7C3AED; color: #FFFFFF; font-size: 0.7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.fb-nav-badge.hidden { display: none; }
.fb-list { display: flex; flex-direction: column; gap: 0.75rem; }
.fb-empty { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 1.5rem 0; margin: 0; }
.fb-card { border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 0.9rem 1rem; background: #FFFFFF; }
.fb-card.is-new { border-left: 4px solid #7C3AED; }
.fb-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.55rem; }
.fb-card-who { font-size: 0.84rem; color: var(--text-primary); font-weight: 600; }
.fb-card-who small { font-weight: 400; color: var(--text-muted); }
.fb-card-date { margin-left: auto; font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; }
.fb-card-msg { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--text-primary); white-space: pre-wrap; word-break: break-word; }
.fb-card-meta { margin-top: 0.5rem; font-size: 0.72rem; color: var(--text-muted); }
.fb-card-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.fb-card-actions button { padding: 0.35rem 0.7rem; font-size: 0.76rem; border-radius: 8px; border: 1px solid var(--border-strong); background: #FFFFFF; color: var(--text-primary); cursor: pointer; display: inline-flex; align-items: center; gap: 0.3rem; }
.fb-card-actions button:hover { border-color: #7C3AED; background: rgba(124, 58, 237, 0.05); }
.fb-card-actions button.wa { border-color: rgba(37, 211, 102, 0.5); color: #15803D; }
.fb-card-actions button.danger { border-color: rgba(239, 68, 68, 0.4); color: #DC2626; }

/* Agendar sem WhatsApp conectado */
.nc-icon { background: rgba(37, 211, 102, 0.12) !important; color: #16A34A !important; }
.lo-confirm.nc-go { background: linear-gradient(135deg, #25D366, #128C7E); box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3); }
.lo-confirm.nc-go:hover { box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4); }
