/* LovaStore - Premium UI v6.0 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --ql-bg: #050505;
  --ql-bg-elevated: #111111;
  --ql-bg-surface: #1C1C1E;
  --ql-bg-hover: #2B2B2F;
  --ql-border: rgba(255,255,255,0.06);
  --ql-border-hover: rgba(255,255,255,0.12);
  --ql-text-primary: #F5F5F5;
  --ql-text-secondary: #7EF9FF;
  --ql-text-muted: #71717a;
  --ql-accent: #B028FF;
  --ql-accent-hover: #00D4FF;
  --ql-accent-glow: rgba(255,59,59,0.25);
  --ql-accent-subtle: rgba(176, 40, 255,0.08);
  --ql-success: #34d399;
  --ql-success-bg: rgba(52,211,153,0.08);
  --ql-warning: #fbbf24;
  --ql-warning-bg: rgba(251,191,36,0.08);
  --ql-danger: #f87171;
  --ql-danger-bg: rgba(248,113,113,0.08);
  --ql-radius: 16px;
  --ql-radius-sm: 10px;
  --ql-radius-xs: 8px;
  --ql-shadow: 0 24px 80px -12px rgba(0,0,0,0.6), 0 0 0 1px var(--ql-border);
  --ql-shadow-hover: 0 32px 100px -12px rgba(0,0,0,0.7), 0 0 0 1px var(--ql-border-hover);
  --ql-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --ql-glass: rgba(17,17,19,0.85);
}

/* ===== MAIN CONTAINER ===== */
#ql-floating {
  position: fixed;
  width: 400px;
  z-index: 999999999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  border-radius: var(--ql-radius);
  overflow: hidden;
  background: var(--ql-bg);
  border: 1px solid var(--ql-border);
  box-shadow: var(--ql-shadow);
  transition:
    width 0.34s cubic-bezier(0.34, 1.56, 0.64, 1),
    height 0.34s cubic-bezier(0.34, 1.56, 0.64, 1),
    min-height 0.34s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-radius 0.34s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow var(--ql-transition);
  display: flex;
  flex-direction: column;
  min-height: 60px;
  overflow-y: auto;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#ql-floating:hover {
  box-shadow: var(--ql-shadow-hover);
}

#ql-floating * {
  box-sizing: border-box;
}

/* Ensure all interactive elements are clickable */
#ql-floating button,
#ql-floating input,
#ql-floating textarea,
#ql-floating label,
#ql-floating a,
#ql-floating select {
  pointer-events: auto !important;
  position: relative;
  z-index: 1;
}

/* ===== MINIMIZED ===== */
#ql-floating.ql-minimized {
  width: 56px !important;
  height: 56px !important;
  min-height: 56px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-shadow: 0 8px 32px var(--ql-accent-glow), 0 0 0 1.5px var(--ql-accent) !important;
  background: var(--ql-bg-elevated) !important;
  border: none !important;
  cursor: pointer !important;
  animation: ql-minimize-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#ql-floating.ql-minimized:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px var(--ql-accent-glow), 0 0 0 2px var(--ql-accent-hover) !important;
}

#ql-floating.ql-minimized #ql-body,
#ql-floating.ql-minimized #ql-footer,
#ql-floating.ql-minimized #ql-resize-handle,
#ql-floating.ql-minimized #ql-notif-panel {
  display: none !important;
}

#ql-floating.ql-minimized #ql-header {
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  background: transparent !important;
  border-bottom: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: grab !important;
}

#ql-floating.ql-minimized #ql-header:active {
  cursor: grabbing !important;
}

#ql-floating.ql-minimized .ql-header-left {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  gap: 0 !important;
}

#ql-floating.ql-minimized .ql-brand,
#ql-floating.ql-minimized .ql-header-left {
  font-size: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#ql-floating.ql-minimized .ql-header-left img {
  display: block !important;
  width: 58px !important;
  height: 38px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  box-shadow: 0 0 10px var(--ql-accent-glow);
  animation: ql-pulse-border 2s infinite ease-in-out;
}

#ql-floating.ql-minimized .ql-badge-pro-header,
#ql-floating.ql-minimized .ql-dot,
#ql-floating.ql-minimized .ql-title,
#ql-floating.ql-minimized .ql-header-right {
  display: none !important;
}

@keyframes ql-pulse-border {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px var(--ql-accent-glow)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 8px var(--ql-accent-glow)); }
}
@keyframes ql-minimize-pop {
  0% { transform: scale(1) translateX(0); opacity: 1; }
  42% { transform: scale(0.88) translateX(10px); opacity: 0.82; filter: blur(1px); }
  72% { transform: scale(1.08) translateX(-2px); opacity: 1; filter: blur(0); }
  100% { transform: scale(1) translateX(0); opacity: 1; }
}
@keyframes ql-swoosh-in {
  0%   { transform: scale(1) translateX(0); opacity: 1; }
  35%  { transform: scale(0.92) translateX(8px); opacity: 0.85; filter: blur(2px); }
  70%  { transform: scale(1.02) translateX(-2px); opacity: 1; filter: blur(0); }
  100% { transform: scale(1) translateX(0); }
}
#ql-floating:not(.ql-minimized) {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow var(--ql-transition), height 0.3s ease;
}
#ql-floating .ql-minimize-btn,
#ql-floating .ql-icon-btn {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background var(--ql-transition), color var(--ql-transition);
}
#ql-floating .ql-icon-btn:active {
  transform: scale(0.85) rotate(-8deg);
}

/* ===== HEADER ===== */
#ql-header {
  cursor: move;
  padding: 14px 18px;
  background: var(--ql-bg-elevated);
  border-bottom: 1px solid var(--ql-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  flex-shrink: 0;
}

