#revenue-dialog {
  width: min(720px, calc(100% - 24px));
  max-height: 90dvh;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.25);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#revenue-dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.revenue-modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}

.revenue-modal-title-group h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: #0f172a;
}

.revenue-modal-sub {
  font-size: 13px;
  color: #64748b;
  margin: 4px 0 0 0;
}

#revenue-close {
  width: 38px;
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  font-size: 22px;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

#revenue-close:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.revenue-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.revenue-date-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.revenue-date-picker label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.revenue-date-picker input[type="date"] {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 14px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
}

.revenue-date-picker input[type="date"]:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.revenue-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.revenue-search-box label {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
}

.revenue-search-box input[type="search"] {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px;
  font: inherit;
  font-size: 14px;
  min-width: 180px;
  outline: none;
  background: #ffffff;
}

.revenue-search-box input[type="search"]:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.revenue-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.revenue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.revenue-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 2px solid #e2e8f0;
  user-select: none;
  white-space: nowrap;
}

.revenue-table th.sortable {
  cursor: pointer;
  transition: background 0.15s;
}

.revenue-table th.sortable:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.revenue-table th .sort-icon {
  font-size: 12px;
  margin-left: 4px;
  color: #94a3b8;
}

.revenue-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.revenue-table tbody tr:hover {
  background: #f8fafc;
}

.revenue-phone-cell {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.revenue-store-cell {
  font-weight: 600;
  color: #0f172a;
}

.revenue-badge-pill {
  display: inline-block;
  background: #22c55e;
  color: #ffffff;
  padding: 4px 14px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

.revenue-total-row td {
  padding: 16px;
  background: #ffffff;
  border-bottom: none;
}

.revenue-total-pill {
  display: inline-block;
  background: #f43f5e;
  color: #ffffff;
  padding: 6px 18px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  box-shadow: 0 3px 6px rgba(244, 63, 94, 0.25);
}

.revenue-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding-top: 8px;
}

.revenue-info {
  font-size: 13px;
  color: #64748b;
}

.revenue-refresh-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.revenue-refresh-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.revenue-empty-state {
  text-align: center;
  padding: 32px 16px;
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 640px) {
  #revenue-dialog {
    padding: 16px;
    max-height: 94dvh;
  }
  .revenue-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .revenue-search-box {
    margin-left: 0;
    width: 100%;
  }
  .revenue-search-box input[type="search"] {
    width: 100%;
  }
  .revenue-table th, .revenue-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
  .revenue-badge-pill {
    padding: 3px 10px;
    font-size: 13px;
  }
  .revenue-total-pill {
    padding: 5px 14px;
    font-size: 14px;
  }
}
