*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#0f172a;color:#e2e8f0}h1{margin:0 0 6px}p{margin:0}.topbar{display:flex;gap:14px;align-items:center;padding:14px 18px;background:#111827;position:sticky;top:0}.logo{height:42px;background:transparent;border-radius:0;padding:0}#latestPageChanges{display:block;color:#94a3b8;font-size:.76rem;margin-top:4px}.tabs{display:flex;gap:8px;padding:10px 14px;background:#1f2937;position:sticky;top:72px;flex-wrap:wrap}.tabs button{border:0;padding:8px 12px;border-radius:8px;background:#334155;color:#fff;cursor:pointer}.tabs button.active{background:#2563eb}.tabs .greenTabBtn{background:#16a34a!important;color:#fff;font-weight:700}main{padding:14px}.tab{display:none}.tab.active{display:block;color:#111827}.cards{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:12px}.card{background:#1e293b;border-radius:12px;padding:12px}.card p{font-size:1.7rem;font-weight:700}.hero{width:100%;margin-top:12px;border-radius:12px;max-height:300px;object-fit:cover}.compactHero{max-width:720px;padding:10px 14px}.compactHero h2{font-size:1.8rem;margin-bottom:4px}.compactHero p{font-size:1.45rem;line-height:1.25}
.dashboardHero{background:linear-gradient(120deg,#dbeafe,#e9d5ff);color:#1e1b4b;border-radius:14px;padding:14px;margin-bottom:12px}
.dashboardHero h2{margin:0 0 4px 0}
.cuteCards .card{background:#ffffff;color:#111827;border:1px solid #dbe2ea;box-shadow:0 6px 16px rgba(15,23,42,.08)}
.dashAssistantCard{margin-top:14px;padding:14px;border:1px solid #dbe2ea;border-radius:14px;background:#fff;color:#111827;box-shadow:0 6px 16px rgba(15,23,42,.06)}
.dashChartCard{margin-top:12px;background:#fff;border:1px solid #ddd;border-radius:12px;padding:10px}
.chatLog{min-height:240px;max-height:360px;overflow:auto;border:1px solid #dbe2ea;border-radius:10px;padding:12px;background:#f8fafc}
#chatInput{width:100%;min-height:120px;resize:vertical;border:1px solid #dbe2ea;border-radius:10px;background:#f8fafc;color:#0f172a;padding:12px;line-height:1.45}
.leadGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}
.leadCard{background:#fff;border:1px solid #dbe2ea;border-radius:12px;padding:12px;box-shadow:0 4px 12px rgba(15,23,42,.05)}
.leadMeta{font-size:.82rem;color:#64748b;margin:6px 0}
.leadCard p{font-size:.92rem;color:#334155;line-height:1.35;min-height:48px;overflow-wrap:anywhere;word-break:break-word}
.leadCard a{color:#1d4ed8;font-weight:700;text-decoration:none;display:inline-block;margin-top:4px;overflow-wrap:anywhere;word-break:break-word}
.applePriceSplit{display:grid;grid-template-columns:1fr;gap:8px;margin-top:6px}
.priceChip{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;font-size:1rem}
.priceChip span{opacity:.95}
.priceChip strong{margin-left:auto;font-size:1.15rem}
.priceChip.cash{background:#ecfdf3;border:1px solid #86efac;color:#166534}
.priceChip.card{background:#eff6ff;border:1px solid #93c5fd;color:#1e40af}
.dataTables_wrapper{background:#fff;color:#111827;padding:8px;border-radius:10px}
.dataTables_wrapper input,.dataTables_wrapper select{background:#fff;color:#111827;border:1px solid #cbd5e1}
.ts-control,.flatpickr-input{background:#fff!important;color:#111827!important;border:1px solid #cbd5e1!important}.row{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0}input,select,textarea,button{padding:9px;border-radius:8px;border:1px solid #475569;background:#0b1220;color:#e2e8f0}button{background:#1d4ed8;border:0;cursor:pointer}table{width:100%;border-collapse:collapse;background:#0b1220;border-radius:10px;overflow:hidden}th,td{padding:10px;border-bottom:1px solid #1e293b;text-align:left}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media(max-width:800px){.grid2{grid-template-columns:1fr}}label{display:flex;flex-direction:column;gap:4px}
label input,label select,label textarea{margin-top:4px}#quoteOut{width:100%;margin-top:10px}

.agentStatusCard{background:#1e293b;border:1px solid #334155;border-radius:14px;padding:16px;cursor:pointer;transition:all .2s}
.agentStatusCard:hover{background:#1e3a5f;border-color:#475569}
.agentStatusCard .indicator{width:14px;height:14px;border-radius:50%}
.agentStatusCard .indicator.online{background:#22c55e;box-shadow:0 0 8px #22c55e}
.agentStatusCard .indicator.offline{background:#ef4444;box-shadow:0 0 8px #ef4444}
.agentChatBubble{display:flex;gap:8px;margin:8px 0;padding:12px;background:#0b1220;border:1px solid #1e293b;border-radius:10px}
.agentChatBubble.group{border-left:4px solid #6366f1}
.agentChatBubble.agent{border-left:4px solid #2563eb}

/* Readability override for app content panels */
.tab input,.tab select,.tab textarea{background:#ffffff;color:#111827;border:1px solid #cbd5e1}
.tab table{background:#ffffff;color:#111827}
.tab th,.tab td{border-bottom:1px solid #e2e8f0;color:#111827}
.tab p,.tab h2,.tab h3,.tab h4,.tab label,.tab strong,.tab span{color:inherit}

.repairWizard{background:#f8fafc;color:#0f172a;border:1px solid #dbe2ea;border-radius:14px;padding:14px;max-width:760px}
.deviceCard{background:#fff;border:1px solid #d8dee7;border-radius:14px;padding:14px;text-align:center}
.deviceCard img{width:96px;height:120px;object-fit:contain;display:block;margin:0 auto 8px}
.deviceCard h3{margin:0 0 8px 0}
.deviceCard select{width:100%;max-width:340px;margin:0 auto;background:#fff;color:#0f172a;border:1px solid #cbd5e1}
.repairWizard h4{margin:14px 0 10px 0}
.repairIssueCards{display:grid;grid-template-columns:repeat(2,minmax(160px,1fr));gap:10px}
.repairIssueCard{background:#fff;border:1px solid #d8dee7;border-radius:12px;padding:12px;min-height:92px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;cursor:pointer;color:#000}
.repairIssueCard span{color:#000}
.repairIssueCard.active{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.2)}
.repairIssueCard .icon{font-size:1.4rem}
.repairPriceResult{margin-top:12px;background:#fff;border:1px solid #d8dee7;border-radius:10px;padding:10px}
.inventoryLookupWrap{max-width:760px;background:#fff;border:1px solid #d8dee7;border-radius:14px;padding:14px;color:#111827}
.inventoryLookupWrap input{width:100%;background:#fff;color:#111827;border:1px solid #cbd5e1}
.invResult{margin-top:12px;border:2px solid #bbf7d0;background:#f0fdf4;color:#166534;border-radius:12px;padding:16px;font-size:1.6rem;font-weight:800}

.quoteFlow{background:#f3f4f6;color:#111827;border-radius:16px;padding:20px;max-width:760px;margin:0 auto}
.quoteFlow h2{font-size:2.2rem;line-height:1.1;margin:0 0 8px;color:#0b0b0b}
.quoteSub{font-size:1.05rem;color:#4b5563;margin:0 0 16px}
.quoteFields{display:grid;gap:10px}
.quoteFields.compact{grid-template-columns:repeat(4,minmax(120px,1fr))}
@media(max-width:800px){.quoteFields.compact{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.quoteFields.compact{grid-template-columns:1fr}}
.quoteFields label{font-weight:600;color:#374151}
.quoteFields select,.quoteFields input{background:#fff;color:#111827;border:1px solid #d1d5db;border-radius:12px;padding:12px;font-size:1.05rem}
.issueList{display:grid;gap:10px;margin-top:10px}
.issueItem{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #cfd2d8;border-radius:10px;padding:12px;min-height:48px;cursor:pointer;transition:all .15s}
.issueItem:active{background:#eef2ff;border-color:#2563eb}
.issueItem input{width:18px;height:18px;margin:0;flex-shrink:0;cursor:pointer}
.issueItem:hover{border-color:#2563eb}
.issueDescWrap{margin-top:10px;font-weight:600;color:#374151}
.issueDescWrap textarea{background:#fff;color:#111827;border:1px solid #d1d5db;border-radius:12px;padding:12px}
.counter{text-align:right;color:#6b7280;font-size:.85rem;margin-top:4px}
.quoteSummary{border-top:1px solid #d1d5db;margin-top:14px;padding-top:14px}
.quoteSummary h3{margin:0 0 10px;font-size:2rem;font-weight:700}
.quoteSummaryCard{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid #d1d5db;border-radius:14px;padding:12px}
.quotePhoneIcon{font-size:1.6rem;background:#eef2ff;border:1px solid #c7d2fe;border-radius:12px;padding:10px;line-height:1}
.quoteMuted{font-size:.92rem;color:#6b7280}
#qChangeLink{margin-left:auto;color:#111827;text-decoration:underline}
.quoteActions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:14px;flex-wrap:wrap}
.quoteActions > div{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:600px){.quoteActions{flex-direction:column;align-items:stretch}.quoteActions > div{justify-content:stretch;width:100%}.quoteActions button{width:100%;flex:1;min-height:48px;padding:14px 16px}}
.ghostBtn{background:transparent!important;color:#111827!important;border:1px solid #9ca3af!important}

.ticketBoard{display:grid;grid-template-columns:repeat(7,minmax(180px,1fr));gap:10px;margin:10px 0 14px}
.ticketCol{background:#fff;border:1px solid #dbe2ea;border-radius:10px;padding:8px;min-height:120px}
.ticketCol h4{margin:0 0 8px 0;font-size:.92rem;color:#1e293b}
.ticketCard{background:#f8fafc;border:1px solid #cbd5e1;border-radius:8px;padding:8px;margin:0 0 8px 0;font-size:.85rem}
.ticketCard .meta{font-size:.78rem;color:#64748b}

.smsThreads{display:grid;gap:8px;margin-top:8px}
.smsThreadCard{display:flex;justify-content:space-between;gap:10px;background:#0b1220;border:1px solid #1e293b;border-radius:14px;padding:12px;color:#e2e8f0}
.smsThreadLeft{display:flex;gap:10px;min-width:0}
.smsAvatar{width:40px;height:40px;border-radius:999px;background:#334155;display:flex;align-items:center;justify-content:center;font-weight:700;color:#cbd5e1;flex-shrink:0}
.smsThreadMain{min-width:0}
.smsThreadMain strong{display:block;font-size:1rem;color:#f8fafc}
.smsPreview{opacity:.9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:560px}
.smsThreadMeta{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.smsBadge{background:#22c55e;color:#052e16;border-radius:999px;padding:2px 8px;font-size:.75rem;font-weight:700}

/* Lead Hunter Styles */
.leadHunterList{display:flex;flex-direction:column;gap:12px;max-height:600px;overflow-y:auto;padding-right:8px}
.leadCard{background:#fff;border:1px solid #dbe2ea;border-radius:12px;padding:14px;box-shadow:0 2px 8px rgba(15,23,42,.06);transition:all .2s}
.leadCard.unread{border-left:4px solid #2563eb}
.leadCard.read{border-left:4px solid #94a3b8;opacity:.9}
.leadCard.high{border-left-color:#dc2626}
.leadCard.medium{border-left-color:#f59e0b}
.leadCard.low{border-left-color:#10b981}
.leadCard.placeholder{background:#f8fafc;text-align:center;padding:40px 20px}
.leadHeader{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px;font-size:.85rem}
.leadSource{background:#1e293b;color:#fff;padding:2px 8px;border-radius:6px}
.leadPriority{font-weight:700;padding:2px 8px;border-radius:6px;font-size:.75rem}
.leadPriority.high{background:#fee2e2;color:#991b1b}
.leadPriority.medium{background:#fef3c7;color:#92400e}
.leadPriority.low{background:#d1fae5;color:#065f46}
.leadDate{color:#64748b;margin-left:auto}
.autoReplyBadge{background:#dbeafe;color:#1e40af;padding:2px 8px;border-radius:6px;font-size:.75rem;font-weight:600}
.leadTitle{margin:0 0 8px 0;font-size:1.1rem;color:#0f172a}
.leadTitle.unread{font-weight:700}
.leadSnippet{color:#475569;font-size:.95rem;line-height:1.4;margin:0 0 12px 0;max-height:60px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}
.leadActions{display:flex;gap:8px;flex-wrap:wrap}
.leadActions button{padding:6px 12px;font-size:.85rem;border-radius:6px;border:0;cursor:pointer}
.leadActions .btnReply{background:#2563eb;color:#fff}
.leadActions .btnVisit{background:#f1f5f9;color:#334155;border:1px solid #cbd5e1}
.leadActions .btnArchive{background:#fef3c7;color:#92400e}
.leadActions .btnMarkRead{background:#e2e8f0;color:#475569}

/* Lead Hunter Mobile Styles */
@media(max-width:800px){
  .leadHunterList{max-height:500px}
  .leadHeader{gap:6px}
  .leadSource{font-size:.75rem;padding:2px 6px}
  .leadPriority{font-size:.7rem;padding:2px 6px}
  .leadDate{font-size:.75rem}
  .leadTitle{font-size:1rem}
  .leadSnippet{font-size:.9rem;-webkit-line-clamp:2}
  .leadActions button{padding:8px 10px;font-size:.8rem;flex:1;min-width:auto}
  .leadManualEntry{padding:12px}
  .leadManualEntry input,.leadManualEntry select,.leadManualEntry textarea{font-size:16px;padding:10px}
}

/* Mobile Touch Improvements */
@media(hover:none) and (pointer:coarse){button,input,select,textarea{min-height:44px}.issueItem:active{background:#eef2ff;border-color:#2563eb}.quoteFields.compact select,.quoteFields.compact input{font-size:16px}}

/* Prevent horizontal scroll on mobile */
@media(max-width:600px){body{overflow-x:hidden}#quote{overflow-x:hidden}.quoteFlow{width:100%;max-width:100vw}}

@media(max-width:1100px){.ticketBoard{grid-template-columns:repeat(2,minmax(180px,1fr))}}
@media(max-width:800px){.cards{grid-template-columns:1fr 1fr}.grid2{grid-template-columns:1fr}.tabs{top:68px}.quoteFlow h2{font-size:1.9rem}.quoteFields.compact{grid-template-columns:1fr}.quoteActions{flex-direction:column;align-items:stretch}.quoteActions>div{justify-content:stretch}.quoteActions button{width:100%}.repairIssueCards{grid-template-columns:1fr}.ticketBoard{grid-template-columns:1fr}.smsPreview{max-width:220px}}
@media(max-width:600px){.quoteFlow{padding:14px;margin:0;border-radius:0}.quoteFlow h2{font-size:1.6rem}.quoteSub{font-size:.95rem}.quoteFields.compact{grid-template-columns:1fr;gap:8px}.quoteFields.compact label{font-size:.95rem}.quoteFields.compact select,.quoteFields.compact input{padding:14px;font-size:16px}.issueList{gap:8px}.issueItem{padding:14px;min-height:56px}.issueItem input{width:22px;height:22px}.issueDescWrap textarea{padding:14px;font-size:16px}.quoteSummaryCard{flex-direction:column;align-items:flex-start;gap:10px;padding:14px}.quotePhoneIcon{font-size:1.4rem;padding:8px}.quoteSummary h3{font-size:1.5rem}#qChangeLink{margin-left:0;margin-top:8px}.quoteActions{gap:12px}.quoteActions button{padding:14px 16px;font-size:1rem;min-height:48px}#quote .grid2{grid-template-columns:1fr;gap:12px}#quote .grid2 label{font-size:.95rem}#quote .grid2 input,#quote .grid2 select,#quote .grid2 textarea{padding:14px;font-size:16px}.row{gap:8px;margin:8px 0}.row button{flex:1;min-height:48px;padding:14px}#qPasteInput{padding:14px;font-size:16px}#quoteOut{padding:14px;font-size:16px;min-height:120px}}
/* ============================================
   CUSTOMER CHAT TAB STYLES
   ============================================ */
.chatTabBtn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  font-weight: 600;
}

.chatAdminHeader {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chatAdminHeader h2 {
  margin: 0 0 5px 0;
}

.chatAdminHeader p {
  margin: 0 0 15px 0;
  color: #666;
}

.chatStatsBar {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.chatStatsBar .openCount {
  color: #FF9800;
  font-weight: 600;
}

.chatStatsBar .newCount {
  color: #4CAF50;
  font-weight: 600;
}

.chatAdminLayout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 20px;
  height: calc(100vh - 250px);
  min-height: 500px;
}

.chatConversationList {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow-y: auto;
}

.chatThreadItem {
  padding: 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
}

.chatThreadItem:hover {
  background: #f8f9fa;
}

.chatThreadItem.active {
  background: #f0f0ff;
  border-left: 3px solid #667eea;
}

.chatThreadItem .threadCustomer {
  font-weight: 600;
  margin-bottom: 5px;
}

.chatThreadItem .threadPreview {
  font-size: 13px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chatThreadItem .threadMeta {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 11px;
  color: #999;
}

.chatThreadItem .threadLang {
  background: #e8e8e8;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
}

.chatThreadItem .threadStatus {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

.chatThreadItem .threadStatus.open {
  background: #FFF3E0;
  color: #E65100;
}

.chatThreadItem .threadStatus.pending {
  background: #E3F2FD;
  color: #1565C0;
}

.chatThreadItem .threadStatus.resolved {
  background: #E8F5E9;
  color: #2E7D32;
}

.chatConversationView {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chatEmptyState {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
}

.chatConversationHeader {
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.chatConversationHeader .customerName {
  font-weight: 600;
  font-size: 16px;
}

.chatConversationHeader .customerContact {
  font-size: 13px;
  opacity: 0.9;
}

.chatConversationHeader .conversationActions {
  margin-top: 10px;
}

.chatConversationHeader .conversationActions button {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 8px;
  font-size: 12px;
}

.chatConversationHeader .conversationActions button:hover {
  background: rgba(255,255,255,0.3);
}

.chatMessages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
}

.chatMessage {
  margin-bottom: 15px;
  max-width: 80%;
}

.chatMessage.user {
  margin-left: auto;
}

.chatMessage.user .messageBubble {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.chatMessage.assistant .messageBubble,
.chatMessage.staff .messageBubble {
  background: white;
  color: #333;
}

.messageBubble {
  padding: 12px 16px;
  border-radius: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.messageRole {
  font-size: 10px;
  opacity: 0.7;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.messageTime {
  font-size: 10px;
  color: #999;
  margin-top: 4px;
}

.chatRepairInfo {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}

.chatRepairInfo h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #333;
}

.chatRepairInfo .repairField {
  display: flex;
  margin-bottom: 4px;
  font-size: 12px;
}

.chatRepairInfo .repairField strong {
  width: 100px;
  color: #666;
}

.chatLeadInfo {
  background: #f0f0ff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 13px;
}

.chatLeadInfo h4 {
  margin: 0 0 8px 0;
  color: #667eea;
}

.chatLeadInfo .consentBadge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  margin-left: 5px;
}

.chatLeadInfo .consentBadge.yes {
  background: #E8F5E9;
  color: #2E7D32;
}

.chatLeadInfo .consentBadge.no {
  background: #f5f5f5;
  color: #999;
}

@media (max-width: 900px) {
  .chatAdminLayout {
    grid-template-columns: 1fr;
  }
  
  .chatConversationList {
    max-height: 300px;
  }
}
/* Facebook Groups Grid - CSP Safe (no inline event handlers) */
.fb-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.fb-group-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  text-decoration: none;
  color: #0f172a;
  transition: all 0.2s;
}

.fb-group-link:hover {
  background: #eff6ff;
  border-color: #3b82f6;
}

/* Business Hours Modal */
#businessHoursModal {
  display: none;
}

#businessHoursModal.active {
  display: flex;
}

/* Pagination for LEADS tab */
.fb-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.fb-pagination button {
  padding: 8px 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  color: #475569;
  font-size: 0.9rem;
}

.fb-pagination button.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.fb-pagination button:hover:not(.active) {
  background: #e2e8f0;
}

/* SALES REPORT Tab Styles */
.salesReportWrap {
  max-width: 100%;
  background: #fff;
  border: 1px solid #d8dee7;
  border-radius: 14px;
  padding: 14px;
  color: #111827;
}

.salesPeriodSelector {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.salesPeriodSelector button {
  padding: 8px 16px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  color: #475569;
}

.salesPeriodSelector button.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.salesSummary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.salesSummaryCard {
  background: #f8fafc;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.salesSummaryCard h4 {
  margin: 0 0 8px 0;
  color: #64748b;
  font-size: 0.9rem;
}

.salesSummaryCard .value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
}

.salesSummaryCard.positive .value {
  color: #16a34a;
}

.salesSummaryCard.negative .value {
  color: #dc2626;
}

.salesTableWrap {
  overflow-x: auto;
  margin-top: 16px;
}

.salesTable {
  width: 100%;
  background: #fff;
  border-collapse: collapse;
}

.salesTable th,
.salesTable td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.salesTable th {
  background: #f8fafc;
  font-weight: 600;
  color: #0f172a;
}

.salesTable td {
  color: #334155;
}

.salesTable tr:hover {
  background: #f8fafc;
}

.salesUploadArea {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  background: #f8fafc;
  margin-bottom: 16px;
}

.salesUploadArea.dragover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.salesAiQuery {
  background: #f8fafc;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
}

.salesAiQuery h4 {
  margin: 0 0 12px 0;
  color: #0f172a;
}

.salesAiQueryExamples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.salesAiQueryExamples button {
  padding: 6px 12px;
  background: #e2e8f0;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #475569;
  cursor: pointer;
}

.salesAiQueryExamples button:hover {
  background: #cbd5e1;
}


/* Mobile responsive for torrents */
@media (max-width: 768px) {
  .netflixCard {
    width: 150px;
  }
  
  .netflixCard .poster {
    height: 225px;
  }
  
  .torrentsHeader h2 {
    font-size: 1.5rem;
  }
  
  .netflixCard .info {
    opacity: 1;
    position: relative;
    background: #1a1a1a;
  }
}

/* Additional CSP-safe styles loaded */