.ql-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ql-brand {
  font-size: 14px;
  font-weight: 700;
  color: var(--ql-text-primary);
  letter-spacing: -0.02em;
}

.ql-badge-pro-header {
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--ql-accent), #0066FF);
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ql-header-right {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.ql-icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--ql-radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all var(--ql-transition);
  color: var(--ql-text-muted);
  position: relative;
}
.ql-icon-btn:hover {
  background: var(--ql-bg-hover);
  color: var(--ql-text-primary);
}

.ql-icon-btn.ql-lite-active {
  background: rgba(176, 40, 255,0.16);
  color: var(--ql-accent);
  box-shadow: inset 0 0 0 1px rgba(176, 40, 255,0.22);
}

.ql-toast-stack {
  position: absolute;
  top: 58px;
  right: 12px;
  left: 12px;
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.ql-toast {
  display: grid;
  grid-template-columns: 28px 1fr 22px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--ql-border);
  border-radius: var(--ql-radius-sm);
  background: rgba(17,17,17,0.96);
  color: var(--ql-text-primary);
  box-shadow: 0 18px 45px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.03);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: auto;
}

.ql-toast-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ql-toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  background: var(--ql-accent);
  box-shadow: 0 0 14px rgba(176, 40, 255,0.35);
}

.ql-toast-success .ql-toast-icon { background: #16a34a; box-shadow: 0 0 14px rgba(22,163,74,0.35); }
.ql-toast-error .ql-toast-icon { background: #dc2626; box-shadow: 0 0 14px rgba(220,38,38,0.35); }
.ql-toast-info .ql-toast-icon { background: var(--ql-accent); }

.ql-toast-title {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.ql-toast-message {
  margin-top: 2px;
  color: var(--ql-text-secondary);
  font-size: 11px;
  line-height: 1.35;
}

.ql-toast-close {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ql-text-muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.ql-toast-close:hover {
  background: var(--ql-bg-hover);
  color: var(--ql-text-primary);
}

/* ===== NOTIFICATION BADGE ===== */
.ql-notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 8px rgba(239,68,68,0.4);
}

/* ===== NOTIFICATION PANEL ===== */
.ql-notif-panel {
  position: absolute;
  top: 52px;
  right: 8px;
  left: 8px;
  background: var(--ql-bg-surface);
  border: 1px solid var(--ql-border);
  border-radius: 14px;
  box-shadow: 0 16px 48px -12px rgba(0,0,0,0.5);
  z-index: 10;
  max-height: 300px;
  overflow-y: auto;
  animation: ql-slide-down 0.2s ease;
}
@keyframes ql-slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ql-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ql-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--ql-text-primary);
}
.ql-notif-close-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--ql-text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--ql-transition);
}
.ql-notif-close-btn:hover { background: var(--ql-bg-hover); color: var(--ql-text-primary); }
.ql-notif-list { padding: 8px; }
.ql-notif-empty {
  text-align: center;
  color: var(--ql-text-muted);
  font-size: 12px;
  padding: 20px 0;
  margin: 0;
}
.ql-notif-item {
  padding: 12px 14px;
  border-radius: var(--ql-radius-sm);
  background: var(--ql-bg-hover);
  margin-bottom: 6px;
  border: 1px solid var(--ql-border);
  transition: all var(--ql-transition);
}
.ql-notif-item:hover {
  border-color: var(--ql-border-hover);
}
.ql-notif-item:last-child { margin-bottom: 0; }
.ql-notif-item-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ql-text-primary);
  margin-bottom: 3px;
}
.ql-notif-item-msg {
  font-size: 11px;
  color: var(--ql-text-secondary);
  margin-bottom: 6px;
  line-height: 1.5;
}
.ql-notif-link {
  font-size: 11px;
  color: var(--ql-accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity var(--ql-transition);
}
.ql-notif-link:hover { opacity: 0.8; }
.ql-notif-item-date {
  font-size: 10px;
  color: var(--ql-text-muted);
  margin-top: 6px;
}

/* ===== CUSTOM ALERT ===== */
.ql-custom-alert {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  border-radius: var(--ql-radius);
  backdrop-filter: blur(8px);
}
.ql-alert-content {
  background: var(--ql-bg-surface);
  border: 1px solid var(--ql-border);
  border-radius: var(--ql-radius);
  padding: 28px 24px;
  text-align: center;
  width: 85%;
  max-width: 300px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.6);
  animation: ql-alert-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ql-alert-in {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.ql-alert-icon { font-size: 40px; margin-bottom: 12px; }
.ql-alert-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ql-text-primary);
  margin-bottom: 8px;
}
.ql-alert-message {
  font-size: 13px;
  color: var(--ql-text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}
.ql-alert-ok-btn {
  padding: 10px 36px;
  border: none;
  border-radius: var(--ql-radius-sm);
  background: linear-gradient(135deg, var(--ql-accent), #0066FF);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ql-transition);
  box-shadow: 0 4px 16px var(--ql-accent-glow);
}
.ql-alert-ok-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--ql-accent-glow);
}

/* ===== MODO PLANO MODAL ===== */
.ql-modo-plano-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ql-transition);
  border-radius: inherit;
}
.ql-modo-plano-overlay.ql-modo-plano-visible {
  opacity: 1;
  pointer-events: auto;
}
.ql-modo-plano-modal {
  background: var(--ql-bg-elevated);
  border: 1px solid var(--ql-border);
  border-radius: var(--ql-radius);
  width: min(340px, 92%);
  padding: 20px;
  box-shadow: 0 24px 80px -12px rgba(0,0,0,0.6);
  transform: scale(0.96);
  transition: transform 0.2s ease;
}
.ql-modo-plano-visible .ql-modo-plano-modal {
  transform: scale(1);
}
.ql-modo-plano-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  border-radius: 10px;
  background: var(--ql-warning-bg);
  border: 1px solid color-mix(in srgb, var(--ql-warning) 28%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.ql-modo-plano-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ql-text-primary);
  text-align: center;
  margin-bottom: 10px;
}
.ql-modo-plano-body {
  font-size: 11px;
  line-height: 1.6;
  color: var(--ql-text-secondary);
  margin-bottom: 12px;
}
.ql-modo-plano-body strong {
  color: var(--ql-warning);
}
.ql-modo-plano-steps {
  margin-bottom: 14px;
}
.ql-modo-plano-step {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.ql-modo-plano-step:last-child {
  margin-bottom: 0;
}
.ql-modo-plano-step-num {
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ql-accent-subtle);
  border: 1px solid color-mix(in srgb, var(--ql-accent) 25%, transparent);
  color: var(--ql-accent);
  font-size: 10px;
  font-weight: 700;
}
.ql-modo-plano-step-text {
  font-size: 11px;
  line-height: 1.5;
  color: var(--ql-text-secondary);
}
.ql-modo-plano-step-text strong {
  color: var(--ql-text-primary);
}
.ql-modo-plano-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.ql-modo-plano-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--ql-accent);
}
.ql-modo-plano-check label {
  font-size: 11px;
  color: var(--ql-text-muted);
}
.ql-modo-plano-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: var(--ql-radius-sm);
  background: linear-gradient(135deg, var(--ql-accent), var(--ql-accent-hover));
  color: var(--ql-text-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ql-transition);
}
.ql-modo-plano-btn:hover {
  box-shadow: 0 0 20px -4px var(--ql-accent-glow);
  transform: translateY(-1px);
}

/* ===== BODY ===== */
#ql-body {
  padding: 18px;
  flex: 1;
  overflow-y: auto;
}

/* ===== PROFILE CARD ===== */
.ql-profile-card {
  background: var(--ql-bg-surface);
  border: 1px solid var(--ql-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  transition: border-color var(--ql-transition);
}
.ql-profile-card:hover {
  border-color: var(--ql-border-hover);
}

.ql-profile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ql-profile-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ql-profile-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ql-text-primary);
  letter-spacing: -0.01em;
}

.ql-status-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ql-badge-test {
  background: var(--ql-warning-bg);
  color: var(--ql-warning);
  border: 1px solid rgba(251,191,36,0.15);
}

.ql-badge-pro {
  background: var(--ql-success-bg);
  color: var(--ql-success);
  border: 1px solid rgba(52,211,153,0.15);
}

/* ===== SYNC STATUS ===== */
.ql-sync-status {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
  padding: 0;
}

.ql-sync-ok .ql-sync-text {
  color: var(--ql-success);
}

.ql-sync-waiting .ql-sync-text {
  color: var(--ql-warning);
}

/* ===== TRIAL COUNTDOWN ===== */
.ql-trial-countdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ql-border);
  margin-top: 8px;
}

.ql-countdown-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.ql-countdown-icon { font-size: 13px; }
.ql-countdown-label {
  color: var(--ql-text-secondary);
  font-weight: 500;
}
.ql-countdown-time {
  margin-left: auto;
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--ql-warning);
  letter-spacing: 0.03em;
}
.ql-countdown-expired {
  color: var(--ql-danger);
  font-weight: 600;
  font-size: 12px;
}
.ql-countdown-lifetime .ql-countdown-icon,
.ql-countdown-lifetime .ql-countdown-label,
.ql-countdown-lifetime .ql-countdown-time {
  color: var(--ql-success);
}

.ql-trial-bar {
  width: 100%;
  height: 6px;
  border-radius: 6px;
  background: var(--ql-bg-hover);
  overflow: hidden;
  position: relative;
}

.ql-trial-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--ql-accent), #0066FF, #38bdf8);
  background-size: 200% 100%;
  animation: ql-bar-shimmer 3s ease infinite;
  transition: width 1s ease;
  box-shadow: 0 0 8px rgba(124, 90, 255, 0.4);
}

.ql-trial-bar-fill.ql-bar-urgent {
  background: linear-gradient(90deg, #ef4444, #f97316);
  background-size: 200% 100%;
  animation: ql-bar-shimmer 1.5s ease infinite, ql-bar-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.ql-trial-bar-fill.ql-bar-expired {
  background: var(--ql-danger);
}
.ql-trial-bar-fill.ql-bar-lifetime {
  background: linear-gradient(90deg, #16a34a, #22c55e, #7EF9FF);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
}

@keyframes ql-bar-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes ql-bar-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ===== TEXTAREA ===== */
#ql-floating textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--ql-border);
  background: var(--ql-bg-surface);
  color: var(--ql-text-primary);
  font-size: 13px;
  font-family: 'Inter', -apple-system, sans-serif;
  transition: border-color var(--ql-transition), box-shadow var(--ql-transition);
  box-sizing: border-box;
  outline: none;
  resize: vertical;
  min-height: 64px;
  margin-bottom: 10px;
  line-height: 1.5;
}

#ql-floating textarea:focus {
  border-color: var(--ql-accent);
  box-shadow: 0 0 0 3px var(--ql-accent-subtle), 0 0 20px var(--ql-accent-glow);
}

#ql-floating textarea::placeholder {
  color: var(--ql-text-muted);
}

/* ===== ACTION BAR ===== */
.ql-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0;
  gap: 8px;
}

.ql-action-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ql-action-center {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ql-action-right-send {
  flex-shrink: 0;
}

.ql-tool-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--ql-border);
  background: var(--ql-bg-surface);
  border-radius: var(--ql-radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ql-transition);
  color: var(--ql-text-muted);
}
.ql-tool-btn:hover {
  background: var(--ql-accent-subtle);
  border-color: rgba(176, 40, 255,0.2);
  color: var(--ql-accent);
  box-shadow: 0 0 12px var(--ql-accent-glow);
  transform: translateY(-1px);
}
.ql-tool-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* Tool button loading */
.ql-tool-loading {
  animation: ql-spin 0.8s linear infinite;
}
@keyframes ql-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Recording indicator */
.ql-recording {
  background: var(--ql-danger-bg) !important;
  border-color: rgba(248,113,113,0.3) !important;
  color: var(--ql-danger) !important;
  animation: ql-pulse 1.5s ease-in-out infinite;
}
@keyframes ql-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248,113,113,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(248,113,113,0); }
}

.ql-toggle-label-inline {
  font-size: 10px;
  font-weight: 600;
  color: var(--ql-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===== SEND BUTTON ===== */
.ql-send-btn {
  padding: 8px 22px;
  border: none;
  border-radius: var(--ql-radius-sm);
  background: linear-gradient(135deg, var(--ql-accent), #0066FF);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ql-transition);
  box-shadow: 0 2px 12px var(--ql-accent-glow);
  letter-spacing: -0.01em;
}
.ql-send-btn:hover {
  box-shadow: 0 6px 24px var(--ql-accent-glow);
  transform: translateY(-1px);
  filter: brightness(1.1);
}
.ql-send-btn:active {
  transform: translateY(0);
  filter: brightness(0.95);
}
.ql-send-btn.ql-sending,
.ql-send-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ===== TOGGLE ===== */
.ql-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}
.ql-toggle input {
  opacity: 0; width: 0; height: 0; position: absolute;
}
.ql-toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: var(--ql-bg-hover);
  border: 1px solid var(--ql-border);
  transition: all 0.3s ease;
}
.ql-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--ql-text-muted);
  top: 1px; left: 1px;
  transition: all 0.3s ease;
}
.ql-toggle input:checked + .ql-toggle-slider {
  background: var(--ql-accent-subtle);
  border-color: rgba(176, 40, 255,0.3);
}
.ql-toggle input:checked + .ql-toggle-slider::before {
  transform: translateX(16px);
  background: var(--ql-accent);
  box-shadow: 0 0 8px var(--ql-accent-glow);
}

/* ===== LOG ===== */
#ql-log, #ql-license-log {
  font-size: 12px;
  margin-top: 10px;
  min-height: 18px;
  padding: 0 4px;
  font-weight: 600;
  text-align: center;
}
.ql-log-success { color: var(--ql-success) !important; }
.ql-log-error { color: var(--ql-danger) !important; }
.ql-log-info { color: var(--ql-accent) !important; }

/* ===== SHORTCUTS ===== */
.ql-shortcuts-section {
  margin-top: 8px;
}

.ql-shortcuts-title {
  display: block;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ql-text-muted);
  margin-bottom: 12px;
}

.ql-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.ql-chip {
  padding: 8px 4px;
  border-radius: var(--ql-radius-xs);
  border: 1px solid var(--ql-border);
  background: var(--ql-bg-surface);
  color: var(--ql-text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--ql-transition);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.ql-chip svg {
  flex-shrink: 0;
}
.ql-chip:hover {
  background: var(--ql-accent-subtle);
  border-color: rgba(176, 40, 255,0.2);
  color: #7EF9FF;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--ql-accent-glow);
}

/* ===== LICENSE GATE ===== */
.ql-license-gate {
  text-align: center;
  padding: 24px 0;
}
.ql-lock-icon { font-size: 40px; margin-bottom: 16px; }
.ql-gate-title { font-size: 17px; font-weight: 700; color: var(--ql-text-primary); margin-bottom: 6px; letter-spacing: -0.02em; }
.ql-gate-desc { font-size: 13px; color: var(--ql-text-secondary); margin-bottom: 20px; line-height: 1.5; }

#ql-floating input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--ql-radius-sm);
  border: 1px solid var(--ql-border);
  background: var(--ql-bg-surface);
  color: var(--ql-text-primary);
  font-size: 13px;
  font-family: 'Inter', -apple-system, sans-serif;
  transition: all var(--ql-transition);
  box-sizing: border-box;
  outline: none;
}
#ql-floating input:focus {
  border-color: var(--ql-accent);
  box-shadow: 0 0 0 3px var(--ql-accent-subtle), 0 0 20px var(--ql-accent-glow);
}
#ql-floating input::placeholder { color: var(--ql-text-muted); }

#ql-validate-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--ql-radius-sm);
  background: linear-gradient(135deg, var(--ql-accent), #0066FF);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ql-transition);
  margin-top: 8px;
  box-shadow: 0 4px 16px var(--ql-accent-glow);
  letter-spacing: -0.01em;
}
#ql-validate-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--ql-accent-glow);
  filter: brightness(1.1);
}

/* ===== FOOTER ===== */
.ql-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--ql-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ql-text-muted);
}
.ql-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.ql-footer-version {
  font-size: 9px;
  color: var(--ql-text-muted);
  opacity: 0.5;
}
.ql-support-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ql-text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: color var(--ql-transition);
  cursor: pointer;
}
.ql-support-link:hover {
  color: var(--ql-accent);
}
.ql-support-link svg {
  flex-shrink: 0;
}

.ql-badge-mz {
  font-size: 9px;
  font-weight: 600;
  color: var(--ql-text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

/* ===== SWEETALERT EXPIRED MODAL ===== */
.ql-sweetalert-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}
.ql-sweetalert-overlay.ql-sweetalert-visible {
  opacity: 1;
}
.ql-sweetalert-box {
  background: var(--ql-surface);
  border: 1px solid var(--ql-border);
  border-radius: 20px;
  padding: 32px 28px;
  text-align: center;
  max-width: 320px;
  width: 90%;
  transform: scale(0.85);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}
.ql-sweetalert-visible .ql-sweetalert-box {
  transform: scale(1);
}
.ql-sweetalert-icon {
  font-size: 48px;
  margin-bottom: 12px;
  animation: ql-shake 0.6s ease 0.3s both;
}
@keyframes ql-shake {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-12deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(8deg); }
}
.ql-sweetalert-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ql-text);
  margin: 0 0 8px;
}
.ql-sweetalert-text {
  font-size: 13px;
  color: var(--ql-text-secondary);
  line-height: 1.5;
  margin: 0 0 20px;
}
.ql-sweetalert-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ql-sweetalert-btn {
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
}
.ql-sweetalert-btn-primary {
  background: linear-gradient(135deg, var(--ql-accent), #0066FF);
  color: #fff;
  box-shadow: 0 4px 15px var(--ql-accent-glow);
}
.ql-sweetalert-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--ql-accent-glow);
}
.ql-sweetalert-btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--ql-text-secondary);
  border: 1px solid var(--ql-border);
}
.ql-sweetalert-btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}


.ql-resize-handle {
  height: 10px;
  cursor: ns-resize;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ql-resize-handle::after {
  content: '';
  width: 40px;
  height: 3px;
  border-radius: 3px;
  background: var(--ql-border);
  transition: background var(--ql-transition);
}
.ql-resize-handle:hover::after {
  background: var(--ql-accent);
  box-shadow: 0 0 8px var(--ql-accent-glow);
}

.ql-field { margin-bottom: 14px; }
.ql-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ql-text-muted);
  margin-bottom: 8px;
}

/* ===== LIGHT MODE ===== */
#ql-floating.ql-light {
  --ql-bg: #ffffff;
  --ql-bg-elevated: #f5f5f7;
  --ql-bg-surface: #ebebef;
  --ql-bg-hover: #d4d4d8;
  --ql-border: rgba(0,0,0,0.14);
  --ql-border-hover: rgba(0,0,0,0.24);
  --ql-text-primary: #0a0a0b;
  --ql-text-secondary: #2a2a2e;
  --ql-text-muted: #52525b;
  --ql-accent: #E00000;
  --ql-accent-hover: #B00000;
  --ql-accent-subtle: rgba(176, 40, 255,0.10);
  --ql-accent-glow: rgba(176, 40, 255,0.18);
  --ql-shadow: 0 24px 80px -12px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.08);
  --ql-shadow-hover: 0 32px 100px -12px rgba(0,0,0,0.28), 0 0 0 1px rgba(0,0,0,0.12);
  --ql-glass: rgba(255,255,255,0.92);
}
#ql-floating.ql-light .ql-icon-btn { color: #3f3f46; }
#ql-floating.ql-light .ql-icon-btn:hover { background: #d4d4d8; color: #18181b; }
#ql-floating.ql-light textarea,
#ql-floating.ql-light input[type="text"],
#ql-floating.ql-light input[type="password"] {
  background: #ffffff !important;
  color: #0a0a0b !important;
  border-color: rgba(0,0,0,0.18) !important;
}
#ql-floating.ql-light textarea::placeholder,
#ql-floating.ql-light input::placeholder { color: #71717a !important; }
#ql-floating.ql-light .ql-brand { color: #18181b; }
#ql-floating.ql-light .ql-pkg-card { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
#ql-floating.ql-light .ql-trial-bar { background: rgba(0,0,0,0.08); }
#ql-floating.ql-light .ql-toast {
  background: rgba(255,255,255,0.96);
  box-shadow: 0 16px 42px rgba(24,24,27,0.16), 0 0 0 1px rgba(0,0,0,0.04);
}

/* ===== PAYMENT UI ===== */
.ql-gate-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--ql-text-muted);
  font-size: 11px;
}
.ql-gate-divider::before, .ql-gate-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ql-border);
}

.ql-buy-btn {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(176, 40, 255,0.35);
  background: linear-gradient(135deg, var(--ql-accent), #0066FF);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--ql-radius-sm);
  cursor: pointer;
  transition: all var(--ql-transition);
}
.ql-buy-btn:hover {
  background: linear-gradient(135deg, var(--ql-accent-hover), #4A1FB8);
  color: #fff;
  box-shadow: 0 4px 16px var(--ql-accent-glow);
}

.ql-pay-section { padding: 0; }
.ql-pay-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ql-text-primary);
  margin-bottom: 14px;
  text-align: center;
  letter-spacing: -0.02em;
}

.ql-packages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.ql-pay-loading {
  text-align: center;
  color: var(--ql-text-muted);
  font-size: 12px;
  padding: 20px 0;
}

.ql-pkg-card {
  background: var(--ql-bg-surface);
  border: 1px solid var(--ql-border);
  border-radius: 14px;
  padding: 14px 16px;
  position: relative;
  transition: all var(--ql-transition);
}
.ql-pkg-card:hover {
  border-color: var(--ql-border-hover);
}
.ql-pkg-highlight {
  border-color: var(--ql-accent);
  background: var(--ql-accent-subtle);
  box-shadow: 0 0 20px var(--ql-accent-glow);
}

.ql-pkg-popular {
  position: absolute;
  top: -8px;
  right: 12px;
  background: linear-gradient(135deg, var(--ql-accent), #0066FF);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.ql-pkg-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ql-text-primary);
  margin-bottom: 4px;
}
.ql-pkg-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--ql-accent);
  margin-bottom: 2px;
  letter-spacing: -0.03em;
}
.ql-pkg-price span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ql-text-muted);
}
.ql-pkg-mzn {
  font-size: 11px;
  font-weight: 600;
  color: var(--ql-accent);
  opacity: 0.85;
  margin: -2px 0 6px;
}
.ql-pkg-mzn span {
  font-weight: 500;
  color: var(--ql-text-muted);
  margin-left: 4px;
}
.ql-pay-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 10px;
}
.ql-pay-divider::before,
.ql-pay-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ql-border);
}
.ql-pay-divider span {
  font-size: 10px;
  font-weight: 700;
  color: var(--ql-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.ql-pkg-brl .ql-pkg-price { color: #16a34a; }
#ql-floating.ql-dark .ql-pkg-brl .ql-pkg-price { color: #4ade80; }
.ql-pkg-duration {
  font-size: 11px;
  color: var(--ql-text-secondary);
  margin-bottom: 8px;
}
.ql-pkg-features {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}
.ql-pkg-features li {
  font-size: 11px;
  color: var(--ql-text-secondary);
  padding: 2px 0;
}
.ql-pkg-features li::before {
  content: '\u2713 ';
  color: var(--ql-success);
  font-weight: 700;
}

.ql-pkg-select-btn {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: var(--ql-radius-xs);
  background: var(--ql-bg-hover);
  color: var(--ql-text-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ql-transition);
}
.ql-pkg-select-btn:hover {
  background: var(--ql-accent);
  color: #fff;
}

.ql-selected-pkg {
  font-size: 12px;
  color: var(--ql-text-primary);
  padding: 10px 12px;
  background: var(--ql-accent-subtle);
  border: 1px solid rgba(176, 40, 255,0.2);
  border-radius: var(--ql-radius-xs);
  margin-bottom: 14px;
}

.ql-pay-field {
  margin-bottom: 12px;
}
.ql-pay-field label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ql-text-muted);
  margin-bottom: 6px;
}
.ql-pay-field input {
  width: 100%;
  padding: 10px 12px;
  background: var(--ql-bg);
  border: 1px solid var(--ql-border);
  border-radius: var(--ql-radius-xs);
  color: var(--ql-text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--ql-transition);
}
.ql-pay-field input:focus {
  border-color: var(--ql-accent);
  box-shadow: 0 0 0 3px var(--ql-accent-subtle);
}
.ql-pay-hint {
  font-size: 10px;
  color: var(--ql-text-muted);
  margin-top: 4px;
  display: block;
}

.ql-pay-methods {
  display: flex;
  gap: 8px;
}
.ql-method-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--ql-border);
  background: var(--ql-bg);
  color: var(--ql-text-secondary);
  border-radius: var(--ql-radius-xs);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ql-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.ql-method-btn:hover {
  border-color: var(--ql-border-hover);
  background: var(--ql-bg-hover);
}
.ql-method-btn.ql-method-active {
  border-color: var(--ql-accent);
  background: var(--ql-accent-subtle);
  color: var(--ql-accent);
}

.ql-confirm-pay-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--ql-radius-sm);
  background: linear-gradient(135deg, var(--ql-accent), #0066FF);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--ql-transition);
  box-shadow: 0 4px 16px var(--ql-accent-glow);
  font-family: inherit;
}
.ql-confirm-pay-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--ql-accent-glow);
}
.ql-confirm-pay-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.ql-pay-log {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: var(--ql-radius-xs);
  display: none;
}
.ql-pay-log.ql-pay-error {
  display: block;
  background: var(--ql-danger-bg);
  color: var(--ql-danger);
  border: 1px solid rgba(248,113,113,0.2);
}
.ql-pay-log.ql-pay-success {
  display: block;
  background: var(--ql-success-bg);
  color: var(--ql-success);
  border: 1px solid rgba(52,211,153,0.2);
}
.ql-pay-log.ql-pay-info {
  display: block;
  background: var(--ql-accent-subtle);
  color: var(--ql-accent);
  border: 1px solid rgba(176, 40, 255,0.2);
}

/* ===== FILE ATTACHMENT ===== */
.ql-attach-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.ql-attach-btn {
  width: 34px;
  height: 34px;
  border: 1px dashed var(--ql-border);
  background: var(--ql-bg-surface);
  border-radius: var(--ql-radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ql-transition);
  color: var(--ql-text-muted);
  flex-shrink: 0;
}
.ql-attach-btn:hover {
  background: var(--ql-accent-subtle);
  border-color: rgba(176, 40, 255,0.3);
  color: var(--ql-accent);
}
.ql-attach-count {
  font-size: 10px;
  color: var(--ql-text-muted);
  font-weight: 500;
}
.ql-attach-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  max-height: 120px;
  overflow-y: auto;
}
.ql-attach-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--ql-bg-surface);
  border: 1px solid var(--ql-border);
  border-radius: var(--ql-radius-xs);
  font-size: 10px;
  color: var(--ql-text-secondary);
  max-width: 180px;
  animation: ql-fade-in 0.2s ease;
}
@keyframes ql-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.ql-attach-thumb {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.ql-attach-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--ql-bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.ql-attach-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ql-attach-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
  color: var(--ql-text-primary);
}
.ql-attach-size {
  font-size: 9px;
  color: var(--ql-text-muted);
}
.ql-attach-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ql-danger);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  opacity: 0;
  transition: opacity var(--ql-transition);
}
.ql-attach-item:hover .ql-attach-remove {
  opacity: 1;
}
.ql-attach-uploading {
  opacity: 0.6;
}
.ql-attach-uploading::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--ql-accent);
  border-radius: 2px;
  animation: ql-upload-progress 1.5s ease-in-out infinite;
}
@keyframes ql-upload-progress {
  0% { width: 0; }
  50% { width: 70%; }
  100% { width: 100%; }
}

/* Watermark Removal Button */
.ql-watermark-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  margin-top: 8px;
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--ql-radius-sm);
  background: linear-gradient(135deg, rgba(248,113,113,0.08), rgba(248,113,113,0.04));
  color: #f87171;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--ql-transition);
}
.ql-watermark-btn:hover {
  background: linear-gradient(135deg, rgba(248,113,113,0.15), rgba(248,113,113,0.08));
  border-color: rgba(248,113,113,0.35);
  box-shadow: 0 0 20px -4px rgba(248,113,113,0.2);
  transform: translateY(-1px);
}
.ql-watermark-btn:active { transform: scale(0.98); }
.ql-watermark-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===== SHIELD MODE BUTTON ===== */
.ql-shield-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  margin-top: 6px;
  border: 1px solid rgba(176, 40, 255,0.2);
  border-radius: var(--ql-radius-sm);
  background: linear-gradient(135deg, rgba(176, 40, 255,0.08), rgba(176, 40, 255,0.04));
  color: var(--ql-accent);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--ql-transition);
}
.ql-shield-btn:hover {
  background: linear-gradient(135deg, rgba(176, 40, 255,0.15), rgba(176, 40, 255,0.08));
  border-color: rgba(176, 40, 255,0.35);
  box-shadow: 0 0 20px -4px rgba(176, 40, 255,0.2);
  transform: translateY(-1px);
}
.ql-shield-btn:active { transform: scale(0.98); }
.ql-shield-btn.ql-shield-active {
  background: linear-gradient(135deg, rgba(52,211,153,0.12), rgba(52,211,153,0.06));
  border-color: rgba(52,211,153,0.3);
  color: #34d399;
}
.ql-shield-btn.ql-shield-active:hover {
  background: linear-gradient(135deg, rgba(52,211,153,0.18), rgba(52,211,153,0.1));
  border-color: rgba(52,211,153,0.45);
  box-shadow: 0 0 20px -4px rgba(52,211,153,0.2);
}

/* ===== SHIELD OVERLAY (injected on Lovable chat input) ===== */
.ql-shield-overlay {
  position: absolute;
  inset: 0;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 24px;
  background: rgba(10,10,11,0.88);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(176, 40, 255,0.3);
  box-shadow: 0 0 40px -8px rgba(176, 40, 255,0.25), inset 0 0 60px -20px rgba(176, 40, 255,0.08);
  cursor: not-allowed;
  animation: ql-shield-pulse 2.5s ease-in-out infinite;
  pointer-events: all;
}
.ql-shield-overlay svg {
  width: 32px;
  height: 32px;
  stroke: #B028FF;
  filter: drop-shadow(0 0 12px rgba(176, 40, 255,0.5));
  animation: ql-shield-icon-float 3s ease-in-out infinite;
}
.ql-shield-overlay-text {
  color: #0066FF;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-align: center;
  letter-spacing: 0.02em;
}
.ql-shield-overlay-sub {
  color: #71717a;
  font-size: 10px;
  font-family: 'Inter', sans-serif;
}
@keyframes ql-shield-pulse {
  0%, 100% { border-color: rgba(176, 40, 255,0.3); box-shadow: 0 0 40px -8px rgba(176, 40, 255,0.25); }
  50% { border-color: rgba(176, 40, 255,0.5); box-shadow: 0 0 60px -8px rgba(176, 40, 255,0.35); }
}
@keyframes ql-shield-icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ===== TABS SYSTEM (Floating Popup) ===== */
.ql-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  padding: 3px;
  background: var(--ql-bg-surface);
  border-radius: var(--ql-radius-sm);
  border: 1px solid var(--ql-border);
}
.ql-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--ql-text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--ql-transition);
}
.ql-tab:hover { background: rgba(255,255,255,0.04); color: var(--ql-text-secondary); }
.ql-tab.ql-tab-active { background: var(--ql-accent-subtle); color: var(--ql-accent); border: 1px solid rgba(176, 40, 255,0.2); }
.ql-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--ql-accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

/* ===== CHAT HISTORY (Floating Popup) ===== */
.ql-chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}
.ql-chat-messages {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 0;
}
.ql-chat-bubble {
  padding: 10px 12px;
  margin: 6px 0;
  border-radius: var(--ql-radius-sm);
  background: var(--ql-bg-surface);
  border: 1px solid var(--ql-border);
  color: var(--ql-text-primary);
  font-size: 11px;
  line-height: 1.5;
  word-break: break-word;
  transition: border-color var(--ql-transition);
}
.ql-chat-bubble:hover { border-color: var(--ql-border-hover); }
.ql-chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 9px;
}
.ql-chat-status-ok { color: var(--ql-success); }
.ql-chat-status-err { color: var(--ql-danger); }
.ql-chat-time { color: var(--ql-text-muted); }

.ql-chat-date-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.ql-chat-date-divider::before, .ql-chat-date-divider::after { content: ''; flex: 1; height: 1px; background: var(--ql-border); }
.ql-chat-date-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--ql-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  background: var(--ql-bg-surface);
  border: 1px solid var(--ql-border);
  border-radius: 10px;
  white-space: nowrap;
}
.ql-chat-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 0;
  border-top: 1px solid var(--ql-border);
  margin-top: 8px;
}
.ql-chat-count { font-size: 10px; color: var(--ql-text-muted); font-weight: 500; }
.ql-chat-clear {
  flex: 1;
  padding: 8px;
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--ql-radius-sm);
  background: rgba(248,113,113,0.05);
  color: var(--ql-danger);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--ql-transition);
  text-align: center;
}
.ql-chat-clear:hover { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.35); }

#ql-floating.ql-lite-mode,
#ql-floating.ql-lite-mode *,
#ql-floating.ql-lite-mode *::before,
#ql-floating.ql-lite-mode *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.001ms !important;
}

#ql-floating.ql-lite-mode.ql-minimized,
#ql-floating.ql-lite-mode.ql-minimized .ql-header-left img,
#ql-floating.ql-lite-mode .ql-trial-bar-fill,
#ql-floating.ql-lite-mode #chatinput-send-message-button.ql-native-send-active,
#ql-floating.ql-lite-mode #chatinput-send-message-button.ql-native-sending {
  animation: none !important;
}

/* ===== NATIVE CHAT MODE ("Usar Chat Padrao") ===== */
.ql-native-chat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  margin-top: 6px;
  border: 1px solid var(--ql-border);
  border-radius: var(--ql-radius-sm);
  background: var(--ql-accent-subtle);
  color: var(--ql-accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--ql-transition);
}
.ql-native-chat-btn:hover {
  background: var(--ql-accent-glow);
  border-color: var(--ql-accent);
}

.ql-native-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #B028FF, #0066FF);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Inter', -apple-system, sans-serif;
  padding: 3px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(176, 40, 255,0.4);
  letter-spacing: 0.3px;
  pointer-events: none;
  animation: ql-badge-pulse 2s ease-in-out infinite;
}
@keyframes ql-badge-pulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(176, 40, 255,0.4); }
  50% { box-shadow: 0 2px 20px rgba(176, 40, 255,0.7); }
}

.ql-native-return-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px auto 0;
  padding: 8px 20px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 20px;
  background: linear-gradient(135deg, #B028FF, #0066FF);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  font-family: 'Inter', -apple-system, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 99999;
  box-shadow: 0 10px 24px rgba(102,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.12);
  text-shadow: 0 1px 1px rgba(0,0,0,0.35);
}
.ql-native-return-btn:hover {
  background: linear-gradient(135deg, #00D4FF, #4A1FB8);
  border-color: rgba(255,255,255,0.34);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(102,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.08);
}

@keyframes ql-send-blink {
  0% { background-color: #B028FF; }
  25% { background-color: #ef4444; }
  50% { background-color: #22c55e; }
  75% { background-color: #eab308; }
  100% { background-color: #B028FF; }
}
#chatinput-send-message-button.ql-native-send-active {
  animation: ql-send-blink 2s linear infinite !important;
  opacity: 1 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}
#chatinput-send-message-button.ql-native-send-active:disabled {
  opacity: 1 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}
#chatinput-send-message-button.ql-native-sending {
  animation: ql-sending-pulse 0.8s ease-in-out infinite !important;
  opacity: 1 !important;
  pointer-events: none !important;
}
@keyframes ql-sending-pulse {
  0%, 100% { background-color: #0066FF !important; transform: scale(1); }
  50% { background-color: #00D4FF !important; transform: scale(1.15); }
}

.ql-native-sending-overlay {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999999999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #B028FF, #0066FF);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 4px 20px rgba(176, 40, 255,0.35);
  animation: ql-sending-fadein 0.3s ease;
}
.ql-native-sending-overlay .ql-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ql-spin 0.6s linear infinite;
}
@keyframes ql-spin { to { transform: rotate(360deg); } }
@keyframes ql-sending-fadein { from { opacity:0; transform: translateX(-50%) translateY(10px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }

.ql-native-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 9999999999;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', -apple-system, sans-serif;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}
.ql-native-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ql-native-toast-success {
  background: rgba(34, 197, 94, 0.15);
  color: #34d399;
  border: 1px solid rgba(34, 197, 94, 0.3);
  backdrop-filter: blur(12px);
}
.ql-native-toast-error {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
  backdrop-filter: blur(12px);
}

/* ===== DRAG & DROP OVERLAY ===== */
.ql-drag-overlay {
  position: absolute;
  inset: 0;
  z-index: 99999;
  background: rgba(124, 90, 255, 0.15);
  backdrop-filter: blur(6px);
  border: 2px dashed rgba(124, 90, 255, 0.6);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.ql-drag-overlay-inner {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #7EF9FF;
  background: rgba(10, 10, 11, 0.85);
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid rgba(124, 90, 255, 0.3);
}

/* ===== MODEL SELECTOR ===== */
.ql-model-selector-container {
  position: relative;
  margin-bottom: 12px;
  z-index: 100;
}

.ql-model-selector-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--ql-bg-surface);
  border: 1px solid var(--ql-border);
  border-radius: var(--ql-radius-sm);
  cursor: pointer;
  transition: all var(--ql-transition);
  user-select: none;
}

.ql-model-selector-header:hover {
  border-color: var(--ql-accent);
  background: var(--ql-bg-hover);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#ql-active-model-icon {
  font-size: 16px;
}

#ql-active-model-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ql-text-primary);
  flex: 1;
}

.ql-model-selector-arrow {
  font-size: 12px;
  color: var(--ql-text-muted);
  transition: transform 0.2s ease;
}

.ql-model-selector-container.ql-active .ql-model-selector-arrow {
  transform: rotate(180deg);
}

.ql-model-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--ql-bg-elevated);
  border: 1px solid var(--ql-border);
  border-radius: var(--ql-radius-sm);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  overflow: hidden;
  animation: ql-fade-in-up 0.2s ease-out;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@keyframes ql-fade-in-up {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ql-model-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all var(--ql-transition);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.ql-model-option:last-child {
  border-bottom: none;
}

.ql-model-option:hover {
  background: rgba(176, 40, 255,0.1);
}

.ql-model-option.ql-active {
  background: rgba(176, 40, 255,0.15);
  border-left: 3px solid var(--ql-accent);
}

.ql-model-opt-icon {
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ql-bg-surface);
  border-radius: 8px;
}

.ql-model-opt-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ql-model-opt-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ql-text-primary);
}

.ql-model-opt-desc {
  font-size: 10px;
  color: var(--ql-text-muted);
}

